[DebianGIS-dev] r831 - in packages/libhdf4/branches/upstream/current: . bin config hdf hdf/fmpool hdf/src hdf/src/fort_ps hdf/test hdf/test/fort_ps hdf/util hdf/util/testfiles hdf/util/testfiles/fp2hdf man mfhdf mfhdf/c++ mfhdf/dumper mfhdf/dumper/testfiles mfhdf/fortran mfhdf/fortran/config mfhdf/fortran/fort_ps mfhdf/fortran/msoft mfhdf/fortran/vms mfhdf/hdfimport mfhdf/hdiff mfhdf/hdiff/testfiles mfhdf/hrepack mfhdf/libsrc mfhdf/libsrc/config mfhdf/ncdump mfhdf/ncgen mfhdf/nctest mfhdf/port mfhdf/xdr release_notes

frankie at alioth.debian.org frankie at alioth.debian.org
Tue May 15 09:53:08 UTC 2007


Author: frankie
Date: 2007-05-15 09:53:05 +0000 (Tue, 15 May 2007)
New Revision: 831

Added:
   packages/libhdf4/branches/upstream/current/INSTALL_WINDOWS.txt
   packages/libhdf4/branches/upstream/current/MANIFEST
   packages/libhdf4/branches/upstream/current/Makefile.am
   packages/libhdf4/branches/upstream/current/aclocal.m4
   packages/libhdf4/branches/upstream/current/bin/
   packages/libhdf4/branches/upstream/current/bin/chkmanifest
   packages/libhdf4/branches/upstream/current/bin/compile
   packages/libhdf4/branches/upstream/current/bin/config.guess
   packages/libhdf4/branches/upstream/current/bin/config.sub
   packages/libhdf4/branches/upstream/current/bin/depcomp
   packages/libhdf4/branches/upstream/current/bin/install-sh
   packages/libhdf4/branches/upstream/current/bin/locate_sw
   packages/libhdf4/branches/upstream/current/bin/missing
   packages/libhdf4/branches/upstream/current/bin/mkinstalldirs
   packages/libhdf4/branches/upstream/current/bin/regenerate.sh
   packages/libhdf4/branches/upstream/current/bin/runtest
   packages/libhdf4/branches/upstream/current/bin/snapshot
   packages/libhdf4/branches/upstream/current/config/BlankForm
   packages/libhdf4/branches/upstream/current/config/freebsd
   packages/libhdf4/branches/upstream/current/config/hpux11.00
   packages/libhdf4/branches/upstream/current/config/ia64-linux-gnu
   packages/libhdf4/branches/upstream/current/config/irix6.x
   packages/libhdf4/branches/upstream/current/config/linux-gnu
   packages/libhdf4/branches/upstream/current/config/osf5.x
   packages/libhdf4/branches/upstream/current/config/powerpc-apple
   packages/libhdf4/branches/upstream/current/config/powerpc-ibm-aix5.x
   packages/libhdf4/branches/upstream/current/config/solaris2.x
   packages/libhdf4/branches/upstream/current/config/sv1-cray
   packages/libhdf4/branches/upstream/current/config/unicos10.0.X
   packages/libhdf4/branches/upstream/current/config/unicosmk2.0.6.X
   packages/libhdf4/branches/upstream/current/configure.ac
   packages/libhdf4/branches/upstream/current/hdf/COPYING
   packages/libhdf4/branches/upstream/current/hdf/COPYRIGHT
   packages/libhdf4/branches/upstream/current/hdf/Makefile.am
   packages/libhdf4/branches/upstream/current/hdf/README.33r4
   packages/libhdf4/branches/upstream/current/hdf/src/INSTALL
   packages/libhdf4/branches/upstream/current/hdf/src/Makefile.am
   packages/libhdf4/branches/upstream/current/hdf/src/cszip.c
   packages/libhdf4/branches/upstream/current/hdf/src/cszip.h
   packages/libhdf4/branches/upstream/current/hdf/src/h4config.h.in
   packages/libhdf4/branches/upstream/current/hdf/test/MAKECOM.OLD
   packages/libhdf4/branches/upstream/current/hdf/test/Makefile.am
   packages/libhdf4/branches/upstream/current/hdf/test/tdupimgs.c
   packages/libhdf4/branches/upstream/current/hdf/test/tszip.c
   packages/libhdf4/branches/upstream/current/hdf/util/Makefile.am
   packages/libhdf4/branches/upstream/current/hdf/util/README.fp2hdf
   packages/libhdf4/branches/upstream/current/hdf/util/README.fp2hdf.test
   packages/libhdf4/branches/upstream/current/hdf/util/fp2hdf.test
   packages/libhdf4/branches/upstream/current/hdf/util/h4cc.in
   packages/libhdf4/branches/upstream/current/hdf/util/h4fc.in
   packages/libhdf4/branches/upstream/current/hdf/util/h4redeploy.in
   packages/libhdf4/branches/upstream/current/hdf/util/testfiles/fp2hdf/
   packages/libhdf4/branches/upstream/current/hdf/util/testfiles/fp2hdf/h100x100
   packages/libhdf4/branches/upstream/current/hdf/util/testfiles/fp2hdf/h100x100h
   packages/libhdf4/branches/upstream/current/hdf/util/testfiles/fp2hdf/h100x100hv
   packages/libhdf4/branches/upstream/current/hdf/util/testfiles/fp2hdf/h60x75
   packages/libhdf4/branches/upstream/current/hdf/util/testfiles/fp2hdf/h60x75n
   packages/libhdf4/branches/upstream/current/hdf/util/testfiles/fp2hdf/h60x75v
   packages/libhdf4/branches/upstream/current/hdf/util/testfiles/fp2hdf/pal.hdf
   packages/libhdf4/branches/upstream/current/hdf/util/testfiles/fp2hdf/t100x100
   packages/libhdf4/branches/upstream/current/hdf/util/testfiles/head.r24.gz
   packages/libhdf4/branches/upstream/current/hdf/util/testfiles/head.r8.gz
   packages/libhdf4/branches/upstream/current/hdf/util/testutil.sh.in
   packages/libhdf4/branches/upstream/current/man/Makefile.am
   packages/libhdf4/branches/upstream/current/mfhdf/Makefile.am
   packages/libhdf4/branches/upstream/current/mfhdf/README.HDF.33
   packages/libhdf4/branches/upstream/current/mfhdf/dumper/Makefile.am
   packages/libhdf4/branches/upstream/current/mfhdf/dumper/testfiles/Example6.hdf
   packages/libhdf4/branches/upstream/current/mfhdf/dumper/testfiles/Image_with_Palette.hdf
   packages/libhdf4/branches/upstream/current/mfhdf/dumper/testfiles/LongDataset.hdf
   packages/libhdf4/branches/upstream/current/mfhdf/dumper/testfiles/ctxtr2r.hdf
   packages/libhdf4/branches/upstream/current/mfhdf/dumper/testfiles/dumpgr-19.out
   packages/libhdf4/branches/upstream/current/mfhdf/dumper/testfiles/dumpsds-10.out
   packages/libhdf4/branches/upstream/current/mfhdf/dumper/testfiles/dumpsds-11.out
   packages/libhdf4/branches/upstream/current/mfhdf/dumper/testfiles/grtdfi322.hdf
   packages/libhdf4/branches/upstream/current/mfhdf/dumper/testfiles/grtdfui162.hdf
   packages/libhdf4/branches/upstream/current/mfhdf/dumper/testfiles/grtdfui82.hdf
   packages/libhdf4/branches/upstream/current/mfhdf/dumper/testfiles/grtdfui83.hdf
   packages/libhdf4/branches/upstream/current/mfhdf/dumper/testfiles/grtdfui84.hdf
   packages/libhdf4/branches/upstream/current/mfhdf/dumper/testfiles/star.hdf
   packages/libhdf4/branches/upstream/current/mfhdf/dumper/testfiles/swf32.hdf
   packages/libhdf4/branches/upstream/current/mfhdf/dumper/testfiles/swf32_fileattr.hdf
   packages/libhdf4/branches/upstream/current/mfhdf/dumper/testfiles/swi16.hdf
   packages/libhdf4/branches/upstream/current/mfhdf/dumper/testfiles/swi8.hdf
   packages/libhdf4/branches/upstream/current/mfhdf/dumper/testfiles/tdata.hdf
   packages/libhdf4/branches/upstream/current/mfhdf/dumper/testfiles/tdf24.hdf
   packages/libhdf4/branches/upstream/current/mfhdf/dumper/testfiles/tdfr8f.hdf
   packages/libhdf4/branches/upstream/current/mfhdf/dumper/testfiles/test.hdf
   packages/libhdf4/branches/upstream/current/mfhdf/dumper/testfiles/tvattr.hdf
   packages/libhdf4/branches/upstream/current/mfhdf/dumper/testfiles/tvset.hdf
   packages/libhdf4/branches/upstream/current/mfhdf/dumper/testhdp.sh.in
   packages/libhdf4/branches/upstream/current/mfhdf/fortran/Makefile.am
   packages/libhdf4/branches/upstream/current/mfhdf/fortran/config/ftest-apple.f
   packages/libhdf4/branches/upstream/current/mfhdf/fortran/config/ftest-solaris64.f
   packages/libhdf4/branches/upstream/current/mfhdf/fortran/config/jackets-apple.c
   packages/libhdf4/branches/upstream/current/mfhdf/fortran/config/jackets-solaris64.c
   packages/libhdf4/branches/upstream/current/mfhdf/fortran/config/netcdf-apple.inc
   packages/libhdf4/branches/upstream/current/mfhdf/fortran/config/netcdf-solaris64.inc
   packages/libhdf4/branches/upstream/current/mfhdf/fortran/test_nc.cdl
   packages/libhdf4/branches/upstream/current/mfhdf/fortran/test_nc.nc
   packages/libhdf4/branches/upstream/current/mfhdf/hdfimport/
   packages/libhdf4/branches/upstream/current/mfhdf/hdfimport/Makefile.am
   packages/libhdf4/branches/upstream/current/mfhdf/hdfimport/Makefile.in
   packages/libhdf4/branches/upstream/current/mfhdf/hdfimport/hdfimport.c
   packages/libhdf4/branches/upstream/current/mfhdf/hdfimport/hdfimport.input1
   packages/libhdf4/branches/upstream/current/mfhdf/hdfimport/hdfimport.out1
   packages/libhdf4/branches/upstream/current/mfhdf/hdfimport/hdfimport.out2
   packages/libhdf4/branches/upstream/current/mfhdf/hdfimport/hdfimporttest.c
   packages/libhdf4/branches/upstream/current/mfhdf/hdfimport/testutil.sh.in
   packages/libhdf4/branches/upstream/current/mfhdf/hdiff/
   packages/libhdf4/branches/upstream/current/mfhdf/hdiff/Makefile.am
   packages/libhdf4/branches/upstream/current/mfhdf/hdiff/Makefile.in
   packages/libhdf4/branches/upstream/current/mfhdf/hdiff/hdiff.c
   packages/libhdf4/branches/upstream/current/mfhdf/hdiff/hdiff.h
   packages/libhdf4/branches/upstream/current/mfhdf/hdiff/hdiff_array.c
   packages/libhdf4/branches/upstream/current/mfhdf/hdiff/hdiff_gattr.c
   packages/libhdf4/branches/upstream/current/mfhdf/hdiff/hdiff_gr.c
   packages/libhdf4/branches/upstream/current/mfhdf/hdiff/hdiff_list.c
   packages/libhdf4/branches/upstream/current/mfhdf/hdiff/hdiff_list.h
   packages/libhdf4/branches/upstream/current/mfhdf/hdiff/hdiff_main.c
   packages/libhdf4/branches/upstream/current/mfhdf/hdiff/hdiff_mattbl.c
   packages/libhdf4/branches/upstream/current/mfhdf/hdiff/hdiff_mattbl.h
   packages/libhdf4/branches/upstream/current/mfhdf/hdiff/hdiff_misc.c
   packages/libhdf4/branches/upstream/current/mfhdf/hdiff/hdiff_sds.c
   packages/libhdf4/branches/upstream/current/mfhdf/hdiff/hdiff_table.c
   packages/libhdf4/branches/upstream/current/mfhdf/hdiff/hdiff_table.h
   packages/libhdf4/branches/upstream/current/mfhdf/hdiff/hdiff_vs.c
   packages/libhdf4/branches/upstream/current/mfhdf/hdiff/hdifftst.c
   packages/libhdf4/branches/upstream/current/mfhdf/hdiff/testfiles/
   packages/libhdf4/branches/upstream/current/mfhdf/hdiff/testfiles/hdiff_01.txt
   packages/libhdf4/branches/upstream/current/mfhdf/hdiff/testfiles/hdiff_02.txt
   packages/libhdf4/branches/upstream/current/mfhdf/hdiff/testfiles/hdiff_03.txt
   packages/libhdf4/branches/upstream/current/mfhdf/hdiff/testfiles/hdiff_04.txt
   packages/libhdf4/branches/upstream/current/mfhdf/hdiff/testfiles/hdiff_05.txt
   packages/libhdf4/branches/upstream/current/mfhdf/hdiff/testfiles/hdiff_06.txt
   packages/libhdf4/branches/upstream/current/mfhdf/hdiff/testfiles/hdiff_07.txt
   packages/libhdf4/branches/upstream/current/mfhdf/hdiff/testfiles/hdiff_08.txt
   packages/libhdf4/branches/upstream/current/mfhdf/hdiff/testfiles/hdiff_09.txt
   packages/libhdf4/branches/upstream/current/mfhdf/hdiff/testfiles/hdiff_10.txt
   packages/libhdf4/branches/upstream/current/mfhdf/hdiff/testfiles/hdiff_11.txt
   packages/libhdf4/branches/upstream/current/mfhdf/hdiff/testfiles/hdifftst1.hdf
   packages/libhdf4/branches/upstream/current/mfhdf/hdiff/testfiles/hdifftst2.hdf
   packages/libhdf4/branches/upstream/current/mfhdf/hdiff/testhdiff.sh
   packages/libhdf4/branches/upstream/current/mfhdf/hrepack/
   packages/libhdf4/branches/upstream/current/mfhdf/hrepack/Makefile.am
   packages/libhdf4/branches/upstream/current/mfhdf/hrepack/Makefile.in
   packages/libhdf4/branches/upstream/current/mfhdf/hrepack/hrepack.c
   packages/libhdf4/branches/upstream/current/mfhdf/hrepack/hrepack.h
   packages/libhdf4/branches/upstream/current/mfhdf/hrepack/hrepack_all.sh
   packages/libhdf4/branches/upstream/current/mfhdf/hrepack/hrepack_an.c
   packages/libhdf4/branches/upstream/current/mfhdf/hrepack/hrepack_an.h
   packages/libhdf4/branches/upstream/current/mfhdf/hrepack/hrepack_check.c
   packages/libhdf4/branches/upstream/current/mfhdf/hrepack/hrepack_cmp.c
   packages/libhdf4/branches/upstream/current/mfhdf/hrepack/hrepack_gr.c
   packages/libhdf4/branches/upstream/current/mfhdf/hrepack/hrepack_gr.h
   packages/libhdf4/branches/upstream/current/mfhdf/hrepack/hrepack_list.c
   packages/libhdf4/branches/upstream/current/mfhdf/hrepack/hrepack_lsttable.c
   packages/libhdf4/branches/upstream/current/mfhdf/hrepack/hrepack_lsttable.h
   packages/libhdf4/branches/upstream/current/mfhdf/hrepack/hrepack_main.c
   packages/libhdf4/branches/upstream/current/mfhdf/hrepack/hrepack_opttable.c
   packages/libhdf4/branches/upstream/current/mfhdf/hrepack/hrepack_opttable.h
   packages/libhdf4/branches/upstream/current/mfhdf/hrepack/hrepack_pal.c
   packages/libhdf4/branches/upstream/current/mfhdf/hrepack/hrepack_pal.h
   packages/libhdf4/branches/upstream/current/mfhdf/hrepack/hrepack_parse.c
   packages/libhdf4/branches/upstream/current/mfhdf/hrepack/hrepack_parse.h
   packages/libhdf4/branches/upstream/current/mfhdf/hrepack/hrepack_sds.c
   packages/libhdf4/branches/upstream/current/mfhdf/hrepack/hrepack_sds.h
   packages/libhdf4/branches/upstream/current/mfhdf/hrepack/hrepack_sdutil.c
   packages/libhdf4/branches/upstream/current/mfhdf/hrepack/hrepack_sdutil.h
   packages/libhdf4/branches/upstream/current/mfhdf/hrepack/hrepack_utils.c
   packages/libhdf4/branches/upstream/current/mfhdf/hrepack/hrepack_utils.h
   packages/libhdf4/branches/upstream/current/mfhdf/hrepack/hrepack_vg.c
   packages/libhdf4/branches/upstream/current/mfhdf/hrepack/hrepack_vg.h
   packages/libhdf4/branches/upstream/current/mfhdf/hrepack/hrepack_vs.c
   packages/libhdf4/branches/upstream/current/mfhdf/hrepack/hrepack_vs.h
   packages/libhdf4/branches/upstream/current/mfhdf/hrepack/image24pixel.txt
   packages/libhdf4/branches/upstream/current/mfhdf/hrepack/image24plane.txt
   packages/libhdf4/branches/upstream/current/mfhdf/hrepack/image8.txt
   packages/libhdf4/branches/upstream/current/mfhdf/hrepack/info.txt
   packages/libhdf4/branches/upstream/current/mfhdf/hrepack/pal_rgb.h
   packages/libhdf4/branches/upstream/current/mfhdf/hrepack/test_hrepack.sh
   packages/libhdf4/branches/upstream/current/mfhdf/hrepack/test_hrepack_add.c
   packages/libhdf4/branches/upstream/current/mfhdf/hrepack/test_hrepack_add.h
   packages/libhdf4/branches/upstream/current/mfhdf/hrepack/test_hrepack_main.c
   packages/libhdf4/branches/upstream/current/mfhdf/hrepack/test_hrepack_verify.c
   packages/libhdf4/branches/upstream/current/mfhdf/hrepack/test_hrepack_verify.h
   packages/libhdf4/branches/upstream/current/mfhdf/libsrc/Makefile.am
   packages/libhdf4/branches/upstream/current/mfhdf/libsrc/config/netcdf-apple.h
   packages/libhdf4/branches/upstream/current/mfhdf/libsrc/config/netcdf-solaris64.h
   packages/libhdf4/branches/upstream/current/mfhdf/libsrc/hdftest.h
   packages/libhdf4/branches/upstream/current/mfhdf/libsrc/temptySDSs.c
   packages/libhdf4/branches/upstream/current/mfhdf/libsrc/tidtypes.c
   packages/libhdf4/branches/upstream/current/mfhdf/libsrc/trank0.c
   packages/libhdf4/branches/upstream/current/mfhdf/libsrc/tsd.c
   packages/libhdf4/branches/upstream/current/mfhdf/libsrc/tszip.c
   packages/libhdf4/branches/upstream/current/mfhdf/ncdump/Makefile.am
   packages/libhdf4/branches/upstream/current/mfhdf/ncgen/Makefile.am
   packages/libhdf4/branches/upstream/current/mfhdf/nctest/Makefile.am
   packages/libhdf4/branches/upstream/current/mfhdf/nctest/test_unlim.cdl
   packages/libhdf4/branches/upstream/current/mfhdf/nctest/test_unlim.nc
   packages/libhdf4/branches/upstream/current/mfhdf/nctest/varget_unlim.c
   packages/libhdf4/branches/upstream/current/mfhdf/port/Makefile.am
   packages/libhdf4/branches/upstream/current/mfhdf/xdr/Makefile.am
   packages/libhdf4/branches/upstream/current/release_notes/HISTORY.txt
   packages/libhdf4/branches/upstream/current/release_notes/RELEASE.txt
   packages/libhdf4/branches/upstream/current/release_notes/misc_docs.txt
Removed:
   packages/libhdf4/branches/upstream/current/config.guess
   packages/libhdf4/branches/upstream/current/config.sub
   packages/libhdf4/branches/upstream/current/config/mh-aix
   packages/libhdf4/branches/upstream/current/config/mh-alpha
   packages/libhdf4/branches/upstream/current/config/mh-decstation
   packages/libhdf4/branches/upstream/current/config/mh-fbsd
   packages/libhdf4/branches/upstream/current/config/mh-fujivp
   packages/libhdf4/branches/upstream/current/config/mh-hpux
   packages/libhdf4/branches/upstream/current/config/mh-hpux11
   packages/libhdf4/branches/upstream/current/config/mh-ia64
   packages/libhdf4/branches/upstream/current/config/mh-irix32
   packages/libhdf4/branches/upstream/current/config/mh-irix5
   packages/libhdf4/branches/upstream/current/config/mh-irix6
   packages/libhdf4/branches/upstream/current/config/mh-linux
   packages/libhdf4/branches/upstream/current/config/mh-mac
   packages/libhdf4/branches/upstream/current/config/mh-solaris
   packages/libhdf4/branches/upstream/current/config/mh-solarisx86
   packages/libhdf4/branches/upstream/current/config/mh-sun
   packages/libhdf4/branches/upstream/current/config/mh-t3e
   packages/libhdf4/branches/upstream/current/config/mh-unicos
   packages/libhdf4/branches/upstream/current/configure.in
   packages/libhdf4/branches/upstream/current/hdf/MAKE.COM
   packages/libhdf4/branches/upstream/current/hdf/build.inc
   packages/libhdf4/branches/upstream/current/hdf/jpeg/
   packages/libhdf4/branches/upstream/current/hdf/pablo/
   packages/libhdf4/branches/upstream/current/hdf/util/testfiles/head.r24.Z
   packages/libhdf4/branches/upstream/current/hdf/util/testfiles/head.r8.Z
   packages/libhdf4/branches/upstream/current/hdf/util/testutil.sh
   packages/libhdf4/branches/upstream/current/hdf/zlib/
   packages/libhdf4/branches/upstream/current/install-sh
   packages/libhdf4/branches/upstream/current/mfhdf/Makefile.in_orig
   packages/libhdf4/branches/upstream/current/mfhdf/aclocal.m4
   packages/libhdf4/branches/upstream/current/mfhdf/configure
   packages/libhdf4/branches/upstream/current/mfhdf/configure.in
   packages/libhdf4/branches/upstream/current/mfhdf/doc/
   packages/libhdf4/branches/upstream/current/mfhdf/dumper/Example6.hdf
   packages/libhdf4/branches/upstream/current/mfhdf/dumper/Image_with_Palette.hdf
   packages/libhdf4/branches/upstream/current/mfhdf/dumper/LongDataset.hdf
   packages/libhdf4/branches/upstream/current/mfhdf/dumper/Makefile.in_orig
   packages/libhdf4/branches/upstream/current/mfhdf/dumper/ctxtr2r.hdf
   packages/libhdf4/branches/upstream/current/mfhdf/dumper/depend
   packages/libhdf4/branches/upstream/current/mfhdf/dumper/grtdfi322.hdf
   packages/libhdf4/branches/upstream/current/mfhdf/dumper/grtdfui162.hdf
   packages/libhdf4/branches/upstream/current/mfhdf/dumper/grtdfui82.hdf
   packages/libhdf4/branches/upstream/current/mfhdf/dumper/grtdfui83.hdf
   packages/libhdf4/branches/upstream/current/mfhdf/dumper/grtdfui84.hdf
   packages/libhdf4/branches/upstream/current/mfhdf/dumper/star.hdf
   packages/libhdf4/branches/upstream/current/mfhdf/dumper/swf32.hdf
   packages/libhdf4/branches/upstream/current/mfhdf/dumper/swf32_fileattr.hdf
   packages/libhdf4/branches/upstream/current/mfhdf/dumper/swi16.hdf
   packages/libhdf4/branches/upstream/current/mfhdf/dumper/swi8.hdf
   packages/libhdf4/branches/upstream/current/mfhdf/dumper/tdata.hdf
   packages/libhdf4/branches/upstream/current/mfhdf/dumper/tdf24.hdf
   packages/libhdf4/branches/upstream/current/mfhdf/dumper/tdfr8f.hdf
   packages/libhdf4/branches/upstream/current/mfhdf/dumper/test.hdf
   packages/libhdf4/branches/upstream/current/mfhdf/dumper/testhdp.sh
   packages/libhdf4/branches/upstream/current/mfhdf/dumper/tvattr.hdf
   packages/libhdf4/branches/upstream/current/mfhdf/dumper/tvset.hdf
   packages/libhdf4/branches/upstream/current/mfhdf/fortran/Makefile.in_orig
   packages/libhdf4/branches/upstream/current/mfhdf/libsrc/Makefile.in_orig
   packages/libhdf4/branches/upstream/current/mfhdf/ncdump/Makefile.in_orig
   packages/libhdf4/branches/upstream/current/mfhdf/ncgen/Makefile.in_orig
   packages/libhdf4/branches/upstream/current/mfhdf/nctest/Makefile.in_orig
   packages/libhdf4/branches/upstream/current/mfhdf/pablo/
   packages/libhdf4/branches/upstream/current/mfhdf/port/Makefile.in_orig
   packages/libhdf4/branches/upstream/current/mfhdf/xdr/Makefile.in_orig
   packages/libhdf4/branches/upstream/current/mkinstalldirs
   packages/libhdf4/branches/upstream/current/release_notes/ABOUT_4.1r4
   packages/libhdf4/branches/upstream/current/release_notes/compile.txt
Modified:
   packages/libhdf4/branches/upstream/current/COPYING
   packages/libhdf4/branches/upstream/current/INSTALL
   packages/libhdf4/branches/upstream/current/Makefile.in
   packages/libhdf4/branches/upstream/current/README
   packages/libhdf4/branches/upstream/current/Win32.nofortran.zip
   packages/libhdf4/branches/upstream/current/Win32.zip
   packages/libhdf4/branches/upstream/current/configure
   packages/libhdf4/branches/upstream/current/hdf/Makefile.in
   packages/libhdf4/branches/upstream/current/hdf/fmpool/Makefile.in
   packages/libhdf4/branches/upstream/current/hdf/src/Makefile.in
   packages/libhdf4/branches/upstream/current/hdf/src/atom.c
   packages/libhdf4/branches/upstream/current/hdf/src/df24.c
   packages/libhdf4/branches/upstream/current/hdf/src/dfan.c
   packages/libhdf4/branches/upstream/current/hdf/src/dfan.h
   packages/libhdf4/branches/upstream/current/hdf/src/dffunc.inc
   packages/libhdf4/branches/upstream/current/hdf/src/dfp.c
   packages/libhdf4/branches/upstream/current/hdf/src/dfr8.c
   packages/libhdf4/branches/upstream/current/hdf/src/dfsd.c
   packages/libhdf4/branches/upstream/current/hdf/src/dynarray.c
   packages/libhdf4/branches/upstream/current/hdf/src/fort_ps/herrpf.c
   packages/libhdf4/branches/upstream/current/hdf/src/fort_ps/herrpff.f
   packages/libhdf4/branches/upstream/current/hdf/src/fort_ps/hfilepf.c
   packages/libhdf4/branches/upstream/current/hdf/src/fort_ps/hfilepff.f
   packages/libhdf4/branches/upstream/current/hdf/src/fort_ps/hprotop.h
   packages/libhdf4/branches/upstream/current/hdf/src/fort_ps/mfgrpf.c
   packages/libhdf4/branches/upstream/current/hdf/src/fort_ps/mfgrpff.f
   packages/libhdf4/branches/upstream/current/hdf/src/fort_ps/vgpf.c
   packages/libhdf4/branches/upstream/current/hdf/src/fort_ps/vgpff.f
   packages/libhdf4/branches/upstream/current/hdf/src/hbitio.c
   packages/libhdf4/branches/upstream/current/hdf/src/hblocks.c
   packages/libhdf4/branches/upstream/current/hdf/src/hbuffer.c
   packages/libhdf4/branches/upstream/current/hdf/src/hchunks.c
   packages/libhdf4/branches/upstream/current/hdf/src/hchunks.h
   packages/libhdf4/branches/upstream/current/hdf/src/hcomp.c
   packages/libhdf4/branches/upstream/current/hdf/src/hcomp.h
   packages/libhdf4/branches/upstream/current/hdf/src/hcompi.h
   packages/libhdf4/branches/upstream/current/hdf/src/hcompri.c
   packages/libhdf4/branches/upstream/current/hdf/src/hconv.h
   packages/libhdf4/branches/upstream/current/hdf/src/hdf.h
   packages/libhdf4/branches/upstream/current/hdf/src/hdfi.h
   packages/libhdf4/branches/upstream/current/hdf/src/herr.c
   packages/libhdf4/branches/upstream/current/hdf/src/herr.h
   packages/libhdf4/branches/upstream/current/hdf/src/herrf.c
   packages/libhdf4/branches/upstream/current/hdf/src/hextelt.c
   packages/libhdf4/branches/upstream/current/hdf/src/hfile.c
   packages/libhdf4/branches/upstream/current/hdf/src/hfile.h
   packages/libhdf4/branches/upstream/current/hdf/src/hfiledd.c
   packages/libhdf4/branches/upstream/current/hdf/src/hfileff.f
   packages/libhdf4/branches/upstream/current/hdf/src/hlimits.h
   packages/libhdf4/branches/upstream/current/hdf/src/hproto.h
   packages/libhdf4/branches/upstream/current/hdf/src/linklist.c
   packages/libhdf4/branches/upstream/current/hdf/src/mcache.c
   packages/libhdf4/branches/upstream/current/hdf/src/mfan.c
   packages/libhdf4/branches/upstream/current/hdf/src/mfgr.c
   packages/libhdf4/branches/upstream/current/hdf/src/mfgr.h
   packages/libhdf4/branches/upstream/current/hdf/src/mfgrf.c
   packages/libhdf4/branches/upstream/current/hdf/src/mfgrff.f
   packages/libhdf4/branches/upstream/current/hdf/src/src.inc
   packages/libhdf4/branches/upstream/current/hdf/src/trace.h
   packages/libhdf4/branches/upstream/current/hdf/src/vattr.c
   packages/libhdf4/branches/upstream/current/hdf/src/vg.c
   packages/libhdf4/branches/upstream/current/hdf/src/vgf.c
   packages/libhdf4/branches/upstream/current/hdf/src/vgff.f
   packages/libhdf4/branches/upstream/current/hdf/src/vgp.c
   packages/libhdf4/branches/upstream/current/hdf/src/vhi.c
   packages/libhdf4/branches/upstream/current/hdf/src/vio.c
   packages/libhdf4/branches/upstream/current/hdf/src/vrw.c
   packages/libhdf4/branches/upstream/current/hdf/src/vsfld.c
   packages/libhdf4/branches/upstream/current/hdf/test/Makefile.in
   packages/libhdf4/branches/upstream/current/hdf/test/an.c
   packages/libhdf4/branches/upstream/current/hdf/test/bitio.c
   packages/libhdf4/branches/upstream/current/hdf/test/extelt.c
   packages/libhdf4/branches/upstream/current/hdf/test/forsupf.c
   packages/libhdf4/branches/upstream/current/hdf/test/forsupff.f
   packages/libhdf4/branches/upstream/current/hdf/test/fort_ps/forsupffp.f
   packages/libhdf4/branches/upstream/current/hdf/test/fort_ps/fortest.arg
   packages/libhdf4/branches/upstream/current/hdf/test/fort_ps/fortestFp.f
   packages/libhdf4/branches/upstream/current/hdf/test/fort_ps/manpf.f
   packages/libhdf4/branches/upstream/current/hdf/test/fortest.c
   packages/libhdf4/branches/upstream/current/hdf/test/fortest.h
   packages/libhdf4/branches/upstream/current/hdf/test/fortestF.f
   packages/libhdf4/branches/upstream/current/hdf/test/litend.c
   packages/libhdf4/branches/upstream/current/hdf/test/manf.f
   packages/libhdf4/branches/upstream/current/hdf/test/mgr.c
   packages/libhdf4/branches/upstream/current/hdf/test/mgrf.f
   packages/libhdf4/branches/upstream/current/hdf/test/nbit.c
   packages/libhdf4/branches/upstream/current/hdf/test/t24f.f
   packages/libhdf4/branches/upstream/current/hdf/test/testhdf.c
   packages/libhdf4/branches/upstream/current/hdf/test/tproto.h
   packages/libhdf4/branches/upstream/current/hdf/test/tvattr.c
   packages/libhdf4/branches/upstream/current/hdf/test/tvattrf.f
   packages/libhdf4/branches/upstream/current/hdf/test/tvset.c
   packages/libhdf4/branches/upstream/current/hdf/test/tvsetf.f
   packages/libhdf4/branches/upstream/current/hdf/util/Makefile.in
   packages/libhdf4/branches/upstream/current/hdf/util/fp2hdf.c
   packages/libhdf4/branches/upstream/current/hdf/util/fptest.c
   packages/libhdf4/branches/upstream/current/hdf/util/gif2mem.c
   packages/libhdf4/branches/upstream/current/hdf/util/hdf2gif.c
   packages/libhdf4/branches/upstream/current/hdf/util/hdfcomp.c
   packages/libhdf4/branches/upstream/current/hdf/util/hdfpack.c
   packages/libhdf4/branches/upstream/current/hdf/util/vshow.c
   packages/libhdf4/branches/upstream/current/man/Makefile.in
   packages/libhdf4/branches/upstream/current/mfhdf/Makefile.in
   packages/libhdf4/branches/upstream/current/mfhdf/c++/ncvalues.cc
   packages/libhdf4/branches/upstream/current/mfhdf/c++/ncvalues.hh
   packages/libhdf4/branches/upstream/current/mfhdf/c++/netcdf.cc
   packages/libhdf4/branches/upstream/current/mfhdf/c++/netcdf.hh
   packages/libhdf4/branches/upstream/current/mfhdf/dumper/Makefile.in
   packages/libhdf4/branches/upstream/current/mfhdf/dumper/TEST.COM
   packages/libhdf4/branches/upstream/current/mfhdf/dumper/hdp.c
   packages/libhdf4/branches/upstream/current/mfhdf/dumper/hdp.h
   packages/libhdf4/branches/upstream/current/mfhdf/dumper/hdp_dump.c
   packages/libhdf4/branches/upstream/current/mfhdf/dumper/hdp_gr.c
   packages/libhdf4/branches/upstream/current/mfhdf/dumper/hdp_list.c
   packages/libhdf4/branches/upstream/current/mfhdf/dumper/hdp_sds.c
   packages/libhdf4/branches/upstream/current/mfhdf/dumper/hdp_vd.c
   packages/libhdf4/branches/upstream/current/mfhdf/dumper/hdp_vg.c
   packages/libhdf4/branches/upstream/current/mfhdf/dumper/show.c
   packages/libhdf4/branches/upstream/current/mfhdf/dumper/testfiles/dumpgr-13.out
   packages/libhdf4/branches/upstream/current/mfhdf/dumper/testfiles/dumpgr-15.out
   packages/libhdf4/branches/upstream/current/mfhdf/fortran/Makefile.in
   packages/libhdf4/branches/upstream/current/mfhdf/fortran/config/ftest-aix.f
   packages/libhdf4/branches/upstream/current/mfhdf/fortran/config/ftest-alpha.f
   packages/libhdf4/branches/upstream/current/mfhdf/fortran/config/ftest-convex.f
   packages/libhdf4/branches/upstream/current/mfhdf/fortran/config/ftest-dec.f
   packages/libhdf4/branches/upstream/current/mfhdf/fortran/config/ftest-fbsd.f
   packages/libhdf4/branches/upstream/current/mfhdf/fortran/config/ftest-fujivp.f
   packages/libhdf4/branches/upstream/current/mfhdf/fortran/config/ftest-hpux.f
   packages/libhdf4/branches/upstream/current/mfhdf/fortran/config/ftest-ia64.f
   packages/libhdf4/branches/upstream/current/mfhdf/fortran/config/ftest-irix32.f
   packages/libhdf4/branches/upstream/current/mfhdf/fortran/config/ftest-irix4.f
   packages/libhdf4/branches/upstream/current/mfhdf/fortran/config/ftest-irix5.f
   packages/libhdf4/branches/upstream/current/mfhdf/fortran/config/ftest-irix6.f
   packages/libhdf4/branches/upstream/current/mfhdf/fortran/config/ftest-linux.f
   packages/libhdf4/branches/upstream/current/mfhdf/fortran/config/ftest-mac.f
   packages/libhdf4/branches/upstream/current/mfhdf/fortran/config/ftest-solaris.f
   packages/libhdf4/branches/upstream/current/mfhdf/fortran/config/ftest-solarisx86.f
   packages/libhdf4/branches/upstream/current/mfhdf/fortran/config/ftest-sun.f
   packages/libhdf4/branches/upstream/current/mfhdf/fortran/config/ftest-t3e.f
   packages/libhdf4/branches/upstream/current/mfhdf/fortran/config/ftest-unicos.f
   packages/libhdf4/branches/upstream/current/mfhdf/fortran/config/jackets-aix.c
   packages/libhdf4/branches/upstream/current/mfhdf/fortran/config/jackets-alpha.c
   packages/libhdf4/branches/upstream/current/mfhdf/fortran/config/jackets-convex.c
   packages/libhdf4/branches/upstream/current/mfhdf/fortran/config/jackets-dec.c
   packages/libhdf4/branches/upstream/current/mfhdf/fortran/config/jackets-fbsd.c
   packages/libhdf4/branches/upstream/current/mfhdf/fortran/config/jackets-fujivp.c
   packages/libhdf4/branches/upstream/current/mfhdf/fortran/config/jackets-hpux.c
   packages/libhdf4/branches/upstream/current/mfhdf/fortran/config/jackets-ia64.c
   packages/libhdf4/branches/upstream/current/mfhdf/fortran/config/jackets-irix32.c
   packages/libhdf4/branches/upstream/current/mfhdf/fortran/config/jackets-irix4.c
   packages/libhdf4/branches/upstream/current/mfhdf/fortran/config/jackets-irix5.c
   packages/libhdf4/branches/upstream/current/mfhdf/fortran/config/jackets-irix6.c
   packages/libhdf4/branches/upstream/current/mfhdf/fortran/config/jackets-linux.c
   packages/libhdf4/branches/upstream/current/mfhdf/fortran/config/jackets-mac.c
   packages/libhdf4/branches/upstream/current/mfhdf/fortran/config/jackets-solaris.c
   packages/libhdf4/branches/upstream/current/mfhdf/fortran/config/jackets-solarisx86.c
   packages/libhdf4/branches/upstream/current/mfhdf/fortran/config/jackets-sun.c
   packages/libhdf4/branches/upstream/current/mfhdf/fortran/config/jackets-t3e.c
   packages/libhdf4/branches/upstream/current/mfhdf/fortran/config/jackets-unicos.c
   packages/libhdf4/branches/upstream/current/mfhdf/fortran/fort_ps/hdftestp.f
   packages/libhdf4/branches/upstream/current/mfhdf/fortran/fort_ps/mfsdpf.c
   packages/libhdf4/branches/upstream/current/mfhdf/fortran/fort_ps/mfsdpff.f
   packages/libhdf4/branches/upstream/current/mfhdf/fortran/hdftest.f
   packages/libhdf4/branches/upstream/current/mfhdf/fortran/mfsdf.c
   packages/libhdf4/branches/upstream/current/mfhdf/fortran/mfsdff.f
   packages/libhdf4/branches/upstream/current/mfhdf/fortran/msoft/ftest.for
   packages/libhdf4/branches/upstream/current/mfhdf/fortran/msoft/jackets.c
   packages/libhdf4/branches/upstream/current/mfhdf/fortran/vms/ftest.for
   packages/libhdf4/branches/upstream/current/mfhdf/fortran/vms/ftest.m4
   packages/libhdf4/branches/upstream/current/mfhdf/fortran/vms/jackets.c
   packages/libhdf4/branches/upstream/current/mfhdf/libsrc/Makefile.in
   packages/libhdf4/branches/upstream/current/mfhdf/libsrc/array.c
   packages/libhdf4/branches/upstream/current/mfhdf/libsrc/cdf.c
   packages/libhdf4/branches/upstream/current/mfhdf/libsrc/cdftest.c
   packages/libhdf4/branches/upstream/current/mfhdf/libsrc/config/netcdf-aix.h
   packages/libhdf4/branches/upstream/current/mfhdf/libsrc/config/netcdf-alpha.h
   packages/libhdf4/branches/upstream/current/mfhdf/libsrc/config/netcdf-convex.h
   packages/libhdf4/branches/upstream/current/mfhdf/libsrc/config/netcdf-dec.h
   packages/libhdf4/branches/upstream/current/mfhdf/libsrc/config/netcdf-fbsd.h
   packages/libhdf4/branches/upstream/current/mfhdf/libsrc/config/netcdf-fujivp.h
   packages/libhdf4/branches/upstream/current/mfhdf/libsrc/config/netcdf-hpux.h
   packages/libhdf4/branches/upstream/current/mfhdf/libsrc/config/netcdf-ia64.h
   packages/libhdf4/branches/upstream/current/mfhdf/libsrc/config/netcdf-irix32.h
   packages/libhdf4/branches/upstream/current/mfhdf/libsrc/config/netcdf-irix4.h
   packages/libhdf4/branches/upstream/current/mfhdf/libsrc/config/netcdf-irix5.h
   packages/libhdf4/branches/upstream/current/mfhdf/libsrc/config/netcdf-irix6.h
   packages/libhdf4/branches/upstream/current/mfhdf/libsrc/config/netcdf-linux.h
   packages/libhdf4/branches/upstream/current/mfhdf/libsrc/config/netcdf-mac.h
   packages/libhdf4/branches/upstream/current/mfhdf/libsrc/config/netcdf-solaris.h
   packages/libhdf4/branches/upstream/current/mfhdf/libsrc/config/netcdf-solarisx86.h
   packages/libhdf4/branches/upstream/current/mfhdf/libsrc/config/netcdf-sun.h
   packages/libhdf4/branches/upstream/current/mfhdf/libsrc/config/netcdf-t3e.h
   packages/libhdf4/branches/upstream/current/mfhdf/libsrc/config/netcdf-unicos.h
   packages/libhdf4/branches/upstream/current/mfhdf/libsrc/config/netcdf-vms.h
   packages/libhdf4/branches/upstream/current/mfhdf/libsrc/hdf2netcdf.h
   packages/libhdf4/branches/upstream/current/mfhdf/libsrc/hdftest.c
   packages/libhdf4/branches/upstream/current/mfhdf/libsrc/mfhdf.h
   packages/libhdf4/branches/upstream/current/mfhdf/libsrc/mfsd.c
   packages/libhdf4/branches/upstream/current/mfhdf/libsrc/netcdf.h.in
   packages/libhdf4/branches/upstream/current/mfhdf/libsrc/putget.c
   packages/libhdf4/branches/upstream/current/mfhdf/libsrc/var.c
   packages/libhdf4/branches/upstream/current/mfhdf/libsrc/xdrposix.c
   packages/libhdf4/branches/upstream/current/mfhdf/ncdump/Makefile.in
   packages/libhdf4/branches/upstream/current/mfhdf/ncdump/ncdump.c
   packages/libhdf4/branches/upstream/current/mfhdf/ncgen/Makefile.in
   packages/libhdf4/branches/upstream/current/mfhdf/ncgen/make.com
   packages/libhdf4/branches/upstream/current/mfhdf/ncgen/ncgen.l
   packages/libhdf4/branches/upstream/current/mfhdf/nctest/Makefile.in
   packages/libhdf4/branches/upstream/current/mfhdf/nctest/driver.c
   packages/libhdf4/branches/upstream/current/mfhdf/nctest/slabs.c
   packages/libhdf4/branches/upstream/current/mfhdf/nctest/tests.h
   packages/libhdf4/branches/upstream/current/mfhdf/port/Makefile.in
   packages/libhdf4/branches/upstream/current/mfhdf/xdr/Makefile.in
   packages/libhdf4/branches/upstream/current/release_notes/bugs_fixed.txt
Log:
[svn-upgrade] Integrating new upstream version, libhdf4 (4.2r1)

Modified: packages/libhdf4/branches/upstream/current/COPYING
===================================================================
--- packages/libhdf4/branches/upstream/current/COPYING	2007-05-15 09:05:29 UTC (rev 830)
+++ packages/libhdf4/branches/upstream/current/COPYING	2007-05-15 09:53:05 UTC (rev 831)
@@ -3,7 +3,7 @@
 Copyright Notice and Statement for NCSA Hierarchical Data Format (HDF) 
 Software Library and Utilities
 
-Copyright 1988-2000 The Board of Trustees of the University of Illinois
+Copyright 1988-2005 The Board of Trustees of the University of Illinois
 
 All rights reserved.
 

Modified: packages/libhdf4/branches/upstream/current/INSTALL
===================================================================
--- packages/libhdf4/branches/upstream/current/INSTALL	2007-05-15 09:05:29 UTC (rev 830)
+++ packages/libhdf4/branches/upstream/current/INSTALL	2007-05-15 09:53:05 UTC (rev 831)
@@ -1,1176 +1,158 @@
-***************************************************************************
-  CONTENTS
-  --------
 
-  1. Obtaining the latest version
+    Installation instructions for HDF4.2r1 on UNIX and MacOSX platforms
+    ====================================================================
+                          February 2005
 
-  2. Installing HDF
-  2.1 Supported Platforms
-  2.2 Third Party Software Requirements
-  2.3 System Requirements
 
-  2.4 General Configuration/Installation - Unix
-  2.4.1 Overview
-  2.4.2 Layout of configuration files
+CONTENTS
 
-  2.4.3 Changing default values(CC,CFLAGS,..) and Setting Options
-  2.4.3.1 Changing default values(CC,CFLAGS,..)
-  2.4.3.2 Using HDF/MFHDF libraries w/ original netCDF library
-  2.4.3.3 Setting other Options
+0. Third Party Software Requirements
+1. Optional SZIP compression Library
+2. HDF4 Source code and precompiled binaries 
+3. UNIX and MacOSX configuration and build
+4. Using HDF/MFHDF libraries w/ original netCDF library
 
-  2.4.4 Running configure
-  2.4.5 Dealing with Configure Problems
-  2.4.6 Compiling, Testing and Installing
 
-  2.5 Platform-specific Notes
-  2.5.1 Solaris on Sparc
-  2.5.2 Solaris on INTEL(x86)
-  2.5.3 OpenVMS AXP on DEC Alpha
-  2.5.4 Windows 98/NT/2000
-  2.5.5 Macintosh OS - Power PC    ** Not Supported **
-  2.5.6 Exemplar 
-  2.5.7 SP2 Single node
-  2.5.8 T3E Single node
-  2.5.9a SGI IRIX 6.x
-  2.5.9b SGI IRIX64
-  2.5.10 DEC Alpha
+0. Third Party Software Requirements
+   =================================
 
-  2.6 Pablo Instrumentation
-  2.7 File Cache(Beta release)
-  2.8 Installation Location
-  2.9 Specifying the System Type
-  2.10 Configure Options 
+   x JPEG distribution release 6b(libjpeg.a). The "official" site
+     for this is ftp://ftp.uu.net/graphics/jpeg/jpegsrc.v6b.tar.gz
 
-  3. Man pages
+   x ZLIB 1.1.4(libz.a) Source code and binaries may be downloaded from
+     http://www.gzip.org/ or from the NCSA ftp server  
+     ftp://hdf.ncsa.uiuc.edu/lib-external/gzip/
+     Newest ZLIB 1.2 may also be used.
 
-  4. Release Notes
 
-  5. Documentation
+1. Optional SZIP compression Library
+   ==================================
 
-  6. FAQ
+   x HDF4.2r1 may be configured to use the SZIP compression Library.
+     For more information about the SZIP library, see
 
-  7. Java Products
+               http://hdf.ncsa.uiuc.edu/doc_resource/SZIP/ 
 
-  8. HELP
+     The SZIP compression library is free for non-commercial use; 
+     see http://hdf.ncsa.uiuc.edu/doc_resource/SZIP/Commercial_szip.html
+     for information regarding commercial use.
+     
+2. HDF4 Source code and precompiled binaries
+   ==========================================
+     HDF provides "tar source ball" and precompiled binaries from 
+     the NCSA ftp server (ftp.ncsa.uiuc.edu) in the directories:
 
-*****************************************************************************
+         ftp://hdf.ncsa.uiuc.edu/HDF/HDF_Current/src
+         ftp://hdf.ncsa.uiuc.edu/HDF/HDF_Current/bin 
 
-1. Obtaining the latest version
-   ============================
+   IMPORTANT:
+   ==========
+   HDF4 prebuilt binaries come with the SZIP compression. In order to use
+   the binaries install SZIP Library on your system. You may download SZIP
+   precompiled binaries from 
+         http://hdf.ncsa.uiuc.edu/doc_resource/SZIP
 
-    The most recent version of the distribution can be obtained from
-    the NCSA ftp archive site at:
 
-       ftp://ftp.ncsa.uiuc.edu/HDF/HDF/HDF_Current/
+3. UNIX and MacOSX configuration and build
+   =======================================
 
-    The HDF home page is at:   
-       http://hdf.ncsa.uiuc.edu/ 
+   0)  The HDF4.2r1 Library was tested on the following platforms
 
-    The distribution can be downloaded from the HDF Home page at:
-       http://hdf.ncsa.uiuc.edu/obtain.html
-    
+       AIX 5.1, 5.2 (32 and 64-bit versions)
+       SunOs 5.7 (32 and 64-bit versions) 
+       SunOS 5.8 (32 and 64-bit versions) 
+       SunOS 5.9 (32 and 64-bit versions) 
+       HPUX 11.00
+       Linux 2.4 
+       IRIX64-6.5 (32 and 64-bit versions)
+       MacOSX
+       Crays SV1 and T90
+       True64 (OSF1 V5.1)
+       Windows 2000 and XP
+       FeeBSD
+       IA32 and IA64
+       Altix
+       AMD Opteron
 
-2. Installing HDF	
-   ==============
-
-    For compiling and installing the HDF libraries, tests and
-    utilities on a system, please follow these instructions. 
-
-2.1 Supported Platforms
-    ===================
-
-    For PLATFORM specific NOTES see Section 2.5 called
-    'Platform-specific Notes'.
-
-
-  Platform(OS)                    C-Compiler       Fortran-Compiler   
-  ------------                    ----------       ---------------- 
-  Sun4(Solaris 2.7)               WorkShop         WorkShop Compilers 5.0
-                                  Compilers C 5.0  FORTRAN 77 5.0         
-  Sun4(Solaris 2.6)               WorkShop         WorkShop Compilers 5.0
-                                  Compilers C 5.0  FORTRAN 77 5.0             
-  SGI-Indy(IRIX v6.5)             CC 7.30          f77 7.30
-  SGI-Origin(IRIX64 v6.5-n32)     CC 7.3.1m        f77 7.3.1m 
-  SGI-Origin(IRIX64 v6.5-64)      CC 7.3.1m        f77 7.3.1m    
-  HP9000/755(HP-UX B.11.00)       CC A.11.00.13    f77 B.11.00.01
-  Exemplar(HP-UX B.10.01)         CC V2.0          f77 V1.2.6
-  Cray J90 (bob.1 10.0.0.7)       CC 6.3.0.2       Cray Fortran 3.4.0.1.0 
-  IBM SP (single node, v4.3)      XLC 5.0.1.0      f77 07.01.0000.0002 
-  DEC Alpha/Digital Unix v4.0     DEC C v5.2-040   Digital Fortran v4.1-92 
-  DEC Alpha/OpenVMS AXP v7.1      DEC C v5.6-003   Digital Fortran 77 X7.1-156  
-  IBM PC - Intel Pentium
-       Solarisx86 (2.5.1)         GCC 2.7.2          -                
-       Linux      (2.2.16)        GCC 2.95.2       g77  0.5.25    
-       FreeBSD    (4.1.1)         GCC 2.95.2       GNU f77 V0.5.25
-  Windows NT/98/2000              MSVC++ 6.0       DEC Visual Fortran 6.0
-  T3E (sn6711 2.0.539b)           Cray CC 6.3.0.2  Cray Fortran 3.4.0.1.0
-
-
-  NOTE:  Platforms listed with compiler information entered, are 
-  platforms that HDF was tested on and for which we provide 
-  pre-compiled binaries.  
-
- 
-2.2  Third Party Software Requirements:
-     ==================================
-
-     1. IJPEG distribution release 6b(libjpeg.a). The "official" site
-        for this is ftp://ftp.uu.net/graphics/jpeg/jpegsrc.v6b.tar.gz
-
-     2. ZLIB 1.1.3(libz.a) distribution.
-
-     Both of these distributions are included with this distribution
-     in 'hdf/jpeg' and 'hdf/zlib'. The HDF/mfhdf base distribution
-     is known to work with these versions only.
-
-2.3 System Requirements
-    ===================
-
-    To build HDF from source, you need:
-
-      * an ANSI C compiler. The native ANSI compilers on the above 
-        platforms are supported. On platforms where no ANSI compiler
-        was available the free GNU ANSI compiler GCC was used.
-
-      * a Fortran 77 compiler (F90 on Crays) if you want Fortran support. 
-        See above table for platforms where Fortran is supported. You 
-        can compile both libraries without Fortran support by setting 
-        the Fortran compiler variable 'FC = NONE' in the respective
-        makefile fragment(mh-<os>) found in the top-level 'config'
-        directory: 
-
-                $(toplevel)/config/mh-<os>.
-
-        See below for further details of configuration and installation.
-        
-
-2.4 General Configuration/Installation - Unix
-    =========================================
-
-    2.4.1 Overview
-    --------------        
-    In this distribution there are two types of 'configure'
-    scripts. One is the Cygnus 'configure' script and the other is the
-    'configure' script created by the GNU autoconf package. The Cygnus
-    'configure' script is used at the top level to configure the overall
-    distribution and the HDF/MFHDF/IJPEG/ZLIB libraries. The GNU 'configure' 
-    script is used by the netCDF/IJPEG distributions to configure themselves. 
-    However, these gnu configure scripts are not used in configuring this 
-    distribution.
- 
-    The Cygnus 'configure' script attempts to guess the correct
-    platform you are configuring the distribution for by calling the shell
-    script 'config.guess'. It outputs a unique string based on information
-    obtained from the UNIX command 'uname' consisting of CPU-VENDOR-OS
-    e.g. 'hppa1.1-hp-hpux9.03' for an  HP9000/735 running HPUX-9.03.
-
-    2.4.2 Layout of configuration files
-    -----------------------------------
-    The following shows the layout of the files used in the configuration
-    of the HDF distribution.
-
-    NOTE: The $(toplevel)/mfhdf/CUSTOMIZE and 
-          $(toplevel)/mfhdf/configure(autoconf) files are no longer used 
-          in the configuration of the distribution.
-  
-    $(toplevel)/Makefile.in
-                config.guess
-                config.sub
-                configure (cygnus)
-                configure.in (cygnus)
-                config/mh-hpux, mh-sun,.....(host makefile fragments)
-
-                man/Makefile.in
-
-                mfhdf/CUSTOMIZE(not used)
-                mfhdf/configure(autoconf - not used)
-                mfhdf/libsrc/config/netcdf-aix.h,...  -> copied to netcdf.h
-                mfhdf/fortran/config/ftest-aix.f,...  -> copied to ftest.f
-                mfhdf/fortran/config/jackets-aix.c,.. -> copied to jackets.c
-                mfhdf/fortran/config/netcdf-aix.inc,..-> copied to netcdf.inc
-
-                hdf/Makefile.in
-                hdf/src/Makefile.in
-                hdf/test/Makefile.in
-                hdf/util/Makefile.in
-                hdf/zlib/Makefile.in
-                hdf/pablo/Makefile.in
-
-                hdf/jpeg/configure.in (cygnus)
-                hdf/jpeg/Makefile.in
-                hdf/jpeg/configure.gnu(autoconf - not used)
-                hdf/jpeg/config/mh-hpux, mh-sun,... (host makefile fragments)
-                hdf/jpeg/config/jhpux.h, jsun.h,...   -> copied to jconfig.h
-
-                hdf/fmpool/configure, configure.in config.guess, config.sub,
-                           Makefile.in (all cygnus)
-                hdf/fmpool/config/mh-hpux, mh-sun,...(host makefile fragments)
-                hdf/fmpool/config/fmpsolaris.h,...    -> copied to fmpconf.h
-
-    2.4.3 Changing default values(CC,CFLAGS,..) and Setting Options
-    ---------------------------------------------------------------
-    To change any of the default values or set any of the options 
-    edit the makefile fragment: 
-
-             $(toplevel)/config/mh-<os>
-
-    for your particular operating system. After changing the values you must 
-    re-run the top-level 'configure' script. Make sure you start from
-    a clean distribution if you are rebuilding after a previous make
-    (i.e. 'make distclean') before re-running 'configure'.
-
-      2.4.3.1 Changing default values(CC,CFLAGS,..)
-      ********************************************
-      To change any of the default values for CC, FC, CFLAGS, FFLAGS,..etc
-      edit the top part of the makefile fragment: $(toplevel)/config/mh-<os>
-      It is also a good idea to look at the other system variables to make sure 
-      they are set correctly for your system.
-
-      2.4.3.2 Using HDF/MFHDF libraries w/ original netCDF library
-      ************************************************************
-      To use the HDF/MFHDF libraries(libdf.a, libmfhdf.a) with the
-      original netCDF library(libnetcdf.a) the HDF/MFHDF distribution
-      must be compiled with the option '-DHAVE_NETCDF'. This will
-      rename the HDF version of the C-interface(ncxxx) of the netCDF API
-      to sd_ncxxx to avoid clashing with the original netCDF API from
-      libnetcdf.a. Currently there is no support for renaming the 
-      netCDF Fortran interface stubs. As such the HDF/MFHDF distribution 
-      must be compiled without fortran support. HDF Users can still access
-      HDF/netCDF files through the SDxxx interface but not through the
-      ncxxx interface unless the renamed interface is used(sd_ncxxx).
-
-      2.4.3.3 Setting other Options
-      *****************************
-      The makefile fragment must also be modified to enable the features 
-      mentioned in sections 2.6) and 2.7) below.
-
-    2.4.4 Running configure
-    -----------------------
-    To build both of the libraries contained in this directory,
-    run the ``configure'' script in $(toplevel), e.g.:
-
-	./configure -v --prefix=/usr/local/hdf
-
-    If you're using `csh' on an old version of System V, you might need 
-    to type `sh ./configure -v --prefix=/usr/local/hdf' instead to prevent 
-    `csh' from trying to execute `configure' itself.
-
-    This will configure the distribution to install the libraries, utilities,
-    include and man files in '/usr/local/hdf/lib','/usr/local/hdf/bin',
-    '/usr/local/hdf/include' and '/usr/local/hdf/man' respectively. The
-    default 'prefix' is '/usr/local'. It is advisable to use something
-    like the above to avoid overwriting say another 'libjpeg.a' that might be
-    installed in '/usr/local/lib'. The '-v' option is for verbose output.
-
-    Note that both 'libz.a' and 'libjpeg.a' and their respective
-    include files are installed along with the base HDF(libdf.a) 
-    and netCDF(libmfhdf.a) libraries.
-
-    If the configure script can't determine your type of computer
-    then it probably is a platfrom that is no longer supported.
-    If you want to be adventurous see the section 'Dealing with
-    Configure Problems' below. Otherwise send an email to 
-    'hdfhelp at ncsa.uiuc.edu' for further help. 
-
-    2.4.5 Dealing with Configure Problems
-    *************************************
-    If you want to be adventurous you can try the following.
-
-    Configure basically calls either of the two shell scripts 'config.guess' 
-    or 'config.sub' depending upon whether a target platform was supplied 
-    on the command line to configure. If you don't provide a target on
-    the command line configure calls 'config.guess' to guess what platfrom
-    it is configuring for. The shell script 'config.guess' uses the unix
-    command 'uname' to figure out the CPU, vendor, and OS of the
-    platform. If you do provide a target on the command line, configure
-    calls the shell script 'config.sub' to build the triplet specifying
-    CPU, vendor, and OS from the full or partial target provided.
-
-    If the configure script can't determine your type of computer, give it
-    a general name that the computer is generally referred to as an argument, 
-    for instance './configure sun4'.  You can use the script 'config.sub' 
-    to test whether a general name is recognized; if it is, config.sub 
-    translates it to a triplet specifying CPU, vendor, and OS.
-    (e.g hppa1.1-hp-hpux9.03 for an HP900/735 running HPUX9.03).
-
-    If this still fails all is not lost. All the configure script really
-    needs is one of the supported targets mentioned above(except NT).
-    If you think your platform is close to one of the above platforms
-    mentioned in the 'Supported Platforms' sections you can pass configure
-    this target and it will configure the distribution for that target.
-
-    For possible mappings you will need to look inside the shell script
-    'config.sub' and look at the partial to full mappings and pick one
-    that satisfies the triplet mappings found in 'configure.in' below
-    the section "# per-host:'. Note that if you try a mapping and it
-    does not work this means that 'config.sub' needs to be edited to
-    provide the proper mapping from your target to a full mapping that
-    is supported. 
-
-    There are currently NO instructions for porting the distribution to a 
-    new platform.
-
-    2.4.6 Compiling, Testing and Installing
-    ---------------------------------------
-    To compile the library and utilities type:
-
-        make 
-
-    To find out the available make targets type:
-
-        make help
-
-    To test the libraries and utilities type:
-
-        make test 
-
-    It is a good idea to save the output of the tests and view it later 
-    for errors.
-    e.g. 
-
-        make test >& make.test.out
-
-    To install the libraries, utilities, includes and man pages type: e.g.
-
-        make install
-
-2.5 Platform-specific Notes
-    ========================
-
-
-    2.5.1 Solaris on Sparc
-    ----------------------
-    The distribution has been compiled/tested with the native
-    ANSI-C compiler and native fortran compiler. The binary 
-    distribution was compiled using the native compilers.
-
-    When compiling your programs on Solaris, you must include the 
-    the nsl library, to resolve calls to the xdr* routines.
-    For example,
-
-      cc -Xc -xO2 -o <your program> <your program>.c  \
-         -I<path for hdf include directory>\
-         -L<path for hdf libraries> -lmfhdf -ldf -ljpeg -lz \
-         -L/usr/lib -lnsl
-
-
-    2.5.2 Solaris on INTEL(x86)
-    ---------------------------
-
-    The distribution has been compiled/tested with GCC 2.7.2 with
-    *NO* FORTRAN support.
-
-    When compiling your programs on Solaris_x86, you must include the 
-    the nsl library, to resolve calls to the xdr* routines.
-    For example,
-
-       gcc -ansi -O -o <your program> <your program>.c \
-           -I<path for hdf include directory> \
-           -L<path for hdf libraries> -lmfhdf -ldf -ljpeg -lz  \
-           -L/usr/lib -lnsl
-
-    2.5.3 OpenVMS AXP on DEC Alpha
-    ------------------------------
-   
-   To build the HDF Library on Alpha OpenVMS systems use
-    MAKEVMS.COM file in the top level directory of the VMS Library source.
-                                                       -------------------
-
-    To build the library in interactive mode run
-
-    @MAKEVMS.COM
-
-    To build the library in the background:
-
-    1. Check that the first command in MAKEVMS.COM sets default directory
-       to the top level directory in the HDF Library source tree (just
-       edit the first command line:  $  set def.... ).
-
-    2. Submit MAKEVMS.COM to the appropriate batch queue on your system
-       For example:
-
-    $ submit/log=buildhdf.log/noprint/notify/restart/que=batch$queue MAKEVMS.COM
-
-
-    MAKEVMS.COM file
-
-    1.  Creates three directories in the top level directory:
-        [...tophdf.include]
-        [...tophdf.bin]
-        [...tophdf.lib]
-
-    2.  Builds four libraries LIBJPEG.OLB, LIBZ.OLB, DF.OLB, and MFHDF.OLB,
-        and copies them into the [...tophdf.bin] directory.
-
-    3.  Builds the HDF utilities and copies them into the [...tophdf.bin]
-        directory.
-
-    4.  Copies the header files to the [...tophdf.include] directory.
-
-    5.  Runs the library tests after building each library and the tests for the
-
-        ncdump, ncgen and hdp utilities.
-
-    We recommend building the library in background and then checking log file
-    for test results. Output of the hdp test is written to the
-    [...tophdf.mfhdf.dumper]hdp.out file.
-
-    See MAKEVMS.COM for more information.
-
-    NOTE: If you are building from UNIX source perform the following steps
-          before you run MAKEVMS.COM:
-
-          1. Make sure that files in the directory [.mfhdf.fortran.vms] are
-             up to date.
-          2. In the directory [.hdf.test] change the files
-             forsupff.f
-             tsdmmsf.f
-             tsdnmmsf.f
-             tsdntf.f
-             tsdnnt.f
-             tvsetf.f
-             slabwf.f
-                      following the instructions given in the comments,
-             which start with 'For VMS', in these files.
-
-
-    2.5.4 Windows 98/NT/2000
-    ------------------------
-
-      Install HDF4.1 Release 4 on Windows NT, Windows 2000 and Windows 98
-
-The instructions which follow assume that you will be using one of 
-the 'zip' files that we provide, either the binary code release
-(HDF41r4.zip) or the source code release (HDF41r4s.zip).
-
-In building HDF from source code you may select between 
-two build environment options ( with Fortran or without Fortran support
-depending on your application and environment needs ).  
-
-The following sections discuss in details installation procedures. 
-
-
-Building from Binary Code Release (HDF41r4.zip)
-===============================================
-To install the HDFand MFHDF libraries and utilities, 
-it is assumed that you have done the following:
+       For more information, see the release_notes/RELEASE.txt file, "Platforms
+       tested" section.
       
-
-      1. Create a directory structure to unpack the library. For 
-      example: 
-
-	    c:\					(any drive)
-           MyHDFstuff\				(any folder name)
-
-      2. Copy the binary archive (HDF41r4.zip) 
-      to that directory 
-      and unpack it by running WinZip on HDF41r4.zip (the binary archive).
-      This should create a directory called 'HDF41r4' which 
-      contains the following files and directories.
-
-            c:\MyHDFstuff\HDF41r4\lib             ( Single-threaded static
-                                                    versions of HDF and MFHDF
-                                                    libraries  with Fortran
-                                                    or without Fortran support )
-            c:\MyHDFstuff\HDF41r4\dlllib          ( Multi-threaded DLL import
-                                                    HDF and MFHDF  libraries 
-                                                    and DLL files with Fortran
-                                                    or no Fortran support )
-            c:\MyHDFstuff\HDF41r4\include         ( include files )
-            c:\MyHDFstuff\HDF41r4\bin             ( utilities )
-            c:\MyHDFstuff\HDF41r4\release_notes   ( release notes )
-            c:\MyHDFstuff\HDF41r4\install_NT_98   ( this file)
-
-      
-      3. If you are building an application that uses the HDF libraries 
-         the following locations will need to be specified for locating
-         header files and linking in the HDF libraries:
+   Before you start:
  
-            C:\MyHDFstuff\HDF41r4\lib or C:\MyHDFstuff\HDF41r4\dlllib
-            C:\MyHDFstuff\HDF41r4\include
+   1)  Make sure that the ZLIB and JPEG Libraries are installed on your
+       system.
+   2)  Optional: install the SZIP version 2.0 Library. 
+   3)  Extract the source from the hdf4.2r1.tar file and change
+       directory to hdf4.2r1
 
+   To Configure:
 
+   4)  Use the configure command in the top level HDF4 directory hdf4.2r1
 
-Note: The ws2_32.lib needs to linked with your executable if using the static 
-      mfhdf library.  The ws2_32.lib can be found in your Microsoft Visual C++
-      directory under the lib folder.
+       ./configure --with-zlib=/path_to_ZLIB_install_directory 
+                   --with-jpeg=/path_to_JPEG_install_directory 
+                   <--with-szlib=/path_to_SZIP_install_directory>
+                   --prefix=/path_to_HDF4_install_directory
 
+       * Please note that when szlib option is not used, SZIP Library will not
+         be configured in and SZIP compression will not be enabled.
+       * If your system has ZLIB and/or JPEG libraries installed under a
+         system library directory (such as /usr/lib), configure will
+         automatically find the library. In this case, the corresponding
+         configure flag may be ommitted.
+       * Note that --prefix defines where the installation path is.
+         The default is set as <hdf4_build_directory>/NewHDF 
 
-Building from Source Code Release (HDF41r4s.zip)
-================================================
+    To Build and Test:
 
-STEP I:  Preconditions
+    5)  To build the library
 
-To build the HDF and MFHDF libraries ( single-threaded static or
-multi-threaded DLL import libraries) and utilities, 
-it is assumed that you have done the following:
-      
-      1. Installed MicroSoft Developer Studio, and Visual C++ 6.0.
-         Visual Fortran 6.0 is needed if you are going to build the
-         full HDF Library with Fortran support.
+        gmake >& gmake.out
 
-      2. Set up a directory structure to unpack the library. For 
-      example: 
+    6)  To build and run the tests
 
-	    c:\					(any drive)
-           MyHDFstuff\				(any folder name)
+        gmake check >& check.out
 
-      3. Copy the source distribution archive to that directory 
-      and unpack it using the appropriate archiver options to
-      create a directory  hierarchy.
-         
-      Run WinZip on HDF41r4s.zip (the entire source tree).
-      This should create a directory called 'HDF41r4' which 
-      contains several files and directories.
-      
-Note: If you are building from the UNIX source code, then you will
-      need to replace the jconfig.h and netcdf.h file as follows
-      ( this assumes that the HDF Library tree resides 
-      under HDF41r4 directory ):
- 
-      copy C:\MyHDFstuff\HDF41r4\hdf\jpeg\config\jwin32.h
-                                 C:\MyHDFstuff\HDF41r4\hdf\jpeg\jconfig.h
-      copy C:\MyHDFstuff\HDF41r4\mfhdf\libsrc\win32cdf.h
-                                 C:\MyHDFstuff\HDF41r4\mfhdf\libsrc\netcdf.h
+    To Install:
 
-You do not need to do this if you are using the HDF41r4s.zip file! 
+    7)  To install the HDF4 library and tools
 
-STEP II: Select Installation type and Build.
+        gmake install
 
-You may select one of 2 ways to build the HDF libraries and 
-utilities, depending on your environment and application needs.
-
-Option I, (select Win32.nofortran.zip)
-This is the "NOFORTRAN" configuration : It builds debug and release single-threaded
-and multi-threaded versions of the HDF libraries, tests, and utilities. 
-There is no Fortran support.
-
-
-Option II, (select Win32.zip)
-This is "WITH FORTRAN support" configuration : it is the same as above but with
-Fortran support. 
-
-
-
-STEP III: Building the Libraries, tests and utilities.
-Note that the instructions are the same for both Options I and II. 
-
-
-	1. Unpack Win32.nofortran.zip or Win32.zip in 
-           directory HDF41r4\. 
-         
-        2. Invoke Microsoft Visial C++ 6.0, go to "File" and select
-           the "Open Workspace" option. 
-           Then open the c:\myHDFstuff\HDF41r4\all.dsw workspace. 
-
-        3. Select "Build", then Select "Set Active Configuration".
-
-           On Windows platform select as the active configuration
-
-           "all -- Win32 Debug" to build debug versions of single-threaded
-                                static libraries, tests and utilities and
-                                multi-threaded libraries and tests.
-            or
+    8)  By default the current configuration uses vendor compilers; to use
+        another compiler run the following commands before running
+        configure: 
  
-           "all -- Win32 Release" to build release versions of single-threaded
-                                static libraries, tests and utilities and
-                                multi-threaded libraries and tests.
-
-
-           Select "Build" and "Build all.exe" to
-           build the corresponding version of the HDF41r4 library.
-           If you are building from the Win32.zip archive, 
-           you will see that the Digital Visual Fortran compiler is invoked
-           by the Visual C++ Development environment in compiling the fortran code.
-
-           NOTE: "all" is a dummy target. You will get a link error when   
-           "all.exe." is built : 
-                 LINK: error LNK2001: unresolved external symbol _WinMainCRTStartup.....
-                 all.exe - 2 error(s), ....
-
-           Warning messages can be ignored. The "all.exe" is never created, 
-           so it is OK.
-
-           When the debug build is done the directories listed 
-           below will contain the following files:
-
-           c:\MyHDFstuff\HDF41r4\Windows\bin\debug - 
-
-             utilities, statically linked with the single-threaded libraries.
-
-           c:\MyHDFstuff\HDF41r4\Windows\lib\debug\singlethreaded -
-
-              HD414d.lib - HDF static library (inludes JPEG and GZIP libraries) 
-              HM414d.lib - MFHDF static library
-
-           c:\MyHDFstuff\HDF41r4\Windows\lib\debug\multithreaded -
-
-              HD414md.lib - HDF multi-threaded DLL import library 
-                            (inludes JPEG and GZIP libraries)
-              HM414md.lib - MFHDF multi-threaded DLL import library 
-
-           c:\MyHDFstuff\HDF41r4\Windows\DLL\debug
-
-               HD414md.DLL - HDF DLL
-               HM414md.DLL - MFHDF DLL
-
-           When the release build is done the directories listed
-           below will contain the following files:
+        setenv CC   "foo -flags"
+        setenv F77  "fffoo -flags"
  
-           c:\MyHDFstuff\HDF41r4\Windows\bin\release - 
- 
-             utilities, statically linked with the single-threaded libraries.
- 
-           c:\MyHDFstuff\HDF41r4\Windows\lib\release\singlethreaded - 
- 
-              HD414.lib - HDF static library (inludes JPEG and GZIP libraries)
-              HM414.lib - MFHDF static library
+        See the configure help page (configure --help) for a list of
+        environment variables that have an affect on building the
+        library.
 
-           c:\MyHDFstuff\HDF41r4\Windows\lib\release\multithreaded - 
- 
-              HD414m.lib - HDF multi-threaded DLL import library 
-                            (inludes JPEG and GZIP libraries)
-              HM414m.lib - MFHDF multi-threaded DLL import library
- 
-           c:\MyHDFstuff\HDF41r4\Windows\DLL\release 
+    9)  You may build HDF4 in a directory other than hdf4.2r1 by
+        using the "srcdir" option. Simply create a build directory and
+        type:
 
-               HD414m.DLL - HDF DLL
-               HM414m.DLL - MFHDF DLL
+        <path_to_hdf4.2r1>/configure ...
 
-
-Note: The ws2_32.lib needs to linked with your executable if using the static 
-      mfhdf library.  The ws2_32.lib can be found in your Microsoft Visual C++
-      directory under the lib folder.
-
-		
-STEP IV:   TESTING THE BUILD
-
-       In a command prompt window run the test batch file which
-       resides in the HDF41r4 directory to make sure that the libraries
-       were built correctly.
-
-       Set the path to include the DLL files or copy the files to the system
-       directory.
-
-       Then run Win32debugtst.bat to test debug version or
-       Win32releasetst.bat to test release version.  
-        
-
-STEP V:  INSTALLATION
-
-       In the command prompt window run the install_debug.bat file to install
-       the debug version. This file will create four directories under 
-       the HDF41r4 directory and copy over corresponding files:
-
-           bindbg     - utilties 
-           libdbg     - static libraries
-           dlllibdbg  - multi-threaded libraries and DLLs
-           include    - include files 
-
-       In the command prompt window run install_release.bat file to install 
-       release version. This file will create four directories under HDF41r4 
-       directory and copy corresponding files: 
+        where "..." are your configuration options.
  
-           bin     - utilties 
-           lib     - static libraries 
-           dlllib  - multi-threaded libraries and DLLs 
-           include - include files
- 
-Note:  There is an error in the debug version of the hdp tool.  It will show an
-       alert box with the error and 3 buttons.  This is a known problem.  The release
-       version is fine.
+4. Using HDF/MFHDF libraries w/ original netCDF library 
+   ====================================================
 
-STEP VI:  
+        To use the HDF/MFHDF libraries(libdf.a, libmfhdf.a) with the
+        original netCDF library(libnetcdf.a) the HDF/MFHDF distribution
+        must be compiled with the option '-DHAVE_NETCDF'. This will
+        rename the HDF version of the C-interface(ncxxx) of the netCDF API
+        to sd_ncxxx to avoid clashing with the original netCDF API from
+        libnetcdf.a. Currently there is no support for renaming the 
+        netCDF Fortran interface stubs. As such the HDF/MFHDF distribution 
+        must be compiled without fortran support. HDF Users can still access
+        HDF/netCDF files through the SDxxx interface but not through the
+        ncxxx interface unless the renamed interface is used(sd_ncxxx).
 
-BUILDING AN APPLICATION USING THE HDF LIBRARY - SOME HELPFUL POINTERS
-=====================================================================
 
-If you are building an application that uses the HDF library 
-the following locations will need to be specified for locating
-header files and linking in the HDF libraries:
- 
-            <top-level HDF directory>\lib
-            <top-level HDF directory>\dlllib
-            <top-level HDF directory>\include
 
-where <top-level HDF directory> may be C:\myHDFstuff\dev or C:\MyHDFstuff\HDF41r4\
+   Report all problems to hdfhelp at ncsa.uiuc.edu
 
-
-Using Microsoft Visual C++ version 6.x:
-
-Under Tools->Options, select the folder, Directories:
-   Under "Show directories for", select "Include files".
-   Add the following directories:
-      C:<path to HDF includes>\include  
-
-Under "Show directories for", select "Library files":
-   Add the following directories:
-      C:<path to HDF libs>\lib        
-
-Under Project->Settings, select folder, Link:
-   Add the following libraries to the beginning of the list of
-   Object/Library Modules:
-         HD414.lib HM414.lib (single-threaded release version)
-         HD414d.lib HM414d.lib (single-threaded debug version)
-
-         HD414m.lib HM414m.lib (multi-threaded release version)
-         HD414md.lib HM414md.lib (multi-threaded debug version)
-
-
-MORE HELPFUL POINTERS
-=====================
-(as described in terms of installing the  nofortran configuration)
-
-Here are some notes that may be of help if you are not familiar
-with using the Visual C++ Development Environment.
-
-Project name and location issues: 
-         The files in Win32.zip  and Win32.nofortran.zip must end up 
-         in the HDF41r4\ directory installed by HDF41r4s.zip
-
-         If you must install all.dsw and all.dsp in 
-         another directory, relative to HDF41r4\ , you will be asked to
-	 locate the above 5 sub-project files, when you open the
-	 project all.dsw.
-	 
-	 If you want to rename all (the entire project),
-	 you will need to modify two files
-	 all.dsw and all.dsp as text
-	 (contrary to the explicit warnings in the files).
-
-	 You can also modify all.dsw and all.dsp
-	 as text, to allow these 2 files to be installed
-	 in another directory.
-
-
-
-  Settings... details:
-  If you create your own project, the necessary settings can be
-  read from the all.dsp file(as text), or from the
-  Project Settings in the Developer Studio project settings 
-dialog.
-
-    Project
-	  Settings
-	      C/C++
-		  Category
-		     PreProcessor
-			 Code Generation
-			    Use run-time Library
-				   These are all set to use 
-                                      Single-Threaded
-				   or Single-Threaded debug
-                                   or Multi-Threaded
-                                   or Multi-Threaded debug
-
-
-
-
-
-    2.5.5 Macintosh OS - Power PC - 
-    -------------------------------
-    **** NOT SUPPORTED WITH HDF 4.1r4 ****
-
-    The distribution was compiled/tested with MetroWerks Codewarrior(CW Pro1).
-    Only the base libraries {jpeg.PPC.lib, z.PPC.lib, hdflib.PPC.lib,
-    xdr.PPC.lib and mfhdf.PPC.lib} were compiled and tested on the
-    PowerPC without Fortran support.
-
-    *NO* Fortran support is included in this distribution.
-
-    Codewarrior Projects can be found with this distribution.
-    They have been run through the Macintosh BinHex utility program. 
-    You need to compile the libraries before you can compile the test 
-    programs 'testhdf', 'xdrtest', 'cdftest', 'hdftest' and  'nctest'.
-
-    2.5.5.1 Special Notes
-    *********************
-    1. The test programs are SIOUX applications.
-    
-    2. When testing 'testhdf' in the 'hdf/test' directory make sure
-       that a directory called 'testdir' exists in 'hdf/test'.
-       This directory is used in the external element test.
-
-    3. You need at least 8MB of memory to run most of the test programs.
- 
-    4. Distribution also contains projects files to build utilities,
-       but utilities were not tested.
-
-    2.5.5.2 Building the Distribution
-    *********************************
-    The distribution  and tests need to be built in the order specified below.
-    Codewarrior Projects with the targets for Power PC and 68K can be 
-    found in the following directories:
- 
-    $(toplevel)/
-                hdf/zlib/zlib.project.hqx
-
-                hdf/jpeg/jpeglib.project.hqx
-
-                hdf/src/hdflib.project.hqx
-
-                hdf/test/testhdf.project.hqx
-
-                hdf/test/testdir(need to create this if it does not exist)
-    
-                mfhdf/xdr/xdrlib.project.hqx
-                mfhdf/xdr/xdrtest.project.hqx
-
-                mfhdf/libsrc/mfhdflib.project.hqx
-                             cdftest.project.hqx
-                             hdftest.project.hqx
-
-                mfhdf/nctest/nctest.project.hqx
-
-    Note that only the PPC version of the libraries and tests are supported.
-
-    2.5.5.3 Testing the Distribution
-    ********************************
-    Run the tests in the following order:
-      
-       1. hdf/test/testhdf
-          Note:
-           When testing 'testhdf' in the 'hdf/test' directory make sure
-           that a directory called 'testdir' exists in the 'hdf/test'.
-           This directory is used in the external element test.
-
-       2. mfhdf/xdr/xdrtest
-           After running this test compare the output to that shown in
-           the file mfhdf/xdr/testout.sav
-
-       3. mfhdf/libsrc/hdftest
-           After running this test compare the output to that shown in
-           the file mfhdf/libsrc/hdfout.sav
-
-       4. mfhdf/libsrc/cdftest
-           After running this test compare the output to that shown in
-           the file mfhdf/libsrc/testout.sav
-
-       5. mfhdf/nctest/nctest
-
-    2.5.5.4 Building utilities  
-    ********************************
-
-    Codewarrior Projects for utilities can be found in the following
-    directories:
- 
-           
-    $(toplevel)/
-                mfhdf/dumper/hdp/hdp.project.hqx
-
-                hdf/util/fp2hdf/fp2hdf.project.hqx
-                         hdf24to8/hdf24to8.project.hqx
-                         hdfcomp/hdfcomp.project.hqx
-                         hdfed/hdfed.project.hqx
-                         hdfls/hdfls.project.hqx
-                         hdfls/hdfls.project.hqx
-                         hdfpack/hdfpack.project.hqx
-                         hdftoPal/hdftopal.project.hqx
-                         hdftoR8/hdftoR8.project.hqx
-                         vshow/vshow.project.hqx
-                         PalToHDF/PalToHDF.project.hqx
-                         R8ToHDF/R8ToHDF.project.hqx 
-                         RISToHDF/RISToHDF.project.hqx
-
-    2.5.6 Exemplar
-    --------------
-    HP Exemplar (Convex) machines running version 10.x of HP-UX are now only
-    able to be configured for HP-UX.  If you are running an Exemplar with an
-    earlier version of the software, you must configure the machine as
-    follows:
-
-        ./configure -v --host=c2-convex-bsd
-
-    Otherwise, the machine will be configured for HP-UX.
-        
-
-    2.5.7 SP2 Single node
-    ----------------------
-    HDF has been compiled and tested to run in a single node of the
-    SP2 system.  You can make the library the same way you would on an
-    AIX system.  To use it in the parallel processing environment, we
-    advise you to execute the HDF code in only one designated process
-    since HDF code does not support concurrent access to the same file.
-
-
-    2.5.8 T3E Single node
-    ---------------------
-    HDF has been compiled and tested to run in a single node of the
-    T3E system.  It is compiled with the '-X m' to produce malleable
-    code which can be executed with multiple processing elements (PEs).
-    The code has not been tested run with multiple PEs.  To use it in
-    the parallel processing environment, we advise you to execute the
-    HDF code in only one designated process since HDF code does not
-    support concurrent access to the same file.
-
-
-    NOTE: HDF is compiled with the f90 compiler starting release 4.1r2.
-    Cray has phased out the cf77 compiler.  The f90 compiler issues
-    numerous warnings during the compiling of the Fortran API test
-    programs.  They can be safely ignored.  One warning is about the
-    unsupported DOUBLE PRECISION being replaced by REAL.  That works fine
-    for the purpose of the test programs since T3E REAL is 8 bytes in
-    size which is the same size as DOUBLE PRECISION in other machines.
-    Another warning is by the loader complaining about many SYMBOLS
-    referenced but not defined.  Those SYMBOLS are actually HDF Fortran
-    function names declared in dffunc.inc file and they are not used in
-    the testing.
-
-
-    2.5.9a SGI IRIX 6.x
-    -------------------
-    IRIX is the traditional SGI 32-bit OS.  Starting in version 6.x,
-    it supports two classes of 32 bit compilers, the old 32 (-o32)
-    and the new 32-bits (-n32).  SGI is phasing out the -o32 compilers.
-    Continued maintenance is available on the -n32 class of compilers only.
-    The HDF library configures to use the -n32 class of C and F77 compilers.
-    If you want to use different compiler options, you need to edit
-    config/mh-irix32 and then run configure.  Consult the section
-    of "General Configuration/Installation" for more information.
-
-
-    2.5.9b SGI IRIX64
-    -----------------
-    IRIX64 supports multiple combinations of ABI (-64, -n32, -o32) and
-    instruction sets (-mips2, -mips3, -mips4).  Previous HDF
-    library releases had hard coded the MIPS settings by guessing what
-    might be the most reasonable combination.  This release no longer
-    sets the MIPS option but leaves it up to the local or user's
-    default.  The configure still generates -64 code by default on
-    an IRIX64 system.  If -n32 code is desired, one may override it
-    by specifying 'irix6_32' during the configure step.
-
-    Configure command	    Code produced
-    -----------------	    -------------
-    ./configure                 -64
-    ./configure irix6_32        -n32
-
-    If you want to use different compiler options, you need to edit
-    config/mh-irix6 (for just configure) or config/mh-irix32 (for
-    configure irix6_32) and then run configure.  Consult the section
-    of "General Configuration/Installation" for more information.
-
-
-    2.5.10 DEC Alpha
-    ----------------
-    The distribution has been compiled/tested with the native Digital 
-    Unix C and FORTRAN compilers.
-
-    During the testing of the library the test 'mfhdf/libsrc/hdftest' 
-    will report "Unaligned access ..." messages which can be ignored.
-
-
-2.6 Pablo Instrumentation
-    =====================
-
-    This version of the distribution has support to create an instrumented 
-    version of the HDF libraries(libdf-inst.a and libmfhdf-inst.a). This 
-    library along with the Pablo performance data capture libraries can be 
-    used to gather data about I/O behavior and procedure execution times.  
-    Version 5.1 or higher of the trace library is required.
-
-    More detailed documentation on how to use the instrumented version of
-    the HDF library with Pablo can be found in the Pablo directory: 
-
-       $(toplevel)/hdf/pablo 
-
-    See the provided '$(toplevel)/hdf/pablo/README.Pablo' and the PostScript 
-    file '$(toplevel)/hdf/pablo/Pablo.ps' or Microsoft Word Document file
-    '$(toplevel)/hdf/pablo/Pablo.doc' or the PDF document file
-    /$(toplevel)/hdf/pablo/Pablo.pdf'.  
-
-    In this version both an instrumented version of the core HDF library 
-    libdf.a and the library libmfhdf.a can be created.  Current interfaces 
-    supported are ANxx, GRxx, DFSDxx, DFANxx, DFPxx, DFR8xx, DF24xx, Hxx, 
-    SDxx, Vxx, and VSxx.
-
-    To enable the creation of an instrumented library the following section
-    in the makefile fragment($(toplevel)/config/mh-<os>) must be uncommented 
-    and set.
-
-    # ------------ Macros for Pablo Instrumentation  --------------------
-    # Uncomment the following lines to create a Pablo Instrumentation
-    # version of the HDF core library called 'libdf-inst.a'
-    # See the documentation in the directory 'hdf/pablo' for further 
-    # information about Pablo and what platforms it is supported on
-    # before enabling. 
-    # You need to set 'PABLO_INCDIR' to the Pablo distribution 
-    # include directory to get to files 'IOTrace.h', 'IOTrace_SD.h' and others.
-    #PABLO_FLAGS  = -DHAVE_PABLO
-    #PABLO_INCDIR = /usr/local/include/pablo-5.1
-    #PABLO_INCLUDE = -I$(PABLO_INCDIR)
-    After setting these values you must re-run the toplevel 'configure' script.
-    Make sure that you start from a clean re-build(i.e. 'make clean') after
-    re-running the toplevel 'configure' script and then run 'make'.
-    Details on running configure can be found above in the section
-    'General Configuration/Installation - Unix'.
-
-2.7 File Cache(Beta release)
-    =================================
-    This version of the distribution has preliminary support for file caching.
-
-*NOTE*: This version is NOT officially supported on all platforms
-        and has not been extensively tested. As such it is provided as is.
-        It will be supported officially in a later release.
-
-    The file cache allows the file to be mapped to user memory on 
-    a per page basis i.e a memory pool of the file. With regards to the 
-    file system, page sizes can be allocated based on the file system 
-    page-size or if the user wants in some multiple of the file system 
-    page-size. This allows for fewer pages to be managed along with 
-    accommodating the users file usage pattern.
-
-    The current version supports setting the page-size and number of pages
-    in the memory pool through user C-routines(Fortran will be added in a 
-    future release). The default is 8192 bytes for page-size and 1 for number 
-    of pages in the pool.
-
-    Routines:(The names may change in the future...)
-    -------------------------------------------------
-    Hmpset(int pagesize, int maxcache, int flags)
-    --------------------------------------------
-    o  Set the pagesize and maximum number of pages to cache on the next
-       open/create of a file. A pagesize that is a power of 2 is recommended.
-       'pagesize' must be greater than MIN_PAGESIZE(512) bytes and 
-       'maxcache' must be greater than or equal to 1. Valid values
-       for both arguments are required when using this call.
-
-       The values set here only affect the next open/creation of a file and
-       do not change a particular file's paging behavior after it has been
-       opened or created. This may change in a later release.
-
-       Use flags argument of 'MP_PAGEALL' if the whole file is to be cached
-       in memory otherwise pass in zero. In this case the value for 'maxcache'
-       is ignored. You must pass in a valid value for 'pagesize' when
-       using the flag 'MP_PAGEALL'. 
- 
-    Hmpget(int *pagesize, int *maxcache, int flags)
-    ----------------------------------------------
-    o   This gets the last pagesize and maximum number of pages cached for
-        the last open/create of a file. The 'flags' variable is not used.
-    
-    In this version a new file memory pool is created for every file that is
-    created/opened and can not be shared. Future versions will allow sharing 
-    of the file memory pool with other threads/processes.
-
-    To enable the creation of a library using page caching the following 
-    section in the makefile fragment($(toplevel)/config/mh-<os>) must be 
-    uncommented and set.
-
-    # ------------ Macros for Shared Memory File Buffer Pool(fmpool) ------
-    # Uncomment the following lines to enable shared memory file buffer pool
-    # version of the HDF core library libdf.a. Please read the
-    # documentation before enabling this feature.
-    #FMPOOL_FLAGS  = -DHAVE_FMPOOL
-
-    After setting these values you must re-run the toplevel 'configure' script.
-    Make sure that you start from a clean re-build(i.e. 'make clean') after
-    re-running the toplevel 'configure' script and then run 'make'.
-    Details on running configure can be found above in the section
-    'General Configuration/Installation - Unix'.
-
-    The file caching version of libdf.a is automatically tested
-    when the regular HDF and netCDF tests are run. The page caching
-    version has been tested only on a few UNIX platforms and is NOT
-    available for the Macintosh ,IBM-PC(Windows NT/95) or VMS.
-
-2.8 Installation Location
-    =====================
-
-    By default, `make install' will install the HDF/mfhdf files in
-    `$(toplevel)/NewHDF/bin', '$(toplevel)/NewHDF/lib', etc.  You may
-    then copy the files to the appropriate directories on your system.
-    If you prefer, you can specify the directory so that `make install'
-    will install the files directly in it.  This is done by giving
-    `configure' the option `--prefix=PATH'.
-
-    eg.  ./configure -v --prefix=/usr/local/hdf
-
-    This will configure the distribution to install the libraries,
-    utilities, include and man files in '/usr/local/hdf/lib',
-    '/usr/local/hdf/bin', '/usr/local/hdf/include' and
-    '/usr/local/hdf/man' respectively.
-
-2.9 Specifying the System Type
-    ==========================
-
-    There may be some features `configure' can not figure out
-    automatically, but needs to determine by the type of host HDF/mfhdf
-    will run on.  Usually `configure' can figure that out, but if it prints
-    a message saying it can not guess the host type, give it the
-    `--host=TYPE' option.  TYPE can either be a short name for the system
-    type, such as `sun4', or a canonical name with three fields:
-
-         CPU-COMPANY-SYSTEM
-
-    e.g. hppa1.1-hp-hpux9.03
-
-    See the file `config.sub' for the possible values of each field.
-
-
-2.10 Configure Options 
-    ==================
-
-    Usage: configure [OPTIONS] [HOST]
-
-    Where HOST and TARGET are something like "sparc-sunos", "mips-sgi-irix5",etc.
-
-    `configure' recognizes the following options to control how it
-    operates. 
-
-    NOTE: not all options are currently supported by this
-          distribution. The following are the only ones supported.
-
-    `--help'
-         Print a summary of the options to `configure', and exit.
-
-     `--prefix=MYDIR`          install into MYDIR [$(toplevel)/NewHDF]
-
-
-3. Man pages
-   =============
-
-    Man pages can be found in:
-
-         $(toplevel)/man
-
-4. Release notes
-   =============
-    The files in sub-directory $(toplevel)/release_notes are detailed 
-    descriptions for the new features and changes in this release.
-    They can be used as supplemental documentation. These files are also 
-    available on the NCSA ftp server (ftp.ncsa.uiuc.edu) in:
- 
-         /HDF/HDF/HDF_Current/release_notes/.
-
-5. Documentation
-   =============
-
-   The HDF documentation can be found on the NCSA ftp server
-   in the directory /HDF/HDF/Documentation/.  The
-   HDF home page is at:
-
-      http://hdf.ncsa.uiuc.edu/
-
-6. FAQ
-   ===
-   An FAQ is available on our ftp server, as well as at:
-      http://hdf.ncsa.uiuc.edu/HDF-FAQ.html 
-   
-
-7. HDF Java Products
-   =================
-   The HDF Java Interface and Java HDF Viewer are built 
-   separately after the library.  See:
-      http://hdf.ncsa.uiuc.edu/java-hdf-html/ 
-
-
-8. HELP
-   ====
-   If you have any questions or comments, or would like to be
-   added to or removed from our hdfnews email list, contact us
-   at:
-
-      hdfhelp at ncsa.uiuc.edu
-
-

Added: packages/libhdf4/branches/upstream/current/INSTALL_WINDOWS.txt
===================================================================
--- packages/libhdf4/branches/upstream/current/INSTALL_WINDOWS.txt	                        (rev 0)
+++ packages/libhdf4/branches/upstream/current/INSTALL_WINDOWS.txt	2007-05-15 09:53:05 UTC (rev 831)
@@ -0,0 +1,1159 @@
+      Installation Instructions for HDF4.2r1 on Windows 2000/XP
+========================================================================
+
+The instructions which follow assume that you will be using the HDF4
+source code archive from HDF website (http://hdf.ncsa.uiuc.edu).
+
+In building HDF4 from source code you may select between two build
+environment options ( with Fortran or without Fortran).  
+
+***************************WARNINGS*************************************
+Please read CAREFULLY about the following preconditions first.
+
+Preconditions
+
+To build the HDF4 and MFHDF libraries ( single-threaded static or
+multi-threaded DLL) and utilities, it is assumed that you have done
+the following:
+      
+   1. Installed MicroSoft Visual Studio or Intel C compiler and WinZip.
+
+      1.1 Installed DEC Visual Fortran compiler(6.0 or higher version)
+          or Intel Fortran compiler if you want to build the full HDF4
+          library with Fortran support.
+
+   2. Set up a directory structure to unpack the source code archive.
+      For example: 
+
+         c:\                             (any drive)
+         MyHDFstuff\                     (any folder name)
+
+   3. Download the HDF4.2r1 source code archive HDF4.2r1.tar.gz from
+      ftp://ftp.ncsa.uiuc.edu/HDF/HDF/HDF_Current/src/ and use WinZip
+      to extract HDF4 source code into c:\MyHDFstuff.  This creates a 
+      directory called 'HDF4.2r1' under MyHDFstuff which contains 
+      several files and directories.  Rename "HDF4.2r1" to "HDF42r1".  
+
+   4. HDF4 provides options to do in-memory compress within HDF4
+      library.  Currently, three external compression libraries ZLIB,
+      JPEG, and SZIP can be used with HDF4.
+
+      4.1 HDF4 uses Zlib version 1.2.2 for compression.  To use Zlib
+          library, you have to install your own Zlib DLL library or go
+          to ftp://hdf.ncsa.uiuc.edu/lib-external/zlib/bin/windows 
+          to download the Zlib library.
+
+          Zlib compression feature inside HDF4 is required.
+
+          Note: Zlib 1.2.2 DLL library can also be downloaded from
+          http://www.zlib.net/zlib122-dll.zip
+      
+      4.2 HDF4 uses JPEG release 6b for compression.  To use JPEG
+          library, you have to install your own JPEG library or go to
+          ftp://hdf.ncsa.uiuc.edu/lib-external/jpeg/bin to download
+          the JPEG library archive file jpeg-6b.exe.
+
+          JPEG compression feature inside HDF4 is required.
+
+      4.3 HDF4 uses Szip version 2.0 for compression. To use Szip
+          library, you can download Szip source codes and binaries
+          from ftp://hdf.ncsa.uiuc.edu/szip/2.0/bin/windows/
+
+          Please note that Szip is not a totally open-source free
+          software.  For licensing issue of Szip, please check 
+          "Licensing terms" at
+          http://hdf.ncsa.uiuc.edu/doc_resource/SZIP/index.html.
+
+          Szip compression feature inside HDF4 is optional. 
+      
+   5. Define the following environment variables: 
+
+          HDF4_EXT_ZLIB
+          HDF4_EXT_JPEG
+          HDF4_EXT_SZIP
+      
+      In this section, Szip compression software is assumed to be used.
+      Please read section VI as well as this section if you do not
+      want to use Szip compression feature inside HDF4.
+      
+      To define these environment variables:
+      
+      Click "Start", click "Control Panel", and then double-click
+      "System".  On the "Advanced" tab, click "Environment Variables".
+      
+      If you are logged on as administrator to the local computer AND
+      want to let all other users use these three environment variables,
+      click "New" under "System Variables" box; otherwise, click "New"
+      under "User Variables" box.
+      
+      In the New Variable window, set "Variable name" as HDF4_EXT_ZLIB
+      and "Variable value" as zdll.lib, then click OK.
+      
+      Similarly, you can set:
+
+      HDF4_EXT_JPEG environment variable as libjpeg.lib
+      HDF4_EXT_SZIP environment variable as szlibdll.lib
+
+      Notes:
+
+         a. You might have to close and reopen running programs for the
+            new environment variable settings to take effect. 
+
+         b. c:\zlib122\zlib1.dll and c:\szlib\dll\szlibdll.dll should
+            be copied into the location that the application can find,
+            one suggestion is to use the c:\WINNT\system or
+            c:\WINDOWS\system
+      
+   6. Set up paths for external libraries and headers
+ 
+      Invoke Microsoft Visual C++ and go to "Tools" and select
+      "Options", find "Directories";
+      
+      6.1 Find the box "Show directories for", choose "Include files",
+          If you cannot find your Zlib, JPEG, and Szip header path
+          (for example, c:\zlib122\include, c:\jpeg-6b, 
+          c:\szip\include) from the directory list, add the header
+          path (c:\zlib122\include, c:\jpeg-6b, c:\szip\include) to
+          the included directories.
+      
+      6.2 Find the box "Show directories for", choose "Library files",
+          If you cannot find your Zlib, JPEG, and Szip library path
+          (for example, c:\zlib122\lib, c:\jpeg-6b, c:\szip\dll)
+          from the directory list, add the library path
+          (c:\zlib122\lib, c:\jpeg-6b, c:\szip\dll) to the library
+          directories.
+
+************************************************************************
+
+The following sections discuss installation procedures in detail:
+
+   Section I:    Build and Test HDF4 Libraries and Utilities
+   Section II:   Build an Application Using the HDF4 Library
+   Section III:  Build HDF4 in VS 7.0(.NET)
+   Section IV:   Build HDF4 with Intel Compiler
+   Section V:    Some Helpful Pointers
+   Section VI:   Disable Szip Compression Feature inside HDF4
+   Section VII:  Build and Test HDF4 Library on the Command Line
+   Section VIII: Build HDF4 Multithreaded Static Library
+
+************************************************************************
+
+      
+Section I: Build and Test HDF4 Libraries and Utilities
+======================================================================
+
+Step 1: Select Installation Type
+
+You may select one of 2 ways to build the HDF4 libraries and utilities,
+depending on your environment and application needs.
+
+Option A, (select Win32.nofortran.zip)
+This is the "NOFORTRAN" configuration: it builds debug and release
+single-threaded and multi-threaded DLL versions of the HDF libraries,
+tests, and utilities.  There is no Fortran support.
+
+Option B, (select Win32.zip)
+This is "WITH FORTRAN SUPPORT" configuration: it is the same as above
+but with Fortran support. 
+
+
+Step 2: Build HDF4 Libraries and Utilities
+
+Notes:
+
+   a. The instructions are the same for both options A and B.
+
+   b. These instructions are written for MicroSoft Visual Studio 6.0
+      and DEC Visual Fortran users.  For .NET users, please also read
+      section III.  For Intel compiler users, please aslo read
+      section IV. 
+
+   c. For Microsoft Visual C++ 6.0 and DEC Visual Fortran 6.0(or
+      higher versions) users, we support building HDF4 libraries and
+      utilities from the HDF4 source code archive on command line.
+      To build HDF4 on the command line, please read section VII.
+
+   d. To build HDF4 Multithreaded static library, please read
+      section VIII.
+
+Building Instructions:
+
+   1. Unpack Win32.nofortran.zip or Win32.zip in directory HDF42r1\. 
+
+      Note: Please select "Yes to All" when you are asked to confirm
+            file overwrite by WinZip.
+
+   2. Invoke Microsoft Visual C++ 6.0, go to "File" and select the
+      "Open Workspace" option. 
+
+      Then open the c:\MyHDFstuff\HDF42r1\all.dsw workspace. 
+
+   3. Select "Build", then Select "Set Active Configuration".
+
+      On Windows platform select as the active configuration
+
+         "all -- Win32 Debug" to build debug versions of
+                              single-threaded static libraries, tests
+                              and utilities and multi-threaded libraries
+                              and tests.
+         or
+ 
+         "all -- Win32 Release" to build release versions of
+                                single-threaded static libraries, tests
+                                and utilities and multi-threaded
+                                libraries and tests.
+
+      Select "Build" and "Build all.exe" to build the corresponding
+      version of the HDF42r1 library.
+
+      You should see 0 error at the end of building.
+
+      Warning messages can be ignored.
+
+      When the debug build is done the directories listed below will
+      contain the following files:
+
+         c:\MyHDFstuff\HDF42r1\windows\lib\debug\singlethreaded -
+
+            hd421d.lib - HDF static library 
+            hm421d.lib - MFHDF static library
+
+         c:\MyHDFstuff\HDF42r1\windows\lib\debug\multithreaded -
+
+            hd421md.lib - HDF multi-threaded DLL export library 
+            hm421md.lib - MFHDF multi-threaded DLL export library 
+
+         c:\MyHDFstuff\HDF42r1\windows\dll\debug
+
+            hd421md.dll - HDF DLL
+            hm421md.dll - MFHDF DLL
+
+         c:\MyHDFstuff\HDF42r1\windows\bin\debug - 
+
+            utilities, statically linked with the single-threaded
+            libraries.
+
+      When the release build is done the directories listed below will
+      contain the following files:
+
+         c:\MyHDFstuff\HDF42r1\windows\lib\release\singlethreaded - 
+ 
+            hd421.lib - HDF static library 
+            hm421.lib - MFHDF static library
+
+         c:\MyHDFstuff\HDF42r1\windows\lib\release\multithreaded - 
+ 
+            hd421m.lib - HDF multi-threaded DLL export library 
+            hm421m.lib - MFHDF multi-threaded DLL export library
+ 
+         c:\MyHDFstuff\HDF42r1\windows\dll\release 
+
+            hd421m.dll - HDF DLL
+            hm421m.dll - MFHDF DLL
+ 
+         c:\MyHDFstuff\HDF42r1\Windows\bin\release - 
+ 
+            utilities, statically linked with the single-threaded
+            libraries.
+ 
+Note: The ws2_32.lib needs to be linked with your executable if using
+      the static mfhdf library.  The ws2_32.lib can be found in your
+      Microsoft Visual C++ directory under the lib folder.
+
+		
+Step 3: Test HDF4 Libraries and Utilities
+
+HDF4 libraries and utilities should be tested to make sure that they
+were built correctly.
+
+We provide 2 options for users to test HDF4 libraries and utilities.  
+
+   Option 1: Automatic testings
+
+   HDF4 comes with various test suites, all of which can be tested
+   with hdf4check.bat batch file in c:\MyHDFstuff\HDF42r1\ directory.
+
+   Invoke a command prompt window and run hdf4check.bat.
+
+   Test results are saved in:
+
+      c:\MyHDFstuff\HDF42r1\check_results.txt.
+
+   Use either Notepad or WordPad or whatever other windows word
+   processor to check the results.  You should not find any FAILED
+   marks in check_results.txt.
+
+   Option 2: Step-by-step HDF4 libraries and utilities testings
+
+   You can also test debug and release versions of HDF4 libraries
+   and utilities separately.
+
+   DLLs listed below should be placed into the Windows system directory.
+   A batch file named install_dll.bat is included in
+   c:\MyHDFstuff\HDF42r1 directory.  Run this batch file and the
+   following HDF4 DLLs will be copied to the system directory.
+
+      HDF42r1\windows\dll\release\hd421m.dll
+      HDF42r1\windows\dll\release\hm421m.dll
+      HDF42r1\windows\dll\debug\hd421md.dll
+      HDF42r1\windows\dll\debug\hm421md.dll
+
+   Then run Win32debugtst.bat to test debug version or
+   Win32releasetst.bat to test release version.  
+
+   We strongly suggest you to redirect your testing results into an
+   output file so that you can easily check the testing results.  You
+   may use either Notepad or WordPad or whatever other windows word
+   processor to check the results.  You should not find any FAILED
+   marks in your output files.
+        
+
+Step 4: ncgen -c test (Optional)
+
+ncgen is a netCDF utility that converts a CDL description of a netCDF
+file into an HDF file, or that generates the C or Fortran source
+code required to create a netCDF file.
+
+HDF4 includes "ncgen -c test" to test whether ncgen can generate the
+C source code required to create a netCDF file.
+
+Note:
+     Currently, ncgen can not generate the Fortran source code
+     required to create a netCDF file by HDF4 on Windows.
+  
+     So "ncgen -f test" is not supported by HDF4 on Windows.
+ 
+ncgen project should have been built in step 2 before you can run
+"ncgen -c test" on Windows.
+
+Follow the instructions below to run "ncgen -c test" on Windows.
+
+   1. Open all.dsw Workspace
+
+      Invoke Microsoft Visual C++ 6.0, go to "File" and select the
+      "Open Workspace" option. 
+
+      Then open the c:\MyHDFstuff\HDF42r1\all.dsw workspace. 
+
+   2. Manually generate test0.c
+
+      A batch file named ctest0_gen.bat under c:\MyHDFstuff\HDF42r1\
+      directory is provided to create the C source code test0.c.
+
+      ctest0_gen.bat has 2 options:
+
+         ctest0_gen debug    -- generate test0.c with debug ncgen 
+
+         ctest0_gen release  -- generate test0.c with release ncgen
+
+      Invoke a command prompt windows and run ctest0_gen.bat with
+      appropriate options, you should get test0.c under
+      c:\MyHDFstuff\HDF42r1\mfhdf directory.
+
+   Note: We suggest that users should use the test0.c generated by
+         debug version ncgen (by running ctest0_gen debug) to build
+         the debug version ctest0.exe.
+
+         Similarly, test0.c generated by release version ncgen (by
+         running ctest0_gen release) should be used to build the
+         release version ctest0.exe.
+
+   3. Build ctest0.exe
+
+      Select "Build", then Select "Set Active Configuration".
+
+      On Windows platform select as the active configuration
+
+         "ctest0 -- Win32 Debug" to build debug versions ctest0
+
+         or
+ 
+         "ctest0 -- Win32 Release" to build release versions of ctest0
+
+
+      Select "Build ctest0.exe" to build the corresponding version of
+      ctest0.exe.
+
+      You should see 0 error at the end of building.
+
+      Warning messages can be ignored.
+
+      When the debug build is done the directories listed below will
+      contain the following files:
+
+         c:\MyHDFstuff\HDF42r1\windows\bin\debug
+
+               ctest0.exe - Debug version
+
+         c:\MyHDFstuff\HDF42r1\windows\bin\debug
+
+               ctest0.exe - Release version
+
+   4. Run ncgen -c Test
+
+      A batch file named ncgen_ctest.bat under c:\MyHDFstuff\HDF42r1\
+      is provided to run "ncgen -c test".
+
+      ncgen_ctest.bat has 2 options:
+
+         ncgen_ctest debug    -- debug version ncgen -c test 
+
+         ncgen_ctest release  -- release version ncgen -c test
+
+      Invoke a command prompt windows and run ncgen_ctest.bat with
+      appropriate options, you should get the following messages:
+
+         =========================
+         ncgen -c test
+         =========================
+         *** ncgen -c test successful ***
+
+
+Step 5:  Install HDF4 Library
+
+We provide a batch file for users to relocate all HDF4 libraries in one
+folder.  The file is called installhdf4lib.bat under
+c:\MyHDFstuff\HDF42r1 directory.  Run the batch file, you may see a
+folder called hdf4lib under c:\MyHDFstuff\HDF42r1.  
+    
+The <release> layout of <hdf4lib> should be:
+    
+   release\include   --  HDF4 header files
+   release\bin       --  HDF4 static utility executables
+   release\lib       --  HDF4 static libraries
+   release\dll       --  HDF4 multi-threaded libraries and DLLs
+       
+You may also find the similar layout for the <debug>.
+
+
+Step 6: Building HDF4 C/Fortran examples (Optional)
+
+Simple examples have been provided for users to test HDF4 C/Fortran
+library and utilities.
+
+Note: 
+      To build HDF4 Fortran examples, Win32.zip must have been
+      chosen in step 1.
+
+To build and test HDF4 C examples:
+
+   1. Invoke Microsoft Visual Studio 6.0, go to "File" and select
+      the "Open Workspace" option. 
+      
+      Then open the workspace
+      c:\MyHDFstuff\HDF42r1\examples\allexamples\allexamples.dsw.
+
+   2. Select "Build", then Select "Set Active Configuration".
+
+      In "Project configurations", select the active configuration
+
+          "allexamples -- Win32 Debug" to build debug versions of the
+                                       C examples.
+
+                          or
+	
+          "allexamples -- Win32 Release" to build release versions the 
+                                         C examples.
+
+      When the debug build or release build is done, there should be the 
+      following subdirectories in c:\MyHDFstuff\HDF42r1\examples\
+
+          chgnamtest
+          createtest
+          dimtest
+          gittest
+          rattrtest
+          readtest 
+          sattrest 
+          sds2grouptest
+          sh_dimtest
+          unltest
+
+   3. Invoke a command prompt window and run the batch file 
+      InstallExamples.bat which resides in the top level directory
+      (c:\MyHDFstuff\HDF42r1\).  This file creates 2 new directories, 
+      examplesREL and examplesDBG in the c:\MyHDFstuff\HDF42r1\examples
+      directory and places all the executables in it.  Both the release
+      and debug versions of the examples should be built before this
+      step is done.  The examples should be tested in these 2 new
+      directories due to some dependencies between the examples.
+      Especially createtest.exe should be executed before gitest.exe
+      and sattrtest.exe, and rattrtest should be executed immediately
+      after sattrtest.exe due to the dependencies among these files.
+
+
+To build and test HDF4 Fortran example:
+
+   1. Invoke Compaq Visual Fortran or Intel Fortran under Microsoft 
+      Visual Studio development environment, go to "File" and select
+      the "Open Workspace" option.
+
+      Then open the workspace
+      c:\MyHDFstuff\HDF42r1\fortran\examples\allf90examples\allf90examples.dsw.
+
+   2. Select "Build", then Select "Set Active Configuration".
+
+      In "Project configurations", select the active configuration
+
+          "allf90examples -- Win32 Debug" to build debug versions of the
+                                          Fortran examples.
+
+                             or
+	
+          "allf90examples -- Win32 Release" to build release versions the 
+                                            Fortran examples.
+
+      When the debug build or release build is done, there should be the 
+      following subdirectories in c:\MyHDFstuff\HDF42r1\fortran\examples\
+
+          createtest
+          gittest
+          rattrtest
+          readtest 
+          sattrest 
+          sds2grouptest
+          sh_dimtest
+          unltest
+
+   3. Invoke a command prompt window and run the batch file 
+      Installf90Examples.bat which resides in the top level directory
+      (c:\MyHDFstuff\HDF42r1\).  This file creates 2 new directories, 
+      f90examplesREL and f90examplesDBG in the
+      c:\MyHDFstuff\HDF42r1\fortran\examples directory and places all
+      the executables in it.  Both the release and debug versions of
+      the examples should be built before this step is done.  The
+      examples should be tested in these 2 new directories due to
+      some dependencies between the examples.  Especially createtest.exe
+      should be executed before gitest.exe and sattrtest.exe, and
+      rattrtest should be executed immediately after sattrtest.exe due
+      to the dependencies among these files.
+
+
+Note: Please read to Sections III and IV on how to build HDF4
+      C/Fortran examples with .NET and with Intel Compilers on .NET.
+
+   
+Section II. Build an Application Using the HDF4 Library or DLLs
+======================================================================
+
+If you are building an application that uses the HDF4 library, the
+following locations will need to be specified for locating header files
+and linking in the HDF4 libraries:
+ 
+   <top-level HDF directory>\lib
+   <top-level HDF directory>\dll
+   <top-level HDF directory>\include
+
+where <top-level HDF directory> may be
+c:\MyHDFstuff\HDF42r1\hdf4lib\release or
+c:\MyHDFstuff\HDF42r1\hdf4lib\debug
+
+if you have installed HDF4 library in Section I, Step 5.
+
+We assume that you will use the Szip compression with HDF4 library.
+
+To specify these locations in the settings for your VC++ project with
+Microsoft Visual C++ 6.0:
+
+Under Tools->Options, select the folder, Directories:
+   Under "Show directories for", select "Include files".
+   Add the following directories:
+      c:<path to HDF includes>\include  
+
+Under "Show directories for", select "Library files":
+   Add the following directories:
+      c:<path to HDF libs>\lib
+      c:<path to HDF libs>\dll
+
+Under Project->Settings, select folder, Link:
+   Add the following libraries to the beginning of the list of
+   Object/Library Modules:
+      hd421.lib hm421.lib (single-threaded release version)
+      hd421d.lib hm421d.lib (single-threaded debug version)
+
+      hd421m.lib hm421m.lib (multi-threaded release version)
+      hd421md.lib hm421md.lib (multi-threaded debug version)
+
+      HDF4_EXT_ZLIB
+      HDF4_EXT_JPEG
+      HDF4_EXT_SZIP
+
+Note: The above three environment variables should have been defined in
+      the preconditions.  Paths for these external libraries and
+      headers should also have been set up in preconditions.
+
+      Follow the instructions in preconditions to define these three
+      environment variables and set up path for these external libraries
+      and headers if you can not find them.
+
+HDF4 DLLs should also be copied to the directory(for example,
+Windows system directory) where the application can find. 
+
+Note: You can also follow the above instructions in this section if
+      want to build an application using the HDF42r1 binary
+      distributions available from
+      ftp://ftp.ncsa.uiuc.edu/HDF/HDF/HDF_Current/bin/windows.
+
+      Make sure to download appropriate binary distribution based on
+      your Windows platforms and compilers.
+
+      If you can not find the binary distribution matching with your
+      Windows platforms and compilers, you will have to build HDF4
+      libraries and utilities from the source codes.
+
+      Also, these binary distributions were pre-compiled with Szip
+      compression feature inside HDF4 library.  If you do not want
+      to use the Szip compression feature, you will have to build HDF4
+      libraries and utilities from the source code following the
+      instructions in Section VI.
+     
+
+Section III. Build HDF4 in VS 7.0(.NET)    
+======================================================================
+
+In this section, we just briefly introduce some extra/different points
+when building HDF4 in VS 7.0(.NET).  For other parts, you should still
+follow the instructions in Section I. 
+
+1. Invoke MicroSoft Visual Studio .NET, go to "File" and select the
+"Open Solution" option.  Choose "Compatible Workspace Files (*.dsw)"
+in the "Files of type:" text box and open the Visual Studio 6.0
+workspace c:\MyHDFstuff\HDF42r1\all.dsw.
+
+2. Select "Yes To All" when you are asked whether to convert and open
+project.  .NET will automatically convert the workspace file to
+solution file.
+
+3. Find "Build" and go to "Configuration Manager"; choose
+"Release" or "Debug", then choose "Build all".
+
+4. If you want to change some project setting, select the project and
+right click the button to choose Properties; find the similar menu
+there as in 6.0.
+
+5. You need to specify the ZLIB, JPEG, and SZIP include header files
+and libraries under Tools->Options->Projects->VC++ Directories and
+choose Include and Libraries under the category of
+"show directories for" to add the corresponding path.
+
+6. To build HDF4 C examples on .NET, HDF4 C examples workspace files
+should be converted to solution files.
+
+Notes:
+
+   a. Currently we only build and test HDF4 with .NET on Windows XP.
+
+   b. To build HDF4 with Fortran support on .NET, Intel Fortran
+      compiler must also be installed in your computer.  Please
+      read Section IV to build HDF4 with Fortran support on .NET.
+
+
+Section IV. Build HDF4 with Intel Compiler    
+======================================================================
+
+Currently, HDF4 is supported with Intel compilers version 7.1 and
+version 8.1 on .NET.
+
+In this section, we just briefly introduce some extra/different points
+when building HDF4 with Inel compiler 7.1 or 8.1 on .NET.  For other
+parts, you should still follow the instructions in Sections I and IIV.
+
+To use Intel compilers, all HDF4 workspace files must be converted
+to solution files as instructed in Section III.
+
+Part 1. Intel 7.1 Compiler
+
+For Intel 7.1 compiler users, Intel compiler should be selected before
+building HDF4 library and utilities.  Follow the instructions below to
+select Intel C/Fortran compilers.
+
+1. Intel 7.1 C Compiler
+   Go to Tools-->Select Compiler
+   Check Intel box and click OK button
+
+2. Intel 7.1 Fortran Compiler
+   Go to Tools-->Select Compiler
+   Check Intel box and click OK button
+   Go to Tools-->Customize-->Add-ins and Macro Files
+   and check Intel Fortran Compiler Build Tool
+
+Part 2. Intel 8.1 Compiler
+
+Preconditions:
+
+a. Set up paths for Intel 8.1 libraries and DLLS
+
+   c:\Program Files\Intel\CPP\Compiler80\Is32\LIB and
+   c:\Program Files\Intel\FORTRAN\Compiler80\Is32\LIB should
+   be added into environment variable "PATH" so applications
+   can find Intel 8.1 libraries and DLLs.
+
+b. Set up external libraries and headers paths for Intel 8.1
+   Fortran compiler (only required if you want to use Intel
+   8.1 Fortran compiler)
+ 
+   Invoke Microsoft Visual Studio .NET and go to Tools-->Options,
+   select "Intel(R) Fortran";
+      
+   1) Go to "Project Directories" and choose "Includes:",
+      If you cannot find your Zlib, JPEG, and Szip header paths
+      (for example, c:\zlib122\include, c:\jpeg-6b, c:\szip\include)
+      from the directory list, add the header path (c:\zlib122\include,
+      c:\jpeg-6b, c:\szip\include) to the included directories.
+      
+   2) Go to "Project Directories" and choose "Libraries:",
+      If you cannot find your Zlib, JPEG, and Szip library paths
+      (for example, c:\zlib122\lib, c:\jpeg-6b, c:\szip\dll)
+      from the directory list, add the library path (c:\zlib122\lib,
+      c:\jpeg-6b, c:\szip\dll) to the library directories.
+
+
+1. Build HDF4 without Fortran support
+
+   To build HDF4 without Fortran support with Intel 8.1 C++ compiler,
+   HDF4 solution files must be converted to use Intel(R) C++ project
+   system.
+
+   To make the conversion, choose all the project files in solution
+   "all" except the "all" dummy project (totally 49 projects)
+   Go to Project-->Convert to use Intel(R) C++ Project System
+
+   After the converion, HDF4 without Fortran support can be built
+   and tested following instrctions in Sections I and III.
+
+   Notes: 
+
+      a. The "all" dummy project could not be converted to use
+         Intel(R) C++ project system, which will not affect
+         building HDF4 with Intel compilers.
+
+      b. When building "test" and "util" projects, you will get a
+         link error:
+
+         LINK : error LNK2001: unresolved external symbol _WinMainCRTStartup
+
+         This error message can be ignored.  "test.exe" and 
+         "util.exe" are never created, so it is OK. 
+         
+      c. You need to unpack Win32.nofortran.zip in directory HDF42r1\ again
+         if you rebuild or clean any project as Intel compiler will
+         delete all *.bat and *.out files during the cleaning process.
+   
+      d. HDF4 C examples should also be converted to use Intel(R) C++
+         project system if HDF4 C libraries are built with Intel 8.1
+         compiler.
+
+   
+2. Build HDF4 with Fortran support
+
+   To build HDF4 with Fortran support with Intel 8.1 C++/Fortran  
+   compilers, HDF4 sulution files must be converted to use Intel(R)
+   C++/Fortran project system.
+
+   1) Extract Compaq Visual Fortran Projects Items from the
+      following 8 projects:
+
+         dllfortestf
+         dllhdftestf
+         fortestf
+         hdf
+         hdf_dll
+         hdftestf
+         mfhdf
+         mfhdf_dll
+
+      To make the extraction, right click appropriate projects and
+      select Extract Compaq Visual Fortran Projects Items on the
+      right-click menu.
+
+
+      Notes:
+
+         a. Above projects should not be converted into Intel(R) C++
+            project system.  Otherwise, you could not extract Fortran
+            projects items from converted Intel(R) C++ projects
+            anymore and Fortran source codes in those projects will
+            not be compiled.
+
+         b. As dllfortestf, fortestf, hdf, hdf_dll, mfhdf, and
+            mfhdf_dll projects contains both Fortran and C/C++
+            project files.  The Intel(R) Fortran project converter
+            will split each of the above project into 2 Visual Studio
+            projects - a Visual C++ project and an Intel(R) Fortran
+            project.
+
+            Please choose the Intel(R) Fortran project as the main
+            project before splitting.
+
+            Meanwhile, the following projects will be created by the
+            Intel(R) Fortran project converter after the splitting:
+
+               dllfortestf_lib
+               fortestf_lib
+               hdf_dll_lib
+               hdf_lib
+               mfhdf_dll_lib
+               mfhdf_lib
+
+   2) Convert the rest projects (including the six projects created
+      in the above step and except the "all" dummy project) into
+      Intel(R) C++ project system.
+
+   3) Right clik project "hdf", go to Properties,
+      in the "Configuration:" text box, select "Debug",
+      go to Librarian-->Output Files, rename the output from
+      $(OutDir)/$(ProjectName).lib to
+      $(OutDir)/$(ProjectName)d.lib, then press "OK".
+
+   4) Right clik project "mfhdf", go to Properties,
+      in the "Configuration:" text box, select "Debug",
+      go to Librarian-->Output Files, rename the output from
+      $(OutDir)/$(ProjectName).lib to
+      $(OutDir)/$(ProjectName)d.lib, then press "OK".
+
+   5) Right clik project "hdf_dll", go to Properties,
+      in the "Configuration:" text box, select "Release",
+      go to Linker-->Advanced, rename the "Import Library" from
+      $(OutDir)/hdf_dll.lib to $(OutDir)/hd421m.lib,
+      then press "OK".
+
+   6) Right clik project "mfhdf_dll", go to Properties,
+      in the "Configuration:" text box, select "Release",
+      go to Linker-->Advanced, rename the "Import Library" from
+      $(OutDir)/mfhdf_dll.lib to $(OutDir)/hm421m.lib,
+      then press "OK".
+
+   After the above converion and modifications, HDF4 with Fortran
+   support can be built and tested following instrctions in
+   Sections I and III.
+
+   Notes: 
+
+      a. "dlltesthdf" project can not be built with Intel 8.1 Fortran
+         compiler.  Please ignore this failure.
+
+      b. The "all" dummy project could not be converted to use
+         Intel(R) C++ project system, which will not affect
+         building HDF4 with Intel compilers.
+
+      c. When building "test" and "util" projects, you will get a
+         link error:
+
+         LINK : error LNK2001: unresolved external symbol _WinMainCRTStartup
+
+         This error message can be ignored.  "test.exe" and 
+         "util.exe" are never created, so it is OK. 
+ 
+      d. You need to unpack Win32.zip in directory HDF42r1\ again
+         if you rebuild or clean any project as Intel compiler will
+         delete all *.bat and *.out files during the cleaning process.
+
+      e. HDF4 C examples should also be converted t use Intel(R) C++
+         project system if HDF4 C libraries are built with Intel 8.1
+         compiler.
+
+      f. You should extract Compaq Visual Fortran Project Items from 
+         HDF4 Fortran examples if HDF4 Fortran libraries are built with
+         Intel 8.1 compiler.
+
+      g. For all HDF4 Fortran examples projects, right click
+         Properties, in "Configuration:" text box, choose "Debug",
+         Go to Linker-->Input-->Additional Dependencies,
+         replace hm421d.lib and hd421d.lib with hdfd.lib and mfhdfd.lib.
+
+      h. For all HDF4 Fortran examples projects, right click
+         Properties, in "Configuration:" text box, choose "Release",
+         Go to Linker-->Input-->Additional Dependencies,
+         replace hm421.lib and hd421.lib with hdf.lib and mfhdf.lib.
+
+      i. To use HDF4 fortran libraries built with Intel 8.1 compiler,
+         c:\MyHDFstuff\HDF42r1\windows\lib\release\singlethreaded\hdf.lib
+         c:\MyHDFstuff\HDF42r1\windows\lib\release\singlethreaded\mfhdf.lib
+         c:\MyHDFstuff\HDF42r1\windows\lib\debug\singlethreaded\hdfd.lib
+         c:\MyHDFstuff\HDF42r1\windows\lib\debug\singlethreaded\mfhdfd.lib
+         should also be installed to appropriate directories.
+
+
+Section V: Some Helpful Pointers
+======================================================================
+
+(as described in terms of installing the nofortran configuration)
+
+Here are some notes that may be of help if you are not familiar
+with using the Visual C++ Development Environment.
+
+Project name and location issues: 
+
+   The files in Win32.zip  and Win32.nofortran.zip must end up in the
+   HDF42r1\ directory installed by HDF4.2r1.tar.gz.
+
+   If you must install all.dsw and all.dsp in another directory,
+   relative to HDF42r1\ , you will be asked to locate all sub-project
+   files, when you open the project all.dsw.
+	 
+   If you want to rename all (the entire project), you will need to
+   modify two files all.dsw and all.dsp as text (contrary to the
+   explicit warnings in the files).
+
+   You can also modify all.dsw and all.dsp as text, to allow these 2
+   files to be installed in another directory.
+
+Settings... details:
+   If you create your own project, the necessary settings can be
+   read from the all.dsp file(as text), or from the Project Settings
+   in the Developer Studio project settings dialog.
+
+
+   Project
+      Settings
+         C/C++
+            Category
+               Code Generation
+                  Use run-time Library
+                     These are all set to use Single-Threaded
+                                           or Single-Threaded debug
+                                           or Multi-Threaded DLL
+                                           or Multi-Threaded debug DLL
+
+
+Section VI. Disable Szip Compression Feature inside HDF4
+======================================================================
+
+Warning: When you modify the h4config.h file as described below,
+         DO NOT just change the values of these macros from 1 to 0.
+         Please DO remove(or comment out) appropriate lines.
+
+If you would like to remove Szip compression from the HDF4 library,
+follow the steps below.
+
+   1. Open the H4config.h file from the c:\MyHDFstuff\HDF42r1\hdf\src
+      directory and remove(or comment out) the following two lines: 
+
+         #define H4_HAVE_LIBSZ 1
+         #define H4_HAVE_SZLIB_H 1
+
+      then save the file.
+	
+   2. Delete HDF4_EXT_SZIP environment variable if you have set it in
+      preconditions.
+   
+   3. Run-compile HDF4 library according to section I.
+
+      When you disable Szip, you may get the following message 
+      when building HDF4 libraries:
+
+      The following environment variables were not found
+      $(HDF4_EXT_SZIP)
+
+      This message can be ignored.
+
+      When you run HDF4 testing batch file Win32debugtst.bat or
+      Win32releasetst.bat, you should get the following failed messages
+      for HDF-SD c interfaces tests:
+
+         ============================
+         HDF-SD C interfaces tests
+         ============================
+         *** HDF fails formatted test ***
+         Comparing files hdfout.new and ..\..\MFHDF\LIBSRC\HDFOUT.SAV
+         ***** hdfout.new
+         9 := 0
+         ****** SD Szip test skipped *****
+         num_err == 0
+         ***** ..\..\MFHDF\LIBSRC\HDFOUT.SAV
+         9 := 0
+         num_err == 0
+         *****
+
+      This means that actually the HDF-SD C interfaces tests passed.
+      The expected output file HDFOUT.SAV was generated for HDF4
+      testings with Szip compression feature.  As you disabled the
+      Szip compression feature in HDF4, SD Szip test should be skipped.
+
+
+Section VII. Build and Test HDF4 Library on the Command Line    
+======================================================================
+
+For Microsoft Visual C++ 6.0 and DEC Visual Fortran 6.0(or higher
+versions) users, we support building HDF4 libraries and utilities from
+the HDF4 source code archive on command line.
+      
+For all other Windows development tools, HDF4 should be built in the
+development environment following the instructions in Section I.
+
+Step 1. Set path for Microsoft Visual C++ 6.0 and Visual Fortran 6.0
+        (or higher version):
+   
+   Open "System" in Control Panel.
+   
+   On the "Advanced" tab, click "Environment Variables", click "Path"
+   in the "System variables" box, then click "Edit" and add your Visual
+   C++ 6.0 path (For example, 
+   C:\Program Files\Microsoft Visual Studio\Common\MSDev98\Bin\)
+   and Visual Fortran 6.0 path (For example, 
+   C:\Program Files\Microsoft Visual Studio\Common\MSDev98\Bin\)
+   into "Variable Value" and click "OK".
+  
+Step 2. Unpack Win32.nofortran.zip or Win32.zip
+
+   Unpack Win32.nofortran.zip or Win32.zip with WinZip into HDF42r1\
+   directory. 
+
+   Note: Please select "Yes" or "Yes to All" when you are asked
+         to confirm file overwrite by WinZip.
+
+Step 3. Build and Test
+
+   We provide 2 options for users to build test HDF4 libraries 
+   and utilities.
+      
+   Options A: Build and test in one step 
+      
+      A batch file named hdf4bt.bat in c:\MyHDFstuff\HDF42r1 directory
+      is provided for users to build and test HDF4 library and tools
+      together from the command line.
+
+      Run hdf4bt.bat in a command prompt window.
+
+      Test results are saved in
+
+         c:\MyHDFstuff\HDF42r1\hdf4_results.txt   
+
+
+   Options B: Build and test in two steps 
+
+      We also provide users with the option to build and test HDF4
+      libraries and utilities separately from the command line.
+   
+      Step 1) Build HDF4 Libraries and Utilities
+
+         A batch file named hdf4build.bat in c:\MyHDFstuff\HDF42r1 
+         directory is provided for users to build HDF4 libraries and 
+         utilities from command line.
+
+         Run hdf4build.bat in a command prompt window.
+
+         Compiling outputs are saved in
+
+            c:\MyHDFstuff\HDF42r1\build_results.txt.
+
+         You can check the output file to find out whether there
+         are any compilation errors.
+
+      Step 2) Test HDF4 Libraries and Utilities
+   
+         A batch file named hdf4check.bat in c:\MyHDFstuff\HDF42r1
+         directory is provided for users to test HDF4 libraries and 
+         utilities from command line.
+
+         Run hdf4check.bat in a command prompt window.
+
+         Test results are saved in:
+
+            c:\MyHDFstuff\HDF42r1\check_results.txt.
+
+
+Having built and tested HDF4 libraries and utilities successfully 
+on the command line, you can install HDF4 libraries following the
+instruction in Section I, Step 4.
+
+
+Section VIII: Build HDF4 Multithreaded Static Library
+======================================================================
+
+In this section, we just briefly introduce how to build HDF4
+multithreaded static library.
+
+Step I: The following codes (lines 112~115 in the header file) in
+        hdf4/hdf/src/hdfi.h should be removed or commented out:
+
+#	if defined(_MT) && !defined(_HDFDLL_)
+#		error To use the HDF libraries from a multithreaded project, you must use the HDF DLLs
+#		error Use the Mutlithreaded DLL runtime libraries (prefered), or define the macro "_HDFDLL_"
+#	endif
+
+
+Step II: The "Runtime library" settings for static projects should be
+         modified as multithreaded.  Please following the instructions
+         below to modify the "Runtime library" settings.
+
+
+For Microsoft Visual C++ 6.0 Users:
+
+1. Right click project "hdf", go to Settings->C/C++;
+   In the "Settings For:" text box, select "Win32 Debug";
+   In the "Category:" text box, select "Code Generation";
+   In the "Use run-time library:" text box, select "Debug
+   Multithreaded";
+   In the "Settings For:" text box, select "Win32 Release"; 
+   In the "Use run-time library:" text box, select "Multithreaded";
+   Then press "OK".
+
+2. Repeat step 1  to set the settings for "Use run-time library"
+   for all the left static projects as "Debug Multithreaded" for
+   debug version and "Multithreaded" for release version.
+
+3. (Optional, only for HDF4 with Fortran support)
+
+   Right click project "hdftestf", go to Settings->Link;
+   In the "Settings For:" text box, select "Win32 Debug";
+   In the "Category:" text box, select "Input";
+   In the "Ignore libraries:" text box, add "libcmtd.lib";
+   In the "Settings For:" text box, select "Win32 Rlease";
+   In the "Ignore libraries:" text box, add "libcmt.lib";
+   Then press "OK".
+
+4. (Optional, only for HDF4 with Fortran support)
+
+   Repeat step 3 to add "libcmtd.lib" to the "Ignore libraries:"
+   for project "fortestf" debug version, and add "libcmt.lib"
+   to the "Ignore libraryies:" for project "fortestf" release version.
+
+
+For Microsoft Visual .NET and Intel C++ 8.1 Compiler Users:
+(HDF4 without Fortran support)
+
+1. Right click project "hdf", go to Properties->C/C++->Code Generation;
+   In the "Settings For:" text box, select "Debug";
+   In the "Runtime Library" text box, select "Multi-threaded Debug (/MTD)";
+   In the "Settings For:" text box, select "Release"; 
+   In the "Runtime Library" text box, select "Multi-threaded (/MT)";
+   Then press "OK".
+
+2. Repeat step 1 to set the settings for "Runtime Library"
+   for all the left static projects (except project hdf_ap, mfhdf_ap,
+   test, and util) as "Multi-threaded Debug (/MTD)" for
+   debug version and "Multithreaded (/MT)" for release version.
+
+(Note: For .NET users without Intel Fortran Compiler, HDF4 Fortran
+       support is not available.)
+
+
+For Intel 8.1 Fortran Compiler Users: (HDF4 with Fortran support)
+
+1. Right click project "hdf_lib", go to Properties->C/C++->Code Generation;
+   In the "Settings For:" text box, select "Debug";
+   In the "Runtime Library" text box, select "Multi-threaded Debug (/MTD)";
+   In the "Settings For:" text box, select "Release"; 
+   In the "Runtime Library" text box, select "Multi-threaded (/MT)";
+   Then press "OK".
+
+2. Repeat step 1 to set the settings for "Runtime Library"
+   for all the left static projects (except project hdf_ap, mfhdf_ap,
+   test, and util) as "Multi-threaded Debug (/MTD)" for
+   debug version and "Multithreaded (/MT)" for release version.
+
+3. Right click project "hdf", go to Properties->Fortran->Libraries;
+   In the "Settings For:" text box, select "Debug";
+   In the "Runtime Library" text box, select "Debug Multithreaded";
+   In the "Settings For:" text box, select "Release"; 
+   In the "Runtime Library" text box, select "Multithreaded";
+   Then press "OK".
+
+4. Repeat step 1  to set the settings for "Runtime Library" for fortestf,
+   hdftestf, and mfhdf projects as "Debug Multithreaded" for
+   debug version and "Multithreaded" for release version.
+
+
+
+Please send email to hdfhelp at ncsa.uiuc.edu for further assistance.

Added: packages/libhdf4/branches/upstream/current/MANIFEST
===================================================================
--- packages/libhdf4/branches/upstream/current/MANIFEST	                        (rev 0)
+++ packages/libhdf4/branches/upstream/current/MANIFEST	2007-05-15 09:53:05 UTC (rev 831)
@@ -0,0 +1,1099 @@
+#------------------------------------------------------------------------------
+# This is the list of files that are part of HDF4 source distribution.
+# All files have a `./' prefix and appear in lexicographic order.
+# Lines that end with _DO_NOT_DISTRIBUTE_ will not be included in a
+# release.  Blank lines and comments are ignored.  Comments must start
+# in column one with a '#'.
+#------------------------------------------------------------------------------
+
+./COPYING
+./INSTALL
+./INSTALL_WINDOWS.txt
+./Makefile.am
+./Makefile.in
+./MAKEVMS.COM
+./README
+./Win32.nofortran.zip
+./Win32.zip
+./aclocal.m4
+./configure
+./configure.ac
+./move-if-change
+
+./bin/chkmanifest
+./bin/compile
+./bin/config.guess
+./bin/config.sub
+./bin/depcomp
+./bin/install-sh
+./bin/locate_sw
+./bin/missing
+./bin/mkinstalldirs
+./bin/regenerate.sh
+./bin/runtest
+./bin/snapshot
+
+./config/BlankForm
+./config/freebsd
+./config/hpux11.00
+./config/ia64-linux-gnu
+./config/irix6.x
+./config/linux-gnu
+./config/osf5.x
+./config/powerpc-apple
+./config/powerpc-ibm-aix5.x
+./config/solaris2.x
+./config/sv1-cray
+./config/unicos10.0.X
+./config/unicosmk2.0.6.X
+
+./hdf/COPYING
+./hdf/COPYRIGHT
+./hdf/Makefile.am
+./hdf/Makefile.in
+./hdf/README
+./hdf/README.33r4
+
+./hdf/fmpool/Makefile.in
+./hdf/fmpool/README
+./hdf/fmpool/cdefs.h
+./hdf/fmpool/compat.h
+./hdf/fmpool/config.guess
+./hdf/fmpool/config.sub
+./hdf/fmpool/configure
+./hdf/fmpool/configure.in
+./hdf/fmpool/fmpio.3
+./hdf/fmpool/fmpio.c
+./hdf/fmpool/fmpio.h
+./hdf/fmpool/fmpool.3
+./hdf/fmpool/fmpool.c
+./hdf/fmpool/fmpool.h
+./hdf/fmpool/fmptypes.h
+./hdf/fmpool/move-if-change
+./hdf/fmpool/queue.h
+./hdf/fmpool/test_fmpio.c
+./hdf/fmpool/tfmpio_read.c
+./hdf/fmpool/tfmpio_write.c
+
+./hdf/fmpool/config/fmpaix.h
+./hdf/fmpool/config/fmpalpha.h
+./hdf/fmpool/config/fmpconvex.h
+./hdf/fmpool/config/fmpdec.h
+./hdf/fmpool/config/fmpfbsd.h
+./hdf/fmpool/config/fmpfujivp.h
+./hdf/fmpool/config/fmphpux.h
+./hdf/fmpool/config/fmpia64.h
+./hdf/fmpool/config/fmpirix32.h
+./hdf/fmpool/config/fmpirix4.h
+./hdf/fmpool/config/fmpirix5.h
+./hdf/fmpool/config/fmpirix6.h
+./hdf/fmpool/config/fmplinux.h
+./hdf/fmpool/config/fmpmac.h
+./hdf/fmpool/config/fmpsolaris.h
+./hdf/fmpool/config/fmpsun.h
+./hdf/fmpool/config/fmpt3e.h
+./hdf/fmpool/config/fmpunicos.h
+./hdf/fmpool/config/mh-aix
+./hdf/fmpool/config/mh-alpha
+./hdf/fmpool/config/mh-convex
+./hdf/fmpool/config/mh-decstation
+./hdf/fmpool/config/mh-fbsd
+./hdf/fmpool/config/mh-fujivp
+./hdf/fmpool/config/mh-hpux
+./hdf/fmpool/config/mh-ia64
+./hdf/fmpool/config/mh-irix32
+./hdf/fmpool/config/mh-irix4
+./hdf/fmpool/config/mh-irix5
+./hdf/fmpool/config/mh-irix6
+./hdf/fmpool/config/mh-linux
+./hdf/fmpool/config/mh-mac
+./hdf/fmpool/config/mh-solaris
+./hdf/fmpool/config/mh-sun
+./hdf/fmpool/config/mh-t3e
+./hdf/fmpool/config/mh-unicos
+
+./hdf/src/INSTALL
+./hdf/src/Makefile.am
+./hdf/src/Makefile.in
+./hdf/src/MAKEFS.COM
+./hdf/src/MAKENOF.COM
+./hdf/src/atom.c
+./hdf/src/atom.h
+./hdf/src/bitvect.c
+./hdf/src/bitvect.h
+./hdf/src/cdeflate.c
+./hdf/src/cdeflate.h
+./hdf/src/cnbit.c
+./hdf/src/cnbit.h
+./hdf/src/cnone.c
+./hdf/src/cnone.h
+./hdf/src/crle.c
+./hdf/src/crle.h
+./hdf/src/cskphuff.c
+./hdf/src/cskphuff.h
+./hdf/src/cszip.c
+./hdf/src/cszip.h
+./hdf/src/df24.c
+./hdf/src/df24f.c
+./hdf/src/df24ff.f
+./hdf/src/dfan.c
+./hdf/src/dfanf.c
+./hdf/src/dfanff.f
+./hdf/src/dfan.h
+./hdf/src/dfcomp.c
+./hdf/src/dfconv.c
+./hdf/src/dfconvrt.h
+./hdf/src/dff.c
+./hdf/src/dfff.f
+./hdf/src/dffunc.inc
+./hdf/src/dfgr.c
+./hdf/src/dfgr.h
+./hdf/src/dfgroup.c
+./hdf/src/df.h
+./hdf/src/dfi.h
+./hdf/src/dfimcomp.c
+./hdf/src/dfivms.h
+./hdf/src/dfjpeg.c
+./hdf/src/dfkconv.c
+./hdf/src/dfkcray.c
+./hdf/src/dfkfuji.c
+./hdf/src/dfknat.c
+./hdf/src/dfkswap.c
+./hdf/src/dfkvms.c
+./hdf/src/dfp.c
+./hdf/src/dfpf.c
+./hdf/src/dfpff.f
+./hdf/src/dfr8.c
+./hdf/src/dfr8f.c
+./hdf/src/dfr8ff.f
+./hdf/src/dfrig.h
+./hdf/src/dfrle.c
+./hdf/src/dfsd.c
+./hdf/src/dfsdf.c
+./hdf/src/dfsdff.f
+./hdf/src/dfsd.h
+./hdf/src/dfstubs.c
+./hdf/src/dfstubs.h
+./hdf/src/dfufp2i.c
+./hdf/src/dfufp2if.f
+./hdf/src/dfufp2i.h
+./hdf/src/dfunjpeg.c
+./hdf/src/dfutil.c
+./hdf/src/dfutilf.c
+./hdf/src/dir_mac.c
+./hdf/src/dir_mac.h
+./hdf/src/dynarray.c
+./hdf/src/dynarray.h
+./hdf/src/glist.c
+./hdf/src/glist.h
+./hdf/src/h4config.h.in
+./hdf/src/hbitio.c
+./hdf/src/hbitio.h
+./hdf/src/hblocks.c
+./hdf/src/hbuffer.c
+./hdf/src/hchunks.c
+./hdf/src/hchunks.h
+./hdf/src/hcomp.c
+./hdf/src/hcomp.h
+./hdf/src/hcompi.h
+./hdf/src/hcompri.c
+./hdf/src/hconv.h
+./hdf/src/hdfalloc.c
+./hdf/src/hdf.bld
+./hdf/src/hdf.h
+./hdf/src/hdfi.h
+./hdf/src/hdf.inc
+./hdf/src/hdflib.project.hqx
+./hdf/src/hdfnof.bld
+./hdf/src/hdfnofw3.lbc
+./hdf/src/hdfnofwc.lbc
+./hdf/src/hdfw386.lbc
+./hdf/src/hdfwcc.lbc
+./hdf/src/herr.c
+./hdf/src/herrf.c
+./hdf/src/herr.h
+./hdf/src/hextelt.c
+./hdf/src/hfile.c
+./hdf/src/hfiledd.c
+./hdf/src/hfilef.c
+./hdf/src/hfileff.f
+./hdf/src/hfile.h
+./hdf/src/hkit.c
+./hdf/src/hkit.h
+./hdf/src/hlimits.h
+./hdf/src/hntdefs.h
+./hdf/src/hproto.h
+./hdf/src/hqueue.h
+./hdf/src/htags.h
+./hdf/src/.indent.pro
+./hdf/src/linklist.c
+./hdf/src/linklist.h
+./hdf/src/makepc.386
+./hdf/src/makepc.msc
+./hdf/src/makepc.wcc
+./hdf/src/makewin.msc
+./hdf/src/maldebug.c
+./hdf/src/maldebug.h
+./hdf/src/mcache.c
+./hdf/src/mcache.h
+./hdf/src/mfan.c
+./hdf/src/mfanf.c
+./hdf/src/mfan.h
+./hdf/src/mfgr.c
+./hdf/src/mfgrf.c
+./hdf/src/mfgrff.f
+./hdf/src/mfgr.h
+./hdf/src/mstdio.c
+./hdf/src/mstdio.h
+./hdf/src/patchlevel.h
+./hdf/src/src.inc
+./hdf/src/sys_dir_mac.h
+./hdf/src/tbbt.c
+./hdf/src/tbbt.h
+./hdf/src/trace.h
+./hdf/src/vattr.c
+./hdf/src/vattrf.c
+./hdf/src/vattrff.f
+./hdf/src/vattr.h
+./hdf/src/vconv.c
+./hdf/src/vg.c
+./hdf/src/vgf.c
+./hdf/src/vgff.f
+./hdf/src/vg.h
+./hdf/src/vgint.h
+./hdf/src/vgp.c
+./hdf/src/vhi.c
+./hdf/src/vio.c
+./hdf/src/vparse.c
+./hdf/src/vrw.c
+./hdf/src/vsfld.c
+./hdf/src/win32hdf.mak
+
+./hdf/src/fort_ps/herrpf.c
+./hdf/src/fort_ps/herrpff.f
+./hdf/src/fort_ps/hfilepf.c
+./hdf/src/fort_ps/hfilepff.f
+./hdf/src/fort_ps/hprotop.h
+./hdf/src/fort_ps/mfanpf.c
+./hdf/src/fort_ps/mfanpff.f
+./hdf/src/fort_ps/mfgrpf.c
+./hdf/src/fort_ps/mfgrpff.f
+./hdf/src/fort_ps/vattrpf.c
+./hdf/src/fort_ps/vattrpff.f
+./hdf/src/fort_ps/vgpf.c
+./hdf/src/fort_ps/vgpff.f
+
+./hdf/test/MAKE.COM
+./hdf/test/MAKECOM.OLD
+./hdf/test/Makefile.am
+./hdf/test/Makefile.in
+./hdf/test/MAKENOF.COM
+./hdf/test/README
+./hdf/test/SETUPTEST.COM
+./hdf/test/8bit.dat
+./hdf/test/an.c
+./hdf/test/anfile.c
+./hdf/test/bitio.c
+./hdf/test/bitio.dat
+./hdf/test/blocks.c
+./hdf/test/buffer.c
+./hdf/test/chunks.c
+./hdf/test/comp.c
+./hdf/test/conv.c
+./hdf/test/egchi.res
+./hdf/test/egfhi.f
+./hdf/test/egfhi.res
+./hdf/test/extelt.c
+./hdf/test/file1.c
+./hdf/test/file.c
+./hdf/test/forsupf.c
+./hdf/test/forsupff.f
+./hdf/test/fortest.c
+./hdf/test/fortestF.f
+./hdf/test/fortest.h
+./hdf/test/fortest.inc
+./hdf/test/fortest.sav
+./hdf/test/gentest.c
+./hdf/test/greyjpeg.dat
+./hdf/test/gr_r24.dat
+./hdf/test/jpeg.dat
+./hdf/test/litend.c
+./hdf/test/litend.dat
+./hdf/test/macros.c
+./hdf/test/makepc.386
+./hdf/test/makepc.msc
+./hdf/test/makewin.msc
+./hdf/test/makewin.new
+./hdf/test/man.c
+./hdf/test/manf.f
+./hdf/test/mgr.c
+./hdf/test/mgrf.f
+./hdf/test/mgrf_sunOS.f
+./hdf/test/nbit.c
+./hdf/test/nbit.dat
+./hdf/test/rig.c
+./hdf/test/sdmms.c
+./hdf/test/sdnmms.c
+./hdf/test/sdstr.c
+./hdf/test/slab.c
+./hdf/test/slabwf.f
+./hdf/test/t24f.f
+./hdf/test/tanf.f
+./hdf/test/tanfilef.f
+./hdf/test/tbv.c
+./hdf/test/tdupimgs.c
+./hdf/test/testhdf.386
+./hdf/test/testhdf.c
+./hdf/test/testhdf.def
+./hdf/test/testhdf.lnk
+./hdf/test/testhdf.pc
+./hdf/test/testhdf.project.hqx
+./hdf/test/tmgr.dat
+./hdf/test/tpf.f
+./hdf/test/tproto.h
+./hdf/test/tr8f.f
+./hdf/test/tree.c
+./hdf/test/tsdmmsf.f
+./hdf/test/tsdnmmsf.f
+./hdf/test/tsdnntf.f
+./hdf/test/tsdntf.f
+./hdf/test/tsdstrf.f
+./hdf/test/tstubsf.f
+./hdf/test/tszip.c
+./hdf/test/tutils.h
+./hdf/test/tv1.res
+./hdf/test/tv2.res
+./hdf/test/tvattr.c
+./hdf/test/tvattr.dat
+./hdf/test/tvattrf.f
+./hdf/test/tvset.c
+./hdf/test/tvsetf.f
+./hdf/test/tvsfpack.c
+./hdf/test/vers.c
+./hdf/test/win32tst.mak
+
+./hdf/test/fort_ps/forsupffp.f
+./hdf/test/fort_ps/fortest.arg
+./hdf/test/fort_ps/fortestFp.f
+./hdf/test/fort_ps/fortestp.c
+./hdf/test/fort_ps/manpf.f
+
+./hdf/util/HELINK.OPT
+./hdf/util/Makefile.am
+./hdf/util/Makefile.in
+./hdf/util/MAKEUTIL.COM
+./hdf/util/README
+./hdf/util/README.fp2hdf
+./hdf/util/README.fp2hdf.test
+./hdf/util/README.TST
+./hdf/util/SETUPUTILS.COM
+./hdf/util/decompress.c
+./hdf/util/fp2hdf.c
+./hdf/util/fp2hdf.input1
+./hdf/util/fp2hdf.input1-32
+./hdf/util/fp2hdf.mak
+./hdf/util/fp2hdf.out1
+./hdf/util/fp2hdf.out1-32
+./hdf/util/fp2hdf.out2
+./hdf/util/fp2hdf.out2-32
+./hdf/util/fp2hdf.test
+./hdf/util/fp2hdf.test.result
+./hdf/util/fptest.c
+./hdf/util/fptestf.f
+./hdf/util/getopt1.c
+./hdf/util/getopt.c
+./hdf/util/gif2hdf.c
+./hdf/util/gif2mem.c
+./hdf/util/gif.h
+./hdf/util/gifread.c
+./hdf/util/h4cc.in
+./hdf/util/h4fc.in
+./hdf/util/h4redeploy.in
+./hdf/util/hdf24to8.c
+./hdf/util/hdf24to8.mak
+./hdf/util/hdf2gif.c
+./hdf/util/hdf2jpeg.c
+./hdf/util/hdf2jpeg.mak
+./hdf/util/hdf8to24.c
+./hdf/util/hdf8to24.mak
+./hdf/util/hdfcomp.c
+./hdf/util/hdfcomp.mak
+./hdf/util/hdfcomp.out1
+./hdf/util/hdfed.input1
+./hdf/util/hdfed.mak
+./hdf/util/hdfed.out1
+./hdf/util/hdfgifwr.c
+./hdf/util/hdfls.c
+./hdf/util/hdfls.mak
+./hdf/util/hdfpack.c
+./hdf/util/hdfpack.mak
+./hdf/util/hdfpack.out1
+./hdf/util/hdfrseq.c
+./hdf/util/hdftopal.c
+./hdf/util/hdftopal.mak
+./hdf/util/hdftor8.c
+./hdf/util/hdftor8.mak
+./hdf/util/hdftor8.out1
+./hdf/util/hdfunpac.c
+./hdf/util/hdfunpac.mak
+./hdf/util/he_cntrl.c
+./hdf/util/he_disp.c
+./hdf/util/he_file.c
+./hdf/util/he.h
+./hdf/util/he_main.c
+./hdf/util/he_proto.h
+./hdf/util/jpeg2hdf.c
+./hdf/util/jpeg2hdf.mak
+./hdf/util/jpeg2hdf.out1
+./hdf/util/makepc.386
+./hdf/util/makepc.msc
+./hdf/util/paltohdf.c
+./hdf/util/paltohdf.mak
+./hdf/util/r8tohdf.c
+./hdf/util/r8tohdf.mak
+./hdf/util/ristosds.c
+./hdf/util/ristosds.input1
+./hdf/util/ristosds.mak
+./hdf/util/ristosds.out1
+./hdf/util/testutil.sh.in
+./hdf/util/vcompat.c
+./hdf/util/vcompat.mak
+./hdf/util/vmake.c
+./hdf/util/vmake.mak
+./hdf/util/vshow.c
+./hdf/util/vshow.mak
+./hdf/util/writehdf.c
+
+./hdf/util/MacProjects/PalToHDF.project.hqx
+./hdf/util/MacProjects/R8ToHDF.project.hqx
+./hdf/util/MacProjects/RISToHDF.project.hqx
+./hdf/util/MacProjects/fp2hdf.project.hqx
+./hdf/util/MacProjects/hdf24to8.project.hqx
+./hdf/util/MacProjects/hdfcomp.project.hqx
+./hdf/util/MacProjects/hdfed.project.hqx
+./hdf/util/MacProjects/hdfls.project.hqx
+./hdf/util/MacProjects/hdfpack.project.hqx
+./hdf/util/MacProjects/hdftopal.project.hqx
+./hdf/util/MacProjects/hdftoR8.project.hqx
+./hdf/util/MacProjects/vshow.project.hqx
+
+./hdf/util/fixatr/README
+./hdf/util/fixatr/command.for
+./hdf/util/fixatr/common.for
+./hdf/util/fixatr/fixatr.cld
+./hdf/util/fixatr/fixatr.hlp
+./hdf/util/fixatr/makefix.com
+./hdf/util/fixatr/parse.mar
+./hdf/util/fixatr/rformat.for
+
+./hdf/util/testfiles/README
+./hdf/util/testfiles/SunWheel.gif
+./hdf/util/testfiles/bttrfly.gif
+./hdf/util/testfiles/head.r24.gz
+./hdf/util/testfiles/head.r8.gz
+./hdf/util/testfiles/jet2.hdf
+./hdf/util/testfiles/jpeg_img.jpg
+./hdf/util/testfiles/ntcheck.hdf
+./hdf/util/testfiles/palette.raw
+./hdf/util/testfiles/skull.hdf
+./hdf/util/testfiles/storm110.hdf
+./hdf/util/testfiles/storm110.raw
+./hdf/util/testfiles/storm120.hdf
+./hdf/util/testfiles/storm120.raw
+./hdf/util/testfiles/storm130.hdf
+./hdf/util/testfiles/storm130.raw
+./hdf/util/testfiles/storm140.raw
+./hdf/util/testfiles/test.cdf
+./hdf/util/testfiles/test.hdf
+./hdf/util/testfiles/tvattr.hdf
+
+./hdf/util/testfiles/fp2hdf/h100x100
+./hdf/util/testfiles/fp2hdf/h100x100h
+./hdf/util/testfiles/fp2hdf/h100x100hv
+./hdf/util/testfiles/fp2hdf/h60x75
+./hdf/util/testfiles/fp2hdf/h60x75n
+./hdf/util/testfiles/fp2hdf/h60x75v
+./hdf/util/testfiles/fp2hdf/pal.hdf
+./hdf/util/testfiles/fp2hdf/t100x100
+
+./man/Makefile.am
+./man/Makefile.in
+./man/gr_chunk.3
+./man/hdf.1
+./man/hdfunpac.1
+
+./mfhdf/CHANGES
+./mfhdf/COPYRIGHT
+./mfhdf/CUSTOMIZE
+./mfhdf/FAQ
+./mfhdf/INSTALL
+./mfhdf/Makefile.am
+./mfhdf/Makefile.in
+./mfhdf/MANIFEST
+./mfhdf/ORIGIN
+./mfhdf/README
+./mfhdf/README.HDF
+./mfhdf/README.HDF.33
+./mfhdf/THANKS
+./mfhdf/VERSION
+./mfhdf/build.bat
+./mfhdf/macros.mk
+./mfhdf/make.com
+./mfhdf/mfhdf.mak
+./mfhdf/msoft.mk
+
+./mfhdf/c++/Makefile
+./mfhdf/c++/README
+./mfhdf/c++/example.c
+./mfhdf/c++/example.cc
+./mfhdf/c++/example.cdl
+./mfhdf/c++/expected
+./mfhdf/c++/nc.info
+./mfhdf/c++/nctst.cc
+./mfhdf/c++/nc.txn
+./mfhdf/c++/ncvalues.cc
+./mfhdf/c++/ncvalues.hh
+./mfhdf/c++/netcdf.cc
+./mfhdf/c++/netcdf.hh
+
+./mfhdf/dumper/Makefile.am
+./mfhdf/dumper/Makefile.in
+./mfhdf/dumper/README
+./mfhdf/dumper/TEST
+./mfhdf/dumper/TEST.COM
+./mfhdf/dumper/hdp.c
+./mfhdf/dumper/hdp_dump.c
+./mfhdf/dumper/hdp_gr.c
+./mfhdf/dumper/hdp.h
+./mfhdf/dumper/hdp_list.c
+./mfhdf/dumper/hdp.mak
+./mfhdf/dumper/hdp_rig.c
+./mfhdf/dumper/hdp_sds.c
+./mfhdf/dumper/hdp.txt
+./mfhdf/dumper/hdp_util.c
+./mfhdf/dumper/hdp_vd.c
+./mfhdf/dumper/hdp_vg.c
+./mfhdf/dumper/make.com
+./mfhdf/dumper/show.c
+./mfhdf/dumper/testhdp.sh.in
+
+./mfhdf/dumper/testfiles/Example6.hdf
+./mfhdf/dumper/testfiles/Image_with_Palette.hdf
+./mfhdf/dumper/testfiles/LongDataset.hdf
+./mfhdf/dumper/testfiles/ctxtr2r.hdf
+./mfhdf/dumper/testfiles/dumpgr-10.out
+./mfhdf/dumper/testfiles/dumpgr-11.out
+./mfhdf/dumper/testfiles/dumpgr-12.out
+./mfhdf/dumper/testfiles/dumpgr-13.out
+./mfhdf/dumper/testfiles/dumpgr-14.out
+./mfhdf/dumper/testfiles/dumpgr-15.out
+./mfhdf/dumper/testfiles/dumpgr-16.out
+./mfhdf/dumper/testfiles/dumpgr-17.out
+./mfhdf/dumper/testfiles/dumpgr-18.out
+./mfhdf/dumper/testfiles/dumpgr-19.out
+./mfhdf/dumper/testfiles/dumpgr-1.out
+./mfhdf/dumper/testfiles/dumpgr-2.out
+./mfhdf/dumper/testfiles/dumpgr-3.out
+./mfhdf/dumper/testfiles/dumpgr-4.out
+./mfhdf/dumper/testfiles/dumpgr-5.out
+./mfhdf/dumper/testfiles/dumpgr-6.out
+./mfhdf/dumper/testfiles/dumpgr-7.out
+./mfhdf/dumper/testfiles/dumpgr-8.out
+./mfhdf/dumper/testfiles/dumpgr-9.out
+./mfhdf/dumper/testfiles/dumprig-1.out
+./mfhdf/dumper/testfiles/dumprig-2.out
+./mfhdf/dumper/testfiles/dumprig-3.out
+./mfhdf/dumper/testfiles/dumprig-4.out
+./mfhdf/dumper/testfiles/dumprig-5.out
+./mfhdf/dumper/testfiles/dumprig-6.out
+./mfhdf/dumper/testfiles/dumpsds-1.out
+./mfhdf/dumper/testfiles/dumpsds-2.out
+./mfhdf/dumper/testfiles/dumpsds-3.out
+./mfhdf/dumper/testfiles/dumpsds-4.out
+./mfhdf/dumper/testfiles/dumpsds-5.out
+./mfhdf/dumper/testfiles/dumpsds-6.out
+./mfhdf/dumper/testfiles/dumpsds-7.out
+./mfhdf/dumper/testfiles/dumpsds-8.out
+./mfhdf/dumper/testfiles/dumpsds-9.out
+./mfhdf/dumper/testfiles/dumpsds-10.out
+./mfhdf/dumper/testfiles/dumpsds-11.out
+./mfhdf/dumper/testfiles/dumpvd-10.out
+./mfhdf/dumper/testfiles/dumpvd-1.out
+./mfhdf/dumper/testfiles/dumpvd-2.out
+./mfhdf/dumper/testfiles/dumpvd-3.out
+./mfhdf/dumper/testfiles/dumpvd-4.out
+./mfhdf/dumper/testfiles/dumpvd-5.out
+./mfhdf/dumper/testfiles/dumpvd-6.out
+./mfhdf/dumper/testfiles/dumpvd-7.out
+./mfhdf/dumper/testfiles/dumpvd-8.out
+./mfhdf/dumper/testfiles/dumpvd-9.out
+./mfhdf/dumper/testfiles/dumpvg-10.out
+./mfhdf/dumper/testfiles/dumpvg-11.out
+./mfhdf/dumper/testfiles/dumpvg-12.out
+./mfhdf/dumper/testfiles/dumpvg-1.out
+./mfhdf/dumper/testfiles/dumpvg-2.out
+./mfhdf/dumper/testfiles/dumpvg-3.out
+./mfhdf/dumper/testfiles/dumpvg-4.out
+./mfhdf/dumper/testfiles/dumpvg-5.out
+./mfhdf/dumper/testfiles/dumpvg-6.out
+./mfhdf/dumper/testfiles/dumpvg-7.out
+./mfhdf/dumper/testfiles/dumpvg-8.out
+./mfhdf/dumper/testfiles/dumpvg-9.out
+./mfhdf/dumper/testfiles/grtdfi322.hdf
+./mfhdf/dumper/testfiles/grtdfui162.hdf
+./mfhdf/dumper/testfiles/grtdfui82.hdf
+./mfhdf/dumper/testfiles/grtdfui83.hdf
+./mfhdf/dumper/testfiles/grtdfui84.hdf
+./mfhdf/dumper/testfiles/list-10.out
+./mfhdf/dumper/testfiles/list-1.out
+./mfhdf/dumper/testfiles/list-2.out
+./mfhdf/dumper/testfiles/list-3.out
+./mfhdf/dumper/testfiles/list-4.out
+./mfhdf/dumper/testfiles/list-5.out
+./mfhdf/dumper/testfiles/list-6.out
+./mfhdf/dumper/testfiles/list-7.out
+./mfhdf/dumper/testfiles/list-8.out
+./mfhdf/dumper/testfiles/list-9.out
+./mfhdf/dumper/testfiles/swf32.hdf
+./mfhdf/dumper/testfiles/swi16.hdf
+./mfhdf/dumper/testfiles/swi8.hdf
+./mfhdf/dumper/testfiles/tdf24.hdf
+./mfhdf/dumper/testfiles/test.hdf
+./mfhdf/dumper/testfiles/tvattr.hdf
+./mfhdf/dumper/testfiles/star.hdf
+./mfhdf/dumper/testfiles/swf32_fileattr.hdf
+./mfhdf/dumper/testfiles/tdata.hdf
+./mfhdf/dumper/testfiles/tdfr8f.hdf
+./mfhdf/dumper/testfiles/tvset.hdf
+
+./mfhdf/fortran/Linux.m4
+./mfhdf/fortran/Makefile.am
+./mfhdf/fortran/Makefile.in
+./mfhdf/fortran/README
+./mfhdf/fortran/aix.m4
+./mfhdf/fortran/common.inc
+./mfhdf/fortran/common.m4
+./mfhdf/fortran/convex.m4
+./mfhdf/fortran/craympp.m4
+./mfhdf/fortran/depend
+./mfhdf/fortran/descrip.mms
+./mfhdf/fortran/fortc
+./mfhdf/fortran/fortc1.sed
+./mfhdf/fortran/fortc2.sed
+./mfhdf/fortran/freebsd.m4
+./mfhdf/fortran/ftest.lnk
+./mfhdf/fortran/ftest.src
+./mfhdf/fortran/fujivp.m4
+./mfhdf/fortran/hdftest.f
+./mfhdf/fortran/hdftst.sav
+./mfhdf/fortran/hpux.m4
+./mfhdf/fortran/irix.m4
+./mfhdf/fortran/jackets.src
+./mfhdf/fortran/mfsdf.c
+./mfhdf/fortran/mfsdff.f
+./mfhdf/fortran/msoft.m4
+./mfhdf/fortran/msoft.mk
+./mfhdf/fortran/osf.m4
+./mfhdf/fortran/solaris.m4
+./mfhdf/fortran/sunos.m4
+./mfhdf/fortran/test_nc.cdl
+./mfhdf/fortran/test_nc.nc
+./mfhdf/fortran/ultrix.m4
+./mfhdf/fortran/unicos.m4
+./mfhdf/fortran/vax-ultrix.m4
+./mfhdf/fortran/vms.m4
+
+./mfhdf/fortran/config/ftest-aix.f
+./mfhdf/fortran/config/ftest-alpha.f
+./mfhdf/fortran/config/ftest-apple.f
+./mfhdf/fortran/config/ftest-convex.f
+./mfhdf/fortran/config/ftest-dec.f
+./mfhdf/fortran/config/ftest-fbsd.f
+./mfhdf/fortran/config/ftest-fujivp.f
+./mfhdf/fortran/config/ftest-hpux.f
+./mfhdf/fortran/config/ftest-ia64.f
+./mfhdf/fortran/config/ftest-irix32.f
+./mfhdf/fortran/config/ftest-irix4.f
+./mfhdf/fortran/config/ftest-irix5.f
+./mfhdf/fortran/config/ftest-irix6.f
+./mfhdf/fortran/config/ftest-linux.f
+./mfhdf/fortran/config/ftest-mac.f
+./mfhdf/fortran/config/ftest-solaris64.f
+./mfhdf/fortran/config/ftest-solaris.f
+./mfhdf/fortran/config/ftest-solarisx86.f
+./mfhdf/fortran/config/ftest-sun.f
+./mfhdf/fortran/config/ftest-t3e.f
+./mfhdf/fortran/config/ftest-unicos.f
+./mfhdf/fortran/config/jackets-aix.c
+./mfhdf/fortran/config/jackets-alpha.c
+./mfhdf/fortran/config/jackets-apple.c
+./mfhdf/fortran/config/jackets-convex.c
+./mfhdf/fortran/config/jackets-dec.c
+./mfhdf/fortran/config/jackets-fbsd.c
+./mfhdf/fortran/config/jackets-fujivp.c
+./mfhdf/fortran/config/jackets-hpux.c
+./mfhdf/fortran/config/jackets-ia64.c
+./mfhdf/fortran/config/jackets-irix32.c
+./mfhdf/fortran/config/jackets-irix4.c
+./mfhdf/fortran/config/jackets-irix5.c
+./mfhdf/fortran/config/jackets-irix6.c
+./mfhdf/fortran/config/jackets-linux.c
+./mfhdf/fortran/config/jackets-mac.c
+./mfhdf/fortran/config/jackets-solaris64.c
+./mfhdf/fortran/config/jackets-solaris.c
+./mfhdf/fortran/config/jackets-solarisx86.c
+./mfhdf/fortran/config/jackets-sun.c
+./mfhdf/fortran/config/jackets-t3e.c
+./mfhdf/fortran/config/jackets-unicos.c
+./mfhdf/fortran/config/netcdf-aix.inc
+./mfhdf/fortran/config/netcdf-alpha.inc
+./mfhdf/fortran/config/netcdf-apple.inc
+./mfhdf/fortran/config/netcdf-convex.inc
+./mfhdf/fortran/config/netcdf-dec.inc
+./mfhdf/fortran/config/netcdf-fbsd.inc
+./mfhdf/fortran/config/netcdf-fujivp.inc
+./mfhdf/fortran/config/netcdf-hpux.inc
+./mfhdf/fortran/config/netcdf-ia64.inc
+./mfhdf/fortran/config/netcdf-irix32.inc
+./mfhdf/fortran/config/netcdf-irix4.inc
+./mfhdf/fortran/config/netcdf-irix5.inc
+./mfhdf/fortran/config/netcdf-irix6.inc
+./mfhdf/fortran/config/netcdf-linux.inc
+./mfhdf/fortran/config/netcdf-mac.inc
+./mfhdf/fortran/config/netcdf-solaris64.inc
+./mfhdf/fortran/config/netcdf-solaris.inc
+./mfhdf/fortran/config/netcdf-solarisx86.inc
+./mfhdf/fortran/config/netcdf-sun.inc
+./mfhdf/fortran/config/netcdf-t3e.inc
+./mfhdf/fortran/config/netcdf-unicos.inc
+
+./mfhdf/fortran/fort_ps/hdftestp.f
+./mfhdf/fortran/fort_ps/mfhdfp.h
+./mfhdf/fortran/fort_ps/mfsdpf.c
+./mfhdf/fortran/fort_ps/mfsdpff.f
+
+./mfhdf/fortran/msoft/NOTES
+./mfhdf/fortran/msoft/fslen.asm
+./mfhdf/fortran/msoft/ftest.for
+./mfhdf/fortran/msoft/jackets.c
+./mfhdf/fortran/msoft/msoft.int
+./mfhdf/fortran/msoft/netcdf.inc
+
+./mfhdf/fortran/vms/ftest.for
+./mfhdf/fortran/vms/ftest.m4
+./mfhdf/fortran/vms/hdftest.for
+./mfhdf/fortran/vms/jackets.c
+./mfhdf/fortran/vms/make.com
+./mfhdf/fortran/vms/mfsdf.c
+./mfhdf/fortran/vms/mfsdff.for
+./mfhdf/fortran/vms/netcdf.inc
+
+./mfhdf/hdfimport/Makefile.am
+./mfhdf/hdfimport/Makefile.in
+./mfhdf/hdfimport/hdfimport.c
+./mfhdf/hdfimport/hdfimport.input1
+./mfhdf/hdfimport/hdfimport.out1
+./mfhdf/hdfimport/hdfimport.out2
+./mfhdf/hdfimport/hdfimporttest.c
+./mfhdf/hdfimport/testutil.sh.in
+
+./mfhdf/hdiff/Makefile.am
+./mfhdf/hdiff/Makefile.in
+./mfhdf/hdiff/hdiff.c
+./mfhdf/hdiff/hdiff.h
+./mfhdf/hdiff/hdiff_array.c
+./mfhdf/hdiff/hdiff_gattr.c
+./mfhdf/hdiff/hdiff_gr.c
+./mfhdf/hdiff/hdiff_list.c
+./mfhdf/hdiff/hdiff_list.h
+./mfhdf/hdiff/hdiff_main.c
+./mfhdf/hdiff/hdiff_mattbl.c
+./mfhdf/hdiff/hdiff_mattbl.h
+./mfhdf/hdiff/hdiff_misc.c
+./mfhdf/hdiff/hdiff_sds.c
+./mfhdf/hdiff/hdiff_table.c
+./mfhdf/hdiff/hdiff_table.h
+./mfhdf/hdiff/hdiff_vs.c
+./mfhdf/hdiff/hdifftst.c
+./mfhdf/hdiff/testhdiff.sh
+
+./mfhdf/hdiff/testfiles/hdiff_01.txt
+./mfhdf/hdiff/testfiles/hdiff_02.txt
+./mfhdf/hdiff/testfiles/hdiff_03.txt
+./mfhdf/hdiff/testfiles/hdiff_04.txt
+./mfhdf/hdiff/testfiles/hdiff_05.txt
+./mfhdf/hdiff/testfiles/hdiff_06.txt
+./mfhdf/hdiff/testfiles/hdiff_07.txt
+./mfhdf/hdiff/testfiles/hdiff_08.txt
+./mfhdf/hdiff/testfiles/hdiff_09.txt
+./mfhdf/hdiff/testfiles/hdiff_10.txt
+./mfhdf/hdiff/testfiles/hdiff_11.txt
+./mfhdf/hdiff/testfiles/hdifftst1.hdf
+./mfhdf/hdiff/testfiles/hdifftst2.hdf
+
+
+./mfhdf/hrepack/Makefile.am
+./mfhdf/hrepack/Makefile.in
+./mfhdf/hrepack/hrepack.c
+./mfhdf/hrepack/hrepack.h
+./mfhdf/hrepack/hrepack_all.sh
+./mfhdf/hrepack/hrepack_an.c
+./mfhdf/hrepack/hrepack_an.h
+./mfhdf/hrepack/hrepack_check.c
+./mfhdf/hrepack/hrepack_cmp.c
+./mfhdf/hrepack/hrepack_gr.c
+./mfhdf/hrepack/hrepack_gr.h
+./mfhdf/hrepack/hrepack_list.c
+./mfhdf/hrepack/hrepack_lsttable.c
+./mfhdf/hrepack/hrepack_lsttable.h
+./mfhdf/hrepack/hrepack_main.c
+./mfhdf/hrepack/hrepack_opttable.c
+./mfhdf/hrepack/hrepack_opttable.h
+./mfhdf/hrepack/hrepack_pal.c
+./mfhdf/hrepack/hrepack_pal.h
+./mfhdf/hrepack/hrepack_parse.c
+./mfhdf/hrepack/hrepack_parse.h
+./mfhdf/hrepack/hrepack_sds.c
+./mfhdf/hrepack/hrepack_sds.h
+./mfhdf/hrepack/hrepack_sdutil.c
+./mfhdf/hrepack/hrepack_sdutil.h
+./mfhdf/hrepack/hrepack_utils.c
+./mfhdf/hrepack/hrepack_utils.h
+./mfhdf/hrepack/hrepack_vg.c
+./mfhdf/hrepack/hrepack_vg.h
+./mfhdf/hrepack/hrepack_vs.c
+./mfhdf/hrepack/hrepack_vs.h
+./mfhdf/hrepack/image24pixel.txt
+./mfhdf/hrepack/image24plane.txt
+./mfhdf/hrepack/image8.txt
+./mfhdf/hrepack/info.txt
+./mfhdf/hrepack/pal_rgb.h
+./mfhdf/hrepack/test_hrepack_add.c
+./mfhdf/hrepack/test_hrepack_add.h
+./mfhdf/hrepack/test_hrepack_main.c
+./mfhdf/hrepack/test_hrepack.sh
+./mfhdf/hrepack/test_hrepack_verify.c
+./mfhdf/hrepack/test_hrepack_verify.h
+
+./mfhdf/libsrc/Makefile.am
+./mfhdf/libsrc/Makefile.in
+./mfhdf/libsrc/README
+./mfhdf/libsrc/alloc.h
+./mfhdf/libsrc/array.c
+./mfhdf/libsrc/attr.c
+./mfhdf/libsrc/cdf.c
+./mfhdf/libsrc/cdftest.c
+./mfhdf/libsrc/cdftest.mak
+./mfhdf/libsrc/cdftest.project.hqx
+./mfhdf/libsrc/depend
+./mfhdf/libsrc/descrip.mms
+./mfhdf/libsrc/dim.c
+./mfhdf/libsrc/error.c
+./mfhdf/libsrc/error.h
+./mfhdf/libsrc/file.c
+./mfhdf/libsrc/globdef.c
+./mfhdf/libsrc/hdf2netcdf.h
+./mfhdf/libsrc/hdfout.sav
+./mfhdf/libsrc/hdfsds.c
+./mfhdf/libsrc/hdftest.c
+./mfhdf/libsrc/hdftest.h
+./mfhdf/libsrc/hdftest.mak
+./mfhdf/libsrc/hdftest.project.hqx
+./mfhdf/libsrc/htons.mar
+./mfhdf/libsrc/iarray.c
+./mfhdf/libsrc/local_nc.h
+./mfhdf/libsrc/make.com
+./mfhdf/libsrc/mfhdf.h
+./mfhdf/libsrc/mfhdflib.project.hqx
+./mfhdf/libsrc/mfsd.c
+./mfhdf/libsrc/msoft.mk
+./mfhdf/libsrc/netcdf.h.in
+./mfhdf/libsrc/nssdc.c
+./mfhdf/libsrc/ntohs.mar
+./mfhdf/libsrc/putget.c
+./mfhdf/libsrc/putgetg.c
+./mfhdf/libsrc/sharray.c
+./mfhdf/libsrc/string.c
+./mfhdf/libsrc/temptySDSs.c
+./mfhdf/libsrc/tidtypes.c
+./mfhdf/libsrc/test1.nc
+./mfhdf/libsrc/test_cdf.sav
+./mfhdf/libsrc/testout.sav
+./mfhdf/libsrc/trank0.c
+./mfhdf/libsrc/tszip.c
+./mfhdf/libsrc/tsd.c
+./mfhdf/libsrc/var.c
+./mfhdf/libsrc/win32cdf.h
+./mfhdf/libsrc/win32cdf.mak
+./mfhdf/libsrc/xdrposix.c
+./mfhdf/libsrc/xdrstdio.c
+
+./mfhdf/libsrc/config/netcdf-aix.h
+./mfhdf/libsrc/config/netcdf-alpha.h
+./mfhdf/libsrc/config/netcdf-apple.h
+./mfhdf/libsrc/config/netcdf-convex.h
+./mfhdf/libsrc/config/netcdf-dec.h
+./mfhdf/libsrc/config/netcdf-fbsd.h
+./mfhdf/libsrc/config/netcdf-fujivp.h
+./mfhdf/libsrc/config/netcdf-hpux.h
+./mfhdf/libsrc/config/netcdf-ia64.h
+./mfhdf/libsrc/config/netcdf-irix32.h
+./mfhdf/libsrc/config/netcdf-irix4.h
+./mfhdf/libsrc/config/netcdf-irix5.h
+./mfhdf/libsrc/config/netcdf-irix6.h
+./mfhdf/libsrc/config/netcdf-linux.h
+./mfhdf/libsrc/config/netcdf-mac.h
+./mfhdf/libsrc/config/netcdf-solaris64.h
+./mfhdf/libsrc/config/netcdf-solaris.h
+./mfhdf/libsrc/config/netcdf-solarisx86.h
+./mfhdf/libsrc/config/netcdf-sun.h
+./mfhdf/libsrc/config/netcdf-t3e.h
+./mfhdf/libsrc/config/netcdf-unicos.h
+./mfhdf/libsrc/config/netcdf-vms.h
+
+./mfhdf/ncdump/Makefile.am
+./mfhdf/ncdump/Makefile.in
+./mfhdf/ncdump/SETUPNCDUMP.COM
+./mfhdf/ncdump/ctest0.mak
+./mfhdf/ncdump/depend
+./mfhdf/ncdump/dumplib.c
+./mfhdf/ncdump/dumplib.h
+./mfhdf/ncdump/make.com
+./mfhdf/ncdump/msoft.mk
+./mfhdf/ncdump/msofttab.c
+./mfhdf/ncdump/ncdump.1
+./mfhdf/ncdump/ncdump.c
+./mfhdf/ncdump/ncdump.h
+./mfhdf/ncdump/ncdump.lnk
+./mfhdf/ncdump/ncdump.mak
+./mfhdf/ncdump/test0.cdl
+./mfhdf/ncdump/vardata.c
+./mfhdf/ncdump/vardata.h
+
+./mfhdf/ncgen/Makefile.am
+./mfhdf/ncgen/Makefile.in
+./mfhdf/ncgen/README
+./mfhdf/ncgen/close.c
+./mfhdf/ncgen/ctest0.mak
+./mfhdf/ncgen/depend
+./mfhdf/ncgen/descrip.mms
+./mfhdf/ncgen/escapes.c
+./mfhdf/ncgen/generate.c
+./mfhdf/ncgen/generic.h
+./mfhdf/ncgen/genlib.c
+./mfhdf/ncgen/genlib.h
+./mfhdf/ncgen/getfill.c
+./mfhdf/ncgen/init.c
+./mfhdf/ncgen/lexyacc.com
+./mfhdf/ncgen/load.c
+./mfhdf/ncgen/main.c
+./mfhdf/ncgen/make.com
+./mfhdf/ncgen/msoft.mk
+./mfhdf/ncgen/msofttab.c
+./mfhdf/ncgen/msofttab.h
+./mfhdf/ncgen/msoftyy.c
+./mfhdf/ncgen/ncgen.1
+./mfhdf/ncgen/ncgen.h
+./mfhdf/ncgen/ncgen.l
+./mfhdf/ncgen/ncgen.lnk
+./mfhdf/ncgen/ncgen.mak
+./mfhdf/ncgen/ncgen.opt
+./mfhdf/ncgen/ncgen.y
+./mfhdf/ncgen/test0.cdl
+./mfhdf/ncgen/test0.lnk
+./mfhdf/ncgen/test.com
+./mfhdf/ncgen/vmstab.c
+./mfhdf/ncgen/vmstab.h
+./mfhdf/ncgen/vms_yy.c
+
+./mfhdf/nctest/Makefile.am
+./mfhdf/nctest/Makefile.in
+./mfhdf/nctest/README
+./mfhdf/nctest/add.c
+./mfhdf/nctest/add.h
+./mfhdf/nctest/atttests.c
+./mfhdf/nctest/cdftests.c
+./mfhdf/nctest/depend
+./mfhdf/nctest/dimtests.c
+./mfhdf/nctest/driver.c
+./mfhdf/nctest/emalloc.c
+./mfhdf/nctest/emalloc.h
+./mfhdf/nctest/error.c
+./mfhdf/nctest/error.h
+./mfhdf/nctest/make.com
+./mfhdf/nctest/misctest.c
+./mfhdf/nctest/msoft.mk
+./mfhdf/nctest/nctest.def
+./mfhdf/nctest/nctest.lnk
+./mfhdf/nctest/nctest.mak
+./mfhdf/nctest/nctest.project.hqx
+./mfhdf/nctest/rec.c
+./mfhdf/nctest/slabs.c
+./mfhdf/nctest/test_unlim.cdl
+./mfhdf/nctest/test_unlim.nc
+./mfhdf/nctest/testcdf.h
+./mfhdf/nctest/tests.h
+./mfhdf/nctest/val.c
+./mfhdf/nctest/val.h
+./mfhdf/nctest/vardef.c
+./mfhdf/nctest/varget_unlim.c
+./mfhdf/nctest/varget.c
+./mfhdf/nctest/vargetg.c
+./mfhdf/nctest/varput.c
+./mfhdf/nctest/varputg.c
+./mfhdf/nctest/vartests.c
+./mfhdf/nctest/vputget.c
+./mfhdf/nctest/vputgetg.c
+
+./mfhdf/port/COPYRIGHT
+./mfhdf/port/CUSTOMIZE
+./mfhdf/port/HISTORY
+./mfhdf/port/Makefile.am
+./mfhdf/port/Makefile.in
+./mfhdf/port/VERSION
+./mfhdf/port/aclocal.m4
+./mfhdf/port/configure
+./mfhdf/port/configure.in
+./mfhdf/port/depend
+./mfhdf/port/master.mk.in
+./mfhdf/port/mast_mk.in
+./mfhdf/port/uddummy.c
+./mfhdf/port/udposix.h.in
+./mfhdf/port/udposixh.in
+./mfhdf/port/which
+
+./mfhdf/util/getopt.c
+./mfhdf/util/make.com
+./mfhdf/util/msoft.mk
+./mfhdf/util/win32utl.mak
+
+./mfhdf/xdr/Makefile.am
+./mfhdf/xdr/Makefile.in
+./mfhdf/xdr/NOTICE.h
+./mfhdf/xdr/README
+./mfhdf/xdr/byteordr.c
+./mfhdf/xdr/depend
+./mfhdf/xdr/descrip.mms
+./mfhdf/xdr/htonl.mar
+./mfhdf/xdr/make.com
+./mfhdf/xdr/msoft.mk
+./mfhdf/xdr/ntohl.mar
+./mfhdf/xdr/testout.sav
+./mfhdf/xdr/test_xdr.sav
+./mfhdf/xdr/types.h
+./mfhdf/xdr/win32xdr.mak
+./mfhdf/xdr/xdrarray.c
+./mfhdf/xdr/xdr.c
+./mfhdf/xdr/xdrfloat.c
+./mfhdf/xdr/xdr.h
+./mfhdf/xdr/xdrlib.project.hqx
+./mfhdf/xdr/xdrstdio.c
+./mfhdf/xdr/xdrtest.c
+./mfhdf/xdr/xdrtest.mak
+./mfhdf/xdr/xdrtest.opt
+./mfhdf/xdr/xdrtest.project.hqx
+
+./release_notes/HISTORY.txt
+./release_notes/RELEASE.txt
+./release_notes/bugs_fixed.txt
+./release_notes/misc_docs.txt

Added: packages/libhdf4/branches/upstream/current/Makefile.am
===================================================================
--- packages/libhdf4/branches/upstream/current/Makefile.am	                        (rev 0)
+++ packages/libhdf4/branches/upstream/current/Makefile.am	2007-05-15 09:53:05 UTC (rev 831)
@@ -0,0 +1,5 @@
+#############################################################################
+##                      Subdirectories to build in                         ##
+#############################################################################
+
+SUBDIRS=hdf mfhdf man

Modified: packages/libhdf4/branches/upstream/current/Makefile.in
===================================================================
--- packages/libhdf4/branches/upstream/current/Makefile.in	2007-05-15 09:05:29 UTC (rev 830)
+++ packages/libhdf4/branches/upstream/current/Makefile.in	2007-05-15 09:53:05 UTC (rev 831)
@@ -1,535 +1,535 @@
-# $Id: Makefile.in,v 1.40 1999/06/20 01:40:35 acheng Exp $
-#
-# Makefile to build HDF & netcdf libraries and utilities...etc
-#
-# NOTE: This Makefile.in is used by the Cygnus 'configure' script to
-#       generate the top level Makefile.
+# Makefile.in generated by automake 1.7.7 from Makefile.am.
+# @configure_input@
 
-# ############# Start of system configuration section. #############
+# Copyright 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003
+# 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.
 
-# 'srcdir' Gets set to directory this Makefile is found in
-srcdir = .
-TOP_SRCDIR = .
+# 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.
 
-prefix = $(TOP_SRCDIR)/NewHDF
+ at SET_MAKE@
 
-exec_prefix = $(prefix)
-tooldir = $(exec_prefix)/$(target)
+#############################################################################
+#############################################################################
 
-program_transform_name =
+srcdir = @srcdir@
+top_srcdir = @top_srcdir@
+VPATH = @srcdir@
+pkgdatadir = $(datadir)/@PACKAGE@
+pkglibdir = $(libdir)/@PACKAGE@
+pkgincludedir = $(includedir)/@PACKAGE@
+top_builddir = .
 
-datadir = $(prefix)/lib
-mandir = $(prefix)/man
-man1dir = $(mandir)/man1
-man2dir = $(mandir)/man2
-man3dir = $(mandir)/man3
-man4dir = $(mandir)/man4
-man5dir = $(mandir)/man5
-man6dir = $(mandir)/man6
-man7dir = $(mandir)/man7
-man8dir = $(mandir)/man8
-man9dir = $(mandir)/man9
-docdir = $(datadir)/doc
+am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
+INSTALL = @INSTALL@
+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 = :
+host_triplet = @host@
+ACLOCAL = @ACLOCAL@
+AMDEP_FALSE = @AMDEP_FALSE@
+AMDEP_TRUE = @AMDEP_TRUE@
+AMTAR = @AMTAR@
+AR = @AR@
+AUTOCONF = @AUTOCONF@
+AUTOHEADER = @AUTOHEADER@
+AUTOMAKE = @AUTOMAKE@
+AWK = @AWK@
+CC = @CC@
+CCDEPMODE = @CCDEPMODE@
+CFLAGS = @CFLAGS@
+CPP = @CPP@
+CPPFLAGS = @CPPFLAGS@
+CXX = @CXX@
+CXXCPP = @CXXCPP@
+CXXDEPMODE = @CXXDEPMODE@
+CXXFLAGS = @CXXFLAGS@
+CYGPATH_W = @CYGPATH_W@
+DEFS = @DEFS@
+DEPDIR = @DEPDIR@
+DIFF = @DIFF@
+ECHO_C = @ECHO_C@
+ECHO_N = @ECHO_N@
+ECHO_T = @ECHO_T@
+EGREP = @EGREP@
+EXEEXT = @EXEEXT@
+F77 = @F77@
+FFLAGS = @FFLAGS@
+HDF_BUILD_FORTRAN_FALSE = @HDF_BUILD_FORTRAN_FALSE@
+HDF_BUILD_FORTRAN_TRUE = @HDF_BUILD_FORTRAN_TRUE@
+HDF_BUILD_XDR_FALSE = @HDF_BUILD_XDR_FALSE@
+HDF_BUILD_XDR_TRUE = @HDF_BUILD_XDR_TRUE@
+INSTALL_DATA = @INSTALL_DATA@
+INSTALL_PROGRAM = @INSTALL_PROGRAM@
+INSTALL_SCRIPT = @INSTALL_SCRIPT@
+INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
+LDFLAGS = @LDFLAGS@
+LEX = @LEX@
+LEXLIB = @LEXLIB@
+LEX_OUTPUT_ROOT = @LEX_OUTPUT_ROOT@
+LIBOBJS = @LIBOBJS@
+LIBS = @LIBS@
+LN_S = @LN_S@
+LTLIBOBJS = @LTLIBOBJS@
+MAINT = @MAINT@
+MAINTAINER_MODE_FALSE = @MAINTAINER_MODE_FALSE@
+MAINTAINER_MODE_TRUE = @MAINTAINER_MODE_TRUE@
+MAKEINFO = @MAKEINFO@
+NEQN = @NEQN@
+OBJEXT = @OBJEXT@
+PACKAGE = @PACKAGE@
+PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
+PACKAGE_NAME = @PACKAGE_NAME@
+PACKAGE_STRING = @PACKAGE_STRING@
+PACKAGE_TARNAME = @PACKAGE_TARNAME@
+PACKAGE_VERSION = @PACKAGE_VERSION@
+PATH_SEPARATOR = @PATH_SEPARATOR@
+RANLIB = @RANLIB@
+SET_MAKE = @SET_MAKE@
+SHELL = @SHELL@
+STRIP = @STRIP@
+TBL = @TBL@
+VERSION = @VERSION@
+YACC = @YACC@
+ac_ct_CC = @ac_ct_CC@
+ac_ct_CXX = @ac_ct_CXX@
+ac_ct_F77 = @ac_ct_F77@
+ac_ct_RANLIB = @ac_ct_RANLIB@
+ac_ct_STRIP = @ac_ct_STRIP@
+am__fastdepCC_FALSE = @am__fastdepCC_FALSE@
+am__fastdepCC_TRUE = @am__fastdepCC_TRUE@
+am__fastdepCXX_FALSE = @am__fastdepCXX_FALSE@
+am__fastdepCXX_TRUE = @am__fastdepCXX_TRUE@
+am__include = @am__include@
+am__leading_dot = @am__leading_dot@
+am__quote = @am__quote@
+bindir = @bindir@
+build = @build@
+build_alias = @build_alias@
+build_cpu = @build_cpu@
+build_os = @build_os@
+build_vendor = @build_vendor@
+datadir = @datadir@
+exec_prefix = @exec_prefix@
+host = @host@
+host_alias = @host_alias@
+host_cpu = @host_cpu@
+host_os = @host_os@
+host_vendor = @host_vendor@
+includedir = @includedir@
+infodir = @infodir@
+install_sh = @install_sh@
+libdir = @libdir@
+libexecdir = @libexecdir@
+localstatedir = @localstatedir@
+mandir = @mandir@
+oldincludedir = @oldincludedir@
+prefix = @prefix@
+program_transform_name = @program_transform_name@
+sbindir = @sbindir@
+sharedstatedir = @sharedstatedir@
+sysconfdir = @sysconfdir@
+target_alias = @target_alias@
 
-SHELL = /bin/sh
+SUBDIRS = hdf mfhdf man
+subdir = .
+ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
+mkinstalldirs = $(SHELL) $(top_srcdir)/bin/mkinstalldirs
+CONFIG_HEADER = $(top_builddir)/hdf/src/h4config.h
+CONFIG_CLEAN_FILES =
+DIST_SOURCES =
 
-INSTALL = ${TOP_SRCDIR}/install-sh -c
-INSTALL_PROGRAM = $(INSTALL)
-INSTALL_DATA = $(INSTALL) -m 644
+RECURSIVE_TARGETS = info-recursive dvi-recursive pdf-recursive \
+	ps-recursive install-info-recursive uninstall-info-recursive \
+	all-recursive install-data-recursive install-exec-recursive \
+	installdirs-recursive install-recursive uninstall-recursive \
+	check-recursive installcheck-recursive
+DIST_COMMON = README $(srcdir)/Makefile.in $(srcdir)/configure COPYING \
+	INSTALL Makefile.am aclocal.m4 bin/compile bin/config.guess \
+	bin/config.sub bin/depcomp bin/install-sh bin/missing \
+	bin/mkinstalldirs configure configure.ac
+DIST_SUBDIRS = $(SUBDIRS)
+all: all-recursive
 
-# /usr/local/bin/m4 (GNU version?)
-M4   = /usr/local/bin/m4
-# /usr/local/bin/perl (GNU version?)
-PERL = /usr/local/bin/perl
+.SUFFIXES:
 
-# Name of achive randomizer, usually ranlib (use 'true' if non-existant)
-RANLIB = ranlib
+am__CONFIG_DISTCLEAN_FILES = config.status config.cache config.log \
+ configure.lineno
+$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ Makefile.am  $(top_srcdir)/configure.ac $(ACLOCAL_M4)
+	cd $(top_srcdir) && \
+	  $(AUTOMAKE) --foreign  Makefile
+Makefile: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.in  $(top_builddir)/config.status
+	cd $(top_builddir) && $(SHELL) ./config.status $@ $(am__depfiles_maybe)
 
-# Name of library archiver and flags to send, default 'AR=ar', 'ARFLAGS=r'
-AR = ar
-ARFLAGS = rc
+$(top_builddir)/config.status: $(srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
+	$(SHELL) ./config.status --recheck
+$(srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(srcdir)/configure.ac $(ACLOCAL_M4) $(CONFIGURE_DEPENDENCIES)
+	cd $(srcdir) && $(AUTOCONF)
 
-# Name of remove utility, default 'RM=/bin/rm', 'RMFLAGS=-f'
-RM = /bin/rm
-RMFLAGS = -f
+$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ configure.ac 
+	cd $(srcdir) && $(ACLOCAL) $(ACLOCAL_AMFLAGS)
+uninstall-info-am:
 
-AS = as
-CC = gcc
-CFLAGS = -ansi -O
-FC = f77
-FFLAGS= -O
+# 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):
+	@set fnord $$MAKEFLAGS; amf=$$2; \
+	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) \
+	   || case "$$amf" in *=*) exit 1;; *k*) fail=yes;; *) exit 1;; esac; \
+	done; \
+	if test "$$dot_seen" = "no"; then \
+	  $(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \
+	fi; test -z "$$fail"
 
-# Set for document generation
-MAKEINFO = makeinfo
-TEXI2DVI = texi2dvi
+mostlyclean-recursive clean-recursive distclean-recursive \
+maintainer-clean-recursive:
+	@set fnord $$MAKEFLAGS; amf=$$2; \
+	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) \
+	   || case "$$amf" in *=*) exit 1;; *k*) fail=yes;; *) exit 1;; esac; \
+	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
 
-# Directory in which to install binaries
-bindir = $(exec_prefix)/bin
+ETAGS = etags
+ETAGSFLAGS =
 
-# Directory in which to install header files.
-includedir = $(prefix)/include
+CTAGS = ctags
+CTAGSFLAGS =
 
-# Directory in which to install library files.
-libdir = $(prefix)/lib
+tags: TAGS
 
-# Directory in which to install documentation info files.
-infodir = $(prefix)/info
+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; } \
+	       END { for (i in files) print i; }'`; \
+	mkid -fID $$unique
 
-#### ----- host and target specific makefile fragments come in here.-------
-### ------------------- end of makefile fragments -------------------------
+TAGS: tags-recursive $(HEADERS) $(SOURCES)  $(TAGS_DEPENDENCIES) \
+		$(TAGS_FILES) $(LISP)
+	tags=; \
+	here=`pwd`; \
+	if (etags --etags-include --version) >/dev/null 2>&1; then \
+	  include_option=--etags-include; \
+	else \
+	  include_option=--include; \
+	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)  $(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; } \
+	       END { for (i in files) print i; }'`; \
+	test -z "$(ETAGS_ARGS)$$tags$$unique" \
+	  || $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
+	     $$tags $$unique
 
-# ############# End of system configuration section. ###############
+ctags: CTAGS
+CTAGS: ctags-recursive $(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; } \
+	       END { for (i in files) print i; }'`; \
+	test -z "$(CTAGS_ARGS)$$tags$$unique" \
+	  || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
+	     $$tags $$unique
 
-PACKAGE	 = HDF
-VERSION  = 4.0
-MANIFEST = $(DISTFILES)
-DISTFILES = INSTALL README \
-	Makefile.in configure configure.in config.guess config.sub \
-	install-sh mkinstalldirs move-if-change \
-	config/mh-aix config/mh-alpha config/mh-convex \
-	config/mh-decstation config/mh-fbsd config/mh-hpux config/mh-irix32 \
-	config/mh-irix4 config/mh-irix5 config/mh-irix6 config/mh-linux \
-	config/mh-solaris config/mh-solarisx86 config/mh-sun config/mh-unicos
+GTAGS:
+	here=`$(am__cd) $(top_builddir) && pwd` \
+	  && cd $(top_srcdir) \
+	  && gtags -i $(GTAGS_ARGS) $$here
 
-HDFDIR    = hdf
-NETCDFDIR = mfhdf
-MANDIR = man
-SUBDIRS= $(HDFDIR) $(NETCDFDIR) $(MANDIR)
-OTHERDIRS= config
+distclean-tags:
+	-rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
+DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
 
-# Location where the HDF include files are located
-HDFINC= `pwd`/hdf/src
+top_distdir = .
+distdir = $(PACKAGE)-$(VERSION)
 
-# Location where the HDF library is located
-HDFLIB= `pwd`/hdf/src
+am__remove_distdir = \
+  { test ! -d $(distdir) \
+    || { find $(distdir) -type d ! -perm -200 -exec chmod u+w {} ';' \
+         && rm -fr $(distdir); }; }
 
-# ==> where is your PABLO include files
-PABLO_HINC= `pwd`/hdf/pablo
+GZIP_ENV = --best
+distuninstallcheck_listfiles = find . -type f -print
+distcleancheck_listfiles = find . -type f -print
 
-# ==> where is your FMPOOL include files
-FMPOOL_INC= `pwd`/hdf/fmpool
+distdir: $(DISTFILES)
+	$(am__remove_distdir)
+	mkdir $(distdir)
+	$(mkinstalldirs) $(distdir)/bin $(distdir)/hdf/util $(distdir)/mfhdf/dumper $(distdir)/mfhdf/hdfimport
+	@srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \
+	topsrcdirstrip=`echo "$(top_srcdir)" | sed 's|.|.|g'`; \
+	list='$(DISTFILES)'; for file in $$list; do \
+	  case $$file in \
+	    $(srcdir)/*) file=`echo "$$file" | sed "s|^$$srcdirstrip/||"`;; \
+	    $(top_srcdir)/*) file=`echo "$$file" | sed "s|^$$topsrcdirstrip/|$(top_builddir)/|"`;; \
+	  esac; \
+	  if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
+	  dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \
+	  if test "$$dir" != "$$file" && test "$$dir" != "."; then \
+	    dir="/$$dir"; \
+	    $(mkinstalldirs) "$(distdir)$$dir"; \
+	  else \
+	    dir=''; \
+	  fi; \
+	  if test -d $$d/$$file; then \
+	    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='$(SUBDIRS)'; for subdir in $$list; do \
+	  if test "$$subdir" = .; then :; else \
+	    test -d $(distdir)/$$subdir \
+	    || mkdir $(distdir)/$$subdir \
+	    || exit 1; \
+	    (cd $$subdir && \
+	      $(MAKE) $(AM_MAKEFLAGS) \
+	        top_distdir="$(top_distdir)" \
+	        distdir=../$(distdir)/$$subdir \
+	        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 $(SHELL) $(install_sh) -c -m a+r {} {} \; \
+	|| chmod -R a+r $(distdir)
+dist-gzip: distdir
+	$(AMTAR) chof - $(distdir) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).tar.gz
+	$(am__remove_distdir)
 
-#
-# Flags to recursively send to make to overide ones inserted by Configure
-#
+dist dist-all: distdir
+	$(AMTAR) chof - $(distdir) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).tar.gz
+	$(am__remove_distdir)
 
-HDF_FLAGS       = \
-        CC="$(CC)" \
-        CFLAGS="$(CFLAGS)" \
-        ACDEFS="$(ACDEFS)" \
-        FC="$(FC)" \
-        FFLAGS="$(FFLAGS)" \
-        RANLIB="$(RANLIB)" \
-        AR="$(AR)" \
-        ARFLAGS="$(ARFLAGS)" \
-        RM="$(RM)" \
-        RMFLAGS="$(RMFLAGS)" \
-        FMPOOL_FLAGS="$(FMPOOL_FLAGS)" \
-        PABLO_FLAGS="$(PABLO_FLAGS)" \
-        PABLO_INCLUDE="$(PABLO_INCLUDE)" \
-        MACHINE="$(MACHINE)" \
-        HDFINC="$(HDFINC)" \
-        HDFLIB="$(HDFLIB)" 
+# 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
+	$(am__remove_distdir)
+	GZIP=$(GZIP_ENV) gunzip -c $(distdir).tar.gz | $(AMTAR) xf -
+	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 ../.. && $(mkinstalldirs) "$$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-gzip \
+	  && rm -f $(distdir).tar.gz \
+	  && $(MAKE) $(AM_MAKEFLAGS) distcleancheck
+	$(am__remove_distdir)
+	@echo "$(distdir).tar.gz is ready for distribution" | \
+	  sed 'h;s/./=/g;p;x;p;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
+installdirs: installdirs-recursive
+installdirs-am:
 
+install: install-recursive
+install-exec: install-exec-recursive
+install-data: install-data-recursive
+uninstall: uninstall-recursive
 
-NETCDF_FLAGS       = \
-        CC="$(CC)" \
-        CFLAGS="$(CFLAGS)" \
-        ACDEFS="$(ACDEFS)" \
-        FC="$(FC)" \
-        FFLAGS="$(FFLAGS)" \
-        RANLIB="$(RANLIB)" \
-        AR="$(AR)" \
-        ARFLAGS="$(ARFLAGS)" \
-        RM="$(RM)" \
-        RMFLAGS="$(RMFLAGS)" \
-        FMPOOL_FLAGS="$(FMPOOL_FLAGS)" \
-        MACHINE="$(MACHINE)" \
-        HDFINC="$(HDFINC)" \
-        HDFLIB="$(HDFLIB)" 
+install-am: all-am
+	@$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
 
-LOCAL_MACROS  = CC="$(CC)" \
-	CFLAGS="$(CFLAGS)" \
-	CPP="$(CPP)" \
-	CPPFLAGS="$(CPPFLAGS)" \
-	exec_prefix="$(exec_prefix)" \
-	FC="$(FC)" \
-	FFLAGS="$(FFLAGS)" \
-	prefix="$(prefix)"
+installcheck: installcheck-recursive
+install-strip:
+	$(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
+	  INSTALL_STRIP_FLAG=-s \
+	  `test -z '$(STRIP)' || \
+	    echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
+mostlyclean-generic:
 
-#
-#General rules
-#
+clean-generic:
 
-all:	
-	@$(MAKE) $(MFLAGS) $(HDF_FLAGS) TARG=$@ \
-          SUBDIRS="$(HDFDIR)" subd
-	@$(MAKE) $(MFLAGS) $(NETCDF_FLAGS) TARG=$@ \
-          SUBDIRS="$(NETCDFDIR)" subdn
+distclean-generic:
+	-rm -f $(CONFIG_CLEAN_FILES)
 
-HDF:
-	@$(MAKE) $(MFLAGS) $(HDF_FLAGS) TARG="all" \
-          SUBDIRS="$(HDFDIR)" subd
+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
 
-NETCDF:
-	@$(MAKE) $(MFLAGS) $(NETCDF_FLAGS) TARG="all" \
-          SUBDIRS="$(NETCDFDIR)" subdn
+clean-am: clean-generic mostlyclean-am
 
-test:
-	@$(MAKE) $(MFLAGS) $(HDF_FLAGS) TARG="test-hdf" \
-          SUBDIRS="$(HDFDIR)" subd
-	@$(MAKE) $(MFLAGS) $(HDF_FLAGS) TARG=test-utils \
-          SUBDIRS="$(HDFDIR)" subd
-	@$(MAKE) $(MFLAGS) $(NETCDF_FLAGS) TARG=$@ \
-          SUBDIRS="$(NETCDFDIR)" subdn
+distclean: distclean-recursive
+	-rm -f $(am__CONFIG_DISTCLEAN_FILES)
 
-allnofortran:
-	@$(MAKE) $(MFLAGS) $(HDF_FLAGS) TARG=allnofortran \
-          SUBDIRS="$(HDFDIR)" subd
-	@$(MAKE) $(MFLAGS) $(NETCDF_FLAGS) FC=NONE TARG=all \
-          SUBDIRS="$(NETCDFDIR)" subdn
+	-rm -f Makefile
+distclean-am: clean-am distclean-generic distclean-tags
 
-testnofortran:
-	@$(MAKE) $(MFLAGS) $(HDF_FLAGS) TARG=test-hdfnofortran \
-          SUBDIRS="$(HDFDIR)" subd
-	@$(MAKE) $(MFLAGS) $(NETCDF_FLAGS) FC=NONE TARG=test \
-          SUBDIRS="$(NETCDFDIR)" subdn
+dvi: dvi-recursive
 
-test-hdf:
-	@$(MAKE) $(MFLAGS) $(HDF_FLAGS) TARG=$@ \
-          SUBDIRS="$(HDFDIR)" subd
-	@$(MAKE) $(MFLAGS) $(HDF_FLAGS) TARG=test-utils \
-          SUBDIRS="$(HDFDIR)" subd
+dvi-am:
 
-test-hdf-libs:
-	@$(MAKE) $(MFLAGS) $(HDF_FLAGS) TARG=$@ \
-          SUBDIRS="$(HDFDIR)" subd
+info: info-recursive
 
-test-hdf-utils:
-	@$(MAKE) $(MFLAGS) $(HDF_FLAGS) TARG=test-utils \
-          SUBDIRS="$(HDFDIR)" subd
+info-am:
 
-test-mfhdf:
-	@$(MAKE) $(MFLAGS) $(NETCDF_FLAGS) TARG=test \
-          SUBDIRS="$(NETCDFDIR)" subd
+install-data-am:
 
-hdf-test:
-	@$(MAKE) $(MFLAGS) $(HDF_FLAGS) TARG=$@ \
-          SUBDIRS="$(HDFDIR)" subd
+install-exec-am:
 
-mfhdf-test:
-	@$(MAKE) $(MFLAGS) $(NETCDF_FLAGS) TARG=$@ \
-          SUBDIRS="$(NETCDFDIR)" subd
+install-info: install-info-recursive
 
-hdf-allnofortran: 
-	@$(MAKE) $(MFLAGS) $(HDF_FLAGS) TARG="allnofortran" \
-          SUBDIRS="$(HDFDIR)" subd
-
-hdf-libnofortran: 
-	@$(MAKE) $(MFLAGS) $(HDF_FLAGS) TARG="libnofortran" \
-          SUBDIRS="$(HDFDIR)" subd
-
-test-hdfnofortran: 
-	@$(MAKE) $(MFLAGS) $(HDF_FLAGS) TARG="test-hdfnofortran" \
-          SUBDIRS="$(HDFDIR)" subd
-
-hdf-testnofortran:
-	@$(MAKE) $(MFLAGS) $(HDF_FLAGS) TARG="testnofortran" \
-          SUBDIRS="$(HDFDIR)" subd
-
-hdf-libnostub: 
-	@$(MAKE) $(MFLAGS) $(HDF_FLAGS) TARG="libnostub" \
-          SUBDIRS="$(HDFDIR)" subd
-
-hdf-allnostub: 
-	@$(MAKE) $(MFLAGS) $(HDF_FLAGS) TARG="allnostub" \
-          SUBDIRS="$(HDFDIR)" subd
-
-hdf-utilities: 
-	@$(MAKE) $(MFLAGS) $(HDF_FLAGS) TARG="utilities" \
-          SUBDIRS="$(HDFDIR)" subd
-
-hdf-debug: 
-	@$(MAKE) $(MFLAGS) $(HDF_FLAGS) TARG="debug" \
-          SUBDIRS="$(HDFDIR)" subd
-
-libs: 
-	@$(MAKE) $(MFLAGS) $(HDF_FLAGS) TARG=$@ \
-          SUBDIRS="$(HDFDIR)" subd
-	@$(MAKE) $(MFLAGS) $(NETCDF_FLAGS) TARG="libmfhdf" \
-          SUBDIRS="$(NETCDFDIR)" subdn
-
-hdf-libs: 
-	@$(MAKE) $(MFLAGS) $(HDF_FLAGS) TARG="libs" \
-          SUBDIRS="$(HDFDIR)" subd
-
-libdf: 
-	@$(MAKE) $(MFLAGS) $(HDF_FLAGS) TARG=$@ \
-          SUBDIRS="$(HDFDIR)" subd
-
-libjpeg: 
-	@$(MAKE) $(MFLAGS) $(HDF_FLAGS) TARG=$@ \
-          SUBDIRS="$(HDFDIR)" subd
-
-libz: 
-	@$(MAKE) $(MFLAGS) $(HDF_FLAGS) TARG=$@ \
-          SUBDIRS="$(HDFDIR)" subd
-
-libmfhdf:
-	@$(MAKE) $(MFLAGS) $(NETCDF_FLAGS) TARG=$@ \
-          SUBDIRS="$(NETCDFDIR)" subdn
-
-install:	
-	@$(MAKE) $(MFLAGS) $(HDF_FLAGS) TARG=$@ \
-          SUBDIRS="$(HDFDIR)" subd
-	@$(MAKE) $(MFLAGS) $(HDF_FLAGS) TARG=install \
-          SUBDIRS="$(MANDIR)" subd
-	@$(MAKE) $(MFLAGS) $(NETCDF_FLAGS) TARG=install \
-          SUBDIRS="$(NETCDFDIR)" subd
-
-install-libs:	
-	@$(MAKE) $(MFLAGS) $(HDF_FLAGS) TARG=$@ \
-          SUBDIRS="$(HDFDIR)" subd
-	@$(MAKE) $(MFLAGS) $(NETCDF_FLAGS) TARG=$@ \
-          SUBDIRS="$(NETCDFDIR)" subd
-
-install-includes:	
-	@$(MAKE) $(MFLAGS) $(HDF_FLAGS) TARG=$@ \
-          SUBDIRS="$(HDFDIR)" subd
-	@$(MAKE) $(MFLAGS) $(NETCDF_FLAGS) TARG=$@ \
-          SUBDIRS="$(NETCDFDIR)" subd
-
-install-utils:	
-	@$(MAKE) $(MFLAGS) $(HDF_FLAGS) TARG=$@ \
-          SUBDIRS="$(HDFDIR)" subd
-	@$(MAKE) $(MFLAGS) $(NETCDF_FLAGS) TARG=$@ \
-          SUBDIRS="$(NETCDFDIR)" subd
-
-install-hdf:	
-	@$(MAKE) $(MFLAGS) $(HDF_FLAGS) TARG=install \
-          SUBDIRS="$(HDFDIR)" subd
-
-install-hdf-libs:	
-	@$(MAKE) $(MFLAGS) $(HDF_FLAGS) TARG=install-libs \
-          SUBDIRS="$(HDFDIR)" subd
-
-install-hdf-utils:	
-	@$(MAKE) $(MFLAGS) $(HDF_FLAGS) TARG=install-utils \
-          SUBDIRS="$(HDFDIR)" subd
-
-install-mfhdf:	
-	@$(MAKE) $(MFLAGS) $(NETCDF_FLAGS) TARG=install \
-          SUBDIRS="$(NETCDFDIR)" subd
-
-install-mfhdf-libs:	
-	@$(MAKE) $(MFLAGS) $(NETCDF_FLAGS) TARG=install-libs \
-          SUBDIRS="$(NETCDFDIR)" subd
-
-install-mfhdf-utils:	
-	@$(MAKE) $(MFLAGS) $(NETCDF_FLAGS) TARG=install-utils \
-          SUBDIRS="$(NETCDFDIR)" subd
-
 install-man:
-	@$(MAKE) $(MFLAGS) $(HDF_FLAGS) TARG=install \
-          SUBDIRS="$(MANDIR)" subd
-	@$(MAKE) $(MFLAGS) $(NETCDF_FLAGS) TARG=$@ \
-          SUBDIRS="$(NETCDFDIR)" subd
 
-install-hdf-man:
-	@$(MAKE) $(MFLAGS) $(HDF_FLAGS) TARG=install \
-          SUBDIRS="$(MANDIR)" subd
+installcheck-am:
 
-install-mfhdf-man:
-	@$(MAKE) $(MFLAGS) $(NETCDF_FLAGS) TARG=$@ \
-          SUBDIRS="$(NETCDFDIR)" subd
-hdfclean:		
-	@$(MAKE) $(MFLAGS) $(HDF_FLAGS) TARG="clean" \
-          SUBDIRS="$(HDFDIR)" subd
+maintainer-clean: maintainer-clean-recursive
+	-rm -f $(am__CONFIG_DISTCLEAN_FILES)
+	-rm -rf $(top_srcdir)/autom4te.cache
 
-mfhdfclean:		
-	@$(MAKE) $(MFLAGS) $(NETCDF_FLAGS) TARG="clean" \
-          SUBDIRS="$(NETCDFDIR)" subd
+	-rm -f Makefile
+maintainer-clean-am: distclean-am maintainer-clean-generic
 
-clean:		
-	@$(MAKE) $(MFLAGS) $(HDF_FLAGS) TARG=$@ \
-          SUBDIRS="$(HDFDIR)" subd
-	@$(MAKE) $(MFLAGS) $(HDF_FLAGS) TARG=$@ \
-          SUBDIRS="$(MANDIR)" subd
-	@$(MAKE) $(MFLAGS) $(NETCDF_FLAGS) TARG=$@ \
-          SUBDIRS="$(NETCDFDIR)" subdn
+mostlyclean: mostlyclean-recursive
 
-hdfdistclean:		
-	@$(MAKE) $(MFLAGS) $(HDF_FLAGS) TARG="distclean" \
-          SUBDIRS="$(HDFDIR)" subd
+mostlyclean-am: mostlyclean-generic
 
-mfhdfdistclean:		
-	@$(MAKE) $(MFLAGS) $(NETCDF_FLAGS) TARG="distclean" \
-          SUBDIRS="$(NETCDFDIR)" subd
+pdf: pdf-recursive
 
-distclean:	
-	@$(MAKE) $(MFLAGS) $(HDF_FLAGS) TARG=$@ \
-          SUBDIRS="$(HDFDIR)" subd
-	@$(MAKE) $(MFLAGS) $(HDF_FLAGS) TARG=$@ \
-          SUBDIRS="$(MANDIR)" subd
-	@$(MAKE) $(MFLAGS) $(NETCDF_FLAGS) TARG=$@ \
-          SUBDIRS="$(NETCDFDIR)" subdn
-	-$(RM) $(RMFLAGS) config.status Makefile
+pdf-am:
 
-help:
-	@echo ""
-	@echo "Make supports the following targets"
-	@echo "   (Use FC=NONE to exclude fortran support.)"
-	@echo "   (E.g., make FC=NONE all )"
-	@echo "make help    - prints this usage section"
-	@echo "make all     - (DEFAULT) makes both HDF and netCDF packages"
-	@echo "make HDF     - makes HDF library,utilities, and tests"
-	@echo "make NETCDF  - makes NETCDF package"
-	@echo "make hdf-test          - makes HDF library and tests" 
-	@echo "make hdf-utilities     - makes HDF library and utilities"
-	@echo "make libs              - makes HDF, IJG JPEG and mfhdf libraries only"
-	@echo "make hdf-libs          - makes HDF and IJG JPEG libraries only"
-	@echo "make libdf             - makes HDF library"
-	@echo "make libjpeg           - makes IJG JPEG library"
-	@echo "make libz              - makes GZIP deflate library"
-	@echo "make libmfhdf          - makes mfhdf library"
-	@echo "make test              - run both HDF and NETCDF tests"
-	@echo "make test-mfhdf        - run NETCDF tests" 
-	@echo "make test-hdf          - run HDF library and utilities tests" 
-	@echo "make test-hdf-libs     - run HDF library tests" 
-	@echo "make test-hdf-utils    - run HDF utilities test" 
-	@echo "make install           - install HDF,netCDF libraries,"
-	@echo "                         utilites, and includes" 
-	@echo "make install-libs      - install HDF,netCDF libraries and includes"
-	@echo "make install-includes  - install HDF,netCDF includes"
-	@echo "make install-utils     - install HDF,netCDF utilities"
-	@echo "make install-man       - install HDF and netCDF man pages"
-	@echo "make install-hdf       - install HDF library, utilities and includes"
-	@echo "make install-hdf-libs  - install HDF library and includes"
-	@echo "make install-hdf-utils - install utilities"
-	@echo "make install-hdf-man   - install HDF man pages"
-	@echo "make install-mfhdf     - install netCDF library, utilities and includes"
-	@echo "make install-mfhdf-libs - install netCDF library and includes"
-	@echo "make install-mfhdf-utils - install netCDF utilities"
-	@echo "make install-mfhdf-man   - install netCDF man pages"
-	@echo "make clean        - cleans up HDF and NETCDF packages(*.o,libdf.a,..)"
-	@echo "make distclean    - cleans up HDF and NETCDF packages including"
-	@echo "                    configuration(Makefiles,config.status,..)"
-	@echo "make hdfclean     - cleans up HDF package(*.o,libdf.a,..et)"
-	@echo "make hdfdistclean - cleans up HDF package including"
-	@echo "                    configuration(Makefiles,config.status,..)"
-	@echo "make mfhdfclean   - cleans up NETCDF package(*.o,libmfhdf.a,..et)"
-	@echo "make mfhdfdistclean - cleans up NETCDF package including"
-	@echo "                       configuration(Makefiles,config.status,..)"
+ps: ps-recursive
 
-# target for recursive directory make
-subd:
-	@for dir in $(SUBDIRS); do \
-          (cd $$dir; echo Making \`$(TARG)\' in `pwd`; \
-              $(MAKE) $(MFLAGS) $(HDF_FLAGS) $(TARG)); \
-	done
+ps-am:
 
-subdn:
-	@for dir in $(SUBDIRS); do \
-          (cd $$dir; echo Making \`$(TARG)\' in `pwd`; \
-              $(MAKE) $(MFLAGS) $(NETCDF_FLAGS) $(TARG)); \
-	done
+uninstall-am: uninstall-info-am
 
-# For making distribution
-distdir = $(TOP_SRCDIR)/$(PACKAGE)-$(VERSION)
-dist: $(DISTFILES)
-	rm -rf $(distdir)
-	mkdir $(distdir)
-	chmod 777 $(distdir)
-	for subdir in $(OTHERDIRS); do \
-	  mkdir $(distdir)/$$subdir || exit 1; \
-	done
-	@for file in $(DISTFILES); do \
-	  ln $(srcdir)/$$file $(distdir)/$$file 2> /dev/null \
-	    || { echo copying $$file instead; \
-	    cp -p $(srcdir)/$$file $(distdir);}; \
-	done
-	for subdir in $(SUBDIRS); do \
-	  echo making $@ in $$subdir; \
-	  mkdir $(distdir)/$$subdir || exit 1; \
-	  (cd $$subdir && $(MAKE) $@) || exit 1; \
-	done
-	chmod -R a+r $(distdir)
-	tar chof $(distdir).tar $(distdir)
-	compress $(distdir).tar
-	rm -rf $(distdir)
+uninstall-info: uninstall-info-recursive
 
-ftp:	$(FTPDIR)/$(PACKAGE)-$(VERSION).tar.Z
-	test ! -h $(FTPDIR)/$(PACKAGE).tar.Z && exit 0; \
-	cd $(FTPDIR) || exit 1; \
-	rm $(PACKAGE).tar.Z || exit 1; \
-	ln -s $(PACKAGE)-$(VERSION).tar.Z $(PACKAGE).tar.Z;
+.PHONY: $(RECURSIVE_TARGETS) CTAGS GTAGS all all-am check check-am clean \
+	clean-generic clean-recursive ctags ctags-recursive dist \
+	dist-all dist-gzip distcheck distclean distclean-generic \
+	distclean-recursive distclean-tags distcleancheck distdir \
+	distuninstallcheck dvi dvi-am dvi-recursive info info-am \
+	info-recursive install install-am install-data install-data-am \
+	install-data-recursive install-exec install-exec-am \
+	install-exec-recursive install-info install-info-am \
+	install-info-recursive install-man install-recursive \
+	install-strip installcheck installcheck-am installdirs \
+	installdirs-am installdirs-recursive maintainer-clean \
+	maintainer-clean-generic maintainer-clean-recursive mostlyclean \
+	mostlyclean-generic mostlyclean-recursive pdf pdf-am \
+	pdf-recursive ps ps-am ps-recursive tags tags-recursive \
+	uninstall uninstall-am uninstall-info-am \
+	uninstall-info-recursive uninstall-recursive
 
-$(FTPDIR)/$(PACKAGE)-$(VERSION).tar.Z:	$(PACKAGE)-$(VERSION).tar.Z
-	cp $(PACKAGE)-$(VERSION).tar.Z $@ 
-	chmod u+rw,g+rw,o=r $@
-
-tar.Z:	$(PACKAGE)-$(VERSION).tar.Z
-
-$(PACKAGE)-$(VERSION).tar.Z:	MANIFEST
-	dir=`basename \`pwd\`` \
-	&& id=$(PACKAGE)-$(VERSION) \
-	&& cd .. \
-	&& ln -s $$dir $$id \
-	&& tar -chof - `sed "s|^|$$id/|" $$id/MANIFEST` \
-	    | compress > $$id/$@ \
-	&& rm $$id
-
-MANIFEST:	FORCE_IT
-	@echo 1>&2 Creating MANIFEST
-	@$(MAKE) -s $(MFLAGS) $(LOCAL_MACROS) MANIFEST.echo > $@
-
-MANIFEST.echo:	FORCE_IT
-	@$(MAKE) -s $(MFLAGS) $(LOCAL_MACROS) \
-	    MANIFEST=`echo $(MANIFEST) | sed 's/MANIFEST//'` \
-	    ensure_manifest > /dev/null
-	@echo $(MANIFEST) | fmt -1
-	@if [ -n "$(SUBDIRS)" ]; then \
-	    subdirs="$(SUBDIRS)"; \
-	    for subdir in $$subdirs; do \
-		(cd $$subdir && \
-	        echo 1>&2 Creating $@ in `pwd` && \
-		$(MAKE) $(MFLAGS) $(LOCAL_MACROS) MANIFEST.echo | \
-		    sed "s|^|$$subdir/|") || exit 1; \
-	    done; \
-	else \
-	    :; \
-	fi
-
-ensure_manifest:	$(MANIFEST)
-
-# For the justification of the following Makefile rules, see node
-# `Automatic Remaking' in GNU Autoconf documentation.
-#
-#Makefile: $(TOP_SRCDIR)/config.status Makefile.in
-#	CONFIG_FILES=$@ CONFIG_HEADERS= $(TOP_SRCDIR)/config.status
-
-#config.h: stamp-h
-
-#stamp-h: $(TOP_SRCDIR)/config.status $(srcdir)/config.h.in
-#	CONFIG_FILES= CONFIG_HEADERS=config.h $(TOP_SRCDIR)/config.status
-
-#config.status: configure
-#	$(TOP_SRCDIR)/config.status --recheck
-
-#configure: configure.in
-#	cd $(srcdir) && autoconf
-
-#config.h.in: stamp-h.in
-
-#stamp-h.in: configure.in
-#	cd $(srcdir) && autoheader
-# Use echo instead of date to avoid spurious conflicts for
-# people who use CVS, since stamp-h.in is distributed.
-#	echo > $(srcdir)/$@
-
-# Tell versions [3.59,3.63) of GNU make not to export all variables.
+# 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:
-
-# dummy target as a dependency for forcing a rule to be always executed
-FORCE_IT:

Modified: packages/libhdf4/branches/upstream/current/README
===================================================================
--- packages/libhdf4/branches/upstream/current/README	2007-05-15 09:05:29 UTC (rev 830)
+++ packages/libhdf4/branches/upstream/current/README	2007-05-15 09:53:05 UTC (rev 831)
@@ -1,4 +1,4 @@
-               README for HDF 4.1r4 Version
+               README for HDF 4.1r5 Version
                ----------------------------
 
 Obtaining the latest version
@@ -17,7 +17,7 @@
    hdf    -- contains the source code for the HDF 'base library', the 
              the multi_file annotation interface, the multi_file raster
              image interface, HDF command line utilities (hdp, the hdf 
-             dumper is in mfhdf/), Pablo instrumentation support, 
+             dumper is in mfhdf/), 
              and a test suite. It also contains the software
              distributions for IJPEG(hdf/jpeg) and ZLIB(hdf/zlib) 
              which are required by the HDF library. 
@@ -43,10 +43,6 @@
 
  2. ZLIB 1.1.3(libz.a) distribution.  
 
- Both of these distributions are included with this distribution
- in 'hdf/jpeg' and 'hdf/zlib'. The HDF/mfhdf base distribution
- in known to work with these versions only.
-
 System Requirements
 -------------------
  To build the HDF library from source, you need:

Modified: packages/libhdf4/branches/upstream/current/Win32.nofortran.zip
===================================================================
(Binary files differ)

Modified: packages/libhdf4/branches/upstream/current/Win32.zip
===================================================================
(Binary files differ)

Added: packages/libhdf4/branches/upstream/current/aclocal.m4
===================================================================
--- packages/libhdf4/branches/upstream/current/aclocal.m4	                        (rev 0)
+++ packages/libhdf4/branches/upstream/current/aclocal.m4	2007-05-15 09:53:05 UTC (rev 831)
@@ -0,0 +1,907 @@
+# generated automatically by aclocal 1.7.7 -*- Autoconf -*-
+
+# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002
+# Free Software Foundation, Inc.
+# This file 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.
+
+# Do all the work for Automake.                            -*- Autoconf -*-
+
+# This macro actually does too much some checks are only needed if
+# your package does certain things.  But this isn't really a big deal.
+
+# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003
+# Free Software Foundation, Inc.
+
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2, or (at your option)
+# any later version.
+
+# 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 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., 59 Temple Place - Suite 330, Boston, MA
+# 02111-1307, USA.
+
+# serial 10
+
+AC_PREREQ([2.54])
+
+# Autoconf 2.50 wants to disallow AM_ names.  We explicitly allow
+# the ones we care about.
+m4_pattern_allow([^AM_[A-Z]+FLAGS$])dnl
+
+# AM_INIT_AUTOMAKE(PACKAGE, VERSION, [NO-DEFINE])
+# AM_INIT_AUTOMAKE([OPTIONS])
+# -----------------------------------------------
+# The call with PACKAGE and VERSION arguments is the old style
+# call (pre autoconf-2.50), which is being phased out.  PACKAGE
+# and VERSION should now be passed to AC_INIT and removed from
+# the call to AM_INIT_AUTOMAKE.
+# We support both call styles for the transition.  After
+# the next Automake release, Autoconf can make the AC_INIT
+# arguments mandatory, and then we can depend on a new Autoconf
+# release and drop the old call support.
+AC_DEFUN([AM_INIT_AUTOMAKE],
+[AC_REQUIRE([AM_SET_CURRENT_AUTOMAKE_VERSION])dnl
+ AC_REQUIRE([AC_PROG_INSTALL])dnl
+# test to see if srcdir already configured
+if test "`cd $srcdir && pwd`" != "`pwd`" &&
+   test -f $srcdir/config.status; then
+  AC_MSG_ERROR([source directory already configured; run "make distclean" there first])
+fi
+
+# test whether we have cygpath
+if test -z "$CYGPATH_W"; then
+  if (cygpath --version) >/dev/null 2>/dev/null; then
+    CYGPATH_W='cygpath -w'
+  else
+    CYGPATH_W=echo
+  fi
+fi
+AC_SUBST([CYGPATH_W])
+
+# Define the identity of the package.
+dnl Distinguish between old-style and new-style calls.
+m4_ifval([$2],
+[m4_ifval([$3], [_AM_SET_OPTION([no-define])])dnl
+ AC_SUBST([PACKAGE], [$1])dnl
+ AC_SUBST([VERSION], [$2])],
+[_AM_SET_OPTIONS([$1])dnl
+ AC_SUBST([PACKAGE], ['AC_PACKAGE_TARNAME'])dnl
+ AC_SUBST([VERSION], ['AC_PACKAGE_VERSION'])])dnl
+
+_AM_IF_OPTION([no-define],,
+[AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE", [Name of package])
+ AC_DEFINE_UNQUOTED(VERSION, "$VERSION", [Version number of package])])dnl
+
+# Some tools Automake needs.
+AC_REQUIRE([AM_SANITY_CHECK])dnl
+AC_REQUIRE([AC_ARG_PROGRAM])dnl
+AM_MISSING_PROG(ACLOCAL, aclocal-${am__api_version})
+AM_MISSING_PROG(AUTOCONF, autoconf)
+AM_MISSING_PROG(AUTOMAKE, automake-${am__api_version})
+AM_MISSING_PROG(AUTOHEADER, autoheader)
+AM_MISSING_PROG(MAKEINFO, makeinfo)
+AM_MISSING_PROG(AMTAR, tar)
+AM_PROG_INSTALL_SH
+AM_PROG_INSTALL_STRIP
+# We need awk for the "check" target.  The system "awk" is bad on
+# some platforms.
+AC_REQUIRE([AC_PROG_AWK])dnl
+AC_REQUIRE([AC_PROG_MAKE_SET])dnl
+AC_REQUIRE([AM_SET_LEADING_DOT])dnl
+
+_AM_IF_OPTION([no-dependencies],,
+[AC_PROVIDE_IFELSE([AC_PROG_CC],
+                  [_AM_DEPENDENCIES(CC)],
+                  [define([AC_PROG_CC],
+                          defn([AC_PROG_CC])[_AM_DEPENDENCIES(CC)])])dnl
+AC_PROVIDE_IFELSE([AC_PROG_CXX],
+                  [_AM_DEPENDENCIES(CXX)],
+                  [define([AC_PROG_CXX],
+                          defn([AC_PROG_CXX])[_AM_DEPENDENCIES(CXX)])])dnl
+])
+])
+
+
+# When config.status generates a header, we must update the stamp-h file.
+# This file resides in the same directory as the config header
+# that is generated.  The stamp files are numbered to have different names.
+
+# Autoconf calls _AC_AM_CONFIG_HEADER_HOOK (when defined) in the
+# loop where config.status creates the headers, so we can generate
+# our stamp files there.
+AC_DEFUN([_AC_AM_CONFIG_HEADER_HOOK],
+[# Compute $1's index in $config_headers.
+_am_stamp_count=1
+for _am_header in $config_headers :; do
+  case $_am_header in
+    $1 | $1:* )
+      break ;;
+    * )
+      _am_stamp_count=`expr $_am_stamp_count + 1` ;;
+  esac
+done
+echo "timestamp for $1" >`AS_DIRNAME([$1])`/stamp-h[]$_am_stamp_count])
+
+# Copyright 2002  Free Software Foundation, Inc.
+
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2, or (at your option)
+# any later version.
+
+# 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 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., 59 Temple Place - Suite 330, Boston, MA
+
+# AM_AUTOMAKE_VERSION(VERSION)
+# ----------------------------
+# Automake X.Y traces this macro to ensure aclocal.m4 has been
+# generated from the m4 files accompanying Automake X.Y.
+AC_DEFUN([AM_AUTOMAKE_VERSION],[am__api_version="1.7"])
+
+# AM_SET_CURRENT_AUTOMAKE_VERSION
+# -------------------------------
+# Call AM_AUTOMAKE_VERSION so it can be traced.
+# This function is AC_REQUIREd by AC_INIT_AUTOMAKE.
+AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION],
+	 [AM_AUTOMAKE_VERSION([1.7.7])])
+
+# Helper functions for option handling.                    -*- Autoconf -*-
+
+# Copyright 2001, 2002  Free Software Foundation, Inc.
+
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2, or (at your option)
+# any later version.
+
+# 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 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., 59 Temple Place - Suite 330, Boston, MA
+# 02111-1307, USA.
+
+# serial 2
+
+# _AM_MANGLE_OPTION(NAME)
+# -----------------------
+AC_DEFUN([_AM_MANGLE_OPTION],
+[[_AM_OPTION_]m4_bpatsubst($1, [[^a-zA-Z0-9_]], [_])])
+
+# _AM_SET_OPTION(NAME)
+# ------------------------------
+# Set option NAME.  Presently that only means defining a flag for this option.
+AC_DEFUN([_AM_SET_OPTION],
+[m4_define(_AM_MANGLE_OPTION([$1]), 1)])
+
+# _AM_SET_OPTIONS(OPTIONS)
+# ----------------------------------
+# OPTIONS is a space-separated list of Automake options.
+AC_DEFUN([_AM_SET_OPTIONS],
+[AC_FOREACH([_AM_Option], [$1], [_AM_SET_OPTION(_AM_Option)])])
+
+# _AM_IF_OPTION(OPTION, IF-SET, [IF-NOT-SET])
+# -------------------------------------------
+# Execute IF-SET if OPTION is set, IF-NOT-SET otherwise.
+AC_DEFUN([_AM_IF_OPTION],
+[m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])])
+
+#
+# Check to make sure that the build environment is sane.
+#
+
+# Copyright 1996, 1997, 2000, 2001 Free Software Foundation, Inc.
+
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2, or (at your option)
+# any later version.
+
+# 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 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., 59 Temple Place - Suite 330, Boston, MA
+# 02111-1307, USA.
+
+# serial 3
+
+# AM_SANITY_CHECK
+# ---------------
+AC_DEFUN([AM_SANITY_CHECK],
+[AC_MSG_CHECKING([whether build environment is sane])
+# Just in case
+sleep 1
+echo timestamp > conftest.file
+# Do `set' in a subshell so we don't clobber the current shell's
+# arguments.  Must try -L first in case configure is actually a
+# symlink; some systems play weird games with the mod time of symlinks
+# (eg FreeBSD returns the mod time of the symlink's containing
+# directory).
+if (
+   set X `ls -Lt $srcdir/configure conftest.file 2> /dev/null`
+   if test "$[*]" = "X"; then
+      # -L didn't work.
+      set X `ls -t $srcdir/configure conftest.file`
+   fi
+   rm -f conftest.file
+   if test "$[*]" != "X $srcdir/configure conftest.file" \
+      && test "$[*]" != "X conftest.file $srcdir/configure"; then
+
+      # If neither matched, then we have a broken ls.  This can happen
+      # if, for instance, CONFIG_SHELL is bash and it inherits a
+      # broken ls alias from the environment.  This has actually
+      # happened.  Such a system could not be considered "sane".
+      AC_MSG_ERROR([ls -t appears to fail.  Make sure there is not a broken
+alias in your environment])
+   fi
+
+   test "$[2]" = conftest.file
+   )
+then
+   # Ok.
+   :
+else
+   AC_MSG_ERROR([newly created file is older than distributed files!
+Check your system clock])
+fi
+AC_MSG_RESULT(yes)])
+
+#  -*- Autoconf -*-
+
+
+# Copyright 1997, 1999, 2000, 2001 Free Software Foundation, Inc.
+
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2, or (at your option)
+# any later version.
+
+# 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 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., 59 Temple Place - Suite 330, Boston, MA
+# 02111-1307, USA.
+
+# serial 3
+
+# AM_MISSING_PROG(NAME, PROGRAM)
+# ------------------------------
+AC_DEFUN([AM_MISSING_PROG],
+[AC_REQUIRE([AM_MISSING_HAS_RUN])
+$1=${$1-"${am_missing_run}$2"}
+AC_SUBST($1)])
+
+
+# AM_MISSING_HAS_RUN
+# ------------------
+# Define MISSING if not defined so far and test if it supports --run.
+# If it does, set am_missing_run to use it, otherwise, to nothing.
+AC_DEFUN([AM_MISSING_HAS_RUN],
+[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
+test x"${MISSING+set}" = xset || MISSING="\${SHELL} $am_aux_dir/missing"
+# Use eval to expand $SHELL
+if eval "$MISSING --run true"; then
+  am_missing_run="$MISSING --run "
+else
+  am_missing_run=
+  AC_MSG_WARN([`missing' script is too old or missing])
+fi
+])
+
+# AM_AUX_DIR_EXPAND
+
+# Copyright 2001 Free Software Foundation, Inc.
+
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2, or (at your option)
+# any later version.
+
+# 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 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., 59 Temple Place - Suite 330, Boston, MA
+# 02111-1307, USA.
+
+# For projects using AC_CONFIG_AUX_DIR([foo]), Autoconf sets
+# $ac_aux_dir to `$srcdir/foo'.  In other projects, it is set to
+# `$srcdir', `$srcdir/..', or `$srcdir/../..'.
+#
+# Of course, Automake must honor this variable whenever it calls a
+# tool from the auxiliary directory.  The problem is that $srcdir (and
+# therefore $ac_aux_dir as well) can be either absolute or relative,
+# depending on how configure is run.  This is pretty annoying, since
+# it makes $ac_aux_dir quite unusable in subdirectories: in the top
+# source directory, any form will work fine, but in subdirectories a
+# relative path needs to be adjusted first.
+#
+# $ac_aux_dir/missing
+#    fails when called from a subdirectory if $ac_aux_dir is relative
+# $top_srcdir/$ac_aux_dir/missing
+#    fails if $ac_aux_dir is absolute,
+#    fails when called from a subdirectory in a VPATH build with
+#          a relative $ac_aux_dir
+#
+# The reason of the latter failure is that $top_srcdir and $ac_aux_dir
+# are both prefixed by $srcdir.  In an in-source build this is usually
+# harmless because $srcdir is `.', but things will broke when you
+# start a VPATH build or use an absolute $srcdir.
+#
+# So we could use something similar to $top_srcdir/$ac_aux_dir/missing,
+# iff we strip the leading $srcdir from $ac_aux_dir.  That would be:
+#   am_aux_dir='\$(top_srcdir)/'`expr "$ac_aux_dir" : "$srcdir//*\(.*\)"`
+# and then we would define $MISSING as
+#   MISSING="\${SHELL} $am_aux_dir/missing"
+# This will work as long as MISSING is not called from configure, because
+# unfortunately $(top_srcdir) has no meaning in configure.
+# However there are other variables, like CC, which are often used in
+# configure, and could therefore not use this "fixed" $ac_aux_dir.
+#
+# Another solution, used here, is to always expand $ac_aux_dir to an
+# absolute PATH.  The drawback is that using absolute paths prevent a
+# configured tree to be moved without reconfiguration.
+
+# Rely on autoconf to set up CDPATH properly.
+AC_PREREQ([2.50])
+
+AC_DEFUN([AM_AUX_DIR_EXPAND], [
+# expand $ac_aux_dir to an absolute path
+am_aux_dir=`cd $ac_aux_dir && pwd`
+])
+
+# AM_PROG_INSTALL_SH
+# ------------------
+# Define $install_sh.
+
+# Copyright 2001 Free Software Foundation, Inc.
+
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2, or (at your option)
+# any later version.
+
+# 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 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., 59 Temple Place - Suite 330, Boston, MA
+# 02111-1307, USA.
+
+AC_DEFUN([AM_PROG_INSTALL_SH],
+[AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
+install_sh=${install_sh-"$am_aux_dir/install-sh"}
+AC_SUBST(install_sh)])
+
+# AM_PROG_INSTALL_STRIP
+
+# Copyright 2001 Free Software Foundation, Inc.
+
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2, or (at your option)
+# any later version.
+
+# 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 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., 59 Temple Place - Suite 330, Boston, MA
+# 02111-1307, USA.
+
+# One issue with vendor `install' (even GNU) is that you can't
+# specify the program used to strip binaries.  This is especially
+# annoying in cross-compiling environments, where the build's strip
+# is unlikely to handle the host's binaries.
+# Fortunately install-sh will honor a STRIPPROG variable, so we
+# always use install-sh in `make install-strip', and initialize
+# STRIPPROG with the value of the STRIP variable (set by the user).
+AC_DEFUN([AM_PROG_INSTALL_STRIP],
+[AC_REQUIRE([AM_PROG_INSTALL_SH])dnl
+# Installed binaries are usually stripped using `strip' when the user
+# run `make install-strip'.  However `strip' might not be the right
+# tool to use in cross-compilation environments, therefore Automake
+# will honor the `STRIP' environment variable to overrule this program.
+dnl Don't test for $cross_compiling = yes, because it might be `maybe'.
+if test "$cross_compiling" != no; then
+  AC_CHECK_TOOL([STRIP], [strip], :)
+fi
+INSTALL_STRIP_PROGRAM="\${SHELL} \$(install_sh) -c -s"
+AC_SUBST([INSTALL_STRIP_PROGRAM])])
+
+#                                                          -*- Autoconf -*-
+# Copyright (C) 2003  Free Software Foundation, Inc.
+
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2, or (at your option)
+# any later version.
+
+# 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 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., 59 Temple Place - Suite 330, Boston, MA
+# 02111-1307, USA.
+
+# serial 1
+
+# Check whether the underlying file-system supports filenames
+# with a leading dot.  For instance MS-DOS doesn't.
+AC_DEFUN([AM_SET_LEADING_DOT],
+[rm -rf .tst 2>/dev/null
+mkdir .tst 2>/dev/null
+if test -d .tst; then
+  am__leading_dot=.
+else
+  am__leading_dot=_
+fi
+rmdir .tst 2>/dev/null
+AC_SUBST([am__leading_dot])])
+
+# serial 5						-*- Autoconf -*-
+
+# Copyright (C) 1999, 2000, 2001, 2002, 2003  Free Software Foundation, Inc.
+
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2, or (at your option)
+# any later version.
+
+# 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 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., 59 Temple Place - Suite 330, Boston, MA
+# 02111-1307, USA.
+
+
+# There are a few dirty hacks below to avoid letting `AC_PROG_CC' be
+# written in clear, in which case automake, when reading aclocal.m4,
+# will think it sees a *use*, and therefore will trigger all it's
+# C support machinery.  Also note that it means that autoscan, seeing
+# CC etc. in the Makefile, will ask for an AC_PROG_CC use...
+
+
+
+# _AM_DEPENDENCIES(NAME)
+# ----------------------
+# See how the compiler implements dependency checking.
+# NAME is "CC", "CXX", "GCJ", or "OBJC".
+# We try a few techniques and use that to set a single cache variable.
+#
+# We don't AC_REQUIRE the corresponding AC_PROG_CC since the latter was
+# modified to invoke _AM_DEPENDENCIES(CC); we would have a circular
+# dependency, and given that the user is not expected to run this macro,
+# just rely on AC_PROG_CC.
+AC_DEFUN([_AM_DEPENDENCIES],
+[AC_REQUIRE([AM_SET_DEPDIR])dnl
+AC_REQUIRE([AM_OUTPUT_DEPENDENCY_COMMANDS])dnl
+AC_REQUIRE([AM_MAKE_INCLUDE])dnl
+AC_REQUIRE([AM_DEP_TRACK])dnl
+
+ifelse([$1], CC,   [depcc="$CC"   am_compiler_list=],
+       [$1], CXX,  [depcc="$CXX"  am_compiler_list=],
+       [$1], OBJC, [depcc="$OBJC" am_compiler_list='gcc3 gcc'],
+       [$1], GCJ,  [depcc="$GCJ"  am_compiler_list='gcc3 gcc'],
+                   [depcc="$$1"   am_compiler_list=])
+
+AC_CACHE_CHECK([dependency style of $depcc],
+               [am_cv_$1_dependencies_compiler_type],
+[if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then
+  # We make a subdir and do the tests there.  Otherwise we can end up
+  # making bogus files that we don't know about and never remove.  For
+  # instance it was reported that on HP-UX the gcc test will end up
+  # making a dummy file named `D' -- because `-MD' means `put the output
+  # in D'.
+  mkdir conftest.dir
+  # Copy depcomp to subdir because otherwise we won't find it if we're
+  # using a relative directory.
+  cp "$am_depcomp" conftest.dir
+  cd conftest.dir
+  # We will build objects and dependencies in a subdirectory because
+  # it helps to detect inapplicable dependency modes.  For instance
+  # both Tru64's cc and ICC support -MD to output dependencies as a
+  # side effect of compilation, but ICC will put the dependencies in
+  # the current directory while Tru64 will put them in the object
+  # directory.
+  mkdir sub
+
+  am_cv_$1_dependencies_compiler_type=none
+  if test "$am_compiler_list" = ""; then
+     am_compiler_list=`sed -n ['s/^#*\([a-zA-Z0-9]*\))$/\1/p'] < ./depcomp`
+  fi
+  for depmode in $am_compiler_list; do
+    # Setup a source with many dependencies, because some compilers
+    # like to wrap large dependency lists on column 80 (with \), and
+    # we should not choose a depcomp mode which is confused by this.
+    #
+    # We need to recreate these files for each test, as the compiler may
+    # overwrite some of them when testing with obscure command lines.
+    # This happens at least with the AIX C compiler.
+    : > sub/conftest.c
+    for i in 1 2 3 4 5 6; do
+      echo '#include "conftst'$i'.h"' >> sub/conftest.c
+      : > sub/conftst$i.h
+    done
+    echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf
+
+    case $depmode in
+    nosideeffect)
+      # after this tag, mechanisms are not by side-effect, so they'll
+      # only be used when explicitly requested
+      if test "x$enable_dependency_tracking" = xyes; then
+	continue
+      else
+	break
+      fi
+      ;;
+    none) break ;;
+    esac
+    # We check with `-c' and `-o' for the sake of the "dashmstdout"
+    # mode.  It turns out that the SunPro C++ compiler does not properly
+    # handle `-M -o', and we need to detect this.
+    if depmode=$depmode \
+       source=sub/conftest.c object=sub/conftest.${OBJEXT-o} \
+       depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \
+       $SHELL ./depcomp $depcc -c -o sub/conftest.${OBJEXT-o} sub/conftest.c \
+         >/dev/null 2>conftest.err &&
+       grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 &&
+       grep sub/conftest.${OBJEXT-o} sub/conftest.Po > /dev/null 2>&1 &&
+       ${MAKE-make} -s -f confmf > /dev/null 2>&1; then
+      # icc doesn't choke on unknown options, it will just issue warnings
+      # (even with -Werror).  So we grep stderr for any message
+      # that says an option was ignored.
+      if grep 'ignoring option' conftest.err >/dev/null 2>&1; then :; else
+        am_cv_$1_dependencies_compiler_type=$depmode
+        break
+      fi
+    fi
+  done
+
+  cd ..
+  rm -rf conftest.dir
+else
+  am_cv_$1_dependencies_compiler_type=none
+fi
+])
+AC_SUBST([$1DEPMODE], [depmode=$am_cv_$1_dependencies_compiler_type])
+AM_CONDITIONAL([am__fastdep$1], [
+  test "x$enable_dependency_tracking" != xno \
+  && test "$am_cv_$1_dependencies_compiler_type" = gcc3])
+])
+
+
+# AM_SET_DEPDIR
+# -------------
+# Choose a directory name for dependency files.
+# This macro is AC_REQUIREd in _AM_DEPENDENCIES
+AC_DEFUN([AM_SET_DEPDIR],
+[AC_REQUIRE([AM_SET_LEADING_DOT])dnl
+AC_SUBST([DEPDIR], ["${am__leading_dot}deps"])dnl
+])
+
+
+# AM_DEP_TRACK
+# ------------
+AC_DEFUN([AM_DEP_TRACK],
+[AC_ARG_ENABLE(dependency-tracking,
+[  --disable-dependency-tracking Speeds up one-time builds
+  --enable-dependency-tracking  Do not reject slow dependency extractors])
+if test "x$enable_dependency_tracking" != xno; then
+  am_depcomp="$ac_aux_dir/depcomp"
+  AMDEPBACKSLASH='\'
+fi
+AM_CONDITIONAL([AMDEP], [test "x$enable_dependency_tracking" != xno])
+AC_SUBST([AMDEPBACKSLASH])
+])
+
+# Generate code to set up dependency tracking.   -*- Autoconf -*-
+
+# Copyright 1999, 2000, 2001, 2002 Free Software Foundation, Inc.
+
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2, or (at your option)
+# any later version.
+
+# 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 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., 59 Temple Place - Suite 330, Boston, MA
+# 02111-1307, USA.
+
+#serial 2
+
+# _AM_OUTPUT_DEPENDENCY_COMMANDS
+# ------------------------------
+AC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS],
+[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.
+  # So let's grep whole file.
+  if grep '^#.*generated by automake' $mf > /dev/null 2>&1; then
+    dirpart=`AS_DIRNAME("$mf")`
+  else
+    continue
+  fi
+  grep '^DEP_FILES *= *[[^ @%:@]]' < "$mf" > /dev/null || continue
+  # Extract the definition of DEP_FILES from the Makefile without
+  # running `make'.
+  DEPDIR=`sed -n -e '/^DEPDIR = / s///p' < "$mf"`
+  test -z "$DEPDIR" && continue
+  # When using ansi2knr, U may be empty or an underscore; expand it
+  U=`sed -n -e '/^U = / s///p' < "$mf"`
+  test -d "$dirpart/$DEPDIR" || mkdir "$dirpart/$DEPDIR"
+  # 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 -e '
+    /^DEP_FILES = .*\\\\$/ {
+      s/^DEP_FILES = //
+      :loop
+	s/\\\\$//
+	p
+	n
+	/\\\\$/ b loop
+      p
+    }
+    /^DEP_FILES = / s/^DEP_FILES = //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_MKDIR_P([$dirpart/$fdir])
+    # echo "creating $dirpart/$file"
+    echo '# dummy' > "$dirpart/$file"
+  done
+done
+])# _AM_OUTPUT_DEPENDENCY_COMMANDS
+
+
+# AM_OUTPUT_DEPENDENCY_COMMANDS
+# -----------------------------
+# This macro should only be invoked once -- use via AC_REQUIRE.
+#
+# This code is only required when automatic dependency tracking
+# is enabled.  FIXME.  This creates each `.P' file that we will
+# need in order to bootstrap the dependency handling code.
+AC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS],
+[AC_CONFIG_COMMANDS([depfiles],
+     [test x"$AMDEP_TRUE" != x"" || _AM_OUTPUT_DEPENDENCY_COMMANDS],
+     [AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"])
+])
+
+# Check to see how 'make' treats includes.	-*- Autoconf -*-
+
+# Copyright (C) 2001, 2002, 2003 Free Software Foundation, Inc.
+
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2, or (at your option)
+# any later version.
+
+# 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 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., 59 Temple Place - Suite 330, Boston, MA
+# 02111-1307, USA.
+
+# serial 2
+
+# AM_MAKE_INCLUDE()
+# -----------------
+# Check to see how make treats includes.
+AC_DEFUN([AM_MAKE_INCLUDE],
+[am_make=${MAKE-make}
+cat > confinc << 'END'
+am__doit:
+	@echo done
+.PHONY: am__doit
+END
+# If we don't find an include directive, just comment out the code.
+AC_MSG_CHECKING([for style of include used by $am_make])
+am__include="#"
+am__quote=
+_am_result=none
+# First try GNU make style include.
+echo "include confinc" > confmf
+# We grep out `Entering directory' and `Leaving directory'
+# messages which can occur if `w' ends up in MAKEFLAGS.
+# In particular we don't look at `^make:' because GNU make might
+# be invoked under some other name (usually "gmake"), in which
+# case it prints its new name instead of `make'.
+if test "`$am_make -s -f confmf 2> /dev/null | grep -v 'ing directory'`" = "done"; then
+   am__include=include
+   am__quote=
+   _am_result=GNU
+fi
+# Now try BSD make style include.
+if test "$am__include" = "#"; then
+   echo '.include "confinc"' > confmf
+   if test "`$am_make -s -f confmf 2> /dev/null`" = "done"; then
+      am__include=.include
+      am__quote="\""
+      _am_result=BSD
+   fi
+fi
+AC_SUBST([am__include])
+AC_SUBST([am__quote])
+AC_MSG_RESULT([$_am_result])
+rm -f confinc confmf
+])
+
+# AM_CONDITIONAL                                              -*- Autoconf -*-
+
+# Copyright 1997, 2000, 2001 Free Software Foundation, Inc.
+
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2, or (at your option)
+# any later version.
+
+# 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 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., 59 Temple Place - Suite 330, Boston, MA
+# 02111-1307, USA.
+
+# serial 5
+
+AC_PREREQ(2.52)
+
+# AM_CONDITIONAL(NAME, SHELL-CONDITION)
+# -------------------------------------
+# Define a conditional.
+AC_DEFUN([AM_CONDITIONAL],
+[ifelse([$1], [TRUE],  [AC_FATAL([$0: invalid condition: $1])],
+        [$1], [FALSE], [AC_FATAL([$0: invalid condition: $1])])dnl
+AC_SUBST([$1_TRUE])
+AC_SUBST([$1_FALSE])
+if $2; then
+  $1_TRUE=
+  $1_FALSE='#'
+else
+  $1_TRUE='#'
+  $1_FALSE=
+fi
+AC_CONFIG_COMMANDS_PRE(
+[if test -z "${$1_TRUE}" && test -z "${$1_FALSE}"; then
+  AC_MSG_ERROR([conditional "$1" was never defined.
+Usually this means the macro was only invoked conditionally.])
+fi])])
+
+# Add --enable-maintainer-mode option to configure.
+# From Jim Meyering
+
+# Copyright 1996, 1998, 2000, 2001, 2002  Free Software Foundation, Inc.
+
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2, or (at your option)
+# any later version.
+
+# 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 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., 59 Temple Place - Suite 330, Boston, MA
+# 02111-1307, USA.
+
+# serial 2
+
+AC_DEFUN([AM_MAINTAINER_MODE],
+[AC_MSG_CHECKING([whether to enable maintainer-specific portions of Makefiles])
+  dnl maintainer-mode is disabled by default
+  AC_ARG_ENABLE(maintainer-mode,
+[  --enable-maintainer-mode enable make rules and dependencies not useful
+                          (and sometimes confusing) to the casual installer],
+      USE_MAINTAINER_MODE=$enableval,
+      USE_MAINTAINER_MODE=no)
+  AC_MSG_RESULT([$USE_MAINTAINER_MODE])
+  AM_CONDITIONAL(MAINTAINER_MODE, [test $USE_MAINTAINER_MODE = yes])
+  MAINT=$MAINTAINER_MODE_TRUE
+  AC_SUBST(MAINT)dnl
+]
+)
+
+AU_DEFUN([jm_MAINTAINER_MODE], [AM_MAINTAINER_MODE])
+
+
+# Copyright 1998, 1999, 2000, 2001, 2002 Free Software Foundation, Inc.
+
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2, or (at your option)
+# any later version.
+
+# 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 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., 59 Temple Place - Suite 330, Boston, MA
+# 02111-1307, USA.
+
+# serial 3
+
+AC_PREREQ(2.50)
+
+# AM_PROG_LEX
+# -----------
+# Autoconf leaves LEX=: if lex or flex can't be found.  Change that to a
+# "missing" invocation, for better error output.
+AC_DEFUN([AM_PROG_LEX],
+[AC_REQUIRE([AM_MISSING_HAS_RUN])dnl
+AC_REQUIRE([AC_PROG_LEX])dnl
+if test "$LEX" = :; then
+  LEX=${am_missing_run}flex
+fi])
+

Added: packages/libhdf4/branches/upstream/current/bin/chkmanifest
===================================================================
--- packages/libhdf4/branches/upstream/current/bin/chkmanifest	                        (rev 0)
+++ packages/libhdf4/branches/upstream/current/bin/chkmanifest	2007-05-15 09:53:05 UTC (rev 831)
@@ -0,0 +1,46 @@
+#!/bin/sh
+
+# Check that all the files in MANIFEST exist and that (if this is a
+# CVS checkout) that all the CVS-managed files appear in the
+# MANIFEST.
+
+verbose=yes
+MANIFEST=/tmp/H4_MANIFEST.$$
+
+# clean up $MANIFEST file when exits
+trap "rm -f $MANIFEST" 0
+
+# Copy the manifest file to get a list of file names.
+grep '^\.' MANIFEST | expand | cut -f1 -d' ' >$MANIFEST
+
+test "$verbose" && echo "   Checking MANIFEST..." 1>&2
+test -f $MANIFEST || exit 1
+for file in `cat $MANIFEST`; do
+    if [ ! -f $file ]; then
+       echo "- $file"
+       fail=yes
+    fi
+done
+for cvs in `find . -type d -name CVS -print`; do
+    path=`echo $cvs |sed 's/\/CVS//'`
+    for file in `grep '^\/' $cvs/Entries |cut -d/ -f2`; do
+	if (grep $path/$file$ $MANIFEST >/dev/null); then
+	    :
+	else
+	    echo "+ $path/$file"
+	    fail=yes
+	fi
+    done
+done
+
+if [ "X$fail" = "Xyes" ]; then
+    cat 1>&2 <<EOF
+The MANIFEST is out of date. Files marked with a minus sign (-) no
+longer exist; files marked with a plus sign (+) are CVS-managed but do
+not appear in the MANIFEST.  Please remedy the situation and try again.
+EOF
+    exit 1
+fi
+
+test "$verbose" && echo "   The MANIFEST is up to date." 1>&2
+exit 0


Property changes on: packages/libhdf4/branches/upstream/current/bin/chkmanifest
___________________________________________________________________
Name: svn:executable
   + *

Added: packages/libhdf4/branches/upstream/current/bin/compile
===================================================================
--- packages/libhdf4/branches/upstream/current/bin/compile	                        (rev 0)
+++ packages/libhdf4/branches/upstream/current/bin/compile	2007-05-15 09:53:05 UTC (rev 831)
@@ -0,0 +1,99 @@
+#! /bin/sh
+
+# Wrapper for compilers which do not understand `-c -o'.
+
+# Copyright 1999, 2000 Free Software Foundation, Inc.
+# Written by Tom Tromey <tromey at cygnus.com>.
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2, or (at your option)
+# any later version.
+#
+# 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 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., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+
+# As a special exception to the GNU General Public License, if you
+# distribute this file as part of a program that contains a
+# configuration script generated by Autoconf, you may include it under
+# the same distribution terms that you use for the rest of that program.
+
+# Usage:
+# compile PROGRAM [ARGS]...
+# `-o FOO.o' is removed from the args passed to the actual compile.
+
+prog=$1
+shift
+
+ofile=
+cfile=
+args=
+while test $# -gt 0; do
+   case "$1" in
+    -o)
+       # configure might choose to run compile as `compile cc -o foo foo.c'.
+       # So we do something ugly here.
+       ofile=$2
+       shift
+       case "$ofile" in
+	*.o | *.obj)
+	   ;;
+	*)
+	   args="$args -o $ofile"
+	   ofile=
+	   ;;
+       esac
+       ;;
+    *.c)
+       cfile=$1
+       args="$args $1"
+       ;;
+    *)
+       args="$args $1"
+       ;;
+   esac
+   shift
+done
+
+if test -z "$ofile" || test -z "$cfile"; then
+   # If no `-o' option was seen then we might have been invoked from a
+   # pattern rule where we don't need one.  That is ok -- this is a
+   # normal compilation that the losing compiler can handle.  If no
+   # `.c' file was seen then we are probably linking.  That is also
+   # ok.
+   exec "$prog" $args
+fi
+
+# Name of file we expect compiler to create.
+cofile=`echo $cfile | sed -e 's|^.*/||' -e 's/\.c$/.o/'`
+
+# Create the lock directory.
+# Note: use `[/.-]' here to ensure that we don't use the same name
+# that we are using for the .o file.  Also, base the name on the expected
+# object file name, since that is what matters with a parallel build.
+lockdir=`echo $cofile | sed -e 's|[/.-]|_|g'`.d
+while true; do
+   if mkdir $lockdir > /dev/null 2>&1; then
+      break
+   fi
+   sleep 1
+done
+# FIXME: race condition here if user kills between mkdir and trap.
+trap "rmdir $lockdir; exit 1" 1 2 15
+
+# Run the compile.
+"$prog" $args
+status=$?
+
+if test -f "$cofile"; then
+   mv "$cofile" "$ofile"
+fi
+
+rmdir $lockdir
+exit $status


Property changes on: packages/libhdf4/branches/upstream/current/bin/compile
___________________________________________________________________
Name: svn:executable
   + *

Added: packages/libhdf4/branches/upstream/current/bin/config.guess
===================================================================
--- packages/libhdf4/branches/upstream/current/bin/config.guess	                        (rev 0)
+++ packages/libhdf4/branches/upstream/current/bin/config.guess	2007-05-15 09:53:05 UTC (rev 831)
@@ -0,0 +1,1411 @@
+#! /bin/sh
+# Attempt to guess a canonical system name.
+#   Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
+#   2000, 2001, 2002, 2003 Free Software Foundation, Inc.
+
+timestamp='2003-06-17'
+
+# This file is free software; you can redistribute it and/or modify it
+# under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2 of the License, or
+# (at your option) any later version.
+#
+# 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 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., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+#
+# As a special exception to the GNU General Public License, if you
+# distribute this file as part of a program that contains a
+# configuration script generated by Autoconf, you may include it under
+# the same distribution terms that you use for the rest of that program.
+
+# Originally written by Per Bothner <per at bothner.com>.
+# Please send patches to <config-patches at gnu.org>.  Submit a context
+# diff and a properly formatted ChangeLog entry.
+#
+# This script attempts to guess a canonical system name similar to
+# config.sub.  If it succeeds, it prints the system name on stdout, and
+# exits with 0.  Otherwise, it exits with 1.
+#
+# The plan is that this can be called by configure scripts if you
+# don't specify an explicit build system type.
+
+me=`echo "$0" | sed -e 's,.*/,,'`
+
+usage="\
+Usage: $0 [OPTION]
+
+Output the configuration name of the system \`$me' is run on.
+
+Operation modes:
+  -h, --help         print this help, then exit
+  -t, --time-stamp   print date of last modification, then exit
+  -v, --version      print version number, then exit
+
+Report bugs and patches to <config-patches at gnu.org>."
+
+version="\
+GNU config.guess ($timestamp)
+
+Originally written by Per Bothner.
+Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001
+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."
+
+help="
+Try \`$me --help' for more information."
+
+# Parse command line
+while test $# -gt 0 ; do
+  case $1 in
+    --time-stamp | --time* | -t )
+       echo "$timestamp" ; exit 0 ;;
+    --version | -v )
+       echo "$version" ; exit 0 ;;
+    --help | --h* | -h )
+       echo "$usage"; exit 0 ;;
+    -- )     # Stop option processing
+       shift; break ;;
+    - )	# Use stdin as input.
+       break ;;
+    -* )
+       echo "$me: invalid option $1$help" >&2
+       exit 1 ;;
+    * )
+       break ;;
+  esac
+done
+
+if test $# != 0; then
+  echo "$me: too many arguments$help" >&2
+  exit 1
+fi
+
+trap 'exit 1' 1 2 15
+
+# CC_FOR_BUILD -- compiler used by this script. Note that the use of a
+# compiler to aid in system detection is discouraged as it requires
+# temporary files to be created and, as you can see below, it is a
+# headache to deal with in a portable fashion.
+
+# Historically, `CC_FOR_BUILD' used to be named `HOST_CC'. We still
+# use `HOST_CC' if defined, but it is deprecated.
+
+# Portable tmp directory creation inspired by the Autoconf team.
+
+set_cc_for_build='
+trap "exitcode=\$?; (rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null) && exit \$exitcode" 0 ;
+trap "rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null; exit 1" 1 2 13 15 ;
+: ${TMPDIR=/tmp} ;
+ { tmp=`(umask 077 && mktemp -d -q "$TMPDIR/cgXXXXXX") 2>/dev/null` && test -n "$tmp" && test -d "$tmp" ; } ||
+ { test -n "$RANDOM" && tmp=$TMPDIR/cg$$-$RANDOM && (umask 077 && mkdir $tmp) ; } ||
+ { tmp=$TMPDIR/cg-$$ && (umask 077 && mkdir $tmp) && echo "Warning: creating insecure temp directory" >&2 ; } ||
+ { echo "$me: cannot create a temporary directory in $TMPDIR" >&2 ; exit 1 ; } ;
+dummy=$tmp/dummy ;
+tmpfiles="$dummy.c $dummy.o $dummy.rel $dummy" ;
+case $CC_FOR_BUILD,$HOST_CC,$CC in
+ ,,)    echo "int x;" > $dummy.c ;
+	for c in cc gcc c89 c99 ; do
+	  if ($c -c -o $dummy.o $dummy.c) >/dev/null 2>&1 ; then
+	     CC_FOR_BUILD="$c"; break ;
+	  fi ;
+	done ;
+	if test x"$CC_FOR_BUILD" = x ; then
+	  CC_FOR_BUILD=no_compiler_found ;
+	fi
+	;;
+ ,,*)   CC_FOR_BUILD=$CC ;;
+ ,*,*)  CC_FOR_BUILD=$HOST_CC ;;
+esac ;'
+
+# This is needed to find uname on a Pyramid OSx when run in the BSD universe.
+# (ghazi at noc.rutgers.edu 1994-08-24)
+if (test -f /.attbin/uname) >/dev/null 2>&1 ; then
+	PATH=$PATH:/.attbin ; export PATH
+fi
+
+UNAME_MACHINE=`(uname -m) 2>/dev/null` || UNAME_MACHINE=unknown
+UNAME_RELEASE=`(uname -r) 2>/dev/null` || UNAME_RELEASE=unknown
+UNAME_SYSTEM=`(uname -s) 2>/dev/null`  || UNAME_SYSTEM=unknown
+UNAME_VERSION=`(uname -v) 2>/dev/null` || UNAME_VERSION=unknown
+
+## for Red Hat Linux
+if test -f /etc/redhat-release ; then
+    VENDOR=redhat ;
+else
+    VENDOR= ;
+fi
+
+# Note: order is significant - the case branches are not exclusive.
+
+case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
+    *:NetBSD:*:*)
+	# NetBSD (nbsd) targets should (where applicable) match one or
+	# more of the tupples: *-*-netbsdelf*, *-*-netbsdaout*,
+	# *-*-netbsdecoff* and *-*-netbsd*.  For targets that recently
+	# switched to ELF, *-*-netbsd* would select the old
+	# object file format.  This provides both forward
+	# compatibility and a consistent mechanism for selecting the
+	# object file format.
+	#
+	# Note: NetBSD doesn't particularly care about the vendor
+	# portion of the name.  We always set it to "unknown".
+	sysctl="sysctl -n hw.machine_arch"
+	UNAME_MACHINE_ARCH=`(/sbin/$sysctl 2>/dev/null || \
+	    /usr/sbin/$sysctl 2>/dev/null || echo unknown)`
+	case "${UNAME_MACHINE_ARCH}" in
+	    armeb) machine=armeb-unknown ;;
+	    arm*) machine=arm-unknown ;;
+	    sh3el) machine=shl-unknown ;;
+	    sh3eb) machine=sh-unknown ;;
+	    *) machine=${UNAME_MACHINE_ARCH}-unknown ;;
+	esac
+	# The Operating System including object format, if it has switched
+	# to ELF recently, or will in the future.
+	case "${UNAME_MACHINE_ARCH}" in
+	    arm*|i386|m68k|ns32k|sh3*|sparc|vax)
+		eval $set_cc_for_build
+		if echo __ELF__ | $CC_FOR_BUILD -E - 2>/dev/null \
+			| grep __ELF__ >/dev/null
+		then
+		    # Once all utilities can be ECOFF (netbsdecoff) or a.out (netbsdaout).
+		    # Return netbsd for either.  FIX?
+		    os=netbsd
+		else
+		    os=netbsdelf
+		fi
+		;;
+	    *)
+	        os=netbsd
+		;;
+	esac
+	# The OS release
+	# Debian GNU/NetBSD machines have a different userland, and
+	# thus, need a distinct triplet. However, they do not need
+	# kernel version information, so it can be replaced with a
+	# suitable tag, in the style of linux-gnu.
+	case "${UNAME_VERSION}" in
+	    Debian*)
+		release='-gnu'
+		;;
+	    *)
+		release=`echo ${UNAME_RELEASE}|sed -e 's/[-_].*/\./'`
+		;;
+	esac
+	# Since CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM:
+	# contains redundant information, the shorter form:
+	# CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM is used.
+	echo "${machine}-${os}${release}"
+	exit 0 ;;
+    amiga:OpenBSD:*:*)
+	echo m68k-unknown-openbsd${UNAME_RELEASE}
+	exit 0 ;;
+    arc:OpenBSD:*:*)
+	echo mipsel-unknown-openbsd${UNAME_RELEASE}
+	exit 0 ;;
+    hp300:OpenBSD:*:*)
+	echo m68k-unknown-openbsd${UNAME_RELEASE}
+	exit 0 ;;
+    mac68k:OpenBSD:*:*)
+	echo m68k-unknown-openbsd${UNAME_RELEASE}
+	exit 0 ;;
+    macppc:OpenBSD:*:*)
+	echo powerpc-unknown-openbsd${UNAME_RELEASE}
+	exit 0 ;;
+    mvme68k:OpenBSD:*:*)
+	echo m68k-unknown-openbsd${UNAME_RELEASE}
+	exit 0 ;;
+    mvme88k:OpenBSD:*:*)
+	echo m88k-unknown-openbsd${UNAME_RELEASE}
+	exit 0 ;;
+    mvmeppc:OpenBSD:*:*)
+	echo powerpc-unknown-openbsd${UNAME_RELEASE}
+	exit 0 ;;
+    pmax:OpenBSD:*:*)
+	echo mipsel-unknown-openbsd${UNAME_RELEASE}
+	exit 0 ;;
+    sgi:OpenBSD:*:*)
+	echo mipseb-unknown-openbsd${UNAME_RELEASE}
+	exit 0 ;;
+    sun3:OpenBSD:*:*)
+	echo m68k-unknown-openbsd${UNAME_RELEASE}
+	exit 0 ;;
+    wgrisc:OpenBSD:*:*)
+	echo mipsel-unknown-openbsd${UNAME_RELEASE}
+	exit 0 ;;
+    *:OpenBSD:*:*)
+	echo ${UNAME_MACHINE}-unknown-openbsd${UNAME_RELEASE}
+	exit 0 ;;
+    alpha:OSF1:*:*)
+	if test $UNAME_RELEASE = "V4.0"; then
+		UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $3}'`
+	fi
+	# According to Compaq, /usr/sbin/psrinfo has been available on
+	# OSF/1 and Tru64 systems produced since 1995.  I hope that
+	# covers most systems running today.  This code pipes the CPU
+	# types through head -n 1, so we only detect the type of CPU 0.
+	ALPHA_CPU_TYPE=`/usr/sbin/psrinfo -v | sed -n -e 's/^  The alpha \(.*\) processor.*$/\1/p' | head -n 1`
+	case "$ALPHA_CPU_TYPE" in
+	    "EV4 (21064)")
+		UNAME_MACHINE="alpha" ;;
+	    "EV4.5 (21064)")
+		UNAME_MACHINE="alpha" ;;
+	    "LCA4 (21066/21068)")
+		UNAME_MACHINE="alpha" ;;
+	    "EV5 (21164)")
+		UNAME_MACHINE="alphaev5" ;;
+	    "EV5.6 (21164A)")
+		UNAME_MACHINE="alphaev56" ;;
+	    "EV5.6 (21164PC)")
+		UNAME_MACHINE="alphapca56" ;;
+	    "EV5.7 (21164PC)")
+		UNAME_MACHINE="alphapca57" ;;
+	    "EV6 (21264)")
+		UNAME_MACHINE="alphaev6" ;;
+	    "EV6.7 (21264A)")
+		UNAME_MACHINE="alphaev67" ;;
+	    "EV6.8CB (21264C)")
+		UNAME_MACHINE="alphaev68" ;;
+	    "EV6.8AL (21264B)")
+		UNAME_MACHINE="alphaev68" ;;
+	    "EV6.8CX (21264D)")
+		UNAME_MACHINE="alphaev68" ;;
+	    "EV6.9A (21264/EV69A)")
+		UNAME_MACHINE="alphaev69" ;;
+	    "EV7 (21364)")
+		UNAME_MACHINE="alphaev7" ;;
+	    "EV7.9 (21364A)")
+		UNAME_MACHINE="alphaev79" ;;
+	esac
+	# A Vn.n version is a released version.
+	# A Tn.n version is a released field test version.
+	# A Xn.n version is an unreleased experimental baselevel.
+	# 1.2 uses "1.2" for uname -r.
+	echo ${UNAME_MACHINE}-dec-osf`echo ${UNAME_RELEASE} | sed -e 's/^[VTX]//' | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
+	exit 0 ;;
+    Alpha*:OpenVMS:*:*)
+	echo alpha-hp-vms
+	exit 0 ;;
+    Alpha\ *:Windows_NT*:*)
+	# How do we know it's Interix rather than the generic POSIX subsystem?
+	# Should we change UNAME_MACHINE based on the output of uname instead
+	# of the specific Alpha model?
+	echo alpha-pc-interix
+	exit 0 ;;
+    21064:Windows_NT:50:3)
+	echo alpha-dec-winnt3.5
+	exit 0 ;;
+    Amiga*:UNIX_System_V:4.0:*)
+	echo m68k-unknown-sysv4
+	exit 0;;
+    *:[Aa]miga[Oo][Ss]:*:*)
+	echo ${UNAME_MACHINE}-unknown-amigaos
+	exit 0 ;;
+    *:[Mm]orph[Oo][Ss]:*:*)
+	echo ${UNAME_MACHINE}-unknown-morphos
+	exit 0 ;;
+    *:OS/390:*:*)
+	echo i370-ibm-openedition
+	exit 0 ;;
+    arm:RISC*:1.[012]*:*|arm:riscix:1.[012]*:*)
+	echo arm-acorn-riscix${UNAME_RELEASE}
+	exit 0;;
+    SR2?01:HI-UX/MPP:*:* | SR8000:HI-UX/MPP:*:*)
+	echo hppa1.1-hitachi-hiuxmpp
+	exit 0;;
+    Pyramid*:OSx*:*:* | MIS*:OSx*:*:* | MIS*:SMP_DC-OSx*:*:*)
+	# akee at wpdis03.wpafb.af.mil (Earle F. Ake) contributed MIS and NILE.
+	if test "`(/bin/universe) 2>/dev/null`" = att ; then
+		echo pyramid-pyramid-sysv3
+	else
+		echo pyramid-pyramid-bsd
+	fi
+	exit 0 ;;
+    NILE*:*:*:dcosx)
+	echo pyramid-pyramid-svr4
+	exit 0 ;;
+    DRS?6000:unix:4.0:6*)
+	echo sparc-icl-nx6
+	exit 0 ;;
+    DRS?6000:UNIX_SV:4.2*:7*)
+	case `/usr/bin/uname -p` in
+	    sparc) echo sparc-icl-nx7 && exit 0 ;;
+	esac ;;
+    sun4H:SunOS:5.*:*)
+	echo sparc-hal-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
+	exit 0 ;;
+    sun4*:SunOS:5.*:* | tadpole*:SunOS:5.*:*)
+	echo sparc-sun-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
+	exit 0 ;;
+    i86pc:SunOS:5.*:*)
+	echo i386-pc-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
+	exit 0 ;;
+    sun4*:SunOS:6*:*)
+	# According to config.sub, this is the proper way to canonicalize
+	# SunOS6.  Hard to guess exactly what SunOS6 will be like, but
+	# it's likely to be more like Solaris than SunOS4.
+	echo sparc-sun-solaris3`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
+	exit 0 ;;
+    sun4*:SunOS:*:*)
+	case "`/usr/bin/arch -k`" in
+	    Series*|S4*)
+		UNAME_RELEASE=`uname -v`
+		;;
+	esac
+	# Japanese Language versions have a version number like `4.1.3-JL'.
+	echo sparc-sun-sunos`echo ${UNAME_RELEASE}|sed -e 's/-/_/'`
+	exit 0 ;;
+    sun3*:SunOS:*:*)
+	echo m68k-sun-sunos${UNAME_RELEASE}
+	exit 0 ;;
+    sun*:*:4.2BSD:*)
+	UNAME_RELEASE=`(sed 1q /etc/motd | awk '{print substr($5,1,3)}') 2>/dev/null`
+	test "x${UNAME_RELEASE}" = "x" && UNAME_RELEASE=3
+	case "`/bin/arch`" in
+	    sun3)
+		echo m68k-sun-sunos${UNAME_RELEASE}
+		;;
+	    sun4)
+		echo sparc-sun-sunos${UNAME_RELEASE}
+		;;
+	esac
+	exit 0 ;;
+    aushp:SunOS:*:*)
+	echo sparc-auspex-sunos${UNAME_RELEASE}
+	exit 0 ;;
+    # The situation for MiNT is a little confusing.  The machine name
+    # can be virtually everything (everything which is not
+    # "atarist" or "atariste" at least should have a processor
+    # > m68000).  The system name ranges from "MiNT" over "FreeMiNT"
+    # to the lowercase version "mint" (or "freemint").  Finally
+    # the system name "TOS" denotes a system which is actually not
+    # MiNT.  But MiNT is downward compatible to TOS, so this should
+    # be no problem.
+    atarist[e]:*MiNT:*:* | atarist[e]:*mint:*:* | atarist[e]:*TOS:*:*)
+        echo m68k-atari-mint${UNAME_RELEASE}
+	exit 0 ;;
+    atari*:*MiNT:*:* | atari*:*mint:*:* | atarist[e]:*TOS:*:*)
+	echo m68k-atari-mint${UNAME_RELEASE}
+        exit 0 ;;
+    *falcon*:*MiNT:*:* | *falcon*:*mint:*:* | *falcon*:*TOS:*:*)
+        echo m68k-atari-mint${UNAME_RELEASE}
+	exit 0 ;;
+    milan*:*MiNT:*:* | milan*:*mint:*:* | *milan*:*TOS:*:*)
+        echo m68k-milan-mint${UNAME_RELEASE}
+        exit 0 ;;
+    hades*:*MiNT:*:* | hades*:*mint:*:* | *hades*:*TOS:*:*)
+        echo m68k-hades-mint${UNAME_RELEASE}
+        exit 0 ;;
+    *:*MiNT:*:* | *:*mint:*:* | *:*TOS:*:*)
+        echo m68k-unknown-mint${UNAME_RELEASE}
+        exit 0 ;;
+    powerpc:machten:*:*)
+	echo powerpc-apple-machten${UNAME_RELEASE}
+	exit 0 ;;
+    RISC*:Mach:*:*)
+	echo mips-dec-mach_bsd4.3
+	exit 0 ;;
+    RISC*:ULTRIX:*:*)
+	echo mips-dec-ultrix${UNAME_RELEASE}
+	exit 0 ;;
+    VAX*:ULTRIX*:*:*)
+	echo vax-dec-ultrix${UNAME_RELEASE}
+	exit 0 ;;
+    2020:CLIX:*:* | 2430:CLIX:*:*)
+	echo clipper-intergraph-clix${UNAME_RELEASE}
+	exit 0 ;;
+    mips:*:*:UMIPS | mips:*:*:RISCos)
+	eval $set_cc_for_build
+	sed 's/^	//' << EOF >$dummy.c
+#ifdef __cplusplus
+#include <stdio.h>  /* for printf() prototype */
+	int main (int argc, char *argv[]) {
+#else
+	int main (argc, argv) int argc; char *argv[]; {
+#endif
+	#if defined (host_mips) && defined (MIPSEB)
+	#if defined (SYSTYPE_SYSV)
+	  printf ("mips-mips-riscos%ssysv\n", argv[1]); exit (0);
+	#endif
+	#if defined (SYSTYPE_SVR4)
+	  printf ("mips-mips-riscos%ssvr4\n", argv[1]); exit (0);
+	#endif
+	#if defined (SYSTYPE_BSD43) || defined(SYSTYPE_BSD)
+	  printf ("mips-mips-riscos%sbsd\n", argv[1]); exit (0);
+	#endif
+	#endif
+	  exit (-1);
+	}
+EOF
+	$CC_FOR_BUILD -o $dummy $dummy.c \
+	  && $dummy `echo "${UNAME_RELEASE}" | sed -n 's/\([0-9]*\).*/\1/p'` \
+	  && exit 0
+	echo mips-mips-riscos${UNAME_RELEASE}
+	exit 0 ;;
+    Motorola:PowerMAX_OS:*:*)
+	echo powerpc-motorola-powermax
+	exit 0 ;;
+    Motorola:*:4.3:PL8-*)
+	echo powerpc-harris-powermax
+	exit 0 ;;
+    Night_Hawk:*:*:PowerMAX_OS | Synergy:PowerMAX_OS:*:*)
+	echo powerpc-harris-powermax
+	exit 0 ;;
+    Night_Hawk:Power_UNIX:*:*)
+	echo powerpc-harris-powerunix
+	exit 0 ;;
+    m88k:CX/UX:7*:*)
+	echo m88k-harris-cxux7
+	exit 0 ;;
+    m88k:*:4*:R4*)
+	echo m88k-motorola-sysv4
+	exit 0 ;;
+    m88k:*:3*:R3*)
+	echo m88k-motorola-sysv3
+	exit 0 ;;
+    AViiON:dgux:*:*)
+        # DG/UX returns AViiON for all architectures
+        UNAME_PROCESSOR=`/usr/bin/uname -p`
+	if [ $UNAME_PROCESSOR = mc88100 ] || [ $UNAME_PROCESSOR = mc88110 ]
+	then
+	    if [ ${TARGET_BINARY_INTERFACE}x = m88kdguxelfx ] || \
+	       [ ${TARGET_BINARY_INTERFACE}x = x ]
+	    then
+		echo m88k-dg-dgux${UNAME_RELEASE}
+	    else
+		echo m88k-dg-dguxbcs${UNAME_RELEASE}
+	    fi
+	else
+	    echo i586-dg-dgux${UNAME_RELEASE}
+	fi
+ 	exit 0 ;;
+    M88*:DolphinOS:*:*)	# DolphinOS (SVR3)
+	echo m88k-dolphin-sysv3
+	exit 0 ;;
+    M88*:*:R3*:*)
+	# Delta 88k system running SVR3
+	echo m88k-motorola-sysv3
+	exit 0 ;;
+    XD88*:*:*:*) # Tektronix XD88 system running UTekV (SVR3)
+	echo m88k-tektronix-sysv3
+	exit 0 ;;
+    Tek43[0-9][0-9]:UTek:*:*) # Tektronix 4300 system running UTek (BSD)
+	echo m68k-tektronix-bsd
+	exit 0 ;;
+    *:IRIX*:*:*)
+	echo mips-sgi-irix`echo ${UNAME_RELEASE}|sed -e 's/-/_/g'`
+	exit 0 ;;
+    ????????:AIX?:[12].1:2)   # AIX 2.2.1 or AIX 2.1.1 is RT/PC AIX.
+	echo romp-ibm-aix      # uname -m gives an 8 hex-code CPU id
+	exit 0 ;;              # Note that: echo "'`uname -s`'" gives 'AIX '
+    i*86:AIX:*:*)
+	echo i386-ibm-aix
+	exit 0 ;;
+    ia64:AIX:*:*)
+	if [ -x /usr/bin/oslevel ] ; then
+		IBM_REV=`/usr/bin/oslevel`
+	else
+		IBM_REV=${UNAME_VERSION}.${UNAME_RELEASE}
+	fi
+	echo ${UNAME_MACHINE}-ibm-aix${IBM_REV}
+	exit 0 ;;
+    *:AIX:2:3)
+	if grep bos325 /usr/include/stdio.h >/dev/null 2>&1; then
+		eval $set_cc_for_build
+		sed 's/^		//' << EOF >$dummy.c
+		#include <sys/systemcfg.h>
+
+		main()
+			{
+			if (!__power_pc())
+				exit(1);
+			puts("powerpc-ibm-aix3.2.5");
+			exit(0);
+			}
+EOF
+		$CC_FOR_BUILD -o $dummy $dummy.c && $dummy && exit 0
+		echo rs6000-ibm-aix3.2.5
+	elif grep bos324 /usr/include/stdio.h >/dev/null 2>&1; then
+		echo rs6000-ibm-aix3.2.4
+	else
+		echo rs6000-ibm-aix3.2
+	fi
+	exit 0 ;;
+    *:AIX:*:[45])
+	IBM_CPU_ID=`/usr/sbin/lsdev -C -c processor -S available | sed 1q | awk '{ print $1 }'`
+	if /usr/sbin/lsattr -El ${IBM_CPU_ID} | grep ' POWER' >/dev/null 2>&1; then
+		IBM_ARCH=rs6000
+	else
+		IBM_ARCH=powerpc
+	fi
+	if [ -x /usr/bin/oslevel ] ; then
+		IBM_REV=`/usr/bin/oslevel`
+	else
+		IBM_REV=${UNAME_VERSION}.${UNAME_RELEASE}
+	fi
+	echo ${IBM_ARCH}-ibm-aix${IBM_REV}
+	exit 0 ;;
+    *:AIX:*:*)
+	echo rs6000-ibm-aix
+	exit 0 ;;
+    ibmrt:4.4BSD:*|romp-ibm:BSD:*)
+	echo romp-ibm-bsd4.4
+	exit 0 ;;
+    ibmrt:*BSD:*|romp-ibm:BSD:*)            # covers RT/PC BSD and
+	echo romp-ibm-bsd${UNAME_RELEASE}   # 4.3 with uname added to
+	exit 0 ;;                           # report: romp-ibm BSD 4.3
+    *:BOSX:*:*)
+	echo rs6000-bull-bosx
+	exit 0 ;;
+    DPX/2?00:B.O.S.:*:*)
+	echo m68k-bull-sysv3
+	exit 0 ;;
+    9000/[34]??:4.3bsd:1.*:*)
+	echo m68k-hp-bsd
+	exit 0 ;;
+    hp300:4.4BSD:*:* | 9000/[34]??:4.3bsd:2.*:*)
+	echo m68k-hp-bsd4.4
+	exit 0 ;;
+    9000/[34678]??:HP-UX:*:*)
+	HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'`
+	case "${UNAME_MACHINE}" in
+	    9000/31? )            HP_ARCH=m68000 ;;
+	    9000/[34]?? )         HP_ARCH=m68k ;;
+	    9000/[678][0-9][0-9])
+		if [ -x /usr/bin/getconf ]; then
+		    sc_cpu_version=`/usr/bin/getconf SC_CPU_VERSION 2>/dev/null`
+                    sc_kernel_bits=`/usr/bin/getconf SC_KERNEL_BITS 2>/dev/null`
+                    case "${sc_cpu_version}" in
+                      523) HP_ARCH="hppa1.0" ;; # CPU_PA_RISC1_0
+                      528) HP_ARCH="hppa1.1" ;; # CPU_PA_RISC1_1
+                      532)                      # CPU_PA_RISC2_0
+                        case "${sc_kernel_bits}" in
+                          32) HP_ARCH="hppa2.0n" ;;
+                          64) HP_ARCH="hppa2.0w" ;;
+			  '') HP_ARCH="hppa2.0" ;;   # HP-UX 10.20
+                        esac ;;
+                    esac
+		fi
+		if [ "${HP_ARCH}" = "" ]; then
+		    eval $set_cc_for_build
+		    sed 's/^              //' << EOF >$dummy.c
+
+              #define _HPUX_SOURCE
+              #include <stdlib.h>
+              #include <unistd.h>
+
+              int main ()
+              {
+              #if defined(_SC_KERNEL_BITS)
+                  long bits = sysconf(_SC_KERNEL_BITS);
+              #endif
+                  long cpu  = sysconf (_SC_CPU_VERSION);
+
+                  switch (cpu)
+              	{
+              	case CPU_PA_RISC1_0: puts ("hppa1.0"); break;
+              	case CPU_PA_RISC1_1: puts ("hppa1.1"); break;
+              	case CPU_PA_RISC2_0:
+              #if defined(_SC_KERNEL_BITS)
+              	    switch (bits)
+              		{
+              		case 64: puts ("hppa2.0w"); break;
+              		case 32: puts ("hppa2.0n"); break;
+              		default: puts ("hppa2.0"); break;
+              		} break;
+              #else  /* !defined(_SC_KERNEL_BITS) */
+              	    puts ("hppa2.0"); break;
+              #endif
+              	default: puts ("hppa1.0"); break;
+              	}
+                  exit (0);
+              }
+EOF
+		    (CCOPTS= $CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null) && HP_ARCH=`$dummy`
+		    test -z "$HP_ARCH" && HP_ARCH=hppa
+		fi ;;
+	esac
+	if [ ${HP_ARCH} = "hppa2.0w" ]
+	then
+	    # avoid double evaluation of $set_cc_for_build
+	    test -n "$CC_FOR_BUILD" || eval $set_cc_for_build
+	    if echo __LP64__ | (CCOPTS= $CC_FOR_BUILD -E -) | grep __LP64__ >/dev/null
+	    then
+		HP_ARCH="hppa2.0w"
+	    else
+		HP_ARCH="hppa64"
+	    fi
+	fi
+	echo ${HP_ARCH}-hp-hpux${HPUX_REV}
+	exit 0 ;;
+    ia64:HP-UX:*:*)
+	HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'`
+	echo ia64-hp-hpux${HPUX_REV}
+	exit 0 ;;
+    3050*:HI-UX:*:*)
+	eval $set_cc_for_build
+	sed 's/^	//' << EOF >$dummy.c
+	#include <unistd.h>
+	int
+	main ()
+	{
+	  long cpu = sysconf (_SC_CPU_VERSION);
+	  /* The order matters, because CPU_IS_HP_MC68K erroneously returns
+	     true for CPU_PA_RISC1_0.  CPU_IS_PA_RISC returns correct
+	     results, however.  */
+	  if (CPU_IS_PA_RISC (cpu))
+	    {
+	      switch (cpu)
+		{
+		  case CPU_PA_RISC1_0: puts ("hppa1.0-hitachi-hiuxwe2"); break;
+		  case CPU_PA_RISC1_1: puts ("hppa1.1-hitachi-hiuxwe2"); break;
+		  case CPU_PA_RISC2_0: puts ("hppa2.0-hitachi-hiuxwe2"); break;
+		  default: puts ("hppa-hitachi-hiuxwe2"); break;
+		}
+	    }
+	  else if (CPU_IS_HP_MC68K (cpu))
+	    puts ("m68k-hitachi-hiuxwe2");
+	  else puts ("unknown-hitachi-hiuxwe2");
+	  exit (0);
+	}
+EOF
+	$CC_FOR_BUILD -o $dummy $dummy.c && $dummy && exit 0
+	echo unknown-hitachi-hiuxwe2
+	exit 0 ;;
+    9000/7??:4.3bsd:*:* | 9000/8?[79]:4.3bsd:*:* )
+	echo hppa1.1-hp-bsd
+	exit 0 ;;
+    9000/8??:4.3bsd:*:*)
+	echo hppa1.0-hp-bsd
+	exit 0 ;;
+    *9??*:MPE/iX:*:* | *3000*:MPE/iX:*:*)
+	echo hppa1.0-hp-mpeix
+	exit 0 ;;
+    hp7??:OSF1:*:* | hp8?[79]:OSF1:*:* )
+	echo hppa1.1-hp-osf
+	exit 0 ;;
+    hp8??:OSF1:*:*)
+	echo hppa1.0-hp-osf
+	exit 0 ;;
+    i*86:OSF1:*:*)
+	if [ -x /usr/sbin/sysversion ] ; then
+	    echo ${UNAME_MACHINE}-unknown-osf1mk
+	else
+	    echo ${UNAME_MACHINE}-unknown-osf1
+	fi
+	exit 0 ;;
+    parisc*:Lites*:*:*)
+	echo hppa1.1-hp-lites
+	exit 0 ;;
+    C1*:ConvexOS:*:* | convex:ConvexOS:C1*:*)
+	echo c1-convex-bsd
+        exit 0 ;;
+    C2*:ConvexOS:*:* | convex:ConvexOS:C2*:*)
+	if getsysinfo -f scalar_acc
+	then echo c32-convex-bsd
+	else echo c2-convex-bsd
+	fi
+        exit 0 ;;
+    C34*:ConvexOS:*:* | convex:ConvexOS:C34*:*)
+	echo c34-convex-bsd
+        exit 0 ;;
+    C38*:ConvexOS:*:* | convex:ConvexOS:C38*:*)
+	echo c38-convex-bsd
+        exit 0 ;;
+    C4*:ConvexOS:*:* | convex:ConvexOS:C4*:*)
+	echo c4-convex-bsd
+        exit 0 ;;
+    CRAY*Y-MP:*:*:*)
+	echo ymp-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
+	exit 0 ;;
+    CRAY*[A-Z]90:*:*:*)
+	echo ${UNAME_MACHINE}-cray-unicos${UNAME_RELEASE} \
+	| sed -e 's/CRAY.*\([A-Z]90\)/\1/' \
+	      -e y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/ \
+	      -e 's/\.[^.]*$/.X/'
+	exit 0 ;;
+    CRAY*TS:*:*:*)
+	echo t90-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
+	exit 0 ;;
+    CRAY*T3E:*:*:*)
+	echo alphaev5-cray-unicosmk${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
+	exit 0 ;;
+    CRAY*SV1:*:*:*)
+	echo sv1-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/'
+	exit 0 ;;
+    *:UNICOS/mp:*:*)
+	echo nv1-cray-unicosmp${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' 
+	exit 0 ;;
+    F30[01]:UNIX_System_V:*:* | F700:UNIX_System_V:*:*)
+	FUJITSU_PROC=`uname -m | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
+        FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'`
+        FUJITSU_REL=`echo ${UNAME_RELEASE} | sed -e 's/ /_/'`
+        echo "${FUJITSU_PROC}-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}"
+        exit 0 ;;
+    i*86:BSD/386:*:* | i*86:BSD/OS:*:* | *:Ascend\ Embedded/OS:*:*)
+	echo ${UNAME_MACHINE}-pc-bsdi${UNAME_RELEASE}
+	exit 0 ;;
+    sparc*:BSD/OS:*:*)
+	echo sparc-unknown-bsdi${UNAME_RELEASE}
+	exit 0 ;;
+    *:BSD/OS:*:*)
+	echo ${UNAME_MACHINE}-unknown-bsdi${UNAME_RELEASE}
+	exit 0 ;;
+    *:FreeBSD:*:*|*:GNU/FreeBSD:*:*)
+	# Determine whether the default compiler uses glibc.
+	eval $set_cc_for_build
+	sed 's/^	//' << EOF >$dummy.c
+	#include <features.h>
+	#if __GLIBC__ >= 2
+	LIBC=gnu
+	#else
+	LIBC=
+	#endif
+EOF
+	eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep ^LIBC=`
+	echo ${UNAME_MACHINE}-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`${LIBC:+-$LIBC}
+	exit 0 ;;
+    i*:CYGWIN*:*)
+	echo ${UNAME_MACHINE}-pc-cygwin
+	exit 0 ;;
+    i*:MINGW*:*)
+	echo ${UNAME_MACHINE}-pc-mingw32
+	exit 0 ;;
+    i*:PW*:*)
+	echo ${UNAME_MACHINE}-pc-pw32
+	exit 0 ;;
+    x86:Interix*:[34]*)
+	echo i586-pc-interix${UNAME_RELEASE}|sed -e 's/\..*//'
+	exit 0 ;;
+    [345]86:Windows_95:* | [345]86:Windows_98:* | [345]86:Windows_NT:*)
+	echo i${UNAME_MACHINE}-pc-mks
+	exit 0 ;;
+    i*:Windows_NT*:* | Pentium*:Windows_NT*:*)
+	# How do we know it's Interix rather than the generic POSIX subsystem?
+	# It also conflicts with pre-2.0 versions of AT&T UWIN. Should we
+	# UNAME_MACHINE based on the output of uname instead of i386?
+	echo i586-pc-interix
+	exit 0 ;;
+    i*:UWIN*:*)
+	echo ${UNAME_MACHINE}-pc-uwin
+	exit 0 ;;
+    p*:CYGWIN*:*)
+	echo powerpcle-unknown-cygwin
+	exit 0 ;;
+    prep*:SunOS:5.*:*)
+	echo powerpcle-unknown-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
+	exit 0 ;;
+    *:GNU:*:*)
+	echo `echo ${UNAME_MACHINE}|sed -e 's,[-/].*$,,'`-unknown-gnu`echo ${UNAME_RELEASE}|sed -e 's,/.*$,,'`
+	exit 0 ;;
+    i*86:Minix:*:*)
+	echo ${UNAME_MACHINE}-pc-minix
+	exit 0 ;;
+    arm*:Linux:*:*)
+	echo ${UNAME_MACHINE}-unknown-linux-gnu
+	exit 0 ;;
+    cris:Linux:*:*)
+	echo cris-axis-linux-gnu
+	exit 0 ;;
+    ia64:Linux:*:*)
+	echo ${UNAME_MACHINE}-${VENDOR:-unknown}-linux-gnu
+	exit 0 ;;
+    m68*:Linux:*:*)
+	echo ${UNAME_MACHINE}-unknown-linux-gnu
+	exit 0 ;;
+    mips:Linux:*:*)
+	eval $set_cc_for_build
+	sed 's/^	//' << EOF >$dummy.c
+	#undef CPU
+	#undef mips
+	#undef mipsel
+	#if defined(__MIPSEL__) || defined(__MIPSEL) || defined(_MIPSEL) || defined(MIPSEL)
+	CPU=mipsel
+	#else
+	#if defined(__MIPSEB__) || defined(__MIPSEB) || defined(_MIPSEB) || defined(MIPSEB)
+	CPU=mips
+	#else
+	CPU=
+	#endif
+	#endif
+EOF
+	eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep ^CPU=`
+	test x"${CPU}" != x && echo "${CPU}-unknown-linux-gnu" && exit 0
+	;;
+    mips64:Linux:*:*)
+	eval $set_cc_for_build
+	sed 's/^	//' << EOF >$dummy.c
+	#undef CPU
+	#undef mips64
+	#undef mips64el
+	#if defined(__MIPSEL__) || defined(__MIPSEL) || defined(_MIPSEL) || defined(MIPSEL)
+	CPU=mips64el
+	#else
+	#if defined(__MIPSEB__) || defined(__MIPSEB) || defined(_MIPSEB) || defined(MIPSEB)
+	CPU=mips64
+	#else
+	CPU=
+	#endif
+	#endif
+EOF
+	eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep ^CPU=`
+	test x"${CPU}" != x && echo "${CPU}-unknown-linux-gnu" && exit 0
+	;;
+    ppc:Linux:*:*)
+	echo powerpc-${VENDOR:-unknown}-linux-gnu
+	exit 0 ;;
+    ppc64:Linux:*:*)
+	echo powerpc64-${VENDOR:-unknown}-linux-gnu
+	exit 0 ;;
+    alpha:Linux:*:*)
+	case `sed -n '/^cpu model/s/^.*: \(.*\)/\1/p' < /proc/cpuinfo` in
+	  EV5)   UNAME_MACHINE=alphaev5 ;;
+	  EV56)  UNAME_MACHINE=alphaev56 ;;
+	  PCA56) UNAME_MACHINE=alphapca56 ;;
+	  PCA57) UNAME_MACHINE=alphapca56 ;;
+	  EV6)   UNAME_MACHINE=alphaev6 ;;
+	  EV67)  UNAME_MACHINE=alphaev67 ;;
+	  EV68*) UNAME_MACHINE=alphaev68 ;;
+        esac
+	objdump --private-headers /bin/sh | grep ld.so.1 >/dev/null
+	if test "$?" = 0 ; then LIBC="libc1" ; else LIBC="" ; fi
+	echo ${UNAME_MACHINE}-unknown-linux-gnu${LIBC}
+	exit 0 ;;
+    parisc:Linux:*:* | hppa:Linux:*:*)
+	# Look for CPU level
+	case `grep '^cpu[^a-z]*:' /proc/cpuinfo 2>/dev/null | cut -d' ' -f2` in
+	  PA7*) echo hppa1.1-unknown-linux-gnu ;;
+	  PA8*) echo hppa2.0-unknown-linux-gnu ;;
+	  *)    echo hppa-unknown-linux-gnu ;;
+	esac
+	exit 0 ;;
+    parisc64:Linux:*:* | hppa64:Linux:*:*)
+	echo hppa64-unknown-linux-gnu
+	exit 0 ;;
+    s390:Linux:*:* | s390x:Linux:*:*)
+	echo ${UNAME_MACHINE}-${VENDOR:-ibm}-linux-gnu
+	exit 0 ;;
+    sh64*:Linux:*:*)
+    	echo ${UNAME_MACHINE}-unknown-linux-gnu
+	exit 0 ;;
+    sh*:Linux:*:*)
+	echo ${UNAME_MACHINE}-unknown-linux-gnu
+	exit 0 ;;
+    sparc:Linux:*:* | sparc64:Linux:*:*)
+	echo ${UNAME_MACHINE}-unknown-linux-gnu
+	exit 0 ;;
+    x86_64:Linux:*:*)
+	echo x86_64-${VENDOR:-unknown}-linux-gnu
+	exit 0 ;;
+    i*86:Linux:*:*)
+	# The BFD linker knows what the default object file format is, so
+	# first see if it will tell us. cd to the root directory to prevent
+	# problems with other programs or directories called `ld' in the path.
+	# Set LC_ALL=C to ensure ld outputs messages in English.
+	ld_supported_targets=`cd /; LC_ALL=C ld --help 2>&1 \
+			 | sed -ne '/supported targets:/!d
+				    s/[ 	][ 	]*/ /g
+				    s/.*supported targets: *//
+				    s/ .*//
+				    p'`
+        case "$ld_supported_targets" in
+	  elf32-i386)
+		TENTATIVE="${UNAME_MACHINE}-pc-linux-gnu"
+		;;
+	  a.out-i386-linux)
+		echo "${UNAME_MACHINE}-pc-linux-gnuaout"
+		exit 0 ;;
+	  coff-i386)
+		echo "${UNAME_MACHINE}-pc-linux-gnucoff"
+		exit 0 ;;
+	  "")
+		# Either a pre-BFD a.out linker (linux-gnuoldld) or
+		# one that does not give us useful --help.
+		echo "${UNAME_MACHINE}-pc-linux-gnuoldld"
+		exit 0 ;;
+	esac
+	# Determine whether the default compiler is a.out or elf
+	eval $set_cc_for_build
+	sed 's/^	//' << EOF >$dummy.c
+	#include <features.h>
+	#ifdef __ELF__
+	# ifdef __GLIBC__
+	#  if __GLIBC__ >= 2
+	LIBC=gnu
+	#  else
+	LIBC=gnulibc1
+	#  endif
+	# else
+	LIBC=gnulibc1
+	# endif
+	#else
+	#ifdef __INTEL_COMPILER
+	LIBC=gnu
+	#else
+	LIBC=gnuaout
+	#endif
+	#endif
+EOF
+	eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep ^LIBC=`
+	test x"${LIBC}" != x && echo "${UNAME_MACHINE}-${VENDOR:-pc}-linux-${LIBC}" && exit 0
+	test x"${TENTATIVE}" != x && echo "${TENTATIVE}" && exit 0
+	;;
+    i*86:DYNIX/ptx:4*:*)
+	# ptx 4.0 does uname -s correctly, with DYNIX/ptx in there.
+	# earlier versions are messed up and put the nodename in both
+	# sysname and nodename.
+	echo i386-sequent-sysv4
+	exit 0 ;;
+    i*86:UNIX_SV:4.2MP:2.*)
+        # Unixware is an offshoot of SVR4, but it has its own version
+        # number series starting with 2...
+        # I am not positive that other SVR4 systems won't match this,
+	# I just have to hope.  -- rms.
+        # Use sysv4.2uw... so that sysv4* matches it.
+	echo ${UNAME_MACHINE}-pc-sysv4.2uw${UNAME_VERSION}
+	exit 0 ;;
+    i*86:OS/2:*:*)
+	# If we were able to find `uname', then EMX Unix compatibility
+	# is probably installed.
+	echo ${UNAME_MACHINE}-pc-os2-emx
+	exit 0 ;;
+    i*86:XTS-300:*:STOP)
+	echo ${UNAME_MACHINE}-unknown-stop
+	exit 0 ;;
+    i*86:atheos:*:*)
+	echo ${UNAME_MACHINE}-unknown-atheos
+	exit 0 ;;
+    i*86:LynxOS:2.*:* | i*86:LynxOS:3.[01]*:* | i*86:LynxOS:4.0*:*)
+	echo i386-unknown-lynxos${UNAME_RELEASE}
+	exit 0 ;;
+    i*86:*DOS:*:*)
+	echo ${UNAME_MACHINE}-pc-msdosdjgpp
+	exit 0 ;;
+    i*86:*:4.*:* | i*86:SYSTEM_V:4.*:*)
+	UNAME_REL=`echo ${UNAME_RELEASE} | sed 's/\/MP$//'`
+	if grep Novell /usr/include/link.h >/dev/null 2>/dev/null; then
+		echo ${UNAME_MACHINE}-univel-sysv${UNAME_REL}
+	else
+		echo ${UNAME_MACHINE}-pc-sysv${UNAME_REL}
+	fi
+	exit 0 ;;
+    i*86:*:5:[78]*)
+	case `/bin/uname -X | grep "^Machine"` in
+	    *486*)	     UNAME_MACHINE=i486 ;;
+	    *Pentium)	     UNAME_MACHINE=i586 ;;
+	    *Pent*|*Celeron) UNAME_MACHINE=i686 ;;
+	esac
+	echo ${UNAME_MACHINE}-unknown-sysv${UNAME_RELEASE}${UNAME_SYSTEM}${UNAME_VERSION}
+	exit 0 ;;
+    i*86:*:3.2:*)
+	if test -f /usr/options/cb.name; then
+		UNAME_REL=`sed -n 's/.*Version //p' </usr/options/cb.name`
+		echo ${UNAME_MACHINE}-pc-isc$UNAME_REL
+	elif /bin/uname -X 2>/dev/null >/dev/null ; then
+		UNAME_REL=`(/bin/uname -X|grep Release|sed -e 's/.*= //')`
+		(/bin/uname -X|grep i80486 >/dev/null) && UNAME_MACHINE=i486
+		(/bin/uname -X|grep '^Machine.*Pentium' >/dev/null) \
+			&& UNAME_MACHINE=i586
+		(/bin/uname -X|grep '^Machine.*Pent *II' >/dev/null) \
+			&& UNAME_MACHINE=i686
+		(/bin/uname -X|grep '^Machine.*Pentium Pro' >/dev/null) \
+			&& UNAME_MACHINE=i686
+		echo ${UNAME_MACHINE}-pc-sco$UNAME_REL
+	else
+		echo ${UNAME_MACHINE}-pc-sysv32
+	fi
+	exit 0 ;;
+    pc:*:*:*)
+	# Left here for compatibility:
+        # uname -m prints for DJGPP always 'pc', but it prints nothing about
+        # the processor, so we play safe by assuming i386.
+	echo i386-pc-msdosdjgpp
+        exit 0 ;;
+    Intel:Mach:3*:*)
+	echo i386-pc-mach3
+	exit 0 ;;
+    paragon:*:*:*)
+	echo i860-intel-osf1
+	exit 0 ;;
+    i860:*:4.*:*) # i860-SVR4
+	if grep Stardent /usr/include/sys/uadmin.h >/dev/null 2>&1 ; then
+	  echo i860-stardent-sysv${UNAME_RELEASE} # Stardent Vistra i860-SVR4
+	else # Add other i860-SVR4 vendors below as they are discovered.
+	  echo i860-unknown-sysv${UNAME_RELEASE}  # Unknown i860-SVR4
+	fi
+	exit 0 ;;
+    mini*:CTIX:SYS*5:*)
+	# "miniframe"
+	echo m68010-convergent-sysv
+	exit 0 ;;
+    mc68k:UNIX:SYSTEM5:3.51m)
+	echo m68k-convergent-sysv
+	exit 0 ;;
+    M680?0:D-NIX:5.3:*)
+	echo m68k-diab-dnix
+	exit 0 ;;
+    M68*:*:R3V[567]*:*)
+	test -r /sysV68 && echo 'm68k-motorola-sysv' && exit 0 ;;
+    3[34]??:*:4.0:3.0 | 3[34]??A:*:4.0:3.0 | 3[34]??,*:*:4.0:3.0 | 3[34]??/*:*:4.0:3.0 | 4400:*:4.0:3.0 | 4850:*:4.0:3.0 | SKA40:*:4.0:3.0 | SDS2:*:4.0:3.0 | SHG2:*:4.0:3.0)
+	OS_REL=''
+	test -r /etc/.relid \
+	&& OS_REL=.`sed -n 's/[^ ]* [^ ]* \([0-9][0-9]\).*/\1/p' < /etc/.relid`
+	/bin/uname -p 2>/dev/null | grep 86 >/dev/null \
+	  && echo i486-ncr-sysv4.3${OS_REL} && exit 0
+	/bin/uname -p 2>/dev/null | /bin/grep entium >/dev/null \
+	  && echo i586-ncr-sysv4.3${OS_REL} && exit 0 ;;
+    3[34]??:*:4.0:* | 3[34]??,*:*:4.0:*)
+        /bin/uname -p 2>/dev/null | grep 86 >/dev/null \
+          && echo i486-ncr-sysv4 && exit 0 ;;
+    m68*:LynxOS:2.*:* | m68*:LynxOS:3.0*:*)
+	echo m68k-unknown-lynxos${UNAME_RELEASE}
+	exit 0 ;;
+    mc68030:UNIX_System_V:4.*:*)
+	echo m68k-atari-sysv4
+	exit 0 ;;
+    TSUNAMI:LynxOS:2.*:*)
+	echo sparc-unknown-lynxos${UNAME_RELEASE}
+	exit 0 ;;
+    rs6000:LynxOS:2.*:*)
+	echo rs6000-unknown-lynxos${UNAME_RELEASE}
+	exit 0 ;;
+    PowerPC:LynxOS:2.*:* | PowerPC:LynxOS:3.[01]*:* | PowerPC:LynxOS:4.0*:*)
+	echo powerpc-unknown-lynxos${UNAME_RELEASE}
+	exit 0 ;;
+    SM[BE]S:UNIX_SV:*:*)
+	echo mips-dde-sysv${UNAME_RELEASE}
+	exit 0 ;;
+    RM*:ReliantUNIX-*:*:*)
+	echo mips-sni-sysv4
+	exit 0 ;;
+    RM*:SINIX-*:*:*)
+	echo mips-sni-sysv4
+	exit 0 ;;
+    *:SINIX-*:*:*)
+	if uname -p 2>/dev/null >/dev/null ; then
+		UNAME_MACHINE=`(uname -p) 2>/dev/null`
+		echo ${UNAME_MACHINE}-sni-sysv4
+	else
+		echo ns32k-sni-sysv
+	fi
+	exit 0 ;;
+    PENTIUM:*:4.0*:*) # Unisys `ClearPath HMP IX 4000' SVR4/MP effort
+                      # says <Richard.M.Bartel at ccMail.Census.GOV>
+        echo i586-unisys-sysv4
+        exit 0 ;;
+    *:UNIX_System_V:4*:FTX*)
+	# From Gerald Hewes <hewes at openmarket.com>.
+	# How about differentiating between stratus architectures? -djm
+	echo hppa1.1-stratus-sysv4
+	exit 0 ;;
+    *:*:*:FTX*)
+	# From seanf at swdc.stratus.com.
+	echo i860-stratus-sysv4
+	exit 0 ;;
+    *:VOS:*:*)
+	# From Paul.Green at stratus.com.
+	echo hppa1.1-stratus-vos
+	exit 0 ;;
+    mc68*:A/UX:*:*)
+	echo m68k-apple-aux${UNAME_RELEASE}
+	exit 0 ;;
+    news*:NEWS-OS:6*:*)
+	echo mips-sony-newsos6
+	exit 0 ;;
+    R[34]000:*System_V*:*:* | R4000:UNIX_SYSV:*:* | R*000:UNIX_SV:*:*)
+	if [ -d /usr/nec ]; then
+	        echo mips-nec-sysv${UNAME_RELEASE}
+	else
+	        echo mips-unknown-sysv${UNAME_RELEASE}
+	fi
+        exit 0 ;;
+    BeBox:BeOS:*:*)	# BeOS running on hardware made by Be, PPC only.
+	echo powerpc-be-beos
+	exit 0 ;;
+    BeMac:BeOS:*:*)	# BeOS running on Mac or Mac clone, PPC only.
+	echo powerpc-apple-beos
+	exit 0 ;;
+    BePC:BeOS:*:*)	# BeOS running on Intel PC compatible.
+	echo i586-pc-beos
+	exit 0 ;;
+    SX-4:SUPER-UX:*:*)
+	echo sx4-nec-superux${UNAME_RELEASE}
+	exit 0 ;;
+    SX-5:SUPER-UX:*:*)
+	echo sx5-nec-superux${UNAME_RELEASE}
+	exit 0 ;;
+    SX-6:SUPER-UX:*:*)
+	echo sx6-nec-superux${UNAME_RELEASE}
+	exit 0 ;;
+    Power*:Rhapsody:*:*)
+	echo powerpc-apple-rhapsody${UNAME_RELEASE}
+	exit 0 ;;
+    *:Rhapsody:*:*)
+	echo ${UNAME_MACHINE}-apple-rhapsody${UNAME_RELEASE}
+	exit 0 ;;
+    *:Darwin:*:*)
+	case `uname -p` in
+	    *86) UNAME_PROCESSOR=i686 ;;
+	    powerpc) UNAME_PROCESSOR=powerpc ;;
+	esac
+	echo ${UNAME_PROCESSOR}-apple-darwin${UNAME_RELEASE}
+	exit 0 ;;
+    *:procnto*:*:* | *:QNX:[0123456789]*:*)
+	UNAME_PROCESSOR=`uname -p`
+	if test "$UNAME_PROCESSOR" = "x86"; then
+		UNAME_PROCESSOR=i386
+		UNAME_MACHINE=pc
+	fi
+	echo ${UNAME_PROCESSOR}-${UNAME_MACHINE}-nto-qnx${UNAME_RELEASE}
+	exit 0 ;;
+    *:QNX:*:4*)
+	echo i386-pc-qnx
+	exit 0 ;;
+    NSR-[DGKLNPTVW]:NONSTOP_KERNEL:*:*)
+	echo nsr-tandem-nsk${UNAME_RELEASE}
+	exit 0 ;;
+    *:NonStop-UX:*:*)
+	echo mips-compaq-nonstopux
+	exit 0 ;;
+    BS2000:POSIX*:*:*)
+	echo bs2000-siemens-sysv
+	exit 0 ;;
+    DS/*:UNIX_System_V:*:*)
+	echo ${UNAME_MACHINE}-${UNAME_SYSTEM}-${UNAME_RELEASE}
+	exit 0 ;;
+    *:Plan9:*:*)
+	# "uname -m" is not consistent, so use $cputype instead. 386
+	# is converted to i386 for consistency with other x86
+	# operating systems.
+	if test "$cputype" = "386"; then
+	    UNAME_MACHINE=i386
+	else
+	    UNAME_MACHINE="$cputype"
+	fi
+	echo ${UNAME_MACHINE}-unknown-plan9
+	exit 0 ;;
+    *:TOPS-10:*:*)
+	echo pdp10-unknown-tops10
+	exit 0 ;;
+    *:TENEX:*:*)
+	echo pdp10-unknown-tenex
+	exit 0 ;;
+    KS10:TOPS-20:*:* | KL10:TOPS-20:*:* | TYPE4:TOPS-20:*:*)
+	echo pdp10-dec-tops20
+	exit 0 ;;
+    XKL-1:TOPS-20:*:* | TYPE5:TOPS-20:*:*)
+	echo pdp10-xkl-tops20
+	exit 0 ;;
+    *:TOPS-20:*:*)
+	echo pdp10-unknown-tops20
+	exit 0 ;;
+    *:ITS:*:*)
+	echo pdp10-unknown-its
+	exit 0 ;;
+    SEI:*:*:SEIUX)
+        echo mips-sei-seiux${UNAME_RELEASE}
+	exit 0 ;;
+esac
+
+#echo '(No uname command or uname output not recognized.)' 1>&2
+#echo "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" 1>&2
+
+eval $set_cc_for_build
+cat >$dummy.c <<EOF
+#ifdef _SEQUENT_
+# include <sys/types.h>
+# include <sys/utsname.h>
+#endif
+main ()
+{
+#if defined (sony)
+#if defined (MIPSEB)
+  /* BFD wants "bsd" instead of "newsos".  Perhaps BFD should be changed,
+     I don't know....  */
+  printf ("mips-sony-bsd\n"); exit (0);
+#else
+#include <sys/param.h>
+  printf ("m68k-sony-newsos%s\n",
+#ifdef NEWSOS4
+          "4"
+#else
+	  ""
+#endif
+         ); exit (0);
+#endif
+#endif
+
+#if defined (__arm) && defined (__acorn) && defined (__unix)
+  printf ("arm-acorn-riscix"); exit (0);
+#endif
+
+#if defined (hp300) && !defined (hpux)
+  printf ("m68k-hp-bsd\n"); exit (0);
+#endif
+
+#if defined (NeXT)
+#if !defined (__ARCHITECTURE__)
+#define __ARCHITECTURE__ "m68k"
+#endif
+  int version;
+  version=`(hostinfo | sed -n 's/.*NeXT Mach \([0-9]*\).*/\1/p') 2>/dev/null`;
+  if (version < 4)
+    printf ("%s-next-nextstep%d\n", __ARCHITECTURE__, version);
+  else
+    printf ("%s-next-openstep%d\n", __ARCHITECTURE__, version);
+  exit (0);
+#endif
+
+#if defined (MULTIMAX) || defined (n16)
+#if defined (UMAXV)
+  printf ("ns32k-encore-sysv\n"); exit (0);
+#else
+#if defined (CMU)
+  printf ("ns32k-encore-mach\n"); exit (0);
+#else
+  printf ("ns32k-encore-bsd\n"); exit (0);
+#endif
+#endif
+#endif
+
+#if defined (__386BSD__)
+  printf ("i386-pc-bsd\n"); exit (0);
+#endif
+
+#if defined (sequent)
+#if defined (i386)
+  printf ("i386-sequent-dynix\n"); exit (0);
+#endif
+#if defined (ns32000)
+  printf ("ns32k-sequent-dynix\n"); exit (0);
+#endif
+#endif
+
+#if defined (_SEQUENT_)
+    struct utsname un;
+
+    uname(&un);
+
+    if (strncmp(un.version, "V2", 2) == 0) {
+	printf ("i386-sequent-ptx2\n"); exit (0);
+    }
+    if (strncmp(un.version, "V1", 2) == 0) { /* XXX is V1 correct? */
+	printf ("i386-sequent-ptx1\n"); exit (0);
+    }
+    printf ("i386-sequent-ptx\n"); exit (0);
+
+#endif
+
+#if defined (vax)
+# if !defined (ultrix)
+#  include <sys/param.h>
+#  if defined (BSD)
+#   if BSD == 43
+      printf ("vax-dec-bsd4.3\n"); exit (0);
+#   else
+#    if BSD == 199006
+      printf ("vax-dec-bsd4.3reno\n"); exit (0);
+#    else
+      printf ("vax-dec-bsd\n"); exit (0);
+#    endif
+#   endif
+#  else
+    printf ("vax-dec-bsd\n"); exit (0);
+#  endif
+# else
+    printf ("vax-dec-ultrix\n"); exit (0);
+# endif
+#endif
+
+#if defined (alliant) && defined (i860)
+  printf ("i860-alliant-bsd\n"); exit (0);
+#endif
+
+  exit (1);
+}
+EOF
+
+$CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null && $dummy && exit 0
+
+# Apollos put the system type in the environment.
+
+test -d /usr/apollo && { echo ${ISP}-apollo-${SYSTYPE}; exit 0; }
+
+# Convex versions that predate uname can use getsysinfo(1)
+
+if [ -x /usr/convex/getsysinfo ]
+then
+    case `getsysinfo -f cpu_type` in
+    c1*)
+	echo c1-convex-bsd
+	exit 0 ;;
+    c2*)
+	if getsysinfo -f scalar_acc
+	then echo c32-convex-bsd
+	else echo c2-convex-bsd
+	fi
+	exit 0 ;;
+    c34*)
+	echo c34-convex-bsd
+	exit 0 ;;
+    c38*)
+	echo c38-convex-bsd
+	exit 0 ;;
+    c4*)
+	echo c4-convex-bsd
+	exit 0 ;;
+    esac
+fi
+
+cat >&2 <<EOF
+$0: unable to guess system type
+
+This script, last modified $timestamp, has failed to recognize
+the operating system you are using. It is advised that you
+download the most up to date version of the config scripts from
+
+    ftp://ftp.gnu.org/pub/gnu/config/
+
+If the version you run ($0) is already up to date, please
+send the following data and any information you think might be
+pertinent to <config-patches at gnu.org> in order to provide the needed
+information to handle your system.
+
+config.guess timestamp = $timestamp
+
+uname -m = `(uname -m) 2>/dev/null || echo unknown`
+uname -r = `(uname -r) 2>/dev/null || echo unknown`
+uname -s = `(uname -s) 2>/dev/null || echo unknown`
+uname -v = `(uname -v) 2>/dev/null || echo unknown`
+
+/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null`
+/bin/uname -X     = `(/bin/uname -X) 2>/dev/null`
+
+hostinfo               = `(hostinfo) 2>/dev/null`
+/bin/universe          = `(/bin/universe) 2>/dev/null`
+/usr/bin/arch -k       = `(/usr/bin/arch -k) 2>/dev/null`
+/bin/arch              = `(/bin/arch) 2>/dev/null`
+/usr/bin/oslevel       = `(/usr/bin/oslevel) 2>/dev/null`
+/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null`
+
+UNAME_MACHINE = ${UNAME_MACHINE}
+UNAME_RELEASE = ${UNAME_RELEASE}
+UNAME_SYSTEM  = ${UNAME_SYSTEM}
+UNAME_VERSION = ${UNAME_VERSION}
+EOF
+
+exit 1
+
+# Local variables:
+# eval: (add-hook 'write-file-hooks 'time-stamp)
+# time-stamp-start: "timestamp='"
+# time-stamp-format: "%:y-%02m-%02d"
+# time-stamp-end: "'"
+# End:


Property changes on: packages/libhdf4/branches/upstream/current/bin/config.guess
___________________________________________________________________
Name: svn:executable
   + *

Added: packages/libhdf4/branches/upstream/current/bin/config.sub
===================================================================
--- packages/libhdf4/branches/upstream/current/bin/config.sub	                        (rev 0)
+++ packages/libhdf4/branches/upstream/current/bin/config.sub	2007-05-15 09:53:05 UTC (rev 831)
@@ -0,0 +1,1500 @@
+#! /bin/sh
+# Configuration validation subroutine script.
+#   Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
+#   2000, 2001, 2002, 2003 Free Software Foundation, Inc.
+
+timestamp='2003-06-18'
+
+# This file is (in principle) common to ALL GNU software.
+# The presence of a machine in this file suggests that SOME GNU software
+# can handle that machine.  It does not imply ALL GNU software can.
+#
+# This file is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2 of the License, or
+# (at your option) any later version.
+#
+# 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 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., 59 Temple Place - Suite 330,
+# Boston, MA 02111-1307, USA.
+
+# As a special exception to the GNU General Public License, if you
+# distribute this file as part of a program that contains a
+# configuration script generated by Autoconf, you may include it under
+# the same distribution terms that you use for the rest of that program.
+
+# Please send patches to <config-patches at gnu.org>.  Submit a context
+# diff and a properly formatted ChangeLog entry.
+#
+# Configuration subroutine to validate and canonicalize a configuration type.
+# Supply the specified configuration type as an argument.
+# If it is invalid, we print an error message on stderr and exit with code 1.
+# Otherwise, we print the canonical config type on stdout and succeed.
+
+# This file is supposed to be the same for all GNU packages
+# and recognize all the CPU types, system types and aliases
+# that are meaningful with *any* GNU software.
+# Each package is responsible for reporting which valid configurations
+# it does not support.  The user should be able to distinguish
+# a failure to support a valid configuration from a meaningless
+# configuration.
+
+# The goal of this file is to map all the various variations of a given
+# machine specification into a single specification in the form:
+#	CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM
+# or in some cases, the newer four-part form:
+#	CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM
+# It is wrong to echo any other type of specification.
+
+me=`echo "$0" | sed -e 's,.*/,,'`
+
+usage="\
+Usage: $0 [OPTION] CPU-MFR-OPSYS
+       $0 [OPTION] ALIAS
+
+Canonicalize a configuration name.
+
+Operation modes:
+  -h, --help         print this help, then exit
+  -t, --time-stamp   print date of last modification, then exit
+  -v, --version      print version number, then exit
+
+Report bugs and patches to <config-patches at gnu.org>."
+
+version="\
+GNU config.sub ($timestamp)
+
+Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001
+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."
+
+help="
+Try \`$me --help' for more information."
+
+# Parse command line
+while test $# -gt 0 ; do
+  case $1 in
+    --time-stamp | --time* | -t )
+       echo "$timestamp" ; exit 0 ;;
+    --version | -v )
+       echo "$version" ; exit 0 ;;
+    --help | --h* | -h )
+       echo "$usage"; exit 0 ;;
+    -- )     # Stop option processing
+       shift; break ;;
+    - )	# Use stdin as input.
+       break ;;
+    -* )
+       echo "$me: invalid option $1$help"
+       exit 1 ;;
+
+    *local*)
+       # First pass through any local machine types.
+       echo $1
+       exit 0;;
+
+    * )
+       break ;;
+  esac
+done
+
+case $# in
+ 0) echo "$me: missing argument$help" >&2
+    exit 1;;
+ 1) ;;
+ *) echo "$me: too many arguments$help" >&2
+    exit 1;;
+esac
+
+# Separate what the user gave into CPU-COMPANY and OS or KERNEL-OS (if any).
+# Here we must recognize all the valid KERNEL-OS combinations.
+maybe_os=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\2/'`
+case $maybe_os in
+  nto-qnx* | linux-gnu* | freebsd*-gnu* | netbsd*-gnu* | storm-chaos* | os2-emx* | rtmk-nova*)
+    os=-$maybe_os
+    basic_machine=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'`
+    ;;
+  *)
+    basic_machine=`echo $1 | sed 's/-[^-]*$//'`
+    if [ $basic_machine != $1 ]
+    then os=`echo $1 | sed 's/.*-/-/'`
+    else os=; fi
+    ;;
+esac
+
+### Let's recognize common machines as not being operating systems so
+### that things like config.sub decstation-3100 work.  We also
+### recognize some manufacturers as not being operating systems, so we
+### can provide default operating systems below.
+case $os in
+	-sun*os*)
+		# Prevent following clause from handling this invalid input.
+		;;
+	-dec* | -mips* | -sequent* | -encore* | -pc532* | -sgi* | -sony* | \
+	-att* | -7300* | -3300* | -delta* | -motorola* | -sun[234]* | \
+	-unicom* | -ibm* | -next | -hp | -isi* | -apollo | -altos* | \
+	-convergent* | -ncr* | -news | -32* | -3600* | -3100* | -hitachi* |\
+	-c[123]* | -convex* | -sun | -crds | -omron* | -dg | -ultra | -tti* | \
+	-harris | -dolphin | -highlevel | -gould | -cbm | -ns | -masscomp | \
+	-apple | -axis)
+		os=
+		basic_machine=$1
+		;;
+	-sim | -cisco | -oki | -wec | -winbond)
+		os=
+		basic_machine=$1
+		;;
+	-scout)
+		;;
+	-wrs)
+		os=-vxworks
+		basic_machine=$1
+		;;
+	-chorusos*)
+		os=-chorusos
+		basic_machine=$1
+		;;
+ 	-chorusrdb)
+ 		os=-chorusrdb
+		basic_machine=$1
+ 		;;
+	-hiux*)
+		os=-hiuxwe2
+		;;
+	-sco5)
+		os=-sco3.2v5
+		basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
+		;;
+	-sco4)
+		os=-sco3.2v4
+		basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
+		;;
+	-sco3.2.[4-9]*)
+		os=`echo $os | sed -e 's/sco3.2./sco3.2v/'`
+		basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
+		;;
+	-sco3.2v[4-9]*)
+		# Don't forget version if it is 3.2v4 or newer.
+		basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
+		;;
+	-sco*)
+		os=-sco3.2v2
+		basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
+		;;
+	-udk*)
+		basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
+		;;
+	-isc)
+		os=-isc2.2
+		basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
+		;;
+	-clix*)
+		basic_machine=clipper-intergraph
+		;;
+	-isc*)
+		basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'`
+		;;
+	-lynx*)
+		os=-lynxos
+		;;
+	-ptx*)
+		basic_machine=`echo $1 | sed -e 's/86-.*/86-sequent/'`
+		;;
+	-windowsnt*)
+		os=`echo $os | sed -e 's/windowsnt/winnt/'`
+		;;
+	-psos*)
+		os=-psos
+		;;
+	-mint | -mint[0-9]*)
+		basic_machine=m68k-atari
+		os=-mint
+		;;
+esac
+
+# Decode aliases for certain CPU-COMPANY combinations.
+case $basic_machine in
+	# Recognize the basic CPU types without company name.
+	# Some are omitted here because they have special meanings below.
+	1750a | 580 \
+	| a29k \
+	| alpha | alphaev[4-8] | alphaev56 | alphaev6[78] | alphapca5[67] \
+	| alpha64 | alpha64ev[4-8] | alpha64ev56 | alpha64ev6[78] | alpha64pca5[67] \
+	| arc | arm | arm[bl]e | arme[lb] | armv[2345] | armv[345][lb] | avr \
+	| c4x | clipper \
+	| d10v | d30v | dlx | dsp16xx \
+	| fr30 | frv \
+	| h8300 | h8500 | hppa | hppa1.[01] | hppa2.0 | hppa2.0[nw] | hppa64 \
+	| i370 | i860 | i960 | ia64 \
+	| ip2k \
+	| m32r | m68000 | m68k | m88k | mcore \
+	| mips | mipsbe | mipseb | mipsel | mipsle \
+	| mips16 \
+	| mips64 | mips64el \
+	| mips64vr | mips64vrel \
+	| mips64orion | mips64orionel \
+	| mips64vr4100 | mips64vr4100el \
+	| mips64vr4300 | mips64vr4300el \
+	| mips64vr5000 | mips64vr5000el \
+	| mipsisa32 | mipsisa32el \
+	| mipsisa32r2 | mipsisa32r2el \
+	| mipsisa64 | mipsisa64el \
+	| mipsisa64sb1 | mipsisa64sb1el \
+	| mipsisa64sr71k | mipsisa64sr71kel \
+	| mipstx39 | mipstx39el \
+	| mn10200 | mn10300 \
+	| msp430 \
+	| ns16k | ns32k \
+	| openrisc | or32 \
+	| pdp10 | pdp11 | pj | pjl \
+	| powerpc | powerpc64 | powerpc64le | powerpcle | ppcbe \
+	| pyramid \
+	| s390 | s390x \
+	| sh | sh[1234] | sh[23]e | sh[34]eb | shbe | shle | sh[1234]le | sh3ele \
+	| sh64 | sh64le \
+	| sparc | sparc64 | sparc86x | sparclet | sparclite | sparcv9 | sparcv9b \
+	| strongarm \
+	| tahoe | thumb | tic4x | tic80 | tron \
+	| v850 | v850e \
+	| we32k \
+	| x86 | xscale | xstormy16 | xtensa \
+	| z8k)
+		basic_machine=$basic_machine-unknown
+		;;
+	m6811 | m68hc11 | m6812 | m68hc12)
+		# Motorola 68HC11/12.
+		basic_machine=$basic_machine-unknown
+		os=-none
+		;;
+	m88110 | m680[12346]0 | m683?2 | m68360 | m5200 | v70 | w65 | z8k)
+		;;
+
+	# We use `pc' rather than `unknown'
+	# because (1) that's what they normally are, and
+	# (2) the word "unknown" tends to confuse beginning users.
+	i*86 | x86_64)
+	  basic_machine=$basic_machine-pc
+	  ;;
+	# Object if more than one company name word.
+	*-*-*)
+		echo Invalid configuration \`$1\': machine \`$basic_machine\' not recognized 1>&2
+		exit 1
+		;;
+	# Recognize the basic CPU types with company name.
+	580-* \
+	| a29k-* \
+	| alpha-* | alphaev[4-8]-* | alphaev56-* | alphaev6[78]-* \
+	| alpha64-* | alpha64ev[4-8]-* | alpha64ev56-* | alpha64ev6[78]-* \
+	| alphapca5[67]-* | alpha64pca5[67]-* | arc-* \
+	| arm-*  | armbe-* | armle-* | armeb-* | armv*-* \
+	| avr-* \
+	| bs2000-* \
+	| c[123]* | c30-* | [cjt]90-* | c4x-* | c54x-* | c55x-* | c6x-* \
+	| clipper-* | cydra-* \
+	| d10v-* | d30v-* | dlx-* \
+	| elxsi-* \
+	| f30[01]-* | f700-* | fr30-* | frv-* | fx80-* \
+	| h8300-* | h8500-* \
+	| hppa-* | hppa1.[01]-* | hppa2.0-* | hppa2.0[nw]-* | hppa64-* \
+	| i*86-* | i860-* | i960-* | ia64-* \
+	| ip2k-* \
+	| m32r-* \
+	| m68000-* | m680[012346]0-* | m68360-* | m683?2-* | m68k-* \
+	| m88110-* | m88k-* | mcore-* \
+	| mips-* | mipsbe-* | mipseb-* | mipsel-* | mipsle-* \
+	| mips16-* \
+	| mips64-* | mips64el-* \
+	| mips64vr-* | mips64vrel-* \
+	| mips64orion-* | mips64orionel-* \
+	| mips64vr4100-* | mips64vr4100el-* \
+	| mips64vr4300-* | mips64vr4300el-* \
+	| mips64vr5000-* | mips64vr5000el-* \
+	| mipsisa32-* | mipsisa32el-* \
+	| mipsisa32r2-* | mipsisa32r2el-* \
+	| mipsisa64-* | mipsisa64el-* \
+	| mipsisa64sb1-* | mipsisa64sb1el-* \
+	| mipsisa64sr71k-* | mipsisa64sr71kel-* \
+	| mipstx39-* | mipstx39el-* \
+	| msp430-* \
+	| none-* | np1-* | nv1-* | ns16k-* | ns32k-* \
+	| orion-* \
+	| pdp10-* | pdp11-* | pj-* | pjl-* | pn-* | power-* \
+	| powerpc-* | powerpc64-* | powerpc64le-* | powerpcle-* | ppcbe-* \
+	| pyramid-* \
+	| romp-* | rs6000-* \
+	| s390-* | s390x-* \
+	| sh-* | sh[1234]-* | sh[23]e-* | sh[34]eb-* | shbe-* \
+	| shle-* | sh[1234]le-* | sh3ele-* | sh64-* | sh64le-* \
+	| sparc-* | sparc64-* | sparc86x-* | sparclet-* | sparclite-* \
+	| sparcv9-* | sparcv9b-* | strongarm-* | sv1-* | sx?-* \
+	| tahoe-* | thumb-* \
+	| tic30-* | tic4x-* | tic54x-* | tic55x-* | tic6x-* | tic80-* \
+	| tron-* \
+	| v850-* | v850e-* | vax-* \
+	| we32k-* \
+	| x86-* | x86_64-* | xps100-* | xscale-* | xstormy16-* \
+	| xtensa-* \
+	| ymp-* \
+	| z8k-*)
+		;;
+	# Recognize the various machine names and aliases which stand
+	# for a CPU type and a company and sometimes even an OS.
+	386bsd)
+		basic_machine=i386-unknown
+		os=-bsd
+		;;
+	3b1 | 7300 | 7300-att | att-7300 | pc7300 | safari | unixpc)
+		basic_machine=m68000-att
+		;;
+	3b*)
+		basic_machine=we32k-att
+		;;
+	a29khif)
+		basic_machine=a29k-amd
+		os=-udi
+		;;
+	adobe68k)
+		basic_machine=m68010-adobe
+		os=-scout
+		;;
+	alliant | fx80)
+		basic_machine=fx80-alliant
+		;;
+	altos | altos3068)
+		basic_machine=m68k-altos
+		;;
+	am29k)
+		basic_machine=a29k-none
+		os=-bsd
+		;;
+	amd64)
+		basic_machine=x86_64-pc
+		;;
+	amdahl)
+		basic_machine=580-amdahl
+		os=-sysv
+		;;
+	amiga | amiga-*)
+		basic_machine=m68k-unknown
+		;;
+	amigaos | amigados)
+		basic_machine=m68k-unknown
+		os=-amigaos
+		;;
+	amigaunix | amix)
+		basic_machine=m68k-unknown
+		os=-sysv4
+		;;
+	apollo68)
+		basic_machine=m68k-apollo
+		os=-sysv
+		;;
+	apollo68bsd)
+		basic_machine=m68k-apollo
+		os=-bsd
+		;;
+	aux)
+		basic_machine=m68k-apple
+		os=-aux
+		;;
+	balance)
+		basic_machine=ns32k-sequent
+		os=-dynix
+		;;
+	c90)
+		basic_machine=c90-cray
+		os=-unicos
+		;;
+	convex-c1)
+		basic_machine=c1-convex
+		os=-bsd
+		;;
+	convex-c2)
+		basic_machine=c2-convex
+		os=-bsd
+		;;
+	convex-c32)
+		basic_machine=c32-convex
+		os=-bsd
+		;;
+	convex-c34)
+		basic_machine=c34-convex
+		os=-bsd
+		;;
+	convex-c38)
+		basic_machine=c38-convex
+		os=-bsd
+		;;
+	cray | j90)
+		basic_machine=j90-cray
+		os=-unicos
+		;;
+	crds | unos)
+		basic_machine=m68k-crds
+		;;
+	cris | cris-* | etrax*)
+		basic_machine=cris-axis
+		;;
+	da30 | da30-*)
+		basic_machine=m68k-da30
+		;;
+	decstation | decstation-3100 | pmax | pmax-* | pmin | dec3100 | decstatn)
+		basic_machine=mips-dec
+		;;
+	decsystem10* | dec10*)
+		basic_machine=pdp10-dec
+		os=-tops10
+		;;
+	decsystem20* | dec20*)
+		basic_machine=pdp10-dec
+		os=-tops20
+		;;
+	delta | 3300 | motorola-3300 | motorola-delta \
+	      | 3300-motorola | delta-motorola)
+		basic_machine=m68k-motorola
+		;;
+	delta88)
+		basic_machine=m88k-motorola
+		os=-sysv3
+		;;
+	dpx20 | dpx20-*)
+		basic_machine=rs6000-bull
+		os=-bosx
+		;;
+	dpx2* | dpx2*-bull)
+		basic_machine=m68k-bull
+		os=-sysv3
+		;;
+	ebmon29k)
+		basic_machine=a29k-amd
+		os=-ebmon
+		;;
+	elxsi)
+		basic_machine=elxsi-elxsi
+		os=-bsd
+		;;
+	encore | umax | mmax)
+		basic_machine=ns32k-encore
+		;;
+	es1800 | OSE68k | ose68k | ose | OSE)
+		basic_machine=m68k-ericsson
+		os=-ose
+		;;
+	fx2800)
+		basic_machine=i860-alliant
+		;;
+	genix)
+		basic_machine=ns32k-ns
+		;;
+	gmicro)
+		basic_machine=tron-gmicro
+		os=-sysv
+		;;
+	go32)
+		basic_machine=i386-pc
+		os=-go32
+		;;
+	h3050r* | hiux*)
+		basic_machine=hppa1.1-hitachi
+		os=-hiuxwe2
+		;;
+	h8300hms)
+		basic_machine=h8300-hitachi
+		os=-hms
+		;;
+	h8300xray)
+		basic_machine=h8300-hitachi
+		os=-xray
+		;;
+	h8500hms)
+		basic_machine=h8500-hitachi
+		os=-hms
+		;;
+	harris)
+		basic_machine=m88k-harris
+		os=-sysv3
+		;;
+	hp300-*)
+		basic_machine=m68k-hp
+		;;
+	hp300bsd)
+		basic_machine=m68k-hp
+		os=-bsd
+		;;
+	hp300hpux)
+		basic_machine=m68k-hp
+		os=-hpux
+		;;
+	hp3k9[0-9][0-9] | hp9[0-9][0-9])
+		basic_machine=hppa1.0-hp
+		;;
+	hp9k2[0-9][0-9] | hp9k31[0-9])
+		basic_machine=m68000-hp
+		;;
+	hp9k3[2-9][0-9])
+		basic_machine=m68k-hp
+		;;
+	hp9k6[0-9][0-9] | hp6[0-9][0-9])
+		basic_machine=hppa1.0-hp
+		;;
+	hp9k7[0-79][0-9] | hp7[0-79][0-9])
+		basic_machine=hppa1.1-hp
+		;;
+	hp9k78[0-9] | hp78[0-9])
+		# FIXME: really hppa2.0-hp
+		basic_machine=hppa1.1-hp
+		;;
+	hp9k8[67]1 | hp8[67]1 | hp9k80[24] | hp80[24] | hp9k8[78]9 | hp8[78]9 | hp9k893 | hp893)
+		# FIXME: really hppa2.0-hp
+		basic_machine=hppa1.1-hp
+		;;
+	hp9k8[0-9][13679] | hp8[0-9][13679])
+		basic_machine=hppa1.1-hp
+		;;
+	hp9k8[0-9][0-9] | hp8[0-9][0-9])
+		basic_machine=hppa1.0-hp
+		;;
+	hppa-next)
+		os=-nextstep3
+		;;
+	hppaosf)
+		basic_machine=hppa1.1-hp
+		os=-osf
+		;;
+	hppro)
+		basic_machine=hppa1.1-hp
+		os=-proelf
+		;;
+	i370-ibm* | ibm*)
+		basic_machine=i370-ibm
+		;;
+# I'm not sure what "Sysv32" means.  Should this be sysv3.2?
+	i*86v32)
+		basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'`
+		os=-sysv32
+		;;
+	i*86v4*)
+		basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'`
+		os=-sysv4
+		;;
+	i*86v)
+		basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'`
+		os=-sysv
+		;;
+	i*86sol2)
+		basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'`
+		os=-solaris2
+		;;
+	i386mach)
+		basic_machine=i386-mach
+		os=-mach
+		;;
+	i386-vsta | vsta)
+		basic_machine=i386-unknown
+		os=-vsta
+		;;
+	iris | iris4d)
+		basic_machine=mips-sgi
+		case $os in
+		    -irix*)
+			;;
+		    *)
+			os=-irix4
+			;;
+		esac
+		;;
+	isi68 | isi)
+		basic_machine=m68k-isi
+		os=-sysv
+		;;
+	m88k-omron*)
+		basic_machine=m88k-omron
+		;;
+	magnum | m3230)
+		basic_machine=mips-mips
+		os=-sysv
+		;;
+	merlin)
+		basic_machine=ns32k-utek
+		os=-sysv
+		;;
+	mingw32)
+		basic_machine=i386-pc
+		os=-mingw32
+		;;
+	miniframe)
+		basic_machine=m68000-convergent
+		;;
+	*mint | -mint[0-9]* | *MiNT | *MiNT[0-9]*)
+		basic_machine=m68k-atari
+		os=-mint
+		;;
+	mips3*-*)
+		basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'`
+		;;
+	mips3*)
+		basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'`-unknown
+		;;
+	mmix*)
+		basic_machine=mmix-knuth
+		os=-mmixware
+		;;
+	monitor)
+		basic_machine=m68k-rom68k
+		os=-coff
+		;;
+	morphos)
+		basic_machine=powerpc-unknown
+		os=-morphos
+		;;
+	msdos)
+		basic_machine=i386-pc
+		os=-msdos
+		;;
+	mvs)
+		basic_machine=i370-ibm
+		os=-mvs
+		;;
+	ncr3000)
+		basic_machine=i486-ncr
+		os=-sysv4
+		;;
+	netbsd386)
+		basic_machine=i386-unknown
+		os=-netbsd
+		;;
+	netwinder)
+		basic_machine=armv4l-rebel
+		os=-linux
+		;;
+	news | news700 | news800 | news900)
+		basic_machine=m68k-sony
+		os=-newsos
+		;;
+	news1000)
+		basic_machine=m68030-sony
+		os=-newsos
+		;;
+	news-3600 | risc-news)
+		basic_machine=mips-sony
+		os=-newsos
+		;;
+	necv70)
+		basic_machine=v70-nec
+		os=-sysv
+		;;
+	next | m*-next )
+		basic_machine=m68k-next
+		case $os in
+		    -nextstep* )
+			;;
+		    -ns2*)
+		      os=-nextstep2
+			;;
+		    *)
+		      os=-nextstep3
+			;;
+		esac
+		;;
+	nh3000)
+		basic_machine=m68k-harris
+		os=-cxux
+		;;
+	nh[45]000)
+		basic_machine=m88k-harris
+		os=-cxux
+		;;
+	nindy960)
+		basic_machine=i960-intel
+		os=-nindy
+		;;
+	mon960)
+		basic_machine=i960-intel
+		os=-mon960
+		;;
+	nonstopux)
+		basic_machine=mips-compaq
+		os=-nonstopux
+		;;
+	np1)
+		basic_machine=np1-gould
+		;;
+	nv1)
+		basic_machine=nv1-cray
+		os=-unicosmp
+		;;
+	nsr-tandem)
+		basic_machine=nsr-tandem
+		;;
+	op50n-* | op60c-*)
+		basic_machine=hppa1.1-oki
+		os=-proelf
+		;;
+	or32 | or32-*)
+		basic_machine=or32-unknown
+		os=-coff
+		;;
+	OSE68000 | ose68000)
+		basic_machine=m68000-ericsson
+		os=-ose
+		;;
+	os68k)
+		basic_machine=m68k-none
+		os=-os68k
+		;;
+	pa-hitachi)
+		basic_machine=hppa1.1-hitachi
+		os=-hiuxwe2
+		;;
+	paragon)
+		basic_machine=i860-intel
+		os=-osf
+		;;
+	pbd)
+		basic_machine=sparc-tti
+		;;
+	pbb)
+		basic_machine=m68k-tti
+		;;
+	pc532 | pc532-*)
+		basic_machine=ns32k-pc532
+		;;
+	pentium | p5 | k5 | k6 | nexgen | viac3)
+		basic_machine=i586-pc
+		;;
+	pentiumpro | p6 | 6x86 | athlon | athlon_*)
+		basic_machine=i686-pc
+		;;
+	pentiumii | pentium2 | pentiumiii | pentium3)
+		basic_machine=i686-pc
+		;;
+	pentium4)
+		basic_machine=i786-pc
+		;;
+	pentium-* | p5-* | k5-* | k6-* | nexgen-* | viac3-*)
+		basic_machine=i586-`echo $basic_machine | sed 's/^[^-]*-//'`
+		;;
+	pentiumpro-* | p6-* | 6x86-* | athlon-*)
+		basic_machine=i686-`echo $basic_machine | sed 's/^[^-]*-//'`
+		;;
+	pentiumii-* | pentium2-* | pentiumiii-* | pentium3-*)
+		basic_machine=i686-`echo $basic_machine | sed 's/^[^-]*-//'`
+		;;
+	pentium4-*)
+		basic_machine=i786-`echo $basic_machine | sed 's/^[^-]*-//'`
+		;;
+	pn)
+		basic_machine=pn-gould
+		;;
+	power)	basic_machine=power-ibm
+		;;
+	ppc)	basic_machine=powerpc-unknown
+		;;
+	ppc-*)	basic_machine=powerpc-`echo $basic_machine | sed 's/^[^-]*-//'`
+		;;
+	ppcle | powerpclittle | ppc-le | powerpc-little)
+		basic_machine=powerpcle-unknown
+		;;
+	ppcle-* | powerpclittle-*)
+		basic_machine=powerpcle-`echo $basic_machine | sed 's/^[^-]*-//'`
+		;;
+	ppc64)	basic_machine=powerpc64-unknown
+		;;
+	ppc64-*) basic_machine=powerpc64-`echo $basic_machine | sed 's/^[^-]*-//'`
+		;;
+	ppc64le | powerpc64little | ppc64-le | powerpc64-little)
+		basic_machine=powerpc64le-unknown
+		;;
+	ppc64le-* | powerpc64little-*)
+		basic_machine=powerpc64le-`echo $basic_machine | sed 's/^[^-]*-//'`
+		;;
+	ps2)
+		basic_machine=i386-ibm
+		;;
+	pw32)
+		basic_machine=i586-unknown
+		os=-pw32
+		;;
+	rom68k)
+		basic_machine=m68k-rom68k
+		os=-coff
+		;;
+	rm[46]00)
+		basic_machine=mips-siemens
+		;;
+	rtpc | rtpc-*)
+		basic_machine=romp-ibm
+		;;
+	sa29200)
+		basic_machine=a29k-amd
+		os=-udi
+		;;
+	sb1)
+		basic_machine=mipsisa64sb1-unknown
+		;;
+	sb1el)
+		basic_machine=mipsisa64sb1el-unknown
+		;;
+	sei)
+		basic_machine=mips-sei
+		os=-seiux
+		;;
+	sequent)
+		basic_machine=i386-sequent
+		;;
+	sh)
+		basic_machine=sh-hitachi
+		os=-hms
+		;;
+	sh64)
+		basic_machine=sh64-unknown
+		;;
+	sparclite-wrs | simso-wrs)
+		basic_machine=sparclite-wrs
+		os=-vxworks
+		;;
+	sps7)
+		basic_machine=m68k-bull
+		os=-sysv2
+		;;
+	spur)
+		basic_machine=spur-unknown
+		;;
+	st2000)
+		basic_machine=m68k-tandem
+		;;
+	stratus)
+		basic_machine=i860-stratus
+		os=-sysv4
+		;;
+	sun2)
+		basic_machine=m68000-sun
+		;;
+	sun2os3)
+		basic_machine=m68000-sun
+		os=-sunos3
+		;;
+	sun2os4)
+		basic_machine=m68000-sun
+		os=-sunos4
+		;;
+	sun3os3)
+		basic_machine=m68k-sun
+		os=-sunos3
+		;;
+	sun3os4)
+		basic_machine=m68k-sun
+		os=-sunos4
+		;;
+	sun4os3)
+		basic_machine=sparc-sun
+		os=-sunos3
+		;;
+	sun4os4)
+		basic_machine=sparc-sun
+		os=-sunos4
+		;;
+	sun4sol2)
+		basic_machine=sparc-sun
+		os=-solaris2
+		;;
+	sun3 | sun3-*)
+		basic_machine=m68k-sun
+		;;
+	sun4)
+		basic_machine=sparc-sun
+		;;
+	sun386 | sun386i | roadrunner)
+		basic_machine=i386-sun
+		;;
+	sv1)
+		basic_machine=sv1-cray
+		os=-unicos
+		;;
+	symmetry)
+		basic_machine=i386-sequent
+		os=-dynix
+		;;
+	t3e)
+		basic_machine=alphaev5-cray
+		os=-unicos
+		;;
+	t90)
+		basic_machine=t90-cray
+		os=-unicos
+		;;
+	tic54x | c54x*)
+		basic_machine=tic54x-unknown
+		os=-coff
+		;;
+	tic55x | c55x*)
+		basic_machine=tic55x-unknown
+		os=-coff
+		;;
+	tic6x | c6x*)
+		basic_machine=tic6x-unknown
+		os=-coff
+		;;
+	tx39)
+		basic_machine=mipstx39-unknown
+		;;
+	tx39el)
+		basic_machine=mipstx39el-unknown
+		;;
+	toad1)
+		basic_machine=pdp10-xkl
+		os=-tops20
+		;;
+	tower | tower-32)
+		basic_machine=m68k-ncr
+		;;
+	udi29k)
+		basic_machine=a29k-amd
+		os=-udi
+		;;
+	ultra3)
+		basic_machine=a29k-nyu
+		os=-sym1
+		;;
+	v810 | necv810)
+		basic_machine=v810-nec
+		os=-none
+		;;
+	vaxv)
+		basic_machine=vax-dec
+		os=-sysv
+		;;
+	vms)
+		basic_machine=vax-dec
+		os=-vms
+		;;
+	vpp*|vx|vx-*)
+		basic_machine=f301-fujitsu
+		;;
+	vxworks960)
+		basic_machine=i960-wrs
+		os=-vxworks
+		;;
+	vxworks68)
+		basic_machine=m68k-wrs
+		os=-vxworks
+		;;
+	vxworks29k)
+		basic_machine=a29k-wrs
+		os=-vxworks
+		;;
+	w65*)
+		basic_machine=w65-wdc
+		os=-none
+		;;
+	w89k-*)
+		basic_machine=hppa1.1-winbond
+		os=-proelf
+		;;
+	xps | xps100)
+		basic_machine=xps100-honeywell
+		;;
+	ymp)
+		basic_machine=ymp-cray
+		os=-unicos
+		;;
+	z8k-*-coff)
+		basic_machine=z8k-unknown
+		os=-sim
+		;;
+	none)
+		basic_machine=none-none
+		os=-none
+		;;
+
+# Here we handle the default manufacturer of certain CPU types.  It is in
+# some cases the only manufacturer, in others, it is the most popular.
+	w89k)
+		basic_machine=hppa1.1-winbond
+		;;
+	op50n)
+		basic_machine=hppa1.1-oki
+		;;
+	op60c)
+		basic_machine=hppa1.1-oki
+		;;
+	romp)
+		basic_machine=romp-ibm
+		;;
+	rs6000)
+		basic_machine=rs6000-ibm
+		;;
+	vax)
+		basic_machine=vax-dec
+		;;
+	pdp10)
+		# there are many clones, so DEC is not a safe bet
+		basic_machine=pdp10-unknown
+		;;
+	pdp11)
+		basic_machine=pdp11-dec
+		;;
+	we32k)
+		basic_machine=we32k-att
+		;;
+	sh3 | sh4 | sh[34]eb | sh[1234]le | sh[23]ele)
+		basic_machine=sh-unknown
+		;;
+	sh64)
+		basic_machine=sh64-unknown
+		;;
+	sparc | sparcv9 | sparcv9b)
+		basic_machine=sparc-sun
+		;;
+	cydra)
+		basic_machine=cydra-cydrome
+		;;
+	orion)
+		basic_machine=orion-highlevel
+		;;
+	orion105)
+		basic_machine=clipper-highlevel
+		;;
+	mac | mpw | mac-mpw)
+		basic_machine=m68k-apple
+		;;
+	pmac | pmac-mpw)
+		basic_machine=powerpc-apple
+		;;
+	*-unknown)
+		# Make sure to match an already-canonicalized machine name.
+		;;
+	*)
+		echo Invalid configuration \`$1\': machine \`$basic_machine\' not recognized 1>&2
+		exit 1
+		;;
+esac
+
+# Here we canonicalize certain aliases for manufacturers.
+case $basic_machine in
+	*-digital*)
+		basic_machine=`echo $basic_machine | sed 's/digital.*/dec/'`
+		;;
+	*-commodore*)
+		basic_machine=`echo $basic_machine | sed 's/commodore.*/cbm/'`
+		;;
+	*)
+		;;
+esac
+
+# Decode manufacturer-specific aliases for certain operating systems.
+
+if [ x"$os" != x"" ]
+then
+case $os in
+        # First match some system type aliases
+        # that might get confused with valid system types.
+	# -solaris* is a basic system type, with this one exception.
+	-solaris1 | -solaris1.*)
+		os=`echo $os | sed -e 's|solaris1|sunos4|'`
+		;;
+	-solaris)
+		os=-solaris2
+		;;
+	-svr4*)
+		os=-sysv4
+		;;
+	-unixware*)
+		os=-sysv4.2uw
+		;;
+	-gnu/linux*)
+		os=`echo $os | sed -e 's|gnu/linux|linux-gnu|'`
+		;;
+	# First accept the basic system types.
+	# The portable systems comes first.
+	# Each alternative MUST END IN A *, to match a version number.
+	# -sysv* is not here because it comes later, after sysvr4.
+	-gnu* | -bsd* | -mach* | -minix* | -genix* | -ultrix* | -irix* \
+	      | -*vms* | -sco* | -esix* | -isc* | -aix* | -sunos | -sunos[34]*\
+	      | -hpux* | -unos* | -osf* | -luna* | -dgux* | -solaris* | -sym* \
+	      | -amigaos* | -amigados* | -msdos* | -newsos* | -unicos* | -aof* \
+	      | -aos* \
+	      | -nindy* | -vxsim* | -vxworks* | -ebmon* | -hms* | -mvs* \
+	      | -clix* | -riscos* | -uniplus* | -iris* | -rtu* | -xenix* \
+	      | -hiux* | -386bsd* | -netbsd* | -openbsd* | -freebsd* | -riscix* \
+	      | -lynxos* | -bosx* | -nextstep* | -cxux* | -aout* | -elf* | -oabi* \
+	      | -ptx* | -coff* | -ecoff* | -winnt* | -domain* | -vsta* \
+	      | -udi* | -eabi* | -lites* | -ieee* | -go32* | -aux* \
+	      | -chorusos* | -chorusrdb* \
+	      | -cygwin* | -pe* | -psos* | -moss* | -proelf* | -rtems* \
+	      | -mingw32* | -linux-gnu* | -uxpv* | -beos* | -mpeix* | -udk* \
+	      | -interix* | -uwin* | -mks* | -rhapsody* | -darwin* | -opened* \
+	      | -openstep* | -oskit* | -conix* | -pw32* | -nonstopux* \
+	      | -storm-chaos* | -tops10* | -tenex* | -tops20* | -its* \
+	      | -os2* | -vos* | -palmos* | -uclinux* | -nucleus* \
+	      | -morphos* | -superux* | -rtmk* | -rtmk-nova* | -windiss* \
+	      | -powermax* | -dnix* | -nx6 | -nx7 | -sei*)
+	# Remember, each alternative MUST END IN *, to match a version number.
+		;;
+	-qnx*)
+		case $basic_machine in
+		    x86-* | i*86-*)
+			;;
+		    *)
+			os=-nto$os
+			;;
+		esac
+		;;
+	-nto-qnx*)
+		;;
+	-nto*)
+		os=`echo $os | sed -e 's|nto|nto-qnx|'`
+		;;
+	-sim | -es1800* | -hms* | -xray | -os68k* | -none* | -v88r* \
+	      | -windows* | -osx | -abug | -netware* | -os9* | -beos* \
+	      | -macos* | -mpw* | -magic* | -mmixware* | -mon960* | -lnews*)
+		;;
+	-mac*)
+		os=`echo $os | sed -e 's|mac|macos|'`
+		;;
+	-linux*)
+		os=`echo $os | sed -e 's|linux|linux-gnu|'`
+		;;
+	-sunos5*)
+		os=`echo $os | sed -e 's|sunos5|solaris2|'`
+		;;
+	-sunos6*)
+		os=`echo $os | sed -e 's|sunos6|solaris3|'`
+		;;
+	-opened*)
+		os=-openedition
+		;;
+	-wince*)
+		os=-wince
+		;;
+	-osfrose*)
+		os=-osfrose
+		;;
+	-osf*)
+		os=-osf
+		;;
+	-utek*)
+		os=-bsd
+		;;
+	-dynix*)
+		os=-bsd
+		;;
+	-acis*)
+		os=-aos
+		;;
+	-atheos*)
+		os=-atheos
+		;;
+	-386bsd)
+		os=-bsd
+		;;
+	-ctix* | -uts*)
+		os=-sysv
+		;;
+	-nova*)
+		os=-rtmk-nova
+		;;
+	-ns2 )
+		os=-nextstep2
+		;;
+	-nsk*)
+		os=-nsk
+		;;
+	# Preserve the version number of sinix5.
+	-sinix5.*)
+		os=`echo $os | sed -e 's|sinix|sysv|'`
+		;;
+	-sinix*)
+		os=-sysv4
+		;;
+	-triton*)
+		os=-sysv3
+		;;
+	-oss*)
+		os=-sysv3
+		;;
+	-svr4)
+		os=-sysv4
+		;;
+	-svr3)
+		os=-sysv3
+		;;
+	-sysvr4)
+		os=-sysv4
+		;;
+	# This must come after -sysvr4.
+	-sysv*)
+		;;
+	-ose*)
+		os=-ose
+		;;
+	-es1800*)
+		os=-ose
+		;;
+	-xenix)
+		os=-xenix
+		;;
+	-*mint | -mint[0-9]* | -*MiNT | -MiNT[0-9]*)
+		os=-mint
+		;;
+	-aros*)
+		os=-aros
+		;;
+	-kaos*)
+		os=-kaos
+		;;
+	-none)
+		;;
+	*)
+		# Get rid of the `-' at the beginning of $os.
+		os=`echo $os | sed 's/[^-]*-//'`
+		echo Invalid configuration \`$1\': system \`$os\' not recognized 1>&2
+		exit 1
+		;;
+esac
+else
+
+# Here we handle the default operating systems that come with various machines.
+# The value should be what the vendor currently ships out the door with their
+# machine or put another way, the most popular os provided with the machine.
+
+# Note that if you're going to try to match "-MANUFACTURER" here (say,
+# "-sun"), then you have to tell the case statement up towards the top
+# that MANUFACTURER isn't an operating system.  Otherwise, code above
+# will signal an error saying that MANUFACTURER isn't an operating
+# system, and we'll never get to this point.
+
+case $basic_machine in
+	*-acorn)
+		os=-riscix1.2
+		;;
+	arm*-rebel)
+		os=-linux
+		;;
+	arm*-semi)
+		os=-aout
+		;;
+	c4x-* | tic4x-*)
+		os=-coff
+		;;
+	# This must come before the *-dec entry.
+	pdp10-*)
+		os=-tops20
+		;;
+	pdp11-*)
+		os=-none
+		;;
+	*-dec | vax-*)
+		os=-ultrix4.2
+		;;
+	m68*-apollo)
+		os=-domain
+		;;
+	i386-sun)
+		os=-sunos4.0.2
+		;;
+	m68000-sun)
+		os=-sunos3
+		# This also exists in the configure program, but was not the
+		# default.
+		# os=-sunos4
+		;;
+	m68*-cisco)
+		os=-aout
+		;;
+	mips*-cisco)
+		os=-elf
+		;;
+	mips*-*)
+		os=-elf
+		;;
+	or32-*)
+		os=-coff
+		;;
+	*-tti)	# must be before sparc entry or we get the wrong os.
+		os=-sysv3
+		;;
+	sparc-* | *-sun)
+		os=-sunos4.1.1
+		;;
+	*-be)
+		os=-beos
+		;;
+	*-ibm)
+		os=-aix
+		;;
+	*-wec)
+		os=-proelf
+		;;
+	*-winbond)
+		os=-proelf
+		;;
+	*-oki)
+		os=-proelf
+		;;
+	*-hp)
+		os=-hpux
+		;;
+	*-hitachi)
+		os=-hiux
+		;;
+	i860-* | *-att | *-ncr | *-altos | *-motorola | *-convergent)
+		os=-sysv
+		;;
+	*-cbm)
+		os=-amigaos
+		;;
+	*-dg)
+		os=-dgux
+		;;
+	*-dolphin)
+		os=-sysv3
+		;;
+	m68k-ccur)
+		os=-rtu
+		;;
+	m88k-omron*)
+		os=-luna
+		;;
+	*-next )
+		os=-nextstep
+		;;
+	*-sequent)
+		os=-ptx
+		;;
+	*-crds)
+		os=-unos
+		;;
+	*-ns)
+		os=-genix
+		;;
+	i370-*)
+		os=-mvs
+		;;
+	*-next)
+		os=-nextstep3
+		;;
+	*-gould)
+		os=-sysv
+		;;
+	*-highlevel)
+		os=-bsd
+		;;
+	*-encore)
+		os=-bsd
+		;;
+	*-sgi)
+		os=-irix
+		;;
+	*-siemens)
+		os=-sysv4
+		;;
+	*-masscomp)
+		os=-rtu
+		;;
+	f30[01]-fujitsu | f700-fujitsu)
+		os=-uxpv
+		;;
+	*-rom68k)
+		os=-coff
+		;;
+	*-*bug)
+		os=-coff
+		;;
+	*-apple)
+		os=-macos
+		;;
+	*-atari*)
+		os=-mint
+		;;
+	*)
+		os=-none
+		;;
+esac
+fi
+
+# Here we handle the case where we know the os, and the CPU type, but not the
+# manufacturer.  We pick the logical manufacturer.
+vendor=unknown
+case $basic_machine in
+	*-unknown)
+		case $os in
+			-riscix*)
+				vendor=acorn
+				;;
+			-sunos*)
+				vendor=sun
+				;;
+			-aix*)
+				vendor=ibm
+				;;
+			-beos*)
+				vendor=be
+				;;
+			-hpux*)
+				vendor=hp
+				;;
+			-mpeix*)
+				vendor=hp
+				;;
+			-hiux*)
+				vendor=hitachi
+				;;
+			-unos*)
+				vendor=crds
+				;;
+			-dgux*)
+				vendor=dg
+				;;
+			-luna*)
+				vendor=omron
+				;;
+			-genix*)
+				vendor=ns
+				;;
+			-mvs* | -opened*)
+				vendor=ibm
+				;;
+			-ptx*)
+				vendor=sequent
+				;;
+			-vxsim* | -vxworks* | -windiss*)
+				vendor=wrs
+				;;
+			-aux*)
+				vendor=apple
+				;;
+			-hms*)
+				vendor=hitachi
+				;;
+			-mpw* | -macos*)
+				vendor=apple
+				;;
+			-*mint | -mint[0-9]* | -*MiNT | -MiNT[0-9]*)
+				vendor=atari
+				;;
+			-vos*)
+				vendor=stratus
+				;;
+		esac
+		basic_machine=`echo $basic_machine | sed "s/unknown/$vendor/"`
+		;;
+esac
+
+echo $basic_machine$os
+exit 0
+
+# Local variables:
+# eval: (add-hook 'write-file-hooks 'time-stamp)
+# time-stamp-start: "timestamp='"
+# time-stamp-format: "%:y-%02m-%02d"
+# time-stamp-end: "'"
+# End:


Property changes on: packages/libhdf4/branches/upstream/current/bin/config.sub
___________________________________________________________________
Name: svn:executable
   + *

Added: packages/libhdf4/branches/upstream/current/bin/depcomp
===================================================================
--- packages/libhdf4/branches/upstream/current/bin/depcomp	                        (rev 0)
+++ packages/libhdf4/branches/upstream/current/bin/depcomp	2007-05-15 09:53:05 UTC (rev 831)
@@ -0,0 +1,472 @@
+#! /bin/sh
+
+# depcomp - compile a program generating dependencies as side-effects
+# Copyright 1999, 2000 Free Software Foundation, Inc.
+
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2, or (at your option)
+# any later version.
+
+# 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 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., 59 Temple Place - Suite 330, Boston, MA
+# 02111-1307, USA.
+
+# As a special exception to the GNU General Public License, if you
+# distribute this file as part of a program that contains a
+# configuration script generated by Autoconf, you may include it under
+# the same distribution terms that you use for the rest of that program.
+
+# Originally written by Alexandre Oliva <oliva at dcc.unicamp.br>.
+
+if test -z "$depmode" || test -z "$source" || test -z "$object"; then
+  echo "depcomp: Variables source, object and depmode must be set" 1>&2
+  exit 1
+fi
+# `libtool' can also be set to `yes' or `no'.
+
+if test -z "$depfile"; then
+   base=`echo "$object" | sed -e 's,^.*/,,' -e 's,\.\([^.]*\)$,.P\1,'`
+   dir=`echo "$object" | sed 's,/.*$,/,'`
+   if test "$dir" = "$object"; then
+      dir=
+   fi
+   # FIXME: should be _deps on DOS.
+   depfile="$dir.deps/$base"
+fi
+
+tmpdepfile=${tmpdepfile-`echo "$depfile" | sed 's/\.\([^.]*\)$/.T\1/'`}
+
+rm -f "$tmpdepfile"
+
+# Some modes work just like other modes, but use different flags.  We
+# parameterize here, but still list the modes in the big case below,
+# to make depend.m4 easier to write.  Note that we *cannot* use a case
+# here, because this file can only contain one case statement.
+if test "$depmode" = hp; then
+  # HP compiler uses -M and no extra arg.
+  gccflag=-M
+  depmode=gcc
+fi
+
+if test "$depmode" = dashXmstdout; then
+   # This is just like dashmstdout with a different argument.
+   dashmflag=-xM
+   depmode=dashmstdout
+fi
+
+case "$depmode" in
+gcc3)
+## gcc 3 implements dependency tracking that does exactly what
+## we want.  Yay!  Note: for some reason libtool 1.4 doesn't like
+## it if -MD -MP comes after the -MF stuff.  Hmm.
+  "$@" -MT "$object" -MD -MP -MF "$tmpdepfile"
+  stat=$?
+  if test $stat -eq 0; then :
+  else
+    rm -f "$tmpdepfile"
+    exit $stat
+  fi
+  mv "$tmpdepfile" "$depfile"
+  ;;
+
+gcc)
+## There are various ways to get dependency output from gcc.  Here's
+## why we pick this rather obscure method:
+## - Don't want to use -MD because we'd like the dependencies to end
+##   up in a subdir.  Having to rename by hand is ugly.
+##   (We might end up doing this anyway to support other compilers.)
+## - The DEPENDENCIES_OUTPUT environment variable makes gcc act like
+##   -MM, not -M (despite what the docs say).
+## - Using -M directly means running the compiler twice (even worse
+##   than renaming).
+  if test -z "$gccflag"; then
+    gccflag=-MD,
+  fi
+  "$@" -Wp,"$gccflag$tmpdepfile"
+  stat=$?
+  if test $stat -eq 0; then :
+  else
+    rm -f "$tmpdepfile"
+    exit $stat
+  fi
+  rm -f "$depfile"
+  echo "$object : \\" > "$depfile"
+  alpha=ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz
+## The second -e expression handles DOS-style file names with drive letters.
+  sed -e 's/^[^:]*: / /' \
+      -e 's/^['$alpha']:\/[^:]*: / /' < "$tmpdepfile" >> "$depfile"
+## This next piece of magic avoids the `deleted header file' problem.
+## The problem is that when a header file which appears in a .P file
+## is deleted, the dependency causes make to die (because there is
+## typically no way to rebuild the header).  We avoid this by adding
+## dummy dependencies for each header file.  Too bad gcc doesn't do
+## this for us directly.
+  tr ' ' '
+' < "$tmpdepfile" |
+## Some versions of gcc put a space before the `:'.  On the theory
+## that the space means something, we add a space to the output as
+## well.
+## Some versions of the HPUX 10.20 sed can't process this invocation
+## correctly.  Breaking it into two sed invocations is a workaround.
+    sed -e 's/^\\$//' -e '/^$/d' -e '/:$/d' | sed -e 's/$/ :/' >> "$depfile"
+  rm -f "$tmpdepfile"
+  ;;
+
+hp)
+  # This case exists only to let depend.m4 do its work.  It works by
+  # looking at the text of this script.  This case will never be run,
+  # since it is checked for above.
+  exit 1
+  ;;
+
+sgi)
+  if test "$libtool" = yes; then
+    "$@" "-Wp,-MDupdate,$tmpdepfile"
+  else
+    "$@" -MDupdate "$tmpdepfile"
+  fi
+  stat=$?
+  if test $stat -eq 0; then :
+  else
+    rm -f "$tmpdepfile"
+    exit $stat
+  fi
+  rm -f "$depfile"
+
+  if test -f "$tmpdepfile"; then  # yes, the sourcefile depend on other files
+    echo "$object : \\" > "$depfile"
+
+    # Clip off the initial element (the dependent).  Don't try to be
+    # clever and replace this with sed code, as IRIX sed won't handle
+    # lines with more than a fixed number of characters (4096 in
+    # IRIX 6.2 sed, 8192 in IRIX 6.5).  We also remove comment lines;
+    # the IRIX cc adds comments like `#:fec' to the end of the
+    # dependency line.
+    tr ' ' '
+' < "$tmpdepfile" \
+    | sed -e 's/^.*\.o://' -e 's/#.*$//' -e '/^$/ d' | \
+    tr '
+' ' ' >> $depfile
+    echo >> $depfile
+
+    # The second pass generates a dummy entry for each header file.
+    tr ' ' '
+' < "$tmpdepfile" \
+   | sed -e 's/^.*\.o://' -e 's/#.*$//' -e '/^$/ d' -e 's/$/:/' \
+   >> $depfile
+  else
+    # The sourcefile does not contain any dependencies, so just
+    # store a dummy comment line, to avoid errors with the Makefile
+    # "include basename.Plo" scheme.
+    echo "#dummy" > "$depfile"
+  fi
+  rm -f "$tmpdepfile"
+  ;;
+
+aix)
+  # The C for AIX Compiler uses -M and outputs the dependencies
+  # in a .u file.  This file always lives in the current directory.
+  # Also, the AIX compiler puts `$object:' at the start of each line;
+  # $object doesn't have directory information.
+  stripped=`echo "$object" | sed -e 's,^.*/,,' -e 's/\(.*\)\..*$/\1/'`
+  tmpdepfile="$stripped.u"
+  outname="$stripped.o"
+  if test "$libtool" = yes; then
+    "$@" -Wc,-M
+  else
+    "$@" -M
+  fi
+
+  stat=$?
+  if test $stat -eq 0; then :
+  else
+    rm -f "$tmpdepfile"
+    exit $stat
+  fi
+
+  if test -f "$tmpdepfile"; then
+    # Each line is of the form `foo.o: dependent.h'.
+    # Do two passes, one to just change these to
+    # `$object: dependent.h' and one to simply `dependent.h:'.
+    sed -e "s,^$outname:,$object :," < "$tmpdepfile" > "$depfile"
+    sed -e "s,^$outname: \(.*\)$,\1:," < "$tmpdepfile" >> "$depfile"
+  else
+    # The sourcefile does not contain any dependencies, so just
+    # store a dummy comment line, to avoid errors with the Makefile
+    # "include basename.Plo" scheme.
+    echo "#dummy" > "$depfile"
+  fi
+  rm -f "$tmpdepfile"
+  ;;
+
+icc)
+  # Intel's C compiler understands `-MD -MF file'.  However on
+  #    icc -MD -MF foo.d -c -o sub/foo.o sub/foo.c
+  # ICC 7.0 will fill foo.d with something like
+  #    foo.o: sub/foo.c
+  #    foo.o: sub/foo.h
+  # which is wrong.  We want:
+  #    sub/foo.o: sub/foo.c
+  #    sub/foo.o: sub/foo.h
+  #    sub/foo.c:
+  #    sub/foo.h:
+  # ICC 7.1 will output
+  #    foo.o: sub/foo.c sub/foo.h
+  # and will wrap long lines using \ :
+  #    foo.o: sub/foo.c ... \
+  #     sub/foo.h ... \
+  #     ...
+
+  "$@" -MD -MF "$tmpdepfile"
+  stat=$?
+  if test $stat -eq 0; then :
+  else
+    rm -f "$tmpdepfile"
+    exit $stat
+  fi
+  rm -f "$depfile"
+  # Each line is of the form `foo.o: dependent.h',
+  # or `foo.o: dep1.h dep2.h \', or ` dep3.h dep4.h \'.
+  # Do two passes, one to just change these to
+  # `$object: dependent.h' and one to simply `dependent.h:'.
+  sed "s,^[^:]*:,$object :," < "$tmpdepfile" > "$depfile"
+  # Some versions of the HPUX 10.20 sed can't process this invocation
+  # correctly.  Breaking it into two sed invocations is a workaround.
+  sed 's,^[^:]*: \(.*\)$,\1,;s/^\\$//;/^$/d;/:$/d' < "$tmpdepfile" |
+    sed -e 's/$/ :/' >> "$depfile"
+  rm -f "$tmpdepfile"
+  ;;
+
+tru64)
+   # The Tru64 compiler uses -MD to generate dependencies as a side
+   # effect.  `cc -MD -o foo.o ...' puts the dependencies into `foo.o.d'.
+   # At least on Alpha/Redhat 6.1, Compaq CCC V6.2-504 seems to put
+   # dependencies in `foo.d' instead, so we check for that too.
+   # Subdirectories are respected.
+   dir=`echo "$object" | sed -e 's|/[^/]*$|/|'`
+   test "x$dir" = "x$object" && dir=
+   base=`echo "$object" | sed -e 's|^.*/||' -e 's/\.o$//' -e 's/\.lo$//'`
+
+   if test "$libtool" = yes; then
+      tmpdepfile1="$dir.libs/$base.lo.d"
+      tmpdepfile2="$dir.libs/$base.d"
+      "$@" -Wc,-MD
+   else
+      tmpdepfile1="$dir$base.o.d"
+      tmpdepfile2="$dir$base.d"
+      "$@" -MD
+   fi
+
+   stat=$?
+   if test $stat -eq 0; then :
+   else
+      rm -f "$tmpdepfile1" "$tmpdepfile2"
+      exit $stat
+   fi
+
+   if test -f "$tmpdepfile1"; then
+      tmpdepfile="$tmpdepfile1"
+   else
+      tmpdepfile="$tmpdepfile2"
+   fi
+   if test -f "$tmpdepfile"; then
+      sed -e "s,^.*\.[a-z]*:,$object:," < "$tmpdepfile" > "$depfile"
+      # That's a space and a tab in the [].
+      sed -e 's,^.*\.[a-z]*:[ 	]*,,' -e 's,$,:,' < "$tmpdepfile" >> "$depfile"
+   else
+      echo "#dummy" > "$depfile"
+   fi
+   rm -f "$tmpdepfile"
+   ;;
+
+#nosideeffect)
+  # This comment above is used by automake to tell side-effect
+  # dependency tracking mechanisms from slower ones.
+
+dashmstdout)
+  # Important note: in order to support this mode, a compiler *must*
+  # always write the proprocessed file to stdout, regardless of -o.
+  "$@" || exit $?
+
+  # Remove the call to Libtool.
+  if test "$libtool" = yes; then
+    while test $1 != '--mode=compile'; do
+      shift
+    done
+    shift
+  fi
+
+  # Remove `-o $object'.
+  IFS=" "
+  for arg
+  do
+    case $arg in
+    -o)
+      shift
+      ;;
+    $object)
+      shift
+      ;;
+    *)
+      set fnord "$@" "$arg"
+      shift # fnord
+      shift # $arg
+      ;;
+    esac
+  done
+
+  test -z "$dashmflag" && dashmflag=-M
+  # Require at least two characters before searching for `:'
+  # in the target name.  This is to cope with DOS-style filenames:
+  # a dependency such as `c:/foo/bar' could be seen as target `c' otherwise.
+  "$@" $dashmflag |
+    sed 's:^[  ]*[^: ][^:][^:]*\:[    ]*:'"$object"'\: :' > "$tmpdepfile"
+  rm -f "$depfile"
+  cat < "$tmpdepfile" > "$depfile"
+  tr ' ' '
+' < "$tmpdepfile" | \
+## Some versions of the HPUX 10.20 sed can't process this invocation
+## correctly.  Breaking it into two sed invocations is a workaround.
+    sed -e 's/^\\$//' -e '/^$/d' -e '/:$/d' | sed -e 's/$/ :/' >> "$depfile"
+  rm -f "$tmpdepfile"
+  ;;
+
+dashXmstdout)
+  # This case only exists to satisfy depend.m4.  It is never actually
+  # run, as this mode is specially recognized in the preamble.
+  exit 1
+  ;;
+
+makedepend)
+  "$@" || exit $?
+  # Remove any Libtool call
+  if test "$libtool" = yes; then
+    while test $1 != '--mode=compile'; do
+      shift
+    done
+    shift
+  fi
+  # X makedepend
+  shift
+  cleared=no
+  for arg in "$@"; do
+    case $cleared in
+    no)
+      set ""; shift
+      cleared=yes ;;
+    esac
+    case "$arg" in
+    -D*|-I*)
+      set fnord "$@" "$arg"; shift ;;
+    # Strip any option that makedepend may not understand.  Remove
+    # the object too, otherwise makedepend will parse it as a source file.
+    -*|$object)
+      ;;
+    *)
+      set fnord "$@" "$arg"; shift ;;
+    esac
+  done
+  obj_suffix="`echo $object | sed 's/^.*\././'`"
+  touch "$tmpdepfile"
+  ${MAKEDEPEND-makedepend} -o"$obj_suffix" -f"$tmpdepfile" "$@"
+  rm -f "$depfile"
+  cat < "$tmpdepfile" > "$depfile"
+  sed '1,2d' "$tmpdepfile" | tr ' ' '
+' | \
+## Some versions of the HPUX 10.20 sed can't process this invocation
+## correctly.  Breaking it into two sed invocations is a workaround.
+    sed -e 's/^\\$//' -e '/^$/d' -e '/:$/d' | sed -e 's/$/ :/' >> "$depfile"
+  rm -f "$tmpdepfile" "$tmpdepfile".bak
+  ;;
+
+cpp)
+  # Important note: in order to support this mode, a compiler *must*
+  # always write the proprocessed file to stdout.
+  "$@" || exit $?
+
+  # Remove the call to Libtool.
+  if test "$libtool" = yes; then
+    while test $1 != '--mode=compile'; do
+      shift
+    done
+    shift
+  fi
+
+  # Remove `-o $object'.
+  IFS=" "
+  for arg
+  do
+    case $arg in
+    -o)
+      shift
+      ;;
+    $object)
+      shift
+      ;;
+    *)
+      set fnord "$@" "$arg"
+      shift # fnord
+      shift # $arg
+      ;;
+    esac
+  done
+
+  "$@" -E |
+    sed -n '/^# [0-9][0-9]* "\([^"]*\)".*/ s:: \1 \\:p' |
+    sed '$ s: \\$::' > "$tmpdepfile"
+  rm -f "$depfile"
+  echo "$object : \\" > "$depfile"
+  cat < "$tmpdepfile" >> "$depfile"
+  sed < "$tmpdepfile" '/^$/d;s/^ //;s/ \\$//;s/$/ :/' >> "$depfile"
+  rm -f "$tmpdepfile"
+  ;;
+
+msvisualcpp)
+  # Important note: in order to support this mode, a compiler *must*
+  # always write the proprocessed file to stdout, regardless of -o,
+  # because we must use -o when running libtool.
+  "$@" || exit $?
+  IFS=" "
+  for arg
+  do
+    case "$arg" in
+    "-Gm"|"/Gm"|"-Gi"|"/Gi"|"-ZI"|"/ZI")
+	set fnord "$@"
+	shift
+	shift
+	;;
+    *)
+	set fnord "$@" "$arg"
+	shift
+	shift
+	;;
+    esac
+  done
+  "$@" -E |
+  sed -n '/^#line [0-9][0-9]* "\([^"]*\)"/ s::echo "`cygpath -u \\"\1\\"`":p' | sort | uniq > "$tmpdepfile"
+  rm -f "$depfile"
+  echo "$object : \\" > "$depfile"
+  . "$tmpdepfile" | sed 's% %\\ %g' | sed -n '/^\(.*\)$/ s::	\1 \\:p' >> "$depfile"
+  echo "	" >> "$depfile"
+  . "$tmpdepfile" | sed 's% %\\ %g' | sed -n '/^\(.*\)$/ s::\1\::p' >> "$depfile"
+  rm -f "$tmpdepfile"
+  ;;
+
+none)
+  exec "$@"
+  ;;
+
+*)
+  echo "Unknown depmode $depmode" 1>&2
+  exit 1
+  ;;
+esac
+
+exit 0


Property changes on: packages/libhdf4/branches/upstream/current/bin/depcomp
___________________________________________________________________
Name: svn:executable
   + *

Added: packages/libhdf4/branches/upstream/current/bin/install-sh
===================================================================
--- packages/libhdf4/branches/upstream/current/bin/install-sh	                        (rev 0)
+++ packages/libhdf4/branches/upstream/current/bin/install-sh	2007-05-15 09:53:05 UTC (rev 831)
@@ -0,0 +1,294 @@
+#!/bin/sh
+#
+# install - install a program, script, or datafile
+#
+# This originates from X11R5 (mit/util/scripts/install.sh), which was
+# later released in X11R6 (xc/config/util/install.sh) with the
+# following copyright and license.
+#
+# Copyright (C) 1994 X Consortium
+#
+# Permission is hereby granted, free of charge, to any person obtaining a copy
+# of this software and associated documentation files (the "Software"), to
+# deal in the Software without restriction, including without limitation the
+# rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
+# sell copies of the Software, and to permit persons to whom the Software is
+# furnished to do so, subject to the following conditions:
+#
+# The above copyright notice and this permission notice shall be included in
+# all copies or substantial portions of the Software.
+#
+# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL THE
+# X CONSORTIUM BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
+# AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNEC-
+# TION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+#
+# Except as contained in this notice, the name of the X Consortium shall not
+# be used in advertising or otherwise to promote the sale, use or other deal-
+# ings in this Software without prior written authorization from the X Consor-
+# tium.
+#
+#
+# FSF changes to this file are in the public domain.
+#
+# Calling this script install-sh is preferred over install.sh, to prevent
+# `make' implicit rules from creating a file called install from it
+# when there is no Makefile.
+#
+# This script is compatible with the BSD install script, but was written
+# from scratch.  It can only install one file at a time, a restriction
+# shared with many OS's install programs.
+
+
+# set DOITPROG to echo to test this script
+
+# Don't use :- since 4.3BSD and earlier shells don't like it.
+doit="${DOITPROG-}"
+
+
+# put in absolute paths if you don't have them in your path; or use env. vars.
+
+mvprog="${MVPROG-mv}"
+cpprog="${CPPROG-cp}"
+chmodprog="${CHMODPROG-chmod}"
+chownprog="${CHOWNPROG-chown}"
+chgrpprog="${CHGRPPROG-chgrp}"
+stripprog="${STRIPPROG-strip}"
+rmprog="${RMPROG-rm}"
+mkdirprog="${MKDIRPROG-mkdir}"
+
+transformbasename=""
+transform_arg=""
+instcmd="$mvprog"
+chmodcmd="$chmodprog 0755"
+chowncmd=""
+chgrpcmd=""
+stripcmd=""
+rmcmd="$rmprog -f"
+mvcmd="$mvprog"
+src=""
+dst=""
+dir_arg=""
+
+while [ x"$1" != x ]; do
+    case $1 in
+	-c) instcmd=$cpprog
+	    shift
+	    continue;;
+
+	-d) dir_arg=true
+	    shift
+	    continue;;
+
+	-m) chmodcmd="$chmodprog $2"
+	    shift
+	    shift
+	    continue;;
+
+	-o) chowncmd="$chownprog $2"
+	    shift
+	    shift
+	    continue;;
+
+	-g) chgrpcmd="$chgrpprog $2"
+	    shift
+	    shift
+	    continue;;
+
+	-s) stripcmd=$stripprog
+	    shift
+	    continue;;
+
+	-t=*) transformarg=`echo $1 | sed 's/-t=//'`
+	    shift
+	    continue;;
+
+	-b=*) transformbasename=`echo $1 | sed 's/-b=//'`
+	    shift
+	    continue;;
+
+	*)  if [ x"$src" = x ]
+	    then
+		src=$1
+	    else
+		# this colon is to work around a 386BSD /bin/sh bug
+		:
+		dst=$1
+	    fi
+	    shift
+	    continue;;
+    esac
+done
+
+if [ x"$src" = x ]
+then
+	echo "$0: no input file specified" >&2
+	exit 1
+else
+	:
+fi
+
+if [ x"$dir_arg" != x ]; then
+	dst=$src
+	src=""
+
+	if [ -d "$dst" ]; then
+		instcmd=:
+		chmodcmd=""
+	else
+		instcmd=$mkdirprog
+	fi
+else
+
+# Waiting for this to be detected by the "$instcmd $src $dsttmp" command
+# might cause directories to be created, which would be especially bad
+# if $src (and thus $dsttmp) contains '*'.
+
+	if [ -f "$src" ] || [ -d "$src" ]
+	then
+		:
+	else
+		echo "$0: $src does not exist" >&2
+		exit 1
+	fi
+
+	if [ x"$dst" = x ]
+	then
+		echo "$0: no destination specified" >&2
+		exit 1
+	else
+		:
+	fi
+
+# If destination is a directory, append the input filename; if your system
+# does not like double slashes in filenames, you may need to add some logic
+
+	if [ -d "$dst" ]
+	then
+		dst=$dst/`basename "$src"`
+	else
+		:
+	fi
+fi
+
+## this sed command emulates the dirname command
+dstdir=`echo "$dst" | sed -e 's,[^/]*$,,;s,/$,,;s,^$,.,'`
+
+# Make sure that the destination directory exists.
+#  this part is taken from Noah Friedman's mkinstalldirs script
+
+# Skip lots of stat calls in the usual case.
+if [ ! -d "$dstdir" ]; then
+defaultIFS='
+	'
+IFS="${IFS-$defaultIFS}"
+
+oIFS=$IFS
+# Some sh's can't handle IFS=/ for some reason.
+IFS='%'
+set - `echo "$dstdir" | sed -e 's@/@%@g' -e 's@^%@/@'`
+IFS=$oIFS
+
+pathcomp=''
+
+while [ $# -ne 0 ] ; do
+	pathcomp=$pathcomp$1
+	shift
+
+	if [ ! -d "$pathcomp" ] ;
+        then
+		$mkdirprog "$pathcomp"
+	else
+		:
+	fi
+
+	pathcomp=$pathcomp/
+done
+fi
+
+if [ x"$dir_arg" != x ]
+then
+	$doit $instcmd "$dst" &&
+
+	if [ x"$chowncmd" != x ]; then $doit $chowncmd "$dst"; else : ; fi &&
+	if [ x"$chgrpcmd" != x ]; then $doit $chgrpcmd "$dst"; else : ; fi &&
+	if [ x"$stripcmd" != x ]; then $doit $stripcmd "$dst"; else : ; fi &&
+	if [ x"$chmodcmd" != x ]; then $doit $chmodcmd "$dst"; else : ; fi
+else
+
+# If we're going to rename the final executable, determine the name now.
+
+	if [ x"$transformarg" = x ]
+	then
+		dstfile=`basename "$dst"`
+	else
+		dstfile=`basename "$dst" $transformbasename |
+			sed $transformarg`$transformbasename
+	fi
+
+# don't allow the sed command to completely eliminate the filename
+
+	if [ x"$dstfile" = x ]
+	then
+		dstfile=`basename "$dst"`
+	else
+		:
+	fi
+
+# Make a couple of temp file names in the proper directory.
+
+	dsttmp=$dstdir/_inst.$$_
+	rmtmp=$dstdir/_rm.$$_
+
+# Trap to clean up temp files at exit.
+
+	trap 'status=$?; rm -f "$dsttmp" "$rmtmp" && exit $status' 0
+	trap '(exit $?); exit' 1 2 13 15
+
+# Move or copy the file name to the temp name
+
+	$doit $instcmd "$src" "$dsttmp" &&
+
+# and set any options; do chmod last to preserve setuid bits
+
+# If any of these fail, we abort the whole thing.  If we want to
+# ignore errors from any of these, just make sure not to ignore
+# errors from the above "$doit $instcmd $src $dsttmp" command.
+
+	if [ x"$chowncmd" != x ]; then $doit $chowncmd "$dsttmp"; else :;fi &&
+	if [ x"$chgrpcmd" != x ]; then $doit $chgrpcmd "$dsttmp"; else :;fi &&
+	if [ x"$stripcmd" != x ]; then $doit $stripcmd "$dsttmp"; else :;fi &&
+	if [ x"$chmodcmd" != x ]; then $doit $chmodcmd "$dsttmp"; else :;fi &&
+
+# Now remove or move aside any old file at destination location.  We try this
+# two ways since rm can't unlink itself on some systems and the destination
+# file might be busy for other reasons.  In this case, the final cleanup
+# might fail but the new file should still install successfully.
+
+{
+	if [ -f "$dstdir/$dstfile" ]
+	then
+		$doit $rmcmd -f "$dstdir/$dstfile" 2>/dev/null ||
+		$doit $mvcmd -f "$dstdir/$dstfile" "$rmtmp" 2>/dev/null ||
+		{
+		  echo "$0: cannot unlink or rename $dstdir/$dstfile" >&2
+		  (exit 1); exit
+		}
+	else
+		:
+	fi
+} &&
+
+# Now rename the file to the real destination.
+
+	$doit $mvcmd "$dsttmp" "$dstdir/$dstfile"
+
+fi &&
+
+# The final little trick to "correctly" pass the exit status to the exit trap.
+
+{
+	(exit 0); exit
+}


Property changes on: packages/libhdf4/branches/upstream/current/bin/install-sh
___________________________________________________________________
Name: svn:executable
   + *

Added: packages/libhdf4/branches/upstream/current/bin/locate_sw
===================================================================
--- packages/libhdf4/branches/upstream/current/bin/locate_sw	                        (rev 0)
+++ packages/libhdf4/branches/upstream/current/bin/locate_sw	2007-05-15 09:53:05 UTC (rev 831)
@@ -0,0 +1,282 @@
+#!/bin/sh
+# Try to locate the software as named in argument.
+# This is a sequential search of all possible locations of the software.
+# Usage: locate_sw <SW-Name>
+# It prints a string showing the paths leading to the include, lib and bin
+# directory of the software, separated by colons.  E.g., if the software is
+# located in /usr/sdt/*, it prints
+# /usr/sdt/include:/usr/sdt/lib:/usr/sdt/bin
+# Any component that is not found will be returned as an empty string. E.g.,
+# if somehow the header files of the software are not found, it prints
+# :/usr/sdt/lib;/usr/sdt/bin
+
+# Function definitions
+USAGE()
+{
+    echo "Usage: locate_sw <SW-Name>"
+    echo "    where <SW-Name> can be hdf4, hdf5, zlib"
+    echo "    It prints the paths leading the header files (include),"
+    echo "    library (lib), and tools (bin).   E.g.,"
+    echo "    /usr/sdt/include:/usr/sdt/lib:/usr/sdt/bin"
+    echo "    Any component that is not found will be returned as an empty string. E.g.,"
+    echo "    if somehow the header files of the software are not found, it prints"
+    echo "    :/usr/sdt/lib;/usr/sdt/bin"
+    echo "Exit code: 0 if software located; otherwise non-zero"
+}
+
+# locate hdf4 software
+locate_hdf4()
+{
+# this default is the best guess of locating hdf4 software
+swpaths_defaults="/usr/ncsa /usr/sdt /usr/local"
+swpaths=
+
+case "$OSname" in
+    SunOS)
+        case "$OSrelease" in
+            5.7)
+               swpaths="/afs/ncsa/packages/hdf/SunOS_5.7"
+               ;;
+	    *)
+            # use default
+	       ;;
+        esac
+        ;;
+    HP-UX)
+        case "$OSrelease" in
+	   B.11.00)
+	        swpaths="/afs/ncsa/packages/hdf/HPUX_11.00"
+               ;;
+           *)
+           # use default
+              ;;
+        esac
+	;;
+    IRIX)
+	swpaths="/afs/ncsa/packages/hdf/IRIX_6.5"
+	;;
+    IRIX64)
+	case "$CC" in
+	cc|"")	#default cc
+	    abi=`cc -show_defaults 2>&1 | grep 'default abi'`
+	    case $abi in
+	    *-n32)
+		swpaths="/afs/ncsa/packages/hdf/IRIX64-n32_6.5"
+		;;
+	    *-64)
+		swpaths="/afs/ncsa/packages/hdf/IRIX64_6.5"
+		;;
+	    *)
+		swpaths="/afs/ncsa/packages/hdf/IRIX64_6.5"
+		;;
+	    esac	# $abi
+	    ;;
+	*-n32)
+	    swpaths="/afs/ncsa/packages/hdf/IRIX64-n32_6.5"
+	    ;;
+	*)
+	    swpaths="/afs/ncsa/packages/hdf/IRIX64_6.5"
+	    ;;
+	esac
+	;;
+    Linux)
+	swpaths="/afs/ncsa/packages/hdf/Linux"
+	;;
+    OSF1)
+	swpaths="/afs/ncsa/packages/hdf/OSF1_V4.0"
+	;;
+    *)
+	# just use the defaults
+	;;
+esac
+
+# Check if the hdf4 software is actually available.
+# Accept the directory only if needed .h, .a and tools are found
+# in the same place.  That way, they are more likely to be of the
+# same version.
+# 
+swpaths="$swpaths $swpaths_defaults"
+for sw in $swpaths; do
+    if [ -r $sw/include/hdf.h -a -r $sw/lib/libdf.a -a -r $sw/bin/hdp ]; then
+	SW_inc=$sw/include
+	SW_lib=$sw/lib
+	SW_bin=$sw/bin
+	SW_Location=$sw
+	break
+    fi
+done
+}
+
+# locate hdf5 software
+locate_hdf5()
+{
+# this default is the best guess of locating hdf5 software
+swpaths_defaults="/usr/ncsa /usr/sdt /usr/local"
+swpaths=
+
+case "$OSname" in
+    SunOS)
+        case "$OSrelease" in
+            5.7)
+               swpaths="/afs/ncsa/packages/hdf5/SunOS_5.7"
+               ;;
+	    *)
+            # use default
+	       ;;
+        esac
+        ;;
+    HP-UX)
+        case "$OSrelease" in
+	   B.11.00)
+	        swpaths="/afs/ncsa/packages/hdf5/HPUX_11.00"
+               ;;
+           *)
+           # use default
+              ;;
+        esac
+	;;
+    IRIX)
+	swpaths="/afs/ncsa/packages/hdf5/IRIX_6.5"
+	;;
+    IRIX64)
+	case "$CC" in
+	cc|"")	#default cc
+	    abi=`cc -show_defaults 2>&1 | grep 'default abi'`
+	    case $abi in
+	    *-n32)
+		swpaths="/afs/ncsa/packages/hdf5/IRIX64-n32_6.5"
+		;;
+	    *-64)
+		#swpaths="/afs/ncsa/packages/hdf5/IRIX64_6.5"
+                swpaths="/afs/ncsa/packages/hdf5/5-1.4.3-irix64"
+		;;
+	    *)
+		#swpaths="/afs/ncsa/packages/hdf5/IRIX64_6.5"
+                swpaths="/afs/ncsa/packages/hdf5/5-1.4.3-irix64"  
+		;;
+	    esac	# $abi
+	    ;;
+	*-n32)
+	    swpaths="/afs/ncsa/packages/hdf5/IRIX64-n32_6.5"
+	    ;;
+	*)
+	    #swpaths="/afs/ncsa/packages/hdf5/IRIX64_6.5"
+            swpaths="/afs/ncsa/packages/hdf5/5-1.4.3-irix64"
+	    ;;
+	esac
+	;;
+    Linux)
+	swpaths="/afs/ncsa/packages/hdf5/Linux"
+	;;
+    FreeBSD)
+        swpaths="/afs/ncsa/packages/hdf5/FreeBSD"
+        ;;
+    OSF1)
+	swpaths="/afs/ncsa/packages/hdf5/OSF1_V4.0"
+	;;
+    *)
+	# just use the defaults
+	;;
+esac
+
+# Check if the hdf5 software is actually available.
+# Accept the directory only if needed .h, .a and tools are found
+# in the same place.  That way, they are more likely to be of the
+# same version.
+# 
+swpaths="$swpaths $swpaths_defaults"
+for sw in $swpaths; do
+    if [ -r $sw/include/hdf5.h -a -r $sw/lib/libhdf5.a -a -r $sw/bin/h5dump ]; then
+	SW_inc=$sw/include
+	SW_lib=$sw/lib
+	SW_bin=$sw/bin
+	SW_Location=$sw
+	break
+    fi
+done
+}
+
+# locate zlib software
+locate_zlib()
+{
+# this default is the best guess of locating zlib software
+swpaths_defaults="/usr /usr/local /usr/ncsa /usr/sdt"
+swpaths=
+
+
+# Check if the zlib software is actually available.
+# Accept the directory only if needed .h, .a and tools are found
+# in the same place.  That way, they are more likely to be of the
+# same version.
+# Don't know something specific to check the bin directory.  Maybe gzip?
+# Just make sure it exists.
+# 
+swpaths="$swpaths $swpaths_defaults"
+for sw in $swpaths; do
+    if [ -r $sw/include/zlib.h -a	\
+	    \( -r $sw/lib/libz.a -o -r $sw/lib/libz.so \) -a -d $cw/bin ]; then
+	SW_inc=$sw/include
+	SW_lib=$sw/lib
+	SW_bin=$sw/bin
+	SW_Location=$sw
+	break
+    fi
+done
+
+# if none found, try HDF4 software which contains a version of zlib.
+if [ x-$SW_Location = x- ]; then
+    locate_hdf4
+fi
+
+}
+
+# Main
+#
+# Options
+#
+if [ $# -lt 1 ]; then
+    USAGE
+    exit 1
+fi
+
+if [ "$1" = -h ]; then
+    USAGE
+    exit 0
+fi
+
+SW=$1
+shift
+
+# locations of the software seeked.
+SW_inc=			# include place
+SW_lib=			# library place
+SW_bin=			# binary place
+SW_Location=		# parent directory of all the above
+
+OSname=`uname -s`
+OSrelease=`uname -r`
+
+case $SW in
+hdf4|hdf)
+    locate_hdf4
+    ;;
+hdf5)
+    locate_hdf5
+    ;;
+zlib)
+    locate_zlib
+    ;;
+*)
+    echo "unknown software ($SW)"
+    USAGE
+    exit 1
+    ;;
+esac
+
+# show the results located, separated by commas.
+if [ -n "${SW_inc}" -a -n "${SW_lib}" -a -n "${SW_bin}" ]; then
+    echo ${SW_inc},${SW_lib},${SW_bin}
+    exit 0
+else
+    exit 1
+fi


Property changes on: packages/libhdf4/branches/upstream/current/bin/locate_sw
___________________________________________________________________
Name: svn:executable
   + *

Added: packages/libhdf4/branches/upstream/current/bin/missing
===================================================================
--- packages/libhdf4/branches/upstream/current/bin/missing	                        (rev 0)
+++ packages/libhdf4/branches/upstream/current/bin/missing	2007-05-15 09:53:05 UTC (rev 831)
@@ -0,0 +1,336 @@
+#! /bin/sh
+# Common stub for a few missing GNU programs while installing.
+# Copyright (C) 1996, 1997, 1999, 2000, 2002 Free Software Foundation, Inc.
+# Originally by Fran,cois Pinard <pinard at iro.umontreal.ca>, 1996.
+
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2, or (at your option)
+# any later version.
+
+# 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 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., 59 Temple Place - Suite 330, Boston, MA
+# 02111-1307, USA.
+
+# As a special exception to the GNU General Public License, if you
+# distribute this file as part of a program that contains a
+# configuration script generated by Autoconf, you may include it under
+# the same distribution terms that you use for the rest of that program.
+
+if test $# -eq 0; then
+  echo 1>&2 "Try \`$0 --help' for more information"
+  exit 1
+fi
+
+run=:
+
+# In the cases where this matters, `missing' is being run in the
+# srcdir already.
+if test -f configure.ac; then
+  configure_ac=configure.ac
+else
+  configure_ac=configure.in
+fi
+
+case "$1" in
+--run)
+  # Try to run requested program, and just exit if it succeeds.
+  run=
+  shift
+  "$@" && exit 0
+  ;;
+esac
+
+# If it does not exist, or fails to run (possibly an outdated version),
+# try to emulate it.
+case "$1" in
+
+  -h|--h|--he|--hel|--help)
+    echo "\
+$0 [OPTION]... PROGRAM [ARGUMENT]...
+
+Handle \`PROGRAM [ARGUMENT]...' for when PROGRAM is missing, or return an
+error status if there is no known handling for PROGRAM.
+
+Options:
+  -h, --help      display this help and exit
+  -v, --version   output version information and exit
+  --run           try to run the given command, and emulate it if it fails
+
+Supported PROGRAM values:
+  aclocal      touch file \`aclocal.m4'
+  autoconf     touch file \`configure'
+  autoheader   touch file \`config.h.in'
+  automake     touch all \`Makefile.in' files
+  bison        create \`y.tab.[ch]', if possible, from existing .[ch]
+  flex         create \`lex.yy.c', if possible, from existing .c
+  help2man     touch the output file
+  lex          create \`lex.yy.c', if possible, from existing .c
+  makeinfo     touch the output file
+  tar          try tar, gnutar, gtar, then tar without non-portable flags
+  yacc         create \`y.tab.[ch]', if possible, from existing .[ch]"
+    ;;
+
+  -v|--v|--ve|--ver|--vers|--versi|--versio|--version)
+    echo "missing 0.4 - GNU automake"
+    ;;
+
+  -*)
+    echo 1>&2 "$0: Unknown \`$1' option"
+    echo 1>&2 "Try \`$0 --help' for more information"
+    exit 1
+    ;;
+
+  aclocal*)
+    if test -z "$run" && ($1 --version) > /dev/null 2>&1; then
+       # We have it, but it failed.
+       exit 1
+    fi
+
+    echo 1>&2 "\
+WARNING: \`$1' is missing on your system.  You should only need it if
+         you modified \`acinclude.m4' or \`${configure_ac}'.  You might want
+         to install the \`Automake' and \`Perl' packages.  Grab them from
+         any GNU archive site."
+    touch aclocal.m4
+    ;;
+
+  autoconf)
+    if test -z "$run" && ($1 --version) > /dev/null 2>&1; then
+       # We have it, but it failed.
+       exit 1
+    fi
+
+    echo 1>&2 "\
+WARNING: \`$1' is missing on your system.  You should only need it if
+         you modified \`${configure_ac}'.  You might want to install the
+         \`Autoconf' and \`GNU m4' packages.  Grab them from any GNU
+         archive site."
+    touch configure
+    ;;
+
+  autoheader)
+    if test -z "$run" && ($1 --version) > /dev/null 2>&1; then
+       # We have it, but it failed.
+       exit 1
+    fi
+
+    echo 1>&2 "\
+WARNING: \`$1' is missing on your system.  You should only need it if
+         you modified \`acconfig.h' or \`${configure_ac}'.  You might want
+         to install the \`Autoconf' and \`GNU m4' packages.  Grab them
+         from any GNU archive site."
+    files=`sed -n 's/^[ ]*A[CM]_CONFIG_HEADER(\([^)]*\)).*/\1/p' ${configure_ac}`
+    test -z "$files" && files="config.h"
+    touch_files=
+    for f in $files; do
+      case "$f" in
+      *:*) touch_files="$touch_files "`echo "$f" |
+				       sed -e 's/^[^:]*://' -e 's/:.*//'`;;
+      *) touch_files="$touch_files $f.in";;
+      esac
+    done
+    touch $touch_files
+    ;;
+
+  automake*)
+    if test -z "$run" && ($1 --version) > /dev/null 2>&1; then
+       # We have it, but it failed.
+       exit 1
+    fi
+
+    echo 1>&2 "\
+WARNING: \`$1' is missing on your system.  You should only need it if
+         you modified \`Makefile.am', \`acinclude.m4' or \`${configure_ac}'.
+         You might want to install the \`Automake' and \`Perl' packages.
+         Grab them from any GNU archive site."
+    find . -type f -name Makefile.am -print |
+	   sed 's/\.am$/.in/' |
+	   while read f; do touch "$f"; done
+    ;;
+
+  autom4te)
+    if test -z "$run" && ($1 --version) > /dev/null 2>&1; then
+       # We have it, but it failed.
+       exit 1
+    fi
+
+    echo 1>&2 "\
+WARNING: \`$1' is needed, and you do not seem to have it handy on your
+         system.  You might have modified some files without having the
+         proper tools for further handling them.
+         You can get \`$1Help2man' as part of \`Autoconf' from any GNU
+         archive site."
+
+    file=`echo "$*" | sed -n 's/.*--output[ =]*\([^ ]*\).*/\1/p'`
+    test -z "$file" && file=`echo "$*" | sed -n 's/.*-o[ ]*\([^ ]*\).*/\1/p'`
+    if test -f "$file"; then
+	touch $file
+    else
+	test -z "$file" || exec >$file
+	echo "#! /bin/sh"
+	echo "# Created by GNU Automake missing as a replacement of"
+	echo "#  $ $@"
+	echo "exit 0"
+	chmod +x $file
+	exit 1
+    fi
+    ;;
+
+  bison|yacc)
+    echo 1>&2 "\
+WARNING: \`$1' is missing on your system.  You should only need it if
+         you modified a \`.y' file.  You may need the \`Bison' package
+         in order for those modifications to take effect.  You can get
+         \`Bison' from any GNU archive site."
+    rm -f y.tab.c y.tab.h
+    if [ $# -ne 1 ]; then
+        eval LASTARG="\${$#}"
+	case "$LASTARG" in
+	*.y)
+	    SRCFILE=`echo "$LASTARG" | sed 's/y$/c/'`
+	    if [ -f "$SRCFILE" ]; then
+	         cp "$SRCFILE" y.tab.c
+	    fi
+	    SRCFILE=`echo "$LASTARG" | sed 's/y$/h/'`
+	    if [ -f "$SRCFILE" ]; then
+	         cp "$SRCFILE" y.tab.h
+	    fi
+	  ;;
+	esac
+    fi
+    if [ ! -f y.tab.h ]; then
+	echo >y.tab.h
+    fi
+    if [ ! -f y.tab.c ]; then
+	echo 'main() { return 0; }' >y.tab.c
+    fi
+    ;;
+
+  lex|flex)
+    echo 1>&2 "\
+WARNING: \`$1' is missing on your system.  You should only need it if
+         you modified a \`.l' file.  You may need the \`Flex' package
+         in order for those modifications to take effect.  You can get
+         \`Flex' from any GNU archive site."
+    rm -f lex.yy.c
+    if [ $# -ne 1 ]; then
+        eval LASTARG="\${$#}"
+	case "$LASTARG" in
+	*.l)
+	    SRCFILE=`echo "$LASTARG" | sed 's/l$/c/'`
+	    if [ -f "$SRCFILE" ]; then
+	         cp "$SRCFILE" lex.yy.c
+	    fi
+	  ;;
+	esac
+    fi
+    if [ ! -f lex.yy.c ]; then
+	echo 'main() { return 0; }' >lex.yy.c
+    fi
+    ;;
+
+  help2man)
+    if test -z "$run" && ($1 --version) > /dev/null 2>&1; then
+       # We have it, but it failed.
+       exit 1
+    fi
+
+    echo 1>&2 "\
+WARNING: \`$1' is missing on your system.  You should only need it if
+	 you modified a dependency of a manual page.  You may need the
+	 \`Help2man' package in order for those modifications to take
+	 effect.  You can get \`Help2man' from any GNU archive site."
+
+    file=`echo "$*" | sed -n 's/.*-o \([^ ]*\).*/\1/p'`
+    if test -z "$file"; then
+	file=`echo "$*" | sed -n 's/.*--output=\([^ ]*\).*/\1/p'`
+    fi
+    if [ -f "$file" ]; then
+	touch $file
+    else
+	test -z "$file" || exec >$file
+	echo ".ab help2man is required to generate this page"
+	exit 1
+    fi
+    ;;
+
+  makeinfo)
+    if test -z "$run" && (makeinfo --version) > /dev/null 2>&1; then
+       # We have makeinfo, but it failed.
+       exit 1
+    fi
+
+    echo 1>&2 "\
+WARNING: \`$1' is missing on your system.  You should only need it if
+         you modified a \`.texi' or \`.texinfo' file, or any other file
+         indirectly affecting the aspect of the manual.  The spurious
+         call might also be the consequence of using a buggy \`make' (AIX,
+         DU, IRIX).  You might want to install the \`Texinfo' package or
+         the \`GNU make' package.  Grab either from any GNU archive site."
+    file=`echo "$*" | sed -n 's/.*-o \([^ ]*\).*/\1/p'`
+    if test -z "$file"; then
+      file=`echo "$*" | sed 's/.* \([^ ]*\) *$/\1/'`
+      file=`sed -n '/^@setfilename/ { s/.* \([^ ]*\) *$/\1/; p; q; }' $file`
+    fi
+    touch $file
+    ;;
+
+  tar)
+    shift
+    if test -n "$run"; then
+      echo 1>&2 "ERROR: \`tar' requires --run"
+      exit 1
+    fi
+
+    # We have already tried tar in the generic part.
+    # Look for gnutar/gtar before invocation to avoid ugly error
+    # messages.
+    if (gnutar --version > /dev/null 2>&1); then
+       gnutar "$@" && exit 0
+    fi
+    if (gtar --version > /dev/null 2>&1); then
+       gtar "$@" && exit 0
+    fi
+    firstarg="$1"
+    if shift; then
+	case "$firstarg" in
+	*o*)
+	    firstarg=`echo "$firstarg" | sed s/o//`
+	    tar "$firstarg" "$@" && exit 0
+	    ;;
+	esac
+	case "$firstarg" in
+	*h*)
+	    firstarg=`echo "$firstarg" | sed s/h//`
+	    tar "$firstarg" "$@" && exit 0
+	    ;;
+	esac
+    fi
+
+    echo 1>&2 "\
+WARNING: I can't seem to be able to run \`tar' with the given arguments.
+         You may want to install GNU tar or Free paxutils, or check the
+         command line arguments."
+    exit 1
+    ;;
+
+  *)
+    echo 1>&2 "\
+WARNING: \`$1' is needed, and you do not seem to have it handy on your
+         system.  You might have modified some files without having the
+         proper tools for further handling them.  Check the \`README' file,
+         it often tells you about the needed prerequirements for installing
+         this package.  You may also peek at any GNU archive site, in case
+         some other package would contain this missing \`$1' program."
+    exit 1
+    ;;
+esac
+
+exit 0


Property changes on: packages/libhdf4/branches/upstream/current/bin/missing
___________________________________________________________________
Name: svn:executable
   + *

Added: packages/libhdf4/branches/upstream/current/bin/mkinstalldirs
===================================================================
--- packages/libhdf4/branches/upstream/current/bin/mkinstalldirs	                        (rev 0)
+++ packages/libhdf4/branches/upstream/current/bin/mkinstalldirs	2007-05-15 09:53:05 UTC (rev 831)
@@ -0,0 +1,111 @@
+#! /bin/sh
+# mkinstalldirs --- make directory hierarchy
+# Author: Noah Friedman <friedman at prep.ai.mit.edu>
+# Created: 1993-05-16
+# Public domain
+
+errstatus=0
+dirmode=""
+
+usage="\
+Usage: mkinstalldirs [-h] [--help] [-m mode] dir ..."
+
+# process command line arguments
+while test $# -gt 0 ; do
+  case $1 in
+    -h | --help | --h*)         # -h for help
+      echo "$usage" 1>&2
+      exit 0
+      ;;
+    -m)                         # -m PERM arg
+      shift
+      test $# -eq 0 && { echo "$usage" 1>&2; exit 1; }
+      dirmode=$1
+      shift
+      ;;
+    --)                         # stop option processing
+      shift
+      break
+      ;;
+    -*)                         # unknown option
+      echo "$usage" 1>&2
+      exit 1
+      ;;
+    *)                          # first non-opt arg
+      break
+      ;;
+  esac
+done
+
+for file
+do
+  if test -d "$file"; then
+    shift
+  else
+    break
+  fi
+done
+
+case $# in
+  0) exit 0 ;;
+esac
+
+case $dirmode in
+  '')
+    if mkdir -p -- . 2>/dev/null; then
+      echo "mkdir -p -- $*"
+      exec mkdir -p -- "$@"
+    fi
+    ;;
+  *)
+    if mkdir -m "$dirmode" -p -- . 2>/dev/null; then
+      echo "mkdir -m $dirmode -p -- $*"
+      exec mkdir -m "$dirmode" -p -- "$@"
+    fi
+    ;;
+esac
+
+for file
+do
+  set fnord `echo ":$file" | sed -ne 's/^:\//#/;s/^://;s/\// /g;s/^#/\//;p'`
+  shift
+
+  pathcomp=
+  for d
+  do
+    pathcomp="$pathcomp$d"
+    case $pathcomp in
+      -*) pathcomp=./$pathcomp ;;
+    esac
+
+    if test ! -d "$pathcomp"; then
+      echo "mkdir $pathcomp"
+
+      mkdir "$pathcomp" || lasterr=$?
+
+      if test ! -d "$pathcomp"; then
+  	errstatus=$lasterr
+      else
+  	if test ! -z "$dirmode"; then
+	  echo "chmod $dirmode $pathcomp"
+    	  lasterr=""
+  	  chmod "$dirmode" "$pathcomp" || lasterr=$?
+
+  	  if test ! -z "$lasterr"; then
+  	    errstatus=$lasterr
+  	  fi
+  	fi
+      fi
+    fi
+
+    pathcomp="$pathcomp/"
+  done
+done
+
+exit $errstatus
+
+# Local Variables:
+# mode: shell-script
+# sh-indentation: 2
+# End:
+# mkinstalldirs ends here


Property changes on: packages/libhdf4/branches/upstream/current/bin/mkinstalldirs
___________________________________________________________________
Name: svn:executable
   + *

Added: packages/libhdf4/branches/upstream/current/bin/regenerate.sh
===================================================================
--- packages/libhdf4/branches/upstream/current/bin/regenerate.sh	                        (rev 0)
+++ packages/libhdf4/branches/upstream/current/bin/regenerate.sh	2007-05-15 09:53:05 UTC (rev 831)
@@ -0,0 +1,28 @@
+#! /bin/sh
+#
+# Run this script in the top source directory of HDF4 to regenerate
+# all of the necessary files.
+#
+# This is a helper script to regenerate the aclocal.m4, h4config.h.in,
+# Makefile.in, and configure files all in one go. The versions for the
+# tools need to be according to this table or better:
+#
+#       Name            Version
+#       ----            -------
+#       autoreconf        2.57
+#
+#       aclocal           1.7.7
+#       automake          1.7.7
+#       autoheader        2.57
+#       autoconf          2.57
+#
+echo /usr/bin/autoreconf -v
+env AUTOMAKE="/usr/bin/automake --foreign" /usr/bin/autoreconf -v
+#echo /usr/bin/autoheader
+#/usr/bin/autoheader
+#echo /usr/bin/aclocal
+#/usr/bin/aclocal
+#echo /usr/bin/autoconf
+#/usr/bin/autoconf
+#echo /usr/bin/automake --foreign
+#/usr/bin/automake --foreign


Property changes on: packages/libhdf4/branches/upstream/current/bin/regenerate.sh
___________________________________________________________________
Name: svn:executable
   + *

Added: packages/libhdf4/branches/upstream/current/bin/runtest
===================================================================
--- packages/libhdf4/branches/upstream/current/bin/runtest	                        (rev 0)
+++ packages/libhdf4/branches/upstream/current/bin/runtest	2007-05-15 09:53:05 UTC (rev 831)
@@ -0,0 +1,811 @@
+#! /bin/sh
+#
+# Copyright by the Board of Trustees of the University of Illinois.
+# All rights reserved.
+#
+# This file is part of HDF.  The full HDF copyright notice, including
+# terms governing use, modification, and redistribution, is contained in
+# the files COPYING.  COPYING can be found at the root
+# of the source code distribution tree.  If you do not have
+# access to the file, you may request a copy from hdfhelp at ncsa.uiuc.edu.
+#
+# run the hdf4/bin/snapshot
+# Usage:
+#	runtest		run the test for the local host
+#	runtest <hostname>	run the test for <hostname>
+#	runtest -all		run the test for all predefined hosts
+#
+# Assumptions in knowing where to find the right scripts to execute.
+# 1. assume we are at the top level of the hdf4 source.  So, bin/* are
+#    where the script files are.
+# 2. after the cvs update is completed, we can go to the snapshot area
+#    hdf4 source tree and use the bin/* there.
+# 3. Cannot use the snapshot area scripts from the beginning because
+#    for one, the current directory is renamed as previous right after
+#    a snapshot release; and for another, some scripts may be changed
+#    by the cvs update while it is being used.
+
+# local setup
+DEBUGMODE=""
+test -n "$DEBUGMODE" && echo "******** DEBUGMODE is $DEBUGMODE ************"
+WHEREAMI='pwd'
+CMD=
+
+# the name of this program
+PROGNAME="bin/runtest $DEBUGMODE"
+
+# Setup
+HOSTNAME=`hostname | cut -f1 -d.`	# no domain part
+TODAY=`date +%y%m%d`
+WEEKDAY=`date +%a`
+H4VER=			# default to current CVS version
+H4VERSTR=		# default to current CVS version
+
+# Default to do checkout (only once) and test, no release.
+# Will run test only if there is significant differences from previous version.
+# If srcdir is not used, don't launched multiple tests
+SNAPSHOT="${DEBUGMODE:+echo }bin/snapshot"
+SRCDIR="srcdir"
+# Default standard Snaptest commands
+SNAPCMD="$SRCDIR test clean"
+# Default Standard snaptest command options
+STANDARD_OPT=""
+ENABLE_PARALLEL="--enable-parallel"
+CONFIGNAME=$HOSTNAME	# Name used in the SNAPTESTCFG file
+
+# test hosts default as local host.
+TESTHOST=""
+
+#################################
+# Function definitions
+#################################
+
+# Print messages to stdout
+# Use this to show output heading to stdout
+PRINT()
+{
+    echo "$*"
+}
+
+# Show seconds since midnight.
+# This is used to calculate seconds elapsed
+SecOfDay()
+{
+    set `date '+%H %M %S'`
+    t_sec=`expr $1 \* 3600 + $2 \* 60 + $3`
+    echo $t_sec
+}
+
+# Calculated the elapsed time (in seconds) between the first
+# and second time.  If second time is smaller than the first,
+# we assume the clock has passed midnight and calculate appropriately.
+ElapsedTime()
+{
+    if [ $2 -lt $1 ]; then
+	t_sec=`expr 3600 \* 24 - $1 + $2`
+    else
+	t_sec=`expr $2 - $1`
+    fi
+    echo `expr $t_sec / 60`m `expr $t_sec % 60`s
+}
+
+# Report errors
+# $1--an error message to be printed
+REPORT_ERR()
+{
+    ERRMSG=$1
+    # print it with a banner shifted right a bit
+    PRINT "	*************************************"
+    PRINT "	`date`"
+    PRINT "	$ERRMSG"
+    PRINT "	*************************************"
+    # report it in the FAILED-LOG file too
+    PRINT "$ERRMSG" >> $FAILEDLOG
+}
+
+#
+# Report results of the last test done
+REPORT_RESULT()
+{
+    if [ $retcode -eq 0 ]; then
+	if [ $skiptest = yes ]; then
+	    PRINT "SKIPPED ${HOSTNAME}: $TEST_TYPE" | tee -a $SKIPPEDLOG
+	else
+	    PRINT "PASSED ${HOSTNAME}: $TEST_TYPE" | tee -a $PASSEDLOG
+	fi
+    else
+	# test failed.
+	REPORT_ERR "****FAILED ${HOSTNAME}: $TEST_TYPE****"
+    fi
+}
+
+# Print a blank line
+PRINT_BLANK()
+{
+    PRINT
+}
+
+# Print test trailer
+PRINT_TEST_TRAILER()
+{
+    PRINT "*** finished $TEST_TYPE tests for $HOSTNAME ***"
+    date; EndTime=`SecOfDay`
+    PRINT Total time = `ElapsedTime $StartTime $EndTime`
+    PRINT_BLANK
+}
+
+# Print trailer summary
+PRINT_TRAILER()
+{
+    PRINT "*** finished tests in $HOSTNAME ***"
+    date; TotalEndTime=`SecOfDay`
+    PRINT "${HOSTNAME}: Ran $n_test $runtest_type, Grand total test time = " \
+          "`ElapsedTime $TotalStartTime $TotalEndTime`" | tee -a $TIMELOG
+    PRINT_BLANK
+}
+
+# Figure out which remote command to use to reach a host.
+# Try rsh first, then ssh.
+# $1--hostname to reach.
+CHECK_RSH()
+{
+    # Figure out how to use ping command in this host.
+    # Some hosts use "ping host count", some use "ping -c count host".
+    # Test "ping -c 3 -w 5" since it has timeout feature.
+    # Test "ping -c ..." style before "ping host 3" because some machines
+    # that recognize -c treat 'ping localhost 3' as to ping host '3'.
+    if [ -z "$PING" ]; then
+	if ping -c 3 -w 5 localhost >/dev/null 2>&1; then
+	    PING='ping -c 3 -w 5'
+	    PINGCOUNT=
+	elif ping -c 3 localhost >/dev/null 2>&1; then
+	    PING='ping -c 3'
+	    PINGCOUNT=
+	elif ping localhost 3 >/dev/null 2>&1; then
+	    PING=ping
+	    PINGCOUNT=3
+	else	# don't know how to use ping.
+	    PING=no_ping
+	    PINGCOUNT=
+	fi
+    fi
+    #
+    host=$1
+    # Try remote command with host if it responds to ping.
+    # Still try it if we don't know how to do ping.
+    if [ no_ping = "$PING" ] || $PING $host $PINGCOUNT >/dev/null 2>&1; then
+	if rsh $host -n hostname >/dev/null 2>&1; then
+	    RSH=rsh
+	elif ssh $host -n hostname >/dev/null 2>&1; then
+	    RSH=ssh
+	else
+	    PRINT cannot remote command with $host
+	    RSH="NoRemoteCommand"
+	fi
+    else
+	RSH="NotReachable"
+    fi
+}
+
+
+# Wait for a file for at most number of minutes
+# $1--the file
+# $2--number of minutes
+# WAIT_STATUS set to:
+#	-1 if errors encountered
+#	0  if file found within time limit
+#	1  if file not found within time limit
+WAITFOR()
+{
+    wait_file=$1
+    nminutes=$2
+    if [ -z "$wait_file" -o ! "$nminutes" -ge 0 ]
+    then
+	PRINT "errors in argument of WAITFOR(): wait_file($1) or nminutes($2)"
+	WAIT_STATUS=-1
+	return
+    fi
+    while [ ! -f $wait_file ]; do
+	if [ $nminutes -gt 0 ]; then
+	    PRINT "Wait For $wait_file to appear"
+	    sleep 60			#sleep 1 minute
+	else
+	    WAIT_STATUS=1
+	    return
+	fi
+	nminutes=`expr $nminutes - 1`
+    done
+    WAIT_STATUS=0
+    return
+}
+
+
+# Wait till a file disappears for at most number of minutes.
+# Useful to wait till a lock is removed by another process.
+# $1--the file
+# $2--number of minutes
+# WAIT_STATUS set to:
+#	-1 if errors encountered
+#	0  if file disappears within time limit
+#	1  if file has not disappeared within time limit
+WAITTILL()
+{
+    wait_file=$1
+    nminutes=$2
+    if [ -z "$wait_file" -o ! "$nminutes" -ge 0 ]
+    then
+	PRINT "errors in argument of WAITTILL(): wait_file($1) or nminutes($2)"
+	WAIT_STATUS=-1
+	return
+    fi
+    while [ -f $wait_file ]; do
+	if [ $nminutes -gt 0 ]; then
+	    PRINT "Wait till $wait_file has disappeared"
+	    sleep 60			#sleep 1 minute
+	else
+	    WAIT_STATUS=1
+	    return
+	fi
+	nminutes=`expr $nminutes - 1`
+    done
+    WAIT_STATUS=0
+    return
+}
+
+
+# Run one snapshot test
+# $*--Types of test being run
+RUNSNAPTEST()
+{
+    SNAPCMD_OPT="$STANDARD_OPT"		# snapshot test option
+    SRCDIRNAME=""
+    # restore CC, PATH in case they were changed in the last test.
+    CC="$CC_SAVED"
+    PATH=$PATH_SAVED
+    export PATH			# DEC OSF1 needs to export PATH explicitly
+    TEST_TYPE=$*
+    retcode=0
+    skiptest=no
+    date
+    PRINT "*** starting $TEST_TYPE tests in $HOSTNAME ***"
+    PRINT "Uname -a: `uname -a`"
+
+    # Parse the test type and set options accordingly.
+    # See comments of SNAPTEST_CONFIG_PARSE().
+    while [ $# -gt 0 ]; do
+	case $1 in
+	    -n32) # want -n32 option
+		SRCDIRNAME=${SRCDIRNAME}-n32
+		CC="cc -n32"
+		export CC
+		;;
+	    parallel) # want parallel test
+		SNAPCMD_OPT="$SNAPCMD_OPT $ENABLE_PARALLEL"
+		SRCDIRNAME=${SRCDIRNAME}-pp
+		;;
+	    standard) # standard test
+		;;
+	    --*)
+		# option for configure
+		SNAPCMD_OPT="$SNAPCMD_OPT $1"
+		;;
+	    op-configure)
+		# option for configure
+		SNAPCMD_OPT="$SNAPCMD_OPT $1 $2"
+		shift
+		;;
+	    op-snapshot)
+		# option for snapshot
+		shift
+		SNAPCMD_OPT="$SNAPCMD_OPT $1"
+		;;
+	    setenv)
+		# set environment variable
+		shift
+		eval $1="$2"
+		export $1
+		shift
+		;;
+	    setenvN)
+		# set environment variable with $1 values
+		# e.g., setenvN 3 x a b c is same as setenv x="a b c".
+		# a kludge now--the extra single quotes are needed
+		# else eval complains.
+		shift
+		envN=$1
+		shift
+		envname=$1
+		envalue=
+		while test $envN -gt 0; do
+		    shift
+		    envalue="$envalue $1"
+		    envN=`expr $envN - 1`
+		done
+		eval $envname="'$envalue'"
+		export $envname
+		;;
+	    skip)
+		# skip this test
+		skiptest=yes
+		;;
+	    *) # unknown test
+		PRINT "$0: unknown type of test ($1)"
+		retcode=1
+		;;
+	esac
+	shift
+    done
+
+    if [ $retcode -ne 0 -o $skiptest = yes ]; then
+	errcode=$retcode 
+	return $retcode
+    fi
+
+    # Track down the zlib software
+    ans=`$SNAPYARD/current/bin/locate_sw zlib`
+    if [ $? = 0 ]; then
+	Z_INC=`echo $ans | cut -f1 -d,`
+	Z_LIB=`echo $ans | cut -f2 -d,`
+	SNAPCMD_OPT="$SNAPCMD_OPT zlib $Z_INC,$Z_LIB"
+    else
+	# cannot locate zlib software.
+	# continue the test, maybe configure can find it.
+	:
+    fi
+
+    if [ -n "${SRCDIRNAME}" ]; then
+	SNAPCMD_OPT="$SNAPCMD_OPT srcdirname ${SRCDIRNAME}"
+    fi
+
+    # Setup log file name to save test output
+    THIS_MINUTE=`date +%H%M`
+    LOGFILE=${LOGBASENAME}${SRCDIRNAME}_${TODAY}_${THIS_MINUTE}
+    PRINT "Running snapshot with output saved in"
+    PRINT "   $LOGFILE"
+    (date; PRINT Hostname=$HOSTNAME) >> $LOGFILE
+
+    (
+    cd $SNAPYARD/current
+    $SNAPSHOT $SNAPCMD $SNAPCMD_OPT
+    ) >> $LOGFILE 2>&1
+    retcode=$?
+    [ $retcode -ne 0 ] && errcode=$retcode
+
+    date >> $LOGFILE
+}
+
+
+# configuration parsing.
+# Taking configuration from input.
+# This should be invoke with configure file as stdin.
+# Syntax of the configure file:
+#    All lines started with the # are comment lines and are ignored.
+#    Blank lines are ignored too.
+#    Each config line starts with a "Scope" followed by test types.
+#
+# Scope can be:
+#    standard ...          # what the standard test types are.
+#    <host>: <test>        Do <test> for <host> 
+#    all: <test>           Do <test> for all hosts. 
+#    <weekday>/...         Use this scope if the <weekday> matches.
+#                          <weekday> can be {Mon,Tue,Wed,Thu,Fri,Sat,Sun}
+#    If no <host>: input for a <host>, the standard test is used.
+#
+# Test types:
+#    standard		tests defined in standard scope.
+#    -n32		-n32 mode.  Apply to 64/32 bit OS such as IRIX64.
+#    parallel		parallel mode.
+#    op-configure <option>	configure option
+#    op-snapshot <option>	snapshot option
+#    --*		configure option
+#    setenv <name> <value>	set environment variable <name> to <value>
+#    setenvN) <N> <name> <value> ...
+#		        set environment variable with <N> values
+#		        e.g., setenvN 3 x a b c is same as setenv x="a b c".
+#    skip		skip this test
+SNAPTEST_CONFIG_PARSE()
+{
+    while read x y ; do
+	# Scan for entry for this weekday.
+	xd=`echo $x | cut -f1 -d/`
+	if [ "$xd" = ${WEEKDAY} ]; then
+	    # strip away the weekday/ part.
+	    x=`echo $x | cut -f2 -d/`
+	fi
+	case "$x" in
+	    '' | '#'*)
+		# blank or comment lines.  Continue.
+	    	;;
+	    ???/*)
+		# Ignore any entry not of this weekday.
+		;;
+	    standard)
+		#standard configuration
+		STANDARD_OPT="$y"
+		;;
+	    all: | ${CONFIGNAME}:)
+		# types of test for all hosts or this host
+		if [ -n "$TEST_TYPES" ]; then
+		    TEST_TYPES="$TEST_TYPES ; $y"
+		else
+		    TEST_TYPES="$y"
+		fi
+		;;
+	    *:)	# ignore types of test for other hosts
+		;;
+	    *)	# unknown configuration option
+		PRINT $x $y
+		PRINT "***Unknown configuration option. Ignored.***"
+		;;
+	esac
+    done
+}
+
+# Snap Test configuration parsing.
+# If TEST_TYPES is not set, set it to do the "standard" test.
+SNAPTEST_CONFIG()
+{
+    TEST_TYPES=
+    STANDARD_OPT=
+    if [ -f $SNAPTESTCFG ]; then
+	SNAPTEST_CONFIG_PARSE < $SNAPTESTCFG
+    fi
+    TEST_TYPES=${TEST_TYPES:-'standard'}
+}
+
+
+# Show usage page
+USAGE()
+{
+cat <<EOF
+Usage: runtest [-h] [-debug] [-r<version>] [-all] [-nocvs] [-nodiff] [<host> ...]
+    -h
+	print this help page
+    -debug
+	turn on debug mode
+    -r<version>
+	do runtest for <version>
+    -all
+	launch tests for all pre-defined testing hosts
+    -nocvs
+	do not do cvs commands
+    -nodiff
+	do not do diff commands
+    -setup
+        setup the directory structure for snapshot test
+    -configname <name>
+	use <name> as hostname in the parsing of the snaptest configure file
+    <host>
+	launch tests for <host>
+    
+-all and <host> are contradictory and whichever is specified last, is
+the one to take effect.  If neither are given, do the test for the
+local host.
+EOF
+}
+
+
+# Verify if directory ($1) exists.  If not, create it.
+CHECK_DIR()
+{
+   dir=$1
+   if test ! -e $1; then
+      echo mkdir $1
+      mkdir $1
+      errcode=$?
+   elif test ! -d $1; then
+      echo $1 is not a directory
+      errcode=1
+   fi
+}
+
+
+#################################
+# Main
+#################################
+#################################
+# Set up global variables
+#################################
+retcode=0			# error code of individula task
+errcode=0			# error code of the whole test
+skiptest=no			# if test is skipped
+CC_SAVED="$CC"			# CC & PATH maybe changed within a test.
+PATH_SAVED=$PATH		# These save the original values.
+
+
+#################################
+# Parse options
+#################################
+while [ $# -gt 0 ]; do
+    case "$1" in
+	-h) # help--show usage
+	    USAGE
+	    exit 0
+	    ;;
+	-debug*)
+	    # set debug mode
+	    DEBUGMODE="$1"
+	    SNAPSHOT="echo bin/snapshot"
+	    PROGNAME="$PROGNAME $DEBUGMODE"
+	    PRINT "******** DEBUGMODE is $DEBUGMODE ************"
+	    ;;
+	-r*)
+	    # version string
+	    H4VER="$1"
+	    ;;
+	-all)
+	    # Test all hosts.
+	    TESTHOST=-all
+	    ;;
+	-nocvs)
+	    # do not do cvs commands.
+	    NOCVS=nocvs
+	    ;;
+	-nodiff)
+	    # do not do diff commands.
+	    NODIFF=nodiff
+	    ;;
+	-configname)
+	    # use <name> as hostname in the parsing of the snaptest configure file.
+	    shift
+	    CONFIGNAME=$1
+	    ;;
+	-setup)
+	    # setup the directory structure for snapshot test.
+	    CMD=setup
+	    ;;
+	-*) # Unknow option
+	    PRINT "Unknown option ($1)"
+	    USAGE
+	    exit 1
+	    ;;
+	*)
+	    TESTHOST=$*
+	    break
+	    ;;
+    esac
+    shift
+done
+
+# setup H4VER if not set yet
+if [ -z "$H4VER" -a -f bin/snapshot_version ]
+then
+    . bin/snapshot_version
+fi
+
+if [ -n "$H4VER" ]
+then
+    H4VERSION=hdf4_`echo $H4VER | sed -e s/-r// -e s/\\\./_/g`
+    PROGNAME="$PROGNAME $H4VER"
+else
+    H4VERSION=hdf4
+fi
+
+#################################
+# Setup snapshot test directories
+#################################
+BASEDIR=${HOME}/snapshots-${H4VERSION}
+# initial processing of setup option if requested
+if test x-$CMD = x-setup; then
+    CHECK_DIR $BASEDIR
+    test $errcode -ne 0 && exit 1
+elif [ ! -d ${BASEDIR} ]; then
+    echo "BASEDIR ($BASEDIR) does not exist"
+    exit 1
+fi
+# Show the real physical path rather than the symbolic path
+SNAPYARD=`cd $BASEDIR && /bin/pwd`
+# Log file basename
+LOGDIR=${SNAPYARD}/log
+LOGBASENAME=${LOGDIR}/${HOSTNAME}
+PASSEDLOG=${LOGDIR}/PASSED_LOG_${TODAY}
+FAILEDLOG=${LOGDIR}/FAILED_LOG_${TODAY}
+SKIPPEDLOG=${LOGDIR}/SKIPPED_LOG_${TODAY}
+TIMELOG=${LOGDIR}/TIME_LOG_${TODAY}
+CVSLOG=${LOGDIR}/CVS_LOG_${TODAY}
+CVSLOG_LOCK=${LOGDIR}/CVS_LOG_LOCK_${TODAY}
+DIFFLOG=${LOGDIR}/DIFF_LOG_${TODAY}
+# Snap Test hosts and Configuration files
+ALLHOSTSFILE=${SNAPYARD}/allhostfile
+SNAPTESTCFG=${SNAPYARD}/snaptest.cfg
+
+# more processing of setup option if requested
+if test x-$CMD = x-setup; then
+    CHECK_DIR $LOGDIR
+    test $errcode -ne 0 && exit 1
+    CHECK_DIR $LOGDIR/OLD
+    test $errcode -ne 0 && exit 1
+    CHECK_DIR $SNAPYARD/TestDir
+    test $errcode -ne 0 && exit 1
+    # create empty test hosts or configure files if non-existing
+    for f in $ALLHOSTSFILE $SNAPTESTCFG; do
+	if test ! -f $f; then
+	    echo Creating $f
+	    touch $f
+	fi
+    done
+    # create or update the current source.
+    echo update current source
+    $SNAPSHOT checkout 
+    # setup completed.  Exit.
+    exit 0
+fi
+
+#################################
+# Setup test host(s)
+#################################
+if [ "$TESTHOST" = -all ]; then
+    if [ -f $ALLHOSTSFILE ]; then
+	TESTHOST=`sed -e s/#.*// $ALLHOSTSFILE`
+    else
+	PRINT "could not access the all-hosts-file ($ALLHOSTSFILE)"
+	USAGE
+	exit 1
+    fi
+fi
+
+
+#################################
+# Setup to print a trailer summary when exiting not via
+# the normal end of the script.
+#################################
+trap PRINT_TRAILER 0
+
+#
+TotalStartTime=`SecOfDay`
+
+# Process the configuration
+SNAPTEST_CONFIG
+PRINT STANDARD_OPT=$STANDARD_OPT
+PRINT TEST_TYPES=$TEST_TYPES
+PRINT_BLANK
+
+# Do a checkout if one has not been done today
+# Also check MANIFEST file
+if [ -z "$NOCVS" -a ! -f $CVSLOG ]; then
+    PRINT "Running CVS checkout with output saved in"
+    PRINT "   $CVSLOG"
+    # Set CVS lock first
+    touch $CVSLOG_LOCK
+    ($SNAPSHOT checkout ) >> $CVSLOG 2>&1
+    # Save error code and remove the lock
+    errcode=$?
+    rm -f $CVSLOG_LOCK
+    if [ $errcode -ne 0 ]; then
+	# test failed.
+	REPORT_ERR "****FAILED ${HOSTNAME}: CVS checkout****"
+	exit $errcode
+    fi
+    PRINT Checking MAINFEST file ...
+    (cd $SNAPYARD/current; bin/chkmanifest)
+    errcode=$?
+    if [ $errcode -ne 0 ]; then
+	# test failed.
+	REPORT_ERR "****FAILED ${HOSTNAME}: MANIFEST check****"
+    fi
+    PRINT_BLANK
+else
+    # make sure the cvs update, if done by another host, has completed.
+    # First wait for the presence of $CVSLOG which signals some host
+    # has started the cvs update.  Then wait for the absense of $CVSLOG_LOCK
+    # which signals the host has completed the cvs update.
+    WAITFOR $CVSLOG 90
+    if [ $WAIT_STATUS -ne 0 ]; then
+	errcode=$WAIT_STATUS
+	REPORT_ERR "****FAILED ${HOSTNAME}: Time expired waiting CVS update to start****"
+	exit $errcode
+    fi
+    WAITTILL $CVSLOG_LOCK 10
+    if [ $WAIT_STATUS -ne 0 ]; then
+	errcode=$WAIT_STATUS
+	REPORT_ERR "****FAILED ${HOSTNAME}: Time expired waiting CVS update to finish****"
+	exit $errcode
+    fi
+fi
+
+# run a snapshot diff to see if any significant differences between
+# the current and previous versions
+if [ -z "$NODIFF" ]; then
+    $SNAPSHOT diff >> $DIFFLOG 2>&1
+    errcode=$?
+    # check the errcode only if NOT in DEBUG MODE
+    if [ -z "$DEBUGMODE" -a $errcode -eq 0 ]; then
+	# no need to run test
+	PRINT "NO TEST: no significant differences between current and previous versions" |
+	    tee -a $PASSEDLOG
+	exit 0
+    fi
+fi
+
+# we can use the version of script in SNAPYARD/current now.
+# Don't do the diff any more.
+PROGNAME="$SNAPYARD/current/$PROGNAME -nodiff"
+
+# Decide to do test for the local host or for remote hosts
+if [ -n "$TESTHOST" -a $HOSTNAME != "$TESTHOST" ]; then
+    date
+    PRINT "*** launching tests from $HOSTNAME ***"
+    PRINT_BLANK
+    TEST_TYPE="launching"
+    cd ${SNAPYARD}/log
+    n_test=0
+    runtest_type="hosts"
+    for h in $TESTHOST; do
+	n_test=`expr $n_test + 1`
+	TMP_OUTPUT="#$h.out"
+	(PRINT "=============="
+	 PRINT "Testing $h"
+	 PRINT "==============") > $TMP_OUTPUT
+	CHECK_RSH $h
+	# run the remote shell command with output to $TMP_OUTPUT
+	case "$RSH" in
+	    rsh|ssh)
+		CMD="$RSH $h -n $PROGNAME -configname $h"
+		PRINT $CMD
+		# kludge: some how eirene and houdin can not have
+                # rsh connections too close.  wait a few seconds
+		test $h = houdin && echo "wait 10 sec for houdin" && sleep 10
+
+		# launch concurrent tests only if srcdir is used
+		if [ -n "$SRCDIR" ]; then
+		    $CMD &
+		else
+		    $CMD
+		fi
+		;;
+	    NoRemoteCommand)
+		PRINT $h does not accept Remote Command
+		;;
+	    NotReachable)
+		PRINT $h is not reachable 
+		;;
+	    *)
+		PRINT "CHECK_RSH for $h returned unknow result ($RSH)"
+		;;
+	esac >> $TMP_OUTPUT 2>&1
+    done
+    # wait for all launched tests to finish, then cat them back out.
+    wait
+    for h in $TESTHOST; do
+	TMP_OUTPUT="#$h.out"
+	cat $TMP_OUTPUT
+	# Verify test script did complete by checking the last lines
+	(tail -2 $TMP_OUTPUT | grep -s 'Grand total' > /dev/null 2>&1) ||
+	    (REPORT_ERR "****FAILED ${h}: snaptest did not complete****" &&
+		PRINT_BLANK)
+	rm $TMP_OUTPUT
+    done
+    exit 0
+fi
+
+# run the test(s)
+# Note that first field is cut without -s but all subsequent cut
+# must use -s.  If -s is not used at all, a $TEST_TYPES that has
+# no ';' (only 1 test), will pass through intact in all cut. That
+# results in infinite looping.
+# If -s is used with the first field, it will suppress completely
+# a $TYPE_TYPES that has no ';' (only 1 tst ).  That results in no
+# test at all.
+# Note that n_test must start as 1.
+# 
+n_test=1
+runtest_type="tests"
+TEST="`echo $TEST_TYPES | cut -f$n_test -d';'`"
+while [ -n "$TEST" ]; do
+    StartTime=`SecOfDay`
+    RUNSNAPTEST $TEST
+    REPORT_RESULT
+    PRINT_TEST_TRAILER
+
+    n_test=`expr $n_test + 1`
+    TEST="`echo $TEST_TYPES | cut -f$n_test -s -d';'`"
+done
+# dec n_test to show the actual number of tests ran.
+n_test=`expr $n_test - 1`
+
+PRINT_TRAILER
+
+# disable trailer summary printing since all trailers have been
+# printed and we are exiting normally.
+trap 0
+exit $errcode


Property changes on: packages/libhdf4/branches/upstream/current/bin/runtest
___________________________________________________________________
Name: svn:executable
   + *

Added: packages/libhdf4/branches/upstream/current/bin/snapshot
===================================================================
--- packages/libhdf4/branches/upstream/current/bin/snapshot	                        (rev 0)
+++ packages/libhdf4/branches/upstream/current/bin/snapshot	2007-05-15 09:53:05 UTC (rev 831)
@@ -0,0 +1,401 @@
+#!/bin/sh
+# snapshot: Snap shot testing command script for HDF4.
+# This script should be run nightly from cron.  It checks out hdf4
+# from the CVS source tree and compares it against the previous
+# snapshot.  If anything significant changed, it is build and tested.
+# After the test passes and if snapshot release is desired, a new snapshot
+# is created, the minor version number is incremented, and the change is
+# checked back into the CVS repository.
+
+# function definitions
+TIMESTAMP()
+{
+    echo "=====" "$1": "`date`" "====="
+}
+
+EXIT_BANNER()
+{
+TIMESTAMP "Exit $PROGNAME with status=$?"
+}
+
+# MAIN
+# SGI /bin/sh replaces $0 as function name if used in a function.
+# Set the name here to avoid that ambiguity and better style too.
+PROGNAME=$0
+
+echo "====================================="
+echo "$PROGNAME $*"
+echo "====================================="
+TIMESTAMP MAIN
+uname -a
+
+# setup exit banner message
+trap EXIT_BANNER 0
+
+# The path isn't properly initialized on hawkwind -- /usr/local/bin is
+# either missing or is after /usr/bin when it should be before.
+PATH="/usr/local/bin:$PATH"
+
+# Where are the snapshots stored?
+ARCHIVES_default=/afs/ncsa/ftp/HDF/pub/outgoing/hdf4/snapshots
+ARCHIVES=$ARCHIVES_default
+
+# Where is the zlib library?
+# At NCSA, half of the machines have it in /usr/lib, the other half at
+# /usr/ncsa/lib.  Leave it unset.
+ZLIB_default=
+ZLIB=$ZLIB_default
+
+# What compression methods to use?
+METHODS="gzip bzip2"
+
+# Hard set to gmake.
+# No parallel make (-j) because dependences are not set correctly for it.
+# Must use gmake for --srcdir support.
+MAKE=gmake
+export MAKE
+
+#
+# Command options
+cmd="all"
+test_opt=""
+errcode=0
+while [ $# -gt 0 ] ; do
+    case "$1" in
+	all)	
+	    cmd="all"
+	    ;;
+	checkout)
+	    cmdcheckout="checkout"
+	    cmd=""
+	    ;;
+	diff)
+	    cmddiff="diff"
+	    cmd=""
+	    ;;
+	test)
+	    cmdtest="test"
+	    cmd=""
+	    ;;
+	srcdir)
+	    #use srcdir option for test
+	    srcdir="yes"
+	    ;;
+	srcdirname)
+	    shift
+	    if [ $# -lt 1 ]; then
+		echo "srcdirname <dir> missing"
+		errcode=1
+		cmd="help"
+		break
+	    fi
+	    SRCDIRNAME="$1"
+	    ;;
+	release)
+	    cmdrel="release"
+	    cmd=""
+	    ;;
+	clean | distclean)
+	    cmdclean="$1"
+	    cmd=""
+	    ;;
+	help)
+	    cmd="help"
+	    break
+	    ;;
+	echo)
+	    set -x
+	    break
+	    ;;
+	zlib)
+	    shift
+	    if [ $# -lt 1 ]; then
+		echo "ZLIB information missing"
+		errcode=1
+		cmd="help"
+		break
+	    fi
+	    ZLIB="$1"
+	    ;;
+	archive)
+	    shift
+	    if [ $# -lt 1 ]; then
+		echo "Archive pathname missing"
+		errcode=1
+		cmd="help"
+		break
+	    fi
+	    ARCHIVES="$1"
+	    ;;
+	--*)
+	    OP_CONFIGURE="$OP_CONFIGURE $1"
+	    ;;
+	op-configure)
+	    shift
+	    if [ $# -lt 1 ]; then
+		echo "op-configure option missing"
+		errcode=1
+		cmd="help"
+		break
+	    fi
+	    OP_CONFIGURE="$OP_CONFIGURE $1"
+	    ;;
+	*)
+	    echo "Unkown option $1"
+	    errcode=1
+	    cmd="help"
+	    break
+	    ;;
+    esac
+    shift
+done
+
+if [ "$cmd" = help ]; then
+    set -
+    cat <<EOF
+Usage: $PROGNAME [all] [checkout] [diff] [test] [srcdir] [release] [help]
+          [zlib <zlib_path>] [archive <arch_path>] [dir <dir>]
+	  [op-configure <option>] [--<option>]
+    all:      Run all commands (checkout, test & release)
+              [Default is all]
+    checkout: Run cvs checkout
+    diff:     Run diff on current and previous versions.  Exit 0 if
+              no significant differences are found.  Otherwise, non-zero.
+    test:     Run test
+    release:  Run release
+    clean:    Run make clean
+    distclean:Run make distclean
+    srcdir:   Use srcdir option (does not imply other commands)
+              "snapshot srcdir" is equivalent to "snapshot srcdir all"
+              "snapshot srcdir checkout" is equivalent to "snapshot checkout"
+    srcdirname <dir>:
+              Use <dir> as the srcdir testing directory if srcdir is choosen.
+              If <dir> starts with '-', it is append to the default name
+              E.g., "snapshot srcdir srcdirname -xx" uses hostname-xx
+              [Default is hostname]
+    help:     Print this message
+    echo:     Turn on shell echo
+    zlib <zlib_path>:
+              Use <zlib_path> as the ZLIB locations
+              [Default is $ZLIB_default]
+    archive <arch_path>:
+              Use <arch_path> as the release ARCHIVE area
+              [Default is $ARCHIVES_default]
+    op-configure <option>:
+              Pass <option> to the configure command
+              E.g., "snapshot op-configure --enable-parallel"
+                  configures for parallel mode
+    --<option>:
+              Pass --<option> to the configure command
+              E.g., "snapshot --enable-parallel"
+                  configures for parallel mode
+EOF
+    exit $errcode
+fi
+
+# Setup the proper configure option (--with-zlib) to use zlib library
+# provide ZLIB is non-empty.
+ZLIB=${ZLIB:+"--with-zlib="$ZLIB}
+CONFIGURE="./configure $ZLIB $OP_CONFIGURE"
+
+# Execute the requests
+snapshot=yes
+
+H4VERSION=hdf4
+BASEDIR=${HOME}/snapshots-${H4VERSION}
+CURRENT=${BASEDIR}/current
+PREVIOUS=${BASEDIR}/previous
+HOSTNAME=`hostname | cut -f1 -d.`	# no domain part
+if [ $H4VERSION != hdf4 ]; then
+    CVSVERSION="-r $H4VERSION"
+else
+    CVSVERSION=				# use the default (main) version
+fi
+
+# Try finding a version of diff that supports the -I option too.
+DIFF=diff
+for d in `echo $PATH | sed -e 's/:/ /g'` ; do
+    test -x $d/diff && $d/diff -I XYZ /dev/null /dev/null > /dev/null 2>&1 &&
+	DIFF=$d/diff && break
+done
+
+#=============================
+# Run CVS checkout
+#=============================
+if [ "$cmd" = "all" -o -n "$cmdcheckout" ]; then
+    TIMESTAMP "checkout"
+    # Create a working directory.  Hopefully one is left over from last
+    # time that still has the contents of the previous release.  But if
+    # not, just create one and assume that a snapshot is necessary.
+    test -d ${BASEDIR} || mkdir -p ${BASEDIR} || exit 1
+
+    # If there is a Makefile in ${CURRENT}, the last test done in it
+    # has not been distclean'ed.  They would interfere with other
+    # --srcdir build since make considers the files in ${CURRENT} 
+    # take precedence over files in its own build-directory.  Run
+    # a "make distclean" to clean them all out.  This is not really
+    # part of the "checkout" functions but this is the most convenient
+    # spot to do the distclean.  We will also continue the checkout process
+    # regardless of the return code of distclean.
+    ( cd ${CURRENT}; test -f Makefile && ${MAKE} distclean)
+
+    # verify proper cvs setting
+    if [ -z "$CVSROOT" ]; then
+	echo "CVSROOT not defined!" 1>&2
+	exit 1
+    fi
+    # Check out the current version from CVS
+    (cd $BASEDIR; cvs -Q co -P -d current ${CVSVERSION} hdf4 ) || exit 1
+fi # Do CVS checkout
+
+
+#=============================
+# Run Test the HDF4 library
+#=============================
+if [ "$cmd" = "all" -o -n "$cmdtest" -o -n "$cmddiff" ]; then
+    TIMESTAMP "diff"
+    # setup if srcdir is used.
+    if [ -z "$srcdir" ]; then
+	TESTDIR=${CURRENT}
+    else
+	#create TESTDIR if not exist yet
+	case "$SRCDIRNAME" in
+	"")
+	    SRCDIRNAME=$HOSTNAME
+	    ;;
+	-*)
+	    SRCDIRNAME="$HOSTNAME$SRCDIRNAME"
+	    ;;
+	esac
+	TESTDIR=${BASEDIR}/TestDir/${SRCDIRNAME}
+	test -d ${TESTDIR} || mkdir ${TESTDIR}
+    fi
+    INSTALLDIR=${TESTDIR}/installdir
+    test -d $INSTALLDIR || mkdir $INSTALLDIR
+    # Make sure current version exists and is clean
+    if [ -d ${TESTDIR} ]; then
+	(cd ${TESTDIR} && ${MAKE} distclean)
+    else
+	errcode=$?
+        snapshot=no
+        exit $errcode
+    fi
+
+    # Compare it with the previous version.  Compare only files listed in
+    # the MANIFEST plus the MANIFEST itself.
+    if [ -d ${PREVIOUS} ]; then
+	if (${DIFF} -c ${PREVIOUS}/MANIFEST ${CURRENT}/MANIFEST); then
+	    snapshot=no
+	    for src in `grep '^\.' ${CURRENT}/MANIFEST|expand|cut -f1 -d' '`; do
+		if ${DIFF} -I H5_VERS_RELEASE -I " released on " \
+		    -I " currently under development" \
+		    ${PREVIOUS}/$src ${CURRENT}/$src
+		then
+		    :	#continue
+		else
+		    snapshot=yes
+		    break
+		fi
+	    done
+	fi
+    fi
+
+    # if diff is choosen, exit 0 if no significant differences are found.
+    # otherwise, exit 1.  This includes cases of other failures.
+    if [ -n "$cmddiff" ]; then
+	if [ $snapshot = no ]; then
+	    exit 0
+	else
+	    exit 1
+	fi
+    fi
+
+    # Make sure all the tests work.
+    # No uninstall target.  Use "rm -rf ..." for now.
+    if [ "$snapshot" = "yes" ]; then
+	if (cd ${TESTDIR} && \
+	    TIMESTAMP "configure" && \
+	    ${srcdir:+${CURRENT}/}${CONFIGURE} --prefix=$INSTALLDIR && \
+	    TIMESTAMP "make" && \
+	    ${MAKE} && \
+	    TIMESTAMP "check" && \
+	    ${MAKE} check && \
+	    TIMESTAMP "install" && \
+	    ${MAKE} install && \
+	    TIMESTAMP "uninstall" && \
+	    rm -rf $INSTALLDIR ); then
+	    :
+	else
+	    errcode=$?
+	    snapshot=no
+	    exit $errcode
+	fi
+    fi
+fi # Test the HDF4 library
+
+
+#=============================
+# Run Release snapshot, update version, and commit to cvs and tag
+#=============================
+if [ "$cmd" = "all" -o -n "$cmdrel" ]; then
+  if [ -n "$needmorework" ]; then
+    if [ "$snapshot" = "yes" ]; then
+	TIMESTAMP "release"
+	(cd ${CURRENT} && ${MAKE} distclean)
+	(
+	    # Turn on exit on error in the sub-shell so that it does not
+	    # cvs commit if errors encounter here.
+	    set -e
+	    cd ${CURRENT}
+	    bin/release -d $ARCHIVES $METHODS
+	    RELEASE_VERSION="`perl bin/h4vers -v`"
+	    perl bin/h4vers -i
+	    echo "***CVS commit SKIPPED***"
+	    echo cvs -Q commit -m "Snapshot $RELEASE_VERSION"
+	)
+	errcode=$?
+    fi
+  else
+    echo "need real release steps.  For now, only move current version to previous"
+  fi
+
+
+    # Replace the previous version with the current version.
+    # Should check if the errcode of the release process but there
+    # are other failures after release was done (e.g. h4vers or cvs failures)
+    # that should allow the replacement to occure.
+    rm -rf ${PREVIOUS}
+    mv ${CURRENT} ${PREVIOUS}
+fi #Release snapshot
+
+
+#=============================
+# Clean the test area.  Default is no clean.
+#=============================
+if [ -n "$cmdclean" ]; then
+    TIMESTAMP "clean"
+    # setup if srcdir is used.
+    if [ -z "$srcdir" ]; then
+	TESTDIR=${CURRENT}
+    else
+	case "$SRCDIRNAME" in
+	"")
+	    SRCDIRNAME=$HOSTNAME
+	    ;;
+	-*)
+	    SRCDIRNAME="$HOSTNAME$SRCDIRNAME"
+	    ;;
+	esac
+	TESTDIR=${BASEDIR}/TestDir/${SRCDIRNAME}
+    fi
+    # Make sure current version exists and is clean
+    if [ -d ${TESTDIR} ]; then
+	(cd ${TESTDIR} && ${MAKE} $cmdclean )
+    else
+	errcode=$?
+        snapshot=no
+        exit $errcode
+    fi
+fi # Clean the Test directory
+
+exit $errcode


Property changes on: packages/libhdf4/branches/upstream/current/bin/snapshot
___________________________________________________________________
Name: svn:executable
   + *

Added: packages/libhdf4/branches/upstream/current/config/BlankForm
===================================================================
--- packages/libhdf4/branches/upstream/current/config/BlankForm	                        (rev 0)
+++ packages/libhdf4/branches/upstream/current/config/BlankForm	2007-05-15 09:53:05 UTC (rev 831)
@@ -0,0 +1,160 @@
+#                                                   -*- shell-script -*-
+#
+# This file is part of the HDF4 build script. It is processed shortly
+# after configure starts and defines, among other things, flags for
+# the various compilation modes.
+
+# Choosing C, Fortran, and C++ Compilers
+# --------------------------------------
+#
+# The user should be able to specify the compiler by setting the CC, F77,
+# and CXX environment variables to the name of the compiler and any
+# switches it requires for proper operation. If CC is unset then this
+# script may set it. If CC is unset by time this script completes then
+# configure will try `gcc' and `cc' in that order (perhaps some others
+# too).
+#
+# Note: Code later in this file may depend on the value of $CC_BASENAME
+#       in order to distinguish between different compilers when
+#       deciding which compiler command-line switches to use.  This
+#       variable is set based on the incoming value of $CC and is only
+#       used within this file.
+
+if test "X-$CC" = "X-"; then
+  CC="/some/default/compiler/named/foo -ansi"
+  CC_BASENAME=foo
+fi
+
+if test "X-$F77" = "X-"; then
+  F77="/some/default/compiler/named/foo -ansi"
+  F77_BASENAME=foo
+fi
+
+if test "X-$CXX" = "X-"; then
+  CXX="/some/default/compiler/named/foo -ansi"
+  CXX_BASENAME=foo
+fi
+
+# C, Fortran, and C++ Compiler and Preprocessor Flags
+# ---------------------------------------------------
+#
+# - Flags that end with `_CFLAGS' are always passed to the C compiler.
+# - Flags that end with `_FFLAGS' are always passed to the Fortran
+#   compiler.
+# - Flags that end with `_CXXFLAGS' are always passed to the C++ compiler.
+# - Flags that end with `_CPPFLAGS' are passed to the C and C++ compilers
+#   when compiling but not when linking.
+#
+#   DEBUG_CFLAGS
+#   DEBUG_FFLAGS
+#   DEBUG_CXXFLAGS
+#   DEBUG_CPPFLAGS  - Flags to pass to the compiler to create a
+#                     library suitable for use with debugging
+#			          tools. Usually this list will exclude
+#                     optimization switches (like `-O') and include
+#                     switches that turn on symbolic debugging support
+#                     (like `-g').
+#
+#   PROD_CFLAGS
+#   PROD_FFLAGS
+#   PROD_CXXFLAGS
+#   PROD_CPPFLAGS   - Flags to pass to the compiler to create a
+#                     production version of the library. These
+#                     usualy exclude symbolic debugging switches (like
+#                     `-g') and include optimization switches (like
+#                     `-O').
+#
+#   PROFILE_CFLAGS
+#   PROFILE_FFLAGS
+#   PROFILE_CXXFLAGS
+#   PROFILE_CPPFLAGS- Flags to pass to the compiler to create a
+#                     library suitable for performance testing (like
+#                     `-pg').  This may or may not include debugging or
+#                     production flags.
+#			
+#   FFLAGS
+#   CFLAGS          - Flags can be added to these variable which
+#                     might already be partially initialized. These
+#                     flags will always be passed to the compiler and
+#                     should include switches to turn on full warnings.
+#
+#                     WARNING: flags do not have to be added to the CFLAGS
+#                     or FFLAGS variable if the compiler is the GNU gcc
+#                     and g77 compiler.
+#
+#                     FFLAGS and CFLAGS should contain *something* or else
+#                     configure will probably add `-g'. For most systems
+#                     this isn't a problem but some systems will disable
+#                     optimizations in favor of the `-g'. The configure
+#                     script will remove the `-g' flag in production mode
+#                     only.
+#
+# These flags should be set according to the compiler being used.
+# There are two ways to check the compiler. You can try using `-v' or
+# `--version' to see if the compiler will print a version string.  You
+# can use the value of $FOO_BASENAME which is the base name of the
+# first word in $FOO, where FOO is either CC, F77, or CXX (note that the
+# value of CC may have changed above).
+
+case $CC_BASENAME in
+  gcc)
+    CFLAGS="$CFLAGS"
+    DEBUG_CFLAGS="-g -fverbose-asm"
+    DEBUG_CPPFLAGS=
+    PROD_CFLAGS="-O3 -fomit-frame-pointer"
+    PROD_CPPFLAGS=
+    PROFILE_CFLAGS="-pg"
+    PROFILE_CPPFLAGS=
+    ;;
+
+  *)
+    CFLAGS="$CFLAGS -ansi"
+    DEBUG_CFLAGS="-g"
+    DEBUG_CPPFLAGS=
+    PROD_CFLAGS="-O"
+    PROD_CPPFLAGS=
+    PROFILE_CFLAGS="-pg"
+    PROFILE_CPPFLAGS=
+    ;;
+esac
+
+case $F77_BASENAME in 
+  g77)
+    FFLAGS="$FFLAGS -Wsign-compare"
+    DEBUG_FFLAGS="-g"
+    PROD_FFLAGS="-O3 -fomit-frame-pointer"
+    PROFILE_FFLAGS="-pg"
+    ;;
+
+  *)
+    FFLAGS="$FFLAGS -ansi"
+    DEBUG_FFLAGS="-g"
+    PROD_FFLAGS="-O"
+    PROFILE_FFLAGS="-pg"
+    ;;
+esac
+
+case $CXX_BASENAME in 
+  g++)
+    CXXFLAGS="$CXXFLAGS"
+    DEBUG_CXXFLAGS="-g -fverbose-asm"
+    PROD_CXXFLAGS="-O3 -fomit-frame-pointer"
+    PROFILE_CXXFLAGS="-pg"
+    ;;
+
+  *)
+    CXXFLAGS="$CXXFLAGS -ansi"
+    DEBUG_CXXFLAGS="-g"
+    PROD_CXXFLAGS="-O"
+    PROFILE_CXXFLAGS="-pg"
+    ;;
+esac
+
+# Overriding Configure Tests
+# --------------------------
+#
+# Values for overriding configuration tests when cross compiling.
+
+# Set this to `yes' or `no' depending on whether the target is big
+# endian or little endian.
+#ac_cv_c_bigendian=${ac_cv_c_bigendian='yes'}

Added: packages/libhdf4/branches/upstream/current/config/freebsd
===================================================================
--- packages/libhdf4/branches/upstream/current/config/freebsd	                        (rev 0)
+++ packages/libhdf4/branches/upstream/current/config/freebsd	2007-05-15 09:53:05 UTC (rev 831)
@@ -0,0 +1,160 @@
+#                                                   -*- shell-script -*-
+#
+# This file is part of the HDF4 build script. It is processed shortly
+# after configure starts and defines, among other things, flags for
+# the various compilation modes.
+
+# Choosing C, Fortran, and C++ Compilers
+# --------------------------------------
+#
+# The user should be able to specify the compiler by setting the CC, F77,
+# and CXX environment variables to the name of the compiler and any
+# switches it requires for proper operation. If CC is unset then this
+# script may set it. If CC is unset by time this script completes then
+# configure will try `gcc' and `cc' in that order (perhaps some others
+# too).
+#
+# Note: Code later in this file may depend on the value of $CC_BASENAME
+#       in order to distinguish between different compilers when
+#       deciding which compiler command-line switches to use.  This
+#       variable is set based on the incoming value of $CC and is only
+#       used within this file.
+
+if test "X-$CC" = "X-"; then
+  CC=gcc
+  CC_BASENAME=gcc
+fi
+
+if test "X-$F77" = "X-"; then
+  F77=f77
+  F77_BASENAME=f77
+fi
+
+if test "X-$CXX" = "X-"; then
+  CXX=g++
+  CXX_BASENAME=g++
+fi
+
+# C, Fortran, and C++ Compiler and Preprocessor Flags
+# ---------------------------------------------------
+#
+# - Flags that end with `_CFLAGS' are always passed to the C compiler.
+# - Flags that end with `_FFLAGS' are always passed to the Fortran
+#   compiler.
+# - Flags that end with `_CXXFLAGS' are always passed to the C++ compiler.
+# - Flags that end with `_CPPFLAGS' are passed to the C and C++ compilers
+#   when compiling but not when linking.
+#
+#   DEBUG_CFLAGS
+#   DEBUG_FFLAGS
+#   DEBUG_CXXFLAGS
+#   DEBUG_CPPFLAGS  - Flags to pass to the compiler to create a
+#                     library suitable for use with debugging
+#			          tools. Usually this list will exclude
+#                     optimization switches (like `-O') and include
+#                     switches that turn on symbolic debugging support
+#                     (like `-g').
+#
+#   PROD_CFLAGS
+#   PROD_FFLAGS
+#   PROD_CXXFLAGS
+#   PROD_CPPFLAGS   - Flags to pass to the compiler to create a
+#                     production version of the library. These
+#                     usualy exclude symbolic debugging switches (like
+#                     `-g') and include optimization switches (like
+#                     `-O').
+#
+#   PROFILE_CFLAGS
+#   PROFILE_FFLAGS
+#   PROFILE_CXXFLAGS
+#   PROFILE_CPPFLAGS- Flags to pass to the compiler to create a
+#                     library suitable for performance testing (like
+#                     `-pg').  This may or may not include debugging or
+#                     production flags.
+#			
+#   FFLAGS
+#   CFLAGS          - Flags can be added to these variable which
+#                     might already be partially initialized. These
+#                     flags will always be passed to the compiler and
+#                     should include switches to turn on full warnings.
+#
+#                     WARNING: flags do not have to be added to the CFLAGS
+#                     or FFLAGS variable if the compiler is the GNU gcc
+#                     and g77 compiler.
+#
+#                     FFLAGS and CFLAGS should contain *something* or else
+#                     configure will probably add `-g'. For most systems
+#                     this isn't a problem but some systems will disable
+#                     optimizations in favor of the `-g'. The configure
+#                     script will remove the `-g' flag in production mode
+#                     only.
+#
+# These flags should be set according to the compiler being used.
+# There are two ways to check the compiler. You can try using `-v' or
+# `--version' to see if the compiler will print a version string.  You
+# can use the value of $FOO_BASENAME which is the base name of the
+# first word in $FOO, where FOO is either CC, F77, or CXX (note that the
+# value of CC may have changed above).
+
+case $CC_BASENAME in
+  gcc)
+    CFLAGS="$CFLAGS"
+    DEBUG_CFLAGS="-g -ansi -Wall -pedantic "
+    DEBUG_CPPFLAGS=
+    PROD_CFLAGS="-ansi -Wall -Wpointer-arith -Wcast-qual -Wcast-align -Wwrite-strings -Wconversion -Wmissing-prototypes -Wnested-externs -pedantic -O2"
+    PROD_CPPFLAGS=
+    PROFILE_CFLAGS="-pg"
+    PROFILE_CPPFLAGS=
+    ;;
+
+  *)
+    CFLAGS="$CFLAGS -ansi"
+    DEBUG_CFLAGS="-g"
+    DEBUG_CPPFLAGS=
+    PROD_CFLAGS="-O"
+    PROD_CPPFLAGS=
+    PROFILE_CFLAGS="-pg"
+    PROFILE_CPPFLAGS=
+    ;;
+esac
+
+case $F77_BASENAME in 
+  g77)
+    FFLAGS="$FFLAGS"
+    DEBUG_FFLAGS="-g"
+    PROD_FFLAGS="-O"
+    PROFILE_FFLAGS="-pg"
+    ;;
+
+  *)
+    FFLAGS="$FFLAGS -ansi"
+    DEBUG_FFLAGS="-g"
+    PROD_FFLAGS="-O"
+    PROFILE_FFLAGS="-pg"
+    ;;
+esac
+
+case $CXX_BASENAME in 
+  g++)
+    CXXFLAGS="$CXXFLAGS"
+    DEBUG_CXXFLAGS="-g -fverbose-asm"
+    PROD_CXXFLAGS="-O3 -fomit-frame-pointer"
+    PROFILE_CXXFLAGS="-pg"
+    ;;
+
+  *)
+    CXXFLAGS="$CXXFLAGS -ansi"
+    DEBUG_CXXFLAGS="-g"
+    PROD_CXXFLAGS="-O"
+    PROFILE_CXXFLAGS="-pg"
+    ;;
+esac
+
+# Overriding Configure Tests
+# --------------------------
+#
+# Values for overriding configuration tests when cross compiling.
+
+# Set this to `yes' or `no' depending on whether the target is big
+# endian or little endian.
+#ac_cv_c_bigendian=${ac_cv_c_bigendian='yes'}

Added: packages/libhdf4/branches/upstream/current/config/hpux11.00
===================================================================
--- packages/libhdf4/branches/upstream/current/config/hpux11.00	                        (rev 0)
+++ packages/libhdf4/branches/upstream/current/config/hpux11.00	2007-05-15 09:53:05 UTC (rev 831)
@@ -0,0 +1,160 @@
+#                                                   -*- shell-script -*-
+#
+# This file is part of the HDF4 build script. It is processed shortly
+# after configure starts and defines, among other things, flags for
+# the various compilation modes.
+
+# Choosing C, Fortran, and C++ Compilers
+# --------------------------------------
+#
+# The user should be able to specify the compiler by setting the CC, F77,
+# and CXX environment variables to the name of the compiler and any
+# switches it requires for proper operation. If CC is unset then this
+# script may set it. If CC is unset by time this script completes then
+# configure will try `gcc' and `cc' in that order (perhaps some others
+# too).
+#
+# Note: Code later in this file may depend on the value of $CC_BASENAME
+#       in order to distinguish between different compilers when
+#       deciding which compiler command-line switches to use.  This
+#       variable is set based on the incoming value of $CC and is only
+#       used within this file.
+
+if test "X-$CC" = "X-"; then
+  CC=cc
+  CC_BASENAME=cc
+fi
+
+if test "X-$F77" = "X-"; then
+  F77=fort77
+  F77_BASENAME=fort77
+fi
+
+if test "X-$CXX" = "X-"; then
+  CXX=aCC
+  CXX_BASENAME=aCC
+fi
+
+# C, Fortran, and C++ Compiler and Preprocessor Flags
+# ---------------------------------------------------
+#
+# - Flags that end with `_CFLAGS' are always passed to the C compiler.
+# - Flags that end with `_FFLAGS' are always passed to the Fortran
+#   compiler.
+# - Flags that end with `_CXXFLAGS' are always passed to the C++ compiler.
+# - Flags that end with `_CPPFLAGS' are passed to the C and C++ compilers
+#   when compiling but not when linking.
+#
+#   DEBUG_CFLAGS
+#   DEBUG_FFLAGS
+#   DEBUG_CXXFLAGS
+#   DEBUG_CPPFLAGS  - Flags to pass to the compiler to create a
+#                     library suitable for use with debugging
+#			          tools. Usually this list will exclude
+#                     optimization switches (like `-O') and include
+#                     switches that turn on symbolic debugging support
+#                     (like `-g').
+#
+#   PROD_CFLAGS
+#   PROD_FFLAGS
+#   PROD_CXXFLAGS
+#   PROD_CPPFLAGS   - Flags to pass to the compiler to create a
+#                     production version of the library. These
+#                     usualy exclude symbolic debugging switches (like
+#                     `-g') and include optimization switches (like
+#                     `-O').
+#
+#   PROFILE_CFLAGS
+#   PROFILE_FFLAGS
+#   PROFILE_CXXFLAGS
+#   PROFILE_CPPFLAGS- Flags to pass to the compiler to create a
+#                     library suitable for performance testing (like
+#                     `-pg').  This may or may not include debugging or
+#                     production flags.
+#			
+#   FFLAGS
+#   CFLAGS          - Flags can be added to these variable which
+#                     might already be partially initialized. These
+#                     flags will always be passed to the compiler and
+#                     should include switches to turn on full warnings.
+#
+#                     WARNING: flags do not have to be added to the CFLAGS
+#                     or FFLAGS variable if the compiler is the GNU gcc
+#                     and g77 compiler.
+#
+#                     FFLAGS and CFLAGS should contain *something* or else
+#                     configure will probably add `-g'. For most systems
+#                     this isn't a problem but some systems will disable
+#                     optimizations in favor of the `-g'. The configure
+#                     script will remove the `-g' flag in production mode
+#                     only.
+#
+# These flags should be set according to the compiler being used.
+# There are two ways to check the compiler. You can try using `-v' or
+# `--version' to see if the compiler will print a version string.  You
+# can use the value of $FOO_BASENAME which is the base name of the
+# first word in $FOO, where FOO is either CC, F77, or CXX (note that the
+# value of CC may have changed above).
+
+case $CC_BASENAME in
+  gcc)
+    CFLAGS="$CFLAGS"
+    DEBUG_CFLAGS="-g -fverbose-asm"
+    DEBUG_CPPFLAGS=
+    PROD_CFLAGS="-O3 -fomit-frame-pointer"
+    PROD_CPPFLAGS=
+    PROFILE_CFLAGS="-pg"
+    PROFILE_CPPFLAGS=
+    ;;
+
+  *)
+    CFLAGS="$CFLAGS -Ae"
+    DEBUG_CFLAGS="-g"
+    DEBUG_CPPFLAGS=
+    PROD_CFLAGS="-O -s"
+    PROD_CPPFLAGS=
+    PROFILE_CFLAGS="-pg"
+    PROFILE_CPPFLAGS=
+    ;;
+esac
+
+case $F77_BASENAME in 
+  g77)
+    FFLAGS="$FFLAGS -Wsign-compare"
+    DEBUG_FFLAGS="-g"
+    PROD_FFLAGS="-O3 -fomit-frame-pointer"
+    PROFILE_FFLAGS="-pg"
+    ;;
+
+  *)
+    FFLAGS="$FFLAGS "
+    DEBUG_FFLAGS="-g"
+    PROD_FFLAGS="-O -s"
+    PROFILE_FFLAGS="-pg"
+    ;;
+esac
+
+case $CXX_BASENAME in 
+  g++)
+    CXXFLAGS="$CXXFLAGS"
+    DEBUG_CXXFLAGS="-g -fverbose-asm"
+    PROD_CXXFLAGS="-O3 -fomit-frame-pointer"
+    PROFILE_CXXFLAGS="-pg"
+    ;;
+
+  *)
+    CXXFLAGS="$CXXFLAGS -ansi"
+    DEBUG_CXXFLAGS="-g"
+    PROD_CXXFLAGS="-O"
+    PROFILE_CXXFLAGS="-pg"
+    ;;
+esac
+
+# Overriding Configure Tests
+# --------------------------
+#
+# Values for overriding configuration tests when cross compiling.
+
+# Set this to `yes' or `no' depending on whether the target is big
+# endian or little endian.
+#ac_cv_c_bigendian=${ac_cv_c_bigendian='yes'}

Added: packages/libhdf4/branches/upstream/current/config/ia64-linux-gnu
===================================================================
--- packages/libhdf4/branches/upstream/current/config/ia64-linux-gnu	                        (rev 0)
+++ packages/libhdf4/branches/upstream/current/config/ia64-linux-gnu	2007-05-15 09:53:05 UTC (rev 831)
@@ -0,0 +1,160 @@
+#                                                   -*- shell-script -*-
+#
+# This file is part of the HDF4 build script. It is processed shortly
+# after configure starts and defines, among other things, flags for
+# the various compilation modes.
+
+# Choosing C, Fortran, and C++ Compilers
+# --------------------------------------
+#
+# The user should be able to specify the compiler by setting the CC, F77,
+# and CXX environment variables to the name of the compiler and any
+# switches it requires for proper operation. If CC is unset then this
+# script may set it. If CC is unset by time this script completes then
+# configure will try `gcc' and `cc' in that order (perhaps some others
+# too).
+#
+# Note: Code later in this file may depend on the value of $CC_BASENAME
+#       in order to distinguish between different compilers when
+#       deciding which compiler command-line switches to use.  This
+#       variable is set based on the incoming value of $CC and is only
+#       used within this file.
+
+if test "X-$CC" = "X-"; then
+  CC=ecc
+  CC_BASENAME=ecc
+fi
+
+if test "X-$F77" = "X-"; then
+  F77=efc
+  F77_BASENAME=efc
+fi
+
+if test "X-$CXX" = "X-"; then
+  CXX=ecc
+  CXX_BASENAME=ecc
+fi
+
+# C, Fortran, and C++ Compiler and Preprocessor Flags
+# ---------------------------------------------------
+#
+# - Flags that end with `_CFLAGS' are always passed to the C compiler.
+# - Flags that end with `_FFLAGS' are always passed to the Fortran
+#   compiler.
+# - Flags that end with `_CXXFLAGS' are always passed to the C++ compiler.
+# - Flags that end with `_CPPFLAGS' are passed to the C and C++ compilers
+#   when compiling but not when linking.
+#
+#   DEBUG_CFLAGS
+#   DEBUG_FFLAGS
+#   DEBUG_CXXFLAGS
+#   DEBUG_CPPFLAGS  - Flags to pass to the compiler to create a
+#                     library suitable for use with debugging
+#			          tools. Usually this list will exclude
+#                     optimization switches (like `-O') and include
+#                     switches that turn on symbolic debugging support
+#                     (like `-g').
+#
+#   PROD_CFLAGS
+#   PROD_FFLAGS
+#   PROD_CXXFLAGS
+#   PROD_CPPFLAGS   - Flags to pass to the compiler to create a
+#                     production version of the library. These
+#                     usualy exclude symbolic debugging switches (like
+#                     `-g') and include optimization switches (like
+#                     `-O').
+#
+#   PROFILE_CFLAGS
+#   PROFILE_FFLAGS
+#   PROFILE_CXXFLAGS
+#   PROFILE_CPPFLAGS- Flags to pass to the compiler to create a
+#                     library suitable for performance testing (like
+#                     `-pg').  This may or may not include debugging or
+#                     production flags.
+#			
+#   FFLAGS
+#   CFLAGS          - Flags can be added to these variable which
+#                     might already be partially initialized. These
+#                     flags will always be passed to the compiler and
+#                     should include switches to turn on full warnings.
+#
+#                     WARNING: flags do not have to be added to the CFLAGS
+#                     or FFLAGS variable if the compiler is the GNU gcc
+#                     and g77 compiler.
+#
+#                     FFLAGS and CFLAGS should contain *something* or else
+#                     configure will probably add `-g'. For most systems
+#                     this isn't a problem but some systems will disable
+#                     optimizations in favor of the `-g'. The configure
+#                     script will remove the `-g' flag in production mode
+#                     only.
+#
+# These flags should be set according to the compiler being used.
+# There are two ways to check the compiler. You can try using `-v' or
+# `--version' to see if the compiler will print a version string.  You
+# can use the value of $FOO_BASENAME which is the base name of the
+# first word in $FOO, where FOO is either CC, F77, or CXX (note that the
+# value of CC may have changed above).
+
+case $CC_BASENAME in
+  gcc)
+    CFLAGS="$CFLAGS"
+    DEBUG_CFLAGS="-g -fverbose-asm"
+    DEBUG_CPPFLAGS=
+    PROD_CFLAGS="-O3 -fomit-frame-pointer"
+    PROD_CPPFLAGS=
+    PROFILE_CFLAGS="-pg"
+    PROFILE_CPPFLAGS=
+    ;;
+
+  *)
+    CFLAGS="$CFLAGS"
+    DEBUG_CFLAGS="-g"
+    DEBUG_CPPFLAGS=
+    PROD_CFLAGS="-O"
+    PROD_CPPFLAGS=
+    PROFILE_CFLAGS="-pg"
+    PROFILE_CPPFLAGS=
+    ;;
+esac
+
+case $F77_BASENAME in 
+  g77)
+    FFLAGS="$FFLAGS -Wsign-compare"
+    DEBUG_FFLAGS="-g"
+    PROD_FFLAGS="-O3 -fomit-frame-pointer"
+    PROFILE_FFLAGS="-pg"
+    ;;
+
+  *)
+    FFLAGS="$FFLAGS"
+    DEBUG_FFLAGS="-g"
+    PROD_FFLAGS="-O"
+    PROFILE_FFLAGS="-pg"
+    ;;
+esac
+
+case $CXX_BASENAME in 
+  g++)
+    CXXFLAGS="$CXXFLAGS"
+    DEBUG_CXXFLAGS="-g -fverbose-asm"
+    PROD_CXXFLAGS="-O3 -fomit-frame-pointer"
+    PROFILE_CXXFLAGS="-pg"
+    ;;
+
+  *)
+    CXXFLAGS="$CXXFLAGS -ansi"
+    DEBUG_CXXFLAGS="-g"
+    PROD_CXXFLAGS="-O"
+    PROFILE_CXXFLAGS="-pg"
+    ;;
+esac
+
+# Overriding Configure Tests
+# --------------------------
+#
+# Values for overriding configuration tests when cross compiling.
+
+# Set this to `yes' or `no' depending on whether the target is big
+# endian or little endian.
+#ac_cv_c_bigendian=${ac_cv_c_bigendian='yes'}

Added: packages/libhdf4/branches/upstream/current/config/irix6.x
===================================================================
--- packages/libhdf4/branches/upstream/current/config/irix6.x	                        (rev 0)
+++ packages/libhdf4/branches/upstream/current/config/irix6.x	2007-05-15 09:53:05 UTC (rev 831)
@@ -0,0 +1,160 @@
+#                                                   -*- shell-script -*-
+#
+# This file is part of the HDF4 build script. It is processed shortly
+# after configure starts and defines, among other things, flags for
+# the various compilation modes.
+
+# Choosing C, Fortran, and C++ Compilers
+# --------------------------------------
+#
+# The user should be able to specify the compiler by setting the CC, F77,
+# and CXX environment variables to the name of the compiler and any
+# switches it requires for proper operation. If CC is unset then this
+# script may set it. If CC is unset by time this script completes then
+# configure will try `gcc' and `cc' in that order (perhaps some others
+# too).
+#
+# Note: Code later in this file may depend on the value of $CC_BASENAME
+#       in order to distinguish between different compilers when
+#       deciding which compiler command-line switches to use.  This
+#       variable is set based on the incoming value of $CC and is only
+#       used within this file.
+
+if test "X-$CC" = "X-"; then
+  CC=cc
+  CC_BASENAME=cc
+fi
+
+if test "X-$F77" = "X-"; then
+  F77=f90
+  F77_BASENAME=f90
+fi
+
+if test "X-$CXX" = "X-"; then
+  CXX=CC
+  CXX_BASENAME=CC
+fi
+
+# C, Fortran, and C++ Compiler and Preprocessor Flags
+# ---------------------------------------------------
+#
+# - Flags that end with `_CFLAGS' are always passed to the C compiler.
+# - Flags that end with `_FFLAGS' are always passed to the Fortran
+#   compiler.
+# - Flags that end with `_CXXFLAGS' are always passed to the C++ compiler.
+# - Flags that end with `_CPPFLAGS' are passed to the C and C++ compilers
+#   when compiling but not when linking.
+#
+#   DEBUG_CFLAGS
+#   DEBUG_FFLAGS
+#   DEBUG_CXXFLAGS
+#   DEBUG_CPPFLAGS  - Flags to pass to the compiler to create a
+#                     library suitable for use with debugging
+#			          tools. Usually this list will exclude
+#                     optimization switches (like `-O') and include
+#                     switches that turn on symbolic debugging support
+#                     (like `-g').
+#
+#   PROD_CFLAGS
+#   PROD_FFLAGS
+#   PROD_CXXFLAGS
+#   PROD_CPPFLAGS   - Flags to pass to the compiler to create a
+#                     production version of the library. These
+#                     usualy exclude symbolic debugging switches (like
+#                     `-g') and include optimization switches (like
+#                     `-O').
+#
+#   PROFILE_CFLAGS
+#   PROFILE_FFLAGS
+#   PROFILE_CXXFLAGS
+#   PROFILE_CPPFLAGS- Flags to pass to the compiler to create a
+#                     library suitable for performance testing (like
+#                     `-pg').  This may or may not include debugging or
+#                     production flags.
+#			
+#   FFLAGS
+#   CFLAGS          - Flags can be added to these variable which
+#                     might already be partially initialized. These
+#                     flags will always be passed to the compiler and
+#                     should include switches to turn on full warnings.
+#
+#                     WARNING: flags do not have to be added to the CFLAGS
+#                     or FFLAGS variable if the compiler is the GNU gcc
+#                     and g77 compiler.
+#
+#                     FFLAGS and CFLAGS should contain *something* or else
+#                     configure will probably add `-g'. For most systems
+#                     this isn't a problem but some systems will disable
+#                     optimizations in favor of the `-g'. The configure
+#                     script will remove the `-g' flag in production mode
+#                     only.
+#
+# These flags should be set according to the compiler being used.
+# There are two ways to check the compiler. You can try using `-v' or
+# `--version' to see if the compiler will print a version string.  You
+# can use the value of $FOO_BASENAME which is the base name of the
+# first word in $FOO, where FOO is either CC, F77, or CXX (note that the
+# value of CC may have changed above).
+
+case $CC_BASENAME in
+  gcc)
+    CFLAGS="$CFLAGS"
+    DEBUG_CFLAGS="-g -fverbose-asm"
+    DEBUG_CPPFLAGS=
+    PROD_CFLAGS="-O3 -fomit-frame-pointer"
+    PROD_CPPFLAGS=
+    PROFILE_CFLAGS="-pg"
+    PROFILE_CPPFLAGS=
+    ;;
+
+  *)
+    CFLAGS="$CFLAGS -ansi -s -woff 1429,1521"
+    DEBUG_CFLAGS="-g"
+    DEBUG_CPPFLAGS=
+    PROD_CFLAGS="-O"
+    PROD_CPPFLAGS=
+    PROFILE_CFLAGS="-pg"
+    PROFILE_CPPFLAGS=
+    ;;
+esac
+
+case $F77_BASENAME in 
+  g77)
+    FFLAGS="$FFLAGS -Wsign-compare"
+    DEBUG_FFLAGS="-g"
+    PROD_FFLAGS="-O3 -fomit-frame-pointer"
+    PROFILE_FFLAGS="-pg"
+    ;;
+
+  *)
+    FFLAGS="$FFLAGS -ansi -s"
+    DEBUG_FFLAGS="-g"
+    PROD_FFLAGS="-O"
+    PROFILE_FFLAGS="-pg"
+    ;;
+esac
+
+case $CXX_BASENAME in 
+  g++)
+    CXXFLAGS="$CXXFLAGS"
+    DEBUG_CXXFLAGS="-g -fverbose-asm"
+    PROD_CXXFLAGS="-O3 -fomit-frame-pointer"
+    PROFILE_CXXFLAGS="-pg"
+    ;;
+
+  *)
+    CXXFLAGS="$CXXFLAGS -ansi"
+    DEBUG_CXXFLAGS="-g"
+    PROD_CXXFLAGS="-O"
+    PROFILE_CXXFLAGS="-pg"
+    ;;
+esac
+
+# Overriding Configure Tests
+# --------------------------
+#
+# Values for overriding configuration tests when cross compiling.
+
+# Set this to `yes' or `no' depending on whether the target is big
+# endian or little endian.
+#ac_cv_c_bigendian=${ac_cv_c_bigendian='yes'}

Added: packages/libhdf4/branches/upstream/current/config/linux-gnu
===================================================================
--- packages/libhdf4/branches/upstream/current/config/linux-gnu	                        (rev 0)
+++ packages/libhdf4/branches/upstream/current/config/linux-gnu	2007-05-15 09:53:05 UTC (rev 831)
@@ -0,0 +1,164 @@
+#                                                   -*- shell-script -*-
+#
+# This file is part of the HDF4 build script. It is processed shortly
+# after configure starts and defines, among other things, flags for
+# the various compilation modes.
+
+# Choosing C, Fortran, and C++ Compilers
+# --------------------------------------
+#
+# The user should be able to specify the compiler by setting the CC, F77,
+# and CXX environment variables to the name of the compiler and any
+# switches it requires for proper operation. If CC is unset then this
+# script may set it. If CC is unset by time this script completes then
+# configure will try `gcc' and `cc' in that order (perhaps some others
+# too).
+#
+# Note: Code later in this file may depend on the value of $CC_BASENAME
+#       in order to distinguish between different compilers when
+#       deciding which compiler command-line switches to use.  This
+#       variable is set based on the incoming value of $CC and is only
+#       used within this file.
+
+if test "X-$CC" = "X-"; then
+  CC=gcc
+  CC_BASENAME=gcc
+fi
+
+if test "X-$F77" = "X-"; then
+  F77=g77
+  F77_BASENAME=g77
+
+else
+    case $F77 in
+        # The PGI and Intel compilers are automatically detected below
+        f95*|pgf90*)
+            ;;
+
+        *)
+            # Figure out which compiler we are using: pgf90 or Absoft f95
+            RM='rm -f'
+            tmpfile=/tmp/cmpver.$$
+            $F77 -V >$tmpfile
+            if test -s "$tmpfile"; then 
+                if( grep -s 'Absoft' $tmpfile > /dev/null) then
+                    F77_BASENAME=f95
+                fi 
+                if( grep -s 'pgf90' $tmpfile > /dev/null) then
+                    F77_BASENAME=pgf90
+                fi 
+            fi
+            $RM $tmpfile
+            ;;
+    esac
+fi
+
+
+# C, Fortran, and C++ Compiler and Preprocessor Flags
+# ---------------------------------------------------
+#
+# - Flags that end with `_CFLAGS' are always passed to the C compiler.
+# - Flags that end with `_FFLAGS' are always passed to the Fortran
+#   compiler.
+# - Flags that end with `_CXXFLAGS' are always passed to the C++ compiler.
+# - Flags that end with `_CPPFLAGS' are passed to the C and C++ compilers
+#   when compiling but not when linking.
+#
+#   DEBUG_CFLAGS
+#   DEBUG_FFLAGS
+#   DEBUG_CXXFLAGS
+#   DEBUG_CPPFLAGS  - Flags to pass to the compiler to create a
+#                     library suitable for use with debugging
+#			          tools. Usually this list will exclude
+#                     optimization switches (like `-O') and include
+#                     switches that turn on symbolic debugging support
+#                     (like `-g').
+#
+#   PROD_CFLAGS
+#   PROD_FFLAGS
+#   PROD_CXXFLAGS
+#   PROD_CPPFLAGS   - Flags to pass to the compiler to create a
+#                     production version of the library. These
+#                     usualy exclude symbolic debugging switches (like
+#                     `-g') and include optimization switches (like
+#                     `-O').
+#
+#   PROFILE_CFLAGS
+#   PROFILE_FFLAGS
+#   PROFILE_CXXFLAGS
+#   PROFILE_CPPFLAGS- Flags to pass to the compiler to create a
+#                     library suitable for performance testing (like
+#                     `-pg').  This may or may not include debugging or
+#                     production flags.
+#			
+#   FFLAGS
+#   CFLAGS          - Flags can be added to these variable which
+#                     might already be partially initialized. These
+#                     flags will always be passed to the compiler and
+#                     should include switches to turn on full warnings.
+#
+#                     WARNING: flags do not have to be added to the CFLAGS
+#                     or FFLAGS variable if the compiler is the GNU gcc
+#                     and g77 compiler.
+#
+#                     FFLAGS and CFLAGS should contain *something* or else
+#                     configure will probably add `-g'. For most systems
+#                     this isn't a problem but some systems will disable
+#                     optimizations in favor of the `-g'. The configure
+#                     script will remove the `-g' flag in production mode
+#                     only.
+#
+# These flags should be set according to the compiler being used.
+# There are two ways to check the compiler. You can try using `-v' or
+# `--version' to see if the compiler will print a version string.  You
+# can use the value of $FOO_BASENAME which is the base name of the
+# first word in $FOO, where FOO is either CC, F77, or CXX (note that the
+# value of CC may have changed above).
+
+case $CC_BASENAME in
+  gcc)
+    CFLAGS="$CFLAGS"
+    DEBUG_CFLAGS="-g -fverbose-asm"
+    DEBUG_CPPFLAGS=
+    PROD_CFLAGS="-O3 -fomit-frame-pointer"
+    PROD_CPPFLAGS=
+    PROFILE_CFLAGS="-pg"
+    PROFILE_CPPFLAGS=
+    ;;
+
+  *)
+    CFLAGS="$CFLAGS"
+    DEBUG_CFLAGS="-g"
+    DEBUG_CPPFLAGS=
+    PROD_CFLAGS="-O"
+    PROD_CPPFLAGS=
+    PROFILE_CFLAGS="-pg"
+    PROFILE_CPPFLAGS=
+    ;;
+esac
+
+case $F77_BASENAME in 
+  g77)
+    FFLAGS="$FFLAGS -Wsign-compare"
+    DEBUG_FFLAGS="-g"
+    PROD_FFLAGS="-O3 -fomit-frame-pointer"
+    PROFILE_FFLAGS="-pg"
+    ;;
+
+  f95)
+    CFLAGS="$CFLAGS -DH4_ABSOFT"
+    FFLAGS="$FFLAGS -YEXT_NAMES=UCS"
+    DEBUG_FFLAGS="-g"
+    PROD_FFLAGS="-O"
+    PROFILE_FFLAGS="-pg"
+    ;;
+esac
+
+# Overriding Configure Tests
+# --------------------------
+#
+# Values for overriding configuration tests when cross compiling.
+
+# Set this to `yes' or `no' depending on whether the target is big
+# endian or little endian.
+#ac_cv_c_bigendian=${ac_cv_c_bigendian='yes'}

Deleted: packages/libhdf4/branches/upstream/current/config/mh-aix
===================================================================
--- packages/libhdf4/branches/upstream/current/config/mh-aix	2007-05-15 09:05:29 UTC (rev 830)
+++ packages/libhdf4/branches/upstream/current/config/mh-aix	2007-05-15 09:53:05 UTC (rev 831)
@@ -1,182 +0,0 @@
-# $Id: mh-aix,v 1.14 1998/09/16 19:31:09 dwells Exp $
-
-# You can override the following variables here
-#
-# Sections in Host makefile fragments
-# ----------------------------------:
-# 1. General Macros for HDF
-# 2. Macros for Pablo Instrumentation
-# 3. Macros for File Cache
-# 4. General macros for NETCDF
-# 4.1 XDR Macros for NETCDF
-# 4.2 libsrc Macros for NETCDF
-# 4.3 Port Macros for NETCDF
-#
-
-# ------------ General Macros for HDF --------------------
-# Version of the library
-PACKAGE	 = HDF
-VERSION  = 4.0
-#
-# Compiliers:
-# For gcc version
-#CC=gcc
-#CFLAGS=-ansi 
-#
-#Using ANSI compilier
-CC= xlc -qlanglvl=ansi
-#CC= gcc
-CFLAGS= -O
-
-# Fortran compilier
-FC = f77
-FFLAGS = -O
-
-# Name of achive randomizer, usually ranlib (use 'true' if non-existant)
-RANLIB = ranlib
-
-# Name of library archiver and flags to send, default 'AR=ar', 'ARFLAGS=r'
-AR = ar
-ARFLAGS = ru
-
-# Name of remove utility, default 'RM=/bin/rm', 'RMFLAGS=-f'
-RM = /bin/rm
-RMFLAGS = -f
-
-# Extra libraries to be include like '-lm' for fabs()
-# e.g with naitve HP-ANSI compilier
-#LIBSX = -lm
-
-# ------------ Macros for Pablo Instrumentation  --------------------
-# Uncomment the following lines to create a Pablo Instrumentation
-# version of the HDF core library called 'libdf-inst.a'
-# See the documentation in the directory 'hdf/pablo' for further 
-# information about Pablo and what platforms it is supported on
-# before enabling. 
-# You need to set 'PABLO_INCDIR' to the Pablo distribution 
-# include directory to get to files 'IOTrace.h', 'IOTrace_SD.h' and others.
-
-#PABLO_FLAGS  = -DHAVE_PABLO
-#PABLO_INCDIR = /usr/local/include/pablo-5.1
-#PABLO_INCLUDE = -I$(PABLO_INCDIR)
-
-# ------------ Macros for File Cache(fmpool) ------
-# Uncomment the following lines to enable shared memory file buffer pool
-# version of the HDF core library libdf.a. Please read the
-# documentation before enabling this feature.
-
-#FMPOOL_FLAGS  = -DHAVE_FMPOOL
-
-# ------------ General Macros for NETCDF --------------------
-# Operating system, Used in fortran directory to generate fortran
-# wrappers. Possible values are osf, aix, hpux, irix, sunos, ultrix
-# unicos, convex, Linux, freebsd
-OS	= aix
-
-CPP	      = $(CC) -E
-
-# for endianess, for little endian byte order need -DSWAP
-# for FreeBSD and Linux(anny x86 UNIX)
-#SWAP          = -DSWAP
-SWAP          = 
-
-# for 32bit 'network long' integer, possible value -DNETLONG=int
-NETLONG       = 
-
-# additional CFLAGS
-CFLAGS_NETCDF = 
-
-# Additional flags for preproccesor. Some no longer used because
-#   library now requires ANSI compilier.
-#
-# for no function prototypes add -DNO_HAVE_PROTOTYPES
-# for no strerror()          add -DNO_STRERROR
-# for no variadic function support add -DNO_STDARG
-#
-# They all require -DHDF and -DNDEBUG 
-# Any special preprocessor requirements go here
-#
-# for Unicos 
-# CPPFLAGS_HDF  = $(FMPOOL_FLAGS) -DNDEBUG -DHDF -DBIG_SHORTS -DBIG_LONGS
-#
-# for OSF(dec alpha) 
-# CPPFLAGS_HDF  = $(FMPOOL_FLAGS) -DNDEBUG -DHDF -DBIG_LONGS -std1
-#
-# for IRIX6(64-bit) 
-# CPPFLAGS_HDF  = $(FMPOOL_FLAGS) -DNDEBUG -DHDF -DBIG_LONGS
-#
-# for AIX
-CPPFLAGS_HDF  = $(FMPOOL_FLAGS) -DNDEBUG -DHDF -D_ALL_SOURCE
-#
-# for Sunos and Linux
-# CPPFLAGS_HDF  = $(FMPOOL_FLAGS) -DNDEBUG -DHDF -DNO_STRERROR
-#
-# for IRIX6.0 (32-bit mode). If you prefer other 32 bit option like -n32, 
-#  replace '-32' below
-# CPPFLAGS_HDF  = -32 $(FMPOOL_FLAGS) -DNDEBUG -DHDF
-#
-# normal
-# CPPFLAGS_HDF  = $(FMPOOL_FLAGS) -DNDEBUG -DHDF
-
-#
-# Unix commands/utilities
-#
-# neqn(1)
-NEQN	= neqn
-# tbl(1)
-TBL	= tbl
-# which(1)
-WHICH	= which
-# lex(1)
-LEX	= lex    # GNU flex?
-# yacc(1)
-YACC	= yacc   # GNU bison?
-
-#diff(1)
-DIFF    = diff   # GNU diff?
-DIFF_FLAGS = -w
-
-# Other Macros
-NCDUMP	= 
-NCGEN	= 
-FTPDIR	= 
-VERSION_NETCDF	= 2.3.2
-
-# ------------ XDR Macros for NETCDF --------------------
-# This is where the location of system XDR library includes
-# and location of the library are set
-#
-# Location of <xdr.h> if you are using the system
-# one, Else you need to comment it out
-CPP_XDR		= -I/usr/include/rpc
-#CPP_XDR =
-
-# If XDR library not present on the system then you need
-# uncomment the following and comment the one below it
-#XDR_LIBOBJS    = xdr.o xdrfloat.o xdrstdio.o xdrarray.o
-XDR_LIBOBJS     =
-
-# Location of library, sometimes the sunos requires -lsun
-LD_XDR		= 
-
-#
-XDR_INSTALL_DEPS =
-
-# ------------ libsrc Macros for NETCDF --------------------
-# Possible values are xdrposix and xdrstdio
-# This sets which version of the XDR interface to use.
-XDRFILE		= xdrposix
-
-# ------------ Port Macros for NETCDF --------------------
-# Major and Minor numbe of NETCDF library version
-MAJOR_NO	= 2
-MINOR_NO	= 3
-PORT_CFORTRAN	= 
-NEED_FORTC	= 
-FORTC		= 
-
-# possible values are limits.h, float.h, stddef.h, stdlib.h,
-# string.h time.h signal.h unistd.h
-PORT_HEADERS	= 
-PORT_SUBDIRS    =
-LIBOBJS		= uddummy.o 

Deleted: packages/libhdf4/branches/upstream/current/config/mh-alpha
===================================================================
--- packages/libhdf4/branches/upstream/current/config/mh-alpha	2007-05-15 09:05:29 UTC (rev 830)
+++ packages/libhdf4/branches/upstream/current/config/mh-alpha	2007-05-15 09:53:05 UTC (rev 831)
@@ -1,183 +0,0 @@
-# $Id: mh-alpha,v 1.16 2000/03/01 17:11:44 epourmal Exp $
-
-# You can override the following variables here
-#
-# Sections in Host makefile fragments
-# ----------------------------------:
-# 1. General Macros for HDF
-# 2. Macros for Pablo Instrumentation
-# 3. Macros for File Cache
-# 4. General macros for NETCDF
-# 4.1 XDR Macros for NETCDF
-# 4.2 libsrc Macros for NETCDF
-# 4.3 Port Macros for NETCDF
-#
-# This file is used for both the DEC Unix and Linux operating systems, running
-#    on DEC Alpha CPUs
-
-# ------------ General Macros for HDF --------------------
-# Version of the library
-PACKAGE	 = HDF
-VERSION  = 4.0
-#
-# Compiliers:
-# For gcc version
-#CC=gcc
-#CFLAGS=-ansi 
-#
-#Using ANSI compilier
-CC=cc
-CFLAGS= -Olimit 2048 -std1
-
-# Fortran compilier
-FC = f77 
-FFLAGS = 
-
-# Name of achive randomizer, usually ranlib (use 'true' if non-existant)
-RANLIB = ranlib
-
-# Name of library archiver and flags to send, default 'AR=ar', 'ARFLAGS=r'
-AR = ar
-ARFLAGS = ru
-
-# Name of remove utility, default 'RM=/bin/rm', 'RMFLAGS=-f'
-RM = /bin/rm
-RMFLAGS = -f
-
-# Extra libraries to be include like '-lm' for fabs()
-# e.g with naitve HP-ANSI compilier
-LIBSX = -lm
-
-# ------------ Macros for Pablo Instrumentation  --------------------
-# Uncomment the following lines to create a Pablo Instrumentation
-# version of the HDF core library called 'libdf-inst.a'
-# See the documentation in the directory 'hdf/pablo' for further 
-# information about Pablo and what platforms it is supported on
-# before enabling. 
-# You need to set 'PABLO_INCDIR' to the Pablo distribution 
-# include directory to get to files 'IOTrace.h', 'IOTrace_SD.h' and others.
-
-#PABLO_FLAGS  = -DHAVE_PABLO
-#PABLO_INCDIR = /usr/local/include/pablo-5.1
-#PABLO_INCLUDE = -I$(PABLO_INCDIR)
-
-# ------------ Macros for File Cache(fmpool) ------
-# Uncomment the following lines to enable shared memory file buffer pool
-# version of the HDF core library libdf.a. Please read the
-# documentation before enabling this feature.
-
-#FMPOOL_FLAGS  = -DHAVE_FMPOOL
-
-# ------------ General Macros for NETCDF --------------------
-# Operating system, Used in fortran directory to generate fortran
-# wrappers. Possible values are osf, aix, hpux, irix, sunos, ultrix
-# unicos, convex, Linux, freebsd
-OS	= osf
-
-CPP      = $(CC) -E
-
-# for endianess, for little endian byte order need -DSWAP
-# for FreeBSD and Linux(anny x86 UNIX)
-SWAP          = -DSWAP
-#SWAP          = 
-
-# for 32bit 'network long' integer, possible value -DNETLONG=int
-NETLONG       = 
-
-# additional CFLAGS
-CFLAGS_NETCDF = 
-
-# Additional flags for preproccesor. Some no longer used because
-#   library now requires ANSI compilier.
-#
-# for no function prototypes add -DNO_HAVE_PROTOTYPES
-# for no strerror()          add -DNO_STRERROR
-# for no variadic function support add -DNO_STDARG
-#
-# They all require -DHDF and -DNDEBUG 
-# Any special preprocessor requirements go here
-#
-# for Unicos 
-# CPPFLAGS_HDF  = $(FMPOOL_FLAGS) -DNDEBUG -DHDF -DBIG_SHORTS -DBIG_LONGS
-#
-# for OSF(dec alpha) 
-CPPFLAGS_HDF  = $(FMPOOL_FLAGS) -DNDEBUG -DHDF -DBIG_LONGS -D_GNU_SOURCE
-#
-# for IRIX6(64-bit) 
-# CPPFLAGS_HDF  = $(FMPOOL_FLAGS) -DNDEBUG -DHDF -DBIG_LONGS#
-#
-# for AIX
-# CPPFLAGS_HDF  = $(FMPOOL_FLAGS) -DNDEBUG -DHDF -D_ALL_SOURCE
-#
-# for Sunos and Linux
-# CPPFLAGS_HDF  = $(FMPOOL_FLAGS) -DNDEBUG -DHDF -DNO_STRERROR
-#
-# for IRIX6.0 (32-bit mode). If you prefer other 32 bit option like -n32, 
-#  replace '-32' below
-# CPPFLAGS_HDF  = -32 $(FMPOOL_FLAGS) -DNDEBUG -DHDF
-#
-# normal
-# CPPFLAGS_HDF  = $(FMPOOL_FLAGS) -DNDEBUG -DHDF
-
-#
-# Unix commands/utilities
-#
-# neqn(1)
-NEQN	= neqn
-# tbl(1)
-TBL	= tbl
-# which(1)
-WHICH	= which
-# lex(1)
-LEX	= lex    # GNU flex?
-# yacc(1)
-YACC	= yacc   # GNU bison?
-
-#diff(1)
-DIFF    = diff   # GNU diff?
-DIFF_FLAGS = -w
-
-# Other Macros
-NCDUMP	= 
-NCGEN	= 
-FTPDIR	= 
-VERSION_NETCDF	= 2.3.2
-
-# ------------ XDR Macros for NETCDF --------------------
-# This is where the location of system XDR library includes
-# and location of the library are set
-#
-# Location of <xdr.h> if you are using the system
-# one, Else you need to comment it out
-CPP_XDR		= -I/usr/include/rpc
-#CPP_XDR
-
-# If XDR library not present on the system then you need
-# uncomment the following and comment the one below it
-#XDR_LIBOBJS    = xdr.o xdrfloat.o xdrstdio.o xdrarray.o
-XDR_LIBOBJS     =
-
-# Location of library, sometimes the sunos requires -lsun
-LD_XDR		= 
-
-#
-XDR_INSTALL_DEPS =
-
-# ------------ libsrc Macros for NETCDF --------------------
-# Possible values are xdrposix and xdrstdio
-# This sets which version of the XDR interface to use.
-XDRFILE		= xdrposix
-
-# ------------ Port Macros for NETCDF --------------------
-# Major and Minor numbe of NETCDF library version
-MAJOR_NO	= 2
-MINOR_NO	= 3
-PORT_CFORTRAN	= 
-NEED_FORTC	= 
-FORTC		= 
-
-# possible values are limits.h, float.h, stddef.h, stdlib.h,
-# string.h time.h signal.h unistd.h
-PORT_HEADERS	= 
-PORT_SUBDIRS    =
-LIBOBJS		= uddummy.o 

Deleted: packages/libhdf4/branches/upstream/current/config/mh-decstation
===================================================================
--- packages/libhdf4/branches/upstream/current/config/mh-decstation	2007-05-15 09:05:29 UTC (rev 830)
+++ packages/libhdf4/branches/upstream/current/config/mh-decstation	2007-05-15 09:53:05 UTC (rev 831)
@@ -1,181 +0,0 @@
-# $Id: mh-decstation,v 1.11 1998/09/16 19:31:11 dwells Exp $
-
-# You can override the following variables here
-#
-# Sections in Host makefile fragments
-# ----------------------------------:
-# 1. General Macros for HDF
-# 2. Macros for Pablo Instrumentation
-# 3. Macros for File Cache
-# 4. General macros for NETCDF
-# 4.1 XDR Macros for NETCDF
-# 4.2 libsrc Macros for NETCDF
-# 4.3 Port Macros for NETCDF
-#
-
-# ------------ General Macros for HDF --------------------
-# Version of the library
-PACKAGE	 = HDF
-VERSION  = 4.0
-#
-# Compiliers:
-# For gcc version
-#CC=gcc
-#CFLAGS=-ansi 
-#
-#Using ANSI compilier
-CC=gcc
-CFLAGS= -ansi
-
-# Fortran compilier
-FC = f77
-FFLAGS =
-
-# Name of achive randomizer, usually ranlib (use 'true' if non-existant)
-RANLIB = ranlib
-
-# Name of library archiver and flags to send, default 'AR=ar', 'ARFLAGS=r'
-AR = ar
-ARFLAGS = r
-
-# Name of remove utility, default 'RM=/bin/rm', 'RMFLAGS=-f'
-RM = /bin/rm
-RMFLAGS = -f
-
-# Extra libraries to be include like '-lm' for fabs()
-# e.g with naitve HP-ANSI compilier
-#LIBSX = -lm
-
-# ------------ Macros for Pablo Instrumentation  --------------------
-# Uncomment the following lines to create a Pablo Instrumentation
-# version of the HDF core library called 'libdf-inst.a'
-# See the documentation in the directory 'hdf/pablo' for further 
-# information about Pablo and what platforms it is supported on
-# before enabling. 
-# You need to set 'PABLO_INCDIR' to the Pablo distribution 
-# include directory to get to files 'IOTrace.h', 'IOTrace_SD.h' and others.
-
-#PABLO_FLAGS  = -DHAVE_PABLO
-#PABLO_INCDIR = /usr/local/include/pablo-5.1
-#PABLO_INCLUDE = -I$(PABLO_INCDIR)
-# ------------ Macros for File Cache(fmpool) ------
-# Uncomment the following lines to enable shared memory file buffer pool
-# version of the HDF core library libdf.a. Please read the
-# documentation before enabling this feature.
-
-#FMPOOL_FLAGS  = -DHAVE_FMPOOL
-
-# ------------ General Macros for NETCDF --------------------
-# Operating system, Used in fortran directory to generate fortran
-# wrappers. Possible values are osf, aix, hpux, irix, sunos, ultrix
-# unicos, convex, Linux, freebsd
-OS	= ultrix
-
-CPP	      = $(CC) -E
-
-# for endianess, for little endian byte order need -DSWAP
-# for FreeBSD and Linux(anny x86 UNIX)
-#SWAP          = -DSWAP
-SWAP          = 
-
-# for 32bit 'network long' integer, possible value -DNETLONG=int
-NETLONG       = 
-
-# additional CFLAGS
-CFLAGS_NETCDF = 
-
-# Additional flags for preproccesor. Some no longer used because
-#   library now requires ANSI compilier.
-#
-# for no function prototypes add -DNO_HAVE_PROTOTYPES
-# for no strerror()          add -DNO_STRERROR
-# for no variadic function support add -DNO_STDARG
-#
-# They all require -DHDF and -DNDEBUG 
-# Any special preprocessor requirements go here
-#
-# for Unicos 
-# CPPFLAGS_HDF  = $(FMPOOL_FLAGS) -DNDEBUG -DHDF -DBIG_SHORTS -DBIG_LONGS
-#
-# for OSF(dec alpha) 
-# CPPFLAGS_HDF  = $(FMPOOL_FLAGS) -DNDEBUG -DHDF -DBIG_LONGS -std1
-#
-# for IRIX6(64-bit) 
-# CPPFLAGS_HDF  = $(FMPOOL_FLAGS) -DNDEBUG -DHDF -DBIG_LONGS
-#
-# for AIX
-# CPPFLAGS_HDF  = $(FMPOOL_FLAGS) -DNDEBUG -DHDF -D_ALL_SOURCE
-#
-# for Sunos and Linux
-# CPPFLAGS_HDF  = $(FMPOOL_FLAGS) -DNDEBUG -DHDF -DNO_STRERROR
-#
-# for IRIX6.0 (32-bit mode). If you prefer other 32 bit option like -n32, 
-#  replace '-32' below
-# CPPFLAGS_HDF  = -32 $(FMPOOL_FLAGS) -DNDEBUG -DHDF
-#
-# normal
-CPPFLAGS_HDF  = $(FMPOOL_FLAGS) -DNDEBUG -DHDF
-
-#
-# Unix commands/utilities
-#
-# neqn(1)
-NEQN	= neqn
-# tbl(1)
-TBL	= tbl
-# which(1)
-WHICH	= which
-# lex(1)
-LEX	= lex    # GNU flex?
-# yacc(1)
-YACC	= yacc   # GNU bison?
-
-#diff(1)
-DIFF    = diff   # GNU diff?
-DIFF_FLAGS = -w
-
-# Other Macros
-NCDUMP	= 
-NCGEN	= 
-FTPDIR	= 
-VERSION_NETCDF	= 2.3.2
-
-# ------------ XDR Macros for NETCDF --------------------
-# This is where the location of system XDR library includes
-# and location of the library are set
-#
-# Location of <xdr.h> if you are using the system
-# one, Else you need to comment it out
-CPP_XDR		= -I/usr/include/rpc
-#CPP_XDR =
-
-# If XDR library not present on the system then you need
-# uncomment the following and comment the one below it
-#XDR_LIBOBJS    = xdr.o xdrfloat.o xdrstdio.o xdrarray.o
-XDR_LIBOBJS     =
-
-# location of library, sometimes the sunos requires -lsun
-LD_XDR		= 
-
-#
-XDR_INSTALL_DEPS =
-
-# ------------ libsrc Macros for NETCDF --------------------
-# Possible values are xdrposix and xdrstdio
-# This sets which version of the XDR interface to use.
-XDRFILE		= xdrposix
-
-# ------------ Port Macros for NETCDF --------------------
-# Major and Minor numbe of NETCDF library version
-MAJOR_NO	= 2
-MINOR_NO	= 3
-PORT_CFORTRAN	= 
-NEED_FORTC	= 
-FORTC		= 
-
-# possible values are limits.h, float.h, stddef.h, stdlib.h,
-# string.h time.h signal.h unistd.h
-PORT_HEADERS	= 
-PORT_SUBDIRS    =
-LIBOBJS		= uddummy.o 
-

Deleted: packages/libhdf4/branches/upstream/current/config/mh-fbsd
===================================================================
--- packages/libhdf4/branches/upstream/current/config/mh-fbsd	2007-05-15 09:05:29 UTC (rev 830)
+++ packages/libhdf4/branches/upstream/current/config/mh-fbsd	2007-05-15 09:53:05 UTC (rev 831)
@@ -1,185 +0,0 @@
-# $Id: mh-fbsd,v 1.20 2000/08/29 13:55:16 koziol Exp $
-
-# You can override the following variables here
-#
-# Sections in Host makefile fragments
-# ----------------------------------:
-# 1. General Macros for HDF
-# 2. Macros for Pablo Instrumentation
-# 3. Macros for File Cache
-# 4. General macros for NETCDF
-# 4.1 XDR Macros for NETCDF
-# 4.2 libsrc Macros for NETCDF
-# 4.3 Port Macros for NETCDF
-#
-
-# ------------ General Macros for HDF --------------------
-# Version of the library
-PACKAGE	 = HDF
-VERSION  = 4.0
-#
-# Compiliers:
-# For gcc version
-#CC=gcc
-CFLAGS=-ansi -Wall -pedantic -g
-#CFLAGS=-ansi -Wall -Wpointer-arith -Wcast-qual -Wcast-align -Wwrite-strings -Wconversion -Wmissing-prototypes -Wnested-externs -pedantic -O2
-#CFLAGS=-ansi -Wall -Wpointer-arith -Wcast-qual -Wcast-align -Wwrite-strings -Wmissing-prototypes -Wnested-externs -pedantic -O2
-#
-#Using ANSI compilier
-CC=cc
-#CFLAGS=
-
-# Fortran compilier
-FC = f77
-FFLAGS = -O
-#FFLAGS = -g
-
-# Name of achive randomizer, usually ranlib (use 'true' if non-existant)
-RANLIB = ranlib
-
-# Name of library archiver and flags to send, default 'AR=ar', 'ARFLAGS=r'
-AR = ar
-ARFLAGS = r
-
-# Name of remove utility, default 'RM=/bin/rm', 'RMFLAGS=-f'
-RM = /bin/rm
-RMFLAGS = -f
-
-# Extra libraries to be include like '-lm' for fabs()
-# e.g with naitve HP-ANSI compilier
-#LIBSX = -lm
-
-# ------------ Macros for Pablo Instrumentation  --------------------
-# Uncomment the following lines to create a Pablo Instrumentation
-# version of the HDF core library called 'libdf-inst.a'
-# See the documentation in the directory 'hdf/pablo' for further 
-# information about Pablo and what platforms it is supported on
-# before enabling. 
-# You need to set 'PABLO_INCDIR' to the Pablo distribution 
-# include directory to get to files 'IOTrace.h', 'IOTrace_SD.h' and others.
-
-#PABLO_FLAGS  = -DHAVE_PABLO
-#PABLO_INCDIR = /usr/local/include/pablo-5.1
-#PABLO_INCLUDE = -I$(PABLO_INCDIR)
-
-# ------------ Macros for File Cache(fmpool) ------
-# Uncomment the following lines to enable shared memory file buffer pool
-# version of the HDF core library libdf.a. Please read the
-# documentation before enabling this feature.
-
-#FMPOOL_FLAGS  = -DHAVE_FMPOOL
-
-# ------------ General Macros for NETCDF --------------------
-# Operating system, Used in fortran directory to generate fortran
-# wrappers. Possible values are osf, aix, hpux, irix, sunos, ultrix
-# unicos, convex, Linux, freebsd
-OS	= freebsd
-
-CPP	      = $(CC) -E
-
-# for endianess, for little endian byte order need -DSWAP
-# for FreeBSD and Linux(anny x86 UNIX)
-SWAP          = -DSWAP
-#SWAP          = 
-
-# for 32bit 'network long' integer, possible value -DNETLONG=int
-NETLONG       = 
-
-# additional CFLAGS
-CFLAGS_NETCDF = 
-
-# Additional flags for preproccesor. Some no longer used because
-#   library now requires ANSI compilier.
-#
-# for no function prototypes add -DNO_HAVE_PROTOTYPES
-# for no strerror()          add -DNO_STRERROR
-# for no variadic function support add -DNO_STDARG
-#
-# They all require -DHDF and -DNDEBUG 
-# Any special preprocessor requirements go here
-#
-# for Unicos 
-# CPPFLAGS_HDF  = $(FMPOOL_FLAGS) -DNDEBUG -DHDF -DBIG_SHORTS -DBIG_LONGS
-#
-# for OSF(dec alpha) 
-# CPPFLAGS_HDF  = $(FMPOOL_FLAGS) -DNDEBUG -DHDF -DBIG_LONGS -std1
-#
-# for IRIX6(64-bit) 
-# CPPFLAGS_HDF  = $(FMPOOL_FLAGS) -DNDEBUG -DHDF -DBIG_LONGS
-#
-# for AIX
-# CPPFLAGS_HDF  = $(FMPOOL_FLAGS) -DNDEBUG -DHDF -D_ALL_SOURCE
-#
-# for Sunos and Linux
-# CPPFLAGS_HDF  = $(FMPOOL_FLAGS) -DNDEBUG -DHDF -DNO_STRERROR
-#
-# for IRIX6.0 (32-bit mode). If you prefer other 32 bit option like -n32, 
-#  replace '-32' below
-# CPPFLAGS_HDF  = -32 $(FMPOOL_FLAGS) -DNDEBUG -DHDF
-#
-# normal
-CPPFLAGS_HDF  = $(FMPOOL_FLAGS) -DNDEBUG -DHDF
-
-#
-# Unix commands/utilities
-#
-# neqn(1)
-NEQN	= neqn
-# tbl(1)
-TBL	= tbl
-# which(1)
-WHICH	= which
-# lex(1)
-LEX	= lex    # GNU flex?
-# yacc(1)
-YACC	= yacc   # GNU bison?
-
-#diff(1)
-DIFF    = diff   # GNU diff?
-DIFF_FLAGS = -w
-
-# Other Macros
-NCDUMP	= 
-NCGEN	= 
-FTPDIR	= 
-VERSION_NETCDF	= 2.3.2
-
-# ------------ XDR Macros for NETCDF --------------------
-# This is where the location of system XDR library includes
-# and location of the library are set
-#
-# Location of <xdr.h> if you are using the system
-# one, Else you need to comment it out
-CPP_XDR		= -I/usr/include/rpc
-#CPP_XDR =
-
-# If XDR library not present on the system then you need
-# uncomment the following and comment the one below it
-XDR_LIBOBJS    = xdr.o xdrfloat.o xdrstdio.o xdrarray.o
-#XDR_LIBOBJS     =
-
-# Location of library, sometimes the sunos requires -lsun
-LD_XDR		= 
-
-#
-XDR_INSTALL_DEPS =
-
-# ------------ libsrc Macros for NETCDF --------------------
-# Possible values are xdrposix and xdrstdio
-# This sets which version of the XDR interface to use.
-XDRFILE		= xdrposix
-
-# ------------ Port Macros for NETCDF --------------------
-# Major and Minor numbe of NETCDF library version
-MAJOR_NO	= 2
-MINOR_NO	= 3
-PORT_CFORTRAN	= 
-NEED_FORTC	= 
-FORTC		= 
-
-# possible values are limits.h, float.h, stddef.h, stdlib.h,
-# string.h time.h signal.h unistd.h
-PORT_HEADERS	= 
-PORT_SUBDIRS    =
-LIBOBJS		= uddummy.o 
-

Deleted: packages/libhdf4/branches/upstream/current/config/mh-fujivp
===================================================================
--- packages/libhdf4/branches/upstream/current/config/mh-fujivp	2007-05-15 09:05:29 UTC (rev 830)
+++ packages/libhdf4/branches/upstream/current/config/mh-fujivp	2007-05-15 09:53:05 UTC (rev 831)
@@ -1,184 +0,0 @@
-# $Id: mh-fujivp,v 1.6 1998/09/16 19:31:12 dwells Exp $
-
-# You can override the following variables here
-#
-# Sections in Host makefile fragments
-# ----------------------------------:
-# 1. General Macros for HDF
-# 2. Macros for Pablo Instrumentation
-# 3. Macros for File Cache
-# 4. General macros for NETCDF
-# 4.1 XDR Macros for NETCDF
-# 4.2 libsrc Macros for NETCDF
-# 4.3 Port Macros for NETCDF
-#
-
-# ------------ General Macros for HDF --------------------
-# Version of the library
-PACKAGE	 = HDF
-VERSION  = 4.0
-#
-# Compiliers:
-# For gcc version
-#CC=gcc
-#CFLAGS=-ansi
-#CFLAGS=-ansi -Wall -pedantic -g
-#
-#Using ANSI compilier
-CC=cc
-CFLAGS=-O
-
-# Fortran compilier
-FC = NONE
-#FC = frt
-FFLAGS = -Ab -Sw
-
-# Name of achive randomizer, usually ranlib (use 'true' if non-existant)
-RANLIB = true
-
-# Name of library archiver and flags to send, default 'AR=ar', 'ARFLAGS=r'
-AR = ar
-ARFLAGS = rs
-
-# Name of remove utility, default 'RM=/bin/rm', 'RMFLAGS=-f'
-RM = /bin/rm
-RMFLAGS = -f
-
-# Extra libraries to be include like '-lm' for fabs()
-# e.g with naitve HP-ANSI compilier, Fujitsu?
-LIBSX=-lm
-
-# ------------ Macros for Pablo Instrumentation  --------------------
-# Uncomment the following lines to create a Pablo Instrumentation
-# version of the HDF core library called 'libdf-inst.a'
-# See the documentation in the directory 'hdf/pablo' for further 
-# information about Pablo and what platforms it is supported on
-# before enabling. 
-# You need to set 'PABLO_INCDIR' to the Pablo distribution 
-# include directory to get to files 'IOTrace.h', 'IOTrace_SD.h' and others.
-
-#PABLO_FLAGS  = -DHAVE_PABLO
-#PABLO_INCDIR = /usr/local/include/pablo-5.1
-#PABLO_INCLUDE = -I$(PABLO_INCDIR)
-
-# ------------ Macros for  File Cache(fmpool) ------
-# Uncomment the following lines to enable shared memory file buffer pool
-# version of the HDF core library libdf.a. Please read the
-# documentation before enabling this feature.
-
-#FMPOOL_FLAGS  = -DHAVE_FMPOOL
-
-# ------------ General Macros for NETCDF --------------------
-# Operating system, Used in fortran directory to generate fortran
-# wrappers. Possible values are osf, aix, hpux, irix, sunos, ultrix
-# unicos, convex, Linux, freebsd, fujivp
-OS = fujivp
-
-CPP	      = $(CC) -E
-
-# for endianess, for little endian byte order need -DSWAP
-# for FreeBSD and Linux(anny x86 UNIX)
-#SWAP          = -DSWAP
-SWAP          = 
-
-# for 32bit 'network long' integer, possible value -DNETLONG=int
-NETLONG       = 
-
-# additional CFLAGS
-CFLAGS_NETCDF = 
-
-# Additional flags for preproccesor. Some no longer used because
-#   library now requires ANSI compilier.
-#
-# for no function prototypes add -DNO_HAVE_PROTOTYPES
-# for no strerror()          add -DNO_STRERROR
-# for no variadic function support add -DNO_STDARG
-#
-# They all require -DHDF and -DNDEBUG 
-# Any special preprocessor requirements go here
-#
-# for Unicos 
-# CPPFLAGS_HDF  = $(FMPOOL_FLAGS) -DNDEBUG -DHDF -DBIG_SHORTS -DBIG_LONGS
-#
-# for OSF(dec alpha) 
-# CPPFLAGS_HDF  = $(FMPOOL_FLAGS) -DNDEBUG -DHDF -DBIG_LONGS -std1
-#
-# for IRIX6(64-bit) 
-# CPPFLAGS_HDF  = $(FMPOOL_FLAGS) -DNDEBUG -DHDF -DBIG_LONGS
-#
-# for AIX
-# CPPFLAGS_HDF  = $(FMPOOL_FLAGS) -DNDEBUG -DHDF -D_ALL_SOURCE
-#
-# for Sunos and Linux
-CPPFLAGS_HDF  = $(FMPOOL_FLAGS) -DNDEBUG -DHDF -DNO_STRERROR
-#
-# for IRIX6.0 (32-bit mode). If you prefer other 32 bit option like -n32, 
-#  replace '-32' below
-# CPPFLAGS_HDF  = -32 $(FMPOOL_FLAGS) -DNDEBUG -DHDF
-#
-# normal
-# CPPFLAGS_HDF  = $(FMPOOL_FLAGS) -DNDEBUG -DHDF
-
-#
-# Unix commands/utilities
-#
-# neqn(1)
-NEQN	= neqn
-# tbl(1)
-TBL	= tbl
-# which(1)
-WHICH	= which
-# lex(1)
-LEX	= lex    # GNU flex?
-# yacc(1)
-YACC	= yacc   # GNU bison?
-
-#diff(1)
-DIFF    = diff   # GNU diff?
-DIFF_FLAGS = -w
-
-# Other Macros
-NCDUMP	= 
-NCGEN	= 
-FTPDIR	= 
-VERSION_NETCDF	= 2.3.2
-
-# ------------ XDR Macros for NETCDF --------------------
-# This is where the location of system XDR library includes
-# and location of the library are set
-#
-# Location of <xdr.h> if you are using the system
-# one, Else you need to comment it out
-CPP_XDR		= -I/usr/include/rpc
-#CPP_XDR =
-
-# If XDR library not present on the system then you need
-# uncomment the following and comment the one below it
-#XDR_LIBOBJS    = xdr.o xdrfloat.o xdrstdio.o xdrarray.o
-#XDR_LIBOBJS    =
-
-# Location of library, sometimes the sunos requires -lsun
-# Fujitsu requires -lnsl
-LD_XDR		= -lnsl
-
-#
-XDR_INSTALL_DEPS =
-
-# ------------ libsrc Macros for NETCDF --------------------
-# Possible values are xdrposix and xdrstdio
-# This sets which version of the XDR interface to use.
-XDRFILE		= xdrposix
-
-# ------------ Port Macros for NETCDF --------------------
-# Major and Minor numbe of NETCDF library version
-MAJOR_NO	= 2
-MINOR_NO	= 3
-PORT_CFORTRAN	= 
-NEED_FORTC	= 
-FORTC		= 
-
-# possible values are limits.h, float.h, stddef.h, stdlib.h,
-# string.h time.h signal.h unistd.h
-PORT_HEADERS	= 
-PORT_SUBDIRS    =
-LIBOBJS		= uddummy.o 

Deleted: packages/libhdf4/branches/upstream/current/config/mh-hpux
===================================================================
--- packages/libhdf4/branches/upstream/current/config/mh-hpux	2007-05-15 09:05:29 UTC (rev 830)
+++ packages/libhdf4/branches/upstream/current/config/mh-hpux	2007-05-15 09:53:05 UTC (rev 831)
@@ -1,183 +0,0 @@
-# $Id: mh-hpux,v 1.21 1999/05/04 18:12:06 bljones Exp $
-
-# You can override the following variables here
-#
-# Sections in Host makefile fragments
-# ----------------------------------:
-# 1. General Macros for HDF
-# 2. Macros for Pablo Instrumentation
-# 3. Macros for File Cache
-# 4. General macros for NETCDF
-# 4.1 XDR Macros for NETCDF
-# 4.2 libsrc Macros for NETCDF
-# 4.3 Port Macros for NETCDF
-#
-
-# ------------ General Macros for HDF --------------------
-# Version of the library
-PACKAGE	 = HDF
-VERSION  = 4.0
-#
-# Compiliers:
-# For gcc version
-#CC=gcc
-#CFLAGS=-ansi -g
-#
-#Using HP-ANSI compilier also needs LIBSX = -lm(see below)
-CC=cc
-CFLAGS=-Ae -s
-
-# Fortran compilier, possible values fort77, f77, cf77 and fc
-FC = f77
-FFLAGS = -s
-
-# Name of achive randomizer, usually ranlib (use 'true' if non-existant)
-RANLIB = true
-
-# Name of library archiver and flags to send, default 'AR=ar', 'ARFLAGS=r'
-AR = ar
-ARFLAGS = r
-
-# Name of remove utility, default 'RM=/bin/rm', 'RMFLAGS=-f'
-RM = /bin/rm
-RMFLAGS = -f
-
-# Extra libraries to be include like '-lm' for fabs()
-# e.g with naitve HP-ANSI compilier
-LIBSX = -lm
-
-# ------------ Macros for Pablo Instrumentation  --------------------
-# Uncomment the following lines to create a Pablo Instrumentation
-# version of the HDF core library called 'libdf-inst.a'
-# See the documentation in the directory 'hdf/pablo' for further 
-# information about Pablo and what platforms it is supported on
-# before enabling. 
-# You need to set 'PABLO_INCDIR' to the Pablo distribution 
-# include directory to get to files 'IOTrace.h', 'IOTrace_SD.h' and others.
-
-#PABLO_FLAGS  = -DHAVE_PABLO
-#PABLO_INCDIR = /usr/local/include/pablo-5.1
-#PABLO_INCLUDE = -I$(PABLO_INCDIR)
-
-# ------------ Macros for File Cache(fmpool) ------
-# Uncomment the following lines to enable shared memory file buffer pool
-# version of the HDF core library libdf.a. Please read the
-# documentation before enabling this feature.
-
-#FMPOOL_FLAGS  = -DHAVE_FMPOOL
-
-# ------------ General Macros for NETCDF --------------------
-# Operating system, Used in fortran directory to generate fortran
-# wrappers. Possible values are osf, aix, hpux, irix, sunos, ultrix
-# unicos, convex, Linux, freebsd
-OS	= hpux
-
-CPP	      = $(CC) -E
-
-# for endianess, for little endian byte order need -DSWAP
-# for FreeBSD and Linux(anny x86 UNIX)
-#SWAP          = -DSWAP
-SWAP          = 
-
-# for 32bit 'network long' integer, possible value -DNETLONG=int
-NETLONG       = 
-
-# additional CFLAGS
-CFLAGS_NETCDF = 
-
-# Additional flags for preproccesor. Some no longer used because
-#   library now requires ANSI compilier.
-#
-# for no function prototypes add -DNO_HAVE_PROTOTYPES
-# for no strerror()          add -DNO_STRERROR
-# for no variadic function support add -DNO_STDARG
-#
-# They all require -DHDF and -DNDEBUG 
-# Any special preprocessor requirements go here
-#
-# for Unicos 
-# CPPFLAGS_HDF  = $(FMPOOL_FLAGS) -DNDEBUG -DHDF -DBIG_SHORTS -DBIG_LONGS
-#
-# for OSF(dec alpha) 
-# CPPFLAGS_HDF  = $(FMPOOL_FLAGS) -DNDEBUG -DHDF -DBIG_LONGS -std1
-#
-# for IRIX6(64-bit) 
-# CPPFLAGS_HDF  = $(FMPOOL_FLAGS) -DNDEBUG -DHDF -DBIG_LONGS
-#
-# for AIX
-# CPPFLAGS_HDF  = $(FMPOOL_FLAGS) -DNDEBUG -DHDF -D_ALL_SOURCE
-#
-# for Sunos and Linux
-# CPPFLAGS_HDF  = $(FMPOOL_FLAGS) -DNDEBUG -DHDF -DNO_STRERROR
-#
-# for IRIX6.0 (32-bit mode). If you prefer other 32 bit option like -n32, 
-#  replace '-32' below
-# CPPFLAGS_HDF  = -32 $(FMPOOL_FLAGS) -DNDEBUG -DHDF
-#
-# normal
-CPPFLAGS_HDF  = $(FMPOOL_FLAGS) -DNDEBUG -DHDF
-
-#
-# Unix commands/utilities
-#
-# neqn(1)
-NEQN	= neqn
-# tbl(1)
-TBL	= tbl
-# which(1)
-WHICH	= which
-# lex(1)
-LEX	= lex    # GNU flex?
-# yacc(1)
-YACC	= yacc   # GNU bison?
-
-#diff(1)
-DIFF    = diff   # GNU diff?
-DIFF_FLAGS = -w
-
-# Other Macros
-NCDUMP	= 
-NCGEN	= 
-FTPDIR	= 
-VERSION_NETCDF	= 2.3.2
-
-# ------------ XDR Macros for NETCDF --------------------
-# This is where the location of system XDR library includes
-# and location of the library are set
-#
-# Location of <xdr.h> if you are using the system
-# one, Else you need to comment it out
-CPP_XDR		= -I/usr/include/rpc
-#CPP_XDR =
-
-# If XDR library not present on the system then you need
-# uncomment the following and comment the one below it
-#XDR_LIBOBJS    = xdr.o xdrfloat.o xdrstdio.o xdrarray.o
-XDR_LIBOBJS     =
-
-# Location of library, sometimes the sunos requires -lsun
-LD_XDR		= 
-
-#
-XDR_INSTALL_DEPS =
-
-# ------------ libsrc Macros for NETCDF --------------------
-# Possible values are xdrposix and xdrstdio
-# This sets which version of the XDR interface to use.
-XDRFILE		= xdrposix
-
-# ------------ Port Macros for NETCDF --------------------
-# Major and Minor numbe of NETCDF library version
-MAJOR_NO	= 2
-MINOR_NO	= 3
-PORT_CFORTRAN	= 
-NEED_FORTC	= 
-FORTC		= 
-
-# possible values are limits.h, float.h, stddef.h, stdlib.h,
-# string.h time.h signal.h unistd.h
-PORT_HEADERS	= 
-PORT_SUBDIRS    =
-LIBOBJS		= $(TOP_SRCDIR)/mfhdf/port/uddummy.o 
-
-

Deleted: packages/libhdf4/branches/upstream/current/config/mh-hpux11
===================================================================
--- packages/libhdf4/branches/upstream/current/config/mh-hpux11	2007-05-15 09:05:29 UTC (rev 830)
+++ packages/libhdf4/branches/upstream/current/config/mh-hpux11	2007-05-15 09:53:05 UTC (rev 831)
@@ -1,183 +0,0 @@
-# $Id: mh-hpux11,v 1.1 2000/08/30 18:41:46 wendling Exp $
-
-# You can override the following variables here
-#
-# Sections in Host makefile fragments
-# ----------------------------------:
-# 1. General Macros for HDF
-# 2. Macros for Pablo Instrumentation
-# 3. Macros for File Cache
-# 4. General macros for NETCDF
-# 4.1 XDR Macros for NETCDF
-# 4.2 libsrc Macros for NETCDF
-# 4.3 Port Macros for NETCDF
-#
-
-# ------------ General Macros for HDF --------------------
-# Version of the library
-PACKAGE	 = HDF
-VERSION  = 4.0
-#
-# Compiliers:
-# For gcc version
-#CC=gcc
-#CFLAGS=-ansi -g
-#
-#Using HP-ANSI compilier also needs LIBSX = -lm(see below)
-CC=cc
-CFLAGS=-Ae -s
-
-# Fortran compilier, possible values fort77, f77, cf77 and fc
-FC = f77
-FFLAGS = -s
-
-# Name of achive randomizer, usually ranlib (use 'true' if non-existant)
-RANLIB = true
-
-# Name of library archiver and flags to send, default 'AR=ar', 'ARFLAGS=r'
-AR = ar
-ARFLAGS = r
-
-# Name of remove utility, default 'RM=/bin/rm', 'RMFLAGS=-f'
-RM = /bin/rm
-RMFLAGS = -f
-
-# Extra libraries to be include like '-lm' for fabs()
-# e.g with naitve HP-ANSI compilier
-LIBSX = -lm -lnsl
-
-# ------------ Macros for Pablo Instrumentation  --------------------
-# Uncomment the following lines to create a Pablo Instrumentation
-# version of the HDF core library called 'libdf-inst.a'
-# See the documentation in the directory 'hdf/pablo' for further 
-# information about Pablo and what platforms it is supported on
-# before enabling. 
-# You need to set 'PABLO_INCDIR' to the Pablo distribution 
-# include directory to get to files 'IOTrace.h', 'IOTrace_SD.h' and others.
-
-#PABLO_FLAGS  = -DHAVE_PABLO
-#PABLO_INCDIR = /usr/local/include/pablo-5.1
-#PABLO_INCLUDE = -I$(PABLO_INCDIR)
-
-# ------------ Macros for File Cache(fmpool) ------
-# Uncomment the following lines to enable shared memory file buffer pool
-# version of the HDF core library libdf.a. Please read the
-# documentation before enabling this feature.
-
-#FMPOOL_FLAGS  = -DHAVE_FMPOOL
-
-# ------------ General Macros for NETCDF --------------------
-# Operating system, Used in fortran directory to generate fortran
-# wrappers. Possible values are osf, aix, hpux, irix, sunos, ultrix
-# unicos, convex, Linux, freebsd
-OS	= hpux
-
-CPP	      = $(CC) -E
-
-# for endianess, for little endian byte order need -DSWAP
-# for FreeBSD and Linux(anny x86 UNIX)
-#SWAP          = -DSWAP
-SWAP          = 
-
-# for 32bit 'network long' integer, possible value -DNETLONG=int
-NETLONG       = 
-
-# additional CFLAGS
-CFLAGS_NETCDF = 
-
-# Additional flags for preproccesor. Some no longer used because
-#   library now requires ANSI compilier.
-#
-# for no function prototypes add -DNO_HAVE_PROTOTYPES
-# for no strerror()          add -DNO_STRERROR
-# for no variadic function support add -DNO_STDARG
-#
-# They all require -DHDF and -DNDEBUG 
-# Any special preprocessor requirements go here
-#
-# for Unicos 
-# CPPFLAGS_HDF  = $(FMPOOL_FLAGS) -DNDEBUG -DHDF -DBIG_SHORTS -DBIG_LONGS
-#
-# for OSF(dec alpha) 
-# CPPFLAGS_HDF  = $(FMPOOL_FLAGS) -DNDEBUG -DHDF -DBIG_LONGS -std1
-#
-# for IRIX6(64-bit) 
-# CPPFLAGS_HDF  = $(FMPOOL_FLAGS) -DNDEBUG -DHDF -DBIG_LONGS
-#
-# for AIX
-# CPPFLAGS_HDF  = $(FMPOOL_FLAGS) -DNDEBUG -DHDF -D_ALL_SOURCE
-#
-# for Sunos and Linux
-# CPPFLAGS_HDF  = $(FMPOOL_FLAGS) -DNDEBUG -DHDF -DNO_STRERROR
-#
-# for IRIX6.0 (32-bit mode). If you prefer other 32 bit option like -n32, 
-#  replace '-32' below
-# CPPFLAGS_HDF  = -32 $(FMPOOL_FLAGS) -DNDEBUG -DHDF
-#
-# normal
-CPPFLAGS_HDF  = $(FMPOOL_FLAGS) -DNDEBUG -DHDF
-
-#
-# Unix commands/utilities
-#
-# neqn(1)
-NEQN	= neqn
-# tbl(1)
-TBL	= tbl
-# which(1)
-WHICH	= which
-# lex(1)
-LEX	= lex    # GNU flex?
-# yacc(1)
-YACC	= yacc   # GNU bison?
-
-#diff(1)
-DIFF    = diff   # GNU diff?
-DIFF_FLAGS = -w
-
-# Other Macros
-NCDUMP	= 
-NCGEN	= 
-FTPDIR	= 
-VERSION_NETCDF	= 2.3.2
-
-# ------------ XDR Macros for NETCDF --------------------
-# This is where the location of system XDR library includes
-# and location of the library are set
-#
-# Location of <xdr.h> if you are using the system
-# one, Else you need to comment it out
-CPP_XDR		= -I/usr/include/rpc
-#CPP_XDR =
-
-# If XDR library not present on the system then you need
-# uncomment the following and comment the one below it
-#XDR_LIBOBJS    = xdr.o xdrfloat.o xdrstdio.o xdrarray.o
-XDR_LIBOBJS     =
-
-# Location of library, sometimes the sunos requires -lsun
-LD_XDR		= 
-
-#
-XDR_INSTALL_DEPS =
-
-# ------------ libsrc Macros for NETCDF --------------------
-# Possible values are xdrposix and xdrstdio
-# This sets which version of the XDR interface to use.
-XDRFILE		= xdrposix
-
-# ------------ Port Macros for NETCDF --------------------
-# Major and Minor numbe of NETCDF library version
-MAJOR_NO	= 2
-MINOR_NO	= 3
-PORT_CFORTRAN	= 
-NEED_FORTC	= 
-FORTC		= 
-
-# possible values are limits.h, float.h, stddef.h, stdlib.h,
-# string.h time.h signal.h unistd.h
-PORT_HEADERS	= 
-PORT_SUBDIRS    =
-LIBOBJS		= $(TOP_SRCDIR)/mfhdf/port/uddummy.o 
-
-

Deleted: packages/libhdf4/branches/upstream/current/config/mh-ia64
===================================================================
--- packages/libhdf4/branches/upstream/current/config/mh-ia64	2007-05-15 09:05:29 UTC (rev 830)
+++ packages/libhdf4/branches/upstream/current/config/mh-ia64	2007-05-15 09:53:05 UTC (rev 831)
@@ -1,182 +0,0 @@
-# $Id: mh-ia64,v 1.1 2000/05/23 18:07:01 acheng Exp $
-
-# You can override the following variables here
-#
-# Sections in Host makefile fragments
-# ----------------------------------:
-# 1. General Macros for HDF
-# 2. Macros for Pablo Instrumentation
-# 3. Macros for File Cache
-# 4. General macros for NETCDF
-# 4.1 XDR Macros for NETCDF
-# 4.2 libsrc Macros for NETCDF
-# 4.3 Port Macros for NETCDF
-#
-# This file is used for IA64 running Linux
-
-# ------------ General Macros for HDF --------------------
-# Version of the library
-PACKAGE	 = HDF
-VERSION  = 4.0
-#
-# Compiliers:
-# For gcc version
-#CC=gcc
-#CFLAGS=-ansi 
-#
-#Using ANSI compilier
-CC=cc
-CFLAGS= -DNDEBUG -DHDF -DBIG_LONGS -DIA64
-
-# Fortran compilier
-FC = f90
-FFLAGS = 
-
-# Name of achive randomizer, usually ranlib (use 'true' if non-existant)
-RANLIB = ranlib
-
-# Name of library archiver and flags to send, default 'AR=ar', 'ARFLAGS=r'
-AR = ar
-ARFLAGS = ru
-
-# Name of remove utility, default 'RM=/bin/rm', 'RMFLAGS=-f'
-RM = /bin/rm
-RMFLAGS = -f
-
-# Extra libraries to be include like '-lm' for fabs()
-# e.g with naitve HP-ANSI compilier
-LIBSX = -lm
-
-# ------------ Macros for Pablo Instrumentation  --------------------
-# Uncomment the following lines to create a Pablo Instrumentation
-# version of the HDF core library called 'libdf-inst.a'
-# See the documentation in the directory 'hdf/pablo' for further 
-# information about Pablo and what platforms it is supported on
-# before enabling. 
-# You need to set 'PABLO_INCDIR' to the Pablo distribution 
-# include directory to get to files 'IOTrace.h', 'IOTrace_SD.h' and others.
-
-#PABLO_FLAGS  = -DHAVE_PABLO
-#PABLO_INCDIR = /usr/local/include/pablo-5.1
-#PABLO_INCLUDE = -I$(PABLO_INCDIR)
-
-# ------------ Macros for File Cache(fmpool) ------
-# Uncomment the following lines to enable shared memory file buffer pool
-# version of the HDF core library libdf.a. Please read the
-# documentation before enabling this feature.
-
-#FMPOOL_FLAGS  = -DHAVE_FMPOOL
-
-# ------------ General Macros for NETCDF --------------------
-# Operating system, Used in fortran directory to generate fortran
-# wrappers. Possible values are osf, aix, hpux, irix, sunos, ultrix
-# unicos, convex, Linux, freebsd
-OS	= Linux
-
-CPP      = $(CC) -E
-
-# for endianess, for little endian byte order need -DSWAP
-# for FreeBSD and Linux(anny x86 UNIX)
-SWAP          = -DSWAP
-#SWAP          = 
-
-# for 32bit 'network long' integer, possible value -DNETLONG=int
-NETLONG       = 
-
-# additional CFLAGS
-CFLAGS_NETCDF = 
-
-# Additional flags for preproccesor. Some no longer used because
-#   library now requires ANSI compilier.
-#
-# for no function prototypes add -DNO_HAVE_PROTOTYPES
-# for no strerror()          add -DNO_STRERROR
-# for no variadic function support add -DNO_STDARG
-#
-# They all require -DHDF and -DNDEBUG 
-# Any special preprocessor requirements go here
-#
-# for Unicos 
-# CPPFLAGS_HDF  = $(FMPOOL_FLAGS) -DNDEBUG -DHDF -DBIG_SHORTS -DBIG_LONGS
-#
-# for OSF(dec alpha) 
-# CPPFLAGS_HDF  = $(FMPOOL_FLAGS) -DNDEBUG -DHDF -DBIG_LONGS -D_GNU_SOURCE
-#
-# for IRIX6(64-bit) 
-CPPFLAGS_HDF  = $(FMPOOL_FLAGS) -DNDEBUG -DHDF -DBIG_LONGS -DIA64
-#
-# for AIX
-# CPPFLAGS_HDF  = $(FMPOOL_FLAGS) -DNDEBUG -DHDF -D_ALL_SOURCE
-#
-# for Sunos and Linux
-# CPPFLAGS_HDF  = $(FMPOOL_FLAGS) -DNDEBUG -DHDF -DNO_STRERROR
-#
-# for IRIX6.0 (32-bit mode). If you prefer other 32 bit option like -n32, 
-#  replace '-32' below
-# CPPFLAGS_HDF  = -32 $(FMPOOL_FLAGS) -DNDEBUG -DHDF
-#
-# normal
-# CPPFLAGS_HDF  = $(FMPOOL_FLAGS) -DNDEBUG -DHDF
-
-#
-# Unix commands/utilities
-#
-# neqn(1)
-NEQN	= neqn
-# tbl(1)
-TBL	= tbl
-# which(1)
-WHICH	= which
-# lex(1)
-LEX	= lex    # GNU flex?
-# yacc(1)
-YACC	= yacc   # GNU bison?
-
-#diff(1)
-DIFF    = diff   # GNU diff?
-DIFF_FLAGS = -w
-
-# Other Macros
-NCDUMP	= 
-NCGEN	= 
-FTPDIR	= 
-VERSION_NETCDF	= 2.3.2
-
-# ------------ XDR Macros for NETCDF --------------------
-# This is where the location of system XDR library includes
-# and location of the library are set
-#
-# Location of <xdr.h> if you are using the system
-# one, Else you need to comment it out
-CPP_XDR		= -I/usr/include/rpc
-#CPP_XDR
-
-# If XDR library not present on the system then you need
-# uncomment the following and comment the one below it
-#XDR_LIBOBJS    = xdr.o xdrfloat.o xdrstdio.o xdrarray.o
-XDR_LIBOBJS     =
-
-# Location of library, sometimes the sunos requires -lsun
-LD_XDR		= 
-
-#
-XDR_INSTALL_DEPS =
-
-# ------------ libsrc Macros for NETCDF --------------------
-# Possible values are xdrposix and xdrstdio
-# This sets which version of the XDR interface to use.
-XDRFILE		= xdrposix
-
-# ------------ Port Macros for NETCDF --------------------
-# Major and Minor numbe of NETCDF library version
-MAJOR_NO	= 2
-MINOR_NO	= 3
-PORT_CFORTRAN	= 
-NEED_FORTC	= 
-FORTC		= 
-
-# possible values are limits.h, float.h, stddef.h, stdlib.h,
-# string.h time.h signal.h unistd.h
-PORT_HEADERS	= 
-PORT_SUBDIRS    =
-LIBOBJS		= uddummy.o 

Deleted: packages/libhdf4/branches/upstream/current/config/mh-irix32
===================================================================
--- packages/libhdf4/branches/upstream/current/config/mh-irix32	2007-05-15 09:05:29 UTC (rev 830)
+++ packages/libhdf4/branches/upstream/current/config/mh-irix32	2007-05-15 09:53:05 UTC (rev 831)
@@ -1,195 +0,0 @@
-# $Id: mh-irix32,v 1.17 2000/08/29 00:30:39 acheng Exp $
-
-# You can override the following variables here
-#
-# Sections in Host makefile fragments
-# ----------------------------------:
-# 1. General Macros for HDF
-# 2. Macros for Pablo Instrumentation
-# 3. Macros for File Cache
-# 4. General macros for NETCDF
-# 4.1 XDR Macros for NETCDF
-# 4.2 libsrc Macros for NETCDF
-# 4.3 Port Macros for NETCDF
-#
-
-# ------------ General Macros for HDF --------------------
-# Version of the library
-PACKAGE	 = HDF
-VERSION  = 4.0
-#
-# Machine/OS: SGI/IRIX 6.x (32-bit mode)
-#
-# This uses the -n32 options.
-# If you prefer other options like, you may change them in
-# the following CFLAGS and FFLAGS.
-# See also the netCDF section dealing with CPPFLAGS_HDF to
-# change the options there too.
-#
-# Compiliers:
-# For gcc version
-#CC=gcc
-#CFLAGS=-ansi 
-#
-# Using ANSI compilier
-CC=cc
-# IRIX 6.1 has an error in its system include file, stdio.h,
-# that gives incorrect warning message when both "-n32" and "-ansi"
-# flags are used.
-# Turn off some incorrect or harmless warnings.
-# 1521 -- about #ident not standard.  SGI puts them in their system header files
-warn=-woff 1521
-CFLAGS=-ansi -n32 -O -s $(warn)
-
-# Fortran compilier
-FC = f90
-FFLAGS =-n32 -O -s
-
-# Name of archive randomizer, usually ranlib (use 'true' if non-existant)
-RANLIB = true
-
-# Name of library archiver and flags to send, default 'AR=ar', 'ARFLAGS=r'
-AR = ar
-ARFLAGS = rs
-
-# Name of remove utility, default 'RM=/bin/rm', 'RMFLAGS=-f'
-RM = /bin/rm
-RMFLAGS = -f
-
-# Extra libraries to be include like '-lm' for fabs()
-# e.g with naitve HP-ANSI compilier
-#LIBSX = -lm
-
-# ------------ Macros for Pablo Instrumentation  --------------------
-# Uncomment the following lines to create a Pablo Instrumentation
-# version of the HDF core library called 'libdf-inst.a'
-# See the documentation in the directory 'hdf/pablo' for further 
-# information about Pablo and what platforms it is supported on
-# before enabling. 
-# You need to set 'PABLO_INCDIR' to the Pablo distribution 
-# include directory to get to files 'IOTrace.h', 'IOTrace_SD.h' and others.
-
-#PABLO_FLAGS  = -DHAVE_PABLO
-#PABLO_INCDIR = /usr/local/include/pablo-5.1
-#PABLO_INCLUDE = -I$(PABLO_INCDIR)
-
-# ------------ Macros for File Cache(fmpool) ------
-# Uncomment the following lines to enable shared memory file buffer pool
-# version of the HDF core library libdf.a. Please read the
-# documentation before enabling this feature.
-
-#FMPOOL_FLAGS  = -DHAVE_FMPOOL
-
-# ------------ General Macros for NETCDF --------------------
-# Operating system, Used in fortran directory to generate fortran
-# wrappers. Possible values are osf, aix, hpux, irix, sunos, ultrix
-# unicos, convex, Linux, freebsd
-OS	= irix
-
-CPP	      = $(CC) -E
-
-# for endianess, for little endian byte order need -DSWAP
-# for FreeBSD and Linux(anny x86 UNIX)
-#SWAP          = -DSWAP
-SWAP          = 
-
-# for 32bit 'network long' integer, possible value -DNETLONG=int
-NETLONG       = 
-
-# additional CFLAGS
-CFLAGS_NETCDF = 
-
-# Additional flags for preproccesor. Some no longer used because
-#   library now requires ANSI compilier.
-#
-# for no function prototypes add -DNO_HAVE_PROTOTYPES
-# for no strerror()          add -DNO_STRERROR
-# for no variadic function support add -DNO_STDARG
-#
-# They all require -DHDF and -DNDEBUG 
-# Any special preprocessor requirements go here
-#
-# for Unicos 
-# CPPFLAGS_HDF  = $(FMPOOL_FLAGS) -DNDEBUG -DHDF -DBIG_SHORTS -DBIG_LONGS
-#
-# for OSF(dec alpha) 
-# CPPFLAGS_HDF  = $(FMPOOL_FLAGS) -DNDEBUG -DHDF -DBIG_LONGS -std1
-#
-# for IRIX6(64-bit) 
-# CPPFLAGS_HDF  = -64 $(FMPOOL_FLAGS) -DNDEBUG -DHDF -DBIG_LONGS
-#
-# for AIX
-# CPPFLAGS_HDF  = $(FMPOOL_FLAGS) -DNDEBUG -DHDF -D_ALL_SOURCE
-#
-# for Sunos and Linux
-# CPPFLAGS_HDF  = $(FMPOOL_FLAGS) -DNDEBUG -DHDF -DNO_STRERROR
-#
-# for IRIX6.x (32-bit mode).
-CPPFLAGS_HDF  = -n32 $(FMPOOL_FLAGS) -DNDEBUG -DHDF
-#
-# normal
-#CPPFLAGS_HDF  = $(FMPOOL_FLAGS) -DNDEBUG -DHDF
-
-#
-# Unix commands/utilities
-#
-# neqn(1)
-NEQN	= neqn
-# tbl(1)
-TBL	= tbl
-# which(1)
-WHICH	= which
-# lex(1)
-LEX	= lex    # GNU flex?
-# yacc(1)
-YACC	= yacc   # GNU bison?
-
-#diff(1)
-DIFF    = diff   # GNU diff?
-DIFF_FLAGS = -w
-
-# Other Macros
-NCDUMP	= 
-NCGEN	= 
-FTPDIR	= 
-VERSION_NETCDF	= 2.3.2
-
-# ------------ XDR Macros for NETCDF --------------------
-# This is where the location of system XDR library includes
-# and location of the library are set
-#
-# Location of <xdr.h> if you are using the system
-# one, Else you need to comment it out
-CPP_XDR		= -I/usr/include/rpc
-#CPP_XDR =
-
-# If XDR library not present on the system then you need
-# uncomment the following and comment the one below it
-#XDR_LIBOBJS    = xdr.o xdrfloat.o xdrstdio.o xdrarray.o
-XDR_LIBOBJS     =
-
-# Location of library, sometimes the sunos requires -lsun
-LD_XDR		= 
-
-#
-XDR_INSTALL_DEPS =
-
-# ------------ libsrc Macros for NETCDF --------------------
-# Possible values are xdrposix and xdrstdio
-# This sets which version of the XDR interface to use.
-XDRFILE		= xdrposix
-
-# ------------ Port Macros for NETCDF --------------------
-# Major and Minor numbe of NETCDF library version
-MAJOR_NO	= 2
-MINOR_NO	= 3
-PORT_CFORTRAN	= 
-NEED_FORTC	= 
-FORTC		= 
-
-# possible values are limits.h, float.h, stddef.h, stdlib.h,
-# string.h time.h signal.h unistd.h
-PORT_HEADERS	= 
-PORT_SUBDIRS    =
-LIBOBJS		= uddummy.o 
-

Deleted: packages/libhdf4/branches/upstream/current/config/mh-irix5
===================================================================
--- packages/libhdf4/branches/upstream/current/config/mh-irix5	2007-05-15 09:05:29 UTC (rev 830)
+++ packages/libhdf4/branches/upstream/current/config/mh-irix5	2007-05-15 09:53:05 UTC (rev 831)
@@ -1,185 +0,0 @@
-# $Id: mh-irix5,v 1.15 1998/09/16 19:31:15 dwells Exp $
-
-# You can override the following variables here
-#
-# Sections in Host makefile fragments
-# ----------------------------------:
-# 1. General Macros for HDF
-# 2. Macros for Pablo Instrumentation
-# 3. Macros for File Cache
-# 4. General macros for NETCDF
-# 4.1 XDR Macros for NETCDF
-# 4.2 libsrc Macros for NETCDF
-# 4.3 Port Macros for NETCDF
-#
-
-# ------------ General Macros for HDF --------------------
-# Version of the library
-PACKAGE	 = HDF
-VERSION  = 4.0
-#
-# Compiliers:
-# For gcc version
-#CC=gcc
-#CFLAGS=-ansi 
-#
-#Using ANSI compilier
-CC=cc
-#CFLAGS=-ansi -O -s -pedantic -fullwarn -wlint,-p -woff 828,841,822
-#CFLAGS=-ansi -O -s -pedantic -fullwarn -wlint,-p -woff 828,841,822,826,852,813
-CFLAGS=-ansi -O -s
-#CFLAGS=-ansi -g
-
-# Fortran compilier
-FC = f77
-FFLAGS = -O -s
-
-# Name of archive randomizer, usually ranlib (use 'true' if non-existant)
-RANLIB = true
-
-# Name of library archiver and flags to send, default 'AR=ar', 'ARFLAGS=r'
-AR = ar
-ARFLAGS = rs
-
-# Name of remove utility, default 'RM=/bin/rm', 'RMFLAGS=-f'
-RM = /bin/rm
-RMFLAGS = -f
-
-# Extra libraries to be include like '-lm' for fabs()
-# e.g with naitve HP-ANSI compilier
-#LIBSX = -lm
-
-# ------------ Macros for Pablo Instrumentation  --------------------
-# Uncomment the following lines to create a Pablo Instrumentation
-# version of the HDF core library called 'libdf-inst.a'
-# See the documentation in the directory 'hdf/pablo' for further 
-# information about Pablo and what platforms it is supported on
-# before enabling. 
-# You need to set 'PABLO_INCDIR' to the Pablo distribution 
-# include directory to get to files 'IOTrace.h', 'IOTrace_SD.h' and others.
-
-#PABLO_FLAGS  = -DHAVE_PABLO
-#PABLO_INCDIR = /usr/local/include/pablo-5.1
-#PABLO_INCLUDE = -I$(PABLO_INCDIR)
-
-# ------------ Macros for File Cache(fmpool) ------
-# Uncomment the following lines to enable shared memory file buffer pool
-# version of the HDF core library libdf.a. Please read the
-# documentation before enabling this feature.
-
-#FMPOOL_FLAGS  = -DHAVE_FMPOOL
-
-# ------------ General Macros for NETCDF --------------------
-# Operating system, Used in fortran directory to generate fortran
-# wrappers. Possible values are osf, aix, hpux, irix, sunos, ultrix
-# unicos, convex, Linux, freebsd
-OS	= irix
-
-CPP	      = $(CC) -E
-
-# for endianess, for little endian byte order need -DSWAP
-# for FreeBSD and Linux(anny x86 UNIX)
-#SWAP          = -DSWAP
-SWAP          = 
-
-# for 32bit 'network long' integer, possible value -DNETLONG=int
-NETLONG       = 
-
-# additional CFLAGS
-CFLAGS_NETCDF = 
-
-# Additional flags for preproccesor. Some no longer used because
-#   library now requires ANSI compilier.
-#
-# for no function prototypes add -DNO_HAVE_PROTOTYPES
-# for no strerror()          add -DNO_STRERROR
-# for no variadic function support add -DNO_STDARG
-#
-# They all require -DHDF and -DNDEBUG 
-# Any special preprocessor requirements go here
-#
-# for Unicos 
-# CPPFLAGS_HDF  = $(FMPOOL_FLAGS) -DNDEBUG -DHDF -DBIG_SHORTS -DBIG_LONGS
-#
-# for OSF(dec alpha) 
-# CPPFLAGS_HDF  = $(FMPOOL_FLAGS) -DNDEBUG -DHDF -DBIG_LONGS -std1
-#
-# for IRIX6(64-bit) 
-# CPPFLAGS_HDF  = $(FMPOOL_FLAGS) -DNDEBUG -DHDF -DBIG_LONGS
-#
-# for AIX
-# CPPFLAGS_HDF  = $(FMPOOL_FLAGS) -DNDEBUG -DHDF -D_ALL_SOURCE
-#
-# for Sunos and Linux
-# CPPFLAGS_HDF  = $(FMPOOL_FLAGS) -DNDEBUG -DHDF -DNO_STRERROR
-#
-# for IRIX6.0 (32-bit mode). If you prefer other 32 bit option like -n32, 
-#  replace '-32' below
-# CPPFLAGS_HDF  = -32 $(FMPOOL_FLAGS) -DNDEBUG -DHDF
-#
-# normal
-CPPFLAGS_HDF  = $(FMPOOL_FLAGS) -DNDEBUG -DHDF
-
-#
-# Unix commands/utilities
-#
-# neqn(1)
-NEQN	= neqn
-# tbl(1)
-TBL	= tbl
-# which(1)
-WHICH	= which
-# lex(1)
-LEX	= lex    # GNU flex?
-# yacc(1)
-YACC	= yacc   # GNU bison?
-
-#diff(1)
-DIFF    = diff   # GNU diff?
-DIFF_FLAGS = -w
-
-# Other Macros
-NCDUMP	= 
-NCGEN	= 
-FTPDIR	= 
-VERSION_NETCDF	= 2.3.2
-
-# ------------ XDR Macros for NETCDF --------------------
-# This is where the location of system XDR library includes
-# and location of the library are set
-#
-# Location of <xdr.h> if you are using the system
-# one, Else you need to comment it out
-CPP_XDR		= -I/usr/include/rpc
-#CPP_XDR =
-
-# If XDR library not present on the system then you need
-# uncomment the following and comment the one below it
-#XDR_LIBOBJS    = xdr.o xdrfloat.o xdrstdio.o xdrarray.o
-XDR_LIBOBJS     =
-
-# Location of library, sometimes the sunos requires -lsun
-LD_XDR		= 
-
-#
-XDR_INSTALL_DEPS =
-
-# ------------ libsrc Macros for NETCDF --------------------
-# Possible values are xdrposix and xdrstdio
-# This sets which version of the XDR interface to use.
-XDRFILE		= xdrposix
-
-# ------------ Port Macros for NETCDF --------------------
-# Major and Minor numbe of NETCDF library version
-MAJOR_NO	= 2
-MINOR_NO	= 3
-PORT_CFORTRAN	= 
-NEED_FORTC	= 
-FORTC		= 
-
-# possible values are limits.h, float.h, stddef.h, stdlib.h,
-# string.h time.h signal.h unistd.h
-PORT_HEADERS	= 
-PORT_SUBDIRS    =
-LIBOBJS		= uddummy.o 
-

Deleted: packages/libhdf4/branches/upstream/current/config/mh-irix6
===================================================================
--- packages/libhdf4/branches/upstream/current/config/mh-irix6	2007-05-15 09:05:29 UTC (rev 830)
+++ packages/libhdf4/branches/upstream/current/config/mh-irix6	2007-05-15 09:53:05 UTC (rev 831)
@@ -1,185 +0,0 @@
-# $Id: mh-irix6,v 1.17 2000/08/29 00:30:39 acheng Exp $
-
-# You can override the following variables here
-#
-# Sections in Host makefile fragments
-# ----------------------------------:
-# 1. General Macros for HDF
-# 2. Macros for Pablo Instrumentation
-# 3. Macros for File Cache
-# 4. General macros for NETCDF
-# 4.1 XDR Macros for NETCDF
-# 4.2 libsrc Macros for NETCDF
-# 4.3 Port Macros for NETCDF
-#
-
-# ------------ General Macros for HDF --------------------
-# Version of the library
-PACKAGE	 = HDF
-VERSION  = 4.0
-#
-# Compiliers:
-# For gcc version
-#CC=gcc
-#CFLAGS=-ansi 
-#
-# Using ANSI compilier
-CC=cc
-# turn off some incorrect or harmless warnings.
-# 1429 -- about long long as non-standard.  It is in the new C standard.
-# 1521 -- about #ident not standard.  SGI puts them in their system header files
-warn=-woff 1429,1521
-CFLAGS=-ansi -64 -O -s $(warn)
-
-# Fortran compilier
-FC = f90
-FFLAGS =-64 -O -s
-
-# Name of archive randomizer, usually ranlib (use 'true' if non-existant)
-RANLIB = true
-
-# Name of library archiver and flags to send, default 'AR=ar', 'ARFLAGS=r'
-AR = ar
-ARFLAGS = rs
-
-# Name of remove utility, default 'RM=/bin/rm', 'RMFLAGS=-f'
-RM = /bin/rm
-RMFLAGS = -f
-
-# Extra libraries to be include like '-lm' for fabs()
-# e.g with naitve HP-ANSI compilier
-#LIBSX = -lm
-
-# ------------ Macros for Pablo Instrumentation  --------------------
-# Uncomment the following lines to create a Pablo Instrumentation
-# version of the HDF core library called 'libdf-inst.a'
-# See the documentation in the directory 'hdf/pablo' for further 
-# information about Pablo and what platforms it is supported on
-# before enabling. 
-# You need to set 'PABLO_INCDIR' to the Pablo distribution 
-# include directory to get to files 'IOTrace.h', 'IOTrace_SD.h' and others.
-
-#PABLO_FLAGS  = -DHAVE_PABLO
-#PABLO_INCDIR = /usr/local/include/pablo-5.1
-#PABLO_INCLUDE = -I$(PABLO_INCDIR)
-
-# ------------ Macros for File Cache(fmpool) ------
-# Uncomment the following lines to enable shared memory file buffer pool
-# version of the HDF core library libdf.a. Please read the
-# documentation before enabling this feature.
-
-#FMPOOL_FLAGS  = -DHAVE_FMPOOL
-
-# ------------ General Macros for NETCDF --------------------
-# Operating system, Used in fortran directory to generate fortran
-# wrappers. Possible values are osf, aix, hpux, irix, sunos, ultrix
-# unicos, convex, Linux, freebsd
-OS	= irix
-
-CPP	      = $(CC) -E
-
-# for endianess, for little endian byte order need -DSWAP
-# for FreeBSD and Linux(anny x86 UNIX)
-#SWAP          = -DSWAP
-SWAP          = 
-
-# for 32bit 'network long' integer, possible value -DNETLONG=int
-NETLONG       = 
-
-# additional CFLAGS
-CFLAGS_NETCDF = 
-
-# Additional flags for preproccesor. Some no longer used because
-#   library now requires ANSI compilier.
-#
-# for no function prototypes add -DNO_HAVE_PROTOTYPES
-# for no strerror()          add -DNO_STRERROR
-# for no variadic function support add -DNO_STDARG
-#
-# They all require -DHDF and -DNDEBUG 
-# Any special preprocessor requirements go here
-#
-# for Unicos 
-# CPPFLAGS_HDF  = $(FMPOOL_FLAGS) -DNDEBUG -DHDF -DBIG_SHORTS -DBIG_LONGS
-#
-# for OSF(dec alpha) 
-# CPPFLAGS_HDF  = $(FMPOOL_FLAGS) -DNDEBUG -DHDF -DBIG_LONGS -std1
-#
-# for IRIX6(64-bit) 
-CPPFLAGS_HDF  = -ansi -64 $(FMPOOL_FLAGS) -DNDEBUG -DHDF
-#
-# for AIX
-# CPPFLAGS_HDF  = $(FMPOOL_FLAGS) -DNDEBUG -DHDF -D_ALL_SOURCE
-#
-# for Sunos and Linux
-# CPPFLAGS_HDF  = $(FMPOOL_FLAGS) -DNDEBUG -DHDF -DNO_STRERROR
-#
-# for IRIX6.x (32-bit mode).
-# CPPFLAGS_HDF  = -n32 $(FMPOOL_FLAGS) -DNDEBUG -DHDF
-#
-# normal
-#CPPFLAGS_HDF  = $(FMPOOL_FLAGS) -DNDEBUG -DHDF
-
-#
-# Unix commands/utilities
-#
-# neqn(1)
-NEQN	= neqn
-# tbl(1)
-TBL	= tbl
-# which(1)
-WHICH	= which
-# lex(1)
-LEX	= lex    # GNU flex?
-# yacc(1)
-YACC	= yacc   # GNU bison?
-
-#diff(1)
-DIFF    = diff   # GNU diff?
-DIFF_FLAGS = -w
-
-# Other Macros
-NCDUMP	= 
-NCGEN	= 
-FTPDIR	= 
-VERSION_NETCDF	= 2.3.2
-
-# ------------ XDR Macros for NETCDF --------------------
-# This is where the location of system XDR library includes
-# and location of the library are set
-#
-# Location of <xdr.h> if you are using the system
-# one, Else you need to comment it out
-CPP_XDR		= -I/usr/include/rpc
-#CPP_XDR =
-
-# If XDR library not present on the system then you need
-# uncomment the following and comment the one below it
-#XDR_LIBOBJS    = xdr.o xdrfloat.o xdrstdio.o xdrarray.o
-XDR_LIBOBJS     =
-
-# Location of library, sometimes the sunos requires -lsun
-LD_XDR		= 
-
-#
-XDR_INSTALL_DEPS =
-
-# ------------ libsrc Macros for NETCDF --------------------
-# Possible values are xdrposix and xdrstdio
-# This sets which version of the XDR interface to use.
-XDRFILE		= xdrposix
-
-# ------------ Port Macros for NETCDF --------------------
-# Major and Minor numbe of NETCDF library version
-MAJOR_NO	= 2
-MINOR_NO	= 3
-PORT_CFORTRAN	= 
-NEED_FORTC	= 
-FORTC		= 
-
-# possible values are limits.h, float.h, stddef.h, stdlib.h,
-# string.h time.h signal.h unistd.h
-PORT_HEADERS	= 
-PORT_SUBDIRS    =
-LIBOBJS		= uddummy.o 
-

Deleted: packages/libhdf4/branches/upstream/current/config/mh-linux
===================================================================
--- packages/libhdf4/branches/upstream/current/config/mh-linux	2007-05-15 09:05:29 UTC (rev 830)
+++ packages/libhdf4/branches/upstream/current/config/mh-linux	2007-05-15 09:53:05 UTC (rev 831)
@@ -1,180 +0,0 @@
-# $Id: mh-linux,v 1.14 1999/05/04 17:39:49 mcgrath Exp $
-
-# You can override the following variables here
-#
-# Sections in Host makefile fragments
-# ----------------------------------:
-# 1. General Macros for HDF
-# 2. Macros for Pablo Instrumentation
-# 3. Macros for File Cache
-# 4. General macros for NETCDF
-# 4.1 XDR Macros for NETCDF
-# 4.2 libsrc Macros for NETCDF
-# 4.3 Port Macros for NETCDF
-#
-
-# ------------ General Macros for HDF --------------------
-# Version of the library
-PACKAGE	 = HDF
-VERSION  = 4.0
-#
-# Compiliers:
-# For gcc version
-CC=gcc
-CFLAGS=-ansi -D_BSD_SOURCE
-
-# Fortran compilier
-#FC = f77
-#FC = NONE
-FC = g77
-FFLAGS = 
-
-# Name of achive randomizer, usually ranlib (use 'true' if non-existant)
-RANLIB = ranlib
-
-# Name of library archiver and flags to send, default 'AR=ar', 'ARFLAGS=r'
-AR = ar
-ARFLAGS = r
-
-# Name of remove utility, default 'RM=/bin/rm', 'RMFLAGS=-f'
-RM = /bin/rm
-RMFLAGS = -f
-
-# Extra libraries to be include like '-lm' for fabs()
-# e.g with naitve HP-ANSI compilier
-#LIBSX = -lm
-
-# ------------ Macros for Pablo Instrumentation  --------------------
-# Uncomment the following lines to create a Pablo Instrumentation
-# version of the HDF core library called 'libdf-inst.a'
-# See the documentation in the directory 'hdf/pablo' for further 
-# information about Pablo and what platforms it is supported on
-# before enabling. 
-# You need to set 'PABLO_INCDIR' to the Pablo distribution 
-# include directory to get to files 'IOTrace.h', 'IOTrace_SD.h' and others.
-
-#PABLO_FLAGS  = -DHAVE_PABLO
-#PABLO_INCDIR = /usr/local/include/pablo-5.1
-#PABLO_INCLUDE = -I$(PABLO_INCDIR)
-
-# ------------ Macros for File Cache(fmpool) ------
-# Uncomment the following lines to enable shared memory file buffer pool
-# version of the HDF core library libdf.a. Please read the
-# documentation before enabling this feature.
-
-#FMPOOL_FLAGS  = -DHAVE_FMPOOL
-
-# ------------ General Macros for NETCDF --------------------
-# Operating system, Used in fortran directory to generate fortran
-# wrappers. Possible values are osf, aix, hpux, irix, sunos, ultrix
-# unicos, convex, Linux, freebsd
-OS	= Linux
-
-CPP	      = $(CC) -E
-
-# for endianess, for little endian byte order need -DSWAP
-# for FreeBSD and Linux(anny x86 UNIX)
-SWAP          = -DSWAP
-#SWAP          = 
-
-# for 32bit 'network long' integer, possible value -DNETLONG=int
-NETLONG       = 
-
-# additional CFLAGS
-CFLAGS_NETCDF = 
-
-# Additional flags for preproccesor. Some no longer used because
-#   library now requires ANSI compilier.
-#
-# for no function prototypes add -DNO_HAVE_PROTOTYPES
-# for no strerror()          add -DNO_STRERROR
-# for no variadic function support add -DNO_STDARG
-#
-# They all require -DHDF and -DNDEBUG 
-# Any special preprocessor requirements go here
-#
-# for Unicos 
-# CPPFLAGS_HDF  = $(FMPOOL_FLAGS) -DNDEBUG -DHDF -DBIG_SHORTS -DBIG_LONGS
-#
-# for OSF(dec alpha) 
-# CPPFLAGS_HDF  = $(FMPOOL_FLAGS) -DNDEBUG -DHDF -DBIG_LONGS -std1
-#
-# for IRIX6(64-bit) 
-# CPPFLAGS_HDF  = $(FMPOOL_FLAGS) -DNDEBUG -DHDF -DBIG_LONGS
-#
-# for AIX
-# CPPFLAGS_HDF  = $(FMPOOL_FLAGS) -DNDEBUG -DHDF -D_ALL_SOURCE
-#
-# for Sunos and Linux
-CPPFLAGS_HDF  = $(FMPOOL_FLAGS) -DNDEBUG -DHDF -DNO_STRERROR
-#
-# for IRIX6.0 (32-bit mode). If you prefer other 32 bit option like -n32, 
-#  replace '-32' below
-# CPPFLAGS_HDF  = -32 $(FMPOOL_FLAGS) -DNDEBUG -DHDF
-#
-# normal
-#CPPFLAGS_HDF  = $(FMPOOL_FLAGS) -DNDEBUG -DHDF
-
-#
-# Unix commands/utilities
-#
-# neqn(1)
-NEQN	= neqn
-# tbl(1)
-TBL	= tbl
-# which(1)
-WHICH	= which
-# lex(1)
-#LEX	= lex    # GNU flex?
-LEX	= flex    # GNU flex?
-# yacc(1)
-YACC	= yacc   # GNU bison?
-
-#diff(1)
-DIFF    = diff   # GNU diff?
-DIFF_FLAGS = -w
-
-# Other Macros
-NCDUMP	= 
-NCGEN	= 
-FTPDIR	= 
-VERSION_NETCDF	= 2.3.2
-
-# ------------ XDR Macros for NETCDF --------------------
-# This is where the location of system XDR library includes
-# and location of the library are set
-#
-# Location of <xdr.h> if you are using the system
-# one, Else you need to comment it out
-CPP_XDR		= -I/usr/include/rpc
-
-# If XDR library not present on the system then you need
-# uncomment the following and comment the one below it
-#XDR_LIBOBJS    = xdr.o xdrfloat.o xdrstdio.o xdrarray.o
-XDR_LIBOBJS     =
-
-# Location of library, sometimes the sunos requires -lsun
-LD_XDR		= 
-
-#
-XDR_INSTALL_DEPS =
-
-# ------------ libsrc Macros for NETCDF --------------------
-# Possible values are xdrposix and xdrstdio
-# This sets which version of the XDR interface to use.
-XDRFILE		= xdrposix
-
-# ------------ Port Macros for NETCDF --------------------
-# Major and Minor numbe of NETCDF library version
-MAJOR_NO	= 2
-MINOR_NO	= 3
-PORT_CFORTRAN	= 
-NEED_FORTC	= 
-FORTC		= 
-
-# possible values are limits.h, float.h, stddef.h, stdlib.h,
-# string.h time.h signal.h unistd.h
-PORT_HEADERS	= 
-PORT_SUBDIRS    =
-LIBOBJS		= uddummy.o 
-

Deleted: packages/libhdf4/branches/upstream/current/config/mh-mac
===================================================================
--- packages/libhdf4/branches/upstream/current/config/mh-mac	2007-05-15 09:05:29 UTC (rev 830)
+++ packages/libhdf4/branches/upstream/current/config/mh-mac	2007-05-15 09:53:05 UTC (rev 831)
@@ -1,187 +0,0 @@
-# $Id: mh-mac,v 1.6 1999/05/04 21:48:16 smitchel Exp $
-
-
-# You can override the following variables here
-#
-# Sections in Host makefile fragments
-# ----------------------------------:
-# 1. General Macros for HDF
-# 2. Macros for Pablo Instrumentation
-# 3. Macros for File Cache
-# 4. General macros for NETCDF
-# 4.1 XDR Macros for NETCDF
-# 4.2 libsrc Macros for NETCDF
-# 4.3 Port Macros for NETCDF
-#
-
-# This is a fake makefile fragment for the Macintosh
-
-# ------------ General Macros for HDF --------------------
-# Version of the library
-PACKAGE	 = HDF
-VERSION  = 4.0
-#
-#
-# Compiliers:
-# For gcc version
-CC=gcc
-CFLAGS=-ansi -O
-#CFLAGS=-ansi -Wall -pedantic -g
-#
-#Using ANSI compilier
-#CC=cc
-#CFLAGS=
-
-# Fortran compilier
-FC = f77
-FFLAGS =
-
-# Name of achive randomizer, usually ranlib (use 'true' if non-existant)
-RANLIB = ranlib
-
-# Name of library archiver and flags to send, default 'AR=ar', 'ARFLAGS=r'
-AR = ar
-ARFLAGS = ru
-
-# Name of remove utility, default 'RM=/bin/rm', 'RMFLAGS=-f'
-RM = /bin/rm
-RMFLAGS = -f
-
-# Extra libraries to be include like '-lm' for fabs()
-# e.g with naitve HP-ANSI compilier
-# LIBSX = -lm
-
-# ------------ Macros for Pablo Instrumentation  --------------------
-# Uncomment the following lines to create a Pablo Instrumentation
-# version of the HDF core library called 'libdf-inst.a'
-# See the documentation in the directory 'hdf/pablo' for further 
-# information about Pablo and what platforms it is supported on
-# before enabling. 
-# You need to set 'PABLO_INCDIR' to the Pablo distribution 
-# include directory to get to files 'IOTrace.h', 'IOTrace_SD.h' and others.
-
-#PABLO_FLAGS  = -DHAVE_PABLO
-#PABLO_INCDIR = /usr/local/include/pablo-5.1
-#PABLO_INCLUDE = -I$(PABLO_INCDIR)
-
-# ------------ Macros for File Cache(fmpool) ------
-# Uncomment the following lines to enable shared memory file buffer pool
-# version of the HDF core library libdf.a. Please read the
-# documentation before enabling this feature.
-
-#FMPOOL_FLAGS  = -DHAVE_FMPOOL
-
-# ------------ General Macros for NETCDF --------------------
-# Operating system, Used in fortran directory to generate fortran
-# wrappers. Possible values are osf, aix, hpux, irix, sunos, ultrix
-# unicos, convex, Linux, freebsd
-OS	= sunos
-
-CPP	      = $(CC) -E
-
-# for endianess, for little endian byte order need -DSWAP
-# for FreeBSD and Linux(anny x86 UNIX)
-#SWAP          = -DSWAP
-SWAP          = 
-
-# for 32bit 'network long' integer, possible value -DNETLONG=int
-NETLONG       = 
-
-# additional CFLAGS
-CFLAGS_NETCDF = 
-
-# Additional flags for preproccesor. Some no longer used because
-#   library now requires ANSI compilier.
-#
-# for no function prototypes add -DNO_HAVE_PROTOTYPES
-# for no strerror()          add -DNO_STRERROR
-# for no variadic function support add -DNO_STDARG
-#
-# They all require -DHDF and -DNDEBUG 
-# Any special preprocessor requirements go here
-#
-# for Unicos 
-# CPPFLAGS_HDF  = $(FMPOOL_FLAGS) -DNDEBUG -DHDF -DBIG_SHORTS -DBIG_LONGS
-#
-# for OSF(dec alpha) 
-# CPPFLAGS_HDF  = $(FMPOOL_FLAGS) -DNDEBUG -DHDF -DBIG_LONGS -std1
-#
-# for IRIX6(64-bit) 
-# CPPFLAGS_HDF  = $(FMPOOL_FLAGS) -DNDEBUG -DHDF -DBIG_LONGS
-#
-# for AIX
-# CPPFLAGS_HDF  = $(FMPOOL_FLAGS) -DNDEBUG -DHDF -D_ALL_SOURCE
-#
-# for Sunos and Linux
-CPPFLAGS_HDF  = $(FMPOOL_FLAGS) -DNDEBUG -DHDF -DNO_STRERROR
-#
-# for IRIX6.0 (32-bit mode). If you prefer other 32 bit option like -n32, 
-#  replace '-32' below
-# CPPFLAGS_HDF  = -32 $(FMPOOL_FLAGS) -DNDEBUG -DHDF
-#
-# normal
-# CPPFLAGS_HDF  = $(FMPOOL_FLAGS) -DNDEBUG -DHDF
-
-#
-# Unix commands/utilities
-#
-# neqn(1)
-NEQN	= neqn
-# tbl(1)
-TBL	= tbl
-# which(1)
-WHICH	= which
-# lex(1)
-LEX	= lex    # GNU flex?
-# yacc(1)
-YACC	= yacc   # GNU bison?
-
-#diff(1)
-DIFF    = diff   # GNU diff?
-DIFF_FLAGS = -w
-
-# Other Macros
-NCDUMP	= 
-NCGEN	= 
-FTPDIR	= 
-VERSION_NETCDF	= 2.3.2
-
-# ------------ XDR Macros for NETCDF --------------------
-# This is where the location of system XDR library includes
-# and location of the library are set
-#
-# Location of <xdr.h> if you are using the system
-# one, Else you need to comment it out
-CPP_XDR		= -I/usr/include/rpc
-#CPP_XDR =
-
-# If XDR library not present on the system then you need
-# uncomment the following and comment the one below it
-#XDR_LIBOBJS    = xdr.o xdrfloat.o xdrstdio.o xdrarray.o
-XDR_LIBOBJS     =
-
-# Location of library, sometimes the sunos requires -lsun
-LD_XDR		= 
-
-#
-XDR_INSTALL_DEPS =
-
-# ------------ libsrc Macros for NETCDF --------------------
-# Possible values are xdrposix and xdrstdio
-# This sets which version of the XDR interface to use.
-XDRFILE		= xdrposix
-
-# ------------ Port Macros for NETCDF --------------------
-# Major and Minor numbe of NETCDF library version
-MAJOR_NO	= 2
-MINOR_NO	= 3
-PORT_CFORTRAN	= 
-NEED_FORTC	= 
-FORTC		= 
-
-# possible values are limits.h, float.h, stddef.h, stdlib.h,
-# string.h time.h signal.h unistd.h
-PORT_HEADERS	= 
-PORT_SUBDIRS    =
-LIBOBJS		= uddummy.o 
-

Deleted: packages/libhdf4/branches/upstream/current/config/mh-solaris
===================================================================
--- packages/libhdf4/branches/upstream/current/config/mh-solaris	2007-05-15 09:05:29 UTC (rev 830)
+++ packages/libhdf4/branches/upstream/current/config/mh-solaris	2007-05-15 09:53:05 UTC (rev 831)
@@ -1,184 +0,0 @@
-# $Id: mh-solaris,v 1.15 1998/09/16 19:31:17 dwells Exp $
-
-# You can override the following variables here
-#
-# Sections in Host makefile fragments
-# ----------------------------------:
-# 1. General Macros for HDF
-# 2. Macros for Pablo Instrumentation
-# 3. Macros for File Cache
-# 4. General macros for NETCDF
-# 4.1 XDR Macros for NETCDF
-# 4.2 libsrc Macros for NETCDF
-# 4.3 Port Macros for NETCDF
-#
-
-# ------------ General Macros for HDF --------------------
-# Version of the library
-PACKAGE	 = HDF
-VERSION  = 4.0
-#
-# Compiliers:
-# For gcc version
-#CC=gcc
-#CFLAGS=-ansi 
-#
-#Using ANSI compilier also needs LIBSX = -lm(see below)
-CC=cc
-#CFLAGS= -Xc -xO2 -g -v
-CFLAGS= -Xc -xO2
-
-# Fortran compilier
-FC = f77
-#FFLAGS = -g
-FFLAGS = -O
-
-# Name of achive randomizer, usually ranlib (use 'true' if non-existant)
-RANLIB = true
-
-# Name of library archiver and flags to send, default 'AR=ar', 'ARFLAGS=r'
-AR = ar
-ARFLAGS = ru
-
-# Name of remove utility, default 'RM=/bin/rm', 'RMFLAGS=-f'
-RM = /bin/rm
-RMFLAGS = -f
-
-# Extra libraries to be include like '-lm' for fabs()
-# e.g with naitve HP-ANSI compilier
-LIBSX = -lm
-
-# ------------ Macros for Pablo Instrumentation  --------------------
-# Uncomment the following lines to create a Pablo Instrumentation
-# version of the HDF core library called 'libdf-inst.a'
-# See the documentation in the directory 'hdf/pablo' for further 
-# information about Pablo and what platforms it is supported on
-# before enabling. 
-# You need to set 'PABLO_INCDIR' to the Pablo distribution 
-# include directory to get to files 'IOTrace.h', 'IOTrace_SD.h' and others.
-
-#PABLO_FLAGS  = -DHAVE_PABLO
-#PABLO_INCDIR = /usr/local/include/pablo-5.1
-#PABLO_INCLUDE = -I$(PABLO_INCDIR)
-# ------------ Macros for File Cache(fmpool) ------
-# Uncomment the following lines to enable shared memory file buffer pool
-# version of the HDF core library libdf.a. Please read the
-# documentation before enabling this feature.
-
-#FMPOOL_FLAGS  = -DHAVE_FMPOOL
-
-# ------------ General Macros for NETCDF --------------------
-# Operating system, Used in fortran directory to generate fortran
-# wrappers. Possible values are osf, aix, hpux, irix, sunos, ultrix
-# unicos, convex, Linux, freebsd
-OS	= solaris
-
-CPP	      = $(CC) -E
-
-# for endianess, for little endian byte order need -DSWAP
-# for FreeBSD and Linux(anny x86 UNIX)
-#SWAP          = -DSWAP
-SWAP          = 
-
-# for 32bit 'network long' integer, possible value -DNETLONG=int
-NETLONG       = 
-
-# additional CFLAGS
-CFLAGS_NETCDF = 
-
-# Additional flags for preproccesor. Some no longer used because
-#   library now requires ANSI compilier.
-#
-# for no function prototypes add -DNO_HAVE_PROTOTYPES
-# for no strerror()          add -DNO_STRERROR
-# for no variadic function support add -DNO_STDARG
-#
-# They all require -DHDF and -DNDEBUG 
-# Any special preprocessor requirements go here
-#
-# for Unicos 
-# CPPFLAGS_HDF  = $(FMPOOL_FLAGS) -DNDEBUG -DHDF -DBIG_SHORTS -DBIG_LONGS
-#
-# for OSF(dec alpha) 
-# CPPFLAGS_HDF  = $(FMPOOL_FLAGS) -DNDEBUG -DHDF -DBIG_LONGS -std1
-#
-# for IRIX6(64-bit) 
-# CPPFLAGS_HDF  = $(FMPOOL_FLAGS) -DNDEBUG -DHDF -DBIG_LONGS
-#
-# for AIX
-# CPPFLAGS_HDF  = $(FMPOOL_FLAGS) -DNDEBUG -DHDF -D_ALL_SOURCE
-#
-# for Sunos and Linux
-CPPFLAGS_HDF  = $(FMPOOL_FLAGS) -DNDEBUG -DHDF -DNO_STRERROR
-#
-# for IRIX6.0 (32-bit mode). If you prefer other 32 bit option like -n32, 
-#  replace '-32' below
-# CPPFLAGS_HDF  = -32 $(FMPOOL_FLAGS) -DNDEBUG -DHDF
-#
-# normal
-# CPPFLAGS_HDF  = $(FMPOOL_FLAGS) -DNDEBUG -DHDF
-
-#
-# Unix commands/utilities
-#
-# neqn(1)
-NEQN	= neqn
-# tbl(1)
-TBL	= tbl
-# which(1)
-WHICH	= which
-# lex(1)
-LEX	= lex    # GNU flex?
-# yacc(1)
-YACC	= yacc   # GNU bison?
-
-#diff(1)
-DIFF    = diff   # GNU diff?
-DIFF_FLAGS = -w
-
-# Other Macros
-NCDUMP	= 
-NCGEN	= 
-FTPDIR	= 
-VERSION_NETCDF	= 2.3.2
-
-# ------------ XDR Macros for NETCDF --------------------
-# This is where the location of system XDR library includes
-# and location of the library are set
-#
-# Location of <xdr.h> if you are using the system
-# one, Else you need to comment it out
-CPP_XDR		= -I/usr/include/rpc
-#CPP_XDR =
-
-# If XDR library not present on the system then you need
-# uncomment the following and comment the one below it
-#XDR_LIBOBJS    = xdr.o xdrfloat.o xdrstdio.o xdrarray.o
-XDR_LIBOBJS     =
-
-# Location of library, sometimes the sunos requires -lsun
-# Solaris requires -lnsl
-LD_XDR		= -lnsl
-
-#
-XDR_INSTALL_DEPS =
-
-# ------------ libsrc Macros for NETCDF --------------------
-# Possible values are xdrposix and xdrstdio
-# This sets which version of the XDR interface to use.
-XDRFILE		= xdrposix
-
-# ------------ Port Macros for NETCDF --------------------
-# Major and Minor numbe of NETCDF library version
-MAJOR_NO	= 2
-MINOR_NO	= 3
-PORT_CFORTRAN	= 
-NEED_FORTC	= 
-FORTC		= 
-
-# possible values are limits.h, float.h, stddef.h, stdlib.h,
-# string.h time.h signal.h unistd.h
-PORT_HEADERS	= 
-PORT_SUBDIRS    =
-LIBOBJS		= uddummy.o 
-

Deleted: packages/libhdf4/branches/upstream/current/config/mh-solarisx86
===================================================================
--- packages/libhdf4/branches/upstream/current/config/mh-solarisx86	2007-05-15 09:05:29 UTC (rev 830)
+++ packages/libhdf4/branches/upstream/current/config/mh-solarisx86	2007-05-15 09:53:05 UTC (rev 831)
@@ -1,182 +0,0 @@
-# $Id: mh-solarisx86,v 1.11 1998/09/16 19:31:18 dwells Exp $
-
-# You can override the following variables here
-#
-# Sections in Host makefile fragments
-# ----------------------------------:
-# 1. General Macros for HDF
-# 2. Macros for Pablo Instrumentation
-# 3. Macros for File Cache
-# 4. General macros for NETCDF
-# 4.1 XDR Macros for NETCDF
-# 4.2 libsrc Macros for NETCDF
-# 4.3 Port Macros for NETCDF
-#
-
-# ------------ General Macros for HDF --------------------
-# Version of the library
-PACKAGE	 = HDF
-VERSION  = 4.0
-#
-# Compiliers:
-# For gcc version
-CC=gcc
-CFLAGS=-ansi -O
-#
-#Using ANSI compilier
-#CC=cc
-#CFLAGS= -Xa
-
-# Fortran compilier
-FC = NONE
-FFLAGS = -O
-
-# Name of achive randomizer, usually ranlib (use 'true' if non-existant)
-RANLIB = true
-
-# Name of library archiver and flags to send, default 'AR=ar', 'ARFLAGS=r'
-AR = ar
-ARFLAGS = ru
-
-# Name of remove utility, default 'RM=/bin/rm', 'RMFLAGS=-f'
-RM = /bin/rm
-RMFLAGS = -f
-
-# Extra libraries to be include like '-lm' for fabs()
-# e.g with naitve HP-ANSI compilier
-#LIBSX = -lm
-
-# ------------ Macros for Pablo Instrumentation  --------------------
-# Uncomment the following lines to create a Pablo Instrumentation
-# version of the HDF core library called 'libdf-inst.a'
-# See the documentation in the directory 'hdf/pablo' for further 
-# information about Pablo and what platforms it is supported on
-# before enabling. 
-# You need to set 'PABLO_INCDIR' to the Pablo distribution 
-# include directory to get to files 'IOTrace.h', 'IOTrace_SD.h' and others.
-
-#PABLO_FLAGS  = -DHAVE_PABLO
-#PABLO_INCDIR = /usr/local/include/pablo-5.1
-#PABLO_INCLUDE = -I$(PABLO_INCDIR)
-
-# ------------ Macros for File Cache(fmpool) ------
-# Uncomment the following lines to enable shared memory file buffer pool
-# version of the HDF core library libdf.a. Please read the
-# documentation before enabling this feature.
-
-#FMPOOL_FLAGS  = -DHAVE_FMPOOL
-
-# ------------ General Macros for NETCDF --------------------
-# Operating system, Used in fortran directory to generate fortran
-# wrappers. Possible values are osf, aix, hpux, irix, sunos, ultrix
-# unicos, convex, Linux, freebsd
-OS	= solarisx86
-
-CPP	      = $(CC) -E
-
-# for endianess, for little endian byte order need -DSWAP
-# for FreeBSD and Linux(anny x86 UNIX)
-SWAP          = -DSWAP
-#SWAP          = 
-
-# for 32bit 'network long' integer, possible value -DNETLONG=int
-NETLONG       = 
-
-# additional CFLAGS
-CFLAGS_NETCDF = 
-
-# Additional flags for preproccesor. Some no longer used because
-#   library now requires ANSI compilier.
-#
-# for no function prototypes add -DNO_HAVE_PROTOTYPES
-# for no strerror()          add -DNO_STRERROR
-# for no variadic function support add -DNO_STDARG
-#
-# They all require -DHDF and -DNDEBUG 
-# Any special preprocessor requirements go here
-#
-# for Unicos 
-# CPPFLAGS_HDF  = $(FMPOOL_FLAGS) -DNDEBUG -DHDF -DBIG_SHORTS -DBIG_LONGS
-#
-# for OSF(dec alpha) 
-# CPPFLAGS_HDF  = $(FMPOOL_FLAGS) -DNDEBUG -DHDF -DBIG_LONGS -std1
-#
-# for IRIX6(64-bit) 
-# CPPFLAGS_HDF  = $(FMPOOL_FLAGS) -DNDEBUG -DHDF -DBIG_LONGS
-#
-# for AIX
-# CPPFLAGS_HDF  = $(FMPOOL_FLAGS) -DNDEBUG -DHDF -D_ALL_SOURCE
-#
-# for Sunos and Linux
-# CPPFLAGS_HDF  = $(FMPOOL_FLAGS) -DNDEBUG -DHDF -DNO_STRERROR
-#
-# for IRIX6.0 (32-bit mode). If you prefer other 32 bit option like -n32, 
-#  replace '-32' below
-# CPPFLAGS_HDF  = -32 $(FMPOOL_FLAGS) -DNDEBUG -DHDF
-#
-# normal
-CPPFLAGS_HDF  = $(FMPOOL_FLAGS) -DNDEBUG -DHDF
-
-#
-# Unix commands/utilities
-#
-# neqn(1)
-NEQN	= neqn
-# tbl(1)
-TBL	= tbl
-# which(1)
-WHICH	= which
-# lex(1)
-LEX	= lex    # GNU flex?
-# yacc(1)
-YACC	= yacc   # GNU bison?
-
-#diff(1)
-DIFF    = diff   # GNU diff?
-DIFF_FLAGS = -w
-
-# Other Macros
-NCDUMP	= 
-NCGEN	= 
-FTPDIR	= 
-VERSION_NETCDF	= 2.3.2
-
-# ------------ XDR Macros for NETCDF --------------------
-# This is where the location of system XDR library includes
-# and location of the library are set
-#
-# Location of <xdr.h> if you are using the system
-# one, Else you need to comment it out
-CPP_XDR		= -I/usr/include/rpc
-#CPP_XDR =
-
-# If XDR library not present on the system then you need
-# uncomment the following and comment the one below it
-#XDR_LIBOBJS    = xdr.o xdrfloat.o xdrstdio.o xdrarray.o
-XDR_LIBOBJS     =
-
-# Location of library, sometimes the sunos requires -lsun
-# Solaris requires -lnsl
-LD_XDR      = -lnsl
-
-#
-XDR_INSTALL_DEPS =
-
-# ------------ libsrc Macros for NETCDF --------------------
-# Possible values are xdrposix and xdrstdio
-# This sets which version of the XDR interface to use.
-XDRFILE		= xdrposix
-
-# ------------ Port Macros for NETCDF --------------------
-# Major and Minor numbe of NETCDF library version
-MAJOR_NO	= 2
-MINOR_NO	= 3
-PORT_CFORTRAN	= 
-NEED_FORTC	= 
-FORTC		= 
-
-# possible values are limits.h, float.h, stddef.h, stdlib.h,
-# string.h time.h signal.h unistd.h
-PORT_HEADERS	= 
-PORT_SUBDIRS    =
-LIBOBJS		= uddummy.o 

Deleted: packages/libhdf4/branches/upstream/current/config/mh-sun
===================================================================
--- packages/libhdf4/branches/upstream/current/config/mh-sun	2007-05-15 09:05:29 UTC (rev 830)
+++ packages/libhdf4/branches/upstream/current/config/mh-sun	2007-05-15 09:53:05 UTC (rev 831)
@@ -1,183 +0,0 @@
-# $Id: mh-sun,v 1.15 1998/09/16 19:31:19 dwells Exp $
-
-# You can override the following variables here
-#
-# Sections in Host makefile fragments
-# ----------------------------------:
-# 1. General Macros for HDF
-# 2. Macros for Pablo Instrumentation
-# 3. Macros for File Cache
-# 4. General macros for NETCDF
-# 4.1 XDR Macros for NETCDF
-# 4.2 libsrc Macros for NETCDF
-# 4.3 Port Macros for NETCDF
-#
-
-# ------------ General Macros for HDF --------------------
-# Version of the library
-PACKAGE	 = HDF
-VERSION  = 4.0
-#
-# Compiliers:
-# For gcc version
-CC=gcc
-CFLAGS=-ansi  
-#CFLAGS=-ansi -Wall -pedantic -g
-#
-#Using ANSI compilier
-#CC=cc
-#CFLAGS=
-
-# Fortran compilier
-FC = f77
-FFLAGS = -f
-
-# Name of achive randomizer, usually ranlib (use 'true' if non-existant)
-RANLIB = ranlib
-
-# Name of library archiver and flags to send, default 'AR=ar', 'ARFLAGS=r'
-AR = ar
-ARFLAGS = ru
-
-# Name of remove utility, default 'RM=/bin/rm', 'RMFLAGS=-f'
-RM = /bin/rm
-RMFLAGS = -f
-
-# Extra libraries to be include like '-lm' for fabs()
-# e.g with naitve HP-ANSI compilier
-#LIBSX = -lm
-
-# ------------ Macros for Pablo Instrumentation  --------------------
-# Uncomment the following lines to create a Pablo Instrumentation
-# version of the HDF core library called 'libdf-inst.a'
-# See the documentation in the directory 'hdf/pablo' for further 
-# information about Pablo and what platforms it is supported on
-# before enabling. 
-# You need to set 'PABLO_INCDIR' to the Pablo distribution 
-# include directory to get to files 'IOTrace.h', 'IOTrace_SD.h' and others.
-
-#PABLO_FLAGS  = -DHAVE_PABLO
-#PABLO_INCDIR = /usr/local/include/pablo-5.1
-#PABLO_INCLUDE = -I$(PABLO_INCDIR)
-
-# ------------ Macros for File Cache(fmpool) ------
-# Uncomment the following lines to enable shared memory file buffer pool
-# version of the HDF core library libdf.a. Please read the
-# documentation before enabling this feature.
-
-#FMPOOL_FLAGS  = -DHAVE_FMPOOL
-
-# ------------ General Macros for NETCDF --------------------
-# Operating system, Used in fortran directory to generate fortran
-# wrappers. Possible values are osf, aix, hpux, irix, sunos, ultrix
-# unicos, convex, Linux, freebsd
-OS	= sunos
-
-CPP	      = $(CC) -E
-
-# for endianess, for little endian byte order need -DSWAP
-# for FreeBSD and Linux(anny x86 UNIX)
-#SWAP          = -DSWAP
-SWAP          = 
-
-# for 32bit 'network long' integer, possible value -DNETLONG=int
-NETLONG       = 
-
-# additional CFLAGS
-CFLAGS_NETCDF = 
-
-# Additional flags for preproccesor. Some no longer used because
-#   library now requires ANSI compilier.
-#
-# for no function prototypes add -DNO_HAVE_PROTOTYPES
-# for no strerror()          add -DNO_STRERROR
-# for no variadic function support add -DNO_STDARG
-#
-# They all require -DHDF and -DNDEBUG 
-# Any special preprocessor requirements go here
-#
-# for Unicos 
-# CPPFLAGS_HDF  = $(FMPOOL_FLAGS) -DNDEBUG -DHDF -DBIG_SHORTS -DBIG_LONGS
-#
-# for OSF(dec alpha) 
-# CPPFLAGS_HDF  = $(FMPOOL_FLAGS) -DNDEBUG -DHDF -DBIG_LONGS -std1
-#
-# for IRIX6(64-bit) 
-# CPPFLAGS_HDF  = $(FMPOOL_FLAGS) -DNDEBUG -DHDF -DBIG_LONGS
-#
-# for AIX
-# CPPFLAGS_HDF  = $(FMPOOL_FLAGS) -DNDEBUG -DHDF -D_ALL_SOURCE
-#
-# for Sunos and Linux
-CPPFLAGS_HDF  = $(FMPOOL_FLAGS) -DNDEBUG -DHDF -DNO_STRERROR
-#
-# for IRIX6.0 (32-bit mode). If you prefer other 32 bit option like -n32, 
-#  replace '-32' below
-# CPPFLAGS_HDF  = -32 $(FMPOOL_FLAGS) -DNDEBUG -DHDF
-#
-# normal
-# CPPFLAGS_HDF  = $(FMPOOL_FLAGS) -DNDEBUG -DHDF
-
-#
-# Unix commands/utilities
-#
-# neqn(1)
-NEQN	= neqn
-# tbl(1)
-TBL	= tbl
-# which(1)
-WHICH	= which
-# lex(1)
-LEX	= lex    # GNU flex?
-# yacc(1)
-YACC	= yacc   # GNU bison?
-
-#diff(1)
-DIFF    = diff   # GNU diff?
-DIFF_FLAGS = -w
-
-# Other Macros
-NCDUMP	= 
-NCGEN	= 
-FTPDIR	= 
-VERSION_NETCDF	= 2.3.2
-
-# ------------ XDR Macros for NETCDF --------------------
-# This is where the location of system XDR library includes
-# and location of the library are set
-#
-# Location of <xdr.h> if you are using the system
-# one, Else you need to comment it out
-CPP_XDR		= -I/usr/include/rpc
-#CPP_XDR =
-
-# If XDR library not present on the system then you need
-# uncomment the following and comment the one below it
-#XDR_LIBOBJS    = xdr.o xdrfloat.o xdrstdio.o xdrarray.o
-XDR_LIBOBJS     =
-
-# Location of library, sometimes the sunos requires -lsun
-LD_XDR		= 
-
-#
-XDR_INSTALL_DEPS =
-
-# ------------ libsrc Macros for NETCDF --------------------
-# Possible values are xdrposix and xdrstdio
-# This sets which version of the XDR interface to use.
-XDRFILE		= xdrposix
-
-# ------------ Port Macros for NETCDF --------------------
-# Major and Minor numbe of NETCDF library version
-MAJOR_NO	= 2
-MINOR_NO	= 3
-PORT_CFORTRAN	= 
-NEED_FORTC	= 
-FORTC		= 
-
-# possible values are limits.h, float.h, stddef.h, stdlib.h,
-# string.h time.h signal.h unistd.h
-PORT_HEADERS	= 
-PORT_SUBDIRS    =
-LIBOBJS		= uddummy.o 
-

Deleted: packages/libhdf4/branches/upstream/current/config/mh-t3e
===================================================================
--- packages/libhdf4/branches/upstream/current/config/mh-t3e	2007-05-15 09:05:29 UTC (rev 830)
+++ packages/libhdf4/branches/upstream/current/config/mh-t3e	2007-05-15 09:53:05 UTC (rev 831)
@@ -1,184 +0,0 @@
-# $Id: mh-t3e,v 1.10 1999/04/17 20:18:51 acheng Exp $
-
-# You can override the following variables here
-#
-# Sections in Host makefile fragments
-# ----------------------------------:
-# 1. General Macros for HDF
-# 2. Macros for Pablo Instrumentation
-# 3. Macros for File Cache
-# 4. General macros for NETCDF
-# 4.1 XDR Macros for NETCDF
-# 4.2 libsrc Macros for NETCDF
-# 4.3 Port Macros for NETCDF
-#
-
-# ------------ General Macros for HDF --------------------
-# Version of the library
-PACKAGE	 = HDF
-VERSION  = 4.0
-#
-# Compiliers:
-# For gcc version
-#CC=gcc
-#CFLAGS=-ansi 
-#
-#Using ANSI compilier
-CC=cc
-CFLAGS=-X m -s
-
-# Fortran compilier
-# the -Wl"-Dpermok=yes" is for cld to permit execution mode on even if
-# warnings are encountered.
-FC = f90
-FFLAGS =-X m -Wl"-Dpermok=yes" -Wl"-s"
-
-# Name of achive randomizer, usually ranlib (use 'true' if non-existant)
-RANLIB = true
-
-# Name of library archiver and flags to send, default 'AR=ar', 'ARFLAGS=r'
-AR = ar
-ARFLAGS = r
-
-# Name of remove utility, default 'RM=/bin/rm', 'RMFLAGS=-f'
-RM = /bin/rm
-RMFLAGS = -f
-
-# Extra libraries to be include like '-lm' for fabs()
-# e.g with naitve HP-ANSI compilier
-#LIBSX = -lm
-
-# ------------ Macros for Pablo Instrumentation  --------------------
-# Uncomment the following lines to create a Pablo Instrumentation
-# version of the HDF core library called 'libdf-inst.a'
-# See the documentation in the directory 'hdf/pablo' for further 
-# information about Pablo and what platforms it is supported on
-# before enabling. 
-# You need to set 'PABLO_INCDIR' to the Pablo distribution 
-# include directory to get to files 'IOTrace.h', 'IOTrace_SD.h' and others.
-
-#PABLO_FLAGS  = -DHAVE_PABLO
-#PABLO_INCDIR = /usr/local/include/pablo-5.1
-#PABLO_INCLUDE = -I$(PABLO_INCDIR)
-
-# ------------ Macros for File Cache(fmpool) ------
-# Uncomment the following lines to enable shared memory file buffer pool
-# version of the HDF core library libdf.a. Please read the
-# documentation before enabling this feature.
-
-#FMPOOL_FLAGS  = -DHAVE_FMPOOL
-
-# ------------ General Macros for NETCDF --------------------
-# Operating system, Used in fortran directory to generate fortran
-# wrappers. Possible values are osf, aix, hpux, irix, sunos, ultrix
-# unicos, convex, Linux, freebsd
-OS	= craympp
-
-CPP	      = $(CC) -E
-
-# for endianess, for little endian byte order need -DSWAP
-# for FreeBSD and Linux(anny x86 UNIX)
-#SWAP          = -DSWAP
-SWAP          = 
-
-# for 32bit 'network long' integer, possible value -DNETLONG=int
-NETLONG       = 
-
-# additional CFLAGS
-CFLAGS_NETCDF = 
-
-# Additional flags for preproccesor. Some no longer used because
-#   library now requires ANSI compilier.
-#
-# for no function prototypes add -DNO_HAVE_PROTOTYPES
-# for no strerror()          add -DNO_STRERROR
-# for no variadic function support add -DNO_STDARG
-#
-# They all require -DHDF and -DNDEBUG 
-# Any special preprocessor requirements go here
-#
-# for Unicos 
-CPPFLAGS_HDF  = $(FMPOOL_FLAGS) -DNDEBUG -DHDF -DBIG_SHORTS -DBIG_LONGS
-#
-# for OSF(dec alpha) 
-# CPPFLAGS_HDF  = $(FMPOOL_FLAGS) -DNDEBUG -DHDF -DBIG_LONGS -std1
-#
-# for IRIX6(64-bit) 
-# CPPFLAGS_HDF  = $(FMPOOL_FLAGS) -DNDEBUG -DHDF -DBIG_LONGS
-#
-# for AIX
-# CPPFLAGS_HDF  = $(FMPOOL_FLAGS) -DNDEBUG -DHDF -D_ALL_SOURCE
-#
-# for Sunos and Linux
-# CPPFLAGS_HDF  = $(FMPOOL_FLAGS) -DNDEBUG -DHDF -DNO_STRERROR
-#
-# for IRIX6.0 (32-bit mode). If you prefer other 32 bit option like -n32, 
-#  replace '-32' below
-# CPPFLAGS_HDF  = -32 $(FMPOOL_FLAGS) -DNDEBUG -DHDF
-#
-# normal
-# CPPFLAGS_HDF  = $(FMPOOL_FLAGS) -DNDEBUG -DHDF
-
-#
-# Unix commands/utilities
-#
-# neqn(1)
-NEQN	= neqn
-# tbl(1)
-TBL	= tbl
-# which(1)
-WHICH	= which
-# lex(1)
-LEX	= lex    # GNU flex?
-# yacc(1)
-YACC	= yacc   # GNU bison?
-
-#diff(1)
-DIFF    = diff   # GNU diff?
-DIFF_FLAGS = -w
-
-# Other Macros
-NCDUMP	= 
-NCGEN	= 
-FTPDIR	= 
-VERSION_NETCDF	= 2.3.2
-
-# ------------ XDR Macros for NETCDF --------------------
-# This is where the location of system XDR library includes
-# and location of the library are set
-#
-# Location of <xdr.h> if you are using the system
-# one, Else you need to comment it out
-#CPP_XDR		= -I/usr/include/rpc
-CPP_XDR	= -I../xdr
-
-# If XDR library not present on the system then you need
-# uncomment the following and comment the one below it
-XDR_LIBOBJS    = xdr.o xdrfloat.o xdrstdio.o xdrarray.o
-#XDR_LIBOBJS     =
-
-# Location of library, sometimes the sunos requires -lsun
-LD_XDR		= 
-
-#
-XDR_INSTALL_DEPS =
-
-# ------------ libsrc Macros for NETCDF --------------------
-# Possible values are xdrposix and xdrstdio
-# This sets which version of the XDR interface to use.
-XDRFILE		= xdrposix
-
-# ------------ Port Macros for NETCDF --------------------
-# Major and Minor numbe of NETCDF library version
-MAJOR_NO	= 2
-MINOR_NO	= 3
-PORT_CFORTRAN	= 
-NEED_FORTC	= 
-FORTC		= 
-
-# possible values are limits.h, float.h, stddef.h, stdlib.h,
-# string.h time.h signal.h unistd.h
-PORT_HEADERS	= 
-PORT_SUBDIRS    =
-LIBOBJS		= uddummy.o 
-

Deleted: packages/libhdf4/branches/upstream/current/config/mh-unicos
===================================================================
--- packages/libhdf4/branches/upstream/current/config/mh-unicos	2007-05-15 09:05:29 UTC (rev 830)
+++ packages/libhdf4/branches/upstream/current/config/mh-unicos	2007-05-15 09:53:05 UTC (rev 831)
@@ -1,182 +0,0 @@
-# $Id: mh-unicos,v 1.12 1998/09/16 19:31:20 dwells Exp $
-
-# You can override the following variables here
-#
-# Sections in Host makefile fragments
-# ----------------------------------:
-# 1. General Macros for HDF
-# 2. Macros for Pablo Instrumentation
-# 3. Macros for File Cache
-# 4. General macros for NETCDF
-# 4.1 XDR Macros for NETCDF
-# 4.2 libsrc Macros for NETCDF
-# 4.3 Port Macros for NETCDF
-#
-
-# ------------ General Macros for HDF --------------------
-# Version of the library
-PACKAGE	 = HDF
-VERSION  = 4.0
-#
-# Compiliers:
-# For gcc version
-#CC=gcc
-#CFLAGS=-ansi 
-#
-#Using ANSI compilier
-CC=cc
-CFLAGS=-O -s
-
-# Fortran compilier
-FC = f90
-FFLAGS =-O 1
-
-# Name of achive randomizer, usually ranlib (use 'true' if non-existant)
-RANLIB = true
-
-# Name of library archiver and flags to send, default 'AR=ar', 'ARFLAGS=r'
-AR = ar
-ARFLAGS = r
-
-# Name of remove utility, default 'RM=/bin/rm', 'RMFLAGS=-f'
-RM = /bin/rm
-RMFLAGS = -f
-
-# Extra libraries to be include like '-lm' for fabs()
-# e.g with naitve HP-ANSI compilier
-#LIBSX = -lm
-
-# ------------ Macros for Pablo Instrumentation  --------------------
-# Uncomment the following lines to create a Pablo Instrumentation
-# version of the HDF core library called 'libdf-inst.a'
-# See the documentation in the directory 'hdf/pablo' for further 
-# information about Pablo and what platforms it is supported on
-# before enabling. 
-# You need to set 'PABLO_INCDIR' to the Pablo distribution 
-# include directory to get to files 'IOTrace.h', 'IOTrace_SD.h' and others.
-
-#PABLO_FLAGS  = -DHAVE_PABLO
-#PABLO_INCDIR = /usr/local/include/pablo-5.1
-#PABLO_INCLUDE = -I$(PABLO_INCDIR)
-
-# ------------ Macros for File Cache(fmpool) ------
-# Uncomment the following lines to enable shared memory file buffer pool
-# version of the HDF core library libdf.a. Please read the
-# documentation before enabling this feature.
-
-#FMPOOL_FLAGS  = -DHAVE_FMPOOL
-
-# ------------ General Macros for NETCDF --------------------
-# Operating system, Used in fortran directory to generate fortran
-# wrappers. Possible values are osf, aix, hpux, irix, sunos, ultrix
-# unicos, convex, Linux, freebsd
-OS	= unicos
-
-CPP	      = $(CC) -E
-
-# for endianess, for little endian byte order need -DSWAP
-# for FreeBSD and Linux(anny x86 UNIX)
-#SWAP          = -DSWAP
-SWAP          = 
-
-# for 32bit 'network long' integer, possible value -DNETLONG=int
-NETLONG       = 
-
-# additional CFLAGS
-CFLAGS_NETCDF = 
-
-# Additional flags for preproccesor. Some no longer used because
-#   library now requires ANSI compilier.
-#
-# for no function prototypes add -DNO_HAVE_PROTOTYPES
-# for no strerror()          add -DNO_STRERROR
-# for no variadic function support add -DNO_STDARG
-#
-# They all require -DHDF and -DNDEBUG 
-# Any special preprocessor requirements go here
-#
-# for Unicos 
-CPPFLAGS_HDF  = $(FMPOOL_FLAGS) -DNDEBUG -DHDF -DBIG_SHORTS -DBIG_LONGS
-#
-# for OSF(dec alpha) 
-# CPPFLAGS_HDF  = $(FMPOOL_FLAGS) -DNDEBUG -DHDF -DBIG_LONGS -std1
-#
-# for IRIX6(64-bit) 
-# CPPFLAGS_HDF  = $(FMPOOL_FLAGS) -DNDEBUG -DHDF -DBIG_LONGS
-#
-# for AIX
-# CPPFLAGS_HDF  = $(FMPOOL_FLAGS) -DNDEBUG -DHDF -D_ALL_SOURCE
-#
-# for Sunos and Linux
-# CPPFLAGS_HDF  = $(FMPOOL_FLAGS) -DNDEBUG -DHDF -DNO_STRERROR
-#
-# for IRIX6.0 (32-bit mode). If you prefer other 32 bit option like -n32, 
-#  replace '-32' below
-# CPPFLAGS_HDF  = -32 $(FMPOOL_FLAGS) -DNDEBUG -DHDF
-#
-# normal
-# CPPFLAGS_HDF  = $(FMPOOL_FLAGS) -DNDEBUG -DHDF
-
-#
-# Unix commands/utilities
-#
-# neqn(1)
-NEQN	= neqn
-# tbl(1)
-TBL	= tbl
-# which(1)
-WHICH	= which
-# lex(1)
-LEX	= lex    # GNU flex?
-# yacc(1)
-YACC	= yacc   # GNU bison?
-
-#diff(1)
-DIFF    = diff   # GNU diff?
-DIFF_FLAGS = -w
-
-# Other Macros
-NCDUMP	= 
-NCGEN	= 
-FTPDIR	= 
-VERSION_NETCDF	= 2.3.2
-
-# ------------ XDR Macros for NETCDF --------------------
-# This is where the location of system XDR library includes
-# and location of the library are set
-#
-# Location of <xdr.h> if you are using the system
-# one, Else you need to comment it out
-CPP_XDR		= -I/usr/include/rpc
-#CPP_XDR =
-
-# If XDR library not present on the system then you need
-# uncomment the following and comment the one below it
-#XDR_LIBOBJS    = xdr.o xdrfloat.o xdrstdio.o xdrarray.o
-XDR_LIBOBJS     =
-
-# Location of library, sometimes the sunos requires -lsun
-LD_XDR		= 
-
-#
-XDR_INSTALL_DEPS =
-
-# ------------ libsrc Macros for NETCDF --------------------
-# Possible values are xdrposix and xdrstdio
-# This sets which version of the XDR interface to use.
-XDRFILE		= xdrposix
-
-# ------------ Port Macros for NETCDF --------------------
-# Major and Minor numbe of NETCDF library version
-MAJOR_NO	= 2
-MINOR_NO	= 3
-PORT_CFORTRAN	= 
-NEED_FORTC	= 
-FORTC		= 
-
-# possible values are limits.h, float.h, stddef.h, stdlib.h,
-# string.h time.h signal.h unistd.h
-PORT_HEADERS	= 
-PORT_SUBDIRS    =
-LIBOBJS		= uddummy.o 
-

Added: packages/libhdf4/branches/upstream/current/config/osf5.x
===================================================================
--- packages/libhdf4/branches/upstream/current/config/osf5.x	                        (rev 0)
+++ packages/libhdf4/branches/upstream/current/config/osf5.x	2007-05-15 09:53:05 UTC (rev 831)
@@ -0,0 +1,160 @@
+#                                                   -*- shell-script -*-
+#
+# This file is part of the HDF4 build script. It is processed shortly
+# after configure starts and defines, among other things, flags for
+# the various compilation modes.
+
+# Choosing C, Fortran, and C++ Compilers
+# --------------------------------------
+#
+# The user should be able to specify the compiler by setting the CC, F77,
+# and CXX environment variables to the name of the compiler and any
+# switches it requires for proper operation. If CC is unset then this
+# script may set it. If CC is unset by time this script completes then
+# configure will try `gcc' and `cc' in that order (perhaps some others
+# too).
+#
+# Note: Code later in this file may depend on the value of $CC_BASENAME
+#       in order to distinguish between different compilers when
+#       deciding which compiler command-line switches to use.  This
+#       variable is set based on the incoming value of $CC and is only
+#       used within this file.
+
+if test "X-$CC" = "X-"; then
+  CC=cc
+  CC_BASENAME=cc
+fi
+
+if test "X-$F77" = "X-"; then
+  F77=f77
+  F77_BASENAME=f77
+fi
+
+if test "X-$CXX" = "X-"; then
+  CXX=cxx
+  CXX_BASENAME=cxx
+fi
+
+# C, Fortran, and C++ Compiler and Preprocessor Flags
+# ---------------------------------------------------
+#
+# - Flags that end with `_CFLAGS' are always passed to the C compiler.
+# - Flags that end with `_FFLAGS' are always passed to the Fortran
+#   compiler.
+# - Flags that end with `_CXXFLAGS' are always passed to the C++ compiler.
+# - Flags that end with `_CPPFLAGS' are passed to the C and C++ compilers
+#   when compiling but not when linking.
+#
+#   DEBUG_CFLAGS
+#   DEBUG_FFLAGS
+#   DEBUG_CXXFLAGS
+#   DEBUG_CPPFLAGS  - Flags to pass to the compiler to create a
+#                     library suitable for use with debugging
+#			          tools. Usually this list will exclude
+#                     optimization switches (like `-O') and include
+#                     switches that turn on symbolic debugging support
+#                     (like `-g').
+#
+#   PROD_CFLAGS
+#   PROD_FFLAGS
+#   PROD_CXXFLAGS
+#   PROD_CPPFLAGS   - Flags to pass to the compiler to create a
+#                     production version of the library. These
+#                     usualy exclude symbolic debugging switches (like
+#                     `-g') and include optimization switches (like
+#                     `-O').
+#
+#   PROFILE_CFLAGS
+#   PROFILE_FFLAGS
+#   PROFILE_CXXFLAGS
+#   PROFILE_CPPFLAGS- Flags to pass to the compiler to create a
+#                     library suitable for performance testing (like
+#                     `-pg').  This may or may not include debugging or
+#                     production flags.
+#			
+#   FFLAGS
+#   CFLAGS          - Flags can be added to these variable which
+#                     might already be partially initialized. These
+#                     flags will always be passed to the compiler and
+#                     should include switches to turn on full warnings.
+#
+#                     WARNING: flags do not have to be added to the CFLAGS
+#                     or FFLAGS variable if the compiler is the GNU gcc
+#                     and g77 compiler.
+#
+#                     FFLAGS and CFLAGS should contain *something* or else
+#                     configure will probably add `-g'. For most systems
+#                     this isn't a problem but some systems will disable
+#                     optimizations in favor of the `-g'. The configure
+#                     script will remove the `-g' flag in production mode
+#                     only.
+#
+# These flags should be set according to the compiler being used.
+# There are two ways to check the compiler. You can try using `-v' or
+# `--version' to see if the compiler will print a version string.  You
+# can use the value of $FOO_BASENAME which is the base name of the
+# first word in $FOO, where FOO is either CC, F77, or CXX (note that the
+# value of CC may have changed above).
+
+case $CC_BASENAME in
+  gcc)
+    CFLAGS="$CFLAGS"
+    DEBUG_CFLAGS="-g -fverbose-asm"
+    DEBUG_CPPFLAGS=
+    PROD_CFLAGS=
+    PROD_CPPFLAGS="-O3 -fomit-frame-pointer"
+    PROFILE_CFLAGS="-pg"
+    PROFILE_CPPFLAGS=
+    ;;
+
+  *)
+    CFLAGS="$CFLAGS -Olimit 2048 -std1 -noso"
+    DEBUG_CFLAGS="-g"
+    DEBUG_CPPFLAGS=
+    PROD_CFLAGS="-O"
+    PROD_CPPFLAGS=
+    PROFILE_CFLAGS="-pg"
+    PROFILE_CPPFLAGS=
+    ;;
+esac
+
+case $F77_BASENAME in 
+  g77)
+    FFLAGS="$FFLAGS -Wsign-compare"
+    DEBUG_FFLAGS="-g"
+    PROD_FFLAGS="-O3 -fomit-frame-pointer"
+    PROFILE_FFLAGS="-pg"
+    ;;
+
+  *)
+    FFLAGS="$FFLAGS -noso"
+    DEBUG_FFLAGS="-g"
+    PROD_FFLAGS="-O"
+    PROFILE_FFLAGS="-pg"
+    ;;
+esac
+
+case $CXX_BASENAME in 
+  g++)
+    CXXFLAGS="$CXXFLAGS"
+    DEBUG_CXXFLAGS="-g -fverbose-asm"
+    PROD_CXXFLAGS="-O3 -fomit-frame-pointer"
+    PROFILE_CXXFLAGS="-pg"
+    ;;
+
+  *)
+    CXXFLAGS="$CXXFLAGS -ansi"
+    DEBUG_CXXFLAGS="-g"
+    PROD_CXXFLAGS="-O"
+    PROFILE_CXXFLAGS="-pg"
+    ;;
+esac
+
+# Overriding Configure Tests
+# --------------------------
+#
+# Values for overriding configuration tests when cross compiling.
+
+# Set this to `yes' or `no' depending on whether the target is big
+# endian or little endian.
+#ac_cv_c_bigendian=${ac_cv_c_bigendian='yes'}

Added: packages/libhdf4/branches/upstream/current/config/powerpc-apple
===================================================================
--- packages/libhdf4/branches/upstream/current/config/powerpc-apple	                        (rev 0)
+++ packages/libhdf4/branches/upstream/current/config/powerpc-apple	2007-05-15 09:53:05 UTC (rev 831)
@@ -0,0 +1,172 @@
+#                                                   -*- shell-script -*-
+#
+# This file is part of the HDF4 build script. It is processed shortly
+# after configure starts and defines, among other things, flags for
+# the various compilation modes.
+
+# Choosing C, Fortran, and C++ Compilers
+# --------------------------------------
+#
+# The user should be able to specify the compiler by setting the CC, F77,
+# and CXX environment variables to the name of the compiler and any
+# switches it requires for proper operation. If CC is unset then this
+# script may set it. If CC is unset by time this script completes then
+# configure will try `gcc' and `cc' in that order (perhaps some others
+# too).
+#
+# Note: Code later in this file may depend on the value of $CC_BASENAME
+#       in order to distinguish between different compilers when
+#       deciding which compiler command-line switches to use.  This
+#       variable is set based on the incoming value of $CC and is only
+#       used within this file.
+
+if test "X-$CC" = "X-"; then
+  CC=gcc
+  CC_BASENAME=gcc
+fi
+#Make IBM xlf compiler a deafult
+if test "X-$F77" = "X-"; then
+  F77=xlf
+  F77_BASENAME=xlf
+
+else
+    case $F77 in
+        # The PGI and Intel compilers are automatically detected below
+        xlf*|f95*)
+            ;;
+
+        *)
+            # Figure out which compiler we are using: pgf90 or Absoft f95
+            RM='rm -f'
+            tmpfile=/tmp/cmpver.$$
+            $F77 -V >$tmpfile
+            if test -s "$tmpfile"; then 
+            #Absoft compiler f95 doesn't recognize -V flag; we will use
+            #the error message it produces to identify the compiler
+            #    if( grep -s 'Absoft' $tmpfile > /dev/null) then
+                if( grep -s 'ERROR: No input files' $tmpfile > /dev/null) then
+                    F77_BASENAME=f95
+                fi 
+                if( grep -s 'IBM XL' $tmpfile > /dev/null) then
+                    F77_BASENAME=xlf
+                fi 
+            fi
+            $RM $tmpfile
+            ;;
+    esac
+fi
+
+
+# C, Fortran, and C++ Compiler and Preprocessor Flags
+# ---------------------------------------------------
+#
+# - Flags that end with `_CFLAGS' are always passed to the C compiler.
+# - Flags that end with `_FFLAGS' are always passed to the Fortran
+#   compiler.
+# - Flags that end with `_CXXFLAGS' are always passed to the C++ compiler.
+# - Flags that end with `_CPPFLAGS' are passed to the C and C++ compilers
+#   when compiling but not when linking.
+#
+#   DEBUG_CFLAGS
+#   DEBUG_FFLAGS
+#   DEBUG_CXXFLAGS
+#   DEBUG_CPPFLAGS  - Flags to pass to the compiler to create a
+#                     library suitable for use with debugging
+#			          tools. Usually this list will exclude
+#                     optimization switches (like `-O') and include
+#                     switches that turn on symbolic debugging support
+#                     (like `-g').
+#
+#   PROD_CFLAGS
+#   PROD_FFLAGS
+#   PROD_CXXFLAGS
+#   PROD_CPPFLAGS   - Flags to pass to the compiler to create a
+#                     production version of the library. These
+#                     usualy exclude symbolic debugging switches (like
+#                     `-g') and include optimization switches (like
+#                     `-O').
+#
+#   PROFILE_CFLAGS
+#   PROFILE_FFLAGS
+#   PROFILE_CXXFLAGS
+#   PROFILE_CPPFLAGS- Flags to pass to the compiler to create a
+#                     library suitable for performance testing (like
+#                     `-pg').  This may or may not include debugging or
+#                     production flags.
+#			
+#   FFLAGS
+#   CFLAGS          - Flags can be added to these variable which
+#                     might already be partially initialized. These
+#                     flags will always be passed to the compiler and
+#                     should include switches to turn on full warnings.
+#
+#                     WARNING: flags do not have to be added to the CFLAGS
+#                     or FFLAGS variable if the compiler is the GNU gcc
+#                     and g77 compiler.
+#
+#                     FFLAGS and CFLAGS should contain *something* or else
+#                     configure will probably add `-g'. For most systems
+#                     this isn't a problem but some systems will disable
+#                     optimizations in favor of the `-g'. The configure
+#                     script will remove the `-g' flag in production mode
+#                     only.
+#
+# These flags should be set according to the compiler being used.
+# There are two ways to check the compiler. You can try using `-v' or
+# `--version' to see if the compiler will print a version string.  You
+# can use the value of $FOO_BASENAME which is the base name of the
+# first word in $FOO, where FOO is either CC, F77, or CXX (note that the
+# value of CC may have changed above).
+
+case $CC_BASENAME in
+  gcc)
+    CFLAGS="$CFLAGS"
+    DEBUG_CFLAGS="-g -ansi -Wall -pedantic "
+    DEBUG_CPPFLAGS=
+    PROD_CFLAGS="-ansi -Wall -Wpointer-arith -Wcast-qual -Wcast-align -Wwrite-strings -Wconversion -Wmissing-prototypes -Wnested-externs -pedantic -O2"
+    PROD_CPPFLAGS=
+    PROFILE_CFLAGS="-pg"
+    PROFILE_CPPFLAGS=
+    ;;
+
+  *)
+    CFLAGS="$CFLAGS -ansi"
+    DEBUG_CFLAGS="-g"
+    DEBUG_CPPFLAGS=
+    PROD_CFLAGS="-O"
+    PROD_CPPFLAGS=
+    PROFILE_CFLAGS="-pg"
+    PROFILE_CPPFLAGS=
+    ;;
+esac
+
+case $F77_BASENAME in 
+  xlf)
+    FFLAGS="$FFLAGS"
+    DEBUG_FFLAGS="-g"
+    PROD_FFLAGS="-O"
+    PROFILE_FFLAGS="-pg"
+    ;;
+
+  f95)
+    #
+    # Assume Absoft compiler
+    #
+    # Set a flag for compiling C stubs
+    CFLAGS="$CFLAGS -DH4_ABSOFT"
+    FFLAGS="$FFLAGS -YEXT_NAMES=UCS"
+    DEBUG_FFLAGS="-g"
+    PROD_FFLAGS="-O"
+    PROFILE_FFLAGS="-pg"
+    ;;
+esac
+
+
+# Overriding Configure Tests
+# --------------------------
+#
+# Values for overriding configuration tests when cross compiling.
+
+# Set this to `yes' or `no' depending on whether the target is big
+# endian or little endian.
+#ac_cv_c_bigendian=${ac_cv_c_bigendian='yes'}

Added: packages/libhdf4/branches/upstream/current/config/powerpc-ibm-aix5.x
===================================================================
--- packages/libhdf4/branches/upstream/current/config/powerpc-ibm-aix5.x	                        (rev 0)
+++ packages/libhdf4/branches/upstream/current/config/powerpc-ibm-aix5.x	2007-05-15 09:53:05 UTC (rev 831)
@@ -0,0 +1,160 @@
+#                                                   -*- shell-script -*-
+#
+# This file is part of the HDF4 build script. It is processed shortly
+# after configure starts and defines, among other things, flags for
+# the various compilation modes.
+
+# Choosing C, Fortran, and C++ Compilers
+# --------------------------------------
+#
+# The user should be able to specify the compiler by setting the CC, F77,
+# and CXX environment variables to the name of the compiler and any
+# switches it requires for proper operation. If CC is unset then this
+# script may set it. If CC is unset by time this script completes then
+# configure will try `gcc' and `cc' in that order (perhaps some others
+# too).
+#
+# Note: Code later in this file may depend on the value of $CC_BASENAME
+#       in order to distinguish between different compilers when
+#       deciding which compiler command-line switches to use.  This
+#       variable is set based on the incoming value of $CC and is only
+#       used within this file.
+
+if test "X-$CC" = "X-"; then
+  CC=xlc
+  CC_BASENAME=xlc
+fi
+
+if test "X-$F77" = "X-"; then
+  F77=xlf
+  F77_BASENAME=xlf
+fi
+
+if test "X-$CXX" = "X-"; then
+  CXX=xlC
+  CXX_BASENAME=xlC
+fi
+
+# C, Fortran, and C++ Compiler and Preprocessor Flags
+# ---------------------------------------------------
+#
+# - Flags that end with `_CFLAGS' are always passed to the C compiler.
+# - Flags that end with `_FFLAGS' are always passed to the Fortran
+#   compiler.
+# - Flags that end with `_CXXFLAGS' are always passed to the C++ compiler.
+# - Flags that end with `_CPPFLAGS' are passed to the C and C++ compilers
+#   when compiling but not when linking.
+#
+#   DEBUG_CFLAGS
+#   DEBUG_FFLAGS
+#   DEBUG_CXXFLAGS
+#   DEBUG_CPPFLAGS  - Flags to pass to the compiler to create a
+#                     library suitable for use with debugging
+#			          tools. Usually this list will exclude
+#                     optimization switches (like `-O') and include
+#                     switches that turn on symbolic debugging support
+#                     (like `-g').
+#
+#   PROD_CFLAGS
+#   PROD_FFLAGS
+#   PROD_CXXFLAGS
+#   PROD_CPPFLAGS   - Flags to pass to the compiler to create a
+#                     production version of the library. These
+#                     usualy exclude symbolic debugging switches (like
+#                     `-g') and include optimization switches (like
+#                     `-O').
+#
+#   PROFILE_CFLAGS
+#   PROFILE_FFLAGS
+#   PROFILE_CXXFLAGS
+#   PROFILE_CPPFLAGS- Flags to pass to the compiler to create a
+#                     library suitable for performance testing (like
+#                     `-pg').  This may or may not include debugging or
+#                     production flags.
+#			
+#   FFLAGS
+#   CFLAGS          - Flags can be added to these variable which
+#                     might already be partially initialized. These
+#                     flags will always be passed to the compiler and
+#                     should include switches to turn on full warnings.
+#
+#                     WARNING: flags do not have to be added to the CFLAGS
+#                     or FFLAGS variable if the compiler is the GNU gcc
+#                     and g77 compiler.
+#
+#                     FFLAGS and CFLAGS should contain *something* or else
+#                     configure will probably add `-g'. For most systems
+#                     this isn't a problem but some systems will disable
+#                     optimizations in favor of the `-g'. The configure
+#                     script will remove the `-g' flag in production mode
+#                     only.
+#
+# These flags should be set according to the compiler being used.
+# There are two ways to check the compiler. You can try using `-v' or
+# `--version' to see if the compiler will print a version string.  You
+# can use the value of $FOO_BASENAME which is the base name of the
+# first word in $FOO, where FOO is either CC, F77, or CXX (note that the
+# value of CC may have changed above).
+
+case $CC_BASENAME in
+  gcc)
+    CFLAGS="$CFLAGS"
+    DEBUG_CFLAGS="-g -fverbose-asm"
+    DEBUG_CPPFLAGS=
+    PROD_CFLAGS="-O3 -fomit-frame-pointer"
+    PROD_CPPFLAGS=
+    PROFILE_CFLAGS="-pg"
+    PROFILE_CPPFLAGS=
+    ;;
+
+  *)
+    CFLAGS="$CFLAGS -D_ALL_SOURCE -qlanglvl=ansi"
+    DEBUG_CFLAGS="-g"
+    DEBUG_CPPFLAGS=
+    PROD_CFLAGS="-O"
+    PROD_CPPFLAGS=
+    PROFILE_CFLAGS="-pg"
+    PROFILE_CPPFLAGS=
+    ;;
+esac
+
+case $F77_BASENAME in 
+  g77)
+    FFLAGS="$FFLAGS -Wsign-compare"
+    DEBUG_FFLAGS="-g"
+    PROD_FFLAGS="-O3 -fomit-frame-pointer"
+    PROFILE_FFLAGS="-pg"
+    ;;
+
+  *)
+    FFLAGS="$FFLAGS"
+    DEBUG_FFLAGS="-g"
+    PROD_FFLAGS="-O"
+    PROFILE_FFLAGS="-pg"
+    ;;
+esac
+
+case $CXX_BASENAME in 
+  g++)
+    CXXFLAGS="$CXXFLAGS"
+    DEBUG_CXXFLAGS="-g -fverbose-asm"
+    PROD_CXXFLAGS="-O3 -fomit-frame-pointer"
+    PROFILE_CXXFLAGS="-pg"
+    ;;
+
+  *)
+    CXXFLAGS="$CXXFLAGS -ansi"
+    DEBUG_CXXFLAGS="-g"
+    PROD_CXXFLAGS="-O"
+    PROFILE_CXXFLAGS="-pg"
+    ;;
+esac
+
+# Overriding Configure Tests
+# --------------------------
+#
+# Values for overriding configuration tests when cross compiling.
+
+# Set this to `yes' or `no' depending on whether the target is big
+# endian or little endian.
+#ac_cv_c_bigendian=${ac_cv_c_bigendian='yes'}

Added: packages/libhdf4/branches/upstream/current/config/solaris2.x
===================================================================
--- packages/libhdf4/branches/upstream/current/config/solaris2.x	                        (rev 0)
+++ packages/libhdf4/branches/upstream/current/config/solaris2.x	2007-05-15 09:53:05 UTC (rev 831)
@@ -0,0 +1,160 @@
+#                                                   -*- shell-script -*-
+#
+# This file is part of the HDF4 build script. It is processed shortly
+# after configure starts and defines, among other things, flags for
+# the various compilation modes.
+
+# Choosing C, Fortran, and C++ Compilers
+# --------------------------------------
+#
+# The user should be able to specify the compiler by setting the CC, F77,
+# and CXX environment variables to the name of the compiler and any
+# switches it requires for proper operation. If CC is unset then this
+# script may set it. If CC is unset by time this script completes then
+# configure will try `gcc' and `cc' in that order (perhaps some others
+# too).
+#
+# Note: Code later in this file may depend on the value of $CC_BASENAME
+#       in order to distinguish between different compilers when
+#       deciding which compiler command-line switches to use.  This
+#       variable is set based on the incoming value of $CC and is only
+#       used within this file.
+
+if test "X-$CC" = "X-"; then
+  CC=cc
+  CC_BASENAME=cc
+fi
+
+if test "X-$F77" = "X-"; then
+  F77=f77
+  F77_BASENAME=f77
+fi
+
+if test "X-$CXX" = "X-"; then
+  CXX=CC
+  CXX_BASENAME=CC
+fi
+
+# C, Fortran, and C++ Compiler and Preprocessor Flags
+# ---------------------------------------------------
+#
+# - Flags that end with `_CFLAGS' are always passed to the C compiler.
+# - Flags that end with `_FFLAGS' are always passed to the Fortran
+#   compiler.
+# - Flags that end with `_CXXFLAGS' are always passed to the C++ compiler.
+# - Flags that end with `_CPPFLAGS' are passed to the C and C++ compilers
+#   when compiling but not when linking.
+#
+#   DEBUG_CFLAGS
+#   DEBUG_FFLAGS
+#   DEBUG_CXXFLAGS
+#   DEBUG_CPPFLAGS  - Flags to pass to the compiler to create a
+#                     library suitable for use with debugging
+#			          tools. Usually this list will exclude
+#                     optimization switches (like `-O') and include
+#                     switches that turn on symbolic debugging support
+#                     (like `-g').
+#
+#   PROD_CFLAGS
+#   PROD_FFLAGS
+#   PROD_CXXFLAGS
+#   PROD_CPPFLAGS   - Flags to pass to the compiler to create a
+#                     production version of the library. These
+#                     usualy exclude symbolic debugging switches (like
+#                     `-g') and include optimization switches (like
+#                     `-O').
+#
+#   PROFILE_CFLAGS
+#   PROFILE_FFLAGS
+#   PROFILE_CXXFLAGS
+#   PROFILE_CPPFLAGS- Flags to pass to the compiler to create a
+#                     library suitable for performance testing (like
+#                     `-pg').  This may or may not include debugging or
+#                     production flags.
+#			
+#   FFLAGS
+#   CFLAGS          - Flags can be added to these variable which
+#                     might already be partially initialized. These
+#                     flags will always be passed to the compiler and
+#                     should include switches to turn on full warnings.
+#
+#                     WARNING: flags do not have to be added to the CFLAGS
+#                     or FFLAGS variable if the compiler is the GNU gcc
+#                     and g77 compiler.
+#
+#                     FFLAGS and CFLAGS should contain *something* or else
+#                     configure will probably add `-g'. For most systems
+#                     this isn't a problem but some systems will disable
+#                     optimizations in favor of the `-g'. The configure
+#                     script will remove the `-g' flag in production mode
+#                     only.
+#
+# These flags should be set according to the compiler being used.
+# There are two ways to check the compiler. You can try using `-v' or
+# `--version' to see if the compiler will print a version string.  You
+# can use the value of $FOO_BASENAME which is the base name of the
+# first word in $FOO, where FOO is either CC, F77, or CXX (note that the
+# value of CC may have changed above).
+
+case $CC_BASENAME in
+  gcc)
+    CFLAGS="$CFLAGS -ansi"
+    DEBUG_CFLAGS="-g "
+    DEBUG_CPPFLAGS=
+    PROD_CFLAGS="-O3 "
+    PROD_CPPFLAGS=
+    PROFILE_CFLAGS="-pg"
+    PROFILE_CPPFLAGS=
+    ;;
+
+  *)
+    CFLAGS="$CFLAGS -Xc"
+    DEBUG_CFLAGS="-g -v"
+    DEBUG_CPPFLAGS=
+    PROD_CFLAGS="-xO2"
+    PROD_CPPFLAGS=
+    PROFILE_CFLAGS="-pg"
+    PROFILE_CPPFLAGS=
+    ;;
+esac
+
+case $F77_BASENAME in 
+  g77)
+    FFLAGS="$FFLAGS -Wsign-compare"
+    DEBUG_FFLAGS="-g"
+    PROD_FFLAGS="-O3 -fomit-frame-pointer"
+    PROFILE_FFLAGS="-pg"
+    ;;
+
+  *)
+    FFLAGS="$FFLAGS -O"
+    DEBUG_FFLAGS="-g"
+    PROD_FFLAGS="-O"
+    PROFILE_FFLAGS="-pg"
+    ;;
+esac
+
+case $CXX_BASENAME in 
+  g++)
+    CXXFLAGS="$CXXFLAGS"
+    DEBUG_CXXFLAGS="-g -fverbose-asm"
+    PROD_CXXFLAGS="-O3 -fomit-frame-pointer"
+    PROFILE_CXXFLAGS="-pg"
+    ;;
+
+  *)
+    CXXFLAGS="$CXXFLAGS -ansi"
+    DEBUG_CXXFLAGS="-g"
+    PROD_CXXFLAGS="-O"
+    PROFILE_CXXFLAGS="-pg"
+    ;;
+esac
+
+# Overriding Configure Tests
+# --------------------------
+#
+# Values for overriding configuration tests when cross compiling.
+
+# Set this to `yes' or `no' depending on whether the target is big
+# endian or little endian.
+#ac_cv_c_bigendian=${ac_cv_c_bigendian='yes'}

Added: packages/libhdf4/branches/upstream/current/config/sv1-cray
===================================================================
--- packages/libhdf4/branches/upstream/current/config/sv1-cray	                        (rev 0)
+++ packages/libhdf4/branches/upstream/current/config/sv1-cray	2007-05-15 09:53:05 UTC (rev 831)
@@ -0,0 +1,160 @@
+#                                                   -*- shell-script -*-
+#
+# This file is part of the HDF4 build script. It is processed shortly
+# after configure starts and defines, among other things, flags for
+# the various compilation modes.
+
+# Choosing C, Fortran, and C++ Compilers
+# --------------------------------------
+#
+# The user should be able to specify the compiler by setting the CC, F77,
+# and CXX environment variables to the name of the compiler and any
+# switches it requires for proper operation. If CC is unset then this
+# script may set it. If CC is unset by time this script completes then
+# configure will try `gcc' and `cc' in that order (perhaps some others
+# too).
+#
+# Note: Code later in this file may depend on the value of $CC_BASENAME
+#       in order to distinguish between different compilers when
+#       deciding which compiler command-line switches to use.  This
+#       variable is set based on the incoming value of $CC and is only
+#       used within this file.
+
+if test "X-$CC" = "X-"; then
+  CC=cc
+  CC_BASENAME=cc
+fi
+
+if test "X-$F77" = "X-"; then
+  F77=f90
+  F77_BASENAME=f90
+fi
+
+if test "X-$CXX" = "X-"; then
+  CXX=CC
+  CXX_BASENAME=CC
+fi
+
+# C, Fortran, and C++ Compiler and Preprocessor Flags
+# ---------------------------------------------------
+#
+# - Flags that end with `_CFLAGS' are always passed to the C compiler.
+# - Flags that end with `_FFLAGS' are always passed to the Fortran
+#   compiler.
+# - Flags that end with `_CXXFLAGS' are always passed to the C++ compiler.
+# - Flags that end with `_CPPFLAGS' are passed to the C and C++ compilers
+#   when compiling but not when linking.
+#
+#   DEBUG_CFLAGS
+#   DEBUG_FFLAGS
+#   DEBUG_CXXFLAGS
+#   DEBUG_CPPFLAGS  - Flags to pass to the compiler to create a
+#                     library suitable for use with debugging
+#			          tools. Usually this list will exclude
+#                     optimization switches (like `-O') and include
+#                     switches that turn on symbolic debugging support
+#                     (like `-g').
+#
+#   PROD_CFLAGS
+#   PROD_FFLAGS
+#   PROD_CXXFLAGS
+#   PROD_CPPFLAGS   - Flags to pass to the compiler to create a
+#                     production version of the library. These
+#                     usualy exclude symbolic debugging switches (like
+#                     `-g') and include optimization switches (like
+#                     `-O').
+#
+#   PROFILE_CFLAGS
+#   PROFILE_FFLAGS
+#   PROFILE_CXXFLAGS
+#   PROFILE_CPPFLAGS- Flags to pass to the compiler to create a
+#                     library suitable for performance testing (like
+#                     `-pg').  This may or may not include debugging or
+#                     production flags.
+#			
+#   FFLAGS
+#   CFLAGS          - Flags can be added to these variable which
+#                     might already be partially initialized. These
+#                     flags will always be passed to the compiler and
+#                     should include switches to turn on full warnings.
+#
+#                     WARNING: flags do not have to be added to the CFLAGS
+#                     or FFLAGS variable if the compiler is the GNU gcc
+#                     and g77 compiler.
+#
+#                     FFLAGS and CFLAGS should contain *something* or else
+#                     configure will probably add `-g'. For most systems
+#                     this isn't a problem but some systems will disable
+#                     optimizations in favor of the `-g'. The configure
+#                     script will remove the `-g' flag in production mode
+#                     only.
+#
+# These flags should be set according to the compiler being used.
+# There are two ways to check the compiler. You can try using `-v' or
+# `--version' to see if the compiler will print a version string.  You
+# can use the value of $FOO_BASENAME which is the base name of the
+# first word in $FOO, where FOO is either CC, F77, or CXX (note that the
+# value of CC may have changed above).
+
+case $CC_BASENAME in
+  gcc)
+    CFLAGS="$CFLAGS"
+    DEBUG_CFLAGS="-g -fverbose-asm"
+    DEBUG_CPPFLAGS=
+    PROD_CFLAGS="-O3 -fomit-frame-pointer"
+    PROD_CPPFLAGS=
+    PROFILE_CFLAGS="-pg"
+    PROFILE_CPPFLAGS=
+    ;;
+
+  *)
+    CFLAGS="$CFLAGS -O -s"
+    DEBUG_CFLAGS="-g"
+    DEBUG_CPPFLAGS=
+    PROD_CFLAGS="-O"
+    PROD_CPPFLAGS=
+    PROFILE_CFLAGS="-pg"
+    PROFILE_CPPFLAGS=
+    ;;
+esac
+
+case $F77_BASENAME in 
+  g77)
+    FFLAGS="$FFLAGS -Wsign-compare"
+    DEBUG_FFLAGS="-g"
+    PROD_FFLAGS="-O3 -fomit-frame-pointer"
+    PROFILE_FFLAGS="-pg"
+    ;;
+
+  *)
+    FFLAGS="$FFLAGS -O 1"
+    DEBUG_FFLAGS="-g"
+    PROD_FFLAGS="-O"
+    PROFILE_FFLAGS="-pg"
+    ;;
+esac
+
+case $CXX_BASENAME in 
+  g++)
+    CXXFLAGS="$CXXFLAGS"
+    DEBUG_CXXFLAGS="-g -fverbose-asm"
+    PROD_CXXFLAGS="-O3 -fomit-frame-pointer"
+    PROFILE_CXXFLAGS="-pg"
+    ;;
+
+  *)
+    CXXFLAGS="$CXXFLAGS "
+    DEBUG_CXXFLAGS="-g"
+    PROD_CXXFLAGS="-O"
+    PROFILE_CXXFLAGS="-pg"
+    ;;
+esac
+
+# Overriding Configure Tests
+# --------------------------
+#
+# Values for overriding configuration tests when cross compiling.
+
+# Set this to `yes' or `no' depending on whether the target is big
+# endian or little endian.
+#ac_cv_c_bigendian=${ac_cv_c_bigendian='yes'}


Property changes on: packages/libhdf4/branches/upstream/current/config/sv1-cray
___________________________________________________________________
Name: svn:executable
   + *

Added: packages/libhdf4/branches/upstream/current/config/unicos10.0.X
===================================================================
--- packages/libhdf4/branches/upstream/current/config/unicos10.0.X	                        (rev 0)
+++ packages/libhdf4/branches/upstream/current/config/unicos10.0.X	2007-05-15 09:53:05 UTC (rev 831)
@@ -0,0 +1,160 @@
+#                                                   -*- shell-script -*-
+#
+# This file is part of the HDF4 build script. It is processed shortly
+# after configure starts and defines, among other things, flags for
+# the various compilation modes.
+
+# Choosing C, Fortran, and C++ Compilers
+# --------------------------------------
+#
+# The user should be able to specify the compiler by setting the CC, F77,
+# and CXX environment variables to the name of the compiler and any
+# switches it requires for proper operation. If CC is unset then this
+# script may set it. If CC is unset by time this script completes then
+# configure will try `gcc' and `cc' in that order (perhaps some others
+# too).
+#
+# Note: Code later in this file may depend on the value of $CC_BASENAME
+#       in order to distinguish between different compilers when
+#       deciding which compiler command-line switches to use.  This
+#       variable is set based on the incoming value of $CC and is only
+#       used within this file.
+
+if test "X-$CC" = "X-"; then
+  CC=cc
+  CC_BASENAME=cc
+fi
+
+if test "X-$F77" = "X-"; then
+  F77=f90
+  F77_BASENAME=f90
+fi
+
+if test "X-$CXX" = "X-"; then
+  CXX=CC
+  CXX_BASENAME=CC
+fi
+
+# C, Fortran, and C++ Compiler and Preprocessor Flags
+# ---------------------------------------------------
+#
+# - Flags that end with `_CFLAGS' are always passed to the C compiler.
+# - Flags that end with `_FFLAGS' are always passed to the Fortran
+#   compiler.
+# - Flags that end with `_CXXFLAGS' are always passed to the C++ compiler.
+# - Flags that end with `_CPPFLAGS' are passed to the C and C++ compilers
+#   when compiling but not when linking.
+#
+#   DEBUG_CFLAGS
+#   DEBUG_FFLAGS
+#   DEBUG_CXXFLAGS
+#   DEBUG_CPPFLAGS  - Flags to pass to the compiler to create a
+#                     library suitable for use with debugging
+#			          tools. Usually this list will exclude
+#                     optimization switches (like `-O') and include
+#                     switches that turn on symbolic debugging support
+#                     (like `-g').
+#
+#   PROD_CFLAGS
+#   PROD_FFLAGS
+#   PROD_CXXFLAGS
+#   PROD_CPPFLAGS   - Flags to pass to the compiler to create a
+#                     production version of the library. These
+#                     usualy exclude symbolic debugging switches (like
+#                     `-g') and include optimization switches (like
+#                     `-O').
+#
+#   PROFILE_CFLAGS
+#   PROFILE_FFLAGS
+#   PROFILE_CXXFLAGS
+#   PROFILE_CPPFLAGS- Flags to pass to the compiler to create a
+#                     library suitable for performance testing (like
+#                     `-pg').  This may or may not include debugging or
+#                     production flags.
+#			
+#   FFLAGS
+#   CFLAGS          - Flags can be added to these variable which
+#                     might already be partially initialized. These
+#                     flags will always be passed to the compiler and
+#                     should include switches to turn on full warnings.
+#
+#                     WARNING: flags do not have to be added to the CFLAGS
+#                     or FFLAGS variable if the compiler is the GNU gcc
+#                     and g77 compiler.
+#
+#                     FFLAGS and CFLAGS should contain *something* or else
+#                     configure will probably add `-g'. For most systems
+#                     this isn't a problem but some systems will disable
+#                     optimizations in favor of the `-g'. The configure
+#                     script will remove the `-g' flag in production mode
+#                     only.
+#
+# These flags should be set according to the compiler being used.
+# There are two ways to check the compiler. You can try using `-v' or
+# `--version' to see if the compiler will print a version string.  You
+# can use the value of $FOO_BASENAME which is the base name of the
+# first word in $FOO, where FOO is either CC, F77, or CXX (note that the
+# value of CC may have changed above).
+
+case $CC_BASENAME in
+  gcc)
+    CFLAGS="$CFLAGS"
+    DEBUG_CFLAGS="-g -fverbose-asm"
+    DEBUG_CPPFLAGS=
+    PROD_CFLAGS="-O3 -fomit-frame-pointer"
+    PROD_CPPFLAGS=
+    PROFILE_CFLAGS="-pg"
+    PROFILE_CPPFLAGS=
+    ;;
+
+  *)
+    CFLAGS="$CFLAGS -s"
+    DEBUG_CFLAGS="-g"
+    DEBUG_CPPFLAGS=
+    PROD_CFLAGS="-O"
+    PROD_CPPFLAGS=
+    PROFILE_CFLAGS="-pg"
+    PROFILE_CPPFLAGS=
+    ;;
+esac
+
+case $F77_BASENAME in 
+  g77)
+    FFLAGS="$FFLAGS -Wsign-compare"
+    DEBUG_FFLAGS="-g"
+    PROD_FFLAGS="-O3 -fomit-frame-pointer"
+    PROFILE_FFLAGS="-pg"
+    ;;
+
+  *)
+    FFLAGS="$FFLAGS -Wl"-s" "
+    DEBUG_FFLAGS="-g"
+    PROD_FFLAGS="-O"
+    PROFILE_FFLAGS="-pg"
+    ;;
+esac
+
+case $CXX_BASENAME in 
+  g++)
+    CXXFLAGS="$CXXFLAGS"
+    DEBUG_CXXFLAGS="-g -fverbose-asm"
+    PROD_CXXFLAGS="-O3 -fomit-frame-pointer"
+    PROFILE_CXXFLAGS="-pg"
+    ;;
+
+  *)
+    CXXFLAGS="$CXXFLAGS"
+    DEBUG_CXXFLAGS="-g"
+    PROD_CXXFLAGS="-O"
+    PROFILE_CXXFLAGS="-pg"
+    ;;
+esac
+
+# Overriding Configure Tests
+# --------------------------
+#
+# Values for overriding configuration tests when cross compiling.
+
+# Set this to `yes' or `no' depending on whether the target is big
+# endian or little endian.
+#ac_cv_c_bigendian=${ac_cv_c_bigendian='yes'}


Property changes on: packages/libhdf4/branches/upstream/current/config/unicos10.0.X
___________________________________________________________________
Name: svn:executable
   + *

Added: packages/libhdf4/branches/upstream/current/config/unicosmk2.0.6.X
===================================================================
--- packages/libhdf4/branches/upstream/current/config/unicosmk2.0.6.X	                        (rev 0)
+++ packages/libhdf4/branches/upstream/current/config/unicosmk2.0.6.X	2007-05-15 09:53:05 UTC (rev 831)
@@ -0,0 +1,160 @@
+#                                                   -*- shell-script -*-
+#
+# This file is part of the HDF4 build script. It is processed shortly
+# after configure starts and defines, among other things, flags for
+# the various compilation modes.
+
+# Choosing C, Fortran, and C++ Compilers
+# --------------------------------------
+#
+# The user should be able to specify the compiler by setting the CC, F77,
+# and CXX environment variables to the name of the compiler and any
+# switches it requires for proper operation. If CC is unset then this
+# script may set it. If CC is unset by time this script completes then
+# configure will try `gcc' and `cc' in that order (perhaps some others
+# too).
+#
+# Note: Code later in this file may depend on the value of $CC_BASENAME
+#       in order to distinguish between different compilers when
+#       deciding which compiler command-line switches to use.  This
+#       variable is set based on the incoming value of $CC and is only
+#       used within this file.
+
+if test "X-$CC" = "X-"; then
+  CC=cc
+  CC_BASENAME=cc
+fi
+
+if test "X-$F77" = "X-"; then
+  F77=f90
+  F77_BASENAME=f90
+fi
+
+if test "X-$CXX" = "X-"; then
+  CXX=CC
+  CXX_BASENAME=CC
+fi
+
+# C, Fortran, and C++ Compiler and Preprocessor Flags
+# ---------------------------------------------------
+#
+# - Flags that end with `_CFLAGS' are always passed to the C compiler.
+# - Flags that end with `_FFLAGS' are always passed to the Fortran
+#   compiler.
+# - Flags that end with `_CXXFLAGS' are always passed to the C++ compiler.
+# - Flags that end with `_CPPFLAGS' are passed to the C and C++ compilers
+#   when compiling but not when linking.
+#
+#   DEBUG_CFLAGS
+#   DEBUG_FFLAGS
+#   DEBUG_CXXFLAGS
+#   DEBUG_CPPFLAGS  - Flags to pass to the compiler to create a
+#                     library suitable for use with debugging
+#			          tools. Usually this list will exclude
+#                     optimization switches (like `-O') and include
+#                     switches that turn on symbolic debugging support
+#                     (like `-g').
+#
+#   PROD_CFLAGS
+#   PROD_FFLAGS
+#   PROD_CXXFLAGS
+#   PROD_CPPFLAGS   - Flags to pass to the compiler to create a
+#                     production version of the library. These
+#                     usualy exclude symbolic debugging switches (like
+#                     `-g') and include optimization switches (like
+#                     `-O').
+#
+#   PROFILE_CFLAGS
+#   PROFILE_FFLAGS
+#   PROFILE_CXXFLAGS
+#   PROFILE_CPPFLAGS- Flags to pass to the compiler to create a
+#                     library suitable for performance testing (like
+#                     `-pg').  This may or may not include debugging or
+#                     production flags.
+#			
+#   FFLAGS
+#   CFLAGS          - Flags can be added to these variable which
+#                     might already be partially initialized. These
+#                     flags will always be passed to the compiler and
+#                     should include switches to turn on full warnings.
+#
+#                     WARNING: flags do not have to be added to the CFLAGS
+#                     or FFLAGS variable if the compiler is the GNU gcc
+#                     and g77 compiler.
+#
+#                     FFLAGS and CFLAGS should contain *something* or else
+#                     configure will probably add `-g'. For most systems
+#                     this isn't a problem but some systems will disable
+#                     optimizations in favor of the `-g'. The configure
+#                     script will remove the `-g' flag in production mode
+#                     only.
+#
+# These flags should be set according to the compiler being used.
+# There are two ways to check the compiler. You can try using `-v' or
+# `--version' to see if the compiler will print a version string.  You
+# can use the value of $FOO_BASENAME which is the base name of the
+# first word in $FOO, where FOO is either CC, F77, or CXX (note that the
+# value of CC may have changed above).
+
+case $CC_BASENAME in
+  gcc)
+    CFLAGS="$CFLAGS"
+    DEBUG_CFLAGS="-g -fverbose-asm"
+    DEBUG_CPPFLAGS=
+    PROD_CFLAGS="-O3 -fomit-frame-pointer"
+    PROD_CPPFLAGS=
+    PROFILE_CFLAGS="-pg"
+    PROFILE_CPPFLAGS=
+    ;;
+
+  *)
+    CFLAGS="$CFLAGS -X m -s"
+    DEBUG_CFLAGS="-g"
+    DEBUG_CPPFLAGS=
+    PROD_CFLAGS="-O"
+    PROD_CPPFLAGS=
+    PROFILE_CFLAGS="-pg"
+    PROFILE_CPPFLAGS=
+    ;;
+esac
+
+case $F77_BASENAME in 
+  g77)
+    FFLAGS="$FFLAGS -Wsign-compare"
+    DEBUG_FFLAGS="-g"
+    PROD_FFLAGS="-O3 -fomit-frame-pointer"
+    PROFILE_FFLAGS="-pg"
+    ;;
+
+  *)
+    FFLAGS="$FFLAGS -X m -Wl"-Dpermok=yes" -Wl"-s" "
+    DEBUG_FFLAGS="-g"
+    PROD_FFLAGS="-O"
+    PROFILE_FFLAGS="-pg"
+    ;;
+esac
+
+case $CXX_BASENAME in 
+  g++)
+    CXXFLAGS="$CXXFLAGS"
+    DEBUG_CXXFLAGS="-g -fverbose-asm"
+    PROD_CXXFLAGS="-O3 -fomit-frame-pointer"
+    PROFILE_CXXFLAGS="-pg"
+    ;;
+
+  *)
+    CXXFLAGS="$CXXFLAGS"
+    DEBUG_CXXFLAGS="-g"
+    PROD_CXXFLAGS="-O"
+    PROFILE_CXXFLAGS="-pg"
+    ;;
+esac
+
+# Overriding Configure Tests
+# --------------------------
+#
+# Values for overriding configuration tests when cross compiling.
+
+# Set this to `yes' or `no' depending on whether the target is big
+# endian or little endian.
+#ac_cv_c_bigendian=${ac_cv_c_bigendian='yes'}


Property changes on: packages/libhdf4/branches/upstream/current/config/unicosmk2.0.6.X
___________________________________________________________________
Name: svn:executable
   + *

Deleted: packages/libhdf4/branches/upstream/current/config.guess
===================================================================
--- packages/libhdf4/branches/upstream/current/config.guess	2007-05-15 09:05:29 UTC (rev 830)
+++ packages/libhdf4/branches/upstream/current/config.guess	2007-05-15 09:53:05 UTC (rev 831)
@@ -1,495 +0,0 @@
-#!/bin/sh
-# Attempt to guess a canonical system name.
-#   Copyright (C) 1992, 1993, 1994 Free Software Foundation, Inc.
-#
-# This file is free software; you can redistribute it and/or modify it
-# under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 2 of the License, or
-# (at your option) any later version.
-#
-# 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 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.
-#
-# As a special exception to the GNU General Public License, if you
-# distribute this file as part of a program that contains a
-# configuration script generated by Autoconf, you may include it under
-# the same distribution terms that you use for the rest of that program.
-
-# Written by Per Bothner <bothner at cygnus.com>.
-# The master version of this file is at the FSF in /home/gd/gnu/lib.
-#
-# This script attempts to guess a canonical system name similar to
-# config.sub.  If it succeeds, it prints the system name on stdout, and
-# exits with 0.  Otherwise, it exits with 1.
-#
-# The plan is that this can be called by configure scripts if you
-# don't specify an explicit system type (host/target name).
-#
-# Only a few systems have been added to this list; please add others
-# (but try to keep the structure clean).
-#
-
-# This is needed to find uname on a Pyramid OSx when run in the BSD universe.
-# (ghazi at noc.rutgers.edu 8/24/94.)
-if (test -f /.attbin/uname) >/dev/null 2>&1 ; then
-	PATH=$PATH:/.attbin ; export PATH
-fi
-
-UNAME_MACHINE=`(uname -m) 2>/dev/null` || UNAME_MACHINE=unknown
-UNAME_RELEASE=`(uname -r) 2>/dev/null` || UNAME_RELEASE=unknown
-UNAME_SYSTEM=`(uname -s) 2>/dev/null` || UNAME_SYSTEM=unknown
-UNAME_VERSION=`(uname -v) 2>/dev/null` || UNAME_VERSION=unknown
-UNAME_PROCESSOR=`(uname -p) 2>/dev/null` || UNAME_PROCESSOR=unknown
-
-trap 'rm -f dummy.c dummy.o dummy; exit 1' 1 2 15
-
-# Note: order is significant - the case branches are not exclusive.
-
-case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}:${UNAME_PROCESSOR}" in
-    alpha:OSF1:V*:*)
-	# After 1.2, OSF1 uses "V1.3" for uname -r.
-	echo alpha-dec-osf`echo ${UNAME_RELEASE} | sed -e 's/^V//'`
-	exit 0 ;;
-    alpha:OSF1:*:*)
-	# 1.2 uses "1.2" for uname -r.
-	echo alpha-dec-osf${UNAME_RELEASE}
-        exit 0 ;;
-    arm:RISC*:1.[012]*:*|arm:riscix:1.[012]*:*)
-	echo arm-acorn-riscix${UNAME_RELEASE}
-	exit 0;;
-    Pyramid*:OSx*:*:*)
-	if test "`(/bin/universe) 2>/dev/null`" = att ; then
-		echo pyramid-pyramid-sysv3
-	else
-		echo pyramid-pyramid-bsd
-	fi
-	exit 0 ;;
-    sun4*:SunOS:5.*:*)
-	echo sparc-sun-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
-	exit 0 ;;
-    i86pc*:SunOS:*:*)
-	echo i386-sun-solaris2${UNAME_RELEASE}
-	exit 0 ;;
-    sun4*:SunOS:6*:*)
-	# According to config.sub, this is the proper way to canonicalize
-	# SunOS6.  Hard to guess exactly what SunOS6 will be like, but
-	# it's likely to be more like Solaris than SunOS4.
-	echo sparc-sun-solaris3`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
-	exit 0 ;;
-    sun4*:SunOS:*:*)
-	# Japanese Language versions have a version number like `4.1.3-JL'.
-	echo sparc-sun-sunos`echo ${UNAME_RELEASE}|sed -e 's/-/_/'`
-	exit 0 ;;
-    sun3*:SunOS:*:*)
-	echo m68k-sun-sunos${UNAME_RELEASE}
-	exit 0 ;;
-    RISC*:ULTRIX:*:*)
-	echo mips-dec-ultrix${UNAME_RELEASE}
-	exit 0 ;;
-    VAX*:ULTRIX*:*:*)
-	echo vax-dec-ultrix${UNAME_RELEASE}
-	exit 0 ;;
-    mips:*:5*:RISCos)
-	echo mips-mips-riscos${UNAME_RELEASE}
-	exit 0 ;;
-    m88k:CX/UX:7*:*)
-	echo m88k-harris-cxux7
-	exit 0 ;;
-    m88k:*:4*:R4*)
-	echo m88k-motorola-sysv4
-	exit 0 ;;
-    m88k:*:3*:R3*)
-	echo m88k-motorola-sysv3
-	exit 0 ;;
-    AViiON:dgux:*:*)
-	if [ ${TARGET_BINARY_INTERFACE}x = m88kdguxelfx \
-	     -o ${TARGET_BINARY_INTERFACE}x = x ] ; then
-		echo m88k-dg-dgux${UNAME_RELEASE}
-	else
-		echo m88k-dg-dguxbcs${UNAME_RELEASE}
-	fi
- 	exit 0 ;;
-    M88*:DolphinOS:*:*)	# DolphinOS (SVR3)
-	echo m88k-dolphin-sysv3
-	exit 0 ;;
-    M88*:*:R3*:*)
-	# Delta 88k system running SVR3
-	echo m88k-motorola-sysv3
-	exit 0 ;;
-    XD88*:*:*:*) # Tektronix XD88 system running UTekV (SVR3)
-	echo m88k-tektronix-sysv3
-	exit 0 ;;
-    Tek43[0-9][0-9]:UTek:*:*) # Tektronix 4300 system running UTek (BSD)
-	echo m68k-tektronix-bsd
-	exit 0 ;;
-    *:IRIX64:6.*:*)		# IRIX 64 bits OS
-	echo mips-sgi-irix${UNAME_RELEASE}
-	exit 0 ;;
-    *:IRIX:6.*:*)		# IRIX 6.x but not 64 bits OS
-	echo mips-sgi-irix6_32
-	exit 0 ;;
-    *:IRIX*:*:*)
-	echo mips-sgi-irix${UNAME_RELEASE}
-	exit 0 ;;
-    i[34]86:AIX:*:*)
-	echo i386-ibm-aix
-	exit 0 ;;
-    *:AIX:2:3)
-	if grep bos325 /usr/include/stdio.h >/dev/null 2>&1; then
-		sed 's/^		//' << EOF >dummy.c
-		#include <sys/systemcfg.h>
-
-		main()
-			{
-			if (!__power_pc())
-				exit(1);
-			puts("powerpc-ibm-aix3.2.5");
-			exit(0);
-			}
-EOF
-		${CC-cc} dummy.c -o dummy && ./dummy && rm dummy.c dummy && exit 0
-		rm -f dummy.c dummy
-		echo rs6000-ibm-aix3.2.5
-	elif grep bos324 /usr/include/stdio.h >/dev/null 2>&1; then
-		echo rs6000-ibm-aix3.2.4
-	else
-		echo rs6000-ibm-aix3.2
-	fi
-	exit 0 ;;
-    *:AIX:*:4)
-	if /usr/sbin/lsattr -EHl proc0 | grep POWER >/dev/null 2>&1; then
-		IBM_ARCH=rs6000
-	else
-		IBM_ARCH=powerpc
-	fi
-	if grep bos410 /usr/include/stdio.h >/dev/null 2>&1; then
-		IBM_REV=4.1
-	elif grep bos411 /usr/include/stdio.h >/dev/null 2>&1; then
-		IBM_REV=4.1.1
-	else
-		IBM_REV=4.${UNAME_RELEASE}
-	fi
-	echo ${IBM_ARCH}-ibm-aix${IBM_REV}
-	exit 0 ;;
-    *:AIX:*:*)
-	echo rs6000-ibm-aix
-	exit 0 ;;
-    *:BOSX:*:*)
-	echo rs6000-bull-bosx
-	exit 0 ;;
-    DPX/2?00:B.O.S.:*:*)
-	echo m68k-bull-sysv3
-	exit 0 ;;
-    9000/[34]??:4.3bsd:1.*:*)
-	echo m68k-hp-bsd
-	exit 0 ;;
-    hp300:4.4BSD:*:* | 9000/[34]??:4.3bsd:2.*:*)
-	echo m68k-hp-bsd4.4
-	exit 0 ;;
-    9000/[3478]??:HP-UX:*:*)
-	case "${UNAME_MACHINE}" in
-	    9000/31? )            HP_ARCH=m68000 ;;
-	    9000/[34]?? )         HP_ARCH=m68k ;;
-	    9000/7?? | 9000/8?7 ) HP_ARCH=hppa1.1 ;;
-	    9000/8?? )            HP_ARCH=hppa1.0 ;;
-	esac
-	HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'`
-	echo ${HP_ARCH}-hp-hpux${HPUX_REV}
-	exit 0 ;;
-    3050*:HI-UX:*:*)
-	sed 's/^	//' << EOF >dummy.c
-	#include <unistd.h>
-	int
-	main ()
-	{
-	  long cpu = sysconf (_SC_CPU_VERSION);
-	  /* The order matters, because CPU_IS_HP_MC68K erroneously returns
-	     true for CPU_PA_RISC1_0.  CPU_IS_PA_RISC returns correct
-	     results, however.  */
-	  if (CPU_IS_PA_RISC (cpu))
-	    {
-	      switch (cpu)
-		{
-		  case CPU_PA_RISC1_0: puts ("hppa1.0-hitachi-hiuxwe2"); break;
-		  case CPU_PA_RISC1_1: puts ("hppa1.1-hitachi-hiuxwe2"); break;
-		  case CPU_PA_RISC2_0: puts ("hppa2.0-hitachi-hiuxwe2"); break;
-		  default: puts ("hppa-hitachi-hiuxwe2"); break;
-		}
-	    }
-	  else if (CPU_IS_HP_MC68K (cpu))
-	    puts ("m68k-hitachi-hiuxwe2");
-	  else puts ("unknown-hitachi-hiuxwe2");
-	  exit (0);
-	}
-EOF
-	${CC-cc} dummy.c -o dummy && ./dummy && rm dummy.c dummy && exit 0
-	rm -f dummy.c dummy
-	echo unknown-hitachi-hiuxwe2
-	exit 0 ;;
-    9000/7??:4.3bsd:*:* | 9000/8?7:4.3bsd:*:* )
-	echo hppa1.1-hp-bsd
-	exit 0 ;;
-    9000/8??:4.3bsd:*:*)
-	echo hppa1.0-hp-bsd
-	exit 0 ;;
-    hp7??:OSF1:*:* | hp8?7:OSF1:*:* )
-	echo hppa1.1-hp-osf
-	exit 0 ;;
-    hp8??:OSF1:*:*)
-	echo hppa1.0-hp-osf
-	exit 0 ;;
-    C1*:ConvexOS:*:* | convex:ConvexOS:C1*:*)
-	echo c1-convex-bsd
-        exit 0 ;;
-    C2*:ConvexOS:*:* | convex:ConvexOS:C2*:*)
-	if getsysinfo -f scalar_acc
-	then echo c32-convex-bsd
-	else echo c2-convex-bsd
-	fi
-        exit 0 ;;
-    C34*:ConvexOS:*:* | convex:ConvexOS:C34*:*)
-	echo c34-convex-bsd
-        exit 0 ;;
-    C38*:ConvexOS:*:* | convex:ConvexOS:C38*:*)
-	echo c38-convex-bsd
-        exit 0 ;;
-    C4*:ConvexOS:*:* | convex:ConvexOS:C4*:*)
-	echo c4-convex-bsd
-        exit 0 ;;
-    CRAY*X-MP:*:*:*)
-	echo xmp-cray-unicos
-        exit 0 ;;
-    CRAY*Y-MP:*:*:*)
-	echo ymp-cray-unicos
-        exit 0 ;;
-    CRAY-2:*:*:*)
-	echo cray2-cray-unicos
-        exit 0 ;;
-    CRAY*C90:c90:*:*)
-	echo c90-cray-unicos
-        exit 0 ;;
-    CRAY*J90:*:*:*)
-	echo j90-cray-unicos
-        exit 0 ;;
-    CRAY*TS:*:*:*)
-	echo t90-cray-unicos
-        exit 0 ;;
-    CRAY*T3*:*:*:*)
-	echo t3e-cray-craympp
-        exit 0 ;;
-    hp3[0-9][05]:NetBSD:*:*)
-	echo m68k-hp-netbsd${UNAME_RELEASE}
-	exit 0 ;;
-    i[34]86:BSD/386:*:*)
-	echo ${UNAME_MACHINE}-unknown-bsdi${UNAME_RELEASE}
-	exit 0 ;;
-    *:FreeBSD:*:*)
-	echo ${UNAME_MACHINE}-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`
-	exit 0 ;;
-    *:NetBSD:*:*)
-	echo ${UNAME_MACHINE}-unknown-netbsd`echo ${UNAME_RELEASE}|sed -e 's/[-_].*/\./'`
-	exit 0 ;;
-    *:GNU:*:*)
-	echo `echo ${UNAME_MACHINE}|sed -e 's,/.*$,,'`-unknown-gnu`echo ${UNAME_RELEASE}|sed -e 's,/.*$,,'`
-	exit 0 ;;
-    *:Linux:*:*)
-	echo ${UNAME_MACHINE}-unknown-linux
-	exit 0 ;;
-# ptx 4.0 does uname -s correctly, with DYNIX/ptx in there.  earlier versions
-# are messed up and put the nodename in both sysname and nodename.
-    i[34]86:DYNIX/ptx:4*:*)
-	echo i386-sequent-sysv4
-	exit 0 ;;
-    i[34]86:*:4.*:* | i[34]86:SYSTEM_V:4.*:*)
-	if grep Novell /usr/include/link.h >/dev/null 2>/dev/null; then
-		echo ${UNAME_MACHINE}-univel-sysv${UNAME_RELEASE}
-	else
-		echo ${UNAME_MACHINE}-unknown-sysv${UNAME_RELEASE}
-	fi
-	exit 0 ;;
-    i[34]86:*:3.2:*)
-	if /bin/uname -X 2>/dev/null >/dev/null ; then
-		UNAME_REL=`(/bin/uname -X|egrep Release|sed -e 's/.*= //')`
-		(/bin/uname -X|egrep i80486 >/dev/null) && UNAME_MACHINE=i486
-		echo ${UNAME_MACHINE}-unknown-sco$UNAME_REL
-	elif test -f /usr/options/cb.name; then
-		UNAME_REL=`sed -n 's/.*Version //p' </usr/options/cb.name`
-		echo ${UNAME_MACHINE}-unknown-isc$UNAME_REL
-	else
-		echo ${UNAME_MACHINE}-unknown-sysv32
-	fi
-	exit 0 ;;
-    Intel:Mach:3*:*)
-	echo i386-unknown-mach3
-	exit 0 ;;
-    i860:*:4.*:*) # i860-SVR4
-	if grep Stardent /usr/include/sys/uadmin.h >/dev/null 2>&1 ; then
-	  echo i860-stardent-sysv${UNAME_RELEASE} # Stardent Vistra i860-SVR4
-	else # Add other i860-SVR4 vendors below as they are discovered.
-	  echo i860-unknown-sysv${UNAME_RELEASE}  # Unknown i860-SVR4
-	fi
-	exit 0 ;;
-    mini*:CTIX:SYS*5:*)
-	# "miniframe"
-	echo m68010-convergent-sysv
-	exit 0 ;;
-    M680[234]0:*:R3V[567]*:*)
-	test -r /sysV68 && echo 'm68k-motorola-sysv' && exit 0 ;;
-    3[34]??:*:4.0:3.0 | 3[34]??,*:*:4.0:3.0)
-        uname -p 2>/dev/null | grep 86 >/dev/null \
-          && echo i486-ncr-sysv4.3 && exit 0 ;;
-    3[34]??:*:4.0:* | 3[34]??,*:*:4.0:*)
-        uname -p 2>/dev/null | grep 86 >/dev/null \
-          && echo i486-ncr-sysv4 && exit 0 ;;
-    m680[234]0:LynxOS:2.2*:*)
-	echo m68k-lynx-lynxos${UNAME_RELEASE}
-	exit 0 ;;
-    mc68030:UNIX_System_V:4.*:*)
-	echo m68k-atari-sysv4
-	exit 0 ;;
-    i[34]86:LynxOS:2.2*:*)
-	echo i386-lynx-lynxos${UNAME_RELEASE}
-	exit 0 ;;
-    TSUNAMI:LynxOS:2.2*:*)
-	echo sparc-lynx-lynxos${UNAME_RELEASE}
-	exit 0 ;;
-    rs6000:LynxOS:2.2*:*)
-	echo rs6000-lynx-lynxos${UNAME_RELEASE}
-	exit 0 ;;
-    RM*:SINIX-*:*:*)
-	echo mips-sni-sysv4
-	exit 0 ;;
-    *:*:*:*:S370)
-	echo S370-fujitsu-sysv
-	exit 0 ;;
-    *:SINIX-*:*:*)
-	if uname -p 2>/dev/null >/dev/null ; then
-		UNAME_MACHINE=`(uname -p) 2>/dev/null`
-		echo ${UNAME_MACHINE}-sni-sysv4
-	else
-		echo ns32k-sni-sysv
-	fi
-	exit 0 ;;
-esac
-
-#echo '(No uname command or uname output not recognized.)' 1>&2
-#echo "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" 1>&2
-
-cat >dummy.c <<EOF
-main ()
-{
-#if defined (sony)
-#if defined (MIPSEB)
-  /* BFD wants "bsd" instead of "newsos".  Perhaps BFD should be changed,
-     I don't know....  */
-  printf ("mips-sony-bsd\n"); exit (0);
-#else
-  printf ("m68k-sony-newsos\n"); exit (0);
-#endif
-#endif
-
-#if defined (__arm) && defined (__acorn) && defined (__unix)
-  printf ("arm-acorn-riscix"); exit (0);
-#endif
-
-#if defined (hp300) && !defined (hpux)
-  printf ("m68k-hp-bsd\n"); exit (0);
-#endif
-
-#if defined (NeXT)
-#if !defined (__ARCHITECTURE__)
-#define __ARCHITECTURE__ "m68k"
-#endif
-  int version;
-  version=`(hostinfo | sed -n 's/.*NeXT Mach \([0-9]*\).*/\1/p') 2>/dev/null`;
-  printf ("%s-next-nextstep%s\n", __ARCHITECTURE__,  version==2 ? "2" : "3");
-  exit (0);
-#endif
-
-#if defined (MULTIMAX) || defined (n16)
-#if defined (UMAXV)
-  printf ("ns32k-encore-sysv\n"); exit (0);
-#else
-#if defined (CMU)
-  printf ("ns32k-encore-mach\n"); exit (0);
-#else
-  printf ("ns32k-encore-bsd\n"); exit (0);
-#endif
-#endif
-#endif
-
-#if defined (__386BSD__)
-  printf ("i386-unknown-bsd\n"); exit (0);
-#endif
-
-#if defined (sequent)
-#if defined (i386)
-  printf ("i386-sequent-dynix\n"); exit (0);
-#endif
-#if defined (ns32000)
-  printf ("ns32k-sequent-dynix\n"); exit (0);
-#endif
-#endif
-
-#if defined (_SEQUENT_)
-  printf ("i386-sequent-ptx\n"); exit (0);
-#endif
-
-#if defined (vax)
-#if !defined (ultrix)
-  printf ("vax-dec-bsd\n"); exit (0);
-#else
-  printf ("vax-dec-ultrix\n"); exit (0);
-#endif
-#endif
-
-#if defined (alliant) && defined (i860)
-  printf ("i860-alliant-bsd\n"); exit (0);
-#endif
-
-  exit (1);
-}
-EOF
-
-${CC-cc} dummy.c -o dummy 2>/dev/null && ./dummy && rm dummy.c dummy && exit 0
-rm -f dummy.c dummy
-
-# Apollos put the system type in the environment.
-
-test -d /usr/apollo && { echo ${ISP}-apollo-${SYSTYPE}; exit 0; }
-
-# Convex versions that predate uname can use getsysinfo(1)
-
-if [ -x /usr/convex/getsysinfo ]
-then
-    case `getsysinfo -f cpu_type` in
-    c1*)
-	echo c1-convex-bsd
-	exit 0 ;;
-    c2*)
-	if getsysinfo -f scalar_acc
-	then echo c32-convex-bsd
-	else echo c2-convex-bsd
-	fi
-	exit 0 ;;
-    c34*)
-	echo c34-convex-bsd
-	exit 0 ;;
-    c38*)
-	echo c38-convex-bsd
-	exit 0 ;;
-    c4*)
-	echo c4-convex-bsd
-	exit 0 ;;
-    esac
-fi
-
-#echo '(Unable to guess system type)' 1>&2
-
-exit 1

Deleted: packages/libhdf4/branches/upstream/current/config.sub
===================================================================
--- packages/libhdf4/branches/upstream/current/config.sub	2007-05-15 09:05:29 UTC (rev 830)
+++ packages/libhdf4/branches/upstream/current/config.sub	2007-05-15 09:53:05 UTC (rev 831)
@@ -1,827 +0,0 @@
-#!/bin/sh
-# Configuration validation subroutine script, version 1.1.
-#   Copyright (C) 1991, 1992, 1993, 1994 Free Software Foundation, Inc.
-# This file is (in principle) common to ALL GNU software.
-# The presence of a machine in this file suggests that SOME GNU software
-# can handle that machine.  It does not imply ALL GNU software can. 
-#
-# This file is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 2 of the License, or
-# (at your option) any later version.
-#
-# 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 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.
-
-# As a special exception to the GNU General Public License, if you
-# distribute this file as part of a program that contains a
-# configuration script generated by Autoconf, you may include it under
-# the same distribution terms that you use for the rest of that program.
-
-# Configuration subroutine to validate and canonicalize a configuration type.
-# Supply the specified configuration type as an argument.
-# If it is invalid, we print an error message on stderr and exit with code 1.
-# Otherwise, we print the canonical config type on stdout and succeed.
-
-# This file is supposed to be the same for all GNU packages
-# and recognize all the CPU types, system types and aliases
-# that are meaningful with *any* GNU software.
-# Each package is responsible for reporting which valid configurations
-# it does not support.  The user should be able to distinguish
-# a failure to support a valid configuration from a meaningless
-# configuration.
-
-# The goal of this file is to map all the various variations of a given
-# machine specification into a single specification in the form:
-#	CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM
-# It is wrong to echo any other type of specification.
-
-# First pass through any local machine types.
-case $1 in
-	*local*)
-		echo $1
-		exit 0
-		;;
-	*)
-	;;
-esac
-
-# Separate what the user gave into CPU-COMPANY and OS (if any).
-basic_machine=`echo $1 | sed 's/-[^-]*$//'`
-if [ $basic_machine != $1 ]
-then os=`echo $1 | sed 's/.*-/-/'`
-else os=; fi
-
-### Let's recognize common machines as not being operating systems so
-### that things like config.sub decstation-3100 work.  We also
-### recognize some manufacturers as not being operating systems, so we
-### can provide default operating systems below.
-case $os in
-	-sun*os*)
-		# Prevent following clause from handling this invalid input.
-		;;
-	-dec* | -mips* | -sequent* | -encore* | -pc532* | -sgi* | -sony* | \
-	-att* | -7300* | -3300* | -delta* | -motorola* | -sun[234]* | \
-	-unicom* | -ibm* | -next | -hp | -isi* | -apollo | -altos* | \
-	-convergent* | -ncr* | -news | -32* | -3600* | -3100* | -hitachi* |\
-	-c[123]* | -convex* | -sun | -crds | -omron* | -dg | -ultra | -tti* | \
-	-harris | -dolphin | -highlevel | -gould | -cbm | -ns | -masscomp )
-		os=
-		basic_machine=$1
-		;;
-	-hiux*)
-		os=-hiuxwe2
-		;;
-	-sco4)
-		os=-sco3.2v4
-		basic_machine=`echo $1 | sed -e 's/86-.*/86-unknown/'`
-		;;
-	-sco3.2.[4-9]*)
-		os=`echo $os | sed -e 's/sco3.2./sco3.2v/'`
-		basic_machine=`echo $1 | sed -e 's/86-.*/86-unknown/'`
-		;;
-	-sco3.2v[4-9]*)
-		# Don't forget version if it is 3.2v4 or newer.
-		basic_machine=`echo $1 | sed -e 's/86-.*/86-unknown/'`
-		;;
-	-sco*)
-		os=-sco3.2v2
-		basic_machine=`echo $1 | sed -e 's/86-.*/86-unknown/'`
-		;;
-	-isc)
-		os=-isc2.2
-		basic_machine=`echo $1 | sed -e 's/86-.*/86-unknown/'`
-		;;
-	-clix*)
-		basic_machine=clipper-intergraph
-		;;
-	-isc*)
-		basic_machine=`echo $1 | sed -e 's/86-.*/86-unknown/'`
-		;;
-	-lynx)
-		os=-lynxos
-		;;
-	-ptx*)
-		basic_machine=`echo $1 | sed -e 's/86-.*/86-sequent/'`
-		;;
-	-windowsnt*)
-		os=`echo $os | sed -e 's/windowsnt/winnt/'`
-		;;
-esac
-
-# Decode aliases for certain CPU-COMPANY combinations.
-case $basic_machine in
-	# Recognize the basic CPU types without company name.
-	# Some are omitted here because they have special meanings below.
-	tahoe | i[3456]86 | i860 | m68k | m68000 | m88k | ns32k | arm | pyramid \
-		| tron | a29k | 580 | i960 | h8300 | hppa1.0 | hppa1.1 \
-		| alpha | we32k | ns16k | clipper | sparclite | i370 | sh \
-		| powerpc | sparc64 | 1750a | dsp16xx | mips64 | mipsel \
-		| pdp11 | mips64el | mips64orion | mips64orionel )
-		basic_machine=$basic_machine-unknown
-		;;
-	# Object if more than one company name word.
-	*-*-*)
-		echo Invalid configuration \`$1\': machine \`$basic_machine\' not recognized 1>&2
-		exit 1
-		;;
-	# Recognize the basic CPU types with company name.
-	vax-* | tahoe-* | i[3456]86-* | i860-* | m68k-* | m68000-* | m88k-* \
-	      | sparc-* | ns32k-* | fx80-* | arm-* | c[123]* | ia64-* \
-	      | mips-* | pyramid-* | tron-* | a29k-* | romp-* | rs6000-* \
-	      | none-* | 580-* | cray2-* | h8300-* | i960-* | xmp-* | ymp-* \
-	      | hppa1.0-* | hppa1.1-* | alpha-* | we32k-* | cydra-* | ns16k-* \
-	      | pn-* | np1-* | xps100-* | clipper-* | orion-* | sparclite-* \
-	      | pdp11-* | sh-* | powerpc-* | sparc64-* | mips64-* | mipsel-* \
-	      | mips64el-* | mips64orion-* | mips64orionel-* | S370-* )
-		;;
-	# Recognize the various machine names and aliases which stand
-	# for a CPU type and a company and sometimes even an OS.
-	3b1 | 7300 | 7300-att | att-7300 | pc7300 | safari | unixpc)
-		basic_machine=m68000-att
-		;;
-	3b*)
-		basic_machine=we32k-att
-		;;
-	alliant | fx80)
-		basic_machine=fx80-alliant
-		;;
-	altos | altos3068)
-		basic_machine=m68k-altos
-		;;
-	am29k)
-		basic_machine=a29k-none
-		os=-bsd
-		;;
-	amdahl)
-		basic_machine=580-amdahl
-		os=-sysv
-		;;
-	amiga | amiga-*)
-		basic_machine=m68k-cbm
-		;;
-	amigados)
-		basic_machine=m68k-cbm
-		os=-amigados
-		;;
-	amigaunix | amix)
-		basic_machine=m68k-cbm
-		os=-sysv4
-		;;
-	apollo68)
-		basic_machine=m68k-apollo
-		os=-sysv
-		;;
-	balance)
-		basic_machine=ns32k-sequent
-		os=-dynix
-		;;
-	convex-c1)
-		basic_machine=c1-convex
-		os=-bsd
-		;;
-	convex-c2)
-		basic_machine=c2-convex
-		os=-bsd
-		;;
-	convex-c32)
-		basic_machine=c32-convex
-		os=-bsd
-		;;
-	convex-c34)
-		basic_machine=c34-convex
-		os=-bsd
-		;;
-	convex-c38)
-		basic_machine=c38-convex
-		os=-bsd
-		;;
-	cray | ymp)
-		basic_machine=ymp-cray
-		os=-unicos
-		;;
-	cray2)
-		basic_machine=cray2-cray
-		os=-unicos
-		;;
-	c90*)
-		basic_machine=c90-cray
-		os=-unicos
-		;;
-	cray-t3* | t3* | t3*-cray)
-		basic_machine=t3e-cray
-		os=-craympp
-		;;
-	crds | unos)
-		basic_machine=m68k-crds
-		;;
-	da30 | da30-*)
-		basic_machine=m68k-da30
-		;;
-	decstation | decstation-3100 | pmax | pmax-* | pmin | dec3100 | decstatn)
-		basic_machine=mips-dec
-		;;
-	delta | 3300 | motorola-3300 | motorola-delta \
-	      | 3300-motorola | delta-motorola)
-		basic_machine=m68k-motorola
-		;;
-	delta88)
-		basic_machine=m88k-motorola
-		os=-sysv3
-		;;
-	dpx20 | dpx20-*)
-		basic_machine=rs6000-bull
-		os=-bosx
-		;;
-	dpx2* | dpx2*-bull)
-		basic_machine=m68k-bull
-		os=-sysv3
-		;;
-	ebmon29k)
-		basic_machine=a29k-amd
-		os=-ebmon
-		;;
-	elxsi)
-		basic_machine=elxsi-elxsi
-		os=-bsd
-		;;
-	encore | umax | mmax)
-		basic_machine=ns32k-encore
-		;;
-	fx2800)
-		basic_machine=i860-alliant
-		;;
-	genix)
-		basic_machine=ns32k-ns
-		;;
-	gmicro)
-		basic_machine=tron-gmicro
-		os=-sysv
-		;;
-	h3050r* | hiux*)
-		basic_machine=hppa1.1-hitachi
-		os=-hiuxwe2
-		;;
-	h8300hms)
-		basic_machine=h8300-hitachi
-		os=-hms
-		;;
-	harris)
-		basic_machine=m88k-harris
-		os=-sysv3
-		;;
-	hp300-*)
-		basic_machine=m68k-hp
-		;;
-	hp300bsd)
-		basic_machine=m68k-hp
-		os=-bsd
-		;;
-	hp300hpux)
-		basic_machine=m68k-hp
-		os=-hpux
-		;;
-	hp9k2[0-9][0-9] | hp9k31[0-9])
-		basic_machine=m68000-hp
-		;;
-	hp9k3[2-9][0-9])
-		basic_machine=m68k-hp
-		;;
-	hp9k7[0-9][0-9] | hp7[0-9][0-9] | hp9k8[0-9]7 | hp8[0-9]7)
-		basic_machine=hppa1.1-hp
-		;;
-	hp9k8[0-9][0-9] | hp8[0-9][0-9])
-		basic_machine=hppa1.0-hp
-		;;
-	i370-ibm* | ibm*)
-		basic_machine=i370-ibm
-		os=-mvs
-		;;
-# I'm not sure what "Sysv32" means.  Should this be sysv3.2?
-	i[3456]86v32)
-		basic_machine=`echo $1 | sed -e 's/86.*/86-unknown/'`
-		os=-sysv32
-		;;
-	i[3456]86v4*)
-		basic_machine=`echo $1 | sed -e 's/86.*/86-unknown/'`
-		os=-sysv4
-		;;
-	i[3456]86v)
-		basic_machine=`echo $1 | sed -e 's/86.*/86-unknown/'`
-		os=-sysv
-		;;
-	i[3456]86sol2)
-		basic_machine=`echo $1 | sed -e 's/86.*/86-unknown/'`
-		os=-solaris2
-		;;
-	iris | iris4d)
-		basic_machine=mips-sgi
-		case $os in
-		    -irix*)
-			;;
-		    *)
-			os=-irix4
-			;;
-		esac
-		;;
-	irix6_32)
-		basic_machine=mips-sgi
-		os=-irix6_32
-		;;
-	isi68 | isi)
-		basic_machine=m68k-isi
-		os=-sysv
-		;;
-	j90*)
-		basic_machine=j90-cray
-		os=-unicos
-		;;
-	m88k-omron*)
-		basic_machine=m88k-omron
-		;;
-	magnum | m3230)
-		basic_machine=mips-mips
-		os=-sysv
-		;;
-	merlin)
-		basic_machine=ns32k-utek
-		os=-sysv
-		;;
-	miniframe)
-		basic_machine=m68000-convergent
-		;;
-	mips3*-*)
-		basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'`
-		;;
-	mips3*)
-		basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'`-unknown
-		;;
-	ncr3000)
-		basic_machine=i486-ncr
-		os=-sysv4
-		;;
-	news | news700 | news800 | news900)
-		basic_machine=m68k-sony
-		os=-newsos
-		;;
-	news1000)
-		basic_machine=m68030-sony
-		os=-newsos
-		;;
-	news-3600 | risc-news)
-		basic_machine=mips-sony
-		os=-newsos
-		;;
-	next | m*-next )
-		basic_machine=m68k-next
-		case $os in
-		    -nextstep* )
-			;;
-		    -ns2*)
-		      os=-nextstep2
-			;;
-		    *)
-		      os=-nextstep3
-			;;
-		esac
-		;;
-	nh3000)
-		basic_machine=m68k-harris
-		os=-cxux
-		;;
-	nh[45]000)
-		basic_machine=m88k-harris
-		os=-cxux
-		;;
-	nindy960)
-		basic_machine=i960-intel
-		os=-nindy
-		;;
-	np1)
-		basic_machine=np1-gould
-		;;
-	pa-hitachi)
-		basic_machine=hppa1.1-hitachi
-		os=-hiuxwe2
-		;;
-	paragon)
-		basic_machine=i860-intel
-		os=-osf
-		;;
-	pbd)
-		basic_machine=sparc-tti
-		;;
-	pbb)
-		basic_machine=m68k-tti
-		;;
-        pc532 | pc532-*)
-		basic_machine=ns32k-pc532
-		;;
-	pentium-*)
-		# We will change tis to say i586 once there has been
-		# time for various packages to start to recognize that.
-		basic_machine=i486-`echo $basic_machine | sed 's/^[^-]*-//'`
-		;;
-	pn)
-		basic_machine=pn-gould
-		;;
-	ps2)
-		basic_machine=i386-ibm
-		;;
-	rtpc | rtpc-*)
-		basic_machine=romp-ibm
-		;;
-	fujitsu | vp | S370)
-		basic_machine=vp-fujitsu
-		os=-sysv
-		;;
-	sequent)
-		basic_machine=i386-sequent
-		;;
-	sh)
-		basic_machine=sh-hitachi
-		os=-hms
-		;;
-	sps7)
-		basic_machine=m68k-bull
-		os=-sysv2
-		;;
-	spur)
-		basic_machine=spur-unknown
-		;;
-	sun2)
-		basic_machine=m68000-sun
-		;;
-	sun2os3)
-		basic_machine=m68000-sun
-		os=-sunos3
-		;;
-	sun2os4)
-		basic_machine=m68000-sun
-		os=-sunos4
-		;;
-	sun3os3)
-		basic_machine=m68k-sun
-		os=-sunos3
-		;;
-	sun3os4)
-		basic_machine=m68k-sun
-		os=-sunos4
-		;;
-	sun4os3)
-		basic_machine=sparc-sun
-		os=-sunos3
-		;;
-	sun4os4)
-		basic_machine=sparc-sun
-		os=-sunos4
-		;;
-	sun3 | sun3-*)
-		basic_machine=m68k-sun
-		;;
-	sun4)
-		basic_machine=sparc-sun
-		;;
-	sun386 | sun386i | roadrunner)
-		basic_machine=i386-sun
-		;;
-  	mac)
-		basic_machine=m68k-mac
-		os=-macos
-		;;
-	symmetry)
-		basic_machine=i386-sequent
-		os=-dynix
-		;;
-	t90*)
-		basic_machine=t90-cray
-		os=-unicos
-		;;
-	tower | tower-32)
-		basic_machine=m68k-ncr
-		;;
-	ultra3)
-		basic_machine=a29k-nyu
-		os=-sym1
-		;;
-	vaxv)
-		basic_machine=vax-dec
-		os=-sysv
-		;;
-	vms)
-		basic_machine=vax-dec
-		os=-vms
-		;;
-	vxworks960)
-		basic_machine=i960-wrs
-		os=-vxworks
-		;;
-	vxworks68)
-		basic_machine=m68k-wrs
-		os=-vxworks
-		;;
-	xmp)
-		basic_machine=xmp-cray
-		os=-unicos
-		;;
-        xps | xps100)
-		basic_machine=xps100-honeywell
-		;;
-	none)
-		basic_machine=none-none
-		os=-none
-		;;
-
-# Here we handle the default manufacturer of certain CPU types.  It is in
-# some cases the only manufacturer, in others, it is the most popular.
-	mips)
-		basic_machine=mips-mips
-		;;
-	romp)
-		basic_machine=romp-ibm
-		;;
-	rs6000)
-		basic_machine=rs6000-ibm
-		;;
-	vax)
-		basic_machine=vax-dec
-		;;
-	pdp11)
-		basic_machine=pdp11-dec
-		;;
-	we32k)
-		basic_machine=we32k-att
-		;;
-	sparc)
-		basic_machine=sparc-sun
-		;;
-        cydra)
-		basic_machine=cydra-cydrome
-		;;
-	orion)
-		basic_machine=orion-highlevel
-		;;
-	orion105)
-		basic_machine=clipper-highlevel
-		;;
-	*)
-		echo Invalid configuration \`$1\': machine \`$basic_machine\' not recognized 1>&2
-		exit 1
-		;;
-esac
-
-# Here we canonicalize certain aliases for manufacturers.
-case $basic_machine in
-	*-digital*)
-		basic_machine=`echo $basic_machine | sed 's/digital.*/dec/'`
-		;;
-	*-commodore*)
-		basic_machine=`echo $basic_machine | sed 's/commodore.*/cbm/'`
-		;;
-	*)
-		;;
-esac
-
-# Decode manufacturer-specific aliases for certain operating systems.
-
-if [ x"$os" != x"" ]
-then
-case $os in
-	# -solaris* is a basic system type, with this one exception.
-	-solaris1 | -solaris1.*)
-		os=`echo $os | sed -e 's|solaris1|sunos4|'`
-		;;
-	-solaris)
-		os=-solaris2
-		;;
-	-gnu/linux*)
-		os=`echo $os | sed -e 's|gnu/linux|linux|'`
-		;;
-	# First accept the basic system types.
-	# The portable systems comes first.
-	# Each alternative must end in a *, to match a version number.
-	# -sysv* is not here because it comes later, after sysvr4.
-	-gnu* | -bsd* | -mach* | -minix* | -genix* | -ultrix* | -irix* \
-	      | -vms* | -sco* | -esix* | -isc* | -aix* | -sunos | -sunos[3456]* \
-	      | -hpux* | -unos* | -osf* | -luna* | -dgux* | -solaris* | -sym* \
-	      | -amigados* | -msdos* | -newsos* | -unicos* | -craympp | -aos* \
-	      | -nindy* | -vxworks* | -ebmon* | -hms* | -mvs* | -clix* \
-	      | -riscos* | -linux* | -uniplus* | -iris* | -rtu* | -xenix* \
-	      | -hiux* | -386bsd* | -netbsd* | -freebsd* | -riscix* \
-	      | -lynxos* | -bosx* | -nextstep* | -cxux* | -aout* | -elf* \
-	      | -ptx* | -coff* | -winnt*)
-		;;
-	-sunos5*)
-		os=`echo $os | sed -e 's|sunos5|solaris2|'`
-		;;
-	-sunos6*)
-		os=`echo $os | sed -e 's|sunos6|solaris3|'`
-		;;
-	-osfrose*)
-		os=-osfrose
-		;;
-	-osf*)
-		os=-osf
-		;;
-	-utek*)
-		os=-bsd
-		;;
-	-dynix*)
-		os=-bsd
-		;;
-	-acis*)
-		os=-aos
-		;;
-	-ctix* | -uts*)
-		os=-sysv
-		;;
-	-triton*)
-		os=-sysv3
-		;;
-	-oss*)
-		os=-sysv3
-		;;
-	-svr4)
-		os=-sysv4
-		;;
-	-svr3)
-		os=-sysv3
-		;;
-	-sysvr4)
-		os=-sysv4
-		;;
-	# This must come after -sysvr4.
-	-sysv*)
-		;;
-	-xenix)
-		os=-xenix
-		;;
-  	-macos)
-		os=-macos
-		;;
-	-none)
-		;;
-	*)
-		# Get rid of the `-' at the beginning of $os.
-		os=`echo $os | sed 's/[^-]*-//'`
-		echo Invalid configuration \`$1\': system \`$os\' not recognized 1>&2
-		exit 1
-		;;
-esac
-else
-
-# Here we handle the default operating systems that come with various machines.
-# The value should be what the vendor currently ships out the door with their
-# machine or put another way, the most popular os provided with the machine.
-
-# Note that if you're going to try to match "-MANUFACTURER" here (say,
-# "-sun"), then you have to tell the case statement up towards the top
-# that MANUFACTURER isn't an operating system.  Otherwise, code above
-# will signal an error saying that MANUFACTURER isn't an operating
-# system, and we'll never get to this point.
-
-case $basic_machine in
-	*-acorn)
-		os=-riscix1.2
-		;;
-        pdp11-*)
-		os=-none
-		;;
-	*-dec | vax-*)
-		os=-ultrix4.2
-		;;
-	i386-sun)
-		os=-sunos4.0.2
-		;;
-	m68000-sun)
-		os=-sunos3
-		# This also exists in the configure program, but was not the
-		# default.
-		# os=-sunos4
-		;;
-	*-tti)	# must be before sparc entry or we get the wrong os.
-		os=-sysv3
-		;;
-	sparc-* | *-sun)
-		os=-sunos4.1.1
-		;;
-	*-ibm)
-		os=-aix
-		;;
-	*-hp)
-		os=-hpux
-		;;
-	*-hitachi)
-		os=-hiux
-		;;
-	i860-* | *-att | *-ncr | *-altos | *-motorola | *-convergent)
-		os=-sysv
-		;;
-	*-cbm)
-		os=-amigados
-		;;
-	*-dg)
-		os=-dgux
-		;;
-	*-dolphin)
-		os=-sysv3
-		;;
-	m68k-ccur)
-		os=-rtu
-		;;
-	m88k-omron*)
-		os=-luna
-		;;
-	*-sequent)
-		os=-ptx
-		;;
-	*-crds)
-		os=-unos
-		;;
-	*-ns)
-		os=-genix
-		;;
-	i370-*)
-		os=-mvs
-		;;
-	*-next)
-		os=-nextstep3
-		;;
-        *-gould)
-		os=-sysv
-		;;
-        *-highlevel)
-		os=-bsd
-		;;
-	*-encore)
-		os=-bsd
-		;;
-        *-sgi)
-		os=-irix
-		;;
-	*-masscomp)
-		os=-rtu
-		;;
-	*)
-		os=-none
-		;;
-esac
-fi
-
-# Here we handle the case where we know the os, and the CPU type, but not the
-# manufacturer.  We pick the logical manufacturer.
-vendor=unknown
-case $basic_machine in
-	*-unknown)
-		case $os in
-			-riscix*)
-				vendor=acorn
-				;;
-			-sunos*)
-				vendor=sun
-				;;
-			-lynxos*)
-				vendor=lynx
-				;;
-			-aix*)
-				vendor=ibm
-				;;
-			-hpux*)
-				vendor=hp
-				;;
-			-hiux*)
-				vendor=hitachi
-				;;
-			-unos*)
-				vendor=crds
-				;;
-			-dgux*)
-				vendor=dg
-				;;
-			-luna*)
-				vendor=omron
-				;;
-			-genix*)
-				vendor=ns
-				;;
-			-mvs*)
-				vendor=ibm
-				;;
-          -macos*)
-               vendor=apple
-				;;
-			-ptx*)
-				vendor=sequent
-				;;
-		esac
-		basic_machine=`echo $basic_machine | sed "s/unknown/$vendor/"`
-		;;
-esac
-
-echo $basic_machine$os

Modified: packages/libhdf4/branches/upstream/current/configure
===================================================================
--- packages/libhdf4/branches/upstream/current/configure	2007-05-15 09:05:29 UTC (rev 830)
+++ packages/libhdf4/branches/upstream/current/configure	2007-05-15 09:53:05 UTC (rev 831)
@@ -1,1091 +1,8986 @@
-#!/bin/sh
+#! /bin/sh
+# From configure.ac Id: configure.ac.
+# Guess values for system-dependent variables and create Makefiles.
+# Generated by GNU Autoconf 2.57 for HDF 4.2r1.
+#
+# Report bugs to <hdfhelp at ncsa.uiuc.edu>.
+#
+# Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, 2002
+# Free Software Foundation, Inc.
+# This configure script is free software; the Free Software Foundation
+# gives unlimited permission to copy, distribute and modify it.
+## --------------------- ##
+## M4sh Initialization.  ##
+## --------------------- ##
 
-### WARNING: this file contains embedded tabs.  Do not run untabify on this file.
+# Be Bourne compatible
+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+"$@"}'='"$@"'
+elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then
+  set -o posix
+fi
 
-# Configuration script
-# Copyright (C) 1988, 90, 91, 92, 93, 94 Free Software Foundation, Inc.
+# Support unset when possible.
+if (FOO=FOO; unset FOO) >/dev/null 2>&1; then
+  as_unset=unset
+else
+  as_unset=false
+fi
 
-# This program is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 2 of the License, or
-# (at your option) any later version.
-# 
-# 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 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.
 
-# This version has been modified from the original configure script
-# Please report any problems running this configure script to
-# hdfhelp at ncsa.uiuc.edu
-#
-# OLD: Please report any problems running this configure script to
-#      configure at cygnus.com
-#      Please do not send reports about other problems to this address.  See
-#      gdb/README, gas/README, etc., for info on where and how to report
-#      problems about particular tools.
+# Work around bugs in pre-3.0 UWIN ksh.
+$as_unset ENV MAIL MAILPATH
+PS1='$ '
+PS2='> '
+PS4='+ '
 
-# The orginal file was written by K. Richard Pixley.
-# This file has been modified by HDF group
+# 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 -n "`(eval $as_var=C; export $as_var) 2>&1`"); then
+    eval $as_var=C; export $as_var
+  else
+    $as_unset $as_var
+  fi
+done
+
+# Required to use basename.
+if expr a : '\(a\)' >/dev/null 2>&1; 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'`
+
+
+# PATH needs CR, and LINENO needs CR and PATH.
+# 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
+
+
+  as_lineno_1=$LINENO
+  as_lineno_2=$LINENO
+  as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null`
+  test "x$as_lineno_1" != "x$as_lineno_2" &&
+  test "x$as_lineno_3"  = "x$as_lineno_2"  || {
+  # Find who we are.  Look in the path if we contain no path at all
+  # relative or not.
+  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
+
+       ;;
+  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_me: error: cannot find myself; rerun with an absolute path" >&2
+   { (exit 1); exit 1; }; }
+  fi
+  case $CONFIG_SHELL in
+  '')
+    as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+  for as_base in sh bash ksh sh5; do
+	 case $as_dir in
+	 /*)
+	   if ("$as_dir/$as_base" -c '
+  as_lineno_1=$LINENO
+  as_lineno_2=$LINENO
+  as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null`
+  test "x$as_lineno_1" != "x$as_lineno_2" &&
+  test "x$as_lineno_3"  = "x$as_lineno_2" ') 2>/dev/null; then
+	     $as_unset BASH_ENV || test "${BASH_ENV+set}" != set || { BASH_ENV=; export BASH_ENV; }
+	     $as_unset ENV || test "${ENV+set}" != set || { ENV=; export ENV; }
+	     CONFIG_SHELL=$as_dir/$as_base
+	     export CONFIG_SHELL
+	     exec "$CONFIG_SHELL" "$0" ${1+"$@"}
+	   fi;;
+	 esac
+       done
+done
+;;
+  esac
+
+  # 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 before each line; the second 'sed' does the real
+  # work.  The second script uses 'N' to pair each line-number line
+  # with the numbered line, 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
+  # second 'sed' script.  Blame Lee E. McMahon for sed's syntax.  :-)
+  sed '=' <$as_myself |
+    sed '
+      N
+      s,$,-,
+      : loop
+      s,^\(['$as_cr_digits']*\)\(.*\)[$]LINENO\([^'$as_cr_alnum'_]\),\1\2\1\3,
+      t loop
+      s,-$,,
+      s,^['$as_cr_digits']*\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 sensible to this).
+  . ./$as_me.lineno
+  # Exit status is that of the last command.
+  exit
+}
+
+
+case `echo "testing\c"; echo 1,2,3`,`echo -n testing; echo 1,2,3` in
+  *c*,-n*) ECHO_N= ECHO_C='
+' ECHO_T='	' ;;
+  *c*,*  ) ECHO_N=-n ECHO_C= ECHO_T= ;;
+  *)       ECHO_N= ECHO_C='\c' ECHO_T= ;;
+esac
+
+if expr a : '\(a\)' >/dev/null 2>&1; then
+  as_expr=expr
+else
+  as_expr=false
+fi
+
+rm -f conf$$ conf$$.exe conf$$.file
+echo >conf$$.file
+if ln -s conf$$.file conf$$ 2>/dev/null; then
+  # We could just check for DJGPP; but this test a) works b) is more generic
+  # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04).
+  if test -f conf$$.exe; then
+    # Don't use ln at all; we don't have any links
+    as_ln_s='cp -p'
+  else
+    as_ln_s='ln -s'
+  fi
+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$$.file
+
+if mkdir -p . 2>/dev/null; then
+  as_mkdir_p=:
+else
+  as_mkdir_p=false
+fi
+
+as_executable_p="test -f"
+
+# Sed expression to map a string onto a valid CPP name.
+as_tr_cpp="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="sed y%*+%pp%;s%[^_$as_cr_alnum]%_%g"
+
+
+# IFS
+# We need space, tab and new line, in precisely that order.
+as_nl='
+'
+IFS=" 	$as_nl"
+
+# CDPATH.
+$as_unset CDPATH
+
+
+# Name of the host.
+# hostname on some systems (SVR3.2, Linux) returns a bogus exit status,
+# so uname gets run too.
+ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q`
+
+exec 6>&1
+
 #
-# Shell script to create proper links to machine-dependent files in
-# preparation for compilation.
+# Initializations.
 #
-# If configure succeeds, it leaves its status in config.status.
-# If configure fails after disturbing the status quo, 
-#       config.status is removed.
-#
+ac_default_prefix=/usr/local
+ac_config_libobj_dir=.
+cross_compiling=no
+subdirs=
+MFLAGS=
+MAKEFLAGS=
+SHELL=${CONFIG_SHELL-/bin/sh}
 
-export PATH || (echo "OOPS, this isn't sh.  Desperation time.  I will feed myself to sh."; sh $0 $argv; kill $$)
+# Maximum number of lines to put in a shell here document.
+# This variable seems obsolete.  It should probably be removed, and
+# only ac_max_sed_lines should be used.
+: ${ac_max_here_lines=38}
 
-remove=rm
-hard_link=ln
-symbolic_link='ln -s'
-mkdirprog=mkdir        # what is your make-directory-program
+# Identity of this package.
+PACKAGE_NAME='HDF'
+PACKAGE_TARNAME='hdf'
+PACKAGE_VERSION='4.2r1'
+PACKAGE_STRING='HDF 4.2r1'
+PACKAGE_BUGREPORT='hdfhelp at ncsa.uiuc.edu'
 
-#for Test
-#remove="echo rm"
-#hard_link="echo ln"
-#symbolic_link="echo ln -s"
+ac_unique_file="hdf/src/atom.c"
+ac_default_prefix=`pwd`/NewHDF
+# Factoring default headers for most tests.
+ac_includes_default="\
+#include <stdio.h>
+#if HAVE_SYS_TYPES_H
+# include <sys/types.h>
+#endif
+#if HAVE_SYS_STAT_H
+# include <sys/stat.h>
+#endif
+#if STDC_HEADERS
+# include <stdlib.h>
+# include <stddef.h>
+#else
+# if HAVE_STDLIB_H
+#  include <stdlib.h>
+# endif
+#endif
+#if HAVE_STRING_H
+# if !STDC_HEADERS && HAVE_MEMORY_H
+#  include <memory.h>
+# endif
+# include <string.h>
+#endif
+#if HAVE_STRINGS_H
+# include <strings.h>
+#endif
+#if HAVE_INTTYPES_H
+# include <inttypes.h>
+#else
+# if HAVE_STDINT_H
+#  include <stdint.h>
+# endif
+#endif
+#if HAVE_UNISTD_H
+# include <unistd.h>
+#endif"
 
-# clear some things potentially inherited from environment.
+ac_subst_vars='SHELL PATH_SEPARATOR PACKAGE_NAME PACKAGE_TARNAME PACKAGE_VERSION PACKAGE_STRING PACKAGE_BUGREPORT exec_prefix prefix program_transform_name bindir sbindir libexecdir datadir sysconfdir sharedstatedir localstatedir libdir includedir oldincludedir infodir mandir build_alias host_alias target_alias DEFS ECHO_C ECHO_N ECHO_T LIBS INSTALL_PROGRAM INSTALL_SCRIPT INSTALL_DATA CYGPATH_W PACKAGE VERSION ACLOCAL AUTOCONF AUTOMAKE AUTOHEADER MAKEINFO AMTAR install_sh STRIP ac_ct_STRIP INSTALL_STRIP_PROGRAM AWK SET_MAKE am__leading_dot MAINTAINER_MODE_TRUE MAINTAINER_MODE_FALSE MAINT build build_cpu build_vendor build_os host host_cpu host_vendor host_os CC CFLAGS LDFLAGS CPPFLAGS ac_ct_CC EXEEXT OBJEXT DEPDIR am__include am__quote AMDEP_TRUE AMDEP_FALSE AMDEPBACKSLASH CCDEPMODE am__fastdepCC_TRUE am__fastdepCC_FALSE CPP CXX CXXFLAGS ac_ct_CXX CXXDEPMODE am__fastdepCXX_TRUE am__fastdepCXX_FALSE F77 FFLAGS ac_ct_F77 HDF_BUILD_FORTRAN_TRUE HDF_BUILD_FORTRAN_FALSE LEX LEXLIB LEX_OUTPUT_ROOT LN_S RANLIB ac_ct_RANLIB YACC AR DIFF NEQN TBL EGREP HDF_BUILD_XDR_TRUE HDF_BUILD_XDR_FALSE CXXCPP LIBOBJS LTLIBOBJS'
+ac_subst_files=''
 
-Makefile=Makefile
-Makefile_in=Makefile.in
-arguments=$*
-build_alias=
-configdirs=
-exec_prefix=
-exec_prefixoption=
-fatal=
-floating_point=default
-gas=default
-host_alias=NOHOST
-host_makefile_frag=
-moveifchange=
-norecursion=
-other_options=
-package_makefile_frag=
-prefix='$(TOP_SRCDIR)/NewHDF'
-progname=
-program_prefix=
-program_prefixoption=
-program_suffix=
-program_suffixoption=
-program_transform_name=
-program_transform_nameoption=
-redirect=">/dev/null"
-removing=
+# Initialize some variables set by options.
+ac_init_help=
+ac_init_version=false
+# The variables have the same names as the options, with
+# dashes changed to underlines.
+cache_file=/dev/null
+exec_prefix=NONE
+no_create=
+no_recursion=
+prefix=NONE
+program_prefix=NONE
+program_suffix=NONE
+program_transform_name=s,x,x,
+silent=
 site=
-site_makefile_frag=
-site_option=
 srcdir=
-srctrigger=
-subdirs=
-target_alias=NOTARGET
-target_makefile_frag=
-undefs=NOUNDEFS
-version="$Revision: 1.12 $"
-x11=default
+verbose=
+x_includes=NONE
+x_libraries=NONE
 
-### we might need to use some other shell than /bin/sh for running subshells
+# Installation directory options.
+# These are left unexpanded so users can "make install exec_prefix=/foo"
+# and all the variables that are supposed to be based on exec_prefix
+# by default will actually change.
+# Use braces instead of parens because sh, perl, etc. also accept them.
+bindir='${exec_prefix}/bin'
+sbindir='${exec_prefix}/sbin'
+libexecdir='${exec_prefix}/libexec'
+datadir='${prefix}/share'
+sysconfdir='${prefix}/etc'
+sharedstatedir='${prefix}/com'
+localstatedir='${prefix}/var'
+libdir='${exec_prefix}/lib'
+includedir='${prefix}/include'
+oldincludedir='/usr/include'
+infodir='${prefix}/info'
+mandir='${prefix}/man'
+
+ac_prev=
+for ac_option
+do
+  # If the previous option needs an argument, assign it.
+  if test -n "$ac_prev"; then
+    eval "$ac_prev=\$ac_option"
+    ac_prev=
+    continue
+  fi
+
+  ac_optarg=`expr "x$ac_option" : 'x[^=]*=\(.*\)'`
+
+  # Accept the important Cygnus configure options, so we can diagnose typos.
+
+  case $ac_option in
+
+  -bindir | --bindir | --bindi | --bind | --bin | --bi)
+    ac_prev=bindir ;;
+  -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
+    bindir=$ac_optarg ;;
+
+  -build | --build | --buil | --bui | --bu)
+    ac_prev=build_alias ;;
+  -build=* | --build=* | --buil=* | --bui=* | --bu=*)
+    build_alias=$ac_optarg ;;
+
+  -cache-file | --cache-file | --cache-fil | --cache-fi \
+  | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
+    ac_prev=cache_file ;;
+  -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
+  | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
+    cache_file=$ac_optarg ;;
+
+  --config-cache | -C)
+    cache_file=config.cache ;;
+
+  -datadir | --datadir | --datadi | --datad | --data | --dat | --da)
+    ac_prev=datadir ;;
+  -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \
+  | --da=*)
+    datadir=$ac_optarg ;;
+
+  -disable-* | --disable-*)
+    ac_feature=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
+    # Reject names that are not valid shell variable names.
+    expr "x$ac_feature" : ".*[^-_$as_cr_alnum]" >/dev/null &&
+      { echo "$as_me: error: invalid feature name: $ac_feature" >&2
+   { (exit 1); exit 1; }; }
+    ac_feature=`echo $ac_feature | sed 's/-/_/g'`
+    eval "enable_$ac_feature=no" ;;
+
+  -enable-* | --enable-*)
+    ac_feature=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
+    # Reject names that are not valid shell variable names.
+    expr "x$ac_feature" : ".*[^-_$as_cr_alnum]" >/dev/null &&
+      { echo "$as_me: error: invalid feature name: $ac_feature" >&2
+   { (exit 1); exit 1; }; }
+    ac_feature=`echo $ac_feature | sed 's/-/_/g'`
+    case $ac_option in
+      *=*) ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`;;
+      *) ac_optarg=yes ;;
+    esac
+    eval "enable_$ac_feature='$ac_optarg'" ;;
+
+  -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
+  | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
+  | --exec | --exe | --ex)
+    ac_prev=exec_prefix ;;
+  -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
+  | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
+  | --exec=* | --exe=* | --ex=*)
+    exec_prefix=$ac_optarg ;;
+
+  -gas | --gas | --ga | --g)
+    # Obsolete; use --with-gas.
+    with_gas=yes ;;
+
+  -help | --help | --hel | --he | -h)
+    ac_init_help=long ;;
+  -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
+    ac_init_help=recursive ;;
+  -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
+    ac_init_help=short ;;
+
+  -host | --host | --hos | --ho)
+    ac_prev=host_alias ;;
+  -host=* | --host=* | --hos=* | --ho=*)
+    host_alias=$ac_optarg ;;
+
+  -includedir | --includedir | --includedi | --included | --include \
+  | --includ | --inclu | --incl | --inc)
+    ac_prev=includedir ;;
+  -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
+  | --includ=* | --inclu=* | --incl=* | --inc=*)
+    includedir=$ac_optarg ;;
+
+  -infodir | --infodir | --infodi | --infod | --info | --inf)
+    ac_prev=infodir ;;
+  -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
+    infodir=$ac_optarg ;;
+
+  -libdir | --libdir | --libdi | --libd)
+    ac_prev=libdir ;;
+  -libdir=* | --libdir=* | --libdi=* | --libd=*)
+    libdir=$ac_optarg ;;
+
+  -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
+  | --libexe | --libex | --libe)
+    ac_prev=libexecdir ;;
+  -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
+  | --libexe=* | --libex=* | --libe=*)
+    libexecdir=$ac_optarg ;;
+
+  -localstatedir | --localstatedir | --localstatedi | --localstated \
+  | --localstate | --localstat | --localsta | --localst \
+  | --locals | --local | --loca | --loc | --lo)
+    ac_prev=localstatedir ;;
+  -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
+  | --localstate=* | --localstat=* | --localsta=* | --localst=* \
+  | --locals=* | --local=* | --loca=* | --loc=* | --lo=*)
+    localstatedir=$ac_optarg ;;
+
+  -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
+    ac_prev=mandir ;;
+  -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
+    mandir=$ac_optarg ;;
+
+  -nfp | --nfp | --nf)
+    # Obsolete; use --without-fp.
+    with_fp=no ;;
+
+  -no-create | --no-create | --no-creat | --no-crea | --no-cre \
+  | --no-cr | --no-c | -n)
+    no_create=yes ;;
+
+  -no-recursion | --no-recursion | --no-recursio | --no-recursi \
+  | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
+    no_recursion=yes ;;
+
+  -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
+  | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
+  | --oldin | --oldi | --old | --ol | --o)
+    ac_prev=oldincludedir ;;
+  -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
+  | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
+  | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
+    oldincludedir=$ac_optarg ;;
+
+  -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
+    ac_prev=prefix ;;
+  -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
+    prefix=$ac_optarg ;;
+
+  -program-prefix | --program-prefix | --program-prefi | --program-pref \
+  | --program-pre | --program-pr | --program-p)
+    ac_prev=program_prefix ;;
+  -program-prefix=* | --program-prefix=* | --program-prefi=* \
+  | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
+    program_prefix=$ac_optarg ;;
+
+  -program-suffix | --program-suffix | --program-suffi | --program-suff \
+  | --program-suf | --program-su | --program-s)
+    ac_prev=program_suffix ;;
+  -program-suffix=* | --program-suffix=* | --program-suffi=* \
+  | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
+    program_suffix=$ac_optarg ;;
+
+  -program-transform-name | --program-transform-name \
+  | --program-transform-nam | --program-transform-na \
+  | --program-transform-n | --program-transform- \
+  | --program-transform | --program-transfor \
+  | --program-transfo | --program-transf \
+  | --program-trans | --program-tran \
+  | --progr-tra | --program-tr | --program-t)
+    ac_prev=program_transform_name ;;
+  -program-transform-name=* | --program-transform-name=* \
+  | --program-transform-nam=* | --program-transform-na=* \
+  | --program-transform-n=* | --program-transform-=* \
+  | --program-transform=* | --program-transfor=* \
+  | --program-transfo=* | --program-transf=* \
+  | --program-trans=* | --program-tran=* \
+  | --progr-tra=* | --program-tr=* | --program-t=*)
+    program_transform_name=$ac_optarg ;;
+
+  -q | -quiet | --quiet | --quie | --qui | --qu | --q \
+  | -silent | --silent | --silen | --sile | --sil)
+    silent=yes ;;
+
+  -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
+    ac_prev=sbindir ;;
+  -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
+  | --sbi=* | --sb=*)
+    sbindir=$ac_optarg ;;
+
+  -sharedstatedir | --sharedstatedir | --sharedstatedi \
+  | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
+  | --sharedst | --shareds | --shared | --share | --shar \
+  | --sha | --sh)
+    ac_prev=sharedstatedir ;;
+  -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
+  | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
+  | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
+  | --sha=* | --sh=*)
+    sharedstatedir=$ac_optarg ;;
+
+  -site | --site | --sit)
+    ac_prev=site ;;
+  -site=* | --site=* | --sit=*)
+    site=$ac_optarg ;;
+
+  -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
+    ac_prev=srcdir ;;
+  -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
+    srcdir=$ac_optarg ;;
+
+  -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
+  | --syscon | --sysco | --sysc | --sys | --sy)
+    ac_prev=sysconfdir ;;
+  -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
+  | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
+    sysconfdir=$ac_optarg ;;
+
+  -target | --target | --targe | --targ | --tar | --ta | --t)
+    ac_prev=target_alias ;;
+  -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
+    target_alias=$ac_optarg ;;
+
+  -v | -verbose | --verbose | --verbos | --verbo | --verb)
+    verbose=yes ;;
+
+  -version | --version | --versio | --versi | --vers | -V)
+    ac_init_version=: ;;
+
+  -with-* | --with-*)
+    ac_package=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
+    # Reject names that are not valid shell variable names.
+    expr "x$ac_package" : ".*[^-_$as_cr_alnum]" >/dev/null &&
+      { echo "$as_me: error: invalid package name: $ac_package" >&2
+   { (exit 1); exit 1; }; }
+    ac_package=`echo $ac_package| sed 's/-/_/g'`
+    case $ac_option in
+      *=*) ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`;;
+      *) ac_optarg=yes ;;
+    esac
+    eval "with_$ac_package='$ac_optarg'" ;;
+
+  -without-* | --without-*)
+    ac_package=`expr "x$ac_option" : 'x-*without-\(.*\)'`
+    # Reject names that are not valid shell variable names.
+    expr "x$ac_package" : ".*[^-_$as_cr_alnum]" >/dev/null &&
+      { echo "$as_me: error: invalid package name: $ac_package" >&2
+   { (exit 1); exit 1; }; }
+    ac_package=`echo $ac_package | sed 's/-/_/g'`
+    eval "with_$ac_package=no" ;;
+
+  --x)
+    # Obsolete; use --with-x.
+    with_x=yes ;;
+
+  -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
+  | --x-incl | --x-inc | --x-in | --x-i)
+    ac_prev=x_includes ;;
+  -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
+  | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
+    x_includes=$ac_optarg ;;
+
+  -x-libraries | --x-libraries | --x-librarie | --x-librari \
+  | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
+    ac_prev=x_libraries ;;
+  -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
+  | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
+    x_libraries=$ac_optarg ;;
+
+  -*) { echo "$as_me: error: unrecognized option: $ac_option
+Try \`$0 --help' for more information." >&2
+   { (exit 1); exit 1; }; }
+    ;;
+
+  *=*)
+    ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
+    # Reject names that are not valid shell variable names.
+    expr "x$ac_envvar" : ".*[^_$as_cr_alnum]" >/dev/null &&
+      { echo "$as_me: error: invalid variable name: $ac_envvar" >&2
+   { (exit 1); exit 1; }; }
+    ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`
+    eval "$ac_envvar='$ac_optarg'"
+    export $ac_envvar ;;
+
+  *)
+    # FIXME: should be removed in autoconf 3.0.
+    echo "$as_me: WARNING: you should use --build, --host, --target" >&2
+    expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
+      echo "$as_me: WARNING: invalid host type: $ac_option" >&2
+    : ${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}
+    ;;
+
+  esac
+done
+
+if test -n "$ac_prev"; then
+  ac_option=--`echo $ac_prev | sed 's/_/-/g'`
+  { echo "$as_me: error: missing argument to $ac_option" >&2
+   { (exit 1); exit 1; }; }
+fi
+
+# Be sure to have absolute paths.
+for ac_var in exec_prefix prefix
+do
+  eval ac_val=$`echo $ac_var`
+  case $ac_val in
+    [\\/$]* | ?:[\\/]* | NONE | '' ) ;;
+    *)  { echo "$as_me: error: expected an absolute directory name for --$ac_var: $ac_val" >&2
+   { (exit 1); exit 1; }; };;
+  esac
+done
+
+# Be sure to have absolute paths.
+for ac_var in bindir sbindir libexecdir datadir sysconfdir sharedstatedir \
+              localstatedir libdir includedir oldincludedir infodir mandir
+do
+  eval ac_val=$`echo $ac_var`
+  case $ac_val in
+    [\\/$]* | ?:[\\/]* ) ;;
+    *)  { echo "$as_me: error: expected an absolute directory name for --$ac_var: $ac_val" >&2
+   { (exit 1); exit 1; }; };;
+  esac
+done
+
+# There might be people who depend on the old broken behavior: `$host'
+# used to hold the argument of --host etc.
+# FIXME: To remove some day.
+build=$build_alias
+host=$host_alias
+target=$target_alias
+
+# FIXME: To remove some day.
+if test "x$host_alias" != x; then
+  if test "x$build_alias" = x; then
+    cross_compiling=maybe
+    echo "$as_me: WARNING: If you wanted to set the --build type, don't use --host.
+    If a cross compiler is detected then cross compile mode will be used." >&2
+  elif test "x$build_alias" != "x$host_alias"; then
+    cross_compiling=yes
+  fi
+fi
+
+ac_tool_prefix=
+test -n "$host_alias" && ac_tool_prefix=$host_alias-
+
+test "$silent" = yes && exec 6>/dev/null
+
+
+# Find the source files, if location was not specified.
+if test -z "$srcdir"; then
+  ac_srcdir_defaulted=yes
+  # Try the directory containing this script, then its parent.
+  ac_confdir=`(dirname "$0") 2>/dev/null ||
+$as_expr X"$0" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
+         X"$0" : 'X\(//\)[^/]' \| \
+         X"$0" : 'X\(//\)$' \| \
+         X"$0" : 'X\(/\)' \| \
+         .     : '\(.\)' 2>/dev/null ||
+echo X"$0" |
+    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
+  	  /^X\(\/\/\)[^/].*/{ s//\1/; q; }
+  	  /^X\(\/\/\)$/{ s//\1/; q; }
+  	  /^X\(\/\).*/{ s//\1/; q; }
+  	  s/.*/./; q'`
+  srcdir=$ac_confdir
+  if test ! -r $srcdir/$ac_unique_file; then
+    srcdir=..
+  fi
+else
+  ac_srcdir_defaulted=no
+fi
+if test ! -r $srcdir/$ac_unique_file; then
+  if test "$ac_srcdir_defaulted" = yes; then
+    { echo "$as_me: error: cannot find sources ($ac_unique_file) in $ac_confdir or .." >&2
+   { (exit 1); exit 1; }; }
+  else
+    { echo "$as_me: error: cannot find sources ($ac_unique_file) in $srcdir" >&2
+   { (exit 1); exit 1; }; }
+  fi
+fi
+(cd $srcdir && test -r ./$ac_unique_file) 2>/dev/null ||
+  { echo "$as_me: error: sources are in $srcdir, but \`cd $srcdir' does not work" >&2
+   { (exit 1); exit 1; }; }
+srcdir=`echo "$srcdir" | sed 's%\([^\\/]\)[\\/]*$%\1%'`
+ac_env_build_alias_set=${build_alias+set}
+ac_env_build_alias_value=$build_alias
+ac_cv_env_build_alias_set=${build_alias+set}
+ac_cv_env_build_alias_value=$build_alias
+ac_env_host_alias_set=${host_alias+set}
+ac_env_host_alias_value=$host_alias
+ac_cv_env_host_alias_set=${host_alias+set}
+ac_cv_env_host_alias_value=$host_alias
+ac_env_target_alias_set=${target_alias+set}
+ac_env_target_alias_value=$target_alias
+ac_cv_env_target_alias_set=${target_alias+set}
+ac_cv_env_target_alias_value=$target_alias
+ac_env_CC_set=${CC+set}
+ac_env_CC_value=$CC
+ac_cv_env_CC_set=${CC+set}
+ac_cv_env_CC_value=$CC
+ac_env_CFLAGS_set=${CFLAGS+set}
+ac_env_CFLAGS_value=$CFLAGS
+ac_cv_env_CFLAGS_set=${CFLAGS+set}
+ac_cv_env_CFLAGS_value=$CFLAGS
+ac_env_LDFLAGS_set=${LDFLAGS+set}
+ac_env_LDFLAGS_value=$LDFLAGS
+ac_cv_env_LDFLAGS_set=${LDFLAGS+set}
+ac_cv_env_LDFLAGS_value=$LDFLAGS
+ac_env_CPPFLAGS_set=${CPPFLAGS+set}
+ac_env_CPPFLAGS_value=$CPPFLAGS
+ac_cv_env_CPPFLAGS_set=${CPPFLAGS+set}
+ac_cv_env_CPPFLAGS_value=$CPPFLAGS
+ac_env_CPP_set=${CPP+set}
+ac_env_CPP_value=$CPP
+ac_cv_env_CPP_set=${CPP+set}
+ac_cv_env_CPP_value=$CPP
+ac_env_CXX_set=${CXX+set}
+ac_env_CXX_value=$CXX
+ac_cv_env_CXX_set=${CXX+set}
+ac_cv_env_CXX_value=$CXX
+ac_env_CXXFLAGS_set=${CXXFLAGS+set}
+ac_env_CXXFLAGS_value=$CXXFLAGS
+ac_cv_env_CXXFLAGS_set=${CXXFLAGS+set}
+ac_cv_env_CXXFLAGS_value=$CXXFLAGS
+ac_env_F77_set=${F77+set}
+ac_env_F77_value=$F77
+ac_cv_env_F77_set=${F77+set}
+ac_cv_env_F77_value=$F77
+ac_env_FFLAGS_set=${FFLAGS+set}
+ac_env_FFLAGS_value=$FFLAGS
+ac_cv_env_FFLAGS_set=${FFLAGS+set}
+ac_cv_env_FFLAGS_value=$FFLAGS
+ac_env_CXXCPP_set=${CXXCPP+set}
+ac_env_CXXCPP_value=$CXXCPP
+ac_cv_env_CXXCPP_set=${CXXCPP+set}
+ac_cv_env_CXXCPP_value=$CXXCPP
+
 #
-config_shell=${CONFIG_SHELL-/bin/sh}
+# Report the --help message.
+#
+if test "$ac_init_help" = "long"; then
+  # Omit some internal or obsolete options to make the list less imposing.
+  # This message is too long to be a string in the A/UX 3.1 sh.
+  cat <<_ACEOF
+\`configure' configures HDF 4.2r1 to adapt to many kinds of systems.
 
-NO_EDIT="This file was generated automatically by configure.  Do not edit."
+Usage: $0 [OPTION]... [VAR=VALUE]...
 
-## this is a little touchy and won't always work, but...
-##
-## if the argv[0] starts with a slash then it is an absolute name that can (and
-## must) be used as is.
-##
-## otherwise, if argv[0] has no slash in it, we can assume that it is on the
-## path.  Since PATH might include "." we also add `pwd` to the end of PATH.
-##
+To assign environment variables (e.g., CC, CFLAGS...), specify them as
+VAR=VALUE.  See below for descriptions of some of the useful variables.
 
-progname=$0
-# if PWD already has a value, it is probably wrong.
-if [ -n "$PWD" ]; then PWD=`pwd`; fi
+Defaults for the options are specified in brackets.
 
-case "${progname}" in
-/*) ;;
-*/*) ;;
-*)
-        PATH=$PATH:${PWD=`pwd`} ; export PATH
-        ;;
+Configuration:
+  -h, --help              display this help and exit
+      --help=short        display options specific to this package
+      --help=recursive    display the short help of all the included packages
+  -V, --version           display version information and exit
+  -q, --quiet, --silent   do not print \`checking...' messages
+      --cache-file=FILE   cache test results in FILE [disabled]
+  -C, --config-cache      alias for \`--cache-file=config.cache'
+  -n, --no-create         do not create output files
+      --srcdir=DIR        find the sources in DIR [configure dir or \`..']
+
+_ACEOF
+
+  cat <<_ACEOF
+Installation directories:
+  --prefix=PREFIX         install architecture-independent files in PREFIX
+                          [$ac_default_prefix]
+  --exec-prefix=EPREFIX   install architecture-dependent files in EPREFIX
+                          [PREFIX]
+
+By default, \`make install' will install all the files in
+\`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc.  You can specify
+an installation prefix other than \`$ac_default_prefix' using \`--prefix',
+for instance \`--prefix=\$HOME'.
+
+For better control, use the options below.
+
+Fine tuning of the installation directories:
+  --bindir=DIR           user executables [EPREFIX/bin]
+  --sbindir=DIR          system admin executables [EPREFIX/sbin]
+  --libexecdir=DIR       program executables [EPREFIX/libexec]
+  --datadir=DIR          read-only architecture-independent data [PREFIX/share]
+  --sysconfdir=DIR       read-only single-machine data [PREFIX/etc]
+  --sharedstatedir=DIR   modifiable architecture-independent data [PREFIX/com]
+  --localstatedir=DIR    modifiable single-machine data [PREFIX/var]
+  --libdir=DIR           object code libraries [EPREFIX/lib]
+  --includedir=DIR       C header files [PREFIX/include]
+  --oldincludedir=DIR    C header files for non-gcc [/usr/include]
+  --infodir=DIR          info documentation [PREFIX/info]
+  --mandir=DIR           man documentation [PREFIX/man]
+_ACEOF
+
+  cat <<\_ACEOF
+
+Program names:
+  --program-prefix=PREFIX            prepend PREFIX to installed program names
+  --program-suffix=SUFFIX            append SUFFIX to installed program names
+  --program-transform-name=PROGRAM   run sed PROGRAM on installed program names
+
+System types:
+  --build=BUILD     configure for building on BUILD [guessed]
+  --host=HOST       cross-compile to build programs to run on HOST [BUILD]
+_ACEOF
+fi
+
+if test -n "$ac_init_help"; then
+  case $ac_init_help in
+     short | recursive ) echo "Configuration of HDF 4.2r1:";;
+   esac
+  cat <<\_ACEOF
+
+Optional Features:
+  --disable-FEATURE       do not include FEATURE (same as --enable-FEATURE=no)
+  --enable-FEATURE[=ARG]  include FEATURE [ARG=yes]
+  --enable-maintainer-mode enable make rules and dependencies not useful
+                          (and sometimes confusing) to the casual installer
+  --disable-dependency-tracking Speeds up one-time builds
+  --enable-dependency-tracking  Do not reject slow dependency extractors
+  --enable-fortran        Build Fortran into library [default=yes]
+  --enable-production     Determines how to run the compiler.
+
+Optional Packages:
+  --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
+  --without-PACKAGE       do not use PACKAGE (same as --with-PACKAGE=no)
+
+ For the following --with-xxx options, you can specify where the header
+ files and libraries are in two different ways:
+
+    --with-xxx=INC,LIB - Specify individually the include directory and
+                         library directory separated by a comma
+    --with-xxx=DIR     - Specify only the directory which contains the
+                         include/ and lib/ subdirectories
+
+  --with-zlib=DIR         Use zlib library [default=yes]
+  --with-jpeg=DIR         Use jpeg library [default=yes]
+  --with-szlib=DIR        Use szlib library [default=no]
+
+Some influential environment variables:
+  CC          C compiler command
+  CFLAGS      C compiler flags
+  LDFLAGS     linker flags, e.g. -L<lib dir> if you have libraries in a
+              nonstandard directory <lib dir>
+  CPPFLAGS    C/C++ preprocessor flags, e.g. -I<include dir> if you have
+              headers in a nonstandard directory <include dir>
+  CPP         C preprocessor
+  CXX         C++ compiler command
+  CXXFLAGS    C++ compiler flags
+  F77         Fortran 77 compiler command
+  FFLAGS      Fortran 77 compiler flags
+  CXXCPP      C++ preprocessor
+
+Use these variables to override the choices made by `configure' or to help
+it to find libraries and programs with nonstandard names/locations.
+
+Report bugs to <hdfhelp at ncsa.uiuc.edu>.
+_ACEOF
+fi
+
+if test "$ac_init_help" = "recursive"; then
+  # If there are subdirs, report their specific --help.
+  ac_popdir=`pwd`
+  for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
+    test -d $ac_dir || continue
+    ac_builddir=.
+
+if test "$ac_dir" != .; then
+  ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'`
+  # A "../" for each directory in $ac_dir_suffix.
+  ac_top_builddir=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,../,g'`
+else
+  ac_dir_suffix= ac_top_builddir=
+fi
+
+case $srcdir in
+  .)  # No --srcdir option.  We are building in place.
+    ac_srcdir=.
+    if test -z "$ac_top_builddir"; then
+       ac_top_srcdir=.
+    else
+       ac_top_srcdir=`echo $ac_top_builddir | sed 's,/$,,'`
+    fi ;;
+  [\\/]* | ?:[\\/]* )  # Absolute path.
+    ac_srcdir=$srcdir$ac_dir_suffix;
+    ac_top_srcdir=$srcdir ;;
+  *) # Relative path.
+    ac_srcdir=$ac_top_builddir$srcdir$ac_dir_suffix
+    ac_top_srcdir=$ac_top_builddir$srcdir ;;
 esac
+# Don't blindly perform a `cd "$ac_dir"/$ac_foo && pwd` since $ac_foo can be
+# absolute.
+ac_abs_builddir=`cd "$ac_dir" && cd $ac_builddir && pwd`
+ac_abs_top_builddir=`cd "$ac_dir" && cd ${ac_top_builddir}. && pwd`
+ac_abs_srcdir=`cd "$ac_dir" && cd $ac_srcdir && pwd`
+ac_abs_top_srcdir=`cd "$ac_dir" && cd $ac_top_srcdir && pwd`
 
-# Loop over all args
+    cd $ac_dir
+    # Check for guested configure; otherwise get Cygnus style configure.
+    if test -f $ac_srcdir/configure.gnu; then
+      echo
+      $SHELL $ac_srcdir/configure.gnu  --help=recursive
+    elif test -f $ac_srcdir/configure; then
+      echo
+      $SHELL $ac_srcdir/configure  --help=recursive
+    elif test -f $ac_srcdir/configure.ac ||
+           test -f $ac_srcdir/configure.in; then
+      echo
+      $ac_configure --help
+    else
+      echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
+    fi
+    cd $ac_popdir
+  done
+fi
 
-#while :
-for arg
+test -n "$ac_init_help" && exit 0
+if $ac_init_version; then
+  cat <<\_ACEOF
+HDF configure 4.2r1
+generated by GNU Autoconf 2.57
+
+Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, 2002
+Free Software Foundation, Inc.
+This configure script is free software; the Free Software Foundation
+gives unlimited permission to copy, distribute and modify it.
+_ACEOF
+  exit 0
+fi
+exec 5>config.log
+cat >&5 <<_ACEOF
+This file contains any messages produced by compilers while
+running configure, to aid debugging if configure makes a mistake.
+
+It was created by HDF $as_me 4.2r1, which was
+generated by GNU Autoconf 2.57.  Invocation command line was
+
+  $ $0 $@
+
+_ACEOF
+{
+cat <<_ASUNAME
+## --------- ##
+## Platform. ##
+## --------- ##
+
+hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
+uname -m = `(uname -m) 2>/dev/null || echo unknown`
+uname -r = `(uname -r) 2>/dev/null || echo unknown`
+uname -s = `(uname -s) 2>/dev/null || echo unknown`
+uname -v = `(uname -v) 2>/dev/null || echo unknown`
+
+/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
+/bin/uname -X     = `(/bin/uname -X) 2>/dev/null     || echo unknown`
+
+/bin/arch              = `(/bin/arch) 2>/dev/null              || echo unknown`
+/usr/bin/arch -k       = `(/usr/bin/arch -k) 2>/dev/null       || echo unknown`
+/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
+hostinfo               = `(hostinfo) 2>/dev/null               || echo unknown`
+/bin/machine           = `(/bin/machine) 2>/dev/null           || echo unknown`
+/usr/bin/oslevel       = `(/usr/bin/oslevel) 2>/dev/null       || echo unknown`
+/bin/universe          = `(/bin/universe) 2>/dev/null          || echo unknown`
+
+_ASUNAME
+
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
 do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+  echo "PATH: $as_dir"
+done
 
-# Break out if there are no more args
-	case $# in
-	0)
-		break
-		;;
-	esac
+} >&5
 
-# Get the first arg, and shuffle
-	option=$1
-	shift
+cat >&5 <<_ACEOF
 
-# Make all options have two hyphens
-	orig_option=$option	# Save original for error messages
-	case $option in
-	--*) ;;
-	-*) option=-$option ;;
-	esac
-		
-# Split out the argument for options that take them
-	case $option in
-	--*=*)
-		optarg=`echo $option | sed -e 's/^[^=]*=//'`
-		;;
-# These options have mandatory values.  Since we didn't find an = sign,
-# the value must be in the next argument
-	--b* | --cache* | --ex* | --ho* | --pre* | --program-p* | --program-s* | --program-t* | --si* | --sr* | --ta* | --tm* | --x-*)
-		optarg=$1
-		shift
-		;;
-	esac
 
-# Now, process the options
-	case $option in
+## ----------- ##
+## Core tests. ##
+## ----------- ##
 
-	--build* | --b*)
-		case "$build_alias" in
-		"") build_alias=$optarg ;;
-		*) echo '***' Can only configure for one build machine at a time.  1>&2
-		   fatal=yes
-		   ;;
-		esac
-		;;
-# Accepted for compatibility with new autoconf; ignored.
-	--cache*)
-		;;
-	--disable-*)
-		enableopt=`echo ${option} | sed 's:^--disable-:enable_:;s:-:_:g'`
-		eval $enableopt=no
-		disableoptions="$disableoptions $option"
-		;;
-	--enable-*)
-		case "$option" in
-		*=*)	;;
-		*)	optarg=yes ;;
-		esac
+_ACEOF
 
-		enableopt=`echo ${option} | sed 's:^--::;s:=.*$::;s:-:_:g'`
-		eval $enableopt="$optarg"
-		enableoptions="$enableoptions $option"
-		;;
-	--exec-prefix* | --ex*)
-		exec_prefix=$optarg
-		exec_prefixoption="--exec-prefix=$optarg"
-		;;
-	--gas | --g*)
-		gas=yes
-		;;
-	--help | --he*)
-		fatal=yes
-		;;
-	--host* | --ho*)
-		case $host_alias in
-		NOHOST) host_alias=$optarg ;;
-		*) echo '***' Can only configure for one host at a time.  1>&2
-		   fatal=yes
-		   ;;
-		esac
-		;;
-	--nfp | --nf*)
-		floating_point=no
-		;;
-	--norecursion | --no*)
-		norecursion=yes
-		;;
-	--prefix* | --pre*)
-		prefix=$optarg
-		prefixoption="--prefix=$optarg"
-		;;
-	--program-prefix* | --program-p*)
-		program_prefix=$optarg
-		program_prefixoption="--program-prefix=$optarg"
-		;;
-	--program-suffix* | --program-s*)
-		program_suffix=$optarg
-		program_suffixoption="--program-suffix=$optarg"
-		;;
-	--program-transform-name* | --program-t*)
-		# Double any backslashes or dollar signs in the argument
-		program_transform_name="${program_transform_name} -e `echo ${optarg} | sed -e 's/\\\\/\\\\\\\\/g' -e 's/\\\$/$$/g'`"
-		program_transform_nameoption="${program_transform_nameoption} --program-transform-name='$optarg'"
-		;;
-	--rm)
-		removing=--rm
-		;;
-	--silent | --sil* | --quiet | --q*)
-		redirect=">/dev/null"
-		verbose=--silent
-		;;
-	--site* | --sit*)
-		site=$optarg
-		site_option="--site=$optarg"
-		;;
-	--srcdir*/ | --sr*/)
-                # Remove trailing slashes.  Otherwise, when the file name gets
-                # bolted into an object file as debug info, it has two slashes
-                # in it.  Ordinarily this is ok, but emacs takes double slash
-                # to mean "forget the first part".
-		srcdir=`echo $optarg | sed -e 's:/$::'`
-		;;
-	--srcdir* | --sr*)
-		srcdir=$optarg
-		;;
-	--target* | --ta*)
-		case $target_alias in
-		NOTARGET) target_alias=$optarg ;;
-		*) echo '***' Can only configure for one target at a time.  1>&2
-		   fatal=yes
-		   ;;
-		esac
-		;;
-	--tmpdir* | --tm*)
-		TMPDIR=$optarg
-		tmpdiroption="--tmpdir=$optarg"
-		;;
-	--verbose | --v | --verb*)
-		redirect=
-		verbose=--verbose
-		;;
-	--version | --V | --vers*)
-		echo "This is Cygnus Configure version" `echo ${version} | sed 's/[ $:]//g'`
-		exit 0
-		;;
-	--with-*)
-		case "$option" in
-		*=*)	;;
-		*)	optarg=yes ;;
-		esac
 
-		withopt=`echo ${option} | sed 's:^--::;s:=.*$::;s:-:_:g'`
-		eval $withopt="$optarg"
-		withoptions="$withoptions $option"
-		;;
-	--without-*)
-		withopt=`echo ${option} | sed 's:^--::;s:out::;s:-:_:g'`
-		eval $withopt=no
-		withoutoptions="$withoutoptions $option"
-		;;
-	--x)	with_x=yes
-		withoptions="$withoptions --with-x"
-		;;
-	--x-i* | --x-l*) other_options="$other_options $orig_option"
-		;;
-	--*)
-		echo "configure: Unrecognized option: \"$orig_option\"; use --help for usage." >&2
-		exit 1
-		;;
-	*)
-		case $undefs in
-		NOUNDEFS) undefs=$option ;;
-		*) echo '***' Can only configure for one host and one target at a time.  1>&2
-		   fatal=yes
-		   ;;
-		esac
-		;;
-	esac
+# Keep a trace of the command line.
+# Strip out --no-create and --no-recursion so they do not pile up.
+# Strip out --silent because we don't want to record it for future runs.
+# Also quote any args containing shell meta-characters.
+# Make two passes to allow for proper duplicate-argument suppression.
+ac_configure_args=
+ac_configure_args0=
+ac_configure_args1=
+ac_sep=
+ac_must_keep_next=false
+for ac_pass in 1 2
+do
+  for ac_arg
+  do
+    case $ac_arg in
+    -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
+    -q | -quiet | --quiet | --quie | --qui | --qu | --q \
+    | -silent | --silent | --silen | --sile | --sil)
+      continue ;;
+    *" "*|*"	"*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*)
+      ac_arg=`echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
+    esac
+    case $ac_pass in
+    1) ac_configure_args0="$ac_configure_args0 '$ac_arg'" ;;
+    2)
+      ac_configure_args1="$ac_configure_args1 '$ac_arg'"
+      if test $ac_must_keep_next = true; then
+        ac_must_keep_next=false # Got value, back to normal.
+      else
+        case $ac_arg in
+          *=* | --config-cache | -C | -disable-* | --disable-* \
+          | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
+          | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
+          | -with-* | --with-* | -without-* | --without-* | --x)
+            case "$ac_configure_args0 " in
+              "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
+            esac
+            ;;
+          -* ) ac_must_keep_next=true ;;
+        esac
+      fi
+      ac_configure_args="$ac_configure_args$ac_sep'$ac_arg'"
+      # Get rid of the leading space.
+      ac_sep=" "
+      ;;
+    esac
+  done
 done
+$as_unset ac_configure_args0 || test "${ac_configure_args0+set}" != set || { ac_configure_args0=; export ac_configure_args0; }
+$as_unset ac_configure_args1 || test "${ac_configure_args1+set}" != set || { ac_configure_args1=; export ac_configure_args1; }
 
-# process host and target
+# When interrupted or exit'd, cleanup temporary files, and complete
+# config.log.  We remove comments because anyway the quotes in there
+# would cause problems or look ugly.
+# WARNING: Be sure not to use single quotes in there, as some shells,
+# such as our DU 5.0 friend, will then `close' the trap.
+trap 'exit_status=$?
+  # Save into config.log some information that might help in debugging.
+  {
+    echo
 
-# Do some error checking and defaulting for the host and target type.
-# The inputs are:
-#    configure --host=HOST --target=TARGET UNDEFS
-#
-# The rules are:
-# 1. You aren't allowed to specify --host, --target, and undefs at the
-#    same time.
-# 2. Host defaults to undefs.
-# 3. If undefs is not specified, then host defaults to the current host,
-#    as determined by config.guess.
-# 4. Target defaults to undefs.
-# 5. If undefs is not specified, then target defaults to host.
+    cat <<\_ASBOX
+## ---------------- ##
+## Cache variables. ##
+## ---------------- ##
+_ASBOX
+    echo
+    # The following way of writing the cache mishandles newlines in values,
+{
+  (set) 2>&1 |
+    case `(ac_space='"'"' '"'"'; set | grep ac_space) 2>&1` in
+    *ac_space=\ *)
+      sed -n \
+        "s/'"'"'/'"'"'\\\\'"'"''"'"'/g;
+    	  s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='"'"'\\2'"'"'/p"
+      ;;
+    *)
+      sed -n \
+        "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p"
+      ;;
+    esac;
+}
+    echo
 
-case "${fatal}" in
-"")
-	# Make sure that host, target & undefs aren't all specified at the
-	# same time.
-	case $host_alias---$target_alias---$undefs in
-	NOHOST---*---* | *---NOTARGET---* | *---*---NOUNDEFS)
-		;;
-	*) echo '***' Can only configure for one host and one target at a time.  1>&2
-	   fatal=yes
-	   break 2
-		;;
-	esac
+    cat <<\_ASBOX
+## ----------------- ##
+## Output variables. ##
+## ----------------- ##
+_ASBOX
+    echo
+    for ac_var in $ac_subst_vars
+    do
+      eval ac_val=$`echo $ac_var`
+      echo "$ac_var='"'"'$ac_val'"'"'"
+    done | sort
+    echo
 
-	# Now, do defaulting for host.
-	case $host_alias in
-	NOHOST)
-		case $undefs in
-		NOUNDEFS)
-			# Neither --host option nor undefs were present.
-			# Call config.guess.
-			guesssys=`echo ${progname} | sed 's/configure$/config.guess/'`
-			if host_alias=`${guesssys}`
-			then
-				# If the string we are going to use for
-				# the target is a prefix of the string
-				# we just guessed for the host, then
-				# assume we are running native, and force
-				# the same string for both target and host.
-				case $target_alias in
-				NOTARGET) ;;
-				*)
-					if expr $host_alias : $target_alias >/dev/null
-					then
-						host_alias=$target_alias
-					fi
-					;;
-				esac
-				echo "Configuring for a ${host_alias} host." 1>&2
-				arguments="--host=$host_alias $arguments"
-			else
-				echo 'Config.guess failed to determine the host type.  You need to specify one.' 1>&2
-				fatal=yes
-			fi
-			;;
-		*)
-			host_alias=$undefs
-			;;
-		esac
-	esac
+    if test -n "$ac_subst_files"; then
+      cat <<\_ASBOX
+## ------------- ##
+## Output files. ##
+## ------------- ##
+_ASBOX
+      echo
+      for ac_var in $ac_subst_files
+      do
+	eval ac_val=$`echo $ac_var`
+        echo "$ac_var='"'"'$ac_val'"'"'"
+      done | sort
+      echo
+    fi
 
-	# Do defaulting for target.  If --target option isn't present, default
-	# to undefs.  If undefs isn't present, default to host.
-	case $target_alias in
-	NOTARGET)
-		case $undefs in
-		NOUNDEFS)
-			target_alias=$host_alias
-			;;
-		*)
-			target_alias=$undefs
-			;;
-		esac
-	esac
-	;;
-*) ;;
+    if test -s confdefs.h; then
+      cat <<\_ASBOX
+## ----------- ##
+## confdefs.h. ##
+## ----------- ##
+_ASBOX
+      echo
+      sed "/^$/d" confdefs.h | sort
+      echo
+    fi
+    test "$ac_signal" != 0 &&
+      echo "$as_me: caught signal $ac_signal"
+    echo "$as_me: exit $exit_status"
+  } >&5
+  rm -f core core.* *.core &&
+  rm -rf conftest* confdefs* conf$$* $ac_clean_files &&
+    exit $exit_status
+     ' 0
+for ac_signal in 1 2 13 15; do
+  trap 'ac_signal='$ac_signal'; { (exit 1); exit 1; }' $ac_signal
+done
+ac_signal=0
+
+# confdefs.h avoids OS command line length limits that DEFS can exceed.
+rm -rf conftest* confdefs.h
+# AIX cpp loses on an empty file, so make sure it contains at least a newline.
+echo >confdefs.h
+
+# Predefined preprocessor variables.
+
+cat >>confdefs.h <<_ACEOF
+#define PACKAGE_NAME "$PACKAGE_NAME"
+_ACEOF
+
+
+cat >>confdefs.h <<_ACEOF
+#define PACKAGE_TARNAME "$PACKAGE_TARNAME"
+_ACEOF
+
+
+cat >>confdefs.h <<_ACEOF
+#define PACKAGE_VERSION "$PACKAGE_VERSION"
+_ACEOF
+
+
+cat >>confdefs.h <<_ACEOF
+#define PACKAGE_STRING "$PACKAGE_STRING"
+_ACEOF
+
+
+cat >>confdefs.h <<_ACEOF
+#define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
+_ACEOF
+
+
+# Let the site file select an alternate cache file if it wants to.
+# Prefer explicitly selected file to automatically selected ones.
+if test -z "$CONFIG_SITE"; then
+  if test "x$prefix" != xNONE; then
+    CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
+  else
+    CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
+  fi
+fi
+for ac_site_file in $CONFIG_SITE; do
+  if test -r "$ac_site_file"; then
+    { echo "$as_me:$LINENO: loading site script $ac_site_file" >&5
+echo "$as_me: loading site script $ac_site_file" >&6;}
+    sed 's/^/| /' "$ac_site_file" >&5
+    . "$ac_site_file"
+  fi
+done
+
+if test -r "$cache_file"; then
+  # Some versions of bash will fail to source /dev/null (special
+  # files actually), so we avoid doing that.
+  if test -f "$cache_file"; then
+    { echo "$as_me:$LINENO: loading cache $cache_file" >&5
+echo "$as_me: loading cache $cache_file" >&6;}
+    case $cache_file in
+      [\\/]* | ?:[\\/]* ) . $cache_file;;
+      *)                      . ./$cache_file;;
+    esac
+  fi
+else
+  { echo "$as_me:$LINENO: creating cache $cache_file" >&5
+echo "$as_me: creating cache $cache_file" >&6;}
+  >$cache_file
+fi
+
+# Check that the precious variables saved in the cache have kept the same
+# value.
+ac_cache_corrupted=false
+for ac_var in `(set) 2>&1 |
+               sed -n 's/^ac_env_\([a-zA-Z_0-9]*\)_set=.*/\1/p'`; do
+  eval ac_old_set=\$ac_cv_env_${ac_var}_set
+  eval ac_new_set=\$ac_env_${ac_var}_set
+  eval ac_old_val="\$ac_cv_env_${ac_var}_value"
+  eval ac_new_val="\$ac_env_${ac_var}_value"
+  case $ac_old_set,$ac_new_set in
+    set,)
+      { echo "$as_me:$LINENO: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
+echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
+      ac_cache_corrupted=: ;;
+    ,set)
+      { echo "$as_me:$LINENO: error: \`$ac_var' was not set in the previous run" >&5
+echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
+      ac_cache_corrupted=: ;;
+    ,);;
+    *)
+      if test "x$ac_old_val" != "x$ac_new_val"; then
+        { echo "$as_me:$LINENO: error: \`$ac_var' has changed since the previous run:" >&5
+echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
+        { echo "$as_me:$LINENO:   former value:  $ac_old_val" >&5
+echo "$as_me:   former value:  $ac_old_val" >&2;}
+        { echo "$as_me:$LINENO:   current value: $ac_new_val" >&5
+echo "$as_me:   current value: $ac_new_val" >&2;}
+        ac_cache_corrupted=:
+      fi;;
+  esac
+  # Pass precious variables to config.status.
+  if test "$ac_new_set" = set; then
+    case $ac_new_val in
+    *" "*|*"	"*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*)
+      ac_arg=$ac_var=`echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
+    *) ac_arg=$ac_var=$ac_new_val ;;
+    esac
+    case " $ac_configure_args " in
+      *" '$ac_arg' "*) ;; # Avoid dups.  Use of quotes ensures accuracy.
+      *) ac_configure_args="$ac_configure_args '$ac_arg'" ;;
+    esac
+  fi
+done
+if $ac_cache_corrupted; then
+  { echo "$as_me:$LINENO: error: changes in the environment can compromise the build" >&5
+echo "$as_me: error: changes in the environment can compromise the build" >&2;}
+  { { echo "$as_me:$LINENO: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&5
+echo "$as_me: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&2;}
+   { (exit 1); exit 1; }; }
+fi
+
+ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ac_aux_dir=
+for ac_dir in bin $srcdir/bin; do
+  if test -f $ac_dir/install-sh; then
+    ac_aux_dir=$ac_dir
+    ac_install_sh="$ac_aux_dir/install-sh -c"
+    break
+  elif test -f $ac_dir/install.sh; then
+    ac_aux_dir=$ac_dir
+    ac_install_sh="$ac_aux_dir/install.sh -c"
+    break
+  elif test -f $ac_dir/shtool; then
+    ac_aux_dir=$ac_dir
+    ac_install_sh="$ac_aux_dir/shtool install -c"
+    break
+  fi
+done
+if test -z "$ac_aux_dir"; then
+  { { echo "$as_me:$LINENO: error: cannot find install-sh or install.sh in bin $srcdir/bin" >&5
+echo "$as_me: error: cannot find install-sh or install.sh in bin $srcdir/bin" >&2;}
+   { (exit 1); exit 1; }; }
+fi
+ac_config_guess="$SHELL $ac_aux_dir/config.guess"
+ac_config_sub="$SHELL $ac_aux_dir/config.sub"
+ac_configure="$SHELL $ac_aux_dir/configure" # This should be Cygnus configure.
+
+          ac_config_headers="$ac_config_headers hdf/src/h4config.h"
+
+
+am__api_version="1.7"
+# Find a good install program.  We prefer a C program (faster),
+# so one script is as good as another.  But avoid the broken or
+# incompatible versions:
+# SysV /etc/install, /usr/sbin/install
+# SunOS /usr/etc/install
+# IRIX /sbin/install
+# AIX /bin/install
+# AmigaOS /C/install, which installs bootblocks on floppy discs
+# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
+# AFS /usr/afsws/bin/install, which mishandles nonexistent args
+# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
+# ./install, which can be erroneously created by make from ./install.sh.
+echo "$as_me:$LINENO: checking for a BSD-compatible install" >&5
+echo $ECHO_N "checking for a BSD-compatible install... $ECHO_C" >&6
+if test -z "$INSTALL"; then
+if test "${ac_cv_path_install+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+  # Account for people who put trailing slashes in PATH elements.
+case $as_dir/ in
+  ./ | .// | /cC/* | \
+  /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \
+  /usr/ucb/* ) ;;
+  *)
+    # OSF1 and SCO ODT 3.0 have their own names for install.
+    # Don't use installbsd from OSF since it installs stuff as root
+    # by default.
+    for ac_prog in ginstall scoinst install; do
+      for ac_exec_ext in '' $ac_executable_extensions; do
+        if $as_executable_p "$as_dir/$ac_prog$ac_exec_ext"; then
+          if test $ac_prog = install &&
+            grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
+            # AIX install.  It has an incompatible calling convention.
+            :
+          elif test $ac_prog = install &&
+            grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
+            # program-specific install script used by HP pwplus--don't use.
+            :
+          else
+            ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c"
+            break 3
+          fi
+        fi
+      done
+    done
+    ;;
 esac
+done
 
-if [ -n "${fatal}" -o "${host_alias}" = "help" ] ; then
-	exec 1>&2
-	echo Usage: configure [OPTIONS] [HOST]
-	echo
-	echo Options: [defaults in brackets]
-	echo ' --prefix=MYDIR		 install into MYDIR [/usr/local]'
-	echo ' --exec-prefix=MYDIR	 install host-dependent files into MYDIR [/usr/local]'
-	echo ' --help			 print this message [normal config]'
-	echo ' --build=BUILD		 configure for building on BUILD [BUILD=HOST]'
-	echo ' --host=HOST		 configure for HOST [determined via config.guess]'
-	echo ' --norecursion		 configure this directory only [recurse]'
-	echo ' --program-prefix=FOO	 prepend FOO to installed program names [""]'
-	echo ' --program-suffix=FOO	 append FOO to installed program names [""]'
-	echo ' --program-transform-name=P transform installed names by sed pattern P [""]'
-	echo ' --site=SITE		 configure with site-specific makefile for SITE'
-	echo ' --srcdir=DIR		 find the sources in DIR [. or ..]'
-	echo ' --target=TARGET	 configure for TARGET [TARGET=HOST]'
-	echo ' --tmpdir=TMPDIR	 create temporary files in TMPDIR [/tmp]'
-	echo ' --nfp			 configure for software floating point [hard float]'
-	echo ' --with-FOO, --with-FOO=BAR package FOO is available (parameter BAR)'
-	echo ' --without-FOO		 package FOO is NOT available'
-	echo ' --enable-FOO, --enable-FOO=BAR include feature FOO (parameter BAR)'
-	echo ' --disable-FOO		 do not include feature FOO'
-	echo
-	echo 'Where HOST and TARGET are something like "sparc-sunos", "mips-sgi-irix5", etc.'
-	echo
-	if [ -r config.status ] ; then
-		cat config.status
-	fi
 
-	exit 1
 fi
+  if test "${ac_cv_path_install+set}" = set; then
+    INSTALL=$ac_cv_path_install
+  else
+    # As a last resort, use the slow shell script.  We don't cache a
+    # path for INSTALL within a source directory, because that will
+    # break other packages using the cache if that directory is
+    # removed, or if the path is relative.
+    INSTALL=$ac_install_sh
+  fi
+fi
+echo "$as_me:$LINENO: result: $INSTALL" >&5
+echo "${ECHO_T}$INSTALL" >&6
 
-configsub=`echo ${progname} | sed 's/configure$/config.sub/'`
-moveifchange=`echo ${progname} | sed 's/configure$/move-if-change/'`
+# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
+# It thinks the first close brace ends the variable substitution.
+test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
 
-# this is a hack.  sun4 must always be a valid host alias or this will fail.
-if ${configsub} sun4 >/dev/null 2>&1 ; then
-        true
+test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
+
+test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
+
+echo "$as_me:$LINENO: checking whether build environment is sane" >&5
+echo $ECHO_N "checking whether build environment is sane... $ECHO_C" >&6
+# Just in case
+sleep 1
+echo timestamp > conftest.file
+# Do `set' in a subshell so we don't clobber the current shell's
+# arguments.  Must try -L first in case configure is actually a
+# symlink; some systems play weird games with the mod time of symlinks
+# (eg FreeBSD returns the mod time of the symlink's containing
+# directory).
+if (
+   set X `ls -Lt $srcdir/configure conftest.file 2> /dev/null`
+   if test "$*" = "X"; then
+      # -L didn't work.
+      set X `ls -t $srcdir/configure conftest.file`
+   fi
+   rm -f conftest.file
+   if test "$*" != "X $srcdir/configure conftest.file" \
+      && test "$*" != "X conftest.file $srcdir/configure"; then
+
+      # If neither matched, then we have a broken ls.  This can happen
+      # if, for instance, CONFIG_SHELL is bash and it inherits a
+      # broken ls alias from the environment.  This has actually
+      # happened.  Such a system could not be considered "sane".
+      { { echo "$as_me:$LINENO: error: ls -t appears to fail.  Make sure there is not a broken
+alias in your environment" >&5
+echo "$as_me: error: ls -t appears to fail.  Make sure there is not a broken
+alias in your environment" >&2;}
+   { (exit 1); exit 1; }; }
+   fi
+
+   test "$2" = conftest.file
+   )
+then
+   # Ok.
+   :
 else
-        echo '***' cannot find config.sub.  1>&2
-        exit 1
+   { { echo "$as_me:$LINENO: error: newly created file is older than distributed files!
+Check your system clock" >&5
+echo "$as_me: error: newly created file is older than distributed files!
+Check your system clock" >&2;}
+   { (exit 1); exit 1; }; }
 fi
+echo "$as_me:$LINENO: result: yes" >&5
+echo "${ECHO_T}yes" >&6
+test "$program_prefix" != NONE &&
+  program_transform_name="s,^,$program_prefix,;$program_transform_name"
+# Use a double $ so make ignores it.
+test "$program_suffix" != NONE &&
+  program_transform_name="s,\$,$program_suffix,;$program_transform_name"
+# Double any \ or $.  echo might interpret backslashes.
+# By default was `s,x,x', remove it if useless.
+cat <<\_ACEOF >conftest.sed
+s/[\\$]/&&/g;s/;s,x,x,$//
+_ACEOF
+program_transform_name=`echo $program_transform_name | sed -f conftest.sed`
+rm conftest.sed
 
-touch config.junk
-if ${moveifchange} config.junk config.trash ; then
-        true
+
+# expand $ac_aux_dir to an absolute path
+am_aux_dir=`cd $ac_aux_dir && pwd`
+
+test x"${MISSING+set}" = xset || MISSING="\${SHELL} $am_aux_dir/missing"
+# Use eval to expand $SHELL
+if eval "$MISSING --run true"; then
+  am_missing_run="$MISSING --run "
 else
-        echo '***' cannot find move-if-change.  1>&2
-        exit 1
+  am_missing_run=
+  { echo "$as_me:$LINENO: WARNING: \`missing' script is too old or missing" >&5
+echo "$as_me: WARNING: \`missing' script is too old or missing" >&2;}
 fi
-rm -f config.junk config.trash
 
-case "${srcdir}" in
-"")
-        if [ -r configure.in ] ; then
-                srcdir=.
-        else
-                if [ -r ${progname}.in ] ; then
-                        srcdir=`echo ${progname} | sed 's:/configure$::'`
-                else
-                        echo '***' "Can't find configure.in.  Try using --srcdir=some_dir"  1>&2
-                        exit 1
-                fi
-        fi
+for ac_prog in gawk mawk nawk awk
+do
+  # Extract the first word of "$ac_prog", so it can be a program name with args.
+set dummy $ac_prog; ac_word=$2
+echo "$as_me:$LINENO: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
+if test "${ac_cv_prog_AWK+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  if test -n "$AWK"; then
+  ac_cv_prog_AWK="$AWK" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+  for ac_exec_ext in '' $ac_executable_extensions; do
+  if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+    ac_cv_prog_AWK="$ac_prog"
+    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+done
+
+fi
+fi
+AWK=$ac_cv_prog_AWK
+if test -n "$AWK"; then
+  echo "$as_me:$LINENO: result: $AWK" >&5
+echo "${ECHO_T}$AWK" >&6
+else
+  echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
+fi
+
+  test -n "$AWK" && break
+done
+
+echo "$as_me:$LINENO: checking whether ${MAKE-make} sets \$(MAKE)" >&5
+echo $ECHO_N "checking whether ${MAKE-make} sets \$(MAKE)... $ECHO_C" >&6
+set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y,./+-,__p_,'`
+if eval "test \"\${ac_cv_prog_make_${ac_make}_set+set}\" = set"; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  cat >conftest.make <<\_ACEOF
+all:
+	@echo 'ac_maketemp="$(MAKE)"'
+_ACEOF
+# GNU make sometimes prints "make[1]: Entering...", which would confuse us.
+eval `${MAKE-make} -f conftest.make 2>/dev/null | grep temp=`
+if test -n "$ac_maketemp"; then
+  eval ac_cv_prog_make_${ac_make}_set=yes
+else
+  eval ac_cv_prog_make_${ac_make}_set=no
+fi
+rm -f conftest.make
+fi
+if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then
+  echo "$as_me:$LINENO: result: yes" >&5
+echo "${ECHO_T}yes" >&6
+  SET_MAKE=
+else
+  echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
+  SET_MAKE="MAKE=${MAKE-make}"
+fi
+
+rm -rf .tst 2>/dev/null
+mkdir .tst 2>/dev/null
+if test -d .tst; then
+  am__leading_dot=.
+else
+  am__leading_dot=_
+fi
+rmdir .tst 2>/dev/null
+
+ # test to see if srcdir already configured
+if test "`cd $srcdir && pwd`" != "`pwd`" &&
+   test -f $srcdir/config.status; then
+  { { echo "$as_me:$LINENO: error: source directory already configured; run \"make distclean\" there first" >&5
+echo "$as_me: error: source directory already configured; run \"make distclean\" there first" >&2;}
+   { (exit 1); exit 1; }; }
+fi
+
+# test whether we have cygpath
+if test -z "$CYGPATH_W"; then
+  if (cygpath --version) >/dev/null 2>/dev/null; then
+    CYGPATH_W='cygpath -w'
+  else
+    CYGPATH_W=echo
+  fi
+fi
+
+
+# Define the identity of the package.
+ PACKAGE=HDF
+ VERSION=4.2r1
+
+
+cat >>confdefs.h <<_ACEOF
+#define PACKAGE "$PACKAGE"
+_ACEOF
+
+
+cat >>confdefs.h <<_ACEOF
+#define VERSION "$VERSION"
+_ACEOF
+
+# Some tools Automake needs.
+
+ACLOCAL=${ACLOCAL-"${am_missing_run}aclocal-${am__api_version}"}
+
+
+AUTOCONF=${AUTOCONF-"${am_missing_run}autoconf"}
+
+
+AUTOMAKE=${AUTOMAKE-"${am_missing_run}automake-${am__api_version}"}
+
+
+AUTOHEADER=${AUTOHEADER-"${am_missing_run}autoheader"}
+
+
+MAKEINFO=${MAKEINFO-"${am_missing_run}makeinfo"}
+
+
+AMTAR=${AMTAR-"${am_missing_run}tar"}
+
+install_sh=${install_sh-"$am_aux_dir/install-sh"}
+
+# Installed binaries are usually stripped using `strip' when the user
+# run `make install-strip'.  However `strip' might not be the right
+# tool to use in cross-compilation environments, therefore Automake
+# will honor the `STRIP' environment variable to overrule this program.
+if test "$cross_compiling" != no; then
+  if test -n "$ac_tool_prefix"; then
+  # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args.
+set dummy ${ac_tool_prefix}strip; ac_word=$2
+echo "$as_me:$LINENO: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
+if test "${ac_cv_prog_STRIP+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  if test -n "$STRIP"; then
+  ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+  for ac_exec_ext in '' $ac_executable_extensions; do
+  if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+    ac_cv_prog_STRIP="${ac_tool_prefix}strip"
+    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+done
+
+fi
+fi
+STRIP=$ac_cv_prog_STRIP
+if test -n "$STRIP"; then
+  echo "$as_me:$LINENO: result: $STRIP" >&5
+echo "${ECHO_T}$STRIP" >&6
+else
+  echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
+fi
+
+fi
+if test -z "$ac_cv_prog_STRIP"; then
+  ac_ct_STRIP=$STRIP
+  # Extract the first word of "strip", so it can be a program name with args.
+set dummy strip; ac_word=$2
+echo "$as_me:$LINENO: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
+if test "${ac_cv_prog_ac_ct_STRIP+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  if test -n "$ac_ct_STRIP"; then
+  ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+  for ac_exec_ext in '' $ac_executable_extensions; do
+  if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+    ac_cv_prog_ac_ct_STRIP="strip"
+    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+done
+
+  test -z "$ac_cv_prog_ac_ct_STRIP" && ac_cv_prog_ac_ct_STRIP=":"
+fi
+fi
+ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP
+if test -n "$ac_ct_STRIP"; then
+  echo "$as_me:$LINENO: result: $ac_ct_STRIP" >&5
+echo "${ECHO_T}$ac_ct_STRIP" >&6
+else
+  echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
+fi
+
+  STRIP=$ac_ct_STRIP
+else
+  STRIP="$ac_cv_prog_STRIP"
+fi
+
+fi
+INSTALL_STRIP_PROGRAM="\${SHELL} \$(install_sh) -c -s"
+
+# We need awk for the "check" target.  The system "awk" is bad on
+# some platforms.
+
+
+
+echo "$as_me:$LINENO: checking whether to enable maintainer-specific portions of Makefiles" >&5
+echo $ECHO_N "checking whether to enable maintainer-specific portions of Makefiles... $ECHO_C" >&6
+    # Check whether --enable-maintainer-mode or --disable-maintainer-mode was given.
+if test "${enable_maintainer_mode+set}" = set; then
+  enableval="$enable_maintainer_mode"
+  USE_MAINTAINER_MODE=$enableval
+else
+  USE_MAINTAINER_MODE=no
+fi;
+  echo "$as_me:$LINENO: result: $USE_MAINTAINER_MODE" >&5
+echo "${ECHO_T}$USE_MAINTAINER_MODE" >&6
+
+
+if test $USE_MAINTAINER_MODE = yes; then
+  MAINTAINER_MODE_TRUE=
+  MAINTAINER_MODE_FALSE='#'
+else
+  MAINTAINER_MODE_TRUE='#'
+  MAINTAINER_MODE_FALSE=
+fi
+
+  MAINT=$MAINTAINER_MODE_TRUE
+
+
+
+
+
+          ac_config_commands="$ac_config_commands default-1"
+
+
+
+echo "$as_me:$LINENO: checking shell variables initial values" >&5
+echo $ECHO_N "checking shell variables initial values... $ECHO_C" >&6
+set >&5
+echo "$as_me:$LINENO: result: done" >&5
+echo "${ECHO_T}done" >&6
+
+# Make sure we can run config.sub.
+$ac_config_sub sun4 >/dev/null 2>&1 ||
+  { { echo "$as_me:$LINENO: error: cannot run $ac_config_sub" >&5
+echo "$as_me: error: cannot run $ac_config_sub" >&2;}
+   { (exit 1); exit 1; }; }
+
+echo "$as_me:$LINENO: checking build system type" >&5
+echo $ECHO_N "checking build system type... $ECHO_C" >&6
+if test "${ac_cv_build+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  ac_cv_build_alias=$build_alias
+test -z "$ac_cv_build_alias" &&
+  ac_cv_build_alias=`$ac_config_guess`
+test -z "$ac_cv_build_alias" &&
+  { { echo "$as_me:$LINENO: error: cannot guess build type; you must specify one" >&5
+echo "$as_me: error: cannot guess build type; you must specify one" >&2;}
+   { (exit 1); exit 1; }; }
+ac_cv_build=`$ac_config_sub $ac_cv_build_alias` ||
+  { { echo "$as_me:$LINENO: error: $ac_config_sub $ac_cv_build_alias failed" >&5
+echo "$as_me: error: $ac_config_sub $ac_cv_build_alias failed" >&2;}
+   { (exit 1); exit 1; }; }
+
+fi
+echo "$as_me:$LINENO: result: $ac_cv_build" >&5
+echo "${ECHO_T}$ac_cv_build" >&6
+build=$ac_cv_build
+build_cpu=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
+build_vendor=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
+build_os=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
+
+
+echo "$as_me:$LINENO: checking host system type" >&5
+echo $ECHO_N "checking host system type... $ECHO_C" >&6
+if test "${ac_cv_host+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  ac_cv_host_alias=$host_alias
+test -z "$ac_cv_host_alias" &&
+  ac_cv_host_alias=$ac_cv_build_alias
+ac_cv_host=`$ac_config_sub $ac_cv_host_alias` ||
+  { { echo "$as_me:$LINENO: error: $ac_config_sub $ac_cv_host_alias failed" >&5
+echo "$as_me: error: $ac_config_sub $ac_cv_host_alias failed" >&2;}
+   { (exit 1); exit 1; }; }
+
+fi
+echo "$as_me:$LINENO: result: $ac_cv_host" >&5
+echo "${ECHO_T}$ac_cv_host" >&6
+host=$ac_cv_host
+host_cpu=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
+host_vendor=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
+host_os=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
+
+
+
+echo "$as_me:$LINENO: checking if tr works" >&5
+echo $ECHO_N "checking if tr works... $ECHO_C" >&6
+TR_TEST="`echo Test | tr 'a-z,' 'A-Z '`"
+if test $TR_TEST != "TEST"; then
+  { { echo "$as_me:$LINENO: error: tr program doesn't work" >&5
+echo "$as_me: error: tr program doesn't work" >&2;}
+   { (exit 1); exit 1; }; }
+else
+  echo "$as_me:$LINENO: result: yes" >&5
+echo "${ECHO_T}yes" >&6
+fi
+
+echo "$as_me:$LINENO: checking if basename works" >&5
+echo $ECHO_N "checking if basename works... $ECHO_C" >&6
+BASENAME_TEST="`basename /foo/bar/baz/qux/basename_works`"
+if test $BASENAME_TEST != "basename_works"; then
+  { { echo "$as_me:$LINENO: error: basename program doesn't work" >&5
+echo "$as_me: error: basename program doesn't work" >&2;}
+   { (exit 1); exit 1; }; }
+else
+  echo "$as_me:$LINENO: result: yes" >&5
+echo "${ECHO_T}yes" >&6
+fi
+
+echo "$as_me:$LINENO: checking if xargs works" >&5
+echo $ECHO_N "checking if xargs works... $ECHO_C" >&6
+XARGS_TEST="`echo /foo/bar/baz/qux/xargs_works | xargs basename`"
+if test $XARGS_TEST != "xargs_works"; then
+  { { echo "$as_me:$LINENO: error: xargs program doesn't work" >&5
+echo "$as_me: error: xargs program doesn't work" >&2;}
+   { (exit 1); exit 1; }; }
+else
+  echo "$as_me:$LINENO: result: yes" >&5
+echo "${ECHO_T}yes" >&6
+fi
+
+case "$host_os" in
+  aix4.*)       host_os_novers="aix4.x"     ;;
+  aix5.*)       host_os_novers="aix5.x"     ;;
+  freebsd*)     host_os_novers="freebsd"    ;;
+  irix5.*)      host_os_novers="irix5.x"    ;;
+  irix6.*)      host_os_novers="irix6.x"    ;;
+  osf4.*)       host_os_novers="osf4.x"     ;;
+  osf5.*)       host_os_novers="osf5.x"     ;;
+  solaris2.*)   host_os_novers="solaris2.x" ;;
+  *)            host_os_novers="$host_os"   ;;
+esac
+
+host_config="none"
+for f in $host_cpu-$host_vendor-$host_os        \
+         $host_cpu-$host_vendor-$host_os_novers \
+         $host_vendor-$host_os                  \
+         $host_vendor-$host_os_novers           \
+         $host_cpu-$host_os                     \
+         $host_cpu-$host_os_novers              \
+         $host_cpu-$host_vendor                 \
+         $host_os                               \
+         $host_os_novers                        \
+         $host_vendor                           \
+         $host_cpu ; do
+  echo "$as_me:$LINENO: checking for config $f" >&5
+echo $ECHO_N "checking for config $f... $ECHO_C" >&6
+  if test -f "$srcdir/config/$f"; then
+    host_config=$srcdir/config/$f
+    echo "$as_me:$LINENO: result: found" >&5
+echo "${ECHO_T}found" >&6
+    break
+  fi
+  echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
+done
+if test "X$host_config" != "Xnone"; then
+  CC_BASENAME="`echo $CC | cut -f1 -d' ' | xargs basename 2>/dev/null`"
+  F77_BASENAME="`echo $F77 | cut -f1 -d' ' | xargs basename 2>/dev/null`"
+  CXX_BASENAME="`echo $CXX | cut -f1 -d' ' | xargs basename 2>/dev/null`"
+  . $host_config
+fi
+
+
+echo "$as_me:$LINENO: checking whether ${MAKE-make} sets \$(MAKE)" >&5
+echo $ECHO_N "checking whether ${MAKE-make} sets \$(MAKE)... $ECHO_C" >&6
+set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y,./+-,__p_,'`
+if eval "test \"\${ac_cv_prog_make_${ac_make}_set+set}\" = set"; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  cat >conftest.make <<\_ACEOF
+all:
+	@echo 'ac_maketemp="$(MAKE)"'
+_ACEOF
+# GNU make sometimes prints "make[1]: Entering...", which would confuse us.
+eval `${MAKE-make} -f conftest.make 2>/dev/null | grep temp=`
+if test -n "$ac_maketemp"; then
+  eval ac_cv_prog_make_${ac_make}_set=yes
+else
+  eval ac_cv_prog_make_${ac_make}_set=no
+fi
+rm -f conftest.make
+fi
+if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then
+  echo "$as_me:$LINENO: result: yes" >&5
+echo "${ECHO_T}yes" >&6
+  SET_MAKE=
+else
+  echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
+  SET_MAKE="MAKE=${MAKE-make}"
+fi
+
+
+ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+if test -n "$ac_tool_prefix"; then
+  # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
+set dummy ${ac_tool_prefix}gcc; ac_word=$2
+echo "$as_me:$LINENO: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
+if test "${ac_cv_prog_CC+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  if test -n "$CC"; then
+  ac_cv_prog_CC="$CC" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+  for ac_exec_ext in '' $ac_executable_extensions; do
+  if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+    ac_cv_prog_CC="${ac_tool_prefix}gcc"
+    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+done
+
+fi
+fi
+CC=$ac_cv_prog_CC
+if test -n "$CC"; then
+  echo "$as_me:$LINENO: result: $CC" >&5
+echo "${ECHO_T}$CC" >&6
+else
+  echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
+fi
+
+fi
+if test -z "$ac_cv_prog_CC"; then
+  ac_ct_CC=$CC
+  # Extract the first word of "gcc", so it can be a program name with args.
+set dummy gcc; ac_word=$2
+echo "$as_me:$LINENO: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
+if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  if test -n "$ac_ct_CC"; then
+  ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+  for ac_exec_ext in '' $ac_executable_extensions; do
+  if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+    ac_cv_prog_ac_ct_CC="gcc"
+    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+done
+
+fi
+fi
+ac_ct_CC=$ac_cv_prog_ac_ct_CC
+if test -n "$ac_ct_CC"; then
+  echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
+echo "${ECHO_T}$ac_ct_CC" >&6
+else
+  echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
+fi
+
+  CC=$ac_ct_CC
+else
+  CC="$ac_cv_prog_CC"
+fi
+
+if test -z "$CC"; then
+  if test -n "$ac_tool_prefix"; then
+  # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args.
+set dummy ${ac_tool_prefix}cc; ac_word=$2
+echo "$as_me:$LINENO: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
+if test "${ac_cv_prog_CC+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  if test -n "$CC"; then
+  ac_cv_prog_CC="$CC" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+  for ac_exec_ext in '' $ac_executable_extensions; do
+  if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+    ac_cv_prog_CC="${ac_tool_prefix}cc"
+    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+done
+
+fi
+fi
+CC=$ac_cv_prog_CC
+if test -n "$CC"; then
+  echo "$as_me:$LINENO: result: $CC" >&5
+echo "${ECHO_T}$CC" >&6
+else
+  echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
+fi
+
+fi
+if test -z "$ac_cv_prog_CC"; then
+  ac_ct_CC=$CC
+  # Extract the first word of "cc", so it can be a program name with args.
+set dummy cc; ac_word=$2
+echo "$as_me:$LINENO: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
+if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  if test -n "$ac_ct_CC"; then
+  ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+  for ac_exec_ext in '' $ac_executable_extensions; do
+  if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+    ac_cv_prog_ac_ct_CC="cc"
+    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+done
+
+fi
+fi
+ac_ct_CC=$ac_cv_prog_ac_ct_CC
+if test -n "$ac_ct_CC"; then
+  echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
+echo "${ECHO_T}$ac_ct_CC" >&6
+else
+  echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
+fi
+
+  CC=$ac_ct_CC
+else
+  CC="$ac_cv_prog_CC"
+fi
+
+fi
+if test -z "$CC"; then
+  # Extract the first word of "cc", so it can be a program name with args.
+set dummy cc; ac_word=$2
+echo "$as_me:$LINENO: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
+if test "${ac_cv_prog_CC+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  if test -n "$CC"; then
+  ac_cv_prog_CC="$CC" # Let the user override the test.
+else
+  ac_prog_rejected=no
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+  for ac_exec_ext in '' $ac_executable_extensions; do
+  if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+    if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
+       ac_prog_rejected=yes
+       continue
+     fi
+    ac_cv_prog_CC="cc"
+    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+done
+
+if test $ac_prog_rejected = yes; then
+  # We found a bogon in the path, so make sure we never use it.
+  set dummy $ac_cv_prog_CC
+  shift
+  if test $# != 0; then
+    # We chose a different compiler from the bogus one.
+    # However, it has the same basename, so the bogon will be chosen
+    # first if we set CC to just the basename; use the full file name.
+    shift
+    ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@"
+  fi
+fi
+fi
+fi
+CC=$ac_cv_prog_CC
+if test -n "$CC"; then
+  echo "$as_me:$LINENO: result: $CC" >&5
+echo "${ECHO_T}$CC" >&6
+else
+  echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
+fi
+
+fi
+if test -z "$CC"; then
+  if test -n "$ac_tool_prefix"; then
+  for ac_prog in cl
+  do
+    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
+set dummy $ac_tool_prefix$ac_prog; ac_word=$2
+echo "$as_me:$LINENO: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
+if test "${ac_cv_prog_CC+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  if test -n "$CC"; then
+  ac_cv_prog_CC="$CC" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+  for ac_exec_ext in '' $ac_executable_extensions; do
+  if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+    ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
+    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+done
+
+fi
+fi
+CC=$ac_cv_prog_CC
+if test -n "$CC"; then
+  echo "$as_me:$LINENO: result: $CC" >&5
+echo "${ECHO_T}$CC" >&6
+else
+  echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
+fi
+
+    test -n "$CC" && break
+  done
+fi
+if test -z "$CC"; then
+  ac_ct_CC=$CC
+  for ac_prog in cl
+do
+  # Extract the first word of "$ac_prog", so it can be a program name with args.
+set dummy $ac_prog; ac_word=$2
+echo "$as_me:$LINENO: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
+if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  if test -n "$ac_ct_CC"; then
+  ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+  for ac_exec_ext in '' $ac_executable_extensions; do
+  if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+    ac_cv_prog_ac_ct_CC="$ac_prog"
+    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+done
+
+fi
+fi
+ac_ct_CC=$ac_cv_prog_ac_ct_CC
+if test -n "$ac_ct_CC"; then
+  echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
+echo "${ECHO_T}$ac_ct_CC" >&6
+else
+  echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
+fi
+
+  test -n "$ac_ct_CC" && break
+done
+
+  CC=$ac_ct_CC
+fi
+
+fi
+
+
+test -z "$CC" && { { echo "$as_me:$LINENO: error: no acceptable C compiler found in \$PATH
+See \`config.log' for more details." >&5
+echo "$as_me: error: no acceptable C compiler found in \$PATH
+See \`config.log' for more details." >&2;}
+   { (exit 1); exit 1; }; }
+
+# Provide some information about the compiler.
+echo "$as_me:$LINENO:" \
+     "checking for C compiler version" >&5
+ac_compiler=`set X $ac_compile; echo $2`
+{ (eval echo "$as_me:$LINENO: \"$ac_compiler --version </dev/null >&5\"") >&5
+  (eval $ac_compiler --version </dev/null >&5) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }
+{ (eval echo "$as_me:$LINENO: \"$ac_compiler -v </dev/null >&5\"") >&5
+  (eval $ac_compiler -v </dev/null >&5) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }
+{ (eval echo "$as_me:$LINENO: \"$ac_compiler -V </dev/null >&5\"") >&5
+  (eval $ac_compiler -V </dev/null >&5) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }
+
+cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+
+int
+main ()
+{
+
+  ;
+  return 0;
+}
+_ACEOF
+ac_clean_files_save=$ac_clean_files
+ac_clean_files="$ac_clean_files a.out a.exe b.out"
+# Try to create an executable without -o first, disregard a.out.
+# It will help us diagnose broken compilers, and finding out an intuition
+# of exeext.
+echo "$as_me:$LINENO: checking for C compiler default output" >&5
+echo $ECHO_N "checking for C compiler default output... $ECHO_C" >&6
+ac_link_default=`echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
+if { (eval echo "$as_me:$LINENO: \"$ac_link_default\"") >&5
+  (eval $ac_link_default) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; then
+  # Find the output, starting from the most likely.  This scheme is
+# not robust to junk in `.', hence go to wildcards (a.*) only as a last
+# resort.
+
+# Be careful to initialize this variable, since it used to be cached.
+# Otherwise an old cache value of `no' led to `EXEEXT = no' in a Makefile.
+ac_cv_exeext=
+# b.out is created by i960 compilers.
+for ac_file in a_out.exe a.exe conftest.exe a.out conftest a.* conftest.* b.out
+do
+  test -f "$ac_file" || continue
+  case $ac_file in
+    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.o | *.obj )
         ;;
-*) ;;
+    conftest.$ac_ext )
+        # This is the source file.
+        ;;
+    [ab].out )
+        # We found the default executable, but exeext='' is most
+        # certainly right.
+        break;;
+    *.* )
+        ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
+        # FIXME: I believe we export ac_cv_exeext for Libtool,
+        # but it would be cool to find out if it's true.  Does anybody
+        # maintain Libtool? --akim.
+        export ac_cv_exeext
+        break;;
+    * )
+        break;;
+  esac
+done
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+{ { echo "$as_me:$LINENO: error: C compiler cannot create executables
+See \`config.log' for more details." >&5
+echo "$as_me: error: C compiler cannot create executables
+See \`config.log' for more details." >&2;}
+   { (exit 77); exit 77; }; }
+fi
+
+ac_exeext=$ac_cv_exeext
+echo "$as_me:$LINENO: result: $ac_file" >&5
+echo "${ECHO_T}$ac_file" >&6
+
+# Check the compiler produces executables we can run.  If not, either
+# the compiler is broken, or we cross compile.
+echo "$as_me:$LINENO: checking whether the C compiler works" >&5
+echo $ECHO_N "checking whether the C compiler works... $ECHO_C" >&6
+# FIXME: These cross compiler hacks should be removed for Autoconf 3.0
+# If not cross compiling, check that we can run a simple program.
+if test "$cross_compiling" != yes; then
+  if { ac_try='./$ac_file'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+    cross_compiling=no
+  else
+    if test "$cross_compiling" = maybe; then
+	cross_compiling=yes
+    else
+	{ { echo "$as_me:$LINENO: error: cannot run C compiled programs.
+If you meant to cross compile, use \`--host'.
+See \`config.log' for more details." >&5
+echo "$as_me: error: cannot run C compiled programs.
+If you meant to cross compile, use \`--host'.
+See \`config.log' for more details." >&2;}
+   { (exit 1); exit 1; }; }
+    fi
+  fi
+fi
+echo "$as_me:$LINENO: result: yes" >&5
+echo "${ECHO_T}yes" >&6
+
+rm -f a.out a.exe conftest$ac_cv_exeext b.out
+ac_clean_files=$ac_clean_files_save
+# Check the compiler produces executables we can run.  If not, either
+# the compiler is broken, or we cross compile.
+echo "$as_me:$LINENO: checking whether we are cross compiling" >&5
+echo $ECHO_N "checking whether we are cross compiling... $ECHO_C" >&6
+echo "$as_me:$LINENO: result: $cross_compiling" >&5
+echo "${ECHO_T}$cross_compiling" >&6
+
+echo "$as_me:$LINENO: checking for suffix of executables" >&5
+echo $ECHO_N "checking for suffix of executables... $ECHO_C" >&6
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+  (eval $ac_link) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; then
+  # If both `conftest.exe' and `conftest' are `present' (well, observable)
+# catch `conftest.exe'.  For instance with Cygwin, `ls conftest' will
+# work properly (i.e., refer to `conftest.exe'), while it won't with
+# `rm'.
+for ac_file in conftest.exe conftest conftest.*; do
+  test -f "$ac_file" || continue
+  case $ac_file in
+    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.o | *.obj ) ;;
+    *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
+          export ac_cv_exeext
+          break;;
+    * ) break;;
+  esac
+done
+else
+  { { echo "$as_me:$LINENO: error: cannot compute suffix of executables: cannot compile and link
+See \`config.log' for more details." >&5
+echo "$as_me: error: cannot compute suffix of executables: cannot compile and link
+See \`config.log' for more details." >&2;}
+   { (exit 1); exit 1; }; }
+fi
+
+rm -f conftest$ac_cv_exeext
+echo "$as_me:$LINENO: result: $ac_cv_exeext" >&5
+echo "${ECHO_T}$ac_cv_exeext" >&6
+
+rm -f conftest.$ac_ext
+EXEEXT=$ac_cv_exeext
+ac_exeext=$EXEEXT
+echo "$as_me:$LINENO: checking for suffix of object files" >&5
+echo $ECHO_N "checking for suffix of object files... $ECHO_C" >&6
+if test "${ac_cv_objext+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+
+int
+main ()
+{
+
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.o conftest.obj
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+  (eval $ac_compile) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; then
+  for ac_file in `(ls conftest.o conftest.obj; ls conftest.*) 2>/dev/null`; do
+  case $ac_file in
+    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg ) ;;
+    *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
+       break;;
+  esac
+done
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+{ { echo "$as_me:$LINENO: error: cannot compute suffix of object files: cannot compile
+See \`config.log' for more details." >&5
+echo "$as_me: error: cannot compute suffix of object files: cannot compile
+See \`config.log' for more details." >&2;}
+   { (exit 1); exit 1; }; }
+fi
+
+rm -f conftest.$ac_cv_objext conftest.$ac_ext
+fi
+echo "$as_me:$LINENO: result: $ac_cv_objext" >&5
+echo "${ECHO_T}$ac_cv_objext" >&6
+OBJEXT=$ac_cv_objext
+ac_objext=$OBJEXT
+echo "$as_me:$LINENO: checking whether we are using the GNU C compiler" >&5
+echo $ECHO_N "checking whether we are using the GNU C compiler... $ECHO_C" >&6
+if test "${ac_cv_c_compiler_gnu+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+
+int
+main ()
+{
+#ifndef __GNUC__
+       choke me
+#endif
+
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+  (eval $ac_compile) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } &&
+         { ac_try='test -s conftest.$ac_objext'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+  ac_compiler_gnu=yes
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_compiler_gnu=no
+fi
+rm -f conftest.$ac_objext conftest.$ac_ext
+ac_cv_c_compiler_gnu=$ac_compiler_gnu
+
+fi
+echo "$as_me:$LINENO: result: $ac_cv_c_compiler_gnu" >&5
+echo "${ECHO_T}$ac_cv_c_compiler_gnu" >&6
+GCC=`test $ac_compiler_gnu = yes && echo yes`
+ac_test_CFLAGS=${CFLAGS+set}
+ac_save_CFLAGS=$CFLAGS
+CFLAGS="-g"
+echo "$as_me:$LINENO: checking whether $CC accepts -g" >&5
+echo $ECHO_N "checking whether $CC accepts -g... $ECHO_C" >&6
+if test "${ac_cv_prog_cc_g+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+
+int
+main ()
+{
+
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+  (eval $ac_compile) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } &&
+         { ac_try='test -s conftest.$ac_objext'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+  ac_cv_prog_cc_g=yes
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_cv_prog_cc_g=no
+fi
+rm -f conftest.$ac_objext conftest.$ac_ext
+fi
+echo "$as_me:$LINENO: result: $ac_cv_prog_cc_g" >&5
+echo "${ECHO_T}$ac_cv_prog_cc_g" >&6
+if test "$ac_test_CFLAGS" = set; then
+  CFLAGS=$ac_save_CFLAGS
+elif test $ac_cv_prog_cc_g = yes; then
+  if test "$GCC" = yes; then
+    CFLAGS="-g -O2"
+  else
+    CFLAGS="-g"
+  fi
+else
+  if test "$GCC" = yes; then
+    CFLAGS="-O2"
+  else
+    CFLAGS=
+  fi
+fi
+echo "$as_me:$LINENO: checking for $CC option to accept ANSI C" >&5
+echo $ECHO_N "checking for $CC option to accept ANSI C... $ECHO_C" >&6
+if test "${ac_cv_prog_cc_stdc+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  ac_cv_prog_cc_stdc=no
+ac_save_CC=$CC
+cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+#include <stdarg.h>
+#include <stdio.h>
+#include <sys/types.h>
+#include <sys/stat.h>
+/* Most of the following tests are stolen from RCS 5.7's src/conf.sh.  */
+struct buf { int x; };
+FILE * (*rcsopen) (struct buf *, struct stat *, int);
+static char *e (p, i)
+     char **p;
+     int i;
+{
+  return p[i];
+}
+static char *f (char * (*g) (char **, int), char **p, ...)
+{
+  char *s;
+  va_list v;
+  va_start (v,p);
+  s = g (p, va_arg (v,int));
+  va_end (v);
+  return s;
+}
+int test (int i, double x);
+struct s1 {int (*f) (int a);};
+struct s2 {int (*f) (double a);};
+int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
+int argc;
+char **argv;
+int
+main ()
+{
+return f (e, argv, 0) != argv[0]  ||  f (e, argv, 1) != argv[1];
+  ;
+  return 0;
+}
+_ACEOF
+# Don't try gcc -ansi; that turns off useful extensions and
+# breaks some systems' header files.
+# AIX			-qlanglvl=ansi
+# Ultrix and OSF/1	-std1
+# HP-UX 10.20 and later	-Ae
+# HP-UX older versions	-Aa -D_HPUX_SOURCE
+# SVR4			-Xc -D__EXTENSIONS__
+for ac_arg in "" -qlanglvl=ansi -std1 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
+do
+  CC="$ac_save_CC $ac_arg"
+  rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+  (eval $ac_compile) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } &&
+         { ac_try='test -s conftest.$ac_objext'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+  ac_cv_prog_cc_stdc=$ac_arg
+break
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+fi
+rm -f conftest.$ac_objext
+done
+rm -f conftest.$ac_ext conftest.$ac_objext
+CC=$ac_save_CC
+
+fi
+
+case "x$ac_cv_prog_cc_stdc" in
+  x|xno)
+    echo "$as_me:$LINENO: result: none needed" >&5
+echo "${ECHO_T}none needed" >&6 ;;
+  *)
+    echo "$as_me:$LINENO: result: $ac_cv_prog_cc_stdc" >&5
+echo "${ECHO_T}$ac_cv_prog_cc_stdc" >&6
+    CC="$CC $ac_cv_prog_cc_stdc" ;;
 esac
 
-### warn about some conflicting configurations.
+# Some people use a C++ compiler to compile C.  Since we use `exit',
+# in C++ we need to declare it.  In case someone uses the same compiler
+# for both compiling C and C++ we need to have the C++ compiler decide
+# the declaration of exit, since it's the most demanding environment.
+cat >conftest.$ac_ext <<_ACEOF
+#ifndef __cplusplus
+  choke me
+#endif
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+  (eval $ac_compile) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } &&
+         { ac_try='test -s conftest.$ac_objext'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+  for ac_declaration in \
+   ''\
+   '#include <stdlib.h>' \
+   'extern "C" void std::exit (int) throw (); using std::exit;' \
+   'extern "C" void std::exit (int); using std::exit;' \
+   'extern "C" void exit (int) throw ();' \
+   'extern "C" void exit (int);' \
+   'void exit (int);'
+do
+  cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+#include <stdlib.h>
+$ac_declaration
+int
+main ()
+{
+exit (42);
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+  (eval $ac_compile) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } &&
+         { ac_try='test -s conftest.$ac_objext'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+  :
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
 
-case "${srcdir}" in
-".") ;;
-*)
-        if [ -f ${srcdir}/config.status ] ; then
-                echo '***' Cannot configure here in \"${PWD=`pwd`}\" when \"${srcdir}\" is currently configured. 1>&2
-                exit 1
+continue
+fi
+rm -f conftest.$ac_objext conftest.$ac_ext
+  cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+$ac_declaration
+int
+main ()
+{
+exit (42);
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+  (eval $ac_compile) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } &&
+         { ac_try='test -s conftest.$ac_objext'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+  break
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+fi
+rm -f conftest.$ac_objext conftest.$ac_ext
+done
+rm -f conftest*
+if test -n "$ac_declaration"; then
+  echo '#ifdef __cplusplus' >>confdefs.h
+  echo $ac_declaration      >>confdefs.h
+  echo '#endif'             >>confdefs.h
+fi
+
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+fi
+rm -f conftest.$ac_objext conftest.$ac_ext
+ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+DEPDIR="${am__leading_dot}deps"
+
+          ac_config_commands="$ac_config_commands depfiles"
+
+
+am_make=${MAKE-make}
+cat > confinc << 'END'
+am__doit:
+	@echo done
+.PHONY: am__doit
+END
+# If we don't find an include directive, just comment out the code.
+echo "$as_me:$LINENO: checking for style of include used by $am_make" >&5
+echo $ECHO_N "checking for style of include used by $am_make... $ECHO_C" >&6
+am__include="#"
+am__quote=
+_am_result=none
+# First try GNU make style include.
+echo "include confinc" > confmf
+# We grep out `Entering directory' and `Leaving directory'
+# messages which can occur if `w' ends up in MAKEFLAGS.
+# In particular we don't look at `^make:' because GNU make might
+# be invoked under some other name (usually "gmake"), in which
+# case it prints its new name instead of `make'.
+if test "`$am_make -s -f confmf 2> /dev/null | grep -v 'ing directory'`" = "done"; then
+   am__include=include
+   am__quote=
+   _am_result=GNU
+fi
+# Now try BSD make style include.
+if test "$am__include" = "#"; then
+   echo '.include "confinc"' > confmf
+   if test "`$am_make -s -f confmf 2> /dev/null`" = "done"; then
+      am__include=.include
+      am__quote="\""
+      _am_result=BSD
+   fi
+fi
+
+
+echo "$as_me:$LINENO: result: $_am_result" >&5
+echo "${ECHO_T}$_am_result" >&6
+rm -f confinc confmf
+
+# Check whether --enable-dependency-tracking or --disable-dependency-tracking was given.
+if test "${enable_dependency_tracking+set}" = set; then
+  enableval="$enable_dependency_tracking"
+
+fi;
+if test "x$enable_dependency_tracking" != xno; then
+  am_depcomp="$ac_aux_dir/depcomp"
+  AMDEPBACKSLASH='\'
+fi
+
+
+if test "x$enable_dependency_tracking" != xno; then
+  AMDEP_TRUE=
+  AMDEP_FALSE='#'
+else
+  AMDEP_TRUE='#'
+  AMDEP_FALSE=
+fi
+
+
+
+
+depcc="$CC"   am_compiler_list=
+
+echo "$as_me:$LINENO: checking dependency style of $depcc" >&5
+echo $ECHO_N "checking dependency style of $depcc... $ECHO_C" >&6
+if test "${am_cv_CC_dependencies_compiler_type+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then
+  # We make a subdir and do the tests there.  Otherwise we can end up
+  # making bogus files that we don't know about and never remove.  For
+  # instance it was reported that on HP-UX the gcc test will end up
+  # making a dummy file named `D' -- because `-MD' means `put the output
+  # in D'.
+  mkdir conftest.dir
+  # Copy depcomp to subdir because otherwise we won't find it if we're
+  # using a relative directory.
+  cp "$am_depcomp" conftest.dir
+  cd conftest.dir
+  # We will build objects and dependencies in a subdirectory because
+  # it helps to detect inapplicable dependency modes.  For instance
+  # both Tru64's cc and ICC support -MD to output dependencies as a
+  # side effect of compilation, but ICC will put the dependencies in
+  # the current directory while Tru64 will put them in the object
+  # directory.
+  mkdir sub
+
+  am_cv_CC_dependencies_compiler_type=none
+  if test "$am_compiler_list" = ""; then
+     am_compiler_list=`sed -n 's/^#*\([a-zA-Z0-9]*\))$/\1/p' < ./depcomp`
+  fi
+  for depmode in $am_compiler_list; do
+    # Setup a source with many dependencies, because some compilers
+    # like to wrap large dependency lists on column 80 (with \), and
+    # we should not choose a depcomp mode which is confused by this.
+    #
+    # We need to recreate these files for each test, as the compiler may
+    # overwrite some of them when testing with obscure command lines.
+    # This happens at least with the AIX C compiler.
+    : > sub/conftest.c
+    for i in 1 2 3 4 5 6; do
+      echo '#include "conftst'$i'.h"' >> sub/conftest.c
+      : > sub/conftst$i.h
+    done
+    echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf
+
+    case $depmode in
+    nosideeffect)
+      # after this tag, mechanisms are not by side-effect, so they'll
+      # only be used when explicitly requested
+      if test "x$enable_dependency_tracking" = xyes; then
+	continue
+      else
+	break
+      fi
+      ;;
+    none) break ;;
+    esac
+    # We check with `-c' and `-o' for the sake of the "dashmstdout"
+    # mode.  It turns out that the SunPro C++ compiler does not properly
+    # handle `-M -o', and we need to detect this.
+    if depmode=$depmode \
+       source=sub/conftest.c object=sub/conftest.${OBJEXT-o} \
+       depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \
+       $SHELL ./depcomp $depcc -c -o sub/conftest.${OBJEXT-o} sub/conftest.c \
+         >/dev/null 2>conftest.err &&
+       grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 &&
+       grep sub/conftest.${OBJEXT-o} sub/conftest.Po > /dev/null 2>&1 &&
+       ${MAKE-make} -s -f confmf > /dev/null 2>&1; then
+      # icc doesn't choke on unknown options, it will just issue warnings
+      # (even with -Werror).  So we grep stderr for any message
+      # that says an option was ignored.
+      if grep 'ignoring option' conftest.err >/dev/null 2>&1; then :; else
+        am_cv_CC_dependencies_compiler_type=$depmode
+        break
+      fi
+    fi
+  done
+
+  cd ..
+  rm -rf conftest.dir
+else
+  am_cv_CC_dependencies_compiler_type=none
+fi
+
+fi
+echo "$as_me:$LINENO: result: $am_cv_CC_dependencies_compiler_type" >&5
+echo "${ECHO_T}$am_cv_CC_dependencies_compiler_type" >&6
+CCDEPMODE=depmode=$am_cv_CC_dependencies_compiler_type
+
+
+
+if
+  test "x$enable_dependency_tracking" != xno \
+  && test "$am_cv_CC_dependencies_compiler_type" = gcc3; then
+  am__fastdepCC_TRUE=
+  am__fastdepCC_FALSE='#'
+else
+  am__fastdepCC_TRUE='#'
+  am__fastdepCC_FALSE=
+fi
+
+
+ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+echo "$as_me:$LINENO: checking how to run the C preprocessor" >&5
+echo $ECHO_N "checking how to run the C preprocessor... $ECHO_C" >&6
+# On Suns, sometimes $CPP names a directory.
+if test -n "$CPP" && test -d "$CPP"; then
+  CPP=
+fi
+if test -z "$CPP"; then
+  if test "${ac_cv_prog_CPP+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+      # Double quotes because CPP needs to be expanded
+    for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
+    do
+      ac_preproc_ok=false
+for ac_c_preproc_warn_flag in '' yes
+do
+  # Use a header file that comes with gcc, so configuring glibc
+  # with a fresh cross-compiler works.
+  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+  # <limits.h> exists even on freestanding compilers.
+  # On the NeXT, cc -E runs the code through the compiler's parser,
+  # not just through cpp. "Syntax error" is here to catch this case.
+  cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+#ifdef __STDC__
+# include <limits.h>
+#else
+# include <assert.h>
+#endif
+                     Syntax error
+_ACEOF
+if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&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; then
+  if test -s conftest.err; then
+    ac_cpp_err=$ac_c_preproc_warn_flag
+  else
+    ac_cpp_err=
+  fi
+else
+  ac_cpp_err=yes
+fi
+if test -z "$ac_cpp_err"; then
+  :
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+  # Broken: fails on valid input.
+continue
+fi
+rm -f conftest.err conftest.$ac_ext
+
+  # OK, works on sane cases.  Now check whether non-existent headers
+  # can be detected and how.
+  cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+#include <ac_nonexistent.h>
+_ACEOF
+if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&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; then
+  if test -s conftest.err; then
+    ac_cpp_err=$ac_c_preproc_warn_flag
+  else
+    ac_cpp_err=
+  fi
+else
+  ac_cpp_err=yes
+fi
+if test -z "$ac_cpp_err"; then
+  # Broken: success on invalid input.
+continue
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+  # Passes both tests.
+ac_preproc_ok=:
+break
+fi
+rm -f conftest.err conftest.$ac_ext
+
+done
+# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
+rm -f conftest.err conftest.$ac_ext
+if $ac_preproc_ok; then
+  break
+fi
+
+    done
+    ac_cv_prog_CPP=$CPP
+
+fi
+  CPP=$ac_cv_prog_CPP
+else
+  ac_cv_prog_CPP=$CPP
+fi
+echo "$as_me:$LINENO: result: $CPP" >&5
+echo "${ECHO_T}$CPP" >&6
+ac_preproc_ok=false
+for ac_c_preproc_warn_flag in '' yes
+do
+  # Use a header file that comes with gcc, so configuring glibc
+  # with a fresh cross-compiler works.
+  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+  # <limits.h> exists even on freestanding compilers.
+  # On the NeXT, cc -E runs the code through the compiler's parser,
+  # not just through cpp. "Syntax error" is here to catch this case.
+  cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+#ifdef __STDC__
+# include <limits.h>
+#else
+# include <assert.h>
+#endif
+                     Syntax error
+_ACEOF
+if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&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; then
+  if test -s conftest.err; then
+    ac_cpp_err=$ac_c_preproc_warn_flag
+  else
+    ac_cpp_err=
+  fi
+else
+  ac_cpp_err=yes
+fi
+if test -z "$ac_cpp_err"; then
+  :
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+  # Broken: fails on valid input.
+continue
+fi
+rm -f conftest.err conftest.$ac_ext
+
+  # OK, works on sane cases.  Now check whether non-existent headers
+  # can be detected and how.
+  cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+#include <ac_nonexistent.h>
+_ACEOF
+if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&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; then
+  if test -s conftest.err; then
+    ac_cpp_err=$ac_c_preproc_warn_flag
+  else
+    ac_cpp_err=
+  fi
+else
+  ac_cpp_err=yes
+fi
+if test -z "$ac_cpp_err"; then
+  # Broken: success on invalid input.
+continue
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+  # Passes both tests.
+ac_preproc_ok=:
+break
+fi
+rm -f conftest.err conftest.$ac_ext
+
+done
+# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
+rm -f conftest.err conftest.$ac_ext
+if $ac_preproc_ok; then
+  :
+else
+  { { echo "$as_me:$LINENO: error: C preprocessor \"$CPP\" fails sanity check
+See \`config.log' for more details." >&5
+echo "$as_me: error: C preprocessor \"$CPP\" fails sanity check
+See \`config.log' for more details." >&2;}
+   { (exit 1); exit 1; }; }
+fi
+
+ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
+ac_ext=cc
+ac_cpp='$CXXCPP $CPPFLAGS'
+ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
+if test -n "$ac_tool_prefix"; then
+  for ac_prog in $CCC g++ c++ gpp aCC CC cxx cc++ cl FCC KCC RCC xlC_r xlC
+  do
+    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
+set dummy $ac_tool_prefix$ac_prog; ac_word=$2
+echo "$as_me:$LINENO: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
+if test "${ac_cv_prog_CXX+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  if test -n "$CXX"; then
+  ac_cv_prog_CXX="$CXX" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+  for ac_exec_ext in '' $ac_executable_extensions; do
+  if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+    ac_cv_prog_CXX="$ac_tool_prefix$ac_prog"
+    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+done
+
+fi
+fi
+CXX=$ac_cv_prog_CXX
+if test -n "$CXX"; then
+  echo "$as_me:$LINENO: result: $CXX" >&5
+echo "${ECHO_T}$CXX" >&6
+else
+  echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
+fi
+
+    test -n "$CXX" && break
+  done
+fi
+if test -z "$CXX"; then
+  ac_ct_CXX=$CXX
+  for ac_prog in $CCC g++ c++ gpp aCC CC cxx cc++ cl FCC KCC RCC xlC_r xlC
+do
+  # Extract the first word of "$ac_prog", so it can be a program name with args.
+set dummy $ac_prog; ac_word=$2
+echo "$as_me:$LINENO: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
+if test "${ac_cv_prog_ac_ct_CXX+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  if test -n "$ac_ct_CXX"; then
+  ac_cv_prog_ac_ct_CXX="$ac_ct_CXX" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+  for ac_exec_ext in '' $ac_executable_extensions; do
+  if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+    ac_cv_prog_ac_ct_CXX="$ac_prog"
+    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+done
+
+fi
+fi
+ac_ct_CXX=$ac_cv_prog_ac_ct_CXX
+if test -n "$ac_ct_CXX"; then
+  echo "$as_me:$LINENO: result: $ac_ct_CXX" >&5
+echo "${ECHO_T}$ac_ct_CXX" >&6
+else
+  echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
+fi
+
+  test -n "$ac_ct_CXX" && break
+done
+test -n "$ac_ct_CXX" || ac_ct_CXX="g++"
+
+  CXX=$ac_ct_CXX
+fi
+
+
+# Provide some information about the compiler.
+echo "$as_me:$LINENO:" \
+     "checking for C++ compiler version" >&5
+ac_compiler=`set X $ac_compile; echo $2`
+{ (eval echo "$as_me:$LINENO: \"$ac_compiler --version </dev/null >&5\"") >&5
+  (eval $ac_compiler --version </dev/null >&5) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }
+{ (eval echo "$as_me:$LINENO: \"$ac_compiler -v </dev/null >&5\"") >&5
+  (eval $ac_compiler -v </dev/null >&5) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }
+{ (eval echo "$as_me:$LINENO: \"$ac_compiler -V </dev/null >&5\"") >&5
+  (eval $ac_compiler -V </dev/null >&5) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }
+
+echo "$as_me:$LINENO: checking whether we are using the GNU C++ compiler" >&5
+echo $ECHO_N "checking whether we are using the GNU C++ compiler... $ECHO_C" >&6
+if test "${ac_cv_cxx_compiler_gnu+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+
+int
+main ()
+{
+#ifndef __GNUC__
+       choke me
+#endif
+
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+  (eval $ac_compile) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } &&
+         { ac_try='test -s conftest.$ac_objext'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+  ac_compiler_gnu=yes
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_compiler_gnu=no
+fi
+rm -f conftest.$ac_objext conftest.$ac_ext
+ac_cv_cxx_compiler_gnu=$ac_compiler_gnu
+
+fi
+echo "$as_me:$LINENO: result: $ac_cv_cxx_compiler_gnu" >&5
+echo "${ECHO_T}$ac_cv_cxx_compiler_gnu" >&6
+GXX=`test $ac_compiler_gnu = yes && echo yes`
+ac_test_CXXFLAGS=${CXXFLAGS+set}
+ac_save_CXXFLAGS=$CXXFLAGS
+CXXFLAGS="-g"
+echo "$as_me:$LINENO: checking whether $CXX accepts -g" >&5
+echo $ECHO_N "checking whether $CXX accepts -g... $ECHO_C" >&6
+if test "${ac_cv_prog_cxx_g+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+
+int
+main ()
+{
+
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+  (eval $ac_compile) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } &&
+         { ac_try='test -s conftest.$ac_objext'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+  ac_cv_prog_cxx_g=yes
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_cv_prog_cxx_g=no
+fi
+rm -f conftest.$ac_objext conftest.$ac_ext
+fi
+echo "$as_me:$LINENO: result: $ac_cv_prog_cxx_g" >&5
+echo "${ECHO_T}$ac_cv_prog_cxx_g" >&6
+if test "$ac_test_CXXFLAGS" = set; then
+  CXXFLAGS=$ac_save_CXXFLAGS
+elif test $ac_cv_prog_cxx_g = yes; then
+  if test "$GXX" = yes; then
+    CXXFLAGS="-g -O2"
+  else
+    CXXFLAGS="-g"
+  fi
+else
+  if test "$GXX" = yes; then
+    CXXFLAGS="-O2"
+  else
+    CXXFLAGS=
+  fi
+fi
+for ac_declaration in \
+   ''\
+   '#include <stdlib.h>' \
+   'extern "C" void std::exit (int) throw (); using std::exit;' \
+   'extern "C" void std::exit (int); using std::exit;' \
+   'extern "C" void exit (int) throw ();' \
+   'extern "C" void exit (int);' \
+   'void exit (int);'
+do
+  cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+#include <stdlib.h>
+$ac_declaration
+int
+main ()
+{
+exit (42);
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+  (eval $ac_compile) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } &&
+         { ac_try='test -s conftest.$ac_objext'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+  :
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+continue
+fi
+rm -f conftest.$ac_objext conftest.$ac_ext
+  cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+$ac_declaration
+int
+main ()
+{
+exit (42);
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+  (eval $ac_compile) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } &&
+         { ac_try='test -s conftest.$ac_objext'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+  break
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+fi
+rm -f conftest.$ac_objext conftest.$ac_ext
+done
+rm -f conftest*
+if test -n "$ac_declaration"; then
+  echo '#ifdef __cplusplus' >>confdefs.h
+  echo $ac_declaration      >>confdefs.h
+  echo '#endif'             >>confdefs.h
+fi
+
+ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
+depcc="$CXX"  am_compiler_list=
+
+echo "$as_me:$LINENO: checking dependency style of $depcc" >&5
+echo $ECHO_N "checking dependency style of $depcc... $ECHO_C" >&6
+if test "${am_cv_CXX_dependencies_compiler_type+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then
+  # We make a subdir and do the tests there.  Otherwise we can end up
+  # making bogus files that we don't know about and never remove.  For
+  # instance it was reported that on HP-UX the gcc test will end up
+  # making a dummy file named `D' -- because `-MD' means `put the output
+  # in D'.
+  mkdir conftest.dir
+  # Copy depcomp to subdir because otherwise we won't find it if we're
+  # using a relative directory.
+  cp "$am_depcomp" conftest.dir
+  cd conftest.dir
+  # We will build objects and dependencies in a subdirectory because
+  # it helps to detect inapplicable dependency modes.  For instance
+  # both Tru64's cc and ICC support -MD to output dependencies as a
+  # side effect of compilation, but ICC will put the dependencies in
+  # the current directory while Tru64 will put them in the object
+  # directory.
+  mkdir sub
+
+  am_cv_CXX_dependencies_compiler_type=none
+  if test "$am_compiler_list" = ""; then
+     am_compiler_list=`sed -n 's/^#*\([a-zA-Z0-9]*\))$/\1/p' < ./depcomp`
+  fi
+  for depmode in $am_compiler_list; do
+    # Setup a source with many dependencies, because some compilers
+    # like to wrap large dependency lists on column 80 (with \), and
+    # we should not choose a depcomp mode which is confused by this.
+    #
+    # We need to recreate these files for each test, as the compiler may
+    # overwrite some of them when testing with obscure command lines.
+    # This happens at least with the AIX C compiler.
+    : > sub/conftest.c
+    for i in 1 2 3 4 5 6; do
+      echo '#include "conftst'$i'.h"' >> sub/conftest.c
+      : > sub/conftst$i.h
+    done
+    echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf
+
+    case $depmode in
+    nosideeffect)
+      # after this tag, mechanisms are not by side-effect, so they'll
+      # only be used when explicitly requested
+      if test "x$enable_dependency_tracking" = xyes; then
+	continue
+      else
+	break
+      fi
+      ;;
+    none) break ;;
+    esac
+    # We check with `-c' and `-o' for the sake of the "dashmstdout"
+    # mode.  It turns out that the SunPro C++ compiler does not properly
+    # handle `-M -o', and we need to detect this.
+    if depmode=$depmode \
+       source=sub/conftest.c object=sub/conftest.${OBJEXT-o} \
+       depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \
+       $SHELL ./depcomp $depcc -c -o sub/conftest.${OBJEXT-o} sub/conftest.c \
+         >/dev/null 2>conftest.err &&
+       grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 &&
+       grep sub/conftest.${OBJEXT-o} sub/conftest.Po > /dev/null 2>&1 &&
+       ${MAKE-make} -s -f confmf > /dev/null 2>&1; then
+      # icc doesn't choke on unknown options, it will just issue warnings
+      # (even with -Werror).  So we grep stderr for any message
+      # that says an option was ignored.
+      if grep 'ignoring option' conftest.err >/dev/null 2>&1; then :; else
+        am_cv_CXX_dependencies_compiler_type=$depmode
+        break
+      fi
+    fi
+  done
+
+  cd ..
+  rm -rf conftest.dir
+else
+  am_cv_CXX_dependencies_compiler_type=none
+fi
+
+fi
+echo "$as_me:$LINENO: result: $am_cv_CXX_dependencies_compiler_type" >&5
+echo "${ECHO_T}$am_cv_CXX_dependencies_compiler_type" >&6
+CXXDEPMODE=depmode=$am_cv_CXX_dependencies_compiler_type
+
+
+
+if
+  test "x$enable_dependency_tracking" != xno \
+  && test "$am_cv_CXX_dependencies_compiler_type" = gcc3; then
+  am__fastdepCXX_TRUE=
+  am__fastdepCXX_FALSE='#'
+else
+  am__fastdepCXX_TRUE='#'
+  am__fastdepCXX_FALSE=
+fi
+
+
+
+# Check whether --enable-fortran or --disable-fortran was given.
+if test "${enable_fortran+set}" = set; then
+  enableval="$enable_fortran"
+
+else
+  enableval="yes"
+fi;
+
+case "$enableval" in
+  yes)
+    BUILD_FORTRAN="yes"
+    ac_ext=f
+ac_compile='$F77 -c $FFLAGS conftest.$ac_ext >&5'
+ac_link='$F77 -o conftest$ac_exeext $FFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_f77_compiler_gnu
+if test -n "$ac_tool_prefix"; then
+  for ac_prog in g77 f77 xlf frt pgf77 fl32 af77 fort77 f90 xlf90 pgf90 epcf90 f95 fort xlf95 lf95 g95
+  do
+    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
+set dummy $ac_tool_prefix$ac_prog; ac_word=$2
+echo "$as_me:$LINENO: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
+if test "${ac_cv_prog_F77+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  if test -n "$F77"; then
+  ac_cv_prog_F77="$F77" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+  for ac_exec_ext in '' $ac_executable_extensions; do
+  if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+    ac_cv_prog_F77="$ac_tool_prefix$ac_prog"
+    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+done
+
+fi
+fi
+F77=$ac_cv_prog_F77
+if test -n "$F77"; then
+  echo "$as_me:$LINENO: result: $F77" >&5
+echo "${ECHO_T}$F77" >&6
+else
+  echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
+fi
+
+    test -n "$F77" && break
+  done
+fi
+if test -z "$F77"; then
+  ac_ct_F77=$F77
+  for ac_prog in g77 f77 xlf frt pgf77 fl32 af77 fort77 f90 xlf90 pgf90 epcf90 f95 fort xlf95 lf95 g95
+do
+  # Extract the first word of "$ac_prog", so it can be a program name with args.
+set dummy $ac_prog; ac_word=$2
+echo "$as_me:$LINENO: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
+if test "${ac_cv_prog_ac_ct_F77+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  if test -n "$ac_ct_F77"; then
+  ac_cv_prog_ac_ct_F77="$ac_ct_F77" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+  for ac_exec_ext in '' $ac_executable_extensions; do
+  if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+    ac_cv_prog_ac_ct_F77="$ac_prog"
+    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+done
+
+fi
+fi
+ac_ct_F77=$ac_cv_prog_ac_ct_F77
+if test -n "$ac_ct_F77"; then
+  echo "$as_me:$LINENO: result: $ac_ct_F77" >&5
+echo "${ECHO_T}$ac_ct_F77" >&6
+else
+  echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
+fi
+
+  test -n "$ac_ct_F77" && break
+done
+
+  F77=$ac_ct_F77
+fi
+
+
+# Provide some information about the compiler.
+echo "$as_me:3730:" \
+     "checking for Fortran 77 compiler version" >&5
+ac_compiler=`set X $ac_compile; echo $2`
+{ (eval echo "$as_me:$LINENO: \"$ac_compiler --version </dev/null >&5\"") >&5
+  (eval $ac_compiler --version </dev/null >&5) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }
+{ (eval echo "$as_me:$LINENO: \"$ac_compiler -v </dev/null >&5\"") >&5
+  (eval $ac_compiler -v </dev/null >&5) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }
+{ (eval echo "$as_me:$LINENO: \"$ac_compiler -V </dev/null >&5\"") >&5
+  (eval $ac_compiler -V </dev/null >&5) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }
+
+# If we don't use `.F' as extension, the preprocessor is not run on the
+# input file.
+ac_save_ext=$ac_ext
+ac_ext=F
+echo "$as_me:$LINENO: checking whether we are using the GNU Fortran 77 compiler" >&5
+echo $ECHO_N "checking whether we are using the GNU Fortran 77 compiler... $ECHO_C" >&6
+if test "${ac_cv_f77_compiler_gnu+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  cat >conftest.$ac_ext <<_ACEOF
+      program main
+#ifndef __GNUC__
+       choke me
+#endif
+
+      end
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+  (eval $ac_compile) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } &&
+         { ac_try='test -s conftest.$ac_objext'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+  ac_compiler_gnu=yes
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_compiler_gnu=no
+fi
+rm -f conftest.$ac_objext conftest.$ac_ext
+ac_cv_f77_compiler_gnu=$ac_compiler_gnu
+
+fi
+echo "$as_me:$LINENO: result: $ac_cv_f77_compiler_gnu" >&5
+echo "${ECHO_T}$ac_cv_f77_compiler_gnu" >&6
+ac_ext=$ac_save_ext
+G77=`test $ac_compiler_gnu = yes && echo yes`
+ac_test_FFLAGS=${FFLAGS+set}
+ac_save_FFLAGS=$FFLAGS
+FFLAGS=
+echo "$as_me:$LINENO: checking whether $F77 accepts -g" >&5
+echo $ECHO_N "checking whether $F77 accepts -g... $ECHO_C" >&6
+if test "${ac_cv_prog_f77_g+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  FFLAGS=-g
+cat >conftest.$ac_ext <<_ACEOF
+      program main
+
+      end
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+  (eval $ac_compile) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } &&
+         { ac_try='test -s conftest.$ac_objext'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+  ac_cv_prog_f77_g=yes
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_cv_prog_f77_g=no
+fi
+rm -f conftest.$ac_objext conftest.$ac_ext
+
+fi
+echo "$as_me:$LINENO: result: $ac_cv_prog_f77_g" >&5
+echo "${ECHO_T}$ac_cv_prog_f77_g" >&6
+if test "$ac_test_FFLAGS" = set; then
+  FFLAGS=$ac_save_FFLAGS
+elif test $ac_cv_prog_f77_g = yes; then
+  if test "$G77" = yes; then
+    FFLAGS="-g -O2"
+  else
+    FFLAGS="-g"
+  fi
+else
+  if test "$G77" = yes; then
+    FFLAGS="-O2"
+  else
+    FFLAGS=
+  fi
+fi
+ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
+
+    if test "X$F77" = "X"; then
+      BUILD_FORTRAN="no"
+    fi
+    ;;
+  no)
+    BUILD_FORTRAN="no"
+    ;;
+esac
+
+
+
+if test "X$BUILD_FORTRAN" = "Xyes"; then
+  HDF_BUILD_FORTRAN_TRUE=
+  HDF_BUILD_FORTRAN_FALSE='#'
+else
+  HDF_BUILD_FORTRAN_TRUE='#'
+  HDF_BUILD_FORTRAN_FALSE=
+fi
+
+
+# Find a good install program.  We prefer a C program (faster),
+# so one script is as good as another.  But avoid the broken or
+# incompatible versions:
+# SysV /etc/install, /usr/sbin/install
+# SunOS /usr/etc/install
+# IRIX /sbin/install
+# AIX /bin/install
+# AmigaOS /C/install, which installs bootblocks on floppy discs
+# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
+# AFS /usr/afsws/bin/install, which mishandles nonexistent args
+# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
+# ./install, which can be erroneously created by make from ./install.sh.
+echo "$as_me:$LINENO: checking for a BSD-compatible install" >&5
+echo $ECHO_N "checking for a BSD-compatible install... $ECHO_C" >&6
+if test -z "$INSTALL"; then
+if test "${ac_cv_path_install+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+  # Account for people who put trailing slashes in PATH elements.
+case $as_dir/ in
+  ./ | .// | /cC/* | \
+  /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \
+  /usr/ucb/* ) ;;
+  *)
+    # OSF1 and SCO ODT 3.0 have their own names for install.
+    # Don't use installbsd from OSF since it installs stuff as root
+    # by default.
+    for ac_prog in ginstall scoinst install; do
+      for ac_exec_ext in '' $ac_executable_extensions; do
+        if $as_executable_p "$as_dir/$ac_prog$ac_exec_ext"; then
+          if test $ac_prog = install &&
+            grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
+            # AIX install.  It has an incompatible calling convention.
+            :
+          elif test $ac_prog = install &&
+            grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
+            # program-specific install script used by HP pwplus--don't use.
+            :
+          else
+            ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c"
+            break 3
+          fi
         fi
+      done
+    done
+    ;;
 esac
+done
 
-# default exec_prefix
-case "${exec_prefixoption}" in
-"") exec_prefix="\$(prefix)" ;;
-*) ;;
+
+fi
+  if test "${ac_cv_path_install+set}" = set; then
+    INSTALL=$ac_cv_path_install
+  else
+    # As a last resort, use the slow shell script.  We don't cache a
+    # path for INSTALL within a source directory, because that will
+    # break other packages using the cache if that directory is
+    # removed, or if the path is relative.
+    INSTALL=$ac_install_sh
+  fi
+fi
+echo "$as_me:$LINENO: result: $INSTALL" >&5
+echo "${ECHO_T}$INSTALL" >&6
+
+# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
+# It thinks the first close brace ends the variable substitution.
+test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
+
+test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
+
+test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
+
+
+for ac_prog in flex lex
+do
+  # Extract the first word of "$ac_prog", so it can be a program name with args.
+set dummy $ac_prog; ac_word=$2
+echo "$as_me:$LINENO: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
+if test "${ac_cv_prog_LEX+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  if test -n "$LEX"; then
+  ac_cv_prog_LEX="$LEX" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+  for ac_exec_ext in '' $ac_executable_extensions; do
+  if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+    ac_cv_prog_LEX="$ac_prog"
+    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+done
+
+fi
+fi
+LEX=$ac_cv_prog_LEX
+if test -n "$LEX"; then
+  echo "$as_me:$LINENO: result: $LEX" >&5
+echo "${ECHO_T}$LEX" >&6
+else
+  echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
+fi
+
+  test -n "$LEX" && break
+done
+test -n "$LEX" || LEX=":"
+
+if test -z "$LEXLIB"
+then
+  echo "$as_me:$LINENO: checking for yywrap in -lfl" >&5
+echo $ECHO_N "checking for yywrap in -lfl... $ECHO_C" >&6
+if test "${ac_cv_lib_fl_yywrap+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  ac_check_lib_save_LIBS=$LIBS
+LIBS="-lfl  $LIBS"
+cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+
+/* Override any gcc2 internal prototype to avoid an error.  */
+#ifdef __cplusplus
+extern "C"
+#endif
+/* We use char because int might match the return type of a gcc2
+   builtin and then its argument prototype would still apply.  */
+char yywrap ();
+int
+main ()
+{
+yywrap ();
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+  (eval $ac_link) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } &&
+         { ac_try='test -s conftest$ac_exeext'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+  ac_cv_lib_fl_yywrap=yes
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_cv_lib_fl_yywrap=no
+fi
+rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+echo "$as_me:$LINENO: result: $ac_cv_lib_fl_yywrap" >&5
+echo "${ECHO_T}$ac_cv_lib_fl_yywrap" >&6
+if test $ac_cv_lib_fl_yywrap = yes; then
+  LEXLIB="-lfl"
+else
+  echo "$as_me:$LINENO: checking for yywrap in -ll" >&5
+echo $ECHO_N "checking for yywrap in -ll... $ECHO_C" >&6
+if test "${ac_cv_lib_l_yywrap+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  ac_check_lib_save_LIBS=$LIBS
+LIBS="-ll  $LIBS"
+cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+
+/* Override any gcc2 internal prototype to avoid an error.  */
+#ifdef __cplusplus
+extern "C"
+#endif
+/* We use char because int might match the return type of a gcc2
+   builtin and then its argument prototype would still apply.  */
+char yywrap ();
+int
+main ()
+{
+yywrap ();
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+  (eval $ac_link) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } &&
+         { ac_try='test -s conftest$ac_exeext'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+  ac_cv_lib_l_yywrap=yes
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_cv_lib_l_yywrap=no
+fi
+rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+echo "$as_me:$LINENO: result: $ac_cv_lib_l_yywrap" >&5
+echo "${ECHO_T}$ac_cv_lib_l_yywrap" >&6
+if test $ac_cv_lib_l_yywrap = yes; then
+  LEXLIB="-ll"
+fi
+
+fi
+
+fi
+
+if test "x$LEX" != "x:"; then
+  echo "$as_me:$LINENO: checking lex output file root" >&5
+echo $ECHO_N "checking lex output file root... $ECHO_C" >&6
+if test "${ac_cv_prog_lex_root+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  # The minimal lex program is just a single line: %%.  But some broken lexes
+# (Solaris, I think it was) want two %% lines, so accommodate them.
+cat >conftest.l <<_ACEOF
+%%
+%%
+_ACEOF
+{ (eval echo "$as_me:$LINENO: \"$LEX conftest.l\"") >&5
+  (eval $LEX conftest.l) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }
+if test -f lex.yy.c; then
+  ac_cv_prog_lex_root=lex.yy
+elif test -f lexyy.c; then
+  ac_cv_prog_lex_root=lexyy
+else
+  { { echo "$as_me:$LINENO: error: cannot find output from $LEX; giving up" >&5
+echo "$as_me: error: cannot find output from $LEX; giving up" >&2;}
+   { (exit 1); exit 1; }; }
+fi
+fi
+echo "$as_me:$LINENO: result: $ac_cv_prog_lex_root" >&5
+echo "${ECHO_T}$ac_cv_prog_lex_root" >&6
+rm -f conftest.l
+LEX_OUTPUT_ROOT=$ac_cv_prog_lex_root
+
+echo "$as_me:$LINENO: checking whether yytext is a pointer" >&5
+echo $ECHO_N "checking whether yytext is a pointer... $ECHO_C" >&6
+if test "${ac_cv_prog_lex_yytext_pointer+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  # POSIX says lex can declare yytext either as a pointer or an array; the
+# default is implementation-dependent. Figure out which it is, since
+# not all implementations provide the %pointer and %array declarations.
+ac_cv_prog_lex_yytext_pointer=no
+echo 'extern char *yytext;' >>$LEX_OUTPUT_ROOT.c
+ac_save_LIBS=$LIBS
+LIBS="$LIBS $LEXLIB"
+cat >conftest.$ac_ext <<_ACEOF
+`cat $LEX_OUTPUT_ROOT.c`
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+  (eval $ac_link) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } &&
+         { ac_try='test -s conftest$ac_exeext'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+  ac_cv_prog_lex_yytext_pointer=yes
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+fi
+rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_save_LIBS
+rm -f "${LEX_OUTPUT_ROOT}.c"
+
+fi
+echo "$as_me:$LINENO: result: $ac_cv_prog_lex_yytext_pointer" >&5
+echo "${ECHO_T}$ac_cv_prog_lex_yytext_pointer" >&6
+if test $ac_cv_prog_lex_yytext_pointer = yes; then
+
+cat >>confdefs.h <<\_ACEOF
+#define YYTEXT_POINTER 1
+_ACEOF
+
+fi
+
+fi
+if test "$LEX" = :; then
+  LEX=${am_missing_run}flex
+fi
+echo "$as_me:$LINENO: checking whether ln -s works" >&5
+echo $ECHO_N "checking whether ln -s works... $ECHO_C" >&6
+LN_S=$as_ln_s
+if test "$LN_S" = "ln -s"; then
+  echo "$as_me:$LINENO: result: yes" >&5
+echo "${ECHO_T}yes" >&6
+else
+  echo "$as_me:$LINENO: result: no, using $LN_S" >&5
+echo "${ECHO_T}no, using $LN_S" >&6
+fi
+
+if test -n "$ac_tool_prefix"; then
+  # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
+set dummy ${ac_tool_prefix}ranlib; ac_word=$2
+echo "$as_me:$LINENO: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
+if test "${ac_cv_prog_RANLIB+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  if test -n "$RANLIB"; then
+  ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+  for ac_exec_ext in '' $ac_executable_extensions; do
+  if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+    ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
+    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+done
+
+fi
+fi
+RANLIB=$ac_cv_prog_RANLIB
+if test -n "$RANLIB"; then
+  echo "$as_me:$LINENO: result: $RANLIB" >&5
+echo "${ECHO_T}$RANLIB" >&6
+else
+  echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
+fi
+
+fi
+if test -z "$ac_cv_prog_RANLIB"; then
+  ac_ct_RANLIB=$RANLIB
+  # Extract the first word of "ranlib", so it can be a program name with args.
+set dummy ranlib; ac_word=$2
+echo "$as_me:$LINENO: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
+if test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  if test -n "$ac_ct_RANLIB"; then
+  ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+  for ac_exec_ext in '' $ac_executable_extensions; do
+  if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+    ac_cv_prog_ac_ct_RANLIB="ranlib"
+    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+done
+
+  test -z "$ac_cv_prog_ac_ct_RANLIB" && ac_cv_prog_ac_ct_RANLIB=":"
+fi
+fi
+ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
+if test -n "$ac_ct_RANLIB"; then
+  echo "$as_me:$LINENO: result: $ac_ct_RANLIB" >&5
+echo "${ECHO_T}$ac_ct_RANLIB" >&6
+else
+  echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
+fi
+
+  RANLIB=$ac_ct_RANLIB
+else
+  RANLIB="$ac_cv_prog_RANLIB"
+fi
+
+for ac_prog in 'bison -y' byacc
+do
+  # Extract the first word of "$ac_prog", so it can be a program name with args.
+set dummy $ac_prog; ac_word=$2
+echo "$as_me:$LINENO: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
+if test "${ac_cv_prog_YACC+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  if test -n "$YACC"; then
+  ac_cv_prog_YACC="$YACC" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+  for ac_exec_ext in '' $ac_executable_extensions; do
+  if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+    ac_cv_prog_YACC="$ac_prog"
+    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+done
+
+fi
+fi
+YACC=$ac_cv_prog_YACC
+if test -n "$YACC"; then
+  echo "$as_me:$LINENO: result: $YACC" >&5
+echo "${ECHO_T}$YACC" >&6
+else
+  echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
+fi
+
+  test -n "$YACC" && break
+done
+test -n "$YACC" || YACC="yacc"
+
+
+for ac_prog in ar xar
+do
+  # Extract the first word of "$ac_prog", so it can be a program name with args.
+set dummy $ac_prog; ac_word=$2
+echo "$as_me:$LINENO: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
+if test "${ac_cv_prog_AR+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  if test -n "$AR"; then
+  ac_cv_prog_AR="$AR" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+  for ac_exec_ext in '' $ac_executable_extensions; do
+  if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+    ac_cv_prog_AR="$ac_prog"
+    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+done
+
+fi
+fi
+AR=$ac_cv_prog_AR
+if test -n "$AR"; then
+  echo "$as_me:$LINENO: result: $AR" >&5
+echo "${ECHO_T}$AR" >&6
+else
+  echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
+fi
+
+  test -n "$AR" && break
+done
+test -n "$AR" || AR=":"
+
+
+# Extract the first word of "diff", so it can be a program name with args.
+set dummy diff; ac_word=$2
+echo "$as_me:$LINENO: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
+if test "${ac_cv_prog_DIFF+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  if test -n "$DIFF"; then
+  ac_cv_prog_DIFF="$DIFF" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+  for ac_exec_ext in '' $ac_executable_extensions; do
+  if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+    ac_cv_prog_DIFF="diff -w"
+    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+done
+
+fi
+fi
+DIFF=$ac_cv_prog_DIFF
+if test -n "$DIFF"; then
+  echo "$as_me:$LINENO: result: $DIFF" >&5
+echo "${ECHO_T}$DIFF" >&6
+else
+  echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
+fi
+
+# Extract the first word of "makeinfo", so it can be a program name with args.
+set dummy makeinfo; ac_word=$2
+echo "$as_me:$LINENO: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
+if test "${ac_cv_prog_MAKEINFO+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  if test -n "$MAKEINFO"; then
+  ac_cv_prog_MAKEINFO="$MAKEINFO" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+  for ac_exec_ext in '' $ac_executable_extensions; do
+  if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+    ac_cv_prog_MAKEINFO="makeinfo"
+    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+done
+
+fi
+fi
+MAKEINFO=$ac_cv_prog_MAKEINFO
+if test -n "$MAKEINFO"; then
+  echo "$as_me:$LINENO: result: $MAKEINFO" >&5
+echo "${ECHO_T}$MAKEINFO" >&6
+else
+  echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
+fi
+
+# Extract the first word of "neqn", so it can be a program name with args.
+set dummy neqn; ac_word=$2
+echo "$as_me:$LINENO: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
+if test "${ac_cv_prog_NEQN+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  if test -n "$NEQN"; then
+  ac_cv_prog_NEQN="$NEQN" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+  for ac_exec_ext in '' $ac_executable_extensions; do
+  if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+    ac_cv_prog_NEQN="neqn"
+    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+done
+
+fi
+fi
+NEQN=$ac_cv_prog_NEQN
+if test -n "$NEQN"; then
+  echo "$as_me:$LINENO: result: $NEQN" >&5
+echo "${ECHO_T}$NEQN" >&6
+else
+  echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
+fi
+
+# Extract the first word of "tbl", so it can be a program name with args.
+set dummy tbl; ac_word=$2
+echo "$as_me:$LINENO: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
+if test "${ac_cv_prog_TBL+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  if test -n "$TBL"; then
+  ac_cv_prog_TBL="$TBL" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+  for ac_exec_ext in '' $ac_executable_extensions; do
+  if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+    ac_cv_prog_TBL="tbl"
+    echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+done
+
+fi
+fi
+TBL=$ac_cv_prog_TBL
+if test -n "$TBL"; then
+  echo "$as_me:$LINENO: result: $TBL" >&5
+echo "${ECHO_T}$TBL" >&6
+else
+  echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
+fi
+
+
+
+
+
+
+
+# Check whether --with-fnord or --without-fnord was given.
+if test "${with_fnord+set}" = set; then
+  withval="$with_fnord"
+
+fi;
+
+
+# Check whether --with-zlib or --without-zlib was given.
+if test "${with_zlib+set}" = set; then
+  withval="$with_zlib"
+
+else
+  withval=yes
+fi;
+
+case "$withval" in
+  yes)
+    HAVE_ZLIB="yes"
+
+echo "$as_me:$LINENO: checking for egrep" >&5
+echo $ECHO_N "checking for egrep... $ECHO_C" >&6
+if test "${ac_cv_prog_egrep+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  if echo a | (grep -E '(a|b)') >/dev/null 2>&1
+    then ac_cv_prog_egrep='grep -E'
+    else ac_cv_prog_egrep='egrep'
+    fi
+fi
+echo "$as_me:$LINENO: result: $ac_cv_prog_egrep" >&5
+echo "${ECHO_T}$ac_cv_prog_egrep" >&6
+ EGREP=$ac_cv_prog_egrep
+
+
+echo "$as_me:$LINENO: checking for ANSI C header files" >&5
+echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6
+if test "${ac_cv_header_stdc+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+#include <stdlib.h>
+#include <stdarg.h>
+#include <string.h>
+#include <float.h>
+
+int
+main ()
+{
+
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+  (eval $ac_compile) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } &&
+         { ac_try='test -s conftest.$ac_objext'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+  ac_cv_header_stdc=yes
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_cv_header_stdc=no
+fi
+rm -f conftest.$ac_objext conftest.$ac_ext
+
+if test $ac_cv_header_stdc = yes; then
+  # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
+  cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+#include <string.h>
+
+_ACEOF
+if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
+  $EGREP "memchr" >/dev/null 2>&1; then
+  :
+else
+  ac_cv_header_stdc=no
+fi
+rm -f conftest*
+
+fi
+
+if test $ac_cv_header_stdc = yes; then
+  # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
+  cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+#include <stdlib.h>
+
+_ACEOF
+if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
+  $EGREP "free" >/dev/null 2>&1; then
+  :
+else
+  ac_cv_header_stdc=no
+fi
+rm -f conftest*
+
+fi
+
+if test $ac_cv_header_stdc = yes; then
+  # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
+  if test "$cross_compiling" = yes; then
+  :
+else
+  cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+#include <ctype.h>
+#if ((' ' & 0x0FF) == 0x020)
+# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
+# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
+#else
+# define ISLOWER(c) \
+                   (('a' <= (c) && (c) <= 'i') \
+                     || ('j' <= (c) && (c) <= 'r') \
+                     || ('s' <= (c) && (c) <= 'z'))
+# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
+#endif
+
+#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
+int
+main ()
+{
+  int i;
+  for (i = 0; i < 256; i++)
+    if (XOR (islower (i), ISLOWER (i))
+        || toupper (i) != TOUPPER (i))
+      exit(2);
+  exit (0);
+}
+_ACEOF
+rm -f conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+  (eval $ac_link) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+  :
+else
+  echo "$as_me: program exited with status $ac_status" >&5
+echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+( exit $ac_status )
+ac_cv_header_stdc=no
+fi
+rm -f core core.* *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
+fi
+fi
+fi
+echo "$as_me:$LINENO: result: $ac_cv_header_stdc" >&5
+echo "${ECHO_T}$ac_cv_header_stdc" >&6
+if test $ac_cv_header_stdc = yes; then
+
+cat >>confdefs.h <<\_ACEOF
+#define STDC_HEADERS 1
+_ACEOF
+
+fi
+
+# On IRIX 5.3, sys/types and inttypes.h are conflicting.
+
+
+
+
+
+
+
+
+
+for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
+                  inttypes.h stdint.h unistd.h
+do
+as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
+echo "$as_me:$LINENO: checking for $ac_header" >&5
+echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
+if eval "test \"\${$as_ac_Header+set}\" = set"; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+$ac_includes_default
+
+#include <$ac_header>
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+  (eval $ac_compile) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } &&
+         { ac_try='test -s conftest.$ac_objext'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+  eval "$as_ac_Header=yes"
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+eval "$as_ac_Header=no"
+fi
+rm -f conftest.$ac_objext conftest.$ac_ext
+fi
+echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
+if test `eval echo '${'$as_ac_Header'}'` = yes; then
+  cat >>confdefs.h <<_ACEOF
+#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
+_ACEOF
+
+fi
+
+done
+
+
+
+for ac_header in zlib.h
+do
+as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
+if eval "test \"\${$as_ac_Header+set}\" = set"; then
+  echo "$as_me:$LINENO: checking for $ac_header" >&5
+echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
+if eval "test \"\${$as_ac_Header+set}\" = set"; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+fi
+echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
+else
+  # Is the header compilable?
+echo "$as_me:$LINENO: checking $ac_header usability" >&5
+echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
+cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+$ac_includes_default
+#include <$ac_header>
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+  (eval $ac_compile) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } &&
+         { ac_try='test -s conftest.$ac_objext'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+  ac_header_compiler=yes
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_header_compiler=no
+fi
+rm -f conftest.$ac_objext conftest.$ac_ext
+echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
+echo "${ECHO_T}$ac_header_compiler" >&6
+
+# Is the header present?
+echo "$as_me:$LINENO: checking $ac_header presence" >&5
+echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
+cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+#include <$ac_header>
+_ACEOF
+if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&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; then
+  if test -s conftest.err; then
+    ac_cpp_err=$ac_c_preproc_warn_flag
+  else
+    ac_cpp_err=
+  fi
+else
+  ac_cpp_err=yes
+fi
+if test -z "$ac_cpp_err"; then
+  ac_header_preproc=yes
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+  ac_header_preproc=no
+fi
+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 in
+  yes:no )
+    { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
+echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
+    { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
+echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
+    (
+      cat <<\_ASBOX
+## ------------------------------------ ##
+## Report this to bug-autoconf at gnu.org. ##
+## ------------------------------------ ##
+_ASBOX
+    ) |
+      sed "s/^/$as_me: WARNING:     /" >&2
+    ;;
+  no:yes )
+    { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
+echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
+    { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
+echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
+    { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
+echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
+    (
+      cat <<\_ASBOX
+## ------------------------------------ ##
+## Report this to bug-autoconf at gnu.org. ##
+## ------------------------------------ ##
+_ASBOX
+    ) |
+      sed "s/^/$as_me: WARNING:     /" >&2
+    ;;
 esac
+echo "$as_me:$LINENO: checking for $ac_header" >&5
+echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
+if eval "test \"\${$as_ac_Header+set}\" = set"; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  eval "$as_ac_Header=$ac_header_preproc"
+fi
+echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
 
-### break up ${srcdir}/configure.in.
-case "`grep '^# per\-host:' ${srcdir}/configure.in`" in
-"")
-        echo '***' ${srcdir}/configure.in has no \"per-host:\" line. 1>&2
-        exit 1
+fi
+if test `eval echo '${'$as_ac_Header'}'` = yes; then
+  cat >>confdefs.h <<_ACEOF
+#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
+_ACEOF
+
+else
+  unset HAVE_ZLIB
+fi
+
+done
+
+
+echo "$as_me:$LINENO: checking for compress2 in -lz" >&5
+echo $ECHO_N "checking for compress2 in -lz... $ECHO_C" >&6
+if test "${ac_cv_lib_z_compress2+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  ac_check_lib_save_LIBS=$LIBS
+LIBS="-lz  $LIBS"
+cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+
+/* Override any gcc2 internal prototype to avoid an error.  */
+#ifdef __cplusplus
+extern "C"
+#endif
+/* We use char because int might match the return type of a gcc2
+   builtin and then its argument prototype would still apply.  */
+char compress2 ();
+int
+main ()
+{
+compress2 ();
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+  (eval $ac_link) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } &&
+         { ac_try='test -s conftest$ac_exeext'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+  ac_cv_lib_z_compress2=yes
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_cv_lib_z_compress2=no
+fi
+rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+echo "$as_me:$LINENO: result: $ac_cv_lib_z_compress2" >&5
+echo "${ECHO_T}$ac_cv_lib_z_compress2" >&6
+if test $ac_cv_lib_z_compress2 = yes; then
+  cat >>confdefs.h <<_ACEOF
+#define HAVE_LIBZ 1
+_ACEOF
+
+  LIBS="-lz $LIBS"
+
+else
+  unset HAVE_ZLIB
+fi
+
+
+    if test -z "$HAVE_ZLIB"; then
+      { { echo "$as_me:$LINENO: error: couldn't find zlib library" >&5
+echo "$as_me: error: couldn't find zlib library" >&2;}
+   { (exit 1); exit 1; }; }
+    fi
+    ;;
+  no)
+    { { echo "$as_me:$LINENO: error: zlib library required to build HDF4" >&5
+echo "$as_me: error: zlib library required to build HDF4" >&2;}
+   { (exit 1); exit 1; }; }
+    ;;
+  *)
+    HAVE_ZLIB="yes"
+    case "$withval" in
+      *,*)
+        zlib_inc="`echo $withval | cut -f1 -d,`"
+        zlib_lib="`echo $withval | cut -f2 -d, -s`"
         ;;
-*) ;;
+      *)
+        if test -n "$withval"; then
+          zlib_inc="$withval/include"
+          zlib_lib="$withval/lib"
+        fi
+        ;;
+    esac
+
+            if test "X$zlib_inc" = "X/usr/include"; then
+      zlib_inc=""
+    fi
+    if test "X$zlib_lib" = "X/usr/lib"; then
+      zlib_lib=""
+    fi
+
+    if test -n "$zlib_inc"; then
+      CPPFLAGS="$CPPFLAGS -I$zlib_inc"
+    fi
+
+
+for ac_header in zlib.h
+do
+as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
+if eval "test \"\${$as_ac_Header+set}\" = set"; then
+  echo "$as_me:$LINENO: checking for $ac_header" >&5
+echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
+if eval "test \"\${$as_ac_Header+set}\" = set"; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+fi
+echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
+else
+  # Is the header compilable?
+echo "$as_me:$LINENO: checking $ac_header usability" >&5
+echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
+cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+$ac_includes_default
+#include <$ac_header>
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+  (eval $ac_compile) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } &&
+         { ac_try='test -s conftest.$ac_objext'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+  ac_header_compiler=yes
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_header_compiler=no
+fi
+rm -f conftest.$ac_objext conftest.$ac_ext
+echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
+echo "${ECHO_T}$ac_header_compiler" >&6
+
+# Is the header present?
+echo "$as_me:$LINENO: checking $ac_header presence" >&5
+echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
+cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+#include <$ac_header>
+_ACEOF
+if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&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; then
+  if test -s conftest.err; then
+    ac_cpp_err=$ac_c_preproc_warn_flag
+  else
+    ac_cpp_err=
+  fi
+else
+  ac_cpp_err=yes
+fi
+if test -z "$ac_cpp_err"; then
+  ac_header_preproc=yes
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+  ac_header_preproc=no
+fi
+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 in
+  yes:no )
+    { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
+echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
+    { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
+echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
+    (
+      cat <<\_ASBOX
+## ------------------------------------ ##
+## Report this to bug-autoconf at gnu.org. ##
+## ------------------------------------ ##
+_ASBOX
+    ) |
+      sed "s/^/$as_me: WARNING:     /" >&2
+    ;;
+  no:yes )
+    { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
+echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
+    { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
+echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
+    { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
+echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
+    (
+      cat <<\_ASBOX
+## ------------------------------------ ##
+## Report this to bug-autoconf at gnu.org. ##
+## ------------------------------------ ##
+_ASBOX
+    ) |
+      sed "s/^/$as_me: WARNING:     /" >&2
+    ;;
 esac
+echo "$as_me:$LINENO: checking for $ac_header" >&5
+echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
+if eval "test \"\${$as_ac_Header+set}\" = set"; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  eval "$as_ac_Header=$ac_header_preproc"
+fi
+echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
 
-case "`grep '^# per\-target:' ${srcdir}/configure.in`" in
-"")
-        echo '***' ${srcdir}/configure.in has no \"per-target:\" line. 1>&2
-        exit 1
-        ;;
-*) ;;
+fi
+if test `eval echo '${'$as_ac_Header'}'` = yes; then
+  cat >>confdefs.h <<_ACEOF
+#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
+_ACEOF
+
+else
+  unset HAVE_ZLIB
+fi
+
+done
+
+
+    if test -n "$zlib_lib"; then
+      LDFLAGS="$LDFLAGS -L$zlib_lib"
+    fi
+
+
+echo "$as_me:$LINENO: checking for compress2 in -lz" >&5
+echo $ECHO_N "checking for compress2 in -lz... $ECHO_C" >&6
+if test "${ac_cv_lib_z_compress2+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  ac_check_lib_save_LIBS=$LIBS
+LIBS="-lz  $LIBS"
+cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+
+/* Override any gcc2 internal prototype to avoid an error.  */
+#ifdef __cplusplus
+extern "C"
+#endif
+/* We use char because int might match the return type of a gcc2
+   builtin and then its argument prototype would still apply.  */
+char compress2 ();
+int
+main ()
+{
+compress2 ();
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+  (eval $ac_link) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } &&
+         { ac_try='test -s conftest$ac_exeext'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+  ac_cv_lib_z_compress2=yes
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_cv_lib_z_compress2=no
+fi
+rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+echo "$as_me:$LINENO: result: $ac_cv_lib_z_compress2" >&5
+echo "${ECHO_T}$ac_cv_lib_z_compress2" >&6
+if test $ac_cv_lib_z_compress2 = yes; then
+  cat >>confdefs.h <<_ACEOF
+#define HAVE_LIBZ 1
+_ACEOF
+
+  LIBS="-lz $LIBS"
+
+else
+  unset HAVE_ZLIB
+fi
+
+
+    if test -z "$HAVE_ZLIB"; then
+      { { echo "$as_me:$LINENO: error: couldn't find zlib library" >&5
+echo "$as_me: error: couldn't find zlib library" >&2;}
+   { (exit 1); exit 1; }; }
+    fi
+    ;;
 esac
 
-case "${TMPDIR}" in
-"") TMPDIR=/tmp ; export TMPDIR ;;
-*) ;;
+
+# Check whether --with-jpeg or --without-jpeg was given.
+if test "${with_jpeg+set}" = set; then
+  withval="$with_jpeg"
+
+else
+  withval=yes
+fi;
+
+case "$withval" in
+  yes)
+    HAVE_JPEG="yes"
+
+for ac_header in jpeglib.h
+do
+as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
+if eval "test \"\${$as_ac_Header+set}\" = set"; then
+  echo "$as_me:$LINENO: checking for $ac_header" >&5
+echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
+if eval "test \"\${$as_ac_Header+set}\" = set"; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+fi
+echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
+else
+  # Is the header compilable?
+echo "$as_me:$LINENO: checking $ac_header usability" >&5
+echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
+cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+$ac_includes_default
+#include <$ac_header>
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+  (eval $ac_compile) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } &&
+         { ac_try='test -s conftest.$ac_objext'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+  ac_header_compiler=yes
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_header_compiler=no
+fi
+rm -f conftest.$ac_objext conftest.$ac_ext
+echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
+echo "${ECHO_T}$ac_header_compiler" >&6
+
+# Is the header present?
+echo "$as_me:$LINENO: checking $ac_header presence" >&5
+echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
+cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+#include <$ac_header>
+_ACEOF
+if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&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; then
+  if test -s conftest.err; then
+    ac_cpp_err=$ac_c_preproc_warn_flag
+  else
+    ac_cpp_err=
+  fi
+else
+  ac_cpp_err=yes
+fi
+if test -z "$ac_cpp_err"; then
+  ac_header_preproc=yes
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+  ac_header_preproc=no
+fi
+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 in
+  yes:no )
+    { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
+echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
+    { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
+echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
+    (
+      cat <<\_ASBOX
+## ------------------------------------ ##
+## Report this to bug-autoconf at gnu.org. ##
+## ------------------------------------ ##
+_ASBOX
+    ) |
+      sed "s/^/$as_me: WARNING:     /" >&2
+    ;;
+  no:yes )
+    { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
+echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
+    { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
+echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
+    { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
+echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
+    (
+      cat <<\_ASBOX
+## ------------------------------------ ##
+## Report this to bug-autoconf at gnu.org. ##
+## ------------------------------------ ##
+_ASBOX
+    ) |
+      sed "s/^/$as_me: WARNING:     /" >&2
+    ;;
 esac
+echo "$as_me:$LINENO: checking for $ac_header" >&5
+echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
+if eval "test \"\${$as_ac_Header+set}\" = set"; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  eval "$as_ac_Header=$ac_header_preproc"
+fi
+echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
 
-# keep this filename short for &%*%$*# 14 char file names
-tmpfile=${TMPDIR}/cONf$$
-# Note that under many versions of sh a trap handler for 0 will *override* any
-# exit status you explicitly specify!  At this point, the only non-error exit
-# is at the end of the script; these actions are duplicated there, minus
-# the "exit 1".  Don't use "exit 0" anywhere after this without resetting the
-# trap handler, or you'll lose.
-trap "rm -f ${tmpfile}.com ${tmpfile}.tgt ${tmpfile}.hst ${tmpfile}.pos; exit 1" 0 1 2 15
+fi
+if test `eval echo '${'$as_ac_Header'}'` = yes; then
+  cat >>confdefs.h <<_ACEOF
+#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
+_ACEOF
 
-# split ${srcdir}/configure.in into common, per-host, per-target,
-# and post-target parts.  Post-target is optional.
-sed -e '/^# per\-host:/,$d' ${srcdir}/configure.in > ${tmpfile}.com
-sed -e '1,/^# per\-host:/d' -e '/^# per\-target:/,$d' ${srcdir}/configure.in > ${tmpfile}.hst
-if grep '^# post-target:' ${srcdir}/configure.in >/dev/null ; then
-  sed -e '1,/^# per\-target:/d' -e '/^# post\-target:/,$d' ${srcdir}/configure.in > ${tmpfile}.tgt
-  sed -e '1,/^# post\-target:/d' ${srcdir}/configure.in > ${tmpfile}.pos
 else
-  sed -e '1,/^# per\-target:/d' ${srcdir}/configure.in > ${tmpfile}.tgt
-  echo >${tmpfile}.pos
+  unset HAVE_JPEG
 fi
 
-### do common part of configure.in
+done
 
-. ${tmpfile}.com
 
-# some sanity checks on configure.in
-case "${srctrigger}" in
-"")
-        echo '***' srctrigger not set in ${PWD=`pwd`}/configure.in.  1>&2
-        exit 1
+echo "$as_me:$LINENO: checking for jpeg_start_decompress in -ljpeg" >&5
+echo $ECHO_N "checking for jpeg_start_decompress in -ljpeg... $ECHO_C" >&6
+if test "${ac_cv_lib_jpeg_jpeg_start_decompress+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  ac_check_lib_save_LIBS=$LIBS
+LIBS="-ljpeg  $LIBS"
+cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+
+/* Override any gcc2 internal prototype to avoid an error.  */
+#ifdef __cplusplus
+extern "C"
+#endif
+/* We use char because int might match the return type of a gcc2
+   builtin and then its argument prototype would still apply.  */
+char jpeg_start_decompress ();
+int
+main ()
+{
+jpeg_start_decompress ();
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+  (eval $ac_link) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } &&
+         { ac_try='test -s conftest$ac_exeext'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+  ac_cv_lib_jpeg_jpeg_start_decompress=yes
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_cv_lib_jpeg_jpeg_start_decompress=no
+fi
+rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+echo "$as_me:$LINENO: result: $ac_cv_lib_jpeg_jpeg_start_decompress" >&5
+echo "${ECHO_T}$ac_cv_lib_jpeg_jpeg_start_decompress" >&6
+if test $ac_cv_lib_jpeg_jpeg_start_decompress = yes; then
+  cat >>confdefs.h <<_ACEOF
+#define HAVE_LIBJPEG 1
+_ACEOF
+
+  LIBS="-ljpeg $LIBS"
+
+else
+  unset HAVE_JPEG
+fi
+
+
+    if test -z "$HAVE_JPEG"; then
+      { { echo "$as_me:$LINENO: error: couldn't find jpeg library" >&5
+echo "$as_me: error: couldn't find jpeg library" >&2;}
+   { (exit 1); exit 1; }; }
+    fi
+    ;;
+  no)
+    { { echo "$as_me:$LINENO: error: jpeg library required to build HDF4" >&5
+echo "$as_me: error: jpeg library required to build HDF4" >&2;}
+   { (exit 1); exit 1; }; }
+    ;;
+  *)
+    HAVE_JPEG="yes"
+    case "$withval" in
+      *,*)
+        jpeg_inc="`echo $withval | cut -f1 -d,`"
+        jpeg_lib="`echo $withval | cut -f2 -d, -s`"
         ;;
-*) ;;
+      *)
+        if test -n "$withval"; then
+          jpeg_inc="$withval/include"
+          jpeg_lib="$withval/lib"
+        fi
+        ;;
+    esac
+
+            if test "X$jpeg_inc" = "X/usr/include"; then
+      jpeg_inc=""
+    fi
+    if test "X$jpeg_lib" = "X/usr/lib"; then
+      jpeg_lib=""
+    fi
+
+    if test -n "$jpeg_inc"; then
+      CPPFLAGS="$CPPFLAGS -I$jpeg_inc"
+    fi
+
+
+for ac_header in jpeglib.h
+do
+as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
+if eval "test \"\${$as_ac_Header+set}\" = set"; then
+  echo "$as_me:$LINENO: checking for $ac_header" >&5
+echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
+if eval "test \"\${$as_ac_Header+set}\" = set"; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+fi
+echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
+else
+  # Is the header compilable?
+echo "$as_me:$LINENO: checking $ac_header usability" >&5
+echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
+cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+$ac_includes_default
+#include <$ac_header>
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+  (eval $ac_compile) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } &&
+         { ac_try='test -s conftest.$ac_objext'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+  ac_header_compiler=yes
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_header_compiler=no
+fi
+rm -f conftest.$ac_objext conftest.$ac_ext
+echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
+echo "${ECHO_T}$ac_header_compiler" >&6
+
+# Is the header present?
+echo "$as_me:$LINENO: checking $ac_header presence" >&5
+echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
+cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+#include <$ac_header>
+_ACEOF
+if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&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; then
+  if test -s conftest.err; then
+    ac_cpp_err=$ac_c_preproc_warn_flag
+  else
+    ac_cpp_err=
+  fi
+else
+  ac_cpp_err=yes
+fi
+if test -z "$ac_cpp_err"; then
+  ac_header_preproc=yes
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+  ac_header_preproc=no
+fi
+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 in
+  yes:no )
+    { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
+echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
+    { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
+echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
+    (
+      cat <<\_ASBOX
+## ------------------------------------ ##
+## Report this to bug-autoconf at gnu.org. ##
+## ------------------------------------ ##
+_ASBOX
+    ) |
+      sed "s/^/$as_me: WARNING:     /" >&2
+    ;;
+  no:yes )
+    { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
+echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
+    { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
+echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
+    { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
+echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
+    (
+      cat <<\_ASBOX
+## ------------------------------------ ##
+## Report this to bug-autoconf at gnu.org. ##
+## ------------------------------------ ##
+_ASBOX
+    ) |
+      sed "s/^/$as_me: WARNING:     /" >&2
+    ;;
 esac
+echo "$as_me:$LINENO: checking for $ac_header" >&5
+echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
+if eval "test \"\${$as_ac_Header+set}\" = set"; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  eval "$as_ac_Header=$ac_header_preproc"
+fi
+echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
 
-case "${build_alias}" in
-"")	;;
-*)
-	if result=`${config_shell} ${configsub} ${build_alias}` ; then
-	    buildopt="--build=${build_alias}"
-	    build_cpu=`echo $result | sed 's/^\(.*\)-\(.*\)-\(.*\)$/\1/'`
-	    build_vendor=`echo $result | sed 's/^\(.*\)-\(.*\)-\(.*\)$/\2/'`
-	    build_os=`echo $result | sed 's/^\(.*\)-\(.*\)-\(.*\)$/\3/'`
-	    build=${build_cpu}-${build_vendor}-${build_os}
-	else
-	    echo "Unrecognized build system name ${build_alias}." 1>&2
-	    exit 1
-	fi
-	;;
+fi
+if test `eval echo '${'$as_ac_Header'}'` = yes; then
+  cat >>confdefs.h <<_ACEOF
+#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
+_ACEOF
+
+else
+  unset HAVE_JPEG
+fi
+
+done
+
+
+    if test -n "$jpeg_lib"; then
+      LDFLAGS="$LDFLAGS -L$jpeg_lib"
+    fi
+
+
+echo "$as_me:$LINENO: checking for jpeg_start_decompress in -ljpeg" >&5
+echo $ECHO_N "checking for jpeg_start_decompress in -ljpeg... $ECHO_C" >&6
+if test "${ac_cv_lib_jpeg_jpeg_start_decompress+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  ac_check_lib_save_LIBS=$LIBS
+LIBS="-ljpeg  $LIBS"
+cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+
+/* Override any gcc2 internal prototype to avoid an error.  */
+#ifdef __cplusplus
+extern "C"
+#endif
+/* We use char because int might match the return type of a gcc2
+   builtin and then its argument prototype would still apply.  */
+char jpeg_start_decompress ();
+int
+main ()
+{
+jpeg_start_decompress ();
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+  (eval $ac_link) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } &&
+         { ac_try='test -s conftest$ac_exeext'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+  ac_cv_lib_jpeg_jpeg_start_decompress=yes
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_cv_lib_jpeg_jpeg_start_decompress=no
+fi
+rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+echo "$as_me:$LINENO: result: $ac_cv_lib_jpeg_jpeg_start_decompress" >&5
+echo "${ECHO_T}$ac_cv_lib_jpeg_jpeg_start_decompress" >&6
+if test $ac_cv_lib_jpeg_jpeg_start_decompress = yes; then
+  cat >>confdefs.h <<_ACEOF
+#define HAVE_LIBJPEG 1
+_ACEOF
+
+  LIBS="-ljpeg $LIBS"
+
+else
+  unset HAVE_JPEG
+fi
+
+
+    if test -z "$HAVE_JPEG"; then
+      { { echo "$as_me:$LINENO: error: couldn't find jpeg library" >&5
+echo "$as_me: error: couldn't find jpeg library" >&2;}
+   { (exit 1); exit 1; }; }
+    fi
+    ;;
 esac
 
-if result=`${config_shell} ${configsub} ${host_alias}` ; then
-    true
+
+# Check whether --with-szlib or --without-szlib was given.
+if test "${with_szlib+set}" = set; then
+  withval="$with_szlib"
+
 else
-    echo "Unrecognized host system name ${host_alias}." 1>&2
-    exit 1
+  withval=no
+fi;
+
+case "$withval" in
+  yes)
+    HAVE_SZIP="yes"
+
+for ac_header in szlib.h
+do
+as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
+if eval "test \"\${$as_ac_Header+set}\" = set"; then
+  echo "$as_me:$LINENO: checking for $ac_header" >&5
+echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
+if eval "test \"\${$as_ac_Header+set}\" = set"; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
 fi
-host_cpu=`echo $result | sed 's/^\(.*\)-\(.*\)-\(.*\)$/\1/'`
-host_vendor=`echo $result | sed 's/^\(.*\)-\(.*\)-\(.*\)$/\2/'`
-host_os=`echo $result | sed 's/^\(.*\)-\(.*\)-\(.*\)$/\3/'`
-host=${host_cpu}-${host_vendor}-${host_os}
+echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
+else
+  # Is the header compilable?
+echo "$as_me:$LINENO: checking $ac_header usability" >&5
+echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
+cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+$ac_includes_default
+#include <$ac_header>
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+  (eval $ac_compile) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } &&
+         { ac_try='test -s conftest.$ac_objext'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+  ac_header_compiler=yes
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
 
-. ${tmpfile}.hst
+ac_header_compiler=no
+fi
+rm -f conftest.$ac_objext conftest.$ac_ext
+echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
+echo "${ECHO_T}$ac_header_compiler" >&6
 
-if result=`${config_shell} ${configsub} ${target_alias}` ; then
-    true
+# Is the header present?
+echo "$as_me:$LINENO: checking $ac_header presence" >&5
+echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
+cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+#include <$ac_header>
+_ACEOF
+if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&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; then
+  if test -s conftest.err; then
+    ac_cpp_err=$ac_c_preproc_warn_flag
+  else
+    ac_cpp_err=
+  fi
 else
-    echo "Unrecognized target system name ${target_alias}." 1>&2
-    exit 1
+  ac_cpp_err=yes
 fi
-target_cpu=`echo $result | sed 's/^\(.*\)-\(.*\)-\(.*\)$/\1/'`
-target_vendor=`echo $result | sed 's/^\(.*\)-\(.*\)-\(.*\)$/\2/'`
-target_os=`echo $result | sed 's/^\(.*\)-\(.*\)-\(.*\)$/\3/'`
-target=${target_cpu}-${target_vendor}-${target_os}
+if test -z "$ac_cpp_err"; then
+  ac_header_preproc=yes
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
 
-. ${tmpfile}.tgt
+  ac_header_preproc=no
+fi
+rm -f conftest.err conftest.$ac_ext
+echo "$as_me:$LINENO: result: $ac_header_preproc" >&5
+echo "${ECHO_T}$ac_header_preproc" >&6
 
-# Find the source files, if location was not specified.
-case "${srcdir}" in
-"")
-        srcdirdefaulted=1
-        srcdir=.
-        if [ ! -r ${srctrigger} ] ; then
-                srcdir=..
+# So?  What about this header?
+case $ac_header_compiler:$ac_header_preproc in
+  yes:no )
+    { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
+echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
+    { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
+echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
+    (
+      cat <<\_ASBOX
+## ------------------------------------ ##
+## Report this to bug-autoconf at gnu.org. ##
+## ------------------------------------ ##
+_ASBOX
+    ) |
+      sed "s/^/$as_me: WARNING:     /" >&2
+    ;;
+  no:yes )
+    { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
+echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
+    { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
+echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
+    { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
+echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
+    (
+      cat <<\_ASBOX
+## ------------------------------------ ##
+## Report this to bug-autoconf at gnu.org. ##
+## ------------------------------------ ##
+_ASBOX
+    ) |
+      sed "s/^/$as_me: WARNING:     /" >&2
+    ;;
+esac
+echo "$as_me:$LINENO: checking for $ac_header" >&5
+echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
+if eval "test \"\${$as_ac_Header+set}\" = set"; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  eval "$as_ac_Header=$ac_header_preproc"
+fi
+echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
+
+fi
+if test `eval echo '${'$as_ac_Header'}'` = yes; then
+  cat >>confdefs.h <<_ACEOF
+#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
+_ACEOF
+
+else
+  unset HAVE_SZIP
+fi
+
+done
+
+
+echo "$as_me:$LINENO: checking for SZ_BufftoBuffCompress in -lsz" >&5
+echo $ECHO_N "checking for SZ_BufftoBuffCompress in -lsz... $ECHO_C" >&6
+if test "${ac_cv_lib_sz_SZ_BufftoBuffCompress+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  ac_check_lib_save_LIBS=$LIBS
+LIBS="-lsz  $LIBS"
+cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+
+/* Override any gcc2 internal prototype to avoid an error.  */
+#ifdef __cplusplus
+extern "C"
+#endif
+/* We use char because int might match the return type of a gcc2
+   builtin and then its argument prototype would still apply.  */
+char SZ_BufftoBuffCompress ();
+int
+main ()
+{
+SZ_BufftoBuffCompress ();
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+  (eval $ac_link) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } &&
+         { ac_try='test -s conftest$ac_exeext'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+  ac_cv_lib_sz_SZ_BufftoBuffCompress=yes
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_cv_lib_sz_SZ_BufftoBuffCompress=no
+fi
+rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+echo "$as_me:$LINENO: result: $ac_cv_lib_sz_SZ_BufftoBuffCompress" >&5
+echo "${ECHO_T}$ac_cv_lib_sz_SZ_BufftoBuffCompress" >&6
+if test $ac_cv_lib_sz_SZ_BufftoBuffCompress = yes; then
+  cat >>confdefs.h <<_ACEOF
+#define HAVE_LIBSZ 1
+_ACEOF
+
+  LIBS="-lsz $LIBS"
+
+else
+  unset HAVE_SZIP
+fi
+
+
+    if test -z "$HAVE_SZIP"; then
+      { { echo "$as_me:$LINENO: error: couldn't find szlib library" >&5
+echo "$as_me: error: couldn't find szlib library" >&2;}
+   { (exit 1); exit 1; }; }
+    fi
+    ;;
+  no)
+    echo "$as_me:$LINENO: checking for szlib" >&5
+echo $ECHO_N "checking for szlib... $ECHO_C" >&6
+    echo "$as_me:$LINENO: result: suppressed" >&5
+echo "${ECHO_T}suppressed" >&6
+    ;;
+  *)
+    HAVE_SZIP="yes"
+    case "$withval" in
+      *,*)
+        szip_inc="`echo $withval | cut -f1 -d,`"
+        szip_lib="`echo $withval | cut -f2 -d, -s`"
+        ;;
+      *)
+        if test -n "$withval"; then
+          szip_inc="$withval/include"
+          szip_lib="$withval/lib"
         fi
         ;;
-*) ;;
+    esac
+
+            if test "X$szip_inc" = "X/usr/include"; then
+      szip_inc=""
+    fi
+    if test "X$szip_lib" = "X/usr/lib"; then
+      szip_lib=""
+    fi
+
+    if test -n "$szip_inc"; then
+      CPPFLAGS="$CPPFLAGS -I$szip_inc"
+    fi
+
+
+for ac_header in szlib.h
+do
+as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
+if eval "test \"\${$as_ac_Header+set}\" = set"; then
+  echo "$as_me:$LINENO: checking for $ac_header" >&5
+echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
+if eval "test \"\${$as_ac_Header+set}\" = set"; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+fi
+echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
+else
+  # Is the header compilable?
+echo "$as_me:$LINENO: checking $ac_header usability" >&5
+echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
+cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+$ac_includes_default
+#include <$ac_header>
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+  (eval $ac_compile) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } &&
+         { ac_try='test -s conftest.$ac_objext'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+  ac_header_compiler=yes
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_header_compiler=no
+fi
+rm -f conftest.$ac_objext conftest.$ac_ext
+echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
+echo "${ECHO_T}$ac_header_compiler" >&6
+
+# Is the header present?
+echo "$as_me:$LINENO: checking $ac_header presence" >&5
+echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
+cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+#include <$ac_header>
+_ACEOF
+if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&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; then
+  if test -s conftest.err; then
+    ac_cpp_err=$ac_c_preproc_warn_flag
+  else
+    ac_cpp_err=
+  fi
+else
+  ac_cpp_err=yes
+fi
+if test -z "$ac_cpp_err"; then
+  ac_header_preproc=yes
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+  ac_header_preproc=no
+fi
+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 in
+  yes:no )
+    { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
+echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
+    { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
+echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
+    (
+      cat <<\_ASBOX
+## ------------------------------------ ##
+## Report this to bug-autoconf at gnu.org. ##
+## ------------------------------------ ##
+_ASBOX
+    ) |
+      sed "s/^/$as_me: WARNING:     /" >&2
+    ;;
+  no:yes )
+    { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
+echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
+    { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
+echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
+    { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
+echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
+    (
+      cat <<\_ASBOX
+## ------------------------------------ ##
+## Report this to bug-autoconf at gnu.org. ##
+## ------------------------------------ ##
+_ASBOX
+    ) |
+      sed "s/^/$as_me: WARNING:     /" >&2
+    ;;
 esac
+echo "$as_me:$LINENO: checking for $ac_header" >&5
+echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
+if eval "test \"\${$as_ac_Header+set}\" = set"; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  eval "$as_ac_Header=$ac_header_preproc"
+fi
+echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
 
-if [ ! -r ${srcdir}/${srctrigger} ] ; then
-        case "${srcdirdefaulted}" in
-        "") echo '***' "${progname}: Can't find ${srcname} sources in ${PWD=`pwd`}/${srcdir}" 1>&2 ;;
-        *)  echo '***' "${progname}: Can't find ${srcname} sources in ${PWD=`pwd`}/. or ${PWD=`pwd`}/.." 1>&2 ;;
-        esac
+fi
+if test `eval echo '${'$as_ac_Header'}'` = yes; then
+  cat >>confdefs.h <<_ACEOF
+#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
+_ACEOF
 
-        echo '***' \(At least ${srctrigger} is missing.\) 1>&2
-        exit 1
+else
+  unset HAVE_SZIP
 fi
 
-# Some systems (e.g., one of the i386-aix systems the gas testers are
-# using) don't handle "\$" correctly, so don't use it here.
-tooldir='$(exec_prefix)'/${target_alias}
+done
 
-if [ "${host_alias}" != "${target_alias}" ] ; then
-    if [ "${program_prefixoption}" = "" ] ; then
-        if [ "${program_suffixoption}" = "" ] ; then 
-            if [ "${program_transform_nameoption}" = "" ] ; then
-                program_prefix=${target_alias}- ;
-            fi
-        fi
+
+    if test -n "$szip_lib"; then
+      LDFLAGS="$LDFLAGS -L$szip_lib"
     fi
+
+
+echo "$as_me:$LINENO: checking for SZ_BufftoBuffCompress in -lsz" >&5
+echo $ECHO_N "checking for SZ_BufftoBuffCompress in -lsz... $ECHO_C" >&6
+if test "${ac_cv_lib_sz_SZ_BufftoBuffCompress+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  ac_check_lib_save_LIBS=$LIBS
+LIBS="-lsz  $LIBS"
+cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+
+/* Override any gcc2 internal prototype to avoid an error.  */
+#ifdef __cplusplus
+extern "C"
+#endif
+/* We use char because int might match the return type of a gcc2
+   builtin and then its argument prototype would still apply.  */
+char SZ_BufftoBuffCompress ();
+int
+main ()
+{
+SZ_BufftoBuffCompress ();
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+  (eval $ac_link) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } &&
+         { ac_try='test -s conftest$ac_exeext'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+  ac_cv_lib_sz_SZ_BufftoBuffCompress=yes
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_cv_lib_sz_SZ_BufftoBuffCompress=no
 fi
+rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
+fi
+echo "$as_me:$LINENO: result: $ac_cv_lib_sz_SZ_BufftoBuffCompress" >&5
+echo "${ECHO_T}$ac_cv_lib_sz_SZ_BufftoBuffCompress" >&6
+if test $ac_cv_lib_sz_SZ_BufftoBuffCompress = yes; then
+  cat >>confdefs.h <<_ACEOF
+#define HAVE_LIBSZ 1
+_ACEOF
 
-# Merge program_prefix and program_suffix onto program_transform_name.
-# (program_suffix used to use $, but it's hard to preserve $ through both
-# make and sh.)
-if [ "${program_suffix}" != "" ] ; then
-    program_transform_name="-e s,\\\\(.*\\\\),\\\\1${program_suffix}, ${program_transform_name}"
+  LIBS="-lsz $LIBS"
+
+else
+  unset HAVE_SZIP
 fi
 
-if [ "${program_prefix}" != "" ] ; then
-    program_transform_name="-e s,^,${program_prefix}, ${program_transform_name}"
+
+    if test -z "$HAVE_SZIP"; then
+      { { echo "$as_me:$LINENO: error: couldn't find szlib library" >&5
+echo "$as_me: error: couldn't find szlib library" >&2;}
+   { (exit 1); exit 1; }; }
+    fi
+    ;;
+esac
+
+echo "$as_me:$LINENO: checking for xdr library support" >&5
+echo $ECHO_N "checking for xdr library support... $ECHO_C" >&6
+cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+
+#ifdef VMS
+#define STDC_INCLUDES
+#endif
+#ifdef __ultrix
+#define GCC_FIX
+#endif
+#include <rpc/types.h>
+#ifdef __ultrix
+#undef GCC_FIX
+#endif
+#include <rpc/xdr.h>
+int
+main ()
+{
+xdr_int
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+  (eval $ac_link) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } &&
+         { ac_try='test -s conftest$ac_exeext'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+  echo "$as_me:$LINENO: result: yes" >&5
+echo "${ECHO_T}yes" >&6; build_xdr="no"
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6; build_xdr="yes"
 fi
+rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
 
-for subdir in . ${subdirs} ; do
 
-    # ${subdir} is relative path from . to the directory we're currently
-    # configuring.
-    # ${invsubdir} is inverse of ${subdir), *with* trailing /, if needed.
-    invsubdir=`echo ${subdir}/ | sed -e 's|\./||g' -e 's|[^/]*/|../|g'`
+if test "X$build_xdr" = "Xyes"; then
+  HDF_BUILD_XDR_TRUE=
+  HDF_BUILD_XDR_FALSE='#'
+else
+  HDF_BUILD_XDR_TRUE='#'
+  HDF_BUILD_XDR_FALSE=
+fi
 
-    ### figure out what to do with srcdir
-    case "${srcdir}" in
-        ".")  # no -srcdir option.  We're building in place.
-                makesrcdir=. ;;
-        /*) # absolute path
-                makesrcdir=`echo ${srcdir}/${subdir} | sed -e 's|/\.$||'`
-                ;;
-        *) # otherwise relative
-                case "${subdir}" in
-                .) makesrcdir=${srcdir} ;;
-                *) makesrcdir=${invsubdir}${srcdir}/${subdir} ;;
-                esac
-                ;;
-    esac
 
-    if [ "${subdir}/" != "./" ] ; then
-        Makefile=${subdir}/Makefile
+case "$host" in
+  *-solaris*|*-hp-hpux*|S370-fujitsu-sysv*)
+    LIBS="$LIBS -lnsl"  ;;
+  *) ;;
+esac
+
+
+CPPFLAGS="-I/usr/include/rpc $CPPFLAGS"
+
+echo "$as_me:$LINENO: checking for ANSI C header files" >&5
+echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6
+if test "${ac_cv_header_stdc+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+#include <stdlib.h>
+#include <stdarg.h>
+#include <string.h>
+#include <float.h>
+
+int
+main ()
+{
+
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+  (eval $ac_compile) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } &&
+         { ac_try='test -s conftest.$ac_objext'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+  ac_cv_header_stdc=yes
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_cv_header_stdc=no
+fi
+rm -f conftest.$ac_objext conftest.$ac_ext
+
+if test $ac_cv_header_stdc = yes; then
+  # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
+  cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+#include <string.h>
+
+_ACEOF
+if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
+  $EGREP "memchr" >/dev/null 2>&1; then
+  :
+else
+  ac_cv_header_stdc=no
+fi
+rm -f conftest*
+
+fi
+
+if test $ac_cv_header_stdc = yes; then
+  # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
+  cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+#include <stdlib.h>
+
+_ACEOF
+if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
+  $EGREP "free" >/dev/null 2>&1; then
+  :
+else
+  ac_cv_header_stdc=no
+fi
+rm -f conftest*
+
+fi
+
+if test $ac_cv_header_stdc = yes; then
+  # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
+  if test "$cross_compiling" = yes; then
+  :
+else
+  cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+#include <ctype.h>
+#if ((' ' & 0x0FF) == 0x020)
+# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
+# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
+#else
+# define ISLOWER(c) \
+                   (('a' <= (c) && (c) <= 'i') \
+                     || ('j' <= (c) && (c) <= 'r') \
+                     || ('s' <= (c) && (c) <= 'z'))
+# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
+#endif
+
+#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
+int
+main ()
+{
+  int i;
+  for (i = 0; i < 256; i++)
+    if (XOR (islower (i), ISLOWER (i))
+        || toupper (i) != TOUPPER (i))
+      exit(2);
+  exit (0);
+}
+_ACEOF
+rm -f conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+  (eval $ac_link) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+  :
+else
+  echo "$as_me: program exited with status $ac_status" >&5
+echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+( exit $ac_status )
+ac_cv_header_stdc=no
+fi
+rm -f core core.* *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
+fi
+fi
+fi
+echo "$as_me:$LINENO: result: $ac_cv_header_stdc" >&5
+echo "${ECHO_T}$ac_cv_header_stdc" >&6
+if test $ac_cv_header_stdc = yes; then
+
+cat >>confdefs.h <<\_ACEOF
+#define STDC_HEADERS 1
+_ACEOF
+
+fi
+
+
+
+
+
+if test "x$CC" != xcc; then
+  echo "$as_me:$LINENO: checking whether $CC and cc understand -c and -o together" >&5
+echo $ECHO_N "checking whether $CC and cc understand -c and -o together... $ECHO_C" >&6
+else
+  echo "$as_me:$LINENO: checking whether cc understands -c and -o together" >&5
+echo $ECHO_N "checking whether cc understands -c and -o together... $ECHO_C" >&6
+fi
+set dummy $CC; ac_cc=`echo $2 |
+		      sed 's/[^a-zA-Z0-9_]/_/g;s/^[0-9]/_/'`
+if eval "test \"\${ac_cv_prog_cc_${ac_cc}_c_o+set}\" = set"; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+
+int
+main ()
+{
+
+  ;
+  return 0;
+}
+_ACEOF
+# Make sure it works both with $CC and with simple cc.
+# We do the test twice because some compilers refuse to overwrite an
+# existing .o file with -o, though they will create one.
+ac_try='$CC -c conftest.$ac_ext -o conftest.$ac_objext >&5'
+if { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } &&
+   test -f conftest.$ac_objext && { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); };
+then
+  eval ac_cv_prog_cc_${ac_cc}_c_o=yes
+  if test "x$CC" != xcc; then
+    # Test first that cc exists at all.
+    if { ac_try='cc -c conftest.$ac_ext >&5'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+      ac_try='cc -c conftest.$ac_ext -o conftest.$ac_objext >&5'
+      if { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } &&
+	 test -f conftest.$ac_objext && { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); };
+      then
+        # cc works too.
+        :
+      else
+        # cc exists but doesn't like -o.
+        eval ac_cv_prog_cc_${ac_cc}_c_o=no
+      fi
     fi
+  fi
+else
+  eval ac_cv_prog_cc_${ac_cc}_c_o=no
+fi
+rm -f conftest*
 
-    if [ ! -d ${subdir} ] ; then
-        if mkdir ${subdir} ; then
-                true
-        else
-                echo '***' "${progname}: could not make ${PWD=`pwd`}/${subdir}" 1>&2
-                exit 1
+fi
+if eval "test \"`echo '$ac_cv_prog_cc_'${ac_cc}_c_o`\" = yes"; then
+  echo "$as_me:$LINENO: result: yes" >&5
+echo "${ECHO_T}yes" >&6
+else
+  echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
+
+cat >>confdefs.h <<\_ACEOF
+#define NO_MINUS_C_MINUS_O 1
+_ACEOF
+
+fi
+
+ac_ext=cc
+ac_cpp='$CXXCPP $CPPFLAGS'
+ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
+echo "$as_me:$LINENO: checking how to run the C++ preprocessor" >&5
+echo $ECHO_N "checking how to run the C++ preprocessor... $ECHO_C" >&6
+if test -z "$CXXCPP"; then
+  if test "${ac_cv_prog_CXXCPP+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+      # Double quotes because CXXCPP needs to be expanded
+    for CXXCPP in "$CXX -E" "/lib/cpp"
+    do
+      ac_preproc_ok=false
+for ac_cxx_preproc_warn_flag in '' yes
+do
+  # Use a header file that comes with gcc, so configuring glibc
+  # with a fresh cross-compiler works.
+  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+  # <limits.h> exists even on freestanding compilers.
+  # On the NeXT, cc -E runs the code through the compiler's parser,
+  # not just through cpp. "Syntax error" is here to catch this case.
+  cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+#ifdef __STDC__
+# include <limits.h>
+#else
+# include <assert.h>
+#endif
+                     Syntax error
+_ACEOF
+if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&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; then
+  if test -s conftest.err; then
+    ac_cpp_err=$ac_cxx_preproc_warn_flag
+  else
+    ac_cpp_err=
+  fi
+else
+  ac_cpp_err=yes
+fi
+if test -z "$ac_cpp_err"; then
+  :
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+  # Broken: fails on valid input.
+continue
+fi
+rm -f conftest.err conftest.$ac_ext
+
+  # OK, works on sane cases.  Now check whether non-existent headers
+  # can be detected and how.
+  cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+#include <ac_nonexistent.h>
+_ACEOF
+if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&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; then
+  if test -s conftest.err; then
+    ac_cpp_err=$ac_cxx_preproc_warn_flag
+  else
+    ac_cpp_err=
+  fi
+else
+  ac_cpp_err=yes
+fi
+if test -z "$ac_cpp_err"; then
+  # Broken: success on invalid input.
+continue
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+  # Passes both tests.
+ac_preproc_ok=:
+break
+fi
+rm -f conftest.err conftest.$ac_ext
+
+done
+# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
+rm -f conftest.err conftest.$ac_ext
+if $ac_preproc_ok; then
+  break
+fi
+
+    done
+    ac_cv_prog_CXXCPP=$CXXCPP
+
+fi
+  CXXCPP=$ac_cv_prog_CXXCPP
+else
+  ac_cv_prog_CXXCPP=$CXXCPP
+fi
+echo "$as_me:$LINENO: result: $CXXCPP" >&5
+echo "${ECHO_T}$CXXCPP" >&6
+ac_preproc_ok=false
+for ac_cxx_preproc_warn_flag in '' yes
+do
+  # Use a header file that comes with gcc, so configuring glibc
+  # with a fresh cross-compiler works.
+  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
+  # <limits.h> exists even on freestanding compilers.
+  # On the NeXT, cc -E runs the code through the compiler's parser,
+  # not just through cpp. "Syntax error" is here to catch this case.
+  cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+#ifdef __STDC__
+# include <limits.h>
+#else
+# include <assert.h>
+#endif
+                     Syntax error
+_ACEOF
+if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&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; then
+  if test -s conftest.err; then
+    ac_cpp_err=$ac_cxx_preproc_warn_flag
+  else
+    ac_cpp_err=
+  fi
+else
+  ac_cpp_err=yes
+fi
+if test -z "$ac_cpp_err"; then
+  :
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+  # Broken: fails on valid input.
+continue
+fi
+rm -f conftest.err conftest.$ac_ext
+
+  # OK, works on sane cases.  Now check whether non-existent headers
+  # can be detected and how.
+  cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+#include <ac_nonexistent.h>
+_ACEOF
+if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&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; then
+  if test -s conftest.err; then
+    ac_cpp_err=$ac_cxx_preproc_warn_flag
+  else
+    ac_cpp_err=
+  fi
+else
+  ac_cpp_err=yes
+fi
+if test -z "$ac_cpp_err"; then
+  # Broken: success on invalid input.
+continue
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+  # Passes both tests.
+ac_preproc_ok=:
+break
+fi
+rm -f conftest.err conftest.$ac_ext
+
+done
+# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
+rm -f conftest.err conftest.$ac_ext
+if $ac_preproc_ok; then
+  :
+else
+  { { echo "$as_me:$LINENO: error: C++ preprocessor \"$CXXCPP\" fails sanity check
+See \`config.log' for more details." >&5
+echo "$as_me: error: C++ preprocessor \"$CXXCPP\" fails sanity check
+See \`config.log' for more details." >&2;}
+   { (exit 1); exit 1; }; }
+fi
+
+ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
+
+if test "X$BUILD_FORTRAN" = "Xyes"; then
+  echo "$as_me:$LINENO: checking whether $F77 understand -c and -o together" >&5
+echo $ECHO_N "checking whether $F77 understand -c and -o together... $ECHO_C" >&6
+if test "${ac_cv_prog_f77_c_o+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+
+int
+main ()
+{
+
+  ;
+  return 0;
+}
+_ACEOF
+# We test twice because some compilers refuse to overwrite an existing
+# `.o' file with `-o', although they will create one.
+ac_try='$F77 $FFLAGS -c conftest.$ac_ext -o conftest.$ac_objext >&5'
+if { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } &&
+     test -f conftest.$ac_objext &&
+     { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; then
+  ac_cv_prog_f77_c_o=yes
+else
+  ac_cv_prog_f77_c_o=no
+fi
+rm -f conftest*
+fi
+echo "$as_me:$LINENO: result: $ac_cv_prog_f77_c_o" >&5
+echo "${ECHO_T}$ac_cv_prog_f77_c_o" >&6
+if test $ac_cv_prog_f77_c_o = no; then
+
+cat >>confdefs.h <<\_ACEOF
+#define F77_NO_MINUS_C_MINUS_O 1
+_ACEOF
+
+fi
+
+fi
+
+echo "$as_me:$LINENO: checking for int*" >&5
+echo $ECHO_N "checking for int*... $ECHO_C" >&6
+if test "${ac_cv_type_intp+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+$ac_includes_default
+int
+main ()
+{
+if ((int* *) 0)
+  return 0;
+if (sizeof (int*))
+  return 0;
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+  (eval $ac_compile) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } &&
+         { ac_try='test -s conftest.$ac_objext'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+  ac_cv_type_intp=yes
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_cv_type_intp=no
+fi
+rm -f conftest.$ac_objext conftest.$ac_ext
+fi
+echo "$as_me:$LINENO: result: $ac_cv_type_intp" >&5
+echo "${ECHO_T}$ac_cv_type_intp" >&6
+
+echo "$as_me:$LINENO: checking size of int*" >&5
+echo $ECHO_N "checking size of int*... $ECHO_C" >&6
+if test "${ac_cv_sizeof_intp+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  if test "$ac_cv_type_intp" = yes; then
+  # The cast to unsigned long works around a bug in the HP C Compiler
+  # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
+  # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
+  # This bug is HP SR number 8606223364.
+  if test "$cross_compiling" = yes; then
+  # Depending upon the size, compute the lo and hi bounds.
+cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+$ac_includes_default
+int
+main ()
+{
+static int test_array [1 - 2 * !(((long) (sizeof (int*))) >= 0)];
+test_array [0] = 0
+
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+  (eval $ac_compile) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } &&
+         { ac_try='test -s conftest.$ac_objext'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+  ac_lo=0 ac_mid=0
+  while :; do
+    cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+$ac_includes_default
+int
+main ()
+{
+static int test_array [1 - 2 * !(((long) (sizeof (int*))) <= $ac_mid)];
+test_array [0] = 0
+
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+  (eval $ac_compile) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } &&
+         { ac_try='test -s conftest.$ac_objext'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+  ac_hi=$ac_mid; break
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_lo=`expr $ac_mid + 1`
+                    if test $ac_lo -le $ac_mid; then
+                      ac_lo= ac_hi=
+                      break
+                    fi
+                    ac_mid=`expr 2 '*' $ac_mid + 1`
+fi
+rm -f conftest.$ac_objext conftest.$ac_ext
+  done
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+$ac_includes_default
+int
+main ()
+{
+static int test_array [1 - 2 * !(((long) (sizeof (int*))) < 0)];
+test_array [0] = 0
+
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+  (eval $ac_compile) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } &&
+         { ac_try='test -s conftest.$ac_objext'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+  ac_hi=-1 ac_mid=-1
+  while :; do
+    cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+$ac_includes_default
+int
+main ()
+{
+static int test_array [1 - 2 * !(((long) (sizeof (int*))) >= $ac_mid)];
+test_array [0] = 0
+
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+  (eval $ac_compile) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } &&
+         { ac_try='test -s conftest.$ac_objext'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+  ac_lo=$ac_mid; break
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_hi=`expr '(' $ac_mid ')' - 1`
+                       if test $ac_mid -le $ac_hi; then
+                         ac_lo= ac_hi=
+                         break
+                       fi
+                       ac_mid=`expr 2 '*' $ac_mid`
+fi
+rm -f conftest.$ac_objext conftest.$ac_ext
+  done
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_lo= ac_hi=
+fi
+rm -f conftest.$ac_objext conftest.$ac_ext
+fi
+rm -f conftest.$ac_objext conftest.$ac_ext
+# Binary search between lo and hi bounds.
+while test "x$ac_lo" != "x$ac_hi"; do
+  ac_mid=`expr '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo`
+  cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+$ac_includes_default
+int
+main ()
+{
+static int test_array [1 - 2 * !(((long) (sizeof (int*))) <= $ac_mid)];
+test_array [0] = 0
+
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+  (eval $ac_compile) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } &&
+         { ac_try='test -s conftest.$ac_objext'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+  ac_hi=$ac_mid
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_lo=`expr '(' $ac_mid ')' + 1`
+fi
+rm -f conftest.$ac_objext conftest.$ac_ext
+done
+case $ac_lo in
+?*) ac_cv_sizeof_intp=$ac_lo;;
+'') { { echo "$as_me:$LINENO: error: cannot compute sizeof (int*), 77
+See \`config.log' for more details." >&5
+echo "$as_me: error: cannot compute sizeof (int*), 77
+See \`config.log' for more details." >&2;}
+   { (exit 1); exit 1; }; } ;;
+esac
+else
+  if test "$cross_compiling" = yes; then
+  { { echo "$as_me:$LINENO: error: cannot run test program while cross compiling
+See \`config.log' for more details." >&5
+echo "$as_me: error: cannot run test program while cross compiling
+See \`config.log' for more details." >&2;}
+   { (exit 1); exit 1; }; }
+else
+  cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+$ac_includes_default
+long longval () { return (long) (sizeof (int*)); }
+unsigned long ulongval () { return (long) (sizeof (int*)); }
+#include <stdio.h>
+#include <stdlib.h>
+int
+main ()
+{
+
+  FILE *f = fopen ("conftest.val", "w");
+  if (! f)
+    exit (1);
+  if (((long) (sizeof (int*))) < 0)
+    {
+      long i = longval ();
+      if (i != ((long) (sizeof (int*))))
+	exit (1);
+      fprintf (f, "%ld\n", i);
+    }
+  else
+    {
+      unsigned long i = ulongval ();
+      if (i != ((long) (sizeof (int*))))
+	exit (1);
+      fprintf (f, "%lu\n", i);
+    }
+  exit (ferror (f) || fclose (f) != 0);
+
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+  (eval $ac_link) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+  ac_cv_sizeof_intp=`cat conftest.val`
+else
+  echo "$as_me: program exited with status $ac_status" >&5
+echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+( exit $ac_status )
+{ { echo "$as_me:$LINENO: error: cannot compute sizeof (int*), 77
+See \`config.log' for more details." >&5
+echo "$as_me: error: cannot compute sizeof (int*), 77
+See \`config.log' for more details." >&2;}
+   { (exit 1); exit 1; }; }
+fi
+rm -f core core.* *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
+fi
+fi
+rm -f conftest.val
+else
+  ac_cv_sizeof_intp=0
+fi
+fi
+echo "$as_me:$LINENO: result: $ac_cv_sizeof_intp" >&5
+echo "${ECHO_T}$ac_cv_sizeof_intp" >&6
+cat >>confdefs.h <<_ACEOF
+#define SIZEOF_INTP $ac_cv_sizeof_intp
+_ACEOF
+
+
+
+if test $ac_cv_sizeof_intp -ge 8; then
+  CPPFLAGS="$CPPFLAGS -DBIG_LONGS"
+
+    case "${host}" in
+    *-ibm-aix*) CPPFLAGS="$CPPFLAGS -DAIX5L64" ;;
+    *)          ;;
+  esac
+fi
+
+echo "$as_me:$LINENO: checking whether byte ordering is bigendian" >&5
+echo $ECHO_N "checking whether byte ordering is bigendian... $ECHO_C" >&6
+if test "${ac_cv_c_bigendian+set}" = set; then
+  echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+  # See if sys/param.h defines the BYTE_ORDER macro.
+cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+#include <sys/types.h>
+#include <sys/param.h>
+
+int
+main ()
+{
+#if !BYTE_ORDER || !BIG_ENDIAN || !LITTLE_ENDIAN
+ bogus endian macros
+#endif
+
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+  (eval $ac_compile) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } &&
+         { ac_try='test -s conftest.$ac_objext'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+  # It does; now see whether it defined to BIG_ENDIAN or not.
+cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+#include <sys/types.h>
+#include <sys/param.h>
+
+int
+main ()
+{
+#if BYTE_ORDER != BIG_ENDIAN
+ not big endian
+#endif
+
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+  (eval $ac_compile) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } &&
+         { ac_try='test -s conftest.$ac_objext'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+  ac_cv_c_bigendian=yes
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+ac_cv_c_bigendian=no
+fi
+rm -f conftest.$ac_objext conftest.$ac_ext
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+# It does not; compile a test program.
+if test "$cross_compiling" = yes; then
+  # try to guess the endianness by grepping values into an object file
+  ac_cv_c_bigendian=unknown
+  cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+short ascii_mm[] = { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
+short ascii_ii[] = { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
+void _ascii () { char *s = (char *) ascii_mm; s = (char *) ascii_ii; }
+short ebcdic_ii[] = { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
+short ebcdic_mm[] = { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
+void _ebcdic () { char *s = (char *) ebcdic_mm; s = (char *) ebcdic_ii; }
+int
+main ()
+{
+ _ascii (); _ebcdic ();
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+  (eval $ac_compile) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } &&
+         { ac_try='test -s conftest.$ac_objext'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+  if grep BIGenDianSyS conftest.$ac_objext >/dev/null ; then
+  ac_cv_c_bigendian=yes
+fi
+if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
+  if test "$ac_cv_c_bigendian" = unknown; then
+    ac_cv_c_bigendian=no
+  else
+    # finding both strings is unlikely to happen, but who knows?
+    ac_cv_c_bigendian=unknown
+  fi
+fi
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+fi
+rm -f conftest.$ac_objext conftest.$ac_ext
+else
+  cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+int
+main ()
+{
+  /* Are we little or big endian?  From Harbison&Steele.  */
+  union
+  {
+    long l;
+    char c[sizeof (long)];
+  } u;
+  u.l = 1;
+  exit (u.c[sizeof (long) - 1] == 1);
+}
+_ACEOF
+rm -f conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+  (eval $ac_link) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+  ac_cv_c_bigendian=no
+else
+  echo "$as_me: program exited with status $ac_status" >&5
+echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+( exit $ac_status )
+ac_cv_c_bigendian=yes
+fi
+rm -f core core.* *.core gmon.out bb.out conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
+fi
+fi
+rm -f conftest.$ac_objext conftest.$ac_ext
+fi
+echo "$as_me:$LINENO: result: $ac_cv_c_bigendian" >&5
+echo "${ECHO_T}$ac_cv_c_bigendian" >&6
+case $ac_cv_c_bigendian in
+  yes)
+
+cat >>confdefs.h <<\_ACEOF
+#define WORDS_BIGENDIAN 1
+_ACEOF
+ ;;
+  no)
+    CPPFLAGS="$CPPFLAGS -DSWAP" ;;
+  *)
+    { { echo "$as_me:$LINENO: error: unknown endianness
+presetting ac_cv_c_bigendian=no (or yes) will help" >&5
+echo "$as_me: error: unknown endianness
+presetting ac_cv_c_bigendian=no (or yes) will help" >&2;}
+   { (exit 1); exit 1; }; } ;;
+esac
+
+
+echo "$as_me:$LINENO: checking for build mode" >&5
+echo $ECHO_N "checking for build mode... $ECHO_C" >&6
+# Check whether --enable-production or --disable-production was given.
+if test "${enable_production+set}" = set; then
+  enableval="$enable_production"
+
+fi;
+
+case "X-$enable_production" in
+  X-|X-yes)
+    echo "$as_me:$LINENO: result: production" >&5
+echo "${ECHO_T}production" >&6
+
+        CFLAGS_temp=""
+    if test -n "$CFLAGS"; then
+      for d in $CFLAGS ; do
+        if test "X$d" != "X-g"; then
+          CFLAGS_temp="$CFLAGS_temp $d"
         fi
+      done
+      CFLAGS=$CFLAGS_temp
     fi
 
-    case "${removing}" in
-    "")
-        case "${subdir}" in
-        .) ;;
-        *) eval echo Building in ${subdir} ${redirect} ;;
-        esac
+    FFLAGS_temp=""
+    if test -n "$FFLAGS"; then
+      for d in $FFLAGS ; do
+        if test "X$d" != "X-g"; then
+          FFLAGS_temp="$FFLAGS_temp $d"
+        fi
+      done
+      FFLAGS=$FFLAGS_temp
+    fi
 
-        # FIXME Should this be done recursively ??? (Useful for e.g. gdbtest)
-        # Set up the list of links to be made.
-        # ${links} is the list of link names, and ${files} is the list of names to link to.
-
-        # Make the links.
-        configlinks="${links}"
-        if [ -r ${subdir}/config.status ] ; then
-                mv -f ${subdir}/config.status ${subdir}/config.back
+    CXXFLAGS_temp=""
+    if test -n "$CXXFLAGS"; then
+      for d in $CXXFLAGS ; do
+        if test "X$d" != "X-g"; then
+          CXXFLAGS_temp="$CXXFLAGS_temp $d"
         fi
-#
-#  Added THISDIR variable to make symlinks easier when linking
-#  to files not in the same directory -GV
-#        THISDIR=${PWD=`pwd`}
-        ### figure out what to do with srcdir
-        case "${srcdir}" in
-          ".") THISDIR=${PWD=`pwd`} ;; # no -srcdir option.  We're building in place.
-          /*) # absolute path
-              THISDIR=${srcdir}
-              ;;
-          *) # otherwise relative
-             THISDIR=../${srcdir}
-             ;;
-        esac
-#        echo "thisdir is $THISDIR "
-#        while [ -n "${files}" ] ; do
-        for file in ${files} ;  do
-                # set file to car of files, files to cdr of files
-                set ${files}; file=$1; shift; files=$*
-                set ${links}; link=$1; shift; links=$*
+      done
+      CXXFLAGS=$CXXFLAGS_temp
+    fi
 
-                ## Took this code from 'install-sh' script
-                ## this sed command emulates the dirname command
-                dstdir=`echo $link | sed -e 's,[^/]*$,,;s,/$,,;s,^$,.,'`
+    CFLAGS="$CFLAGS $PROD_CFLAGS"
+    CXXFLAGS="$CXXFLAGS $PROD_CXXFLAGS"
+    FFLAGS="$FFLAGS $PROD_FFLAGS"
+    CPPFLAGS="$CPPFLAGS $PROD_CPPFLAGS"
+    ;;
+  X-no)
+    echo "$as_me:$LINENO: result: development" >&5
+echo "${ECHO_T}development" >&6
+    CFLAGS="$CFLAGS $DEBUG_CFLAGS"
+    FFLAGS="$FFLAGS $DEBUG_FFLAGS"
+    CXXFLAGS="$CXXFLAGS $DEBUG_CXXFLAGS"
+    CPPFLAGS="$CPPFLAGS $DEBUG_CPPFLAGS"
+    ;;
+  *)
+    echo "$as_me:$LINENO: result: user-defined" >&5
+echo "${ECHO_T}user-defined" >&6
+    ;;
+esac
 
-                # Make sure that the destination directory exists.
-                #  this part is taken from Noah Friedman's mkinstalldirs script
 
-                # Skip lots of stat calls in the usual case.
-                if [ ! -d "$dstdir" ]; then
-                  defaultIFS='	
-                  '
-                  IFS="${IFS-${defaultIFS}}"
+echo "$as_me:$LINENO: checking for math library support" >&5
+echo $ECHO_N "checking for math library support... $ECHO_C" >&6
+cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h.  */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h.  */
+#include <math.h>
+int
+main ()
+{
+sqrt(37.927)
+  ;
+  return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+  (eval $ac_link) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); } &&
+         { ac_try='test -s conftest$ac_exeext'
+  { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+  (eval $ac_try) 2>&5
+  ac_status=$?
+  echo "$as_me:$LINENO: \$? = $ac_status" >&5
+  (exit $ac_status); }; }; then
+  echo "$as_me:$LINENO: result: yes" >&5
+echo "${ECHO_T}yes" >&6
+else
+  echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
 
-                  oIFS="${IFS}"
-                  # Some sh's can't handle IFS=/ for some reason.
-                  IFS='%'
-                  set - `echo ${dstdir} | sed -e 's@/@%@g' -e 's@^%@/@'`
-                  IFS="${oIFS}"
+echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6; LIBS="$LIBS -lm"
+fi
+rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
 
-                  pathcomp=''
 
-                  while [ $# -ne 0 ] ; do
-                    pathcomp="${pathcomp}${1}"
-                    shift
+case "$host" in
+  alpha-*-*)            BAR="alpha"       ;;
+  alphaev*-*-*)         BAR="alpha"       ;;
+  mips*-dec-ultrix*)    BAR="dec"         ;;
+  mips*-sgi-irix6.*)    BAR="irix6"       ;;
+  mips*-sgi-irix6_32*)  BAR="irix32"      ;;
+  mips*-sgi-irix5*)     BAR="irix5"       ;;
+  mips*-sgi-irix4*)     BAR="irix4"       ;;
+  *-linux*)             BAR="linux"       ;;
+  *-freebsd*)           BAR="fbsd"        ;;
+  ia64-*-*)             BAR="ia64"        ;;
+  *-ibm-aix*)           BAR="aix"         ;;
+  i386-*-solaris2*)     BAR="solarisx86"  ;;
+  sparc64-*-solaris2*)  BAR="solaris64"   ;;
+  *-*-solaris2*)        BAR="solaris"     ;;
+  *-sun-*)              BAR="sun"         ;;
+  *-hp-hpux*)           BAR="hpux"        ;;
+  *-convex-bsd*)        BAR="convex"      ;;
+  *-cray-unicos*)       BAR="unicos"      ;;
+  t3*-cray-craympp)     BAR="t3e"         ;;
+  S370-fujitsu-sysv*)   BAR="fujivp"      ;;
+  *-mac-*)              BAR="mac"         ;;
+  *-apple*)             BAR="apple"       ;;
+  *)                    echo "*** unknown host $host!"; exit 1 ;;
+esac
 
-                    if [ ! -d "${pathcomp}" ] ;
-                    then
-                      $mkdirprog "${pathcomp}"
-                    else
-                      true
-                    fi
+src_files="mfhdf/libsrc/config/netcdf-FOO.h:mfhdf/libsrc/netcdf.h
+           mfhdf/fortran/config/jackets-FOO.c:mfhdf/fortran/jackets.c
+           mfhdf/fortran/config/netcdf-FOO.inc:mfhdf/fortran/netcdf.inc
+           mfhdf/fortran/config/ftest-FOO.f:mfhdf/fortran/ftest.f"
+src_files="`echo $src_files | sed -e s/FOO/${BAR}/g`"
 
-                    pathcomp="${pathcomp}/"
-                  done
-                fi
+for config_file in $src_files; do
+  src_file="${srcdir}/`echo $config_file | sed -e s/:.*$//`"
+  target_file="`echo $config_file | sed -e s/^[^:]*://g`"
 
-                if [ ! -r ${srcdir}/${file} ] ; then
-                  #                  echo '***' "${progname}: cannot create a link \"${link}\"," 1>&2
-                  # Changed to copy instead of linking. -GV(5/10/96)
-                        echo '***' "${progname}: cannot copy file \"${link}\"," 1>&2                  
-                        echo '***' "since the file \"${srcdir}/${file}\" does not exist." 1>&2
-                        exit 1
-                fi
+  if test ! -r ${src_file}; then
+    echo '***' "${progname}: cannot copy file \"${target_file}\"," 1>&2
+    echo '***' "since the file \"${src_file}\" does not exist." 1>&2
+    exit 1
+  fi
 
-                ${remove} -f ${link}
-		# Make a symlink if possible, otherwise try a hard link
+  ## this sed command emulates the dirname command
+  dstdir=`echo "$target_file" | sed -e 's,[^/]*$,,;s,/$,,;s,^$,.,'`
+
+  ## Create directory for the target_file if it's not there.
+  if test ! -d $dstdir; then
+    ${srcdir}/bin/mkinstalldirs $dstdir
+  fi
+
+  echo "Copying \"${src_file}\" to \"${target_file}\" ."
+  cp ${src_file} ${target_file}
+
+  if test ! -r ${target_file}; then
+    echo '***' "${progname}: cannot copy file \"${target_file}\"," 1>&2
+    exit 1
+  fi
+done
+
+                                                                                                                                                                                                                                      ac_config_files="$ac_config_files Makefile hdf/Makefile hdf/src/Makefile hdf/test/Makefile hdf/util/Makefile hdf/util/h4cc hdf/util/h4fc hdf/util/h4redeploy hdf/util/testutil.sh man/Makefile mfhdf/Makefile mfhdf/dumper/Makefile mfhdf/dumper/testhdp.sh mfhdf/fortran/Makefile mfhdf/hdfimport/Makefile mfhdf/hdfimport/testutil.sh mfhdf/hdiff/Makefile mfhdf/hrepack/Makefile mfhdf/libsrc/Makefile mfhdf/ncdump/Makefile mfhdf/ncgen/Makefile mfhdf/nctest/Makefile mfhdf/port/Makefile"
+
+
+if test "X$build_xdr" = "Xyes"; then
+            ac_config_files="$ac_config_files mfhdf/xdr/Makefile"
+
+fi
+
+cat >confcache <<\_ACEOF
+# This file is a shell script that caches the results of configure
+# tests run on this system so they can be shared between configure
+# scripts and configure runs, see configure's option --config-cache.
+# It is not useful on other systems.  If it contains results you don't
+# want to keep, you may remove or edit it.
 #
-#  Used variable THISDIR to make symlinks easier when linking
-#  to files not in the same directory -GV
-#		if ${symbolic_link} ${srcdir}/${file} ${link} >/dev/null 2>&1 ; then
-		if ${symbolic_link} ${THISDIR}/${file} ${link} >/dev/null 2>&1 ; then
-			true
-		else
-			# We need to re-remove the file because Lynx leaves a 
-			# very strange directory there when it fails an NFS symlink.
-			${remove} -r -f ${link}
-#			${hard_link} ${srcdir}/${file} ${link}
-			${hard_link} ${THISDIR}/${file} ${link}
-		fi
-                if [ ! -r ${link} ] ; then
-                  #                  echo '***' "${progname}: unable to link \"${link}\" to \"${srcdir}/${file}\"." 1>&2
-                  # Changed to copy instead of linking. -GV(5/10/96)
-                  echo '***' "${progname}: unable to copy  \"${srcdir}/${file}\" to  \"${link}\"." 1>&2
-                        exit 1
-                fi
+# config.status only pays attention to the cache file if you give it
+# the --recheck option to rerun configure.
+#
+# `ac_cv_env_foo' variables (set or unset) will be overridden when
+# loading this file, other *unset* `ac_cv_foo' will be assigned the
+# following values.
 
-# Changed to copy instead of Linking -GV(5/10/96)
-                echo "Copied \"${srcdir}/${file}\" to \"${link}\" ."
-#                echo "Linked \"${link}\" to \"${srcdir}/${file}\"."                                
-        done
+_ACEOF
 
-        # Create a .gdbinit file which runs the one in srcdir
-        # and tells GDB to look there for source files.
+# The following way of writing the cache mishandles newlines in values,
+# but we know of no workaround that is simple, portable, and efficient.
+# So, don't put newlines in cache variables' values.
+# Ultrix sh set writes to stderr and can't be redirected directly,
+# and sets the high bit in the cache file unless we assign to the vars.
+{
+  (set) 2>&1 |
+    case `(ac_space=' '; set | grep ac_space) 2>&1` in
+    *ac_space=\ *)
+      # `set' does not quote correctly, so add quotes (double-quote
+      # substitution turns \\\\ into \\, and sed turns \\ into \).
+      sed -n \
+        "s/'/'\\\\''/g;
+    	  s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
+      ;;
+    *)
+      # `set' quotes correctly as required by POSIX, so do not add quotes.
+      sed -n \
+        "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p"
+      ;;
+    esac;
+} |
+  sed '
+     t clear
+     : clear
+     s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
+     t end
+     /^ac_cv_env/!s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
+     : end' >>confcache
+if diff $cache_file confcache >/dev/null 2>&1; then :; else
+  if test -w $cache_file; then
+    test "x$cache_file" != "x/dev/null" && echo "updating cache $cache_file"
+    cat confcache >$cache_file
+  else
+    echo "not updating unwritable cache $cache_file"
+  fi
+fi
+rm -f confcache
 
-        if [ -r ${srcdir}/${subdir}/.gdbinit ] ; then
-                case ${srcdir} in
-                .) ;;
-                *) cat > ${subdir}/.gdbinit <<EOF
-# ${NO_EDIT}
-dir ${makesrcdir}
-dir .
-source ${makesrcdir}/.gdbinit
-EOF
-                        ;;
-                esac
-        fi
+test "x$prefix" = xNONE && prefix=$ac_default_prefix
+# Let make expand exec_prefix.
+test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
 
-        # Install a makefile, and make it set VPATH
-        # if necessary so that the sources are found.
-        # Also change its value of srcdir.
-        # NOTE: Makefile generation constitutes the majority of the time in configure.  Hence, this section has
-        # been somewhat optimized and is perhaps a bit twisty.
+# VPATH may cause trouble with some makes, so we remove $(srcdir),
+# ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and
+# trailing colons and then remove the whole line if VPATH becomes empty
+# (actually we leave an empty line to preserve line numbers).
+if test "x$srcdir" = x.; then
+  ac_vpsub='/^[ 	]*VPATH[ 	]*=/{
+s/:*\$(srcdir):*/:/;
+s/:*\${srcdir}:*/:/;
+s/:*@srcdir@:*/:/;
+s/^\([^=]*=[ 	]*\):*/\1/;
+s/:*$//;
+s/^[^=]*=[ 	]*$//;
+}'
+fi
 
-        # code is order so as to try to sed the smallest input files we know.
+DEFS=-DHAVE_CONFIG_H
 
-        # the four makefile fragments MUST end up in the resulting Makefile in this order: 
-        # package, target, host, and site.  so do these separately because I don't trust the
-        #  order of sed -e expressions.
+ac_libobjs=
+ac_ltlibobjs=
+for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
+  # 1. Remove the extension, and $U if already installed.
+  ac_i=`echo "$ac_i" |
+         sed 's/\$U\././;s/\.o$//;s/\.obj$//'`
+  # 2. Add them.
+  ac_libobjs="$ac_libobjs $ac_i\$U.$ac_objext"
+  ac_ltlibobjs="$ac_ltlibobjs $ac_i"'$U.lo'
+done
+LIBOBJS=$ac_libobjs
 
-        if [ -f ${srcdir}/${subdir}/${Makefile_in} ] ; then
+LTLIBOBJS=$ac_ltlibobjs
 
-            # Conditionalize for this site from "Makefile.in" (or whatever it's called) into Makefile.tem
-            rm -f ${subdir}/Makefile.tem
-              case "${site}" in
-              "") cp ${srcdir}/${subdir}/${Makefile_in} ${subdir}/Makefile.tem ;;
-              *)
-                      site_makefile_frag=${srcdir}/config/ms-${site}
 
-                      if [ -f ${site_makefile_frag} ] ; then
-                              sed -e "/^####/  r ${site_makefile_frag}" ${srcdir}/${subdir}/${Makefile_in} \
-                                      > ${subdir}/Makefile.tem
-                      else
-                              cp ${srcdir}/${subdir}/${Makefile_in} ${subdir}/Makefile.tem
-                              site_makefile_frag=
-                      fi
-                      ;;
-            esac
-            # working copy now in ${subdir}/Makefile.tem
+if test -z "${MAINTAINER_MODE_TRUE}" && test -z "${MAINTAINER_MODE_FALSE}"; then
+  { { echo "$as_me:$LINENO: error: conditional \"MAINTAINER_MODE\" was never defined.
+Usually this means the macro was only invoked conditionally." >&5
+echo "$as_me: error: conditional \"MAINTAINER_MODE\" was never defined.
+Usually this means the macro was only invoked conditionally." >&2;}
+   { (exit 1); exit 1; }; }
+fi
+if test -z "${AMDEP_TRUE}" && test -z "${AMDEP_FALSE}"; then
+  { { echo "$as_me:$LINENO: error: conditional \"AMDEP\" was never defined.
+Usually this means the macro was only invoked conditionally." >&5
+echo "$as_me: error: conditional \"AMDEP\" was never defined.
+Usually this means the macro was only invoked conditionally." >&2;}
+   { (exit 1); exit 1; }; }
+fi
+if test -z "${am__fastdepCC_TRUE}" && test -z "${am__fastdepCC_FALSE}"; then
+  { { echo "$as_me:$LINENO: error: conditional \"am__fastdepCC\" was never defined.
+Usually this means the macro was only invoked conditionally." >&5
+echo "$as_me: error: conditional \"am__fastdepCC\" was never defined.
+Usually this means the macro was only invoked conditionally." >&2;}
+   { (exit 1); exit 1; }; }
+fi
+if test -z "${am__fastdepCXX_TRUE}" && test -z "${am__fastdepCXX_FALSE}"; then
+  { { echo "$as_me:$LINENO: error: conditional \"am__fastdepCXX\" was never defined.
+Usually this means the macro was only invoked conditionally." >&5
+echo "$as_me: error: conditional \"am__fastdepCXX\" was never defined.
+Usually this means the macro was only invoked conditionally." >&2;}
+   { (exit 1); exit 1; }; }
+fi
+if test -z "${HDF_BUILD_FORTRAN_TRUE}" && test -z "${HDF_BUILD_FORTRAN_FALSE}"; then
+  { { echo "$as_me:$LINENO: error: conditional \"HDF_BUILD_FORTRAN\" was never defined.
+Usually this means the macro was only invoked conditionally." >&5
+echo "$as_me: error: conditional \"HDF_BUILD_FORTRAN\" was never defined.
+Usually this means the macro was only invoked conditionally." >&2;}
+   { (exit 1); exit 1; }; }
+fi
+if test -z "${HDF_BUILD_XDR_TRUE}" && test -z "${HDF_BUILD_XDR_FALSE}"; then
+  { { echo "$as_me:$LINENO: error: conditional \"HDF_BUILD_XDR\" was never defined.
+Usually this means the macro was only invoked conditionally." >&5
+echo "$as_me: error: conditional \"HDF_BUILD_XDR\" was never defined.
+Usually this means the macro was only invoked conditionally." >&2;}
+   { (exit 1); exit 1; }; }
+fi
 
-            # Conditionalize the makefile for this host.
-            rm -f ${Makefile}
-            case "${host_makefile_frag}" in
-              "") mv ${subdir}/Makefile.tem ${Makefile} ;;
-              *)
-                      if [ ! -f ${host_makefile_frag} ] ; then
-                              host_makefile_frag=${srcdir}/${host_makefile_frag}
-                      fi
-                      if [ -f ${host_makefile_frag} ] ; then
-                              sed -e "/^####/  r ${host_makefile_frag}" ${subdir}/Makefile.tem > ${Makefile}
-                      else
-                              echo '***' Expected host makefile fragment \"${host_makefile_frag}\" 1>&2
-                              echo '***' is missing in ${PWD=`pwd`}. 1>&2
-                              mv ${subdir}/Makefile.tem ${Makefile}
-                      fi
-            esac
-            # working copy now in ${Makefile}
+: ${CONFIG_STATUS=./config.status}
+ac_clean_files_save=$ac_clean_files
+ac_clean_files="$ac_clean_files $CONFIG_STATUS"
+{ echo "$as_me:$LINENO: creating $CONFIG_STATUS" >&5
+echo "$as_me: creating $CONFIG_STATUS" >&6;}
+cat >$CONFIG_STATUS <<_ACEOF
+#! $SHELL
+# Generated by $as_me.
+# Run this file to recreate the current configuration.
+# Compiler output produced by configure, useful for debugging
+# configure, is in config.log if it exists.
 
-            # Conditionalize the makefile for this target.
-            rm -f ${subdir}/Makefile.tem
-            case "${target_makefile_frag}" in
-              "") mv ${Makefile} ${subdir}/Makefile.tem ;;
-              *)
-                      if [ ! -f ${target_makefile_frag} ] ; then
-                              target_makefile_frag=${srcdir}/${target_makefile_frag}
-                      fi
-                      if [ -f ${target_makefile_frag} ] ; then
-                              sed -e "/^####/  r ${target_makefile_frag}" ${Makefile} > ${subdir}/Makefile.tem
-                      else
-                              mv ${Makefile} ${subdir}/Makefile.tem
-                              target_makefile_frag=
-                      fi
-                      ;;
-            esac
-            # real copy now in ${subdir}/Makefile.tem
+debug=false
+ac_cs_recheck=false
+ac_cs_silent=false
+SHELL=\${CONFIG_SHELL-$SHELL}
+_ACEOF
 
-            # Conditionalize the makefile for this package.
-            rm -f ${Makefile}
-            case "${package_makefile_frag}" in
-              "") mv ${subdir}/Makefile.tem ${Makefile} ;;
-              *)
-                      if [ ! -f ${package_makefile_frag} ] ; then
-                              package_makefile_frag=${srcdir}/${package_makefile_frag}
-                      fi
-                      if [ -f ${package_makefile_frag} ] ; then
-                              sed -e "/^####/  r ${package_makefile_frag}" ${subdir}/Makefile.tem > ${Makefile}
-			      rm -f ${subdir}/Makefile.tem
-                      else
-                              echo '***' Expected package makefile fragment \"${package_makefile_frag}\" 1>&2
-                              echo '***' is missing in ${PWD=`pwd`}. 1>&2
-                              mv ${subdir}/Makefile.tem ${Makefile}
-                      fi
-            esac
-            # working copy now in ${Makefile}
+cat >>$CONFIG_STATUS <<\_ACEOF
+## --------------------- ##
+## M4sh Initialization.  ##
+## --------------------- ##
 
-            mv ${Makefile} ${subdir}/Makefile.tem
+# Be Bourne compatible
+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+"$@"}'='"$@"'
+elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then
+  set -o posix
+fi
 
-            # real copy now in ${subdir}/Makefile.tem
+# Support unset when possible.
+if (FOO=FOO; unset FOO) >/dev/null 2>&1; then
+  as_unset=unset
+else
+  as_unset=false
+fi
 
-            # prepend warning about editting, and a bunch of variables.
-            rm -f ${Makefile}
-            cat > ${Makefile} <<EOF
-# ${NO_EDIT}
-#VPATH = ${makesrcdir}
-links = ${configlinks}
-host_alias = ${host_alias}
-host_cpu = ${host_cpu}
-host_vendor = ${host_vendor}
-host_os = ${host_os}
-host_canonical = ${host_cpu}-${host_vendor}-${host_os}
-target_alias = ${target_alias}
-target_cpu = ${target_cpu}
-target_vendor = ${target_vendor}
-target_os = ${target_os}
-target_canonical = ${target_cpu}-${target_vendor}-${target_os}
-EOF
-	    case "${build}" in
-	      "") ;;
-	      *)  cat >> ${Makefile} << EOF
-build_alias = ${build_alias}
-build_cpu = ${build_cpu}
-build_vendor = ${build_vendor}
-build_os = ${build_os}
-build_canonical = ${build_cpu}-${build_vendor}-${build_os}
-EOF
-	    esac
 
-            case "${package_makefile_frag}" in
-              "") ;;
-              /*) echo package_makefile_frag = ${package_makefile_frag} >>${Makefile} ;;
-              *)  echo package_makefile_frag = ${invsubdir}${package_makefile_frag} >>${Makefile} ;;
-            esac
+# Work around bugs in pre-3.0 UWIN ksh.
+$as_unset ENV MAIL MAILPATH
+PS1='$ '
+PS2='> '
+PS4='+ '
 
-            case "${target_makefile_frag}" in
-              "") ;;
-              /*) echo target_makefile_frag = ${target_makefile_frag} >>${Makefile} ;;
-              *)  echo target_makefile_frag = ${invsubdir}${target_makefile_frag} >>${Makefile} ;;
-            esac
+# 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 -n "`(eval $as_var=C; export $as_var) 2>&1`"); then
+    eval $as_var=C; export $as_var
+  else
+    $as_unset $as_var
+  fi
+done
 
-            case "${host_makefile_frag}" in
-              "") ;;
-              /*) echo host_makefile_frag = ${host_makefile_frag} >>${Makefile} ;;
-              *)  echo host_makefile_frag = ${invsubdir}${host_makefile_frag} >>${Makefile} ;;
-            esac
+# Required to use basename.
+if expr a : '\(a\)' >/dev/null 2>&1; then
+  as_expr=expr
+else
+  as_expr=false
+fi
 
-            if [ "${site_makefile_frag}" != "" ] ; then
-                echo site_makefile_frag = ${invsubdir}${site_makefile_frag} >>${Makefile}
-            fi 
+if (basename /) >/dev/null 2>&1 && test "X`basename / 2>&1`" = "X/"; then
+  as_basename=basename
+else
+  as_basename=false
+fi
 
-	    # make sure that some sort of reasonable default exists for these 
-	    # two variables
-	    CXX=${CXX-"g++ -O"}
-	    CC=${CC-cc}
 
-            # reset prefix, exec_prefix, srcdir, SUBDIRS, NONSUBDIRS,
-            # remove any form feeds.
-            if [ -z "${subdirs}" ]; then
-                rm -f ${subdir}/Makefile.tem2
-                sed -e "s:^SUBDIRS[ 	]*=.*$:SUBDIRS = ${configdirs}:" \
-                    -e "s:^NONSUBDIRS[ 	]*=.*$:NONSUBDIRS = ${noconfigdirs}:" \
-                    ${subdir}/Makefile.tem > ${subdir}/Makefile.tem2
-                rm -f ${subdir}/Makefile.tem
-                mv ${subdir}/Makefile.tem2 ${subdir}/Makefile.tem
-            fi
-            sed -e "s:^prefix[ 	]*=.*$:prefix = ${prefix}:" \
-                    -e "s:^exec_prefix[ 	]*=.*$:exec_prefix = ${exec_prefix}:" \
-		    -e "s:^SHELL[	 ]*=.*$:SHELL = ${config_shell}:" \
-                    -e "s:^srcdir[ 	]*=.*$:srcdir = ${makesrcdir}:" \
-                    -e "s///" \
-                    -e "s:^program_prefix[ 	]*=.*$:program_prefix = ${program_prefix}:" \
-                    -e "s:^program_suffix[ 	]*=.*$:program_suffix = ${program_suffix}:" \
-                    -e "s:^program_transform_name[ 	]*=.*$:program_transform_name = ${program_transform_name}:" \
-                    -e "s:^tooldir[ 	]*=.*$:tooldir = ${tooldir}:" \
-                    ${subdir}/Makefile.tem >> ${Makefile}
-            # final copy now in ${Makefile}
+# 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'`
 
-        else
-           echo "No Makefile.in found in ${srcdir}/${subdir}, unable to configure" 1>&2
-        fi
 
-        rm -f ${subdir}/Makefile.tem
+# PATH needs CR, and LINENO needs CR and PATH.
+# 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
 
-        case "${host_makefile_frag}" in
-        "") using= ;;
-        *) using="and \"${host_makefile_frag}\"" ;;
-        esac
+# 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
 
-        case "${target_makefile_frag}" in
-        "") ;;
-        *) using="${using} and \"${target_makefile_frag}\"" ;;
-        esac
 
-        case "${site_makefile_frag}" in
-        "") ;;
-        *) using="${using} and \"${site_makefile_frag}\"" ;;
-        esac
+  as_lineno_1=$LINENO
+  as_lineno_2=$LINENO
+  as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null`
+  test "x$as_lineno_1" != "x$as_lineno_2" &&
+  test "x$as_lineno_3"  = "x$as_lineno_2"  || {
+  # Find who we are.  Look in the path if we contain no path at all
+  # relative or not.
+  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
 
-        newusing=`echo "${using}" | sed 's/and/using/'`
-        using=${newusing}
-        echo "Created \"${Makefile}\" in" ${PWD=`pwd`} ${using}
+       ;;
+  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_me:$LINENO: error: cannot find myself; rerun with an absolute path" >&5
+echo "$as_me: error: cannot find myself; rerun with an absolute path" >&2;}
+   { (exit 1); exit 1; }; }
+  fi
+  case $CONFIG_SHELL in
+  '')
+    as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+  for as_base in sh bash ksh sh5; do
+	 case $as_dir in
+	 /*)
+	   if ("$as_dir/$as_base" -c '
+  as_lineno_1=$LINENO
+  as_lineno_2=$LINENO
+  as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null`
+  test "x$as_lineno_1" != "x$as_lineno_2" &&
+  test "x$as_lineno_3"  = "x$as_lineno_2" ') 2>/dev/null; then
+	     $as_unset BASH_ENV || test "${BASH_ENV+set}" != set || { BASH_ENV=; export BASH_ENV; }
+	     $as_unset ENV || test "${ENV+set}" != set || { ENV=; export ENV; }
+	     CONFIG_SHELL=$as_dir/$as_base
+	     export CONFIG_SHELL
+	     exec "$CONFIG_SHELL" "$0" ${1+"$@"}
+	   fi;;
+	 esac
+       done
+done
+;;
+  esac
 
-        . ${tmpfile}.pos
+  # 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 before each line; the second 'sed' does the real
+  # work.  The second script uses 'N' to pair each line-number line
+  # with the numbered line, 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
+  # second 'sed' script.  Blame Lee E. McMahon for sed's syntax.  :-)
+  sed '=' <$as_myself |
+    sed '
+      N
+      s,$,-,
+      : loop
+      s,^\(['$as_cr_digits']*\)\(.*\)[$]LINENO\([^'$as_cr_alnum'_]\),\1\2\1\3,
+      t loop
+      s,-$,,
+      s,^['$as_cr_digits']*\n,,
+    ' >$as_me.lineno &&
+  chmod +x $as_me.lineno ||
+    { { echo "$as_me:$LINENO: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&5
+echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2;}
+   { (exit 1); exit 1; }; }
 
-        # describe the chosen configuration in config.status.
-        # Make that file a shellscript which will reestablish
-        # the same configuration.  Used in Makefiles to rebuild
-        # Makefiles.
+  # 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 sensible to this).
+  . ./$as_me.lineno
+  # Exit status is that of the last command.
+  exit
+}
 
-        case "${norecursion}" in
-        "") arguments="${arguments} --norecursion" ;;
-        *) ;;
-        esac
 
-        if [ ${subdir} = . ] ; then
-            echo "#!/bin/sh
-# ${NO_EDIT}
-# This directory was configured as follows:
-${progname}" ${arguments}  "
-# ${using}" > ${subdir}/config.new
-        else
-            echo "#!/bin/sh
-# ${NO_EDIT}
-# This directory was configured as follows:
-cd ${invsubdir}
-${progname}" ${arguments}  "
-# ${using}" > ${subdir}/config.new
-        fi
-        chmod a+x ${subdir}/config.new
-        if [ -r ${subdir}/config.back ] ; then
-                mv -f ${subdir}/config.back ${subdir}/config.status
-        fi
-        ${moveifchange} ${subdir}/config.new ${subdir}/config.status
-        ;;
+case `echo "testing\c"; echo 1,2,3`,`echo -n testing; echo 1,2,3` in
+  *c*,-n*) ECHO_N= ECHO_C='
+' ECHO_T='	' ;;
+  *c*,*  ) ECHO_N=-n ECHO_C= ECHO_T= ;;
+  *)       ECHO_N= ECHO_C='\c' ECHO_T= ;;
+esac
 
-    *)  rm -f ${Makefile} ${subdir}/config.status ${links} ;;
-    esac
+if expr a : '\(a\)' >/dev/null 2>&1; then
+  as_expr=expr
+else
+  as_expr=false
+fi
+
+rm -f conf$$ conf$$.exe conf$$.file
+echo >conf$$.file
+if ln -s conf$$.file conf$$ 2>/dev/null; then
+  # We could just check for DJGPP; but this test a) works b) is more generic
+  # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04).
+  if test -f conf$$.exe; then
+    # Don't use ln at all; we don't have any links
+    as_ln_s='cp -p'
+  else
+    as_ln_s='ln -s'
+  fi
+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$$.file
+
+if mkdir -p . 2>/dev/null; then
+  as_mkdir_p=:
+else
+  as_mkdir_p=false
+fi
+
+as_executable_p="test -f"
+
+# Sed expression to map a string onto a valid CPP name.
+as_tr_cpp="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="sed y%*+%pp%;s%[^_$as_cr_alnum]%_%g"
+
+
+# IFS
+# We need space, tab and new line, in precisely that order.
+as_nl='
+'
+IFS=" 	$as_nl"
+
+# CDPATH.
+$as_unset CDPATH
+
+exec 6>&1
+
+# Open the log real soon, to keep \$[0] and so on meaningful, and to
+# report actual input values of CONFIG_FILES etc. instead of their
+# values after options handling.  Logging --version etc. is OK.
+exec 5>>config.log
+{
+  echo
+  sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
+## Running $as_me. ##
+_ASBOX
+} >&5
+cat >&5 <<_CSEOF
+
+This file was extended by HDF $as_me 4.2r1, which was
+generated by GNU Autoconf 2.57.  Invocation command line was
+
+  CONFIG_FILES    = $CONFIG_FILES
+  CONFIG_HEADERS  = $CONFIG_HEADERS
+  CONFIG_LINKS    = $CONFIG_LINKS
+  CONFIG_COMMANDS = $CONFIG_COMMANDS
+  $ $0 $@
+
+_CSEOF
+echo "on `(hostname || uname -n) 2>/dev/null | sed 1q`" >&5
+echo >&5
+_ACEOF
+
+# Files that config.status was made for.
+if test -n "$ac_config_files"; then
+  echo "config_files=\"$ac_config_files\"" >>$CONFIG_STATUS
+fi
+
+if test -n "$ac_config_headers"; then
+  echo "config_headers=\"$ac_config_headers\"" >>$CONFIG_STATUS
+fi
+
+if test -n "$ac_config_links"; then
+  echo "config_links=\"$ac_config_links\"" >>$CONFIG_STATUS
+fi
+
+if test -n "$ac_config_commands"; then
+  echo "config_commands=\"$ac_config_commands\"" >>$CONFIG_STATUS
+fi
+
+cat >>$CONFIG_STATUS <<\_ACEOF
+
+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, 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>."
+_ACEOF
+
+cat >>$CONFIG_STATUS <<_ACEOF
+ac_cs_version="\\
+HDF config.status 4.2r1
+configured by $0, generated by GNU Autoconf 2.57,
+  with options \\"`echo "$ac_configure_args" | sed 's/[\\""\`\$]/\\\\&/g'`\\"
+
+Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001
+Free Software Foundation, Inc.
+This config.status script is free software; the Free Software Foundation
+gives unlimited permission to copy, distribute and modify it."
+srcdir=$srcdir
+INSTALL="$INSTALL"
+_ACEOF
+
+cat >>$CONFIG_STATUS <<\_ACEOF
+# 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
+    ;;
+  *) # This is not an option, so the user has probably given explicit
+     # arguments.
+     ac_option=$1
+     ac_need_defaults=false;;
+  esac
+
+  case $ac_option in
+  # Handling of the options.
+_ACEOF
+cat >>$CONFIG_STATUS <<\_ACEOF
+  -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
+    ac_cs_recheck=: ;;
+  --version | --vers* | -V )
+    echo "$ac_cs_version"; exit 0 ;;
+  --he | --h)
+    # Conflict between --help and --header
+    { { echo "$as_me:$LINENO: error: ambiguous option: $1
+Try \`$0 --help' for more information." >&5
+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 0 ;;
+  --debug | --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;;
+  -q | -quiet | --quiet | --quie | --qui | --qu | --q \
+  | -silent | --silent | --silen | --sile | --sil | --si | --s)
+    ac_cs_silent=: ;;
+
+  # This is an error.
+  -*) { { echo "$as_me:$LINENO: error: unrecognized option: $1
+Try \`$0 --help' for more information." >&5
+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" ;;
+
+  esac
+  shift
 done
 
-# If there are subdirectories, then recur. 
-if [ -z "${norecursion}" -a -n "${configdirs}" ] ; then 
-        for configdir in ${configdirs} ; do
+ac_configure_extra_args=
 
-                if [ -d ${srcdir}/${configdir} ] ; then
-                        eval echo Configuring ${configdir}... ${redirect}
-                        case "${srcdir}" in
-                        ".") ;;
-                        *)
-                                if [ ! -d ./${configdir} ] ; then
-                                        if mkdir ./${configdir} ; then
-                                                true
-                                        else
-                                                echo '***' "${progname}: could not make ${PWD=`pwd`}/${configdir}" 1>&2
-                                                exit 1
-                                        fi
-                                fi
-                                ;;
-                        esac
+if $ac_cs_silent; then
+  exec 6>/dev/null
+  ac_configure_extra_args="$ac_configure_extra_args --silent"
+fi
 
-                        POPDIR=${PWD=`pwd`}
-                        cd ${configdir} 
+_ACEOF
+cat >>$CONFIG_STATUS <<_ACEOF
+if \$ac_cs_recheck; then
+  echo "running $SHELL $0 " $ac_configure_args \$ac_configure_extra_args " --no-create --no-recursion" >&6
+  exec $SHELL $0 $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
+fi
 
-### figure out what to do with srcdir
-                        case "${srcdir}" in
-                        ".") newsrcdir=${srcdir} ;; # no -srcdir option.  We're building in place.
-                        /*) # absolute path
-                                newsrcdir=${srcdir}/${configdir}
-                                srcdiroption="--srcdir=${newsrcdir}"
-                                ;;
-                        *) # otherwise relative
-                                newsrcdir=../${srcdir}/${configdir}
-                                srcdiroption="--srcdir=${newsrcdir}"
-                                ;;
-                        esac
+_ACEOF
 
-### check for guested configure, otherwise fix possibly relative progname
-                        if [ -f ${newsrcdir}/configure ] ; then
-                                recprog=${newsrcdir}/configure
-                        elif [ -f ${newsrcdir}/configure.in ] ; then
-                                case "${progname}" in
-                                /*)     recprog=${progname} ;;
-##
-## Changed the way this is handled the default case is to use
-## the top level configure found originaly and not the one found in
-## parent directory -GV
-##                              *)      recprog=../${progname} ;;
-                                *)      recprog=${POPDIR}/${progname} ;;
-                                esac
-			else
-				eval echo No configuration information in ${configdir} ${redirect}
-				recprog=
-                        fi
+cat >>$CONFIG_STATUS <<_ACEOF
+#
+# INIT-COMMANDS section.
+#
 
-### The recursion line is here.
-			if [ ! -z "${recprog}" ] ; then
-	                        if eval ${config_shell} ${recprog} ${verbose} ${buildopt} --host=${host_alias} --target=${target_alias} \
-        	                        ${prefixoption} ${tmpdiroption} ${exec_prefixoption} \
-                	                ${srcdiroption} ${program_prefixoption} ${program_suffixoption} ${program_transform_nameoption} ${site_option} ${withoptions} ${withoutoptions} ${enableoptions} ${disableoptions} ${removing} ${other_options} ${redirect} ; then
-	                                true
-        	                else
-					echo Configure in `pwd` failed, exiting. 1>&2
-                	                exit 1
-                        	fi
-			fi
 
-                        cd ${POPDIR}
-                fi
-        done
+AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"
+
+_ACEOF
+
+
+
+cat >>$CONFIG_STATUS <<\_ACEOF
+for ac_config_target in $ac_config_targets
+do
+  case "$ac_config_target" in
+  # Handling of arguments.
+  "Makefile" ) CONFIG_FILES="$CONFIG_FILES Makefile" ;;
+  "hdf/Makefile" ) CONFIG_FILES="$CONFIG_FILES hdf/Makefile" ;;
+  "hdf/src/Makefile" ) CONFIG_FILES="$CONFIG_FILES hdf/src/Makefile" ;;
+  "hdf/test/Makefile" ) CONFIG_FILES="$CONFIG_FILES hdf/test/Makefile" ;;
+  "hdf/util/Makefile" ) CONFIG_FILES="$CONFIG_FILES hdf/util/Makefile" ;;
+  "hdf/util/h4cc" ) CONFIG_FILES="$CONFIG_FILES hdf/util/h4cc" ;;
+  "hdf/util/h4fc" ) CONFIG_FILES="$CONFIG_FILES hdf/util/h4fc" ;;
+  "hdf/util/h4redeploy" ) CONFIG_FILES="$CONFIG_FILES hdf/util/h4redeploy" ;;
+  "hdf/util/testutil.sh" ) CONFIG_FILES="$CONFIG_FILES hdf/util/testutil.sh" ;;
+  "man/Makefile" ) CONFIG_FILES="$CONFIG_FILES man/Makefile" ;;
+  "mfhdf/Makefile" ) CONFIG_FILES="$CONFIG_FILES mfhdf/Makefile" ;;
+  "mfhdf/dumper/Makefile" ) CONFIG_FILES="$CONFIG_FILES mfhdf/dumper/Makefile" ;;
+  "mfhdf/dumper/testhdp.sh" ) CONFIG_FILES="$CONFIG_FILES mfhdf/dumper/testhdp.sh" ;;
+  "mfhdf/fortran/Makefile" ) CONFIG_FILES="$CONFIG_FILES mfhdf/fortran/Makefile" ;;
+  "mfhdf/hdfimport/Makefile" ) CONFIG_FILES="$CONFIG_FILES mfhdf/hdfimport/Makefile" ;;
+  "mfhdf/hdfimport/testutil.sh" ) CONFIG_FILES="$CONFIG_FILES mfhdf/hdfimport/testutil.sh" ;;
+  "mfhdf/hdiff/Makefile" ) CONFIG_FILES="$CONFIG_FILES mfhdf/hdiff/Makefile" ;;
+  "mfhdf/hrepack/Makefile" ) CONFIG_FILES="$CONFIG_FILES mfhdf/hrepack/Makefile" ;;
+  "mfhdf/libsrc/Makefile" ) CONFIG_FILES="$CONFIG_FILES mfhdf/libsrc/Makefile" ;;
+  "mfhdf/ncdump/Makefile" ) CONFIG_FILES="$CONFIG_FILES mfhdf/ncdump/Makefile" ;;
+  "mfhdf/ncgen/Makefile" ) CONFIG_FILES="$CONFIG_FILES mfhdf/ncgen/Makefile" ;;
+  "mfhdf/nctest/Makefile" ) CONFIG_FILES="$CONFIG_FILES mfhdf/nctest/Makefile" ;;
+  "mfhdf/port/Makefile" ) CONFIG_FILES="$CONFIG_FILES mfhdf/port/Makefile" ;;
+  "mfhdf/xdr/Makefile" ) CONFIG_FILES="$CONFIG_FILES mfhdf/xdr/Makefile" ;;
+  "default-1" ) CONFIG_COMMANDS="$CONFIG_COMMANDS default-1" ;;
+  "depfiles" ) CONFIG_COMMANDS="$CONFIG_COMMANDS depfiles" ;;
+  "hdf/src/h4config.h" ) CONFIG_HEADERS="$CONFIG_HEADERS hdf/src/h4config.h" ;;
+  *) { { 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
 
-# Perform the same cleanup as the trap handler, minus the "exit 1" of course,
-# and reset the trap handler.
-rm -f ${tmpfile}.com ${tmpfile}.tgt ${tmpfile}.hst ${tmpfile}.pos
-trap 0
+# Have a temporary directory for convenience.  Make it in the build tree
+# simply because there is no reason to put it here, and in addition,
+# creating and moving files from /tmp can sometimes cause problems.
+# Create a temporary directory, and hook for its removal unless debugging.
+$debug ||
+{
+  trap 'exit_status=$?; rm -rf $tmp && exit $exit_status' 0
+  trap '{ (exit 1); exit 1; }' 1 2 13 15
+}
 
-exit 0
+# Create a (secure) tmp directory for tmp files.
 
+{
+  tmp=`(umask 077 && mktemp -d -q "./confstatXXXXXX") 2>/dev/null` &&
+  test -n "$tmp" && test -d "$tmp"
+}  ||
+{
+  tmp=./confstat$$-$RANDOM
+  (umask 077 && mkdir $tmp)
+} ||
+{
+   echo "$me: cannot create a temporary directory in ." >&2
+   { (exit 1); exit 1; }
+}
+
+_ACEOF
+
+cat >>$CONFIG_STATUS <<_ACEOF
+
 #
-# Local Variables:
-# fill-column: 131
-# End:
+# CONFIG_FILES section.
 #
 
-# end of configure
+# 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
+  # Protect against being on the right side of a sed subst in config.status.
+  sed 's/,@/@@/; s/@,/@@/; s/,;t t\$/@;t t/; /@;t t\$/s/[\\\\&,]/\\\\&/g;
+   s/@@/,@/; s/@@/@,/; s/@;t t\$/,;t t/' >\$tmp/subs.sed <<\\CEOF
+s, at SHELL@,$SHELL,;t t
+s, at PATH_SEPARATOR@,$PATH_SEPARATOR,;t t
+s, at PACKAGE_NAME@,$PACKAGE_NAME,;t t
+s, at PACKAGE_TARNAME@,$PACKAGE_TARNAME,;t t
+s, at PACKAGE_VERSION@,$PACKAGE_VERSION,;t t
+s, at PACKAGE_STRING@,$PACKAGE_STRING,;t t
+s, at PACKAGE_BUGREPORT@,$PACKAGE_BUGREPORT,;t t
+s, at exec_prefix@,$exec_prefix,;t t
+s, at prefix@,$prefix,;t t
+s, at program_transform_name@,$program_transform_name,;t t
+s, at bindir@,$bindir,;t t
+s, at sbindir@,$sbindir,;t t
+s, at libexecdir@,$libexecdir,;t t
+s, at datadir@,$datadir,;t t
+s, at sysconfdir@,$sysconfdir,;t t
+s, at sharedstatedir@,$sharedstatedir,;t t
+s, at localstatedir@,$localstatedir,;t t
+s, at libdir@,$libdir,;t t
+s, at includedir@,$includedir,;t t
+s, at oldincludedir@,$oldincludedir,;t t
+s, at infodir@,$infodir,;t t
+s, at mandir@,$mandir,;t t
+s, at build_alias@,$build_alias,;t t
+s, at host_alias@,$host_alias,;t t
+s, at target_alias@,$target_alias,;t t
+s, at DEFS@,$DEFS,;t t
+s, at ECHO_C@,$ECHO_C,;t t
+s, at ECHO_N@,$ECHO_N,;t t
+s, at ECHO_T@,$ECHO_T,;t t
+s, at LIBS@,$LIBS,;t t
+s, at INSTALL_PROGRAM@,$INSTALL_PROGRAM,;t t
+s, at INSTALL_SCRIPT@,$INSTALL_SCRIPT,;t t
+s, at INSTALL_DATA@,$INSTALL_DATA,;t t
+s, at CYGPATH_W@,$CYGPATH_W,;t t
+s, at PACKAGE@,$PACKAGE,;t t
+s, at VERSION@,$VERSION,;t t
+s, at ACLOCAL@,$ACLOCAL,;t t
+s, at AUTOCONF@,$AUTOCONF,;t t
+s, at AUTOMAKE@,$AUTOMAKE,;t t
+s, at AUTOHEADER@,$AUTOHEADER,;t t
+s, at MAKEINFO@,$MAKEINFO,;t t
+s, at AMTAR@,$AMTAR,;t t
+s, at install_sh@,$install_sh,;t t
+s, at STRIP@,$STRIP,;t t
+s, at ac_ct_STRIP@,$ac_ct_STRIP,;t t
+s, at INSTALL_STRIP_PROGRAM@,$INSTALL_STRIP_PROGRAM,;t t
+s, at AWK@,$AWK,;t t
+s, at SET_MAKE@,$SET_MAKE,;t t
+s, at am__leading_dot@,$am__leading_dot,;t t
+s, at MAINTAINER_MODE_TRUE@,$MAINTAINER_MODE_TRUE,;t t
+s, at MAINTAINER_MODE_FALSE@,$MAINTAINER_MODE_FALSE,;t t
+s, at MAINT@,$MAINT,;t t
+s, at build@,$build,;t t
+s, at build_cpu@,$build_cpu,;t t
+s, at build_vendor@,$build_vendor,;t t
+s, at build_os@,$build_os,;t t
+s, at host@,$host,;t t
+s, at host_cpu@,$host_cpu,;t t
+s, at host_vendor@,$host_vendor,;t t
+s, at host_os@,$host_os,;t t
+s, at CC@,$CC,;t t
+s, at CFLAGS@,$CFLAGS,;t t
+s, at LDFLAGS@,$LDFLAGS,;t t
+s, at CPPFLAGS@,$CPPFLAGS,;t t
+s, at ac_ct_CC@,$ac_ct_CC,;t t
+s, at EXEEXT@,$EXEEXT,;t t
+s, at OBJEXT@,$OBJEXT,;t t
+s, at DEPDIR@,$DEPDIR,;t t
+s, at am__include@,$am__include,;t t
+s, at am__quote@,$am__quote,;t t
+s, at AMDEP_TRUE@,$AMDEP_TRUE,;t t
+s, at AMDEP_FALSE@,$AMDEP_FALSE,;t t
+s, at AMDEPBACKSLASH@,$AMDEPBACKSLASH,;t t
+s, at CCDEPMODE@,$CCDEPMODE,;t t
+s, at am__fastdepCC_TRUE@,$am__fastdepCC_TRUE,;t t
+s, at am__fastdepCC_FALSE@,$am__fastdepCC_FALSE,;t t
+s, at CPP@,$CPP,;t t
+s, at CXX@,$CXX,;t t
+s, at CXXFLAGS@,$CXXFLAGS,;t t
+s, at ac_ct_CXX@,$ac_ct_CXX,;t t
+s, at CXXDEPMODE@,$CXXDEPMODE,;t t
+s, at am__fastdepCXX_TRUE@,$am__fastdepCXX_TRUE,;t t
+s, at am__fastdepCXX_FALSE@,$am__fastdepCXX_FALSE,;t t
+s, at F77@,$F77,;t t
+s, at FFLAGS@,$FFLAGS,;t t
+s, at ac_ct_F77@,$ac_ct_F77,;t t
+s, at HDF_BUILD_FORTRAN_TRUE@,$HDF_BUILD_FORTRAN_TRUE,;t t
+s, at HDF_BUILD_FORTRAN_FALSE@,$HDF_BUILD_FORTRAN_FALSE,;t t
+s, at LEX@,$LEX,;t t
+s, at LEXLIB@,$LEXLIB,;t t
+s, at LEX_OUTPUT_ROOT@,$LEX_OUTPUT_ROOT,;t t
+s, at LN_S@,$LN_S,;t t
+s, at RANLIB@,$RANLIB,;t t
+s, at ac_ct_RANLIB@,$ac_ct_RANLIB,;t t
+s, at YACC@,$YACC,;t t
+s, at AR@,$AR,;t t
+s, at DIFF@,$DIFF,;t t
+s, at NEQN@,$NEQN,;t t
+s, at TBL@,$TBL,;t t
+s, at EGREP@,$EGREP,;t t
+s, at HDF_BUILD_XDR_TRUE@,$HDF_BUILD_XDR_TRUE,;t t
+s, at HDF_BUILD_XDR_FALSE@,$HDF_BUILD_XDR_FALSE,;t t
+s, at CXXCPP@,$CXXCPP,;t t
+s, at LIBOBJS@,$LIBOBJS,;t t
+s, at LTLIBOBJS@,$LTLIBOBJS,;t t
+CEOF
+
+_ACEOF
+
+  cat >>$CONFIG_STATUS <<\_ACEOF
+  # Split the substitutions into bite-sized pieces for seds with
+  # small command number limits, like on Digital OSF/1 and HP-UX.
+  ac_max_sed_lines=48
+  ac_sed_frag=1 # Number of current file.
+  ac_beg=1 # First line for current file.
+  ac_end=$ac_max_sed_lines # Line after last line for current file.
+  ac_more_lines=:
+  ac_sed_cmds=
+  while $ac_more_lines; do
+    if test $ac_beg -gt 1; then
+      sed "1,${ac_beg}d; ${ac_end}q" $tmp/subs.sed >$tmp/subs.frag
+    else
+      sed "${ac_end}q" $tmp/subs.sed >$tmp/subs.frag
+    fi
+    if test ! -s $tmp/subs.frag; then
+      ac_more_lines=false
+    else
+      # The purpose of the label and of the branching condition is to
+      # speed up the sed processing (if there are no `@' at all, there
+      # is no need to browse any of the substitutions).
+      # These are the two extra sed commands mentioned above.
+      (echo ':t
+  /@[a-zA-Z_][a-zA-Z_0-9]*@/!b' && cat $tmp/subs.frag) >$tmp/subs-$ac_sed_frag.sed
+      if test -z "$ac_sed_cmds"; then
+  	ac_sed_cmds="sed -f $tmp/subs-$ac_sed_frag.sed"
+      else
+  	ac_sed_cmds="$ac_sed_cmds | sed -f $tmp/subs-$ac_sed_frag.sed"
+      fi
+      ac_sed_frag=`expr $ac_sed_frag + 1`
+      ac_beg=$ac_end
+      ac_end=`expr $ac_end + $ac_max_sed_lines`
+    fi
+  done
+  if test -z "$ac_sed_cmds"; then
+    ac_sed_cmds=cat
+  fi
+fi # test -n "$CONFIG_FILES"
+
+_ACEOF
+cat >>$CONFIG_STATUS <<\_ACEOF
+for ac_file in : $CONFIG_FILES; do test "x$ac_file" = x: && continue
+  # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
+  case $ac_file in
+  - | *:- | *:-:* ) # input from stdin
+        cat >$tmp/stdin
+        ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
+        ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
+  *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
+        ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
+  * )   ac_file_in=$ac_file.in ;;
+  esac
+
+  # Compute @srcdir@, @top_srcdir@, and @INSTALL@ for subdirectories.
+  ac_dir=`(dirname "$ac_file") 2>/dev/null ||
+$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'`
+  { if $as_mkdir_p; then
+    mkdir -p "$ac_dir"
+  else
+    as_dir="$ac_dir"
+    as_dirs=
+    while test ! -d "$as_dir"; do
+      as_dirs="$as_dir $as_dirs"
+      as_dir=`(dirname "$as_dir") 2>/dev/null ||
+$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'`
+    done
+    test ! -n "$as_dirs" || mkdir $as_dirs
+  fi || { { echo "$as_me:$LINENO: error: cannot create directory \"$ac_dir\"" >&5
+echo "$as_me: error: cannot create directory \"$ac_dir\"" >&2;}
+   { (exit 1); exit 1; }; }; }
+
+  ac_builddir=.
+
+if test "$ac_dir" != .; then
+  ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'`
+  # A "../" for each directory in $ac_dir_suffix.
+  ac_top_builddir=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,../,g'`
+else
+  ac_dir_suffix= ac_top_builddir=
+fi
+
+case $srcdir in
+  .)  # No --srcdir option.  We are building in place.
+    ac_srcdir=.
+    if test -z "$ac_top_builddir"; then
+       ac_top_srcdir=.
+    else
+       ac_top_srcdir=`echo $ac_top_builddir | sed 's,/$,,'`
+    fi ;;
+  [\\/]* | ?:[\\/]* )  # Absolute path.
+    ac_srcdir=$srcdir$ac_dir_suffix;
+    ac_top_srcdir=$srcdir ;;
+  *) # Relative path.
+    ac_srcdir=$ac_top_builddir$srcdir$ac_dir_suffix
+    ac_top_srcdir=$ac_top_builddir$srcdir ;;
+esac
+# Don't blindly perform a `cd "$ac_dir"/$ac_foo && pwd` since $ac_foo can be
+# absolute.
+ac_abs_builddir=`cd "$ac_dir" && cd $ac_builddir && pwd`
+ac_abs_top_builddir=`cd "$ac_dir" && cd ${ac_top_builddir}. && pwd`
+ac_abs_srcdir=`cd "$ac_dir" && cd $ac_srcdir && pwd`
+ac_abs_top_srcdir=`cd "$ac_dir" && cd $ac_top_srcdir && pwd`
+
+
+  case $INSTALL in
+  [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
+  *) ac_INSTALL=$ac_top_builddir$INSTALL ;;
+  esac
+
+  if test x"$ac_file" != x-; then
+    { echo "$as_me:$LINENO: creating $ac_file" >&5
+echo "$as_me: creating $ac_file" >&6;}
+    rm -f "$ac_file"
+  fi
+  # 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.  */
+  if test x"$ac_file" = x-; then
+    configure_input=
+  else
+    configure_input="$ac_file.  "
+  fi
+  configure_input=$configure_input"Generated from `echo $ac_file_in |
+                                     sed 's,.*/,,'` by configure."
+
+  # First look for the input files in the build tree, otherwise in the
+  # src tree.
+  ac_file_inputs=`IFS=:
+    for f in $ac_file_in; do
+      case $f in
+      -) echo $tmp/stdin ;;
+      [\\/$]*)
+         # Absolute (can't be DOS-style, as IFS=:)
+         test -f "$f" || { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5
+echo "$as_me: error: cannot find input file: $f" >&2;}
+   { (exit 1); exit 1; }; }
+         echo $f;;
+      *) # Relative
+         if test -f "$f"; then
+           # Build tree
+           echo $f
+         elif test -f "$srcdir/$f"; then
+           # Source tree
+           echo $srcdir/$f
+         else
+           # /dev/null tree
+           { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5
+echo "$as_me: error: cannot find input file: $f" >&2;}
+   { (exit 1); exit 1; }; }
+         fi;;
+      esac
+    done` || { (exit 1); exit 1; }
+_ACEOF
+cat >>$CONFIG_STATUS <<_ACEOF
+  sed "$ac_vpsub
+$extrasub
+_ACEOF
+cat >>$CONFIG_STATUS <<\_ACEOF
+:t
+/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
+s, at configure_input@,$configure_input,;t t
+s, at srcdir@,$ac_srcdir,;t t
+s, at abs_srcdir@,$ac_abs_srcdir,;t t
+s, at top_srcdir@,$ac_top_srcdir,;t t
+s, at abs_top_srcdir@,$ac_abs_top_srcdir,;t t
+s, at builddir@,$ac_builddir,;t t
+s, at abs_builddir@,$ac_abs_builddir,;t t
+s, at top_builddir@,$ac_top_builddir,;t t
+s, at abs_top_builddir@,$ac_abs_top_builddir,;t t
+s, at INSTALL@,$ac_INSTALL,;t t
+" $ac_file_inputs | (eval "$ac_sed_cmds") >$tmp/out
+  rm -f $tmp/stdin
+  if test x"$ac_file" != x-; then
+    mv $tmp/out $ac_file
+  else
+    cat $tmp/out
+    rm -f $tmp/out
+  fi
+
+done
+_ACEOF
+cat >>$CONFIG_STATUS <<\_ACEOF
+
+#
+# CONFIG_HEADER section.
+#
+
+# These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
+# NAME is the cpp macro being defined and VALUE is the value it is being given.
+#
+# ac_d sets the value in "#define NAME VALUE" lines.
+ac_dA='s,^\([ 	]*\)#\([ 	]*define[ 	][ 	]*\)'
+ac_dB='[ 	].*$,\1#\2'
+ac_dC=' '
+ac_dD=',;t'
+# ac_u turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
+ac_uA='s,^\([ 	]*\)#\([ 	]*\)undef\([ 	][ 	]*\)'
+ac_uB='$,\1#\2define\3'
+ac_uC=' '
+ac_uD=',;t'
+
+for ac_file in : $CONFIG_HEADERS; do test "x$ac_file" = x: && continue
+  # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
+  case $ac_file in
+  - | *:- | *:-:* ) # input from stdin
+        cat >$tmp/stdin
+        ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
+        ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
+  *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
+        ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
+  * )   ac_file_in=$ac_file.in ;;
+  esac
+
+  test x"$ac_file" != x- && { echo "$as_me:$LINENO: creating $ac_file" >&5
+echo "$as_me: creating $ac_file" >&6;}
+
+  # First look for the input files in the build tree, otherwise in the
+  # src tree.
+  ac_file_inputs=`IFS=:
+    for f in $ac_file_in; do
+      case $f in
+      -) echo $tmp/stdin ;;
+      [\\/$]*)
+         # Absolute (can't be DOS-style, as IFS=:)
+         test -f "$f" || { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5
+echo "$as_me: error: cannot find input file: $f" >&2;}
+   { (exit 1); exit 1; }; }
+         echo $f;;
+      *) # Relative
+         if test -f "$f"; then
+           # Build tree
+           echo $f
+         elif test -f "$srcdir/$f"; then
+           # Source tree
+           echo $srcdir/$f
+         else
+           # /dev/null tree
+           { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5
+echo "$as_me: error: cannot find input file: $f" >&2;}
+   { (exit 1); exit 1; }; }
+         fi;;
+      esac
+    done` || { (exit 1); exit 1; }
+  # Remove the trailing spaces.
+  sed 's/[ 	]*$//' $ac_file_inputs >$tmp/in
+
+_ACEOF
+
+# Transform confdefs.h into two sed scripts, `conftest.defines' and
+# `conftest.undefs', that substitutes the proper values into
+# config.h.in to produce config.h.  The first handles `#define'
+# templates, and the second `#undef' templates.
+# And first: Protect against being on the right side of a sed subst in
+# config.status.  Protect against being in an unquoted here document
+# in config.status.
+rm -f conftest.defines conftest.undefs
+# Using a here document instead of a string reduces the quoting nightmare.
+# Putting comments in sed scripts is not portable.
+#
+# `end' is used to avoid that the second main sed command (meant for
+# 0-ary CPP macros) applies to n-ary macro definitions.
+# See the Autoconf documentation for `clear'.
+cat >confdef2sed.sed <<\_ACEOF
+s/[\\&,]/\\&/g
+s,[\\$`],\\&,g
+t clear
+: clear
+s,^[ 	]*#[ 	]*define[ 	][ 	]*\([^ 	(][^ 	(]*\)\(([^)]*)\)[ 	]*\(.*\)$,${ac_dA}\1${ac_dB}\1\2${ac_dC}\3${ac_dD},gp
+t end
+s,^[ 	]*#[ 	]*define[ 	][ 	]*\([^ 	][^ 	]*\)[ 	]*\(.*\)$,${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD},gp
+: end
+_ACEOF
+# If some macros were called several times there might be several times
+# the same #defines, which is useless.  Nevertheless, we may not want to
+# sort them, since we want the *last* AC-DEFINE to be honored.
+uniq confdefs.h | sed -n -f confdef2sed.sed >conftest.defines
+sed 's/ac_d/ac_u/g' conftest.defines >conftest.undefs
+rm -f confdef2sed.sed
+
+# This sed command replaces #undef with comments.  This is necessary, for
+# example, in the case of _POSIX_SOURCE, which is predefined and required
+# on some systems where configure will not decide to define it.
+cat >>conftest.undefs <<\_ACEOF
+s,^[ 	]*#[ 	]*undef[ 	][ 	]*[a-zA-Z_][a-zA-Z_0-9]*,/* & */,
+_ACEOF
+
+# Break up conftest.defines because some shells have a limit on the size
+# of here documents, and old seds have small limits too (100 cmds).
+echo '  # Handle all the #define templates only if necessary.' >>$CONFIG_STATUS
+echo '  if grep "^[ 	]*#[ 	]*define" $tmp/in >/dev/null; then' >>$CONFIG_STATUS
+echo '  # If there are no defines, we may have an empty if/fi' >>$CONFIG_STATUS
+echo '  :' >>$CONFIG_STATUS
+rm -f conftest.tail
+while grep . conftest.defines >/dev/null
+do
+  # Write a limited-size here document to $tmp/defines.sed.
+  echo '  cat >$tmp/defines.sed <<CEOF' >>$CONFIG_STATUS
+  # Speed up: don't consider the non `#define' lines.
+  echo '/^[ 	]*#[ 	]*define/!b' >>$CONFIG_STATUS
+  # Work around the forget-to-reset-the-flag bug.
+  echo 't clr' >>$CONFIG_STATUS
+  echo ': clr' >>$CONFIG_STATUS
+  sed ${ac_max_here_lines}q conftest.defines >>$CONFIG_STATUS
+  echo 'CEOF
+  sed -f $tmp/defines.sed $tmp/in >$tmp/out
+  rm -f $tmp/in
+  mv $tmp/out $tmp/in
+' >>$CONFIG_STATUS
+  sed 1,${ac_max_here_lines}d conftest.defines >conftest.tail
+  rm -f conftest.defines
+  mv conftest.tail conftest.defines
+done
+rm -f conftest.defines
+echo '  fi # grep' >>$CONFIG_STATUS
+echo >>$CONFIG_STATUS
+
+# Break up conftest.undefs because some shells have a limit on the size
+# of here documents, and old seds have small limits too (100 cmds).
+echo '  # Handle all the #undef templates' >>$CONFIG_STATUS
+rm -f conftest.tail
+while grep . conftest.undefs >/dev/null
+do
+  # Write a limited-size here document to $tmp/undefs.sed.
+  echo '  cat >$tmp/undefs.sed <<CEOF' >>$CONFIG_STATUS
+  # Speed up: don't consider the non `#undef'
+  echo '/^[ 	]*#[ 	]*undef/!b' >>$CONFIG_STATUS
+  # Work around the forget-to-reset-the-flag bug.
+  echo 't clr' >>$CONFIG_STATUS
+  echo ': clr' >>$CONFIG_STATUS
+  sed ${ac_max_here_lines}q conftest.undefs >>$CONFIG_STATUS
+  echo 'CEOF
+  sed -f $tmp/undefs.sed $tmp/in >$tmp/out
+  rm -f $tmp/in
+  mv $tmp/out $tmp/in
+' >>$CONFIG_STATUS
+  sed 1,${ac_max_here_lines}d conftest.undefs >conftest.tail
+  rm -f conftest.undefs
+  mv conftest.tail conftest.undefs
+done
+rm -f conftest.undefs
+
+cat >>$CONFIG_STATUS <<\_ACEOF
+  # 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.  */
+  if test x"$ac_file" = x-; then
+    echo "/* Generated by configure.  */" >$tmp/config.h
+  else
+    echo "/* $ac_file.  Generated by configure.  */" >$tmp/config.h
+  fi
+  cat $tmp/in >>$tmp/config.h
+  rm -f $tmp/in
+  if test x"$ac_file" != x-; then
+    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
+      ac_dir=`(dirname "$ac_file") 2>/dev/null ||
+$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'`
+      { if $as_mkdir_p; then
+    mkdir -p "$ac_dir"
+  else
+    as_dir="$ac_dir"
+    as_dirs=
+    while test ! -d "$as_dir"; do
+      as_dirs="$as_dir $as_dirs"
+      as_dir=`(dirname "$as_dir") 2>/dev/null ||
+$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'`
+    done
+    test ! -n "$as_dirs" || mkdir $as_dirs
+  fi || { { echo "$as_me:$LINENO: error: cannot create directory \"$ac_dir\"" >&5
+echo "$as_me: error: cannot create directory \"$ac_dir\"" >&2;}
+   { (exit 1); exit 1; }; }; }
+
+      rm -f $ac_file
+      mv $tmp/config.h $ac_file
+    fi
+  else
+    cat $tmp/config.h
+    rm -f $tmp/config.h
+  fi
+# Compute $ac_file's index in $config_headers.
+_am_stamp_count=1
+for _am_header in $config_headers :; do
+  case $_am_header in
+    $ac_file | $ac_file:* )
+      break ;;
+    * )
+      _am_stamp_count=`expr $_am_stamp_count + 1` ;;
+  esac
+done
+echo "timestamp for $ac_file" >`(dirname $ac_file) 2>/dev/null ||
+$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'`/stamp-h$_am_stamp_count
+done
+_ACEOF
+cat >>$CONFIG_STATUS <<\_ACEOF
+
+#
+# CONFIG_COMMANDS section.
+#
+for ac_file in : $CONFIG_COMMANDS; do test "x$ac_file" = x: && continue
+  ac_dest=`echo "$ac_file" | sed 's,:.*,,'`
+  ac_source=`echo "$ac_file" | sed 's,[^:]*:,,'`
+  ac_dir=`(dirname "$ac_dest") 2>/dev/null ||
+$as_expr X"$ac_dest" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
+         X"$ac_dest" : 'X\(//\)[^/]' \| \
+         X"$ac_dest" : 'X\(//\)$' \| \
+         X"$ac_dest" : 'X\(/\)' \| \
+         .     : '\(.\)' 2>/dev/null ||
+echo X"$ac_dest" |
+    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
+  	  /^X\(\/\/\)[^/].*/{ s//\1/; q; }
+  	  /^X\(\/\/\)$/{ s//\1/; q; }
+  	  /^X\(\/\).*/{ s//\1/; q; }
+  	  s/.*/./; q'`
+  ac_builddir=.
+
+if test "$ac_dir" != .; then
+  ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'`
+  # A "../" for each directory in $ac_dir_suffix.
+  ac_top_builddir=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,../,g'`
+else
+  ac_dir_suffix= ac_top_builddir=
+fi
+
+case $srcdir in
+  .)  # No --srcdir option.  We are building in place.
+    ac_srcdir=.
+    if test -z "$ac_top_builddir"; then
+       ac_top_srcdir=.
+    else
+       ac_top_srcdir=`echo $ac_top_builddir | sed 's,/$,,'`
+    fi ;;
+  [\\/]* | ?:[\\/]* )  # Absolute path.
+    ac_srcdir=$srcdir$ac_dir_suffix;
+    ac_top_srcdir=$srcdir ;;
+  *) # Relative path.
+    ac_srcdir=$ac_top_builddir$srcdir$ac_dir_suffix
+    ac_top_srcdir=$ac_top_builddir$srcdir ;;
+esac
+# Don't blindly perform a `cd "$ac_dir"/$ac_foo && pwd` since $ac_foo can be
+# absolute.
+ac_abs_builddir=`cd "$ac_dir" && cd $ac_builddir && pwd`
+ac_abs_top_builddir=`cd "$ac_dir" && cd ${ac_top_builddir}. && pwd`
+ac_abs_srcdir=`cd "$ac_dir" && cd $ac_srcdir && pwd`
+ac_abs_top_srcdir=`cd "$ac_dir" && cd $ac_top_srcdir && pwd`
+
+
+  { echo "$as_me:$LINENO: executing $ac_dest commands" >&5
+echo "$as_me: executing $ac_dest commands" >&6;}
+  case $ac_dest in
+    default-1 )
+  echo "creating hdf/src/h4config.h"
+  sed 's/#define /#define H4_/' < hdf/src/h4config.h |\
+    sed 's/#undef /#undef H4_/' > h4config
+  if test ! -f hdf/src/h4config.h; then
+    /bin/mv -f h4config hdf/src/h4config.h
+  elif (diff h4config hdf/src/h4config.h >/dev/null); then
+    /bin/rm -f h4config
+    echo "hdf/src/h4config.h is unchanged"
+  else
+    /bin/mv -f h4config hdf/src/h4config.h
+  fi
+ ;;
+    depfiles ) 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.
+  # So let's grep whole file.
+  if grep '^#.*generated by automake' $mf > /dev/null 2>&1; then
+    dirpart=`(dirname "$mf") 2>/dev/null ||
+$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
+  grep '^DEP_FILES *= *[^ #]' < "$mf" > /dev/null || continue
+  # Extract the definition of DEP_FILES from the Makefile without
+  # running `make'.
+  DEPDIR=`sed -n -e '/^DEPDIR = / s///p' < "$mf"`
+  test -z "$DEPDIR" && continue
+  # When using ansi2knr, U may be empty or an underscore; expand it
+  U=`sed -n -e '/^U = / s///p' < "$mf"`
+  test -d "$dirpart/$DEPDIR" || mkdir "$dirpart/$DEPDIR"
+  # 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 -e '
+    /^DEP_FILES = .*\\\\$/ {
+      s/^DEP_FILES = //
+      :loop
+	s/\\\\$//
+	p
+	n
+	/\\\\$/ b loop
+      p
+    }
+    /^DEP_FILES = / s/^DEP_FILES = //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=`(dirname "$file") 2>/dev/null ||
+$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'`
+    { if $as_mkdir_p; then
+    mkdir -p $dirpart/$fdir
+  else
+    as_dir=$dirpart/$fdir
+    as_dirs=
+    while test ! -d "$as_dir"; do
+      as_dirs="$as_dir $as_dirs"
+      as_dir=`(dirname "$as_dir") 2>/dev/null ||
+$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'`
+    done
+    test ! -n "$as_dirs" || mkdir $as_dirs
+  fi || { { echo "$as_me:$LINENO: error: cannot create directory $dirpart/$fdir" >&5
+echo "$as_me: error: cannot create directory $dirpart/$fdir" >&2;}
+   { (exit 1); exit 1; }; }; }
+
+    # echo "creating $dirpart/$file"
+    echo '# dummy' > "$dirpart/$file"
+  done
+done
+ ;;
+  esac
+done
+_ACEOF
+
+cat >>$CONFIG_STATUS <<\_ACEOF
+
+{ (exit 0); exit 0; }
+_ACEOF
+chmod +x $CONFIG_STATUS
+ac_clean_files=$ac_clean_files_save
+
+
+# configure is writing to config.log, and then calls config.status.
+# config.status does its own redirection, appending to config.log.
+# Unfortunately, on DOS this fails, as config.log is still kept open
+# by configure, so config.status won't be able to write to it; its
+# output is simply discarded.  So we exec the FD to /dev/null,
+# effectively closing config.log, so it can be properly (re)opened and
+# appended to by config.status.  When coming back to configure, we
+# need to make the FD available again.
+if test "$no_create" != yes; then
+  ac_cs_success=:
+  ac_config_status_args=
+  test "$silent" = yes &&
+    ac_config_status_args="$ac_config_status_args --quiet"
+  exec 5>/dev/null
+  $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
+  exec 5>>config.log
+  # Use ||, not &&, to avoid exiting from the if with $? = 1, which
+  # would make configure fail if this is the last instruction.
+  $ac_cs_success || { (exit 1); exit 1; }
+fi
+
+
+chmod 755 hdf/util/h4cc hdf/util/h4redeploy
+
+if test "X$BUILD_FORTRAN" = "Xyes"; then
+  chmod 755 hdf/util/h4fc
+fi

Added: packages/libhdf4/branches/upstream/current/configure.ac
===================================================================
--- packages/libhdf4/branches/upstream/current/configure.ac	                        (rev 0)
+++ packages/libhdf4/branches/upstream/current/configure.ac	2007-05-15 09:53:05 UTC (rev 831)
@@ -0,0 +1,638 @@
+dnl Process this file with autoconf to produce configure.
+dnl
+dnl Copyright by the Board of Trustees of the University of Illinois.
+dnl All rights reserved.
+dnl
+AC_REVISION($Id: configure.ac,v 1.8 2005/02/08 18:29:27 acheng Exp $)
+
+dnl ======================================================================
+dnl Initialize configure.
+dnl ======================================================================
+dnl AC_INIT takes the name of the package, the version number, and an
+dnl email address to report bugs. AC_CONFIG_SRCDIR takes a unique file
+dnl as its argument.
+dnl
+dnl NOTE: Don't forget to change the version number here when we do a
+dnl release!!!
+dnl
+AC_INIT([HDF], [4.2r1], [hdfhelp at ncsa.uiuc.edu])
+AC_CONFIG_SRCDIR([hdf/src/atom.c])
+AC_CONFIG_AUX_DIR([bin])
+AC_CONFIG_HEADER([hdf/src/h4config.h])
+
+AM_INIT_AUTOMAKE([HDF], [4.2r1])
+AM_MAINTAINER_MODE
+
+AC_PREFIX_DEFAULT([`pwd`/NewHDF])
+
+AC_OUTPUT_COMMANDS([
+  echo "creating hdf/src/h4config.h"
+  sed 's/#define /#define H4_/' < hdf/src/h4config.h |\
+    sed 's/#undef /#undef H4_/' > h4config
+  if test ! -f hdf/src/h4config.h; then
+    /bin/mv -f h4config hdf/src/h4config.h
+  elif (diff h4config hdf/src/h4config.h >/dev/null); then
+    /bin/rm -f h4config
+    echo "hdf/src/h4config.h is unchanged"
+  else
+    /bin/mv -f h4config hdf/src/h4config.h
+  fi
+])
+
+dnl ======================================================================
+dnl Information on the package
+dnl ======================================================================
+
+dnl Dump all shell variables values.
+AC_MSG_CHECKING([shell variables initial values])
+set >&AS_MESSAGE_LOG_FD
+AC_MSG_RESULT([done])
+
+AC_CANONICAL_HOST
+
+dnl Some platforms have broken tr, basename, and/or xargs programs. Check
+dnl that it actually does what it's supposed to do. Catch this early
+dnl since configure relies upon tr heavily and there's no use continuing
+dnl if it's broken.
+dnl
+AC_MSG_CHECKING([if tr works])
+TR_TEST="`echo Test | tr 'a-z,' 'A-Z '`"
+if test $TR_TEST != "TEST"; then
+  AC_MSG_ERROR([tr program doesn't work])
+else
+  AC_MSG_RESULT([yes])
+fi
+
+AC_MSG_CHECKING([if basename works])
+BASENAME_TEST="`basename /foo/bar/baz/qux/basename_works`"
+if test $BASENAME_TEST != "basename_works"; then
+  AC_MSG_ERROR([basename program doesn't work])
+else
+  AC_MSG_RESULT([yes])
+fi
+
+AC_MSG_CHECKING([if xargs works])
+XARGS_TEST="`echo /foo/bar/baz/qux/xargs_works | xargs basename`"
+if test $XARGS_TEST != "xargs_works"; then
+  AC_MSG_ERROR([xargs program doesn't work])
+else
+  AC_MSG_RESULT([yes])
+fi
+
+dnl Source any special files that we need. These files normally aren't
+dnl present but can be used by the maintainers to fine tune things like
+dnl turning on debug or profiling flags for the compiler. The search order
+dnl is:
+dnl
+dnl         CPU-VENDOR-OS
+dnl         VENDOR-OS
+dnl         CPU-OS
+dnl         CPU-VENDOR
+dnl         OS
+dnl         VENDOR
+dnl         CPU
+dnl
+dnl If the `OS' ends with a version number then remove it. For instance,
+dnl `freebsd3.1' would become `freebsd'
+dnl
+case "$host_os" in
+  aix4.*)       host_os_novers="aix4.x"     ;;
+  aix5.*)       host_os_novers="aix5.x"     ;;
+  freebsd*)     host_os_novers="freebsd"    ;;
+  irix5.*)      host_os_novers="irix5.x"    ;;
+  irix6.*)      host_os_novers="irix6.x"    ;;
+  osf4.*)       host_os_novers="osf4.x"     ;;
+  osf5.*)       host_os_novers="osf5.x"     ;;
+  solaris2.*)   host_os_novers="solaris2.x" ;;
+  *)            host_os_novers="$host_os"   ;;
+esac
+
+host_config="none"
+for f in $host_cpu-$host_vendor-$host_os        \
+         $host_cpu-$host_vendor-$host_os_novers \
+         $host_vendor-$host_os                  \
+         $host_vendor-$host_os_novers           \
+         $host_cpu-$host_os                     \
+         $host_cpu-$host_os_novers              \
+         $host_cpu-$host_vendor                 \
+         $host_os                               \
+         $host_os_novers                        \
+         $host_vendor                           \
+         $host_cpu ; do
+  AC_MSG_CHECKING([for config $f])
+  if test -f "$srcdir/config/$f"; then
+    host_config=$srcdir/config/$f
+    AC_MSG_RESULT([found])
+    break
+  fi
+  AC_MSG_RESULT([no])
+done
+if test "X$host_config" != "Xnone"; then
+  CC_BASENAME="`echo $CC | cut -f1 -d' ' | xargs basename 2>/dev/null`"
+  F77_BASENAME="`echo $F77 | cut -f1 -d' ' | xargs basename 2>/dev/null`"
+  CXX_BASENAME="`echo $CXX | cut -f1 -d' ' | xargs basename 2>/dev/null`"
+  . $host_config
+fi
+
+dnl ======================================================================
+dnl Checks for programs
+dnl ======================================================================
+
+AC_PROG_MAKE_SET
+
+AC_PROG_CC
+AC_PROG_CPP
+AC_PROG_CXX
+
+AC_ARG_ENABLE([fortran],
+              [AC_HELP_STRING([--enable-fortran],
+                              [Build Fortran into library [default=yes]])],,
+              enableval="yes")
+
+case "$enableval" in
+  yes)
+    BUILD_FORTRAN="yes"
+    AC_PROG_F77
+
+    if test "X$F77" = "X"; then
+      BUILD_FORTRAN="no"
+    fi
+    ;;
+  no)
+    BUILD_FORTRAN="no"
+    ;;
+esac
+
+AM_CONDITIONAL([HDF_BUILD_FORTRAN], [test "X$BUILD_FORTRAN" = "Xyes"])
+
+AC_PROG_INSTALL
+AM_PROG_LEX
+AC_PROG_LN_S
+AC_PROG_RANLIB
+AC_PROG_YACC
+
+AC_CHECK_PROGS([AR], [ar xar], [:], [$PATH])
+
+AC_CHECK_PROG([DIFF],     [diff],     [diff -w])
+AC_CHECK_PROG([MAKEINFO], [makeinfo], [makeinfo])
+AC_CHECK_PROG([NEQN],     [neqn],     [neqn])
+AC_CHECK_PROG([TBL],      [tbl],      [tbl])
+
+AC_SUBST([AR])
+AC_SUBST([DIFF])
+
+dnl ======================================================================
+dnl Checks for libraries
+dnl ======================================================================
+
+dnl ----------------------------------------------------------------------
+dnl Fake --with-xxx option to allow us to create a help message for the
+dnl following --with-xxx options which can take either a =DIR or =INC,LIB
+dnl specifier.
+dnl
+AC_ARG_WITH([fnord],
+  [
+ For the following --with-xxx options, you can specify where the header
+ files and libraries are in two different ways:
+
+    --with-xxx=INC,LIB - Specify individually the include directory and
+                         library directory separated by a comma
+    --with-xxx=DIR     - Specify only the directory which contains the
+                         include/ and lib/ subdirectories
+  ])
+
+dnl ----------------------------------------------------------------------
+dnl Is the GNU zlib present? It has a header file `zlib.h' and a library
+dnl `-lz' and their locations might be specified with the `--with-zlib'
+dnl command-line switch. The value is an include path and/or a library path.
+dnl If the library path is specified then it must be preceded by a comma.
+AC_ARG_WITH([zlib],
+            [AC_HELP_STRING([--with-zlib=DIR],
+                            [Use zlib library [default=yes]])],,
+            [withval=yes])
+
+case "$withval" in
+  yes)
+    HAVE_ZLIB="yes"
+    AC_CHECK_HEADERS([zlib.h],, [unset HAVE_ZLIB])
+    AC_CHECK_LIB([z], [compress2],, [unset HAVE_ZLIB])
+
+    if test -z "$HAVE_ZLIB"; then
+      AC_MSG_ERROR([couldn't find zlib library])
+    fi
+    ;;
+  no)
+    AC_MSG_ERROR([zlib library required to build HDF4])
+    ;;
+  *)
+    HAVE_ZLIB="yes"
+    case "$withval" in
+      *,*)
+        zlib_inc="`echo $withval | cut -f1 -d,`"
+        zlib_lib="`echo $withval | cut -f2 -d, -s`"
+        ;;
+      *)
+        if test -n "$withval"; then
+          zlib_inc="$withval/include"
+          zlib_lib="$withval/lib"
+        fi
+        ;;
+    esac
+
+    dnl Trying to include -I/usr/include and -L/usr/lib is redundant and
+    dnl can mess some compilers up.
+    if test "X$zlib_inc" = "X/usr/include"; then
+      zlib_inc=""
+    fi
+    if test "X$zlib_lib" = "X/usr/lib"; then
+      zlib_lib=""
+    fi
+
+    if test -n "$zlib_inc"; then
+      CPPFLAGS="$CPPFLAGS -I$zlib_inc"
+    fi
+
+    AC_CHECK_HEADERS([zlib.h],, [unset HAVE_ZLIB])
+
+    if test -n "$zlib_lib"; then
+      LDFLAGS="$LDFLAGS -L$zlib_lib"
+    fi
+
+    AC_CHECK_LIB([z], [compress2],, [unset HAVE_ZLIB])
+
+    if test -z "$HAVE_ZLIB"; then
+      AC_MSG_ERROR([couldn't find zlib library])
+    fi
+    ;;
+esac
+
+dnl ----------------------------------------------------------------------
+dnl Is the JPEG library present?
+AC_ARG_WITH([jpeg],
+            [AC_HELP_STRING([--with-jpeg=DIR],
+                            [Use jpeg library [default=yes]])],,
+            [withval=yes])
+
+case "$withval" in
+  yes)
+    HAVE_JPEG="yes"
+    AC_CHECK_HEADERS([jpeglib.h],, [unset HAVE_JPEG])
+    AC_CHECK_LIB([jpeg], [jpeg_start_decompress],, [unset HAVE_JPEG])
+
+    if test -z "$HAVE_JPEG"; then
+      AC_MSG_ERROR([couldn't find jpeg library])
+    fi
+    ;;
+  no)
+    AC_MSG_ERROR([jpeg library required to build HDF4])
+    ;;
+  *)
+    HAVE_JPEG="yes"
+    case "$withval" in
+      *,*)
+        jpeg_inc="`echo $withval | cut -f1 -d,`"
+        jpeg_lib="`echo $withval | cut -f2 -d, -s`"
+        ;;
+      *)
+        if test -n "$withval"; then
+          jpeg_inc="$withval/include"
+          jpeg_lib="$withval/lib"
+        fi
+        ;;
+    esac
+
+    dnl Trying to include -I/usr/include and -L/usr/lib is redundant and
+    dnl can mess some compilers up.
+    if test "X$jpeg_inc" = "X/usr/include"; then
+      jpeg_inc=""
+    fi
+    if test "X$jpeg_lib" = "X/usr/lib"; then
+      jpeg_lib=""
+    fi
+
+    if test -n "$jpeg_inc"; then
+      CPPFLAGS="$CPPFLAGS -I$jpeg_inc"
+    fi
+
+    AC_CHECK_HEADERS([jpeglib.h],, [unset HAVE_JPEG])
+
+    if test -n "$jpeg_lib"; then
+      LDFLAGS="$LDFLAGS -L$jpeg_lib"
+    fi
+
+    AC_CHECK_LIB([jpeg], [jpeg_start_decompress],, [unset HAVE_JPEG])
+
+    if test -z "$HAVE_JPEG"; then
+      AC_MSG_ERROR([couldn't find jpeg library])
+    fi
+    ;;
+esac
+
+dnl ----------------------------------------------------------------------
+dnl Is the SZip library present?
+AC_ARG_WITH([szlib],
+            [AC_HELP_STRING([--with-szlib=DIR],
+                            [Use szlib library [default=no]])],,
+            [withval=no])
+
+case "$withval" in
+  yes)
+    HAVE_SZIP="yes"
+    AC_CHECK_HEADERS([szlib.h],, [unset HAVE_SZIP])
+    AC_CHECK_LIB([sz], [SZ_BufftoBuffCompress],, [unset HAVE_SZIP])
+
+    if test -z "$HAVE_SZIP"; then
+      AC_MSG_ERROR([couldn't find szlib library])
+    fi
+    ;;
+  no)
+    AC_MSG_CHECKING([for szlib])
+    AC_MSG_RESULT([suppressed])
+    ;;
+  *)
+    HAVE_SZIP="yes"
+    case "$withval" in
+      *,*)
+        szip_inc="`echo $withval | cut -f1 -d,`"
+        szip_lib="`echo $withval | cut -f2 -d, -s`"
+        ;;
+      *)
+        if test -n "$withval"; then
+          szip_inc="$withval/include"
+          szip_lib="$withval/lib"
+        fi
+        ;;
+    esac
+
+    dnl Trying to include -I/usr/include and -L/usr/lib is redundant and
+    dnl can mess some compilers up.
+    if test "X$szip_inc" = "X/usr/include"; then
+      szip_inc=""
+    fi
+    if test "X$szip_lib" = "X/usr/lib"; then
+      szip_lib=""
+    fi
+
+    if test -n "$szip_inc"; then
+      CPPFLAGS="$CPPFLAGS -I$szip_inc"
+    fi
+
+    AC_CHECK_HEADERS([szlib.h],, [unset HAVE_SZIP])
+
+    if test -n "$szip_lib"; then
+      LDFLAGS="$LDFLAGS -L$szip_lib"
+    fi
+
+    AC_CHECK_LIB([sz], [SZ_BufftoBuffCompress],, [unset HAVE_SZIP])
+
+    if test -z "$HAVE_SZIP"; then
+      AC_MSG_ERROR([couldn't find szlib library])
+    fi
+    ;;
+esac
+
+dnl ----------------------------------------------------------------------
+dnl Is XDR support present? The TRY_LINK info was gotten from the
+dnl mfhdf/libsrc/local_nc.c file.
+AC_MSG_CHECKING([for xdr library support])
+AC_TRY_LINK([
+#ifdef VMS
+#define STDC_INCLUDES
+#endif
+#ifdef __ultrix
+#define GCC_FIX
+#endif 
+#include <rpc/types.h>
+#ifdef __ultrix
+#undef GCC_FIX
+#endif
+#include <rpc/xdr.h>], [xdr_int],
+            [AC_MSG_RESULT([yes]); build_xdr="no"],
+            [AC_MSG_RESULT([no]); build_xdr="yes"])
+AM_CONDITIONAL([HDF_BUILD_XDR], [test "X$build_xdr" = "Xyes"])
+
+dnl For Solaris and Fuji systems, add the -nsl for XDR support
+case "$host" in
+  *-solaris*|*-hp-hpux*|S370-fujitsu-sysv*)
+    LIBS="$LIBS -lnsl"  ;;
+  *) ;;
+esac
+
+dnl ======================================================================
+dnl Checks for header files
+dnl ======================================================================
+
+dnl Always put the /usr/include/rpc directory first in the search list.
+CPPFLAGS="-I/usr/include/rpc $CPPFLAGS"
+
+AC_HEADER_STDC
+
+dnl ======================================================================
+dnl Checks for types
+dnl ======================================================================
+
+dnl ======================================================================
+dnl Checks for structures
+dnl ======================================================================
+
+dnl ======================================================================
+dnl Checks for compiler characteristics
+dnl ======================================================================
+
+AC_PROG_CC_C_O
+AC_PROG_CXXCPP
+
+if test "X$BUILD_FORTRAN" = "Xyes"; then
+  AC_PROG_F77_C_O
+fi
+
+dnl This is a bit of a hack. The AC_CHECK_SIZEOF macro is supposed to
+dnl #define a value in a header file. However, we don't use a generated
+dnl header file. So I check the value left over from autoconf's test  is
+dnl >= 8.
+AC_CHECK_SIZEOF([int*])
+
+if test $ac_cv_sizeof_intp -ge 8; then
+  CPPFLAGS="$CPPFLAGS -DBIG_LONGS"
+
+  dnl Define super secret special flag for AIX machines in 64-bit mode.
+  case "${host}" in
+    *-ibm-aix*) CPPFLAGS="$CPPFLAGS -DAIX5L64" ;;
+    *)          ;;
+  esac
+fi
+
+AC_C_BIGENDIAN([], [CPPFLAGS="$CPPFLAGS -DSWAP"])
+
+dnl Are we building this in debug or production mode? (Remove the -g flag
+dnl in production mode.)
+AC_MSG_CHECKING(for build mode)
+AC_ARG_ENABLE(production,
+              [AC_HELP_STRING([--enable-production],
+                              [Determines how to run the compiler.])])
+
+case "X-$enable_production" in
+  X-|X-yes)
+    AC_MSG_RESULT([production])
+
+    dnl Remove the "-g" flag from compile line if it's in there.
+    CFLAGS_temp=""
+    if test -n "$CFLAGS"; then
+      for d in $CFLAGS ; do
+        if test "X$d" != "X-g"; then
+          CFLAGS_temp="$CFLAGS_temp $d"
+        fi
+      done
+      CFLAGS=$CFLAGS_temp
+    fi
+
+    FFLAGS_temp=""
+    if test -n "$FFLAGS"; then
+      for d in $FFLAGS ; do
+        if test "X$d" != "X-g"; then
+          FFLAGS_temp="$FFLAGS_temp $d"
+        fi
+      done
+      FFLAGS=$FFLAGS_temp
+    fi
+
+    CXXFLAGS_temp=""
+    if test -n "$CXXFLAGS"; then
+      for d in $CXXFLAGS ; do
+        if test "X$d" != "X-g"; then
+          CXXFLAGS_temp="$CXXFLAGS_temp $d"
+        fi
+      done
+      CXXFLAGS=$CXXFLAGS_temp
+    fi
+
+    CFLAGS="$CFLAGS $PROD_CFLAGS"
+    CXXFLAGS="$CXXFLAGS $PROD_CXXFLAGS"
+    FFLAGS="$FFLAGS $PROD_FFLAGS"
+    CPPFLAGS="$CPPFLAGS $PROD_CPPFLAGS"
+    ;;
+  X-no)
+    AC_MSG_RESULT([development])
+    CFLAGS="$CFLAGS $DEBUG_CFLAGS"
+    FFLAGS="$FFLAGS $DEBUG_FFLAGS"
+    CXXFLAGS="$CXXFLAGS $DEBUG_CXXFLAGS"
+    CPPFLAGS="$CPPFLAGS $DEBUG_CPPFLAGS"
+    ;;
+  *)
+    AC_MSG_RESULT([user-defined])
+    ;;
+esac
+
+dnl ======================================================================
+dnl Checks for library functions
+dnl ======================================================================
+
+AC_MSG_CHECKING([for math library support])
+AC_TRY_LINK([#include <math.h>], [sqrt(37.927)],
+            [AC_MSG_RESULT([yes])],
+            [AC_MSG_RESULT([no]); LIBS="$LIBS -lm"])
+
+dnl ======================================================================
+dnl Checks for system services
+dnl ======================================================================
+
+dnl Copy NetCDF header files.
+dnl
+dnl FIXME: This is code stolen^Wborrowed from the old HDF4 configure.
+dnl These header files should probably be generated by autoconf instead
+dnl of being copied depending upon the host.
+case "$host" in
+  alpha-*-*)            BAR="alpha"       ;;
+  alphaev*-*-*)         BAR="alpha"       ;;
+  mips*-dec-ultrix*)    BAR="dec"         ;;
+  mips*-sgi-irix6.*)    BAR="irix6"       ;;
+  mips*-sgi-irix6_32*)  BAR="irix32"      ;;
+  mips*-sgi-irix5*)     BAR="irix5"       ;;
+  mips*-sgi-irix4*)     BAR="irix4"       ;;
+  *-linux*)             BAR="linux"       ;;
+  *-freebsd*)           BAR="fbsd"        ;;
+  ia64-*-*)             BAR="ia64"        ;;
+  *-ibm-aix*)           BAR="aix"         ;;
+  i386-*-solaris2*)     BAR="solarisx86"  ;;
+  sparc64-*-solaris2*)  BAR="solaris64"   ;;
+  *-*-solaris2*)        BAR="solaris"     ;;
+  *-sun-*)              BAR="sun"         ;;
+  *-hp-hpux*)           BAR="hpux"        ;;
+  *-convex-bsd*)        BAR="convex"      ;;
+  *-cray-unicos*)       BAR="unicos"      ;;
+  t3*-cray-craympp)     BAR="t3e"         ;;
+  S370-fujitsu-sysv*)   BAR="fujivp"      ;;
+  *-mac-*)              BAR="mac"         ;;
+  *-apple*)             BAR="apple"       ;;
+  *)                    echo "*** unknown host $host!"; exit 1 ;;
+esac
+
+src_files="mfhdf/libsrc/config/netcdf-FOO.h:mfhdf/libsrc/netcdf.h
+           mfhdf/fortran/config/jackets-FOO.c:mfhdf/fortran/jackets.c
+           mfhdf/fortran/config/netcdf-FOO.inc:mfhdf/fortran/netcdf.inc
+           mfhdf/fortran/config/ftest-FOO.f:mfhdf/fortran/ftest.f"
+src_files="`echo $src_files | sed -e s/FOO/${BAR}/g`"
+
+for config_file in $src_files; do
+  src_file="${srcdir}/`echo $config_file | sed -e s/:.*$//`"
+  target_file="`echo $config_file | sed -e s/^[[^:]]*://g`"
+
+  if test ! -r ${src_file}; then
+    echo '***' "${progname}: cannot copy file \"${target_file}\"," 1>&2                  
+    echo '***' "since the file \"${src_file}\" does not exist." 1>&2
+    exit 1
+  fi
+
+  ## this sed command emulates the dirname command
+  dstdir=`echo "$target_file" | sed -e 's,[[^/]]*$,,;s,/$,,;s,^$,.,'`
+
+  ## Create directory for the target_file if it's not there.
+  if test ! -d $dstdir; then
+    ${srcdir}/bin/mkinstalldirs $dstdir
+  fi
+
+  echo "Copying \"${src_file}\" to \"${target_file}\" ."
+  cp ${src_file} ${target_file}
+
+  if test ! -r ${target_file}; then
+    echo '***' "${progname}: cannot copy file \"${target_file}\"," 1>&2                  
+    exit 1
+  fi
+done
+
+AC_CONFIG_FILES([Makefile
+                 hdf/Makefile
+                 hdf/src/Makefile
+                 hdf/test/Makefile
+                 hdf/util/Makefile
+                 hdf/util/h4cc
+                 hdf/util/h4fc
+                 hdf/util/h4redeploy
+                 hdf/util/testutil.sh
+                 man/Makefile
+                 mfhdf/Makefile
+                 mfhdf/dumper/Makefile
+                 mfhdf/dumper/testhdp.sh
+                 mfhdf/fortran/Makefile
+                 mfhdf/hdfimport/Makefile
+                 mfhdf/hdfimport/testutil.sh
+                 mfhdf/hdiff/Makefile
+                 mfhdf/hrepack/Makefile
+                 mfhdf/libsrc/Makefile
+                 mfhdf/ncdump/Makefile
+                 mfhdf/ncgen/Makefile
+                 mfhdf/nctest/Makefile
+			 mfhdf/port/Makefile])
+
+dnl If we're building the XDR library, then generate its Makefile.
+if test "X$build_xdr" = "Xyes"; then
+  AC_CONFIG_FILES([mfhdf/xdr/Makefile])
+fi
+
+AC_OUTPUT
+
+chmod 755 hdf/util/h4cc hdf/util/h4redeploy
+
+if test "X$BUILD_FORTRAN" = "Xyes"; then
+  chmod 755 hdf/util/h4fc
+fi

Deleted: packages/libhdf4/branches/upstream/current/configure.in
===================================================================
--- packages/libhdf4/branches/upstream/current/configure.in	2007-05-15 09:05:29 UTC (rev 830)
+++ packages/libhdf4/branches/upstream/current/configure.in	2007-05-15 09:53:05 UTC (rev 831)
@@ -1,201 +0,0 @@
-##############################################################################
-## This file was taken from the Cygnus Toolkit distribution and used as
-## as a template.
-
-## This file is a Bourne shell script fragment that supplies the information
-## necessary to tailor a template configure script into the configure
-## script appropriate for this directory.  For more information, check
-## any existing configure script.  
-
-## Be warned, there are two types of configure.in files.  There are those
-## used by Autoconf, which are macros which are expanded into a configure
-## script by autoconf.  The other sort, of which this is one, is executed
-## by Cygnus configure.  
-
-## For more information on these two systems, check out the documentation
-## for 'Autoconf' (autoconf.texi) and 'Configure' (configure.texi) or
-## the official documentation on these packages.  
-
-##############################################################################
-
-# Right now the JPEG has still needs a seperate makefile fragmenet
-# So we run configure here i.e we use configure.in and config/ 
-# directory found in the hdf/jpeg to build the configuration.
-host_libs="hdf/jpeg"
-
-# The followin features Not yet implemented
-#echo "without options are $withoutoptions"
-# without options for packages e.g 'jpeg'
-for wooption in $withoutoptions ; do
-if [ "$wooption" = "--without-jpeg" ] ; then 
-   host_libs=""
-fi
-done
-
-# Add file cache directory as a directory to run configure in also
-# since this is a self contained package that was setup 
-# using Cygnus configuration software.
-host_libs="$host_libs hdf/fmpool"
-
-# Not yet implemented
-#echo "enabled options are $enableoptions"
-# enabled options 'fmpool', 'pablo'
-#for eoption in $enableoptions ; do
-#if [ "$eoption" = "--enable-pablo" ] ; then 
-#   host_libs="$host_libs hdf/pablo"
-#fi
-#if [ "$eoption" = "--enable-fmpool" ] ; then 
-#   host_libs="$host_libs hdf/fmpool"
-#fi
-#done
-#echo "host libs are $host_libs"
-
-## We assign ${configdirs} this way to remove all embedded newlines.  This
-## is important because configure will choke if they ever get through.
-#
-configdirs=`echo ${host_libs}`
-
-#
-#Directories we want configure to generate Makefiles from Makefile.in
-#
-subdirs="hdf man hdf/src hdf/zlib hdf/test hdf/util hdf/pablo mfhdf mfhdf/xdr mfhdf/port mfhdf/libsrc mfhdf/dumper mfhdf/nctest mfhdf/ncgen mfhdf/ncdump mfhdf/fortran mfhdf/doc mfhdf/pablo"
-
-################################################################################
-
-srctrigger=move-if-change
-srcname="HDF/netCDF library"
-
-# This gets set non-empty for some net releases of packages.
-appdirs=""
-
-# per-host:
-
-# Work in distributions for each host makefile fragment
-host_makefile_frag=""
-if [ -d ${srcdir}/config ]; then
-case "${host}" in
-  alpha-*-*)         	  host_makefile_frag=config/mh-alpha ;;
-  mips*-dec-ultrix*)      host_makefile_frag=config/mh-decstation ;;
-  mips*-sgi-irix6.*)      host_makefile_frag=config/mh-irix6 ;;
-  mips*-sgi-irix6_32*)    host_makefile_frag=config/mh-irix32 ;;
-  mips*-sgi-irix5*)       host_makefile_frag=config/mh-irix5 ;;
-  mips*-sgi-irix4*)       host_makefile_frag=config/mh-irix4 ;;
-  i[3456]86-*-linux*)     host_makefile_frag=config/mh-linux ;;
-  i[3456]86-*-freebsd*)   host_makefile_frag=config/mh-fbsd ;;
-  ia64-*-*)               host_makefile_frag=config/mh-ia64 ;;
-  *-ibm-aix*)             host_makefile_frag=config/mh-aix ;;
-  i386-*-solaris2*)       host_makefile_frag=config/mh-solarisx86 ;;
-  *-*-solaris2*)          host_makefile_frag=config/mh-solaris ;;
-  *-sun-*)                host_makefile_frag=config/mh-sun ;;
-  *-hp-hpux11*)           host_makefile_frag=config/mh-hpux11 ;;
-  *-hp-hpux*)             host_makefile_frag=config/mh-hpux ;;
-  *-convex-bsd*)          host_makefile_frag=config/mh-convex ;;
-  *-cray-unicos*)         host_makefile_frag=config/mh-unicos ;;
-  t3*-cray-craympp)       host_makefile_frag=config/mh-t3e ;;
-  S370-fujitsu-sysv*)     host_makefile_frag=config/mh-fujivp ;;
-  *-mac-*)                host_makefile_frag=config/mh-mac ;;
-esac
-fi
-
-# Check for valid platfroms before we continue
-if [ "${host_makefile_frag}" = "" ] ; then
-    echo '***' "The HDF/netCDF library is not supported on host ${host}" 1>&2
-    exit 1
-fi
-
-# make sure makefile fragment is there
-if [ ! -f ${srcdir}/${host_makefile_frag} ]; then
-    echo '***' "We are missing makefile fragment ${host_makefile_frag}" 1>&2
-    echo '***' "Please read the installation docs" 1>&2
-    exit 1
-fi
-
-
-# The Solaris /usr/ucb/cc compiler does not appear to work.
-case "${host}" in
-  sparc-sun-solaris2*)
-      if [ "`/usr/bin/which ${CC-cc}`" = "/usr/ucb/cc" ] ; then
-          could_use=
-          [ -d /opt/SUNWspro/bin ] && could_use="/opt/SUNWspro/bin"
-          if [ -d /opt/cygnus/bin ] ; then
-              if [ "$could_use" == "" ] ; then
-                  could_use="/opt/cygnus/bin"
-              else
-                  could_use="$could_use or /opt/cygnus/bin"
-              fi
-          fi
-        if [ "$could_use" = "" ] ; then
-            echo "Warning: compilation may fail because you're using"
-            echo "/usr/ucb/cc.  You should change your PATH or CC "
-            echo "variable and rerun configure."
-        else
-            echo "Warning: compilation may fail because you're using"
-            echo "/usr/ucb/cc, when you should use the C compiler from"
-            echo "$could_use.  You should change your"
-            echo "PATH or CC variable and rerun configure."
-        fi
-      fi
-  ;;
-esac
-
-# per-target:
-
-# 
-# Set proper files that need to linked to the correct pre-generated
-# configuration files. These are mainly on the MFHDF side as 
-# the HDF side stuff is taken care of in the configure.in found
-# in two directories hdf/fmpool and hdf/jpeg respectively.
-files=
-links="mfhdf/libsrc/netcdf.h mfhdf/fortran/jackets.c mfhdf/fortran/netcdf.inc mfhdf/fortran/ftest.f"
-if [ -d ${srcdir}/config ]; then
-case "${host}" in
-  alpha-*-*)              files="mfhdf/libsrc/config/netcdf-alpha.h mfhdf/fortran/config/jackets-alpha.c mfhdf/fortran/config/netcdf-alpha.inc mfhdf/fortran/config/ftest-alpha.f" ;;
-  mips*-dec-ultrix*)      files="mfhdf/libsrc/config/netcdf-dec.h mfhdf/fortran/config/jackets-dec.c mfhdf/fortran/config/netcdf-dec.inc mfhdf/fortran/config/ftest-dec.f" ;;
-  mips*-sgi-irix6.*)      files="mfhdf/libsrc/config/netcdf-irix6.h mfhdf/fortran/config/jackets-irix6.c mfhdf/fortran/config/netcdf-irix6.inc mfhdf/fortran/config/ftest-irix6.f" ;;
-  mips*-sgi-irix6_32*)    files="mfhdf/libsrc/config/netcdf-irix32.h mfhdf/fortran/config/jackets-irix32.c mfhdf/fortran/config/netcdf-irix32.inc mfhdf/fortran/config/ftest-irix32.f" ;;
-  mips*-sgi-irix5*)       files="mfhdf/libsrc/config/netcdf-irix5.h mfhdf/fortran/config/jackets-irix5.c mfhdf/fortran/config/netcdf-irix5.inc mfhdf/fortran/config/ftest-irix5.f" ;;
-  mips*-sgi-irix4*)       files="mfhdf/libsrc/config/netcdf-irix4.h mfhdf/fortran/config/jackets-irix4.c mfhdf/fortran/config/netcdf-irix4.inc mfhdf/fortran/config/ftest-irix4.f" ;;
-  i[3456]86-*-linux*)     files="mfhdf/libsrc/config/netcdf-linux.h mfhdf/fortran/config/jackets-linux.c mfhdf/fortran/config/netcdf-linux.inc mfhdf/fortran/config/ftest-linux.f" ;;
-  i[3456]86-*-freebsd*)   files="mfhdf/libsrc/config/netcdf-fbsd.h mfhdf/fortran/config/jackets-fbsd.c mfhdf/fortran/config/netcdf-fbsd.inc mfhdf/fortran/config/ftest-fbsd.f" ;;
-  ia64-*-*)               files="mfhdf/libsrc/config/netcdf-ia64.h mfhdf/fortran/config/jackets-ia64.c mfhdf/fortran/config/netcdf-ia64.inc mfhdf/fortran/config/ftest-ia64.f" ;;
-  *-ibm-aix*)             files="mfhdf/libsrc/config/netcdf-aix.h mfhdf/fortran/config/jackets-aix.c mfhdf/fortran/config/netcdf-aix.inc mfhdf/fortran/config/ftest-aix.f" ;;
-  i386-*-solaris2*)       files="mfhdf/libsrc/config/netcdf-solarisx86.h mfhdf/fortran/config/jackets-solarisx86.c mfhdf/fortran/config/netcdf-solarisx86.inc mfhdf/fortran/config/ftest-solarisx86.f" ;;
-  *-*-solaris2*)          files="mfhdf/libsrc/config/netcdf-solaris.h mfhdf/fortran/config/jackets-solaris.c mfhdf/fortran/config/netcdf-solaris.inc mfhdf/fortran/config/ftest-solaris.f";;
-  *-sun-*)		          files="mfhdf/libsrc/config/netcdf-sun.h mfhdf/fortran/config/jackets-sun.c mfhdf/fortran/config/netcdf-sun.inc mfhdf/fortran/config/ftest-sun.f";;
-  *-hp-hpux*)             files="mfhdf/libsrc/config/netcdf-hpux.h mfhdf/fortran/config/jackets-hpux.c mfhdf/fortran/config/netcdf-hpux.inc mfhdf/fortran/config/ftest-hpux.f";;
-  *-convex-bsd*)          files="mfhdf/libsrc/config/netcdf-convex.h mfhdf/fortran/config/jackets-convex.c mfhdf/fortran/config/netcdf-convex.inc mfhdf/fortran/config/ftest-convex.f" ;;
-  *-cray-unicos*)         files="mfhdf/libsrc/config/netcdf-unicos.h mfhdf/fortran/config/jackets-unicos.c mfhdf/fortran/config/netcdf-unicos.inc mfhdf/fortran/config/ftest-unicos.f" ;;
-  t3*-cray-craympp)       files="mfhdf/libsrc/config/netcdf-t3e.h mfhdf/fortran/config/jackets-t3e.c mfhdf/fortran/config/netcdf-t3e.inc mfhdf/fortran/config/ftest-t3e.f" ;;
-  S370-fujitsu-sysv*)     files="mfhdf/libsrc/config/netcdf-fujivp.h mfhdf/fortran/config/jackets-fujivp.c mfhdf/fortran/config/netcdf-fujivp.inc mfhdf/fortran/config/ftest-fujivp.f" ;;
-  *-mac-*)		          files="mfhdf/libsrc/config/netcdf-mac.h mfhdf/fortran/config/jackets-mac.c mfhdf/fortran/config/netcdf-mac.inc mfhdf/fortran/config/ftest-mac.f" ;;
-esac
-fi
-
-# make sure host specific files are there
-#if [ ! -f ${srcdir}/${files} ]; then
-#    echo '***' "We are missing host specific customize file ${files}" 1>&2
-#    echo '***' "Please read the installation docs" 1>&2
-#    exit 1
-#fi
-
-# Decided to copy files instead of using symbolic links.
-#
-# Now for Mac and PC configurations we want to copy and not use symbolic
-# links. You can use this also for any platfrom you want.
-if [ -d ${srcdir}/config ]; then
-case "${host}" in
-  *-mac-*)             symbolic_link="cp -p" ;;
-  *-win-*)             symbolic_link="cp -p" ;;
-  *)                   symbolic_link="cp" ;;
-esac
-fi
-
-# post-target:
-
-# We don't have anything
-
-#
-# Local Variables:
-# fill-column: 131
-# End:
-#

Added: packages/libhdf4/branches/upstream/current/hdf/COPYING
===================================================================
--- packages/libhdf4/branches/upstream/current/hdf/COPYING	                        (rev 0)
+++ packages/libhdf4/branches/upstream/current/hdf/COPYING	2007-05-15 09:53:05 UTC (rev 831)
@@ -0,0 +1,23 @@
+/*=======================================================================
+UNIVERSITY OF ILLINOIS (UI), NATIONAL CENTER FOR SUPERCOMPUTING
+APPLICATIONS (NCSA), Software Distribution Policy for Public Domain
+Software
+
+NCSA HDF Version 4.0 source code and documentation are in the public
+domain, available without fee for education, research, non-commercial and
+commercial purposes.  Users may distribute the binary or source code to
+third parties provided that this statement appears on all copies and that
+no charge is made for such copies.  
+
+UI MAKES NO REPRESENTATIONS ABOUT THE SUITABILITY OF THE SOFTWARE FOR ANY
+PURPOSE.  IT IS PROVIDED "AS IS" WITHOUT EXPRESS OR IMPLIED WARRANTY.  THE
+UI SHALL NOT BE LIABLE FOR ANY DAMAGES SUFFERED BY THE USER OF THIS
+SOFTWARE.  The software may have been developed under agreements between
+the UI and the Federal Government which entitle the Government to certain
+rights.
+
+By copying this program, you, the user, agree to abide by the conditions
+and understandings with respect to any software which is marked with a
+public domain notice.
+=======================================================================*/
+

Added: packages/libhdf4/branches/upstream/current/hdf/COPYRIGHT
===================================================================
--- packages/libhdf4/branches/upstream/current/hdf/COPYRIGHT	                        (rev 0)
+++ packages/libhdf4/branches/upstream/current/hdf/COPYRIGHT	2007-05-15 09:53:05 UTC (rev 831)
@@ -0,0 +1,23 @@
+/*=======================================================================
+UNIVERSITY OF ILLINOIS (UI), NATIONAL CENTER FOR SUPERCOMPUTING
+APPLICATIONS (NCSA), Software Distribution Policy for Public Domain
+Software
+
+NCSA HDF Version 3.3 source code and documentation are in the public
+domain, available without fee for education, research, non-commercial and
+commercial purposes.  Users may distribute the binary or source code to
+third parties provided that this statement appears on all copies and that
+no charge is made for such copies.  
+
+UI MAKES NO REPRESENTATIONS ABOUT THE SUITABILITY OF THE SOFTWARE FOR ANY
+PURPOSE.  IT IS PROVIDED "AS IS" WITHOUT EXPRESS OR IMPLIED WARRANTY.  THE
+UI SHALL NOT BE LIABLE FOR ANY DAMAGES SUFFERED BY THE USER OF THIS
+SOFTWARE.  The software may have been developed under agreements between
+the UI and the Federal Government which entitle the Government to certain
+rights.
+
+By copying this program, you, the user, agree to abide by the conditions
+and understandings with respect to any software which is marked with a
+public domain notice.
+=======================================================================*/
+

Deleted: packages/libhdf4/branches/upstream/current/hdf/MAKE.COM
===================================================================
--- packages/libhdf4/branches/upstream/current/hdf/MAKE.COM	2007-05-15 09:05:29 UTC (rev 830)
+++ packages/libhdf4/branches/upstream/current/hdf/MAKE.COM	2007-05-15 09:53:05 UTC (rev 831)
@@ -1,108 +0,0 @@
-! ****************************************************************************
-! * NCSA HDF                                                                 *
-! * Software Development Group                                               *
-! * National Center for Supercomputing Applications                          *
-! * University of Illinois at Urbana-Champaign                               *
-! * 605 E. Springfield, Champaign IL 61820                                   *
-! *                                                                          *
-! * For conditions of distribution and use, see the accompanying             *
-! * hdf/COPYING file.                                                        *
-! *                                                                          *
-! ***************************************************************************
-!
-! $Id: MAKE.COM,v 1.15 1996/03/25 17:53:34 sxu Exp $
-!
-! $ !
-! $ ! Build the entire HDF library
-! $ !
-! $ !
-! $ ! The following defines should be used to tell VMS where to
-! $ !   place the resulting HDF library, include files, and utilites
-! $ !   These directories will not be created, you must create them
-! $ !   by hand.
-! $ !
-$ create/dir [-.lib]
-$ create/dir [-.include]
-$ create/dir [-.bin]
-$ define/nolog hdf$src     mrlxp4$dka200:[folk.dev.hdf.src]   ! HDF src
-$ define/nolog hdf$util    mrlxp4$dka200:[folk.dev.hdf.util]  ! HDF utilities
-$ define/nolog hdf$test    mrlxp4$dka200:[folk.dev.hdf.test]  ! HDF test programs
-$ define/nolog jpeg$src    mrlxp4$dka200:[folk.dev.hdf.jpeg]  !
-$ define/nolog zlib$src    mrlxp4$dka200:[folk.dev.hdf.zlib]  !
-$ define/nolog hdf$lib     mrlxp4$dka200:[folk.dev.lib]df ! Location and name for lib
-$ define/nolog jpeg$lib     mrlxp4$dka200:[folk.dev.lib]libjpeg.olb
-$ define/nolog zlib$lib     mrlxp4$dka200:[folk.dev.lib]libz.olb
-$ define/nolog hdf$include mrlxp4$dka200:[folk.dev.include] ! Where to put includes
-$ define/nolog hdf$bin     mrlxp4$dka200:[folk.dev.bin]   ! Where to put executables
-$ !
-$ define/nolog sys$clib sys$library:vaxcrtl
-$ !
-$ ! Makefile for VAX/VMX systems.
-$ !
-$ ! Make jpeg library
-$  type sys$input
-  ======== Building jpeg library =======
-$ set def jpeg$src
-$ copy jconfig.vms jconfig.h
-$ copy makefile.vms make.com
-$ @make
-$ copy libjpeg.olb jpeg$lib
-$ copy jconfig.h hdf$include
-$ copy jerror.h hdf$include
-$ copy jmorecfg.h  hdf$include
-$ copy jpeglib.h  hdf$include
-$ delete *.obj;*
-$ delete *.exe;*
-$!
-$ ! Make gzip library
-$  type sys$input
-  ======== Building gzip library =======
-$ set def zlib$src
-$ copy make_vms.com make.com
-$ @make
-$ copy libz.olb zlib$lib
-$ copy zconf.h hdf$include
-$ copy zlib.h  hdf$include
-$ delete *.obj;*
-$ delete *.exe;*
-$ !
-$ ! Make full df lib (with fortran stubs)
-$ type sys$input
-  ======== Building HDF 4.0 ========
-$ !              
-$ ! Build the base HDF library
-$ !
-$ set def hdf$src
-$ @MAKENOF
-$ !
-$ ! If you do not want to include the HDF Fortran interfaces, comment
-$ !   out the following command.
-$ !
-$ @MAKEFS
-$ !
-$ ! Move the files to their correct destinations
-$ !
-$ copy df.olb hdf$lib
-$ copy *.h    hdf$include
-$ delete *.obj;*
-$ !
-$ ! Build the HDF utility programs
-$ !
-$ set default hdf$util
-$ @MAKEUTIL
-$ !
-$ ! Move the HDF utilities to where they belong
-$ !
-$ copy *.exe hdf$bin
-$ delete *.obj;*
-$ !
-$ @setuputils
-$ !
-$ ! Build the test programs
-$ !
-$ set default hdf$test
-$ @MAKE
-$ !
-$ delete *.obj;*
-$ type sys$input
-  ======== HDF 4.0 has now been built ========

Added: packages/libhdf4/branches/upstream/current/hdf/Makefile.am
===================================================================
--- packages/libhdf4/branches/upstream/current/hdf/Makefile.am	                        (rev 0)
+++ packages/libhdf4/branches/upstream/current/hdf/Makefile.am	2007-05-15 09:53:05 UTC (rev 831)
@@ -0,0 +1 @@
+SUBDIRS=src test util

Modified: packages/libhdf4/branches/upstream/current/hdf/Makefile.in
===================================================================
--- packages/libhdf4/branches/upstream/current/hdf/Makefile.in	2007-05-15 09:05:29 UTC (rev 830)
+++ packages/libhdf4/branches/upstream/current/hdf/Makefile.in	2007-05-15 09:53:05 UTC (rev 831)
@@ -1,340 +1,429 @@
-# Makefile for HDF
-#
-### Start of system configuration section. ####
-# Set shell so we know what it is
-SHELL = /bin/sh
+# Makefile.in generated by automake 1.7.7 from Makefile.am.
+# @configure_input@
 
-# 'srcdir' Gets set to directory this Makefile is found in
-srcdir = .
-TOP_SRCDIR = ..
+# Copyright 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003
+# 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.
 
-prefix = $(TOP_SRCDIR)/NewHDF
+# 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.
 
-exec_prefix = $(prefix)
-tooldir = $(exec_prefix)/$(target)
+ at SET_MAKE@
 
-program_transform_name =
+srcdir = @srcdir@
+top_srcdir = @top_srcdir@
+VPATH = @srcdir@
+pkgdatadir = $(datadir)/@PACKAGE@
+pkglibdir = $(libdir)/@PACKAGE@
+pkgincludedir = $(includedir)/@PACKAGE@
+top_builddir = ..
 
-datadir = $(prefix)/lib
-mandir = $(prefix)/man
-man1dir = $(mandir)/man1
-man2dir = $(mandir)/man2
-man3dir = $(mandir)/man3
-man4dir = $(mandir)/man4
-man5dir = $(mandir)/man5
-man6dir = $(mandir)/man6
-man7dir = $(mandir)/man7
-man8dir = $(mandir)/man8
-man9dir = $(mandir)/man9
-docdir = $(datadir)/doc
+am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
+INSTALL = @INSTALL@
+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 = :
+host_triplet = @host@
+ACLOCAL = @ACLOCAL@
+AMDEP_FALSE = @AMDEP_FALSE@
+AMDEP_TRUE = @AMDEP_TRUE@
+AMTAR = @AMTAR@
+AR = @AR@
+AUTOCONF = @AUTOCONF@
+AUTOHEADER = @AUTOHEADER@
+AUTOMAKE = @AUTOMAKE@
+AWK = @AWK@
+CC = @CC@
+CCDEPMODE = @CCDEPMODE@
+CFLAGS = @CFLAGS@
+CPP = @CPP@
+CPPFLAGS = @CPPFLAGS@
+CXX = @CXX@
+CXXCPP = @CXXCPP@
+CXXDEPMODE = @CXXDEPMODE@
+CXXFLAGS = @CXXFLAGS@
+CYGPATH_W = @CYGPATH_W@
+DEFS = @DEFS@
+DEPDIR = @DEPDIR@
+DIFF = @DIFF@
+ECHO_C = @ECHO_C@
+ECHO_N = @ECHO_N@
+ECHO_T = @ECHO_T@
+EGREP = @EGREP@
+EXEEXT = @EXEEXT@
+F77 = @F77@
+FFLAGS = @FFLAGS@
+HDF_BUILD_FORTRAN_FALSE = @HDF_BUILD_FORTRAN_FALSE@
+HDF_BUILD_FORTRAN_TRUE = @HDF_BUILD_FORTRAN_TRUE@
+HDF_BUILD_XDR_FALSE = @HDF_BUILD_XDR_FALSE@
+HDF_BUILD_XDR_TRUE = @HDF_BUILD_XDR_TRUE@
+INSTALL_DATA = @INSTALL_DATA@
+INSTALL_PROGRAM = @INSTALL_PROGRAM@
+INSTALL_SCRIPT = @INSTALL_SCRIPT@
+INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
+LDFLAGS = @LDFLAGS@
+LEX = @LEX@
+LEXLIB = @LEXLIB@
+LEX_OUTPUT_ROOT = @LEX_OUTPUT_ROOT@
+LIBOBJS = @LIBOBJS@
+LIBS = @LIBS@
+LN_S = @LN_S@
+LTLIBOBJS = @LTLIBOBJS@
+MAINT = @MAINT@
+MAINTAINER_MODE_FALSE = @MAINTAINER_MODE_FALSE@
+MAINTAINER_MODE_TRUE = @MAINTAINER_MODE_TRUE@
+MAKEINFO = @MAKEINFO@
+NEQN = @NEQN@
+OBJEXT = @OBJEXT@
+PACKAGE = @PACKAGE@
+PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
+PACKAGE_NAME = @PACKAGE_NAME@
+PACKAGE_STRING = @PACKAGE_STRING@
+PACKAGE_TARNAME = @PACKAGE_TARNAME@
+PACKAGE_VERSION = @PACKAGE_VERSION@
+PATH_SEPARATOR = @PATH_SEPARATOR@
+RANLIB = @RANLIB@
+SET_MAKE = @SET_MAKE@
+SHELL = @SHELL@
+STRIP = @STRIP@
+TBL = @TBL@
+VERSION = @VERSION@
+YACC = @YACC@
+ac_ct_CC = @ac_ct_CC@
+ac_ct_CXX = @ac_ct_CXX@
+ac_ct_F77 = @ac_ct_F77@
+ac_ct_RANLIB = @ac_ct_RANLIB@
+ac_ct_STRIP = @ac_ct_STRIP@
+am__fastdepCC_FALSE = @am__fastdepCC_FALSE@
+am__fastdepCC_TRUE = @am__fastdepCC_TRUE@
+am__fastdepCXX_FALSE = @am__fastdepCXX_FALSE@
+am__fastdepCXX_TRUE = @am__fastdepCXX_TRUE@
+am__include = @am__include@
+am__leading_dot = @am__leading_dot@
+am__quote = @am__quote@
+bindir = @bindir@
+build = @build@
+build_alias = @build_alias@
+build_cpu = @build_cpu@
+build_os = @build_os@
+build_vendor = @build_vendor@
+datadir = @datadir@
+exec_prefix = @exec_prefix@
+host = @host@
+host_alias = @host_alias@
+host_cpu = @host_cpu@
+host_os = @host_os@
+host_vendor = @host_vendor@
+includedir = @includedir@
+infodir = @infodir@
+install_sh = @install_sh@
+libdir = @libdir@
+libexecdir = @libexecdir@
+localstatedir = @localstatedir@
+mandir = @mandir@
+oldincludedir = @oldincludedir@
+prefix = @prefix@
+program_transform_name = @program_transform_name@
+sbindir = @sbindir@
+sharedstatedir = @sharedstatedir@
+sysconfdir = @sysconfdir@
+target_alias = @target_alias@
+SUBDIRS = src test util
+subdir = hdf
+ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
+mkinstalldirs = $(SHELL) $(top_srcdir)/bin/mkinstalldirs
+CONFIG_HEADER = $(top_builddir)/hdf/src/h4config.h
+CONFIG_CLEAN_FILES =
+DIST_SOURCES =
 
-INSTALL = ${TOP_SRCDIR}/install-sh -c
-INSTALL_PROGRAM = $(INSTALL)
-INSTALL_DATA = $(INSTALL) -m 644
+RECURSIVE_TARGETS = info-recursive dvi-recursive pdf-recursive \
+	ps-recursive install-info-recursive uninstall-info-recursive \
+	all-recursive install-data-recursive install-exec-recursive \
+	installdirs-recursive install-recursive uninstall-recursive \
+	check-recursive installcheck-recursive
+DIST_COMMON = README $(srcdir)/Makefile.in COPYING Makefile.am
+DIST_SUBDIRS = $(SUBDIRS)
+all: all-recursive
 
-# /usr/local/bin/m4 (GNU version?)
-M4   = /usr/local/bin/m4
-# /usr/local/bin/perl (GNU version?)
-PERL = /usr/local/bin/perl
+.SUFFIXES:
+$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ Makefile.am  $(top_srcdir)/configure.ac $(ACLOCAL_M4)
+	cd $(top_srcdir) && \
+	  $(AUTOMAKE) --foreign  hdf/Makefile
+Makefile: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.in  $(top_builddir)/config.status
+	cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)
+uninstall-info-am:
 
-# Name of achive randomizer, usually ranlib (use 'touch' if non-existant)
-RANLIB = ranlib
+# 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):
+	@set fnord $$MAKEFLAGS; amf=$$2; \
+	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) \
+	   || case "$$amf" in *=*) exit 1;; *k*) fail=yes;; *) exit 1;; esac; \
+	done; \
+	if test "$$dot_seen" = "no"; then \
+	  $(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \
+	fi; test -z "$$fail"
 
-# Name of library archiver and flags to send, default 'AR=ar', 'ARFLAGS=r'
-AR = ar
-ARFLAGS = r
+mostlyclean-recursive clean-recursive distclean-recursive \
+maintainer-clean-recursive:
+	@set fnord $$MAKEFLAGS; amf=$$2; \
+	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) \
+	   || case "$$amf" in *=*) exit 1;; *k*) fail=yes;; *) exit 1;; esac; \
+	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
 
-# Name of remove utility, default 'RM=/bin/rm', 'RMFLAGS=-f'
-RM = /bin/rm
-RMFLAGS = -f
+ETAGS = etags
+ETAGSFLAGS =
 
-#defaults
-AS = as
-CC = gcc
-CFLAGS = -ansi
-FC = f77
-FFLAGS=
+CTAGS = ctags
+CTAGSFLAGS =
 
-# Set for document generation
-MAKEINFO = makeinfo
-TEXI2DVI = texi2dvi
+tags: TAGS
 
-# Directory in which to install scripts.
-bindir = $(exec_prefix)/bin
+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; } \
+	       END { for (i in files) print i; }'`; \
+	mkid -fID $$unique
 
-# Directory in which to install library files.
-libdir = $(prefix)/lib
+TAGS: tags-recursive $(HEADERS) $(SOURCES)  $(TAGS_DEPENDENCIES) \
+		$(TAGS_FILES) $(LISP)
+	tags=; \
+	here=`pwd`; \
+	if (etags --etags-include --version) >/dev/null 2>&1; then \
+	  include_option=--etags-include; \
+	else \
+	  include_option=--include; \
+	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)  $(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; } \
+	       END { for (i in files) print i; }'`; \
+	test -z "$(ETAGS_ARGS)$$tags$$unique" \
+	  || $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
+	     $$tags $$unique
 
-# Directory in which to install documentation info files.
-infodir = $(prefix)/info
+ctags: CTAGS
+CTAGS: ctags-recursive $(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; } \
+	       END { for (i in files) print i; }'`; \
+	test -z "$(CTAGS_ARGS)$$tags$$unique" \
+	  || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
+	     $$tags $$unique
 
-#### ----- host and target specific makefile fragments come in here.-------
-### ------------------- end of makefile fragments -------------------------
+GTAGS:
+	here=`$(am__cd) $(top_builddir) && pwd` \
+	  && cd $(top_srcdir) \
+	  && gtags -i $(GTAGS_ARGS) $$here
 
-# ############# End of system configuration section. ###############
+distclean-tags:
+	-rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
+DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
 
-PACKAGE	 = HDF
-VERSION  = 4.0
+top_distdir = ..
+distdir = $(top_distdir)/$(PACKAGE)-$(VERSION)
 
-MANIFEST = $(DISTFILES)
-DISTFILES = Makefile.in COPYING build.inc
+distdir: $(DISTFILES)
+	@srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \
+	topsrcdirstrip=`echo "$(top_srcdir)" | sed 's|.|.|g'`; \
+	list='$(DISTFILES)'; for file in $$list; do \
+	  case $$file in \
+	    $(srcdir)/*) file=`echo "$$file" | sed "s|^$$srcdirstrip/||"`;; \
+	    $(top_srcdir)/*) file=`echo "$$file" | sed "s|^$$topsrcdirstrip/|$(top_builddir)/|"`;; \
+	  esac; \
+	  if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
+	  dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \
+	  if test "$$dir" != "$$file" && test "$$dir" != "."; then \
+	    dir="/$$dir"; \
+	    $(mkinstalldirs) "$(distdir)$$dir"; \
+	  else \
+	    dir=''; \
+	  fi; \
+	  if test -d $$d/$$file; then \
+	    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='$(SUBDIRS)'; for subdir in $$list; do \
+	  if test "$$subdir" = .; then :; else \
+	    test -d $(distdir)/$$subdir \
+	    || mkdir $(distdir)/$$subdir \
+	    || exit 1; \
+	    (cd $$subdir && \
+	      $(MAKE) $(AM_MAKEFLAGS) \
+	        top_distdir="$(top_distdir)" \
+	        distdir=../$(distdir)/$$subdir \
+	        distdir) \
+	      || exit 1; \
+	  fi; \
+	done
+check-am: all-am
+check: check-recursive
+all-am: Makefile
+installdirs: installdirs-recursive
+installdirs-am:
 
-SUBDIRS= src jpeg zlib fmpool pablo test util
+install: install-recursive
+install-exec: install-exec-recursive
+install-data: install-data-recursive
+uninstall: uninstall-recursive
 
-HDFINC= $(srcdir)/src
-HDFLIB= $(srcdir)/src
-HDFBIN= $(srcdir)/bin
-PABLO_HINC= $(srcdir)/pablo
-FMPOOL_INC= $(srcdir)/fmpool
+install-am: all-am
+	@$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
 
-#
-#
-# Flags to recursively send
-#
+installcheck: installcheck-recursive
+install-strip:
+	$(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
+	  INSTALL_STRIP_FLAG=-s \
+	  `test -z '$(STRIP)' || \
+	    echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
+mostlyclean-generic:
 
-HDF_FLAGS       = \
-        CC="$(CC)" \
-        CFLAGS="$(CFLAGS)" \
-        FC="$(FC)" \
-        FFLAGS="$(FFLAGS)" \
-        RANLIB="$(RANLIB)" \
-        AR="$(AR)" \
-        ARFLAGS="$(ARFLAGS)" \
-        RM="$(RM)" \
-        RMFLAGS="$(RMFLAGS)" \
-        FMPOOL_FLAGS="$(FMPOOL_FLAGS)" \
-        PABLO_FLAGS="$(PABLO_FLAGS)" \
-        PABLO_INCLUDE="$(PABLO_INCLUDE)" \
-        MACHINE="$(MACHINE)" 
+clean-generic:
 
-LOCAL_MACROS  = CC="$(CC)" \
-	CFLAGS="$(CFLAGS)" \
-	CPP="$(CPP)" \
-	CPPFLAGS="$(CPPFLAGS)" \
-	exec_prefix="$(exec_prefix)" \
-	FC="$(FC)" \
-        FFLAGS="$(FFLAGS)" \
-	prefix="$(prefix)"
+distclean-generic:
+	-rm -f $(CONFIG_CLEAN_FILES)
 
-#
-#
-# General rules
-#
-all:
-	@$(MAKE) $(MFLAGS) $(HDF_FLAGS) TARG=libjpeg.a \
-          SUBDIRS="jpeg" subd  
-	@$(MAKE) $(MFLAGS) $(HDF_FLAGS) TARG=libz.a \
-          SUBDIRS="zlib" subd  
-	@$(MAKE) $(MFLAGS) $(HDF_FLAGS) TARG=$@ \
-          SUBDIRS="src pablo fmpool util test" subd
+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
 
-allnofortran:
-	@$(MAKE) $(MFLAGS) $(HDF_FLAGS) TARG=libjpeg.a \
-          SUBDIRS="jpeg" subd  
-	@$(MAKE) $(MFLAGS) $(HDF_FLAGS) TARG=libz.a \
-          SUBDIRS="zlib" subd  
-	@$(MAKE) $(MFLAGS) $(HDF_FLAGS) TARG=nofortran \
-          SUBDIRS="src pablo fmpool util test" subd
+clean-am: clean-generic mostlyclean-am
 
-rebuild rebuildnofortran:
-	@$(MAKE) $(MFLAGS) $(HDF_FLAGS) TARG=libjpeg.a \
-          SUBDIRS="jpeg" subd 
-	@$(MAKE) $(MFLAGS) $(HDF_FLAGS) TARG=libz.a \
-          SUBDIRS="zlib" subd 
-	@$(MAKE) $(MFLAGS) $(HDF_FLAGS) TARG=$@ \
-          SUBDIRS="src pablo fmpool util test" subd
+distclean: distclean-recursive
+	-rm -f Makefile
+distclean-am: clean-am distclean-generic distclean-tags
 
-libnofortran:
-	@$(MAKE) $(MYFLAGS) $(HDF_FLAGS) TARG=libjpeg.a \
-	  SUBDIRS="jpeg" subd 
-	@$(MAKE) $(MYFLAGS) $(HDF_FLAGS) TARG=libz.a \
-	  SUBDIRS="zlib" subd 
-	@$(MAKE) $(MYFLAGS) $(HDF_FLAGS) TARG=nofortran \
-	  SUBDIRS="src pablo fmpool" subd
+dvi: dvi-recursive
 
-libnostub: libnofortran
+dvi-am:
 
-allnostub: allnofortran
+info: info-recursive
 
-libs:
-	@$(MAKE) $(MFLAGS) $(HDF_FLAGS) TARG=libjpeg.a \
-          SUBDIRS="jpeg" subd
-	@$(MAKE) $(MFLAGS) $(HDF_FLAGS) TARG=libz.a \
-          SUBDIRS="zlib" subd
-	@$(MAKE) $(MFLAGS) $(HDF_FLAGS) TARG=all \
-          SUBDIRS="src pablo fmpool" subd
+info-am:
 
-libdf:
-	@$(MAKE) $(MFLAGS) $(HDF_FLAGS) TARG=all \
-          SUBDIRS="src" subd
+install-data-am:
 
-libjpeg:
-	@$(MAKE) $(MFLAGS) $(HDF_FLAGS) TARG=libjpeg.a \
-          SUBDIRS="jpeg" subd
+install-exec-am:
 
-libz:
-	@$(MAKE) $(MFLAGS) $(HDF_FLAGS) TARG=libz.a \
-          SUBDIRS="zlib" subd
+install-info: install-info-recursive
 
-utilities:
-	@$(MAKE) $(MFLAGS) $(HDF_FLAGS) TARG=libjpeg.a \
-          SUBDIRS="jpeg" subd
-	@$(MAKE) $(MFLAGS) $(HDF_FLAGS) TARG=libz.a \
-          SUBDIRS="zlib" subd
-	@$(MAKE) $(MFLAGS) $(HDF_FLAGS) TARG=all \
-          SUBDIRS="src pablo fmpool util" subd
+install-man:
 
-hdf-test:
-	@$(MAKE) $(MFLAGS) $(HDF_FLAGS) TARG=libjpeg.a \
-          SUBDIRS="jpeg" subd
-	@$(MAKE) $(MFLAGS) $(HDF_FLAGS) TARG=libz.a \
-          SUBDIRS="zlib" subd
-	@$(MAKE) $(MFLAGS) $(HDF_FLAGS) TARG=all \
-          SUBDIRS="src pablo fmpool test" subd
+installcheck-am:
 
-hdf-testnofortran:
-	@$(MAKE) $(MFLAGS) $(HDF_FLAGS) TARG=libjpeg.a \
-          SUBDIRS="jpeg" subd
-	@$(MAKE) $(MFLAGS) $(HDF_FLAGS) TARG=libz.a \
-          SUBDIRS="zlib" subd
-	@$(MAKE) $(MFLAGS) $(HDF_FLAGS) TARG=nofortran \
-          SUBDIRS="src pablo fmpool test" subd
+maintainer-clean: maintainer-clean-recursive
+	-rm -f Makefile
+maintainer-clean-am: distclean-am maintainer-clean-generic
 
-testnofortran:
-	@$(MAKE) $(MFLAGS) $(HDF_FLAGS) TARG=libjpeg.a \
-          SUBDIRS="jpeg" subd 
-	@$(MAKE) $(MFLAGS) $(HDF_FLAGS) TARG=libz.a \
-          SUBDIRS="zlib" subd 
-	@$(MAKE) $(MFLAGS) $(HDF_FLAGS) TARG=nofortran \
-          SUBDIRS="src pablo fmpool test" subd
+mostlyclean: mostlyclean-recursive
 
-test-hdf:
-	@$(MAKE) $(MFLAGS) $(HDF_FLAGS) TARG=test-hdf \
-          SUBDIRS="test" subd
+mostlyclean-am: mostlyclean-generic
 
-test-hdfnofortran:
-	@$(MAKE) $(MFLAGS) $(HDF_FLAGS) TARG=test-hdfnofortran \
-          SUBDIRS="test" subd
+pdf: pdf-recursive
 
-test-hdffortran:
-	@$(MAKE) $(MFLAGS) $(HDF_FLAGS) TARG=test-hdffortran \
-          SUBDIRS="test" subd
+pdf-am:
 
-test-utils:
-	@$(MAKE) $(MFLAGS) $(HDF_FLAGS) TARG=test-utils \
-          SUBDIRS="util" subd
+ps: ps-recursive
 
-install:
-	@$(MAKE) $(MFLAGS) $(HDF_FLAGS) TARG=install-lib \
-          SUBDIRS="src jpeg zlib pablo fmpool" subd
-	@$(MAKE) $(MFLAGS) $(HDF_FLAGS) TARG=install \
-          SUBDIRS="util" subd
+ps-am:
 
-install-libs:
-	@$(MAKE) $(MFLAGS) $(HDF_FLAGS) TARG=install-lib \
-          SUBDIRS="src jpeg zlib pablo fmpool" subd
+uninstall-am: uninstall-info-am
 
-install-includes:
-	@$(MAKE) $(MFLAGS) $(HDF_FLAGS) TARG=install-includes \
-          SUBDIRS="src jpeg zlib pablo fmpool" subd
+uninstall-info: uninstall-info-recursive
 
-install-utils:
-	@$(MAKE) $(MFLAGS) $(HDF_FLAGS) TARG=install \
-          SUBDIRS="util" subd
+.PHONY: $(RECURSIVE_TARGETS) CTAGS GTAGS all all-am check check-am clean \
+	clean-generic clean-recursive ctags ctags-recursive distclean \
+	distclean-generic distclean-recursive distclean-tags distdir \
+	dvi dvi-am dvi-recursive info info-am info-recursive install \
+	install-am install-data install-data-am install-data-recursive \
+	install-exec install-exec-am install-exec-recursive \
+	install-info install-info-am install-info-recursive install-man \
+	install-recursive install-strip installcheck installcheck-am \
+	installdirs installdirs-am installdirs-recursive \
+	maintainer-clean maintainer-clean-generic \
+	maintainer-clean-recursive mostlyclean mostlyclean-generic \
+	mostlyclean-recursive pdf pdf-am pdf-recursive ps ps-am \
+	ps-recursive tags tags-recursive uninstall uninstall-am \
+	uninstall-info-am uninstall-info-recursive uninstall-recursive
 
-perfs:
-	@$(MAKE) $(MFLAGS) $(HDF_FLAGS) TARG=libjpeg.a \
-          SUBDIRS="jpeg" subd
-	@$(MAKE) $(MFLAGS) $(HDF_FLAGS) TARG=libz.a \
-          SUBDIRS="zlib" subd
-	@$(MAKE) $(MFLAGS) $(HDF_FLAGS) TARG=all \
-          SUBDIRS="src perf fmpool" subd
-
-#install:      $(INSTALL_DIRS)
-#	@$(MAKE) $(MFLAGS) $(HDF_FLAGS) TARG=$@  \
-#          SUBDIRS="src util test" subd
-
-debug:
-	@$(MAKE) $(MFLAGS) $(HDF_FLAGS) TARG=libjpeg.a \
-          SUBDIRS="jpeg" subd 
-	@$(MAKE) $(MFLAGS) $(HDF_FLAGS) TARG=libz.a \
-          SUBDIRS="zlib" subd 
-	@$(MAKE) $(MFLAGS) $(HDF_FLAGS) TARG=debug \
-          SUBDIRS="src fmpool test" subd
-
-saber:
-	@$(MAKE) $(MFLAGS) $(HDF_FLAGS) TARG=saber \
-          SUBDIRS="src jpeg zlib test" subd
-
-clean:
-	@$(MAKE) $(MFLAGS) $(HDF_FLAGS) TARG=$@  \
-          SUBDIRS="src jpeg zlib pablo fmpool util test" subd
-	-$(RM) $(RMFLAGS) core *.log
-
-distclean:
-	@$(MAKE) $(MFLAGS) $(HDF_FLAGS) TARG=$@  \
-          SUBDIRS="src jpeg zlib pablo fmpool util test" subd
-	-$(RM) $(RMFLAGS) core *.log
-	-$(RM) -rf bin lib include config.status Makefile
-
-# for recusive make in subdirs
-subd:
-	@for dir in $(SUBDIRS); do \
-          (cd $$dir; echo Making \`$(TARG)\' in `pwd`; \
-              $(MAKE) $(MFLAGS) $(HDF_FLAGS) $(TARG)); \
-	done
-
-# for distribution creation
-distdir = $(TOP_SRCDIR)/$(PACKAGE)-$(VERSION)/$(curdir)
-curdir = hdf
-dist: $(DISTFILES)
-	@for file in $(DISTFILES); do \
-	  ln $(srcdir)/$$file $(distdir)/$$file 2> /dev/null \
-	    || { echo copying $$file instead; \
-	    cp -p $(srcdir)/$$file $(distdir)/$$file;}; \
-	done
-	for subdir in $(SUBDIRS); do \
-	  echo making $@ in $$subdir; \
-	  mkdir $(distdir)/$$subdir || exit 1; \
-	  (cd $$subdir && $(MAKE) $@) || exit 1; \
-	done
-
-# for auto remaking, see toplevel Makefile
-#Makefile: $(TOP_SRCDIR)/config.status Makefile.in
-#	CONFIG_FILES=$@ CONFIG_HEADERS= $(TOP_SRCDIR)/config.status
-
-# Tell versions [3.59,3.63) of GNU make not to export all variables.
+# 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:
-
-
-help:
-	@echo ""
-	@echo "Make supports the following targets"
-	@echo "make help    - prints this usage section"
-	@echo "make all     - (DEFAULT) makes HDF package"
-	@echo "make allnofortran - makes HDF package excluding fortran support"
-	@echo "make libnofortran - makes HDF library excluding fortran support"
-	@echo "make testnofortran - makes HDF library and tests"
-	@echo "                     excluding fortran support"
-	@echo "make hdf-test      - makes HDF library and tests"
-	@echo "make utilities     - makes HDF library and utilities"
-	@echo "make libs          - makes HDF and IJG JPEG libraries only"
-	@echo "make libdf         - makes HDF library "
-	@echo "make libjpeg       - makes IJG JPEG library "
-	@echo "make libz          - makes GZIP deflate library "
-	@echo "make test-hdf          - run HDF library tests " 
-	@echo "make test-hdfnofortran - run HDF library tests except the fortran test " 
-	@echo "make test-hdffortran   - run HDF library fortran tests only " 
-	@echo "make test-utils        - run HDF utilities test"
-	@echo "make install           - install HDF library, "
-	@echo "                         utilites, and includes " 
-	@echo "make install-libs      - install HDF library and includes " 
-	@echo "make install-includes  - install HDF includes " 
-	@echo "make install-utils     - install HDF utilities " 
-	@echo "make clean     - cleans up HDF packages(*.o,libdf.a,..)"
-	@echo "make distclean - cleans up HDF packages including"
-	@echo "                 configuration(Makefiles,config.status,..)"
-	@echo ""
-
-

Added: packages/libhdf4/branches/upstream/current/hdf/README.33r4
===================================================================
--- packages/libhdf4/branches/upstream/current/hdf/README.33r4	                        (rev 0)
+++ packages/libhdf4/branches/upstream/current/hdf/README.33r4	2007-05-15 09:53:05 UTC (rev 831)
@@ -0,0 +1,31 @@
+
+In general, HDF 4.0 can be built with a single command from this 
+directory.  The file Makefile is a generic, machine independent 
+Makefile which you can modify if there is no Makefile already built 
+for your machine.
+
+For convenience, there are also machine customized makefiles.  For
+example MAKE.IBM6000 is a Makefile suitable for compiling HDF
+on an IBM RS/6000.
+
+Assuming you are on an IBM RS/6000:
+
+cp MAKE.IBM6000 Makefile
+
+make    
+make all 
+        --- builds HDF library and the C and Fortran interfaces, the 
+                utilities and C and Fortran test programs.
+
+make allnofortran   
+        --- builds the HDF library and only the C interfaces, the
+                utilities and the C test programs.
+
+make libdf
+        --- builds the HDF library and the C and Fortran interfaces
+
+make utilities
+        --- builds only the utility programs
+
+make tests
+        --- builds all of the test programs

Deleted: packages/libhdf4/branches/upstream/current/hdf/build.inc
===================================================================
--- packages/libhdf4/branches/upstream/current/hdf/build.inc	2007-05-15 09:05:29 UTC (rev 830)
+++ packages/libhdf4/branches/upstream/current/hdf/build.inc	2007-05-15 09:53:05 UTC (rev 831)
@@ -1,133 +0,0 @@
-# ****************************************************************************
-# * NCSA HDF                                                                 *
-# * Software Development Group                                               *
-# * National Center for Supercomputing Applications                          *
-# * University of Illinois at Urbana-Champaign                               *
-# * 605 E. Springfield, Champaign IL 61820                                   *
-# *                                                                          *
-# * For conditions of distribution and use, see the accompanying             *
-# * hdf/COPYING file.                                                        *
-# *                                                                          *
-# ***************************************************************************
-#
-# $Id: build.inc,v 1.6 1995/05/17 02:57:40 georgev Exp $
-#
-# ##################################################################
-#
-#
-# This is the top level Makefile to build HDF 4.0 on Unix based
-#       platforms
-#
-
-#
-#
-# Flags to recursively send
-#
-
-HDF_FLAGS       = \
-        CC="$(CC)" \
-        CFLAGS="$(CFLAGS)" \
-        FC="$(FC)" \
-        FFLAGS="$(FFLAGS)" \
-        RANLIB="$(RANLIB)" \
-        AR="$(AR)" \
-        ARFLAGS="$(ARFLAGS)" \
-        RM="$(RM)" \
-        RMFLAGS="$(RMFLAGS)" \
-        MACHINE="$(MACHINE)" \
-        HDFLIB="$(HDFLIB)" \
-        HDFINC="$(HDFINC)" \
-	HDFBIN="$(HDFBIN)"	
-
-#
-#
-# General rules
-#
-all:
-	@$(MAKE) $(MFLAGS) $(HDF_FLAGS) TARG=$@ \
-          SUBDIRS="src jpeg util test" subd message 
-
-allnofortran:
-	@$(MAKE) $(MFLAGS) $(HDF_FLAGS) TARG=nofortran \
-          SUBDIRS="src jpeg util test" subd message 
-
-rebuild rebuildnofortran:
-	@$(MAKE) $(MFLAGS) $(HDF_FLAGS) TARG=$@ \
-          SUBDIRS="src jpeg util test" subd message 
-
-libnofortran:
-	@$(MAKE) $(MYFLAGS) $(HDF_FLAGS) TARG=nofortran \
-	  SUBDIRS="src jpeg" subd message
-
-libnostub: libnofortran
-
-allnostub: allnofortran
-
-libdf:
-	@$(MAKE) $(MFLAGS) $(HDF_FLAGS) TARG=all \
-          SUBDIRS="src" subd
-
-libjpeg:
-	@$(MAKE) $(MFLAGS) $(HDF_FLAGS) TARG=all \
-          SUBDIRS="jpeg" subd
-
-utilities:
-	@$(MAKE) $(MFLAGS) $(HDF_FLAGS) TARG=all \
-          SUBDIRS="src jpeg util" subd
-
-tests:
-	@$(MAKE) $(MFLAGS) $(HDF_FLAGS) TARG=all \
-          SUBDIRS="src jpeg test" subd
-
-testnofortran:
-	@$(MAKE) $(MFLAGS) $(HDF_FLAGS) TARG=nofortran \
-          SUBDIRS="src jpeg test" subd message 
-
-perfs:
-	@$(MAKE) $(MFLAGS) $(HDF_FLAGS) TARG=all \
-          SUBDIRS="src jpeg perf" subd
-
-#install:      $(INSTALL_DIRS)
-#	@$(MAKE) $(MFLAGS) $(HDF_FLAGS) TARG=$@  \
-#          SUBDIRS="src util test" subd
-
-debug:
-	@$(MAKE) $(MFLAGS) $(HDF_FLAGS) TARG=debug \
-          SUBDIRS="src jpeg test" subd message 
-
-saber:
-	@$(MAKE) $(MFLAGS) $(HDF_FLAGS) TARG=saber \
-          SUBDIRS="src jpeg test" subd
-
-clean:
-	@$(MAKE) $(MFLAGS) $(HDF_FLAGS) TARG=$@  \
-          SUBDIRS="src jpeg util test" subd
-	$(RM) $(RMFLAGS) core *.log
-
-distclean:
-	@$(MAKE) $(MFLAGS) $(HDF_FLAGS) TARG=$@  \
-          SUBDIRS="src jpeg util test" subd
-	$(RM) $(RMFLAGS) core *.log
-	$(RM) -rf bin lib include
-
-subd:
-	@for dir in $(SUBDIRS); do \
-		(cd $$dir; echo Making \`$(TARG)\' in `pwd`; \
-		$(MAKE) $(MFLAGS) $(HDF_FLAGS) $(TARG)); \
-	done
-
-message:
-	@echo ""
-	@echo "***********************************************************"
-	@echo " HDF 4.0 library successfully created."
-	@echo ""
-	@echo "If you have any old vset files (v 1.0) you must use vcompat"
-	@echo "to make them compatible with Vset 2.0 applications"
-	@echo ""
-	@echo "User programs can be created as follows:"
-	@echo ""
-	@echo "   ${CC} program.c libdf.a -o program"
-	@echo ""
-	@echo "***********************************************************"
-	@echo ""
-

Modified: packages/libhdf4/branches/upstream/current/hdf/fmpool/Makefile.in
===================================================================
--- packages/libhdf4/branches/upstream/current/hdf/fmpool/Makefile.in	2007-05-15 09:05:29 UTC (rev 830)
+++ packages/libhdf4/branches/upstream/current/hdf/fmpool/Makefile.in	2007-05-15 09:53:05 UTC (rev 831)
@@ -114,7 +114,6 @@
 HDFINC= $(srcdir)/../src
 HDFLIB= $(srcdir)/../src
 HDFBIN= $(srcdir)/../bin
-PABLO_DIR= $(srcdir)/../pablo
 
 #### makefile fragment from 'config/' goes here ##############
 ## ------------------------ end of makefile fragments--------------------
@@ -152,13 +151,6 @@
 	  $(MAKE) $(MFLAGS) $(HDF_FLAGS) pall; \
 	fi
 
-pall::         FORCE
-	@if test -z "$(PABLO_FLAGS)"; then \
-	  $(MAKE) $(MFLAGS) $(HDF_FLAGS) libfmpool.a; \
-	else		 \
-	  $(MAKE) $(MFLAGS) $(HDF_FLAGS) libfmpool.a pablolib; \
-	fi
-
 libfmpool.a: $(LIBOBJECTS) $(HDFLIB)/libdf.a
 	$(RM) $(RMFLAGS) libfmpool.a
 	$(AR) $(ARFLAGS) libfmpool.a  $(LIBOBJECTS)
@@ -173,12 +165,6 @@
 	$(AR) $(ARFLAGS) libfmpool.a  $(LIBOBJECTS)
 	$(AR2) libfmpool.a
 
-pablolib: $(LIBOBJECTS) $(PABLO_DIR)/libdf-inst.a
-	if test -f $(PABLO_DIR)/libdf-inst.a ; then \
-	  $(AR) rcuv $(PABLO_DIR)/libdf-inst.a $(LIBOBJECTS); \
-	  $(RANLIB) $(PABLO_DIR)/libdf-inst.a ; \
-	fi
-
 tfmp: ${INCLUDES} fmpconf.h test_fmpio.c libfmpool.a
 	${CC} $(CFLAGS)  ${AUXFLAGS} -I. -c test_fmpio.c 
 	$(LN) $(LDFLAGS) -o tfmp $(TOBJECTS) libfmpool.a $(LDLIBS)

Added: packages/libhdf4/branches/upstream/current/hdf/src/INSTALL
===================================================================
--- packages/libhdf4/branches/upstream/current/hdf/src/INSTALL	                        (rev 0)
+++ packages/libhdf4/branches/upstream/current/hdf/src/INSTALL	2007-05-15 09:53:05 UTC (rev 831)
@@ -0,0 +1,75 @@
+***********************************************************************
+			NCSA HDF version 4.1
+***********************************************************************
+
+     ---------------- Invoking the Makefile ------------------ 
+
+A Makefile is provided for building HDF4.1.  Open the Makefile
+in your editor and read the instructions at the top of the file.
+The section marked PORTING INSTRUCTIONS indicates that you need
+to modify certain lines in order to configure the Makefile for your
+particular system.
+
+Make targets available are :
+make            -- compile and install library 
+make all        -- compile and install library
+make libdf.a    -- compile library
+make nofortran  -- compile and install library, only C interface
+make libnostub  -- same as make nofortran
+make libnofortran  -- compile library and only C interface
+make install_it    -- install library 
+make clean      -- rm intermediate files
+make cleanup    -- rm all make products
+
+
+    --------------- Compiling Subsets of HDF ---------------
+
+In order to use HDF, you must compile the C routines using the
+following modules: hfile.c, hfile.h, hdf.h, hdfi.h, herr.c, herr.h,
+hkit.c and hproto.h.  You can omit various other routines by
+deleting references to certain files from the makefile, as
+follows:
+
+ To omit selected fortran interfaces, delete all references to
+     fortran files that contain those interfaces (xxx.f) and 
+     their object files (xxx.o).
+
+Similarly:
+
+  To omit DFR8 routines, delete files that begin dfr8...
+  To omit DF24 routines, delete files that begin df24...
+  To omit DFP  routines, delete files that begin dfp...
+  To omit DFSD routines, delete files that begin dfsd...
+  To omit DFAN routines, delete files that begin dfan...
+  To omit Vset routines, delete files that begin v...
+  To omit conversion routines (currently only used by DFSD
+     and Vset), delete files that begin dfconv...
+  To omit the routines that emulate the old lower layer
+     of HDF, delete df.h, dfi.h, df.c, dfF.c and dfFf.f
+
+
+     ------------ Compiling C programs with HDF ----------------
+
+To use HDF routines in your program, you must have the line
+'#include "hdf.h"' near the beginning of your code.  You may also
+need to include additional header files (eg. dfrig.h or dfsd.h, etc),
+depending on the interfaces you are using.  Call the appropriate
+HDF routines as described in the documentation. 
+Compile a C program called "myprog.c" as follows:
+
+    cc myprog.c libdf.a -o myprog
+or
+    cc myprog.c -o myprog -ldf
+
+If the include files are in the directory "incdir", and the 
+library file "libdf.a" is in "libdir", use
+
+    cc -Iincdir myprog.c libdir/libdf.a -o myprog
+or
+    cc -Iincdir myprog.c -o myprog -L libdir -ldf
+
+
+    ------------ Testing HDF ----------------
+
+A partial test suite should be included in this distribution.
+A Makefile and instructions are included with this test suite.

Added: packages/libhdf4/branches/upstream/current/hdf/src/Makefile.am
===================================================================
--- packages/libhdf4/branches/upstream/current/hdf/src/Makefile.am	                        (rev 0)
+++ packages/libhdf4/branches/upstream/current/hdf/src/Makefile.am	2007-05-15 09:53:05 UTC (rev 831)
@@ -0,0 +1,48 @@
+#############################################################################
+##                          Library to build                               ##
+#############################################################################
+
+lib_LIBRARIES = libdf.a
+
+FSOURCES = df24ff.f dfanf.c dfanff.f dff.c dfff.f dfpf.c dfpff.f dfr8f.c    \
+           dfr8ff.f dfsdf.c dfsdff.f dfufp2if.f dfutilf.c herrf.c hfilef.c  \
+           hfileff.f mfanf.c mfgrf.c mfgrff.f vattrf.c vattrff.f vgf.c vgff.f 
+CSOURCES = atom.c bitvect.c cdeflate.c cnbit.c cnone.c crle.c cskphuff.c    \
+           cszip.c df24.c df24f.c dfan.c dfcomp.c dfconv.c dfgr.c dfgroup.c \
+           dfimcomp.c dfjpeg.c dfkconv.c dfkcray.c dfkfuji.c dfknat.c       \
+           dfkswap.c dfkvms.c dfp.c dfr8.c dfrle.c dfsd.c dfstubs.c         \
+           dfufp2i.c dfunjpeg.c dfutil.c dynarray.c glist.c hbitio.c        \
+           hblocks.c hbuffer.c hchunks.c hcomp.c hcompri.c hdfalloc.c       \
+           herr.c hextelt.c hfile.c hfiledd.c hkit.c linklist.c mcache.c    \
+           mfan.c mfgr.c mstdio.c tbbt.c vattr.c vconv.c vg.c vgp.c vhi.c   \
+           vio.c vparse.c vrw.c vsfld.c
+
+CHEADERS = atom.h bitvect.h cdeflate.h cnbit.h cnone.h cskphuff.h crle.h    \
+           cszip.h df.h dfan.h dfi.h dfgr.h dfrig.h dfsd.h dfstubs.h        \
+           dfufp2i.h dynarray.h h4config.h hbitio.h hchunks.h hcomp.h       \
+           hcompi.h hconv.h hdf.h hdfi.h herr.h hfile.h hkit.h hlimits.h    \
+           hntdefs.h hproto.h  htags.h linklist.h mfan.h mfgr.h mstdio.h    \
+           tbbt.h vattr.h vg.h
+FHEADERS = dffunc.f90 hdf.f90 dffunc.inc hdf.inc
+
+if HDF_BUILD_FORTRAN
+libdf_a_SOURCES = $(CSOURCES) $(FSOURCES)
+include_HEADERS = $(CHEADERS) $(FHEADERS)
+else
+libdf_a_SOURCES = $(CSOURCES)
+include_HEADERS = $(CHEADERS)
+endif
+
+SUFFIXES = .inc .f90
+.inc.f90:
+	if test -f $<; then                                             \
+	  sed -e 's/^[cC]/!/' -e 's/^     [^ ]/     \&/' < $< > $*.f90; \
+	else                                                            \
+	  sed -e 's/^[cC]/!/' -e 's/^     [^ ]/     \&/' < $(srcdir)/$< > $*.f90; \
+	fi
+
+#############################################################################
+##                          And the cleanup                                ##
+#############################################################################
+
+DISTCLEANFILES = dffunc.f90 hdf.f90

Modified: packages/libhdf4/branches/upstream/current/hdf/src/Makefile.in
===================================================================
--- packages/libhdf4/branches/upstream/current/hdf/src/Makefile.in	2007-05-15 09:05:29 UTC (rev 830)
+++ packages/libhdf4/branches/upstream/current/hdf/src/Makefile.in	2007-05-15 09:53:05 UTC (rev 831)
@@ -1,501 +1,665 @@
-# ****************************************************************************
-# * NCSA HDF                                                                 *
-# * Software Development Group                                               *
-# * National Center for Supercomputing Applications                          *
-# * University of Illinois at Urbana-Champaign                               *
-# * 605 E. Springfield, Champaign IL 61820                                   *
-# *                                                                          *
-# * For conditions of distribution and use, see the accompanying             *
-# * hdf/COPYING file.                                                        *
-# *                                                                          *
-# ***************************************************************************
-#
-# $Id: Makefile.in,v 1.28 2000/08/29 11:04:27 acheng Exp $
-#
-# ##################################################################
-#
-#           MAKEFILE for creating the HDF library, libdf.a,
-#
-# This makefile creates the following FORTRAN and C interfaces 
-# for HDF in a library called "libdf.a": 
-#
-#              DFR8   (8-bit raster image sets)
-#              DF24   (24-bit raster image sets)
-#              DFP    (palettes)
-#              DFSD   (scientific data sets)
-#              DFAN   (annotations)
-#              V      (vsets)
-#
-# See the file INSTALL for further information on how to invoke
-# this makefile.
-#
-# This release of HDF marks the first use of a new set of lower
-# level routines.  The makefile also creates these interfaces,
-# which are available in C only.  These routines are categorized 
-# as follows:
-#
-#              H      (new lower level i/o)
-#              DF     (emulation of old lower level i/o routines)
-#              HD     (lower level utilities for developers)
-#              HE     (lower level error-handling)
-#              HD     (lower level utilities, for developers)
-#              DFK    (conversion routines)
-#
-# ##################################################################
-#
-#
-# PORTING INSTRUCTIONS
-# You must modify the lines marked "# ==>".
-#
-#
-# These values will typically be over ridden by values passed 
-#   down from the top level HDF makefile
-#
-#
-### Start of system configuration section. ####
-# Set shell so we know what it is
-SHELL = /bin/sh
+# Makefile.in generated by automake 1.7.7 from Makefile.am.
+# @configure_input@
 
-# 'srcdir' Gets set to directory this Makefile is found in
-srcdir = .
-TOP_SRCDIR = ../..
+# Copyright 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003
+# 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.
 
-prefix = $(TOP_SRCDIR)/NewHDF
+# 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.
 
-exec_prefix = $(prefix)
-tooldir = $(exec_prefix)/$(target)
+ at SET_MAKE@
 
-program_transform_name =
+#############################################################################
+#############################################################################
 
-datadir = $(prefix)/lib
-mandir = $(prefix)/man
-man1dir = $(mandir)/man1
-man2dir = $(mandir)/man2
-man3dir = $(mandir)/man3
-man4dir = $(mandir)/man4
-man5dir = $(mandir)/man5
-man6dir = $(mandir)/man6
-man7dir = $(mandir)/man7
-man8dir = $(mandir)/man8
-man9dir = $(mandir)/man9
-docdir = $(datadir)/doc
+srcdir = @srcdir@
+top_srcdir = @top_srcdir@
+VPATH = @srcdir@
+pkgdatadir = $(datadir)/@PACKAGE@
+pkglibdir = $(libdir)/@PACKAGE@
+pkgincludedir = $(includedir)/@PACKAGE@
+top_builddir = ../..
 
-INSTALL = ${TOP_SRCDIR}/install-sh -c
-INSTALL_PROGRAM = $(INSTALL)
-INSTALL_DATA = $(INSTALL) -m 644
+am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
+INSTALL = @INSTALL@
+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 = :
+host_triplet = @host@
+ACLOCAL = @ACLOCAL@
+AMDEP_FALSE = @AMDEP_FALSE@
+AMDEP_TRUE = @AMDEP_TRUE@
+AMTAR = @AMTAR@
+AR = @AR@
+AUTOCONF = @AUTOCONF@
+AUTOHEADER = @AUTOHEADER@
+AUTOMAKE = @AUTOMAKE@
+AWK = @AWK@
+CC = @CC@
+CCDEPMODE = @CCDEPMODE@
+CFLAGS = @CFLAGS@
+CPP = @CPP@
+CPPFLAGS = @CPPFLAGS@
+CXX = @CXX@
+CXXCPP = @CXXCPP@
+CXXDEPMODE = @CXXDEPMODE@
+CXXFLAGS = @CXXFLAGS@
+CYGPATH_W = @CYGPATH_W@
+DEFS = @DEFS@
+DEPDIR = @DEPDIR@
+DIFF = @DIFF@
+ECHO_C = @ECHO_C@
+ECHO_N = @ECHO_N@
+ECHO_T = @ECHO_T@
+EGREP = @EGREP@
+EXEEXT = @EXEEXT@
+F77 = @F77@
+FFLAGS = @FFLAGS@
+HDF_BUILD_FORTRAN_FALSE = @HDF_BUILD_FORTRAN_FALSE@
+HDF_BUILD_FORTRAN_TRUE = @HDF_BUILD_FORTRAN_TRUE@
+HDF_BUILD_XDR_FALSE = @HDF_BUILD_XDR_FALSE@
+HDF_BUILD_XDR_TRUE = @HDF_BUILD_XDR_TRUE@
+INSTALL_DATA = @INSTALL_DATA@
+INSTALL_PROGRAM = @INSTALL_PROGRAM@
+INSTALL_SCRIPT = @INSTALL_SCRIPT@
+INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
+LDFLAGS = @LDFLAGS@
+LEX = @LEX@
+LEXLIB = @LEXLIB@
+LEX_OUTPUT_ROOT = @LEX_OUTPUT_ROOT@
+LIBOBJS = @LIBOBJS@
+LIBS = @LIBS@
+LN_S = @LN_S@
+LTLIBOBJS = @LTLIBOBJS@
+MAINT = @MAINT@
+MAINTAINER_MODE_FALSE = @MAINTAINER_MODE_FALSE@
+MAINTAINER_MODE_TRUE = @MAINTAINER_MODE_TRUE@
+MAKEINFO = @MAKEINFO@
+NEQN = @NEQN@
+OBJEXT = @OBJEXT@
+PACKAGE = @PACKAGE@
+PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
+PACKAGE_NAME = @PACKAGE_NAME@
+PACKAGE_STRING = @PACKAGE_STRING@
+PACKAGE_TARNAME = @PACKAGE_TARNAME@
+PACKAGE_VERSION = @PACKAGE_VERSION@
+PATH_SEPARATOR = @PATH_SEPARATOR@
+RANLIB = @RANLIB@
+SET_MAKE = @SET_MAKE@
+SHELL = @SHELL@
+STRIP = @STRIP@
+TBL = @TBL@
+VERSION = @VERSION@
+YACC = @YACC@
+ac_ct_CC = @ac_ct_CC@
+ac_ct_CXX = @ac_ct_CXX@
+ac_ct_F77 = @ac_ct_F77@
+ac_ct_RANLIB = @ac_ct_RANLIB@
+ac_ct_STRIP = @ac_ct_STRIP@
+am__fastdepCC_FALSE = @am__fastdepCC_FALSE@
+am__fastdepCC_TRUE = @am__fastdepCC_TRUE@
+am__fastdepCXX_FALSE = @am__fastdepCXX_FALSE@
+am__fastdepCXX_TRUE = @am__fastdepCXX_TRUE@
+am__include = @am__include@
+am__leading_dot = @am__leading_dot@
+am__quote = @am__quote@
+bindir = @bindir@
+build = @build@
+build_alias = @build_alias@
+build_cpu = @build_cpu@
+build_os = @build_os@
+build_vendor = @build_vendor@
+datadir = @datadir@
+exec_prefix = @exec_prefix@
+host = @host@
+host_alias = @host_alias@
+host_cpu = @host_cpu@
+host_os = @host_os@
+host_vendor = @host_vendor@
+includedir = @includedir@
+infodir = @infodir@
+install_sh = @install_sh@
+libdir = @libdir@
+libexecdir = @libexecdir@
+localstatedir = @localstatedir@
+mandir = @mandir@
+oldincludedir = @oldincludedir@
+prefix = @prefix@
+program_transform_name = @program_transform_name@
+sbindir = @sbindir@
+sharedstatedir = @sharedstatedir@
+sysconfdir = @sysconfdir@
+target_alias = @target_alias@
 
-# /usr/local/bin/m4 (GNU version?)
-M4   = /usr/local/bin/m4
-# /usr/local/bin/perl (GNU version?)
-PERL = /usr/local/bin/perl
+lib_LIBRARIES = libdf.a
 
-# Name of achive randomizer, usually ranlib (use 'touch' if non-existant)
-RANLIB = ranlib
+FSOURCES = df24ff.f dfanf.c dfanff.f dff.c dfff.f dfpf.c dfpff.f dfr8f.c    \
+           dfr8ff.f dfsdf.c dfsdff.f dfufp2if.f dfutilf.c herrf.c hfilef.c  \
+           hfileff.f mfanf.c mfgrf.c mfgrff.f vattrf.c vattrff.f vgf.c vgff.f 
 
-# Name of library archiver and flags to send, default 'AR=ar', 'ARFLAGS=r'
-AR = ar
-ARFLAGS = r
+CSOURCES = atom.c bitvect.c cdeflate.c cnbit.c cnone.c crle.c cskphuff.c    \
+           cszip.c df24.c df24f.c dfan.c dfcomp.c dfconv.c dfgr.c dfgroup.c \
+           dfimcomp.c dfjpeg.c dfkconv.c dfkcray.c dfkfuji.c dfknat.c       \
+           dfkswap.c dfkvms.c dfp.c dfr8.c dfrle.c dfsd.c dfstubs.c         \
+           dfufp2i.c dfunjpeg.c dfutil.c dynarray.c glist.c hbitio.c        \
+           hblocks.c hbuffer.c hchunks.c hcomp.c hcompri.c hdfalloc.c       \
+           herr.c hextelt.c hfile.c hfiledd.c hkit.c linklist.c mcache.c    \
+           mfan.c mfgr.c mstdio.c tbbt.c vattr.c vconv.c vg.c vgp.c vhi.c   \
+           vio.c vparse.c vrw.c vsfld.c
 
-# Name of remove utility, default 'RM=/bin/rm', 'RMFLAGS=-f'
-RM = /bin/rm
-RMFLAGS = -f
 
-#Compilier defaults overriden by top level make
-AS = as
-CC = gcc
-CFLAGS = -ansi
-FC = f77
-FFLAGS=
+CHEADERS = atom.h bitvect.h cdeflate.h cnbit.h cnone.h cskphuff.h crle.h    \
+           cszip.h df.h dfan.h dfi.h dfgr.h dfrig.h dfsd.h dfstubs.h        \
+           dfufp2i.h dynarray.h h4config.h hbitio.h hchunks.h hcomp.h       \
+           hcompi.h hconv.h hdf.h hdfi.h herr.h hfile.h hkit.h hlimits.h    \
+           hntdefs.h hproto.h  htags.h linklist.h mfan.h mfgr.h mstdio.h    \
+           tbbt.h vattr.h vg.h
 
-# Set for document generation
-MAKEINFO = makeinfo
-TEXI2DVI = texi2dvi
+FHEADERS = dffunc.f90 hdf.f90 dffunc.inc hdf.inc
 
-# Directory in which to install scripts.
-bindir = $(exec_prefix)/bin
+ at HDF_BUILD_FORTRAN_TRUE@libdf_a_SOURCES = $(CSOURCES) $(FSOURCES)
+ at HDF_BUILD_FORTRAN_FALSE@libdf_a_SOURCES = $(CSOURCES)
+ at HDF_BUILD_FORTRAN_TRUE@include_HEADERS = $(CHEADERS) $(FHEADERS)
+ at HDF_BUILD_FORTRAN_FALSE@include_HEADERS = $(CHEADERS)
 
-# Directory in which to install library files.
-libdir = $(prefix)/lib
+SUFFIXES = .inc .f90
 
-# Directory in which to install include files.
-includedir = $(prefix)/include
 
-# Directory in which to install documentation info files.
-infodir = $(prefix)/info
+#############################################################################
+#############################################################################
+DISTCLEANFILES = dffunc.f90 hdf.f90
+subdir = hdf/src
+ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
+mkinstalldirs = $(SHELL) $(top_srcdir)/bin/mkinstalldirs
+CONFIG_HEADER = h4config.h
+CONFIG_CLEAN_FILES =
+LIBRARIES = $(lib_LIBRARIES)
 
-TARGETLIB = libdf.a
+libdf_a_AR = $(AR) cru
+libdf_a_LIBADD =
+am__libdf_a_SOURCES_DIST = atom.c bitvect.c cdeflate.c cnbit.c cnone.c \
+	crle.c cskphuff.c cszip.c df24.c df24f.c dfan.c dfcomp.c \
+	dfconv.c dfgr.c dfgroup.c dfimcomp.c dfjpeg.c dfkconv.c \
+	dfkcray.c dfkfuji.c dfknat.c dfkswap.c dfkvms.c dfp.c dfr8.c \
+	dfrle.c dfsd.c dfstubs.c dfufp2i.c dfunjpeg.c dfutil.c \
+	dynarray.c glist.c hbitio.c hblocks.c hbuffer.c hchunks.c \
+	hcomp.c hcompri.c hdfalloc.c herr.c hextelt.c hfile.c hfiledd.c \
+	hkit.c linklist.c mcache.c mfan.c mfgr.c mstdio.c tbbt.c \
+	vattr.c vconv.c vg.c vgp.c vhi.c vio.c vparse.c vrw.c vsfld.c \
+	df24ff.f dfanf.c dfanff.f dff.c dfff.f dfpf.c dfpff.f dfr8f.c \
+	dfr8ff.f dfsdf.c dfsdff.f dfufp2if.f dfutilf.c herrf.c hfilef.c \
+	hfileff.f mfanf.c mfgrf.c mfgrff.f vattrf.c vattrff.f vgf.c \
+	vgff.f
+am__objects_1 = atom.$(OBJEXT) bitvect.$(OBJEXT) cdeflate.$(OBJEXT) \
+	cnbit.$(OBJEXT) cnone.$(OBJEXT) crle.$(OBJEXT) \
+	cskphuff.$(OBJEXT) cszip.$(OBJEXT) df24.$(OBJEXT) \
+	df24f.$(OBJEXT) dfan.$(OBJEXT) dfcomp.$(OBJEXT) \
+	dfconv.$(OBJEXT) dfgr.$(OBJEXT) dfgroup.$(OBJEXT) \
+	dfimcomp.$(OBJEXT) dfjpeg.$(OBJEXT) dfkconv.$(OBJEXT) \
+	dfkcray.$(OBJEXT) dfkfuji.$(OBJEXT) dfknat.$(OBJEXT) \
+	dfkswap.$(OBJEXT) dfkvms.$(OBJEXT) dfp.$(OBJEXT) dfr8.$(OBJEXT) \
+	dfrle.$(OBJEXT) dfsd.$(OBJEXT) dfstubs.$(OBJEXT) \
+	dfufp2i.$(OBJEXT) dfunjpeg.$(OBJEXT) dfutil.$(OBJEXT) \
+	dynarray.$(OBJEXT) glist.$(OBJEXT) hbitio.$(OBJEXT) \
+	hblocks.$(OBJEXT) hbuffer.$(OBJEXT) hchunks.$(OBJEXT) \
+	hcomp.$(OBJEXT) hcompri.$(OBJEXT) hdfalloc.$(OBJEXT) \
+	herr.$(OBJEXT) hextelt.$(OBJEXT) hfile.$(OBJEXT) \
+	hfiledd.$(OBJEXT) hkit.$(OBJEXT) linklist.$(OBJEXT) \
+	mcache.$(OBJEXT) mfan.$(OBJEXT) mfgr.$(OBJEXT) mstdio.$(OBJEXT) \
+	tbbt.$(OBJEXT) vattr.$(OBJEXT) vconv.$(OBJEXT) vg.$(OBJEXT) \
+	vgp.$(OBJEXT) vhi.$(OBJEXT) vio.$(OBJEXT) vparse.$(OBJEXT) \
+	vrw.$(OBJEXT) vsfld.$(OBJEXT)
+am__objects_2 = df24ff.$(OBJEXT) dfanf.$(OBJEXT) dfanff.$(OBJEXT) \
+	dff.$(OBJEXT) dfff.$(OBJEXT) dfpf.$(OBJEXT) dfpff.$(OBJEXT) \
+	dfr8f.$(OBJEXT) dfr8ff.$(OBJEXT) dfsdf.$(OBJEXT) \
+	dfsdff.$(OBJEXT) dfufp2if.$(OBJEXT) dfutilf.$(OBJEXT) \
+	herrf.$(OBJEXT) hfilef.$(OBJEXT) hfileff.$(OBJEXT) \
+	mfanf.$(OBJEXT) mfgrf.$(OBJEXT) mfgrff.$(OBJEXT) \
+	vattrf.$(OBJEXT) vattrff.$(OBJEXT) vgf.$(OBJEXT) vgff.$(OBJEXT)
+ at HDF_BUILD_FORTRAN_TRUE@am_libdf_a_OBJECTS = $(am__objects_1) \
+ at HDF_BUILD_FORTRAN_TRUE@	$(am__objects_2)
+ at HDF_BUILD_FORTRAN_FALSE@am_libdf_a_OBJECTS = $(am__objects_1)
+libdf_a_OBJECTS = $(am_libdf_a_OBJECTS)
 
-#### ----- host and target specific makefile fragments come in here.-------
-### ------------------- end of makefile fragments -------------------------
+DEFAULT_INCLUDES =  -I. -I$(srcdir) -I.
+depcomp = $(SHELL) $(top_srcdir)/bin/depcomp
+am__depfiles_maybe = depfiles
+ at AMDEP_TRUE@DEP_FILES = ./$(DEPDIR)/atom.Po ./$(DEPDIR)/bitvect.Po \
+ at AMDEP_TRUE@	./$(DEPDIR)/cdeflate.Po ./$(DEPDIR)/cnbit.Po \
+ at AMDEP_TRUE@	./$(DEPDIR)/cnone.Po ./$(DEPDIR)/crle.Po \
+ at AMDEP_TRUE@	./$(DEPDIR)/cskphuff.Po ./$(DEPDIR)/cszip.Po \
+ at AMDEP_TRUE@	./$(DEPDIR)/df24.Po ./$(DEPDIR)/df24f.Po \
+ at AMDEP_TRUE@	./$(DEPDIR)/dfan.Po ./$(DEPDIR)/dfanf.Po \
+ at AMDEP_TRUE@	./$(DEPDIR)/dfcomp.Po ./$(DEPDIR)/dfconv.Po \
+ at AMDEP_TRUE@	./$(DEPDIR)/dff.Po ./$(DEPDIR)/dfgr.Po \
+ at AMDEP_TRUE@	./$(DEPDIR)/dfgroup.Po ./$(DEPDIR)/dfimcomp.Po \
+ at AMDEP_TRUE@	./$(DEPDIR)/dfjpeg.Po ./$(DEPDIR)/dfkconv.Po \
+ at AMDEP_TRUE@	./$(DEPDIR)/dfkcray.Po ./$(DEPDIR)/dfkfuji.Po \
+ at AMDEP_TRUE@	./$(DEPDIR)/dfknat.Po ./$(DEPDIR)/dfkswap.Po \
+ at AMDEP_TRUE@	./$(DEPDIR)/dfkvms.Po ./$(DEPDIR)/dfp.Po \
+ at AMDEP_TRUE@	./$(DEPDIR)/dfpf.Po ./$(DEPDIR)/dfr8.Po \
+ at AMDEP_TRUE@	./$(DEPDIR)/dfr8f.Po ./$(DEPDIR)/dfrle.Po \
+ at AMDEP_TRUE@	./$(DEPDIR)/dfsd.Po ./$(DEPDIR)/dfsdf.Po \
+ at AMDEP_TRUE@	./$(DEPDIR)/dfstubs.Po ./$(DEPDIR)/dfufp2i.Po \
+ at AMDEP_TRUE@	./$(DEPDIR)/dfunjpeg.Po ./$(DEPDIR)/dfutil.Po \
+ at AMDEP_TRUE@	./$(DEPDIR)/dfutilf.Po ./$(DEPDIR)/dynarray.Po \
+ at AMDEP_TRUE@	./$(DEPDIR)/glist.Po ./$(DEPDIR)/hbitio.Po \
+ at AMDEP_TRUE@	./$(DEPDIR)/hblocks.Po ./$(DEPDIR)/hbuffer.Po \
+ at AMDEP_TRUE@	./$(DEPDIR)/hchunks.Po ./$(DEPDIR)/hcomp.Po \
+ at AMDEP_TRUE@	./$(DEPDIR)/hcompri.Po ./$(DEPDIR)/hdfalloc.Po \
+ at AMDEP_TRUE@	./$(DEPDIR)/herr.Po ./$(DEPDIR)/herrf.Po \
+ at AMDEP_TRUE@	./$(DEPDIR)/hextelt.Po ./$(DEPDIR)/hfile.Po \
+ at AMDEP_TRUE@	./$(DEPDIR)/hfiledd.Po ./$(DEPDIR)/hfilef.Po \
+ at AMDEP_TRUE@	./$(DEPDIR)/hkit.Po ./$(DEPDIR)/linklist.Po \
+ at AMDEP_TRUE@	./$(DEPDIR)/mcache.Po ./$(DEPDIR)/mfan.Po \
+ at AMDEP_TRUE@	./$(DEPDIR)/mfanf.Po ./$(DEPDIR)/mfgr.Po \
+ at AMDEP_TRUE@	./$(DEPDIR)/mfgrf.Po ./$(DEPDIR)/mstdio.Po \
+ at AMDEP_TRUE@	./$(DEPDIR)/tbbt.Po ./$(DEPDIR)/vattr.Po \
+ at AMDEP_TRUE@	./$(DEPDIR)/vattrf.Po ./$(DEPDIR)/vconv.Po \
+ at AMDEP_TRUE@	./$(DEPDIR)/vg.Po ./$(DEPDIR)/vgf.Po \
+ at AMDEP_TRUE@	./$(DEPDIR)/vgp.Po ./$(DEPDIR)/vhi.Po \
+ at AMDEP_TRUE@	./$(DEPDIR)/vio.Po ./$(DEPDIR)/vparse.Po \
+ at AMDEP_TRUE@	./$(DEPDIR)/vrw.Po ./$(DEPDIR)/vsfld.Po
+COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \
+	$(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
+CCLD = $(CC)
+LINK = $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@
+F77COMPILE = $(F77) $(AM_FFLAGS) $(FFLAGS)
+F77LD = $(F77)
+F77LINK = $(F77LD) $(AM_FFLAGS) $(FFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@
+DIST_SOURCES = $(am__libdf_a_SOURCES_DIST)
+HEADERS = $(include_HEADERS)
 
-# ############# End of system configuration section. ###############
-HDF_FLAGS       = \
-        CC="$(CC)" \
-        CFLAGS="$(CFLAGS)" \
-        FC="$(FC)" \
-        FFLAGS="$(FFLAGS)" \
-        RANLIB="$(RANLIB)" \
-        AR="$(AR)" \
-        ARFLAGS="$(ARFLAGS)" \
-        RM="$(RM)" \
-        RMFLAGS="$(RMFLAGS)" \
-        MACHINE="$(MACHINE)" 
+DIST_COMMON = $(include_HEADERS) $(srcdir)/Makefile.in INSTALL \
+	Makefile.am h4config.h.in
+SOURCES = $(libdf_a_SOURCES)
 
-LOCAL_MACROS  = CC="$(CC)" \
-	CFLAGS="$(CFLAGS)" \
-	CPP="$(CPP)" \
-	CPPFLAGS="$(CPPFLAGS)" \
-	exec_prefix="$(exec_prefix)" \
-	FC="$(FC)" \
-	prefix="$(prefix)"
+all: h4config.h
+	$(MAKE) $(AM_MAKEFLAGS) all-am
 
-# ==> specify directories where to find inludes and library
-#     HDF library, and HDF utilities
-HDFINC= $(srcdir)/../src
-HDFLIB= $(srcdir)/../src
-HDFBIN= $(srcdir)/../bin
+.SUFFIXES:
+.SUFFIXES: .inc .f90 .c .f .o .obj
+$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ Makefile.am  $(top_srcdir)/configure.ac $(ACLOCAL_M4)
+	cd $(top_srcdir) && \
+	  $(AUTOMAKE) --foreign  hdf/src/Makefile
+Makefile: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.in  $(top_builddir)/config.status
+	cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)
 
-# ==> specify where to find the JPEG include files and library
-JPEGINC=$(srcdir)/../jpeg
-JPEGLIB=$(srcdir)/../jpeg
+h4config.h: stamp-h1
+	@if test ! -f $@; then \
+	  rm -f stamp-h1; \
+	  $(MAKE) stamp-h1; \
+	else :; fi
 
-# ==> specify where to find the Pablo include and source files 
-PABLO_HINC=$(srcdir)/../pablo
-PABLO_SRC=$(srcdir)/../pablo
+stamp-h1: $(srcdir)/h4config.h.in $(top_builddir)/config.status
+	@rm -f stamp-h1
+	cd $(top_builddir) && $(SHELL) ./config.status hdf/src/h4config.h
 
-# ==> specify where to find the FMPOOL include and source files 
-FMPOOL_INC=$(srcdir)/../fmpool
-FMPOOL_SRC=$(srcdir)/../fmpool
+$(srcdir)/h4config.h.in: @MAINTAINER_MODE_TRUE@ $(top_srcdir)/configure.ac $(ACLOCAL_M4) 
+	cd $(top_srcdir) && $(AUTOHEADER)
+	touch $(srcdir)/h4config.h.in
 
-# ==> specify where to find the gzip zlib include files and library
-ZLIBINC=$(srcdir)/../zlib
-ZLIBLIB=$(srcdir)/../zlib
+distclean-hdr:
+	-rm -f h4config.h stamp-h1
+libLIBRARIES_INSTALL = $(INSTALL_DATA)
+install-libLIBRARIES: $(lib_LIBRARIES)
+	@$(NORMAL_INSTALL)
+	$(mkinstalldirs) $(DESTDIR)$(libdir)
+	@list='$(lib_LIBRARIES)'; for p in $$list; do \
+	  if test -f $$p; then \
+	    f="`echo $$p | sed -e 's|^.*/||'`"; \
+	    echo " $(libLIBRARIES_INSTALL) $$p $(DESTDIR)$(libdir)/$$f"; \
+	    $(libLIBRARIES_INSTALL) $$p $(DESTDIR)$(libdir)/$$f; \
+	  else :; fi; \
+	done
+	@$(POST_INSTALL)
+	@list='$(lib_LIBRARIES)'; for p in $$list; do \
+	  if test -f $$p; then \
+	    p="`echo $$p | sed -e 's|^.*/||'`"; \
+	    echo " $(RANLIB) $(DESTDIR)$(libdir)/$$p"; \
+	    $(RANLIB) $(DESTDIR)$(libdir)/$$p; \
+	  else :; fi; \
+	done
 
-ALL_CFLAGS = -I. $(CFLAGS) $(FMPOOL_FLAGS) -I$(JPEGINC) -I$(ZLIBINC)
-LINTFLAGS=
-SHAR=shar
-ARCHIVE=hdf.shar
+uninstall-libLIBRARIES:
+	@$(NORMAL_UNINSTALL)
+	@list='$(lib_LIBRARIES)'; for p in $$list; do \
+	  p="`echo $$p | sed -e 's|^.*/||'`"; \
+	  echo " rm -f $(DESTDIR)$(libdir)/$$p"; \
+	  rm -f $(DESTDIR)$(libdir)/$$p; \
+	done
 
-MANIFEST = $(DISTFILES)
-DISTFILES = Makefile.in src.inc $(HDRS) $(CSRCS) $(FSRCS) $(FINCS) \
-	win32hdf.mak hdfnof.bld hdfnofw3.lbc hdfnofwc.lbc \
-	hdfw386.lbc hdfwcc.lbc makepc.msc makepc.386 makepc.wcc makewin.msc
+clean-libLIBRARIES:
+	-test -z "$(lib_LIBRARIES)" || rm -f $(lib_LIBRARIES)
+libdf.a: $(libdf_a_OBJECTS) $(libdf_a_DEPENDENCIES) 
+	-rm -f libdf.a
+	$(libdf_a_AR) libdf.a $(libdf_a_OBJECTS) $(libdf_a_LIBADD)
+	$(RANLIB) libdf.a
 
-#
-#include the source file definitions
-#
-include src.inc
+mostlyclean-compile:
+	-rm -f *.$(OBJEXT) core *.core
 
-HINCS = $(HDRS) $(FINCS)
+distclean-compile:
+	-rm -f *.tab.c
 
-#.SUFFIXES:
-.SUFFIXES: .c.o .f.o .installed .finstalled
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/atom.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/bitvect.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/cdeflate.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/cnbit.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/cnone.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/crle.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/cskphuff.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/cszip.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/df24.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/df24f.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/dfan.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/dfanf.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/dfcomp.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/dfconv.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/dff.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/dfgr.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/dfgroup.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/dfimcomp.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/dfjpeg.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/dfkconv.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/dfkcray.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/dfkfuji.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/dfknat.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/dfkswap.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/dfkvms.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/dfp.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/dfpf.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/dfr8.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/dfr8f.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/dfrle.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/dfsd.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/dfsdf.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/dfstubs.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/dfufp2i.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/dfunjpeg.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/dfutil.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/dfutilf.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/dynarray.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/glist.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/hbitio.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/hblocks.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/hbuffer.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/hchunks.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/hcomp.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/hcompri.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/hdfalloc.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/herr.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/herrf.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/hextelt.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/hfile.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/hfiledd.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/hfilef.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/hkit.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/linklist.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/mcache.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/mfan.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/mfanf.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/mfgr.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/mfgrf.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/mstdio.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/tbbt.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/vattr.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/vattrf.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/vconv.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/vg.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/vgf.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/vgp.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/vhi.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/vio.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/vparse.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/vrw.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/vsfld.Po at am__quote@
 
-# This rule causes ansi2knr to be invoked.
-#@ISANSICOM at .c.o:
-#@ISANSICOM@	./ansi2knr $(srcdir)/$*.c T$*.c
-#@ISANSICOM@	$(CC) $(CFLAGS) -c T$*.c
-#@ISANSICOM@	$(RM) $(RMFLAGS) T$*.c $*.o
-#@ISANSICOM@	$(MV) T$*.o $*.o
+.c.o:
+ at am__fastdepCC_TRUE@	if $(COMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" \
+ at am__fastdepCC_TRUE@	  -c -o $@ `test -f '$<' || echo '$(srcdir)/'`$<; \
+ at am__fastdepCC_TRUE@	then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; \
+ at am__fastdepCC_TRUE@	else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; \
+ at am__fastdepCC_TRUE@	fi
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	depfile='$(DEPDIR)/$*.Po' tmpdepfile='$(DEPDIR)/$*.TPo' @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	$(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCC_FALSE@	$(COMPILE) -c `test -f '$<' || echo '$(srcdir)/'`$<
 
-#ansi2knr: ansi2knr.c
-#	$(CC) $(CFLAGS) $(ANSI2KNRFLAGS) -o ansi2knr ansi2knr.c
+.c.obj:
+ at am__fastdepCC_TRUE@	if $(COMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" \
+ at am__fastdepCC_TRUE@	  -c -o $@ `if test -f '$<'; then $(CYGPATH_W) '$<'; else $(CYGPATH_W) '$(srcdir)/$<'; fi`; \
+ at am__fastdepCC_TRUE@	then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; \
+ at am__fastdepCC_TRUE@	else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; \
+ at am__fastdepCC_TRUE@	fi
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	depfile='$(DEPDIR)/$*.Po' tmpdepfile='$(DEPDIR)/$*.TPo' @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	$(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCC_FALSE@	$(COMPILE) -c `if test -f '$<'; then $(CYGPATH_W) '$<'; else $(CYGPATH_W) '$(srcdir)/$<'; fi`
 
-.c.o:
-	$(CC) $(CPPFLAGS) $(ALL_CFLAGS) -c $<
-
 .f.o:
-	$(FC) $(FFLAGS) -c $<
+	$(F77COMPILE) -c -o $@ `test -f '$<' || echo '$(srcdir)/'`$<
 
-# Rules to make Free format Fortran90 include files from F77 include files
-# 1) change all col. 1 [Cc] to '!'
-# 2) change all col. 6 continuation character to '&'
-#
-.SUFFIXES:	.inc .f90
+.f.obj:
+	$(F77COMPILE) -c -o $@ `if test -f '$<'; then $(CYGPATH_W) '$<'; else $(CYGPATH_W) '$(srcdir)/$<'; fi`
+uninstall-info-am:
+includeHEADERS_INSTALL = $(INSTALL_HEADER)
+install-includeHEADERS: $(include_HEADERS)
+	@$(NORMAL_INSTALL)
+	$(mkinstalldirs) $(DESTDIR)$(includedir)
+	@list='$(include_HEADERS)'; for p in $$list; do \
+	  if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
+	  f="`echo $$p | sed -e 's|^.*/||'`"; \
+	  echo " $(includeHEADERS_INSTALL) $$d$$p $(DESTDIR)$(includedir)/$$f"; \
+	  $(includeHEADERS_INSTALL) $$d$$p $(DESTDIR)$(includedir)/$$f; \
+	done
 
-.inc.f90:
-	sed -e 's/^[cC]/!/' -e 's/^     [^ ]/     \&/' < $< > $*.f90
+uninstall-includeHEADERS:
+	@$(NORMAL_UNINSTALL)
+	@list='$(include_HEADERS)'; for p in $$list; do \
+	  f="`echo $$p | sed -e 's|^.*/||'`"; \
+	  echo " rm -f $(DESTDIR)$(includedir)/$$f"; \
+	  rm -f $(DESTDIR)$(includedir)/$$f; \
+	done
 
-.PHONY : all nofortran libnostub clean distclean debug saber lint
+ETAGS = etags
+ETAGSFLAGS =
 
+CTAGS = ctags
+CTAGSFLAGS =
 
-all::		FORCE
-	@case "$(FC)" in \
-	NONE*|none*) \
-	    $(MAKE) $(MFLAGS) $(HDF_FLAGS) libnofortran ;; \
-	*) \
-	    $(MAKE) $(MFLAGS) $(HDF_FLAGS) rall ; \
-	esac
+tags: TAGS
 
-rall::         FORCE
-	@if test -z "$(FMPOOL_FLAGS)"; then \
-	  $(MAKE) $(MFLAGS) $(HDF_FLAGS) libdf.a; \
-	else		 \
-	  $(MAKE) $(MFLAGS) $(HDF_FLAGS) FMPOOL_FLAGS="$(FMPOOL_FLAGS) -I$(FMPOOL_INC)" libdf.a; \
-	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; } \
+	       END { for (i in files) print i; }'`; \
+	mkid -fID $$unique
 
-libnofortran::         FORCE
-	@if test -z "$(FMPOOL_FLAGS)"; then \
-	  $(MAKE) $(MFLAGS) $(HDF_FLAGS) nofort-libdf.a; \
-	else		 \
-	  $(MAKE) $(MFLAGS) $(HDF_FLAGS) FMPOOL_FLAGS="$(FMPOOL_FLAGS) -I$(FMPOOL_INC)" nofort-libdf.a; \
-	fi
+TAGS:  $(HEADERS) $(SOURCES) h4config.h.in $(TAGS_DEPENDENCIES) \
+		$(TAGS_FILES) $(LISP)
+	tags=; \
+	here=`pwd`; \
+	list='$(SOURCES) $(HEADERS) h4config.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; } \
+	       END { for (i in files) print i; }'`; \
+	test -z "$(ETAGS_ARGS)$$tags$$unique" \
+	  || $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
+	     $$tags $$unique
 
+ctags: CTAGS
+CTAGS:  $(HEADERS) $(SOURCES) h4config.h.in $(TAGS_DEPENDENCIES) \
+		$(TAGS_FILES) $(LISP)
+	tags=; \
+	here=`pwd`; \
+	list='$(SOURCES) $(HEADERS) h4config.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; } \
+	       END { for (i in files) print i; }'`; \
+	test -z "$(CTAGS_ARGS)$$tags$$unique" \
+	  || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
+	     $$tags $$unique
 
-libdf.a: $(COBJS) $(FOBJS)
-	-$(RM) $(RMFLAGS) libdf.a
-#	$(AR) $(ARFLAGS) libdf.a `lorder '$(COBJS) $(FOBJS)' | tsort `
-	$(AR) $(ARFLAGS) libdf.a $(COBJS) $(FOBJS)
-	$(RANLIB) libdf.a
-#	$(LD) -b -o libdf.sl $(COBJS) $(FOBJS)
+GTAGS:
+	here=`$(am__cd) $(top_builddir) && pwd` \
+	  && cd $(top_srcdir) \
+	  && gtags -i $(GTAGS_ARGS) $$here
 
-nofort-libdf.a: $(COBJS)
-	-$(RM) $(RMFLAGS) libdf.a
-#	$(AR) $(ARFLAGS) libdf.a `lorder $(COBJS) | tsort `
-	$(AR) $(ARFLAGS) libdf.a $(COBJS)
-	$(RANLIB) libdf.a
+distclean-tags:
+	-rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
+DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
 
-nofort-libdf-inst.a:   $(COBJS) $(PCOBJS)
-	-$(RM) $(RMFLAGS) libdf-inst.a libdf.a
-	$(AR) $(ARFLAGS) libdf-inst.a  $(COBJS) $(PCOBJS)
-	$(RANLIB) libdf-inst.a
-	ln -s libdf-inst.a libdf.a
+top_distdir = ../..
+distdir = $(top_distdir)/$(PACKAGE)-$(VERSION)
 
+distdir: $(DISTFILES)
+	@srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \
+	topsrcdirstrip=`echo "$(top_srcdir)" | sed 's|.|.|g'`; \
+	list='$(DISTFILES)'; for file in $$list; do \
+	  case $$file in \
+	    $(srcdir)/*) file=`echo "$$file" | sed "s|^$$srcdirstrip/||"`;; \
+	    $(top_srcdir)/*) file=`echo "$$file" | sed "s|^$$topsrcdirstrip/|$(top_builddir)/|"`;; \
+	  esac; \
+	  if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
+	  dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \
+	  if test "$$dir" != "$$file" && test "$$dir" != "."; then \
+	    dir="/$$dir"; \
+	    $(mkinstalldirs) "$(distdir)$$dir"; \
+	  else \
+	    dir=''; \
+	  fi; \
+	  if test -d $$d/$$file; then \
+	    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 $(LIBRARIES) $(HEADERS) h4config.h
 
-#libnostub nofortran: libnofortran .finstalled
-libnostub nofortran: libnofortran 
+installdirs:
+	$(mkinstalldirs) $(DESTDIR)$(libdir) $(DESTDIR)$(includedir)
+install: install-am
+install-exec: install-exec-am
+install-data: install-data-am
+uninstall: uninstall-am
 
-rebuild:
-	@$(MAKE) all $(HDF_FLAGS) FRC=force_rebuild
+install-am: all-am
+	@$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
 
-rebuildnofortran:
-	@$(MAKE) nofortran $(MFLAGS) $(HDF_FLAGS) FRC=force_rebuild
+installcheck: installcheck-am
+install-strip:
+	$(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
+	  INSTALL_STRIP_FLAG=-s \
+	  `test -z '$(STRIP)' || \
+	    echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
+mostlyclean-generic:
 
-# Leave this target blank with no actions, the rebuild macros above depend on it
-force_rebuild:
+clean-generic:
 
-$(FOBJS): $(FRC)
+distclean-generic:
+	-rm -f $(CONFIG_CLEAN_FILES)
+	-test -z "$(DISTCLEANFILES)" || rm -f $(DISTCLEANFILES)
 
-#debug: libdf.a .installed
-debug: libdf.a 
+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
 
-saber:
-	#load -D$(MACHINE) $(CSRCS) $(TSRCS) -lc
+clean-am: clean-generic clean-libLIBRARIES mostlyclean-am
 
-install: install-lib install-headers
+distclean: distclean-am
+	-rm -rf ./$(DEPDIR)
+	-rm -f Makefile
 
-install-includes: install-headers
+distclean-am: clean-am distclean-compile distclean-generic distclean-hdr \
+	distclean-tags
 
-install-lib: install-headers
-	$(INSTALL_DATA) $(TARGETLIB) $(libdir)/$(TARGETLIB).n
-	( cd $(libdir) ; $(RANLIB) $(libdir)/$(TARGETLIB).n )
-	mv -f $(libdir)/$(TARGETLIB).n $(libdir)/$(TARGETLIB)
+dvi: dvi-am
 
-install-headers: FORCE
-	@case "$(FC)" in \
-	NONE*|none*) \
-	    $(MAKE) $(MFLAGS) $(HDF_FLAGS) install-headers-nofort;; \
-	*) \
-	    $(MAKE) $(MFLAGS) $(HDF_FLAGS) install-headers-all; \
-	esac
+dvi-am:
 
-install-headers-all: $(HDRS) $(FINCS)
-	for p in $(HDRS) $(FINCS); do \
-	    $(INSTALL_DATA) \
-		`pwd`/$$p $(includedir)/$$p; \
-	done
+info: info-am
 
-install-headers-nofort: $(HDRS)
-	for p in $(HDRS); do \
-	    $(INSTALL_DATA) \
-		`pwd`/$$p $(includedir)/$$p; \
-	done
+info-am:
 
-.installed: libdf.a
-	-if (test \! -d $(HDFINC)) then (mkdir $(HDFINC) ) fi
-	-cp $(HDRS) $(FINCS) $(HDFINC)
-	-if (test \! -d $(HDFLIB)) then (mkdir $(HDFLIB) ) fi
-	-cp libdf.a $(HDFLIB)
-	-$(RANLIB) $(HDFLIB)/libdf.a
-	-touch .installed
+install-data-am: install-includeHEADERS
 
-.finstalled: libnofortran
-	-if (test \! -d $(HDFINC)) then (mkdir $(HDFINC) ) fi
-	-cp $(HDRS) $(FINCS) $(HDFINC)
-	-if (test \! -d $(HDFLIB)) then (mkdir $(HDFLIB) ) fi
-	-cp libdf.a $(HDFLIB)
-	-$(RANLIB) $(HDFLIB)/libdf.a
-	-touch .finstalled
+install-exec-am: install-libLIBRARIES
 
-depend:
-	makedepend -fMakefile -- $(CSRCS)
+install-info: install-info-am
 
-clean:
-	-$(RM) $(RMFLAGS) *.o $(F90INCS)
+install-man:
 
-distclean:
-	-$(RM) $(RMFLAGS) *.o libdf.a config.status Makefile $(F90INCS)
+installcheck-am:
 
-lint: $(SRCS) $(R8SRCS)
-	$(LINT) $(LINTFLAGS) $(SRCS)
+maintainer-clean: maintainer-clean-am
+	-rm -rf ./$(DEPDIR)
+	-rm -f Makefile
 
-TAGS: $(SRCS) $(HDRS)
-	etags $(SRCS) $(HDRS)
+maintainer-clean-am: distclean-am maintainer-clean-generic
 
-# for distribution creation
-distdir = $(TOP_SRCDIR)/$(PACKAGE)-$(VERSION)/$(curdir)
-curdir = hdf/src
-dist: $(DISTFILES)
-	@for file in $(DISTFILES); do \
-	  ln $(srcdir)/$$file $(distdir)/$$file 2> /dev/null \
-	    || { echo copying $$file instead; \
-	    cp -p $(srcdir)/$$file $(distdir)/$$file;}; \
-	done
+mostlyclean: mostlyclean-am
 
-# for auto remaking, see toplevel Makefile
-#Makefile: $(TOP_SRCDIR)/config.status Makefile.in
-#	CONFIG_FILES=$@ CONFIG_HEADERS= $(TOP_SRCDIR)/config.status
+mostlyclean-am: mostlyclean-compile mostlyclean-generic
 
-# Tell versions [3.59,3.63) of GNU make not to export all variables.
-# Otherwise a system limit (for SysV at least) may be exceeded.
-.NOEXPORT:
+pdf: pdf-am
 
-# The following dummy target is useful as a dependency to ensure that a
-# rule is always executed.
-#
-FORCE:
+pdf-am:
 
-help:
-	@echo ""
-	@echo "Make supports the following targets"
-	@echo "make help    - prints this usage section"
-	@echo "make all     - (DEFAULT) makes HDF library"
-	@echo "make libdf.a      - makes HDF library "
-	@echo "make libnofortran - makes HDF library excluding fortran support"
-	@echo "make rebuild      - rebuilds HDF library "
-	@echo "make rebuildnofortran - rebuilds HDF library excluding"
-	@echo "                        fortran support "
-	@echo "make install          - install HDF library, "
-	@echo "                        and includes " 
-	@echo "make install-includes - install HDF includes "
-	@echo "make clean     - cleans up HDF library(*.o,libdf.a,..)"
-	@echo "make distclean - cleans up HDF library including"
-	@echo "                 configuration(Makefiles,config.status,..)"
-	@echo ""
+ps: ps-am
 
-#$(ARCHIVE): ChangeLog Makefile $(SRCS) $(HDRS) $(TSRCS) $(USRCS)
-#       $(RM) $(RMFLAGS) $(ARCHIVE)
-#       $(SHAR) $(ARCHIVE) ChangeLog Makefile $(SRCS) $(HDRS) \
-#               $(TSRCS) $(USRCS)
+ps-am:
 
-#archive: $(ARCHIVE)
+uninstall-am: uninstall-includeHEADERS uninstall-info-am \
+	uninstall-libLIBRARIES
 
-#backup: ChangeLog Makefile $(SRCS) $(HDRS) $(TSRCS) $(USRCS)
-#       cp ChangeLog Makefile $(SRCS) $(HDRS) $(TSRCS) $(USRCS) $(BDIR)
+.PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \
+	clean-libLIBRARIES ctags distclean distclean-compile \
+	distclean-generic distclean-hdr distclean-tags distdir dvi \
+	dvi-am info info-am install install-am install-data \
+	install-data-am install-exec install-exec-am \
+	install-includeHEADERS install-info install-info-am \
+	install-libLIBRARIES install-man 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-includeHEADERS uninstall-info-am \
+	uninstall-libLIBRARIES
 
-# DO NOT DELETE THIS LINE -- make depend depends on it.
-
-hfile.o: hdf.h hdfi.h hbitio.h hcomp.h herr.h hproto.h
-hfile.o: hfile.h $(FRC)
-herr.o: hdf.h hlimits.h hdfi.h hbitio.h hcomp.h herr.h hproto.h
-herr.o: $(FRC)
-hblocks.o: hdf.h hlimits.h hdfi.h hbitio.h hcomp.h herr.h hproto.h
-hblocks.o: hfile.h $(FRC)
-hextelt.o: hdf.h hlimits.h hdfi.h hbitio.h hcomp.h herr.h hproto.h
-hextelt.o: hfile.h $(FRC)
-hkit.o: hdf.h hlimits.h hdfi.h hbitio.h
-hkit.o: hcomp.h herr.h hproto.h hfile.h hkit.h $(FRC)
-dfan.o: hdf.h hlimits.h hdfi.h hbitio.h hcomp.h herr.h hproto.h
-dfan.o: hfile.h dfan.h $(FRC)
-dfr8.o: hdf.h hlimits.h hdfi.h  hbitio.h hcomp.h herr.h hproto.h
-dfr8.o: dfrig.h $(FRC)
-dfcomp.o: hdf.h hlimits.h hdfi.h  hbitio.h hcomp.h herr.h hproto.h
-dfcomp.o: $(FRC)
-dfrle.o: hdf.h hlimits.h hdfi.h hbitio.h hcomp.h herr.h hproto.h
-dfrle.o: $(FRC)
-dfimcomp.o: hdf.h hlimits.h hdfi.h  hbitio.h hcomp.h herr.h
-dfimcomp.o: hproto.h $(FRC)
-dfjpeg.o: hdf.h hlimits.h hdfi.h hbitio.h hcomp.h herr.h hproto.h
-dfjpeg.o: $(FRC)
-dfunjpeg.o: hdf.h hlimits.h hdfi.h hbitio.h hcomp.h herr.h
-dfunjpeg.o: hproto.h $(FRC)
-dfp.o: hdf.h hlimits.h hdfi.h hbitio.h hcomp.h herr.h hproto.h
-dfp.o: hfile.h $(FRC)
-dfgr.o: hdf.h hlimits.h hdfi.h hbitio.h hcomp.h herr.h hproto.h
-dfgr.o: dfgr.h $(FRC)
-df24.o: hdf.h hlimits.h hdfi.h hbitio.h hcomp.h herr.h hproto.h
-df24.o: dfgr.h $(FRC)
-dfsd.o: hdf.h hlimits.h hdfi.h hbitio.h hcomp.h herr.h hproto.h
-dfsd.o: dfsd.h hfile.h $(FRC)
-dfgroup.o: hdf.h hlimits.h hdfi.h hbitio.h hcomp.h herr.h hproto.h
-dfgroup.o: hfile.h $(FRC)
-dfconv.o: hdf.h hlimits.h hdfi.h hbitio.h
-dfconv.o: hcomp.h herr.h hproto.h hconv.h $(FRC)
-dfufp2i.o: hdf.h hlimits.h hdfi.h hbitio.h
-dfufp2i.o: hcomp.h herr.h hproto.h dfufp2i.h dfsd.h $(FRC)
-vg.o: vg.h hdf.h hlimits.h hdfi.h  hbitio.h hcomp.h herr.h hproto.h
-vg.o: tbbt.h $(FRC)
-vrw.o: hdf.h hlimits.h hdfi.h hbitio.h hcomp.h herr.h hproto.h
-vrw.o: vg.h tbbt.h hfile.h $(FRC)
-vio.o: vg.h hdf.h hlimits.h hdfi.h  hbitio.h hcomp.h herr.h
-vio.o: hproto.h tbbt.h hfile.h $(FRC)
-vparse.o: vg.h hdf.h hlimits.h hdfi.h hbitio.h hcomp.h herr.h
-vparse.o: hproto.h tbbt.h $(FRC)
-vconv.o: vg.h hdf.h hlimits.h hdfi.h hbitio.h hcomp.h herr.h
-vconv.o: hproto.h tbbt.h $(FRC)
-vsfld.o: vg.h hdf.h hlimits.h hdfi.h hbitio.h hcomp.h herr.h
-vsfld.o: hproto.h tbbt.h $(FRC)
-vgp.o: vg.h hdf.h hlimits.h hdfi.h hbitio.h hcomp.h herr.h
-vgp.o: hproto.h tbbt.h hfile.h $(FRC)
-vhi.o: vg.h hdf.h hlimits.h hdfi.h hbitio.h hcomp.h herr.h
-vhi.o: hproto.h tbbt.h $(FRC)
-dfutil.o: hdf.h hlimits.h hdfi.h hbitio.h hcomp.h herr.h hproto.h
-dfutil.o: $(FRC)
-dfstubs.o: dfstubs.h df.h hdf.h hlimits.h hdfi.h hbitio.h hcomp.h
-dfstubs.o: herr.h hproto.h $(FRC)
-dfknat.o: hdf.h hlimits.h hdfi.h hbitio.h hcomp.h herr.h hproto.h
-dfknat.o: hconv.h $(FRC)
-dfkswap.o: hdf.h hlimits.h hdfi.h hbitio.h hcomp.h herr.h hproto.h
-dfkswap.o: hconv.h $(FRC)
-dfkcray.o: hdf.h hlimits.h hdfi.h hbitio.h hcomp.h herr.h hproto.h
-dfkcray.o: hconv.h $(FRC)
-dfkvms.o: hdf.h hlimits.h hdfi.h hbitio.h hcomp.h herr.h hproto.h
-dfkvms.o: hconv.h $(FRC)
-dfkconv.o: hdf.h hlimits.h hdfi.h hbitio.h hcomp.h herr.h hproto.h
-dfkconv.o: hconv.h $(FRC)
-dfkfuji.o: hdf.h hlimits.h hdfi.h hbitio.h hcomp.h herr.h hproto.h
-dfkfuji.o: hconv.h $(FRC)
-hbitio.o: hdf.h hlimits.h hdfi.h hbitio.h hcomp.h herr.h hproto.h
-hbitio.o: hfile.h $(FRC)
-tbbt.o:  hdf.h hlimits.h hdfi.h hbitio.h hcomp.h herr.h hproto.h
-tbbt.o: tbbt.h $(FRC)
-atom.o:  hdf.h hlimits.h hdfi.h hbitio.h hcomp.h herr.h hproto.h
-atom.o: atom.h $(FRC)
-hdfalloc.o: hdf.h hlimits.h hdfi.h  hbitio.h
-hdfalloc.o: hcomp.h herr.h hproto.h hfile.h $(FRC)
-hcomp.o: hdf.h hlimits.h hdfi.h hbitio.h hcomp.h herr.h hproto.h
-hcomp.o: hfile.h hcompi.h mstdio.h cnone.h crle.h cnbit.h cskphuff.h cdeflate.h $(FRC)
-crle.o: hdf.h hlimits.h hdfi.h hbitio.h hcomp.h herr.h hproto.h
-crle.o: hfile.h hcompi.h mstdio.h crle.h  $(FRC)
-cnbit.o: hdf.h hlimits.h hdfi.h hbitio.h hcomp.h herr.h hproto.h
-cnbit.o: hfile.h hcompi.h mstdio.h cnbit.h $(FRC)
-mstdio.o: hdf.h hlimits.h hdfi.h hbitio.h hcomp.h herr.h hproto.h
-mstdio.o: hfile.h hcompi.h mstdio.h $(FRC)
-cnone.o: hdf.h hlimits.h hdfi.h hbitio.h hcomp.h herr.h hproto.h
-cnone.o: hfile.h hcompi.h mstdio.h cnone.h $(FRC)
-cskphuff.o: hdf.h hlimits.h hdfi.h hbitio.h hcomp.h herr.h hproto.h
-cskphuff.o: hfile.h hcompi.h mstdio.h cskphuff.h $(FRC)
-cdeflate.o: hdf.h hlimits.h hdfi.h hbitio.h hcomp.h herr.h hproto.h
-cdeflate.o: hfile.h hcompi.h mstdio.h cdeflate.h $(FRC)
-hblocks.o: hdf.h hlimits.h hdfi.h hbitio.h hcomp.h herr.h hproto.h
-hblocks.o: hfile.h $(FRC)
-mfan.o: hdf.h hlimits.h hdfi.h hbitio.h hcomp.h herr.h hproto.h
-mfan.o: hfile.h mfan.h $(FRC)
-mfanf.o: hdf.h hlimits.h hdfi.h hbitio.h hcomp.h herr.h hproto.h
-mfanf.o: hfile.h mfan.h $(FRC)
-mfgr.o: hdf.h hlimits.h hdfi.h herr.h hproto.h hfile.h mfgr.h $(FRC)
-hchunks.o: hdf.h hlimits.h hdfi.h hbitio.h hcomp.h herr.h hproto.h
-hchunks.o: hfile.h hchunks.h mcache.h hqueue.h $(FRC)
-mcache.o: hdf.h hlimits.h hdfi.h hbitio.h hcomp.h herr.h hproto.h
-mcache.o: hfile.h mcache.h hqueue.h
-vattr.o:  hdf.h hlimits.h hdfi.h herr.h hproto.h vg.h
+.inc.f90:
+	if test -f $<; then                                             \
+	  sed -e 's/^[cC]/!/' -e 's/^     [^ ]/     \&/' < $< > $*.f90; \
+	else                                                            \
+	  sed -e 's/^[cC]/!/' -e 's/^     [^ ]/     \&/' < $(srcdir)/$< > $*.f90; \
+	fi
+# 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:

Modified: packages/libhdf4/branches/upstream/current/hdf/src/atom.c
===================================================================
--- packages/libhdf4/branches/upstream/current/hdf/src/atom.c	2007-05-15 09:05:29 UTC (rev 830)
+++ packages/libhdf4/branches/upstream/current/hdf/src/atom.c	2007-05-15 09:53:05 UTC (rev 831)
@@ -11,11 +11,11 @@
  ****************************************************************************/
 
 #ifdef RCSID
-static char RcsId[] = "@(#)$Revision: 1.7 $";
+static char RcsId[] = "@(#)$Revision: 1.9 $";
 #endif
 
 
-/* $Id: atom.c,v 1.7 1999/06/16 21:10:38 dwells Exp $ */
+/* $Id: atom.c,v 1.9 2005/01/09 20:53:43 mcgrath Exp $ */
 
 /*
 FILE
@@ -64,9 +64,6 @@
 #include "atom.h"
 #include <assert.h>
 
-#ifdef HAVE_PABLO
-#define PABLO_mask ID_atom_c
-#endif
 /* Private function prototypes */
 static atom_info_t *HAIfind_atom(atom_t atm);
 
@@ -96,10 +93,6 @@
     atom_group_t *grp_ptr=NULL;     /* ptr to the atomic group */
     intn ret_value=SUCCEED;
 
-#ifdef HAVE_PABLO
-    TRACE_ON(PABLO_mask, ID_HAinit_group);
-#endif /* HAVE_PABLO */
-
     HEclear();
     if((grp<=BADGROUP || grp>=MAXGROUP) && hash_size>0)
         HGOTO_ERROR(DFE_ARGS, FAIL);
@@ -110,16 +103,7 @@
 #endif /* ATOMS_CACHE_INLINE */
 
 #ifdef HASH_SIZE_POWER_2
-    /* If anyone knows a faster test for a power of two, please change this silly code -QAK */
-    if(!(hash_size==2 || hash_size==4 || hash_size==8 || hash_size==16
-            || hash_size==32 || hash_size==64 || hash_size==128 || hash_size==256
-            || hash_size==512 || hash_size==1024 || hash_size==2048
-            || hash_size==4096 || hash_size==8192 || hash_size==16374
-            || hash_size==32768 || hash_size==65536 || hash_size==131072
-            || hash_size==262144 || hash_size==524288 || hash_size==1048576
-            || hash_size==2097152 || hash_size==4194304 || hash_size==8388608
-            || hash_size==16777216 || hash_size==33554432 || hash_size==67108864
-            || hash_size==134217728 || hash_size==268435456))
+    if(hash_size & (hash_size-1))
         HGOTO_ERROR(DFE_ARGS, FAIL);
 #endif /* HASH_SIZE_POWER_2 */
 
@@ -160,9 +144,6 @@
     } /* end if */
 
   /* Normal function cleanup */
-#ifdef HAVE_PABLO
-    TRACE_OFF(PABLO_mask, ID_HAinit_group);
-#endif /* HAVE_PABLO */
 
   return ret_value;
 }   /* end HAinit_group() */
@@ -188,10 +169,6 @@
     atom_group_t *grp_ptr=NULL;     /* ptr to the atomic group */
     intn ret_value=SUCCEED;
 
-#ifdef HAVE_PABLO
-    TRACE_ON(PABLO_mask, ID_HAdestroy_group);
-#endif /* HAVE_PABLO */
-
     HEclear();
     if(grp<=BADGROUP || grp>=MAXGROUP)
         HGOTO_ERROR(DFE_ARGS, FAIL);
@@ -228,9 +205,6 @@
     } /* end if */
 
   /* Normal function cleanup */
-#ifdef HAVE_PABLO
-    TRACE_OFF(PABLO_mask, ID_HAdestroy_group);
-#endif /* HAVE_PABLO */
 
   return ret_value;
 }   /* end HAdestroy_group() */
@@ -262,10 +236,6 @@
     uintn hash_loc;                 /* new item's hash table location */
     atom_t ret_value=SUCCEED;
 
-#ifdef HAVE_PABLO
-    TRACE_ON(PABLO_mask, ID_HAregister_atom);
-#endif /* HAVE_PABLO */
-
     HEclear();
     if(grp<=BADGROUP || grp>=MAXGROUP)
         HGOTO_ERROR(DFE_ARGS, FAIL);
@@ -302,9 +272,6 @@
     } /* end if */
 
   /* Normal function cleanup */
-#ifdef HAVE_PABLO
-    TRACE_OFF(PABLO_mask, ID_HAregister_atom);
-#endif /* HAVE_PABLO */
 
   return ret_value;
 }   /* end HAregister_atom() */
@@ -337,10 +304,6 @@
     atom_info_t *atm_ptr=NULL;      /* ptr to the new atom */
     VOIDP ret_value=NULL;
 
-#ifdef HAVE_PABLO
-    TRACE_ON(PABLO_mask, ID_HAatom_object);
-#endif /* HAVE_PABLO */
-
     HEclear();
 
 #ifndef ATOMS_CACHE_INLINE
@@ -380,9 +343,6 @@
     } /* end if */
 
   /* Normal function cleanup */
-#ifdef HAVE_PABLO
-    TRACE_OFF(PABLO_mask, ID_HAatom_object);
-#endif /* HAVE_PABLO */
 
   return ret_value;
 }   /* end HAatom_object() */
@@ -404,10 +364,6 @@
     CONSTR(FUNC, "HAatom_group");	/* for HERROR */
     group_t ret_value=BADGROUP;
 
-#ifdef HAVE_PABLO
-    TRACE_ON(PABLO_mask, ID_HAatom_group);
-#endif /* HAVE_PABLO */
-
     HEclear();
     ret_value=ATOM_TO_GROUP(atm);
     if(ret_value<=BADGROUP || ret_value>=MAXGROUP)
@@ -420,9 +376,6 @@
     } /* end if */
 
   /* Normal function cleanup */
-#ifdef HAVE_PABLO
-    TRACE_OFF(PABLO_mask, ID_HAatom_group);
-#endif /* HAVE_PABLO */
 
   return ret_value;
 }   /* end HAatom_group() */
@@ -452,10 +405,6 @@
 #endif /* ATOMS_ARE_CACHED */
     VOIDP ret_value=NULL;
 
-#ifdef HAVE_PABLO
-    TRACE_ON(PABLO_mask, ID_HAremove_atom);
-#endif /* HAVE_PABLO */
-
     HEclear();
     grp=ATOM_TO_GROUP(atm);
     if(grp<=BADGROUP || grp>=MAXGROUP)
@@ -513,9 +462,6 @@
     } /* end if */
 
   /* Normal function cleanup */
-#ifdef HAVE_PABLO
-    TRACE_OFF(PABLO_mask, ID_HAremove_atom);
-#endif /* HAVE_PABLO */
 
   return ret_value;
 }   /* end HAremove_atom() */
@@ -545,10 +491,6 @@
     intn i;                         /* local counting variable */
     void * ret_value=NULL;
 
-#ifdef HAVE_PABLO
-    TRACE_ON(PABLO_mask, ID_HAsearch_atom);
-#endif /* HAVE_PABLO */
-
     HEclear();
     if(grp<=BADGROUP || grp>=MAXGROUP)
         HGOTO_ERROR(DFE_ARGS, NULL);
@@ -576,9 +518,6 @@
     } /* end if */
 
   /* Normal function cleanup */
-#ifdef HAVE_PABLO
-    TRACE_OFF(PABLO_mask, ID_HAsearch_atom);
-#endif /* HAVE_PABLO */
 
   return ret_value;
 }   /* end HAsearch_atom() */

Added: packages/libhdf4/branches/upstream/current/hdf/src/cszip.c
===================================================================
--- packages/libhdf4/branches/upstream/current/hdf/src/cszip.c	                        (rev 0)
+++ packages/libhdf4/branches/upstream/current/hdf/src/cszip.c	2007-05-15 09:53:05 UTC (rev 831)
@@ -0,0 +1,1080 @@
+/****************************************************************************
+ * NCSA HDF                                                                 *
+ * Software Development Group                                               *
+ * National Center for Supercomputing Applications                          *
+ * University of Illinois at Urbana-Champaign                               *
+ * 605 E. Springfield, Champaign IL 61820                                   *
+ *                                                                          *
+ * For conditions of distribution and use, see the accompanying             *
+ * hdf/COPYING file.                                                        *
+ *                                                                          *
+ ****************************************************************************/
+
+#ifdef RCSID
+static char RcsId[] = "@(#)$Revision: 1.9 $";
+#endif
+
+/* $Id: cszip.c,v 1.9 2005/01/08 20:12:34 mcgrath Exp $ */
+
+/* General HDF includes */
+
+#include "hdf.h"
+
+#ifdef H4_HAVE_LIBSZ
+#include "szlib.h"
+#endif
+
+#define CSZIP_MASTER
+#define CODER_CLIENT
+/* HDF compression includes */
+#include "hcompi.h"     /* Internal definitions for compression */
+
+/* internal defines */
+#define TMP_BUF_SIZE    8192    /* size of throw-away buffer */
+
+/* declaration of the functions provided in this module */
+PRIVATE int32 HCIcszip_staccess
+            (accrec_t * access_rec, int16 acc_mode);
+
+PRIVATE int32 HCIcszip_init
+            (accrec_t * access_rec);
+
+PRIVATE int32 HCIcszip_decode
+            (compinfo_t * info, int32 length, uint8 *buf);
+
+PRIVATE int32 HCIcszip_encode
+            (compinfo_t * info, int32 length, const uint8 *buf);
+
+PRIVATE int32 HCIcszip_term
+            (compinfo_t * info);
+
+/*--------------------------------------------------------------------------
+ NAME
+    HCIcszip_init -- Initialize a SZIP compressed data element.
+
+ USAGE
+    int32 HCIcszip_init(access_rec)
+    accrec_t *access_rec;   IN: the access record of the data element
+
+ RETURNS
+    Returns SUCCEED or FAIL
+
+ DESCRIPTION
+    Common code called by HCIcszip_staccess and HCIcszip_seek
+
+ GLOBAL VARIABLES
+ COMMENTS, BUGS, ASSUMPTIONS
+ EXAMPLES
+ REVISION LOG
+--------------------------------------------------------------------------*/
+PRIVATE int32
+HCIcszip_init(accrec_t * access_rec)
+{
+    CONSTR(FUNC, "HCIcszip_init");
+    compinfo_t *info;           /* special element information */
+    comp_coder_szip_info_t *szip_info;    /* ptr to SZIP info */
+
+#ifndef H4_HAVE_LIBSZ
+    HRETURN_ERROR(DFE_CANTCOMP, FAIL);
+#endif
+
+    info = (compinfo_t *) access_rec->special_info;
+    if (Hseek(info->aid, 0, DF_START) == FAIL)  /* seek to beginning of element */
+        HRETURN_ERROR(DFE_SEEKERROR, FAIL);
+
+    szip_info = &(info->cinfo.coder_info.szip_info);
+
+    /* Initialize SZIP state information */
+    szip_info->szip_state = SZIP_INIT;     /* start in initial state */
+    if (szip_info->buffer_size != 0) {
+        szip_info->buffer_size = 0;   /* offset into the file */
+        if (szip_info->buffer != NULL) {
+		HDfree(szip_info->buffer);
+		szip_info->buffer = NULL;
+        }
+    }
+    szip_info->offset = 0;   /* offset into the file */
+    szip_info->szip_dirty=SZIP_CLEAN;
+
+    return (SUCCEED);
+}   /* end HCIcszip_init() */
+
+/*--------------------------------------------------------------------------
+ NAME
+    HCIcszip_decode -- Decode SZIP compressed data into a buffer.
+
+ USAGE
+    int32 HCIcszip_decode(info,length,buf)
+    compinfo_t *info;   IN: the info about the compressed element
+    int32 length;       IN: number of bytes to read into the buffer
+    uint8 *buf;         OUT: buffer to store the bytes read
+
+ RETURNS
+    Returns SUCCEED or FAIL
+
+ DESCRIPTION
+    Common code called to decode SZIP data from the file.
+
+ GLOBAL VARIABLES
+ COMMENTS, BUGS, ASSUMPTIONS
+ EXAMPLES
+ REVISION LOG
+--------------------------------------------------------------------------*/
+PRIVATE int32
+HCIcszip_decode(compinfo_t * info, int32 length, uint8 *buf)
+{
+    CONSTR(FUNC, "HCIcszip_decode");
+    accrec_t *access_rec;
+    comp_coder_szip_info_t *szip_info;    /* ptr to SZIP info */
+    uint8 *in_buffer;
+    uint8 *out_buffer;
+    int32 in_length;
+    int32 out_length;
+    int bytes_per_pixel;
+    int32 rbytes;
+    uint16 tag,ref;
+    int32 len1;
+    int32 aid;
+    int32 status;
+    size_t size_out;
+    uint8 *cp;
+    int32 good_bytes;
+    int32 old_way;
+#ifdef H4_HAVE_LIBSZ
+    SZ_com_t sz_param;
+#endif
+
+#ifdef H4_HAVE_LIBSZ
+
+    szip_info = &(info->cinfo.coder_info.szip_info);
+    if (szip_info->szip_state == SZIP_INIT) {
+	/*  Load from disk, decode the data */
+
+	if ((access_rec = HAatom_object(info->aid)) == NULL)    /* get the access_rec pointer */
+	    HRETURN_ERROR(DFE_ARGS, FAIL);
+
+	/* Discover how much data must be read */
+	if(HTPinquire(access_rec->ddid,&tag,&ref,NULL,&in_length)==FAIL)
+		HRETURN_ERROR(DFE_INTERNAL, FAIL);
+
+        if (in_length == -1)
+		HRETURN_ERROR(DFE_INTERNAL, FAIL);
+
+        if (tag & 0x4000) {
+	    /* this is linked list -- get the length of the data */
+            aid = Hstartread(access_rec->file_id, tag, ref);
+            if (HDinqblockinfo(aid, &len1, NULL, NULL, NULL) == FAIL) {
+	       Hendaccess(aid);
+	       HRETURN_ERROR(DFE_INTERNAL, FAIL);
+            }
+            in_length = len1; 
+	    Hendaccess(aid);
+        }
+
+	old_way = (int)(szip_info->options_mask & SZ_H4_REV_2);
+	if (old_way == 0) {
+		/* special case: read data encoded in V4.2r0 */
+		old_way = 1;
+		good_bytes = in_length;
+                in_length = in_length+5;
+	        if ((in_buffer = (uint8 *) HDmalloc(in_length)) == NULL)
+    	           HRETURN_ERROR(DFE_NOSPACE, FAIL);
+		cp = in_buffer;
+		*cp = 0;
+		cp++;
+		INT32ENCODE(cp, good_bytes);
+	} else {
+		/*  V4.2r1: in_length is correct */
+		old_way = 0;
+	        if ((in_buffer = (uint8 *) HDmalloc(in_length)) == NULL)
+    	           HRETURN_ERROR(DFE_NOSPACE, FAIL);
+	}
+
+        /* Allocate memory for the uncompressed data */
+	bytes_per_pixel = (szip_info->bits_per_pixel + 7) >> 3;
+	if (bytes_per_pixel == 3)
+		bytes_per_pixel++;
+
+        out_length = szip_info->pixels * bytes_per_pixel;
+	if ((out_buffer = (uint8 *) HDmalloc(out_length)) == NULL)
+		HRETURN_ERROR(DFE_NOSPACE, FAIL);
+
+	/* Read the unompressed data */
+	if (old_way == 1) {
+		/* this is encoded in V4.2r0 */
+		/* the preamble isn't in the file, so read only the data */
+		if ((rbytes = Hread(info->aid, in_length-5, in_buffer+5)) == FAIL)
+		{
+			HDfree(out_buffer);
+			HDfree(in_buffer);
+			HRETURN_ERROR(DFE_READERROR, FAIL);
+		}
+		if (rbytes == 0 || rbytes != (in_length - 5)) {
+			/* is this possible? */
+			HDfree(out_buffer);
+			HDfree(in_buffer);
+			HRETURN_ERROR(DFE_READERROR, FAIL);
+		}
+	} else {
+		/* HDF4.2R1: read the data plus preamble */
+		if ((rbytes = Hread(info->aid, in_length, in_buffer)) == FAIL)
+		{
+			HDfree(out_buffer);
+			HDfree(in_buffer);
+			HRETURN_ERROR(DFE_READERROR, FAIL);
+		}
+		if (rbytes == 0 || rbytes != in_length) {
+			/* is this possible? */
+			HDfree(out_buffer);
+			HDfree(in_buffer);
+			HRETURN_ERROR(DFE_READERROR, FAIL);
+		}
+	}
+        cp = in_buffer;
+        cp++;
+        INT32DECODE(cp, good_bytes);
+	if (in_buffer[0] == 1) {
+           /* This byte means the data was not compressed -- just copy out */
+	    szip_info->szip_state = SZIP_RUN;
+	    HDmemcpy(out_buffer, in_buffer+5, good_bytes);
+	    szip_info->buffer = out_buffer;
+	    szip_info->buffer_pos = 0;
+	    szip_info->buffer_size = good_bytes;
+	    szip_info->offset = 0;
+	    if (good_bytes > length) {
+		/* partial read */
+		HDmemcpy(buf, in_buffer+5, length);
+	        szip_info->buffer_pos += length;
+	        szip_info->buffer_size -= length;
+	    } else {
+		/* read the whole data block to the user buffer */
+		HDmemcpy(buf, in_buffer+5, good_bytes);
+	        szip_info->buffer_pos += good_bytes;
+	        szip_info->buffer_size -= good_bytes;
+	    }
+	    szip_info->offset = szip_info->buffer_pos;
+	    HDfree(in_buffer);
+	    if (szip_info->buffer_size == 0) {
+		if (szip_info->buffer != NULL) {
+		   HDfree(szip_info->buffer);
+		   szip_info->buffer = NULL;
+		}
+	    }
+	    return (SUCCEED);
+        }
+
+	/* Decompress the data */
+     
+        /* set up the parameters */
+	sz_param.options_mask = (szip_info->options_mask & ~SZ_H4_REV_2);
+	sz_param.bits_per_pixel = szip_info->bits_per_pixel;
+	sz_param.pixels_per_block = szip_info->pixels_per_block;
+	sz_param.pixels_per_scanline = szip_info->pixels_per_scanline;
+	size_out = out_length;
+	if(SZ_OK!= (status = SZ_BufftoBuffDecompress(out_buffer, &size_out, (in_buffer+5), good_bytes, &sz_param)))
+         {
+		HDfree(out_buffer);
+		HDfree(in_buffer);
+		HRETURN_ERROR(DFE_CDECODE, FAIL);
+        }
+
+	if (size_out != out_length) {
+	   /* This should never happen?? */
+	   printf("status: %d ??bytes != out_length %d != %d\n",status,size_out,out_length);
+	}
+
+        /* The data is successfully decompressed. Put into the szip struct */
+	 HDfree(in_buffer);
+	 szip_info->szip_state = SZIP_RUN;
+	 szip_info->buffer = out_buffer;
+	 szip_info->buffer_pos = 0;
+	 szip_info->buffer_size = out_length;
+	 szip_info->offset = 0;
+    }
+
+   /* copy the data into the return buffer */
+    if (length > szip_info->buffer_size)
+    {	
+        /*  can't happen?? panic?? */
+	if (szip_info->buffer != NULL) {
+            HDfree(szip_info->buffer);
+	    szip_info->buffer = NULL;
+        } 
+        return (FAIL);
+    }
+
+    HDmemcpy(buf, szip_info->buffer + szip_info->buffer_pos, length);
+    szip_info->buffer_pos += length;
+    szip_info->buffer_size -= length;
+    szip_info->offset = szip_info->buffer_pos;
+
+    if (szip_info->buffer_size == 0) {
+       if (szip_info->buffer != NULL) {
+  	    HDfree(szip_info->buffer);
+	    szip_info->buffer = NULL;
+       }
+    }
+
+    return (SUCCEED);
+
+#else /* ifdef H4_HAVE_LIBSZ */
+
+    HRETURN_ERROR(DFE_CANTCOMP, FAIL);
+
+#endif /* H4_HAVE_LIBSZ */
+
+}   /* end HCIcszip_decode() */
+
+/*--------------------------------------------------------------------------
+ NAME
+    HCIcszip_encode -- Encode data from a buffer into SZIP compressed data
+
+ USAGE
+    int32 HCIcszip_encode(info,length,buf)
+    compinfo_t *info;   IN: the info about the compressed element
+    int32 length;       IN: number of bytes to store from the buffer
+    const uint8 *buf;         OUT: buffer to get the bytes from
+
+ RETURNS
+    Returns SUCCEED or FAIL
+
+ DESCRIPTION
+    Common code called to encode SZIP data into a file.
+
+ GLOBAL VARIABLES
+ COMMENTS, BUGS, ASSUMPTIONS
+ EXAMPLES
+ REVISION LOG
+--------------------------------------------------------------------------*/
+PRIVATE int32
+HCIcszip_encode(compinfo_t * info, int32 length, const uint8 *buf)
+{
+    CONSTR(FUNC, "HCIcszip_encode");
+    int bytes_per_pixel;
+    comp_coder_szip_info_t *szip_info;    /* ptr to SZIP info */
+    int32 buffer_size;
+
+#ifdef H4_HAVE_LIBSZ
+    if (SZ_encoder_enabled() == 0) 
+        HRETURN_ERROR(DFE_NOENCODER, FAIL);
+
+    szip_info = &(info->cinfo.coder_info.szip_info);
+    if (szip_info->szip_state == SZIP_INIT) {
+	/* Need to initialize */
+	bytes_per_pixel = (szip_info->bits_per_pixel + 7) >> 3;
+	if (bytes_per_pixel == 3)
+		bytes_per_pixel = 4;
+
+	buffer_size = szip_info->pixels * bytes_per_pixel;
+	if ((szip_info->buffer = HDmalloc(buffer_size)) == NULL)
+			HRETURN_ERROR(DFE_NOSPACE, FAIL);
+	
+	szip_info->buffer_size = buffer_size;
+	szip_info->buffer_pos = 0;
+	szip_info->szip_state = SZIP_RUN;
+    }
+
+    /* copy the data into the buffer.  This wil be written in 'term' function */
+    HDmemcpy(szip_info->buffer + szip_info->buffer_pos, buf, length);
+    szip_info->buffer_pos += length;
+    szip_info->buffer_size -= length;
+    szip_info->offset = szip_info->buffer_pos; 
+    szip_info->szip_dirty=SZIP_DIRTY;
+
+    return (SUCCEED);
+
+#else /* ifdef H4_HAVE_LIBSZ */
+
+    HRETURN_ERROR(DFE_CANTDECOMP, FAIL);
+
+#endif /* H4_HAVE_LIBSZ */
+
+}   /* end HCIcszip_encode() */
+
+/*--------------------------------------------------------------------------
+ NAME
+    HCIcszip_term -- Flush encoded data from internal buffer to SZIP compressed data
+
+ USAGE
+    int32 HCIcszip_term(info)
+    compinfo_t *info;   IN: the info about the compressed element
+
+ RETURNS
+    Returns SUCCEED or FAIL
+
+ DESCRIPTION
+    Common code called to flush SZIP data into a file.
+
+ GLOBAL VARIABLES
+ COMMENTS, BUGS, ASSUMPTIONS
+ EXAMPLES
+ REVISION LOG
+--------------------------------------------------------------------------*/
+PRIVATE int32
+HCIcszip_term(compinfo_t * info)
+{
+    CONSTR(FUNC, "HCIcszip_term");
+    comp_coder_szip_info_t *szip_info;    /* ptr to SZIP info */
+    uint8 *out_buffer;
+    uint8 *ob;
+    int32 out_buffer_size;
+    int bytes_per_pixel;
+    int32 current_size;
+    accrec_t *access_rec;
+    uint16 tag,ref;
+    int32 len1;
+    int32 aid;
+#ifdef H4_HAVE_LIBSZ
+    SZ_com_t sz_param;
+#endif
+    size_t size_out;
+    int32 status;
+    uint8 *cp;
+
+#ifdef H4_HAVE_LIBSZ
+
+    szip_info = &(info->cinfo.coder_info.szip_info);
+    if (szip_info->szip_state != SZIP_RUN)
+	return (SUCCEED); /* nothing to do */
+
+    if (szip_info->szip_dirty != SZIP_DIRTY) /* Should never happen?? */
+    {
+	    if (szip_info->buffer_size == 0) {
+                if (szip_info->buffer != NULL) {
+		    HDfree(szip_info->buffer);
+	            szip_info->buffer = NULL;
+                }
+            }
+	return (SUCCEED);
+    }
+
+    szip_info->szip_state = SZIP_TERM;
+
+    current_size = 0;
+    if ((access_rec = HAatom_object(info->aid)) == NULL)    /* get the access_rec pointer */
+		HRETURN_ERROR(DFE_INTERNAL, FAIL);
+
+    /* Discover how much data must be read */
+    if(HTPinquire(access_rec->ddid,&tag,&ref,NULL, &current_size)==FAIL)
+	HRETURN_ERROR(DFE_INTERNAL, FAIL);
+    if (tag & 0x4000) {
+    /* this is linked list -- get the length of the data */
+        aid = Hstartread(access_rec->file_id, tag, ref);
+        if (HDinqblockinfo(aid, &len1, NULL, NULL, NULL) == FAIL) 
+        {
+            Hendaccess(aid);
+	    HRETURN_ERROR(DFE_INTERNAL, FAIL);
+        }
+        current_size = len1; 
+	Hendaccess(aid);
+    }
+
+   /* Compute how much memory is needed to hold compressed data */
+    bytes_per_pixel = (szip_info->bits_per_pixel + 7) >> 3;
+    if (bytes_per_pixel == 3)
+	bytes_per_pixel = 4;
+
+    /* temporary buffer for compression -- leave extra space in case of
+          overflow in the SZIP algorithm. (This number corresponds to
+          the current internal buffer of szip lib.)  Sigh. */
+    /* allocate one byte to indicate when data is written uncompressed */
+    /* allocate 4 bytes to store the amount of data written:  
+        after compression may be less than the previous size  */
+    out_buffer_size = (szip_info->pixels * 2 * bytes_per_pixel) + 5;
+
+    /* heuristic for tiny data -- really shouldn't compress stuff this small,
+       but there isn't any way to prevent it from getting here */
+    if (out_buffer_size < 1024) out_buffer_size = 1024;
+    if ((out_buffer = HDmalloc(out_buffer_size)) == NULL)
+		HRETURN_ERROR(DFE_NOSPACE, FAIL);
+
+    /* set parms */
+    sz_param.options_mask = szip_info->options_mask;
+    sz_param.bits_per_pixel = szip_info->bits_per_pixel;
+    sz_param.pixels_per_block = szip_info->pixels_per_block;
+    sz_param.pixels_per_scanline = szip_info->pixels_per_scanline;
+    size_out = out_buffer_size - 5;
+
+    *out_buffer=0;
+    if(SZ_OK!= (status =SZ_BufftoBuffCompress((out_buffer+5), &size_out, szip_info->buffer, szip_info->buffer_pos, &sz_param)))
+    {
+       /* Compression Failed.  Analyse several cases, and clean up the mess */
+	if (size_out > out_buffer_size) {
+                /* Should never happen */
+		printf("PANIC: overwrote memory\n");fflush(stdout);
+	}
+	if (status == 2/*SZ_OUTBUF_FULL*/) {
+            /* SZIP internal overflow: data not successfully compressed */
+            /* Write out the uncompressed data */
+	    *out_buffer=1;  /* 1 = don't decompress */
+            cp = out_buffer;
+            cp++;
+            INT32ENCODE(cp, szip_info->buffer_pos);
+	    HDmemcpy((out_buffer+5), szip_info->buffer, szip_info->buffer_pos);
+	    HDfree(out_buffer);
+	    szip_info->szip_dirty=SZIP_CLEAN;
+			
+	    if (szip_info->buffer_size == 0) {
+	        if (szip_info->buffer != NULL)  {
+		    HDfree(szip_info->buffer);
+	            szip_info->buffer = NULL;
+                }
+            }
+	    return (SUCCEED);
+	 } 
+
+	  /* compress failed, return error */
+          szip_info->szip_dirty=SZIP_CLEAN;
+          HDfree(out_buffer);
+	  if (szip_info->buffer_size == 0) {
+	        if (szip_info->buffer != NULL)  {
+		    HDfree(szip_info->buffer);
+	            szip_info->buffer = NULL;
+                }
+          }
+	  HRETURN_ERROR(DFE_CENCODE, FAIL);
+	}
+
+        /* Compression Succeeded, write out the compressed data */
+
+	if (size_out >= out_buffer_size) 
+		printf("PANIC: overwrote memory but returned OK?\n");fflush(stdout);
+	if (size_out > (szip_info->pixels * bytes_per_pixel)) {
+            /* The compression succeeded, but is larger than the original data! */
+	    /*  Write the original data, discard the output  */
+	    *out_buffer=1;  /* 1 = don't decompress */
+            cp = out_buffer;
+            cp++;
+            INT32ENCODE(cp, szip_info->buffer_pos);
+	    HDmemcpy((out_buffer+5), szip_info->buffer, szip_info->buffer_pos);
+	    Hwrite(info->aid, (szip_info->buffer_pos+5), out_buffer);
+	    szip_info->szip_dirty=SZIP_CLEAN;
+	    HDfree(out_buffer);
+	    if (szip_info->buffer_size == 0) {
+	        if (szip_info->buffer != NULL) {
+		    HDfree(szip_info->buffer);
+	            szip_info->buffer = NULL;
+                }
+            }
+	    return (SUCCEED);
+	}
+
+      if ((current_size > 0) && ((size_out+5) < current_size)) {
+            /* SZIP freaks out if there is junk at the end of the good data */
+            /* need to have enough data to overwrite the existing data */
+            /* allocate a buffer, fill in the good data. The rest must be
+                zeroes */
+            if ((ob = HDmalloc(current_size)) == NULL)
+		HRETURN_ERROR(DFE_NOSPACE, FAIL);
+	    *ob=0;  /* data needs to be decompressed */
+            cp = ob;
+            cp++;
+            INT32ENCODE(cp, size_out); /* how much to decompress  (< total size)*/
+	    HDmemcpy((ob+5), out_buffer+5, size_out);
+	    Hwrite(info->aid, current_size, ob);  /* write out at least 'current_size' bytes */
+	    szip_info->szip_dirty=SZIP_CLEAN;
+	    HDfree(out_buffer);
+	    HDfree(ob);
+	    if (szip_info->buffer_size == 0) {
+	        if (szip_info->buffer != NULL)  {
+		    HDfree(szip_info->buffer);
+	            szip_info->buffer = NULL;
+                }
+            }
+	    return (SUCCEED);
+     } 
+
+      /* Finally!  Write the compressed data. Byte 0 is '0' */ 
+    *out_buffer=0;   /* data needs to be decompressed */
+    cp = out_buffer;
+    cp++;
+    INT32ENCODE(cp, size_out);   /* whole bufer needs to be decompressed */
+    status = Hwrite(info->aid, size_out+5, out_buffer);
+
+    szip_info->szip_dirty=SZIP_CLEAN;
+    if (szip_info->buffer_size == 0) {
+	if (szip_info->buffer != NULL) {
+	    HDfree(szip_info->buffer);
+	    szip_info->buffer = NULL;
+        }
+    }
+    HDfree(out_buffer);
+
+    return (SUCCEED);
+
+#else /* H4_HAVE_LIBSZ */
+
+    HRETURN_ERROR(DFE_CANTCOMP, FAIL);
+
+#endif /* H4_HAVE_LIBSZ */
+
+}   /* end HCIcszip_term() */
+
+/*--------------------------------------------------------------------------
+ NAME
+    HCIcszip_staccess -- Start accessing a SZIP compressed data element.
+
+ USAGE
+    int32 HCIcszip_staccess(access_rec, access)
+    accrec_t *access_rec;   IN: the access record of the data element
+    int16 access;           IN: the type of access wanted
+
+ RETURNS
+    Returns SUCCEED or FAIL
+
+ DESCRIPTION
+    Common code called by HCIcszip_stread and HCIcszip_stwrite
+
+ GLOBAL VARIABLES
+ COMMENTS, BUGS, ASSUMPTIONS
+ EXAMPLES
+ REVISION LOG
+--------------------------------------------------------------------------*/
+PRIVATE int32
+HCIcszip_staccess(accrec_t * access_rec, int16 acc_mode)
+{
+    CONSTR(FUNC, "HCIcszip_staccess");
+    compinfo_t *info;           /* special element information */
+
+#ifdef H4_HAVE_LIBSZ
+
+    info = (compinfo_t *) access_rec->special_info;
+
+    if (acc_mode == DFACC_READ)
+        info->aid = Hstartread(access_rec->file_id, DFTAG_COMPRESSED,
+                               info->comp_ref);
+    else
+	{
+	    if (SZ_encoder_enabled() == 0) 
+		HRETURN_ERROR(DFE_NOENCODER, FAIL);
+	    info->aid = Hstartaccess(access_rec->file_id, DFTAG_COMPRESSED,
+                       info->comp_ref, DFACC_RDWR|DFACC_APPENDABLE);
+	}
+
+    if (info->aid == FAIL)
+        HRETURN_ERROR(DFE_DENIED, FAIL);
+
+    return (HCIcszip_init(access_rec));  /* initialize the SZIP info */
+
+#else /* H4_HAVE_LIBSZ */
+
+    HRETURN_ERROR(DFE_DENIED, FAIL);
+
+#endif /* H4_HAVE_LIBSZ */
+
+}   /* end HCIcszip_staccess() */
+
+/*--------------------------------------------------------------------------
+ NAME
+    HCPcszip_stread -- start read access for compressed file
+
+ USAGE
+    int32 HCPcszip_stread(access_rec)
+    accrec_t *access_rec;   IN: the access record of the data element
+
+ RETURNS
+    Returns SUCCEED or FAIL
+
+ DESCRIPTION
+    Start read access on a compressed data element using a simple SZIP scheme.
+
+ GLOBAL VARIABLES
+ COMMENTS, BUGS, ASSUMPTIONS
+ EXAMPLES
+ REVISION LOG
+--------------------------------------------------------------------------*/
+int32
+HCPcszip_stread(accrec_t * access_rec)
+{
+    CONSTR(FUNC, "HCPcszip_stread");
+    int32       ret;
+
+    if ((ret = HCIcszip_staccess(access_rec, DFACC_READ)) == FAIL)
+        HRETURN_ERROR(DFE_CINIT, FAIL);
+    return (ret);
+}   /* HCPcszip_stread() */
+
+/*--------------------------------------------------------------------------
+ NAME
+    HCPcszip_stwrite -- start write access for compressed file
+
+ USAGE
+    int32 HCPcszip_stwrite(access_rec)
+    accrec_t *access_rec;   IN: the access record of the data element
+
+ RETURNS
+    Returns SUCCEED or FAIL
+
+ DESCRIPTION
+    Start write access on a compressed data element using a simple SZIP scheme.
+
+ GLOBAL VARIABLES
+ COMMENTS, BUGS, ASSUMPTIONS
+ EXAMPLES
+ REVISION LOG
+--------------------------------------------------------------------------*/
+int32
+HCPcszip_stwrite(accrec_t * access_rec)
+{
+    CONSTR(FUNC, "HCPcszip_stwrite");
+    int32       ret;
+
+    if ((ret = HCIcszip_staccess(access_rec, DFACC_WRITE)) == FAIL)
+        HRETURN_ERROR(DFE_CINIT, FAIL);
+    return (ret);
+}   /* HCPcszip_stwrite() */
+
+/*--------------------------------------------------------------------------
+ NAME
+    HCPcszip_seek -- Seek to offset within the data element
+
+ USAGE
+    int32 HCPcszip_seek(access_rec,offset,origin)
+    accrec_t *access_rec;   IN: the access record of the data element
+    int32 offset;       IN: the offset in bytes from the origin specified
+    intn origin;        IN: the origin to seek from [UNUSED!]
+
+ RETURNS
+    Returns SUCCEED or FAIL
+
+ DESCRIPTION
+    Seek to a position with a compressed data element.  The 'origin'
+    calculations have been taken care of at a higher level, it is an
+    un-used parameter.  The 'offset' is used as an absolute offset
+    because of this.
+
+    COMMENT:
+
+ GLOBAL VARIABLES
+ COMMENTS, BUGS, ASSUMPTIONS
+ EXAMPLES
+ REVISION LOG
+--------------------------------------------------------------------------*/
+int32
+HCPcszip_seek(accrec_t * access_rec, int32 offset, int origin)
+{
+    CONSTR(FUNC, "HCPcszip_seek");
+    compinfo_t *info;           /* special element information */
+    comp_coder_szip_info_t *szip_info;    /* ptr to SZIP info */
+    uint8      *tmp_buf;        /* pointer to throw-away buffer */
+
+    /* shut compiler up */
+    origin = origin;
+
+    info = (compinfo_t *) access_rec->special_info;
+    szip_info = &(info->cinfo.coder_info.szip_info);
+
+    if (offset < szip_info->offset)
+      {     /* need to seek from the beginning */
+          if (szip_info->szip_dirty == SZIP_DIRTY && szip_info->szip_state != SZIP_INIT)
+{
+              if (HCIcszip_term(info) == FAIL)
+                  HRETURN_ERROR(DFE_CTERM, FAIL);
+}
+          if (HCIcszip_init(access_rec) == FAIL)
+              HRETURN_ERROR(DFE_CINIT, FAIL);
+      }     /* end if */
+
+    if ((tmp_buf = (uint8 *) HDmalloc(TMP_BUF_SIZE)) == NULL)     /* get tmp buffer */
+        HRETURN_ERROR(DFE_NOSPACE, FAIL);
+
+    while (szip_info->offset + TMP_BUF_SIZE < offset)    /* grab chunks */
+    {
+        if (HCIcszip_decode(info, TMP_BUF_SIZE, tmp_buf) == FAIL)
+          {
+              HDfree(tmp_buf);
+              HRETURN_ERROR(DFE_CDECODE, FAIL)
+          }     /* end if */
+    }
+    if (szip_info->offset < offset)  /* grab the last chunk */
+    {
+        if (HCIcszip_decode(info, offset - szip_info->offset, tmp_buf) == FAIL)
+          {
+              HDfree(tmp_buf);
+              HRETURN_ERROR(DFE_CDECODE, FAIL)
+          }     /* end if */
+    }
+
+    HDfree(tmp_buf);
+    return (SUCCEED);
+}   /* HCPcszip_seek() */
+
+/*--------------------------------------------------------------------------
+ NAME
+    HCPcszip_read -- Read in a portion of data from a compressed data element.
+
+ USAGE
+    int32 HCPcszip_read(access_rec,length,data)
+    accrec_t *access_rec;   IN: the access record of the data element
+    int32 length;           IN: the number of bytes to read
+    void * data;             OUT: the buffer to place the bytes read
+
+ RETURNS
+    Returns the number of bytes read or FAIL
+
+ DESCRIPTION
+    Read in a number of bytes from a SZIP compressed data element.
+
+ GLOBAL VARIABLES
+ COMMENTS, BUGS, ASSUMPTIONS
+ EXAMPLES
+ REVISION LOG
+--------------------------------------------------------------------------*/
+int32
+HCPcszip_read(accrec_t * access_rec, int32 length, void * data)
+{
+    CONSTR(FUNC, "HCPcszip_read");
+    compinfo_t *info;           /* special element information */
+
+    info = (compinfo_t *) access_rec->special_info;
+
+    if (HCIcszip_decode(info, length, data) == FAIL)
+        HRETURN_ERROR(DFE_CDECODE, FAIL);
+
+#ifdef QAK
+printf("%s: *data=%u\n",FUNC,*(uint8 *)data);
+#endif /* QAK */
+    return (length);
+}   /* HCPcszip_read() */
+
+/*--------------------------------------------------------------------------
+ NAME
+    HCPcszip_write -- Write out a portion of data from a compressed data element.
+
+ USAGE
+    int32 HCPcszip_write(access_rec,length,data)
+    accrec_t *access_rec;   IN: the access record of the data element
+    int32 length;           IN: the number of bytes to write
+    void * data;             IN: the buffer to retrieve the bytes written
+
+ RETURNS
+    Returns the number of bytes written or FAIL
+
+ DESCRIPTION
+    Write out a number of bytes to a SZIP compressed data element.
+
+ GLOBAL VARIABLES
+ COMMENTS, BUGS, ASSUMPTIONS
+ EXAMPLES
+ REVISION LOG
+--------------------------------------------------------------------------*/
+int32
+HCPcszip_write(accrec_t * access_rec, int32 length, const void * data)
+{
+    CONSTR(FUNC, "HCPcszip_write");
+    compinfo_t *info;           /* special element information */
+    comp_coder_szip_info_t *szip_info;    /* ptr to SZIP info */
+
+    if (SZ_encoder_enabled() == 0) 
+	HRETURN_ERROR(DFE_NOENCODER, FAIL);
+    info = (compinfo_t *) access_rec->special_info;
+    szip_info = &(info->cinfo.coder_info.szip_info);
+
+    /* Don't allow random write in a dataset unless: */
+    /*  1 - append onto the end */
+    /*  2 - start at the beginning and rewrite (at least) the whole dataset */
+    if ((info->length != szip_info->offset)
+        && (szip_info->offset != 0 || length < info->length))
+        HRETURN_ERROR(DFE_UNSUPPORTED, FAIL);
+
+    if (HCIcszip_encode(info, length, data) == FAIL)
+        HRETURN_ERROR(DFE_CENCODE, FAIL);
+
+    return (length);
+}   /* HCPcszip_write() */
+
+/*--------------------------------------------------------------------------
+ NAME
+    HCPcszip_inquire -- Inquire information about the access record and data element.
+
+ USAGE
+    int32 HCPcszip_inquire(access_rec,pfile_id,ptag,pref,plength,poffset,pposn,
+            paccess,pspecial)
+    accrec_t *access_rec;   IN: the access record of the data element
+    int32 *pfile_id;        OUT: ptr to file id
+    uint16 *ptag;           OUT: ptr to tag of information
+    uint16 *pref;           OUT: ptr to ref of information
+    int32 *plength;         OUT: ptr to length of data element
+    int32 *poffset;         OUT: ptr to offset of data element
+    int32 *pposn;           OUT: ptr to position of access in element
+    int16 *paccess;         OUT: ptr to access mode
+    int16 *pspecial;        OUT: ptr to special code
+
+ RETURNS
+    Returns SUCCEED or FAIL
+
+ DESCRIPTION
+    Inquire information about the access record and data element.
+    [Currently a NOP].
+
+ GLOBAL VARIABLES
+ COMMENTS, BUGS, ASSUMPTIONS
+ EXAMPLES
+ REVISION LOG
+--------------------------------------------------------------------------*/
+int32
+HCPcszip_inquire(accrec_t * access_rec, int32 *pfile_id, uint16 *ptag,
+                uint16 *pref, int32 *plength, int32 *poffset,
+                int32 *pposn, int16 *paccess, int16 *pspecial)
+{
+    /* shut compiler up */
+    access_rec = access_rec;
+    pfile_id = pfile_id;
+    ptag = ptag;
+    pref = pref;
+    plength = plength;
+    poffset = poffset;
+    pposn = pposn;
+    paccess = paccess;
+    pspecial = pspecial;
+
+    return (SUCCEED);
+}   /* HCPcszip_inquire() */
+
+/*--------------------------------------------------------------------------
+ NAME
+    HCPcszip_endaccess -- Close the compressed data element
+
+ USAGE
+    int32 HCPcszip_endaccess(access_rec)
+    accrec_t *access_rec;   IN: the access record of the data element
+
+ RETURNS
+    Returns SUCCEED or FAIL
+
+ DESCRIPTION
+    Close the compressed data element and free encoding info.
+
+ GLOBAL VARIABLES
+ COMMENTS, BUGS, ASSUMPTIONS
+ EXAMPLES
+ REVISION LOG
+--------------------------------------------------------------------------*/
+intn
+HCPcszip_endaccess(accrec_t * access_rec)
+{
+    CONSTR(FUNC, "HCPcszip_endaccess");
+    compinfo_t *info;           /* special element information */
+    comp_coder_szip_info_t *szip_info;    /* ptr to SZIP info */
+
+    info = (compinfo_t *) access_rec->special_info;
+    szip_info = &(info->cinfo.coder_info.szip_info);
+
+    /* flush out SZIP buffer if there is unwritten data */
+    if (szip_info->szip_dirty == SZIP_DIRTY && szip_info->szip_state != SZIP_INIT)
+{
+        if (HCIcszip_term(info) == FAIL)
+            HRETURN_ERROR(DFE_CTERM, FAIL);
+    }
+
+    /* close the compressed data AID */
+    if (Hendaccess(info->aid) == FAIL)
+        HRETURN_ERROR(DFE_CANTCLOSE, FAIL);
+
+    return (SUCCEED);
+}   /* HCPcszip_endaccess() */
+
+
+/*--------------------------------------------------------------------------
+ NAME
+    HCPsetup_szip_parms -- Initialize SZIP parameters
+
+ USAGE
+    intn HCPcszip_setup_parms( comp_info *c_info, int32 nt, int32 ndims, int32 *dims, int32 *cdims)
+    comp_info *c_info;    IN/OUT: the szip compression params
+    int32 nt;             IN: the number type of the data
+    int32 ncomp;          IN: components in GR, 1 for SD
+    int32 ndims;          IN: The rank of the data
+    int32 *dims;          IN: the dimensions 
+    int32 *cdims;         IN: the dimensions of a chunk, if chunked, or NULL;
+
+ RETURNS
+    Returns SUCCEED or FAIL
+
+ DESCRIPTION
+    
+    Computes the SZIP parameters for dataset or chunk:
+       pixels -- total elements per compression
+       pixels_per_scanline 
+       bits_per_pixel
+    
+    This is called from SDsetcompress, SDsetchunk, GRsetcompress, GRsetchunk
+
+ GLOBAL VARIABLES
+ COMMENTS, BUGS, ASSUMPTIONS
+ EXAMPLES
+ REVISION LOG
+--------------------------------------------------------------------------*/
+intn 
+HCPsetup_szip_parms( comp_info *c_info, int32 nt, int32 ncomp, int32 ndims, int32 *dims, int32 *cdims)
+{
+    int32 scanline;
+    int32 npoints;
+    int32 sz;
+    int i;
+    intn       ret_value = SUCCEED;
+
+#ifdef H4_HAVE_LIBSZ
+    if (ndims <= 0) {
+          ret_value = FAIL;
+          goto done;
+    }
+
+    /* compute the number of elements in the compressed unit:
+        if chunked, compress each chunk. If not, compress whole 
+        object
+    */
+    npoints = ncomp; /* for GR24, treat as 3 D data for szip */
+    /* get npoints */
+    if (cdims == NULL ) {
+	   /* the whole array */
+        for (i = 0; i < ndims; i++) {
+	  npoints *= dims[i];
+        }
+    } else {
+	   /* elements in a single chunk */
+        for (i = 0; i < ndims; i++) {
+	  npoints *= cdims[i];
+        }
+    }
+    c_info->szip.pixels = npoints;
+
+    /* compute the pixels per scanline */
+	/* start with the n-1th dimension, allow for components of GR */
+    if (cdims == NULL ) {
+	scanline = dims[ndims - 1] * ncomp;
+    } else {
+	scanline = cdims[ndims-1] * ncomp;
+    }
+
+    /* apply restrictions to find the correct value */
+    if (scanline < c_info->szip.pixels_per_block) {
+	if (c_info->szip.pixels < c_info->szip.pixels_per_block) {
+	    ret_value = FAIL;
+	    goto done;
+	}
+	scanline = MIN((c_info->szip.pixels_per_block * SZ_MAX_BLOCKS_PER_SCANLINE), npoints);
+		
+    } else {
+	if (scanline <= SZ_MAX_PIXELS_PER_SCANLINE) {
+		scanline = MIN((c_info->szip.pixels_per_block * SZ_MAX_BLOCKS_PER_SCANLINE), scanline);
+	} else {
+		scanline = c_info->szip.pixels_per_block * SZ_MAX_BLOCKS_PER_SCANLINE;
+	}
+    }
+    c_info->szip.pixels_per_scanline = scanline;
+
+    /* compute the bits per pixel from the HDF NDT */
+    if (FAIL == (sz = DFKNTsize(nt | DFNT_NATIVE))) {
+            ret_value = FAIL;
+            goto done;
+    }
+    c_info->szip.bits_per_pixel = sz * 8;
+
+done:
+    return(ret_value);
+#else
+   /* szip not enabled */
+   return(FAIL);
+#endif
+}


Property changes on: packages/libhdf4/branches/upstream/current/hdf/src/cszip.c
___________________________________________________________________
Name: svn:executable
   + *

Added: packages/libhdf4/branches/upstream/current/hdf/src/cszip.h
===================================================================
--- packages/libhdf4/branches/upstream/current/hdf/src/cszip.h	                        (rev 0)
+++ packages/libhdf4/branches/upstream/current/hdf/src/cszip.h	2007-05-15 09:53:05 UTC (rev 831)
@@ -0,0 +1,110 @@
+
+/****************************************************************************
+  * NCSA HDF                                                                 *
+  * Software Development Group                                               *
+  * National Center for Supercomputing Applications                          *
+  * University of Illinois at Urbana-Champaign                               *
+  * 605 E. Springfield, Champaign IL 61820                                   *
+  *                                                                          *
+  * For conditions of distribution and use, see the accompanying             *
+  * hdf/COPYING file.                                                        *
+  *                                                                          *
+  ****************************************************************************/
+
+/* $Id: cszip.h,v 1.4 2005/01/03 22:18:40 mcgrath Exp $ */
+
+/*-----------------------------------------------------------------------------
+  * File:    cszip.h
+  * Purpose: Header file for szip encoding information.
+  * Dependencies: should only be included from hcompi.h
+  * Invokes: none
+  * Contents: Structures & definitions for szip encoding.  This header
+  *              should only be included in hcomp.c and cszip.c.
+  * Structure definitions:
+  * Constant definitions:
+  *---------------------------------------------------------------------------*/
+
+/* avoid re-inclusion */
+#ifndef __CSZIP_H
+#define __CSZIP_H
+
+#if defined c_plusplus || defined __cplusplus
+extern      "C"
+{
+#endif                          /* c_plusplus || __cplusplus */
+
+/*
+    ** from cszip.c
+  */
+
+     extern int32 HCPcszip_stread
+                 (accrec_t * rec);
+
+     extern int32 HCPcszip_stwrite
+                 (accrec_t * rec);
+
+     extern int32 HCPcszip_seek
+                 (accrec_t * access_rec, int32 offset, int origin);
+
+     extern int32 HCPcszip_inquire
+                 (accrec_t * access_rec, int32 *pfile_id, uint16 *ptag, 
+uint16 *pref,
+                int32 *plength, int32 *poffset, int32 *pposn, int16 *paccess,
+                  int16 *pspecial);
+
+     extern int32 HCPcszip_read
+                 (accrec_t * access_rec, int32 length, void * data);
+
+     extern int32 HCPcszip_write
+                 (accrec_t * access_rec, int32 length, const void * data);
+
+     extern intn HCPcszip_endaccess
+                 (accrec_t * access_rec);
+
+     extern intn HCPsetup_szip_parms
+                 ( comp_info *c_info, int32 nt, int32 ncomp, int32 ndims, int32 *dims, int32 *cdims);
+
+#if defined c_plusplus || defined __cplusplus
+}
+#endif                          /* c_plusplus || __cplusplus */
+
+
+/* SZIP [en|de]coding information */
+typedef struct
+{
+     int32       offset;    /* offset in the file */
+     uint8       *buffer;   /* buffer for storing SZIP bytes */
+     int32       buffer_pos;
+     int32       buffer_size;
+     int32 bits_per_pixel;
+     int32 options_mask;
+     int32 pixels;
+     int32 pixels_per_block;
+     int32 pixels_per_scanline;
+     enum
+       {
+           SZIP_INIT, SZIP_RUN,  SZIP_TERM
+       }
+     szip_state;                  /* state of the buffer storage */
+     enum { SZIP_CLEAN, SZIP_DIRTY } szip_dirty;
+}
+comp_coder_szip_info_t;
+
+#define SZ_H4_REV_2 0x10000   /* special bit to signal revised format */
+
+#ifndef CSZIP_MASTER
+extern funclist_t cszip_funcs;   /* functions to perform szip encoding */
+#else
+funclist_t  cszip_funcs =
+{                               /* functions to perform szip encoding */
+     HCPcszip_stread,
+     HCPcszip_stwrite,
+     HCPcszip_seek,
+     HCPcszip_inquire,
+     HCPcszip_read,
+     HCPcszip_write,
+     HCPcszip_endaccess
+};
+#endif
+
+#endif /* __CSZIP_H */


Property changes on: packages/libhdf4/branches/upstream/current/hdf/src/cszip.h
___________________________________________________________________
Name: svn:executable
   + *

Modified: packages/libhdf4/branches/upstream/current/hdf/src/df24.c
===================================================================
--- packages/libhdf4/branches/upstream/current/hdf/src/df24.c	2007-05-15 09:05:29 UTC (rev 830)
+++ packages/libhdf4/branches/upstream/current/hdf/src/df24.c	2007-05-15 09:53:05 UTC (rev 831)
@@ -11,10 +11,10 @@
  ****************************************************************************/
 
 #ifdef RCSID
-static char RcsId[] = "@(#)$Revision: 1.25 $";
+static char RcsId[] = "@(#)$Revision: 1.26 $";
 #endif
 
-/* $Id: df24.c,v 1.25 1999/06/16 21:10:40 dwells Exp $ */
+/* $Id: df24.c,v 1.26 2005/01/09 20:53:44 mcgrath Exp $ */
 
 /*-----------------------------------------------------------------------------
  * File:     df24.c
@@ -51,10 +51,6 @@
 #define LUT     0
 #define IMAGE   1
 
-#ifdef HAVE_PABLO
-#define PABLO_mask ID_df24_c
-#endif
-
 /*--------------------------------------------------------------------------
  NAME
     DF24getdims -- get dimensions of next image RIG
@@ -80,10 +76,6 @@
   intn        ncomps;
   intn       ret_value = SUCCEED;
 
-#ifdef HAVE_PABLO
-  TRACE_ON(PABLO_mask,ID_DF24getdims);
-#endif /* HAVE_PABLO */
-
   do
     {
       if (DFGRIgetdims(filename, pxdim, pydim, &ncomps, pil, IMAGE) < 0)
@@ -102,9 +94,6 @@
     } /* end if */
   /* Normal function cleanup */
 
-#ifdef HAVE_PABLO
-    TRACE_OFF(PABLO_mask, ID_DF24getdims);
-#endif /* HAVE_PABLO */
 
   return ret_value;
 }   /* end DF24getdims() */
@@ -129,16 +118,8 @@
 {
   intn ret_value;
 
-#ifdef HAVE_PABLO
-  TRACE_ON(PABLO_mask,ID_DF24reqil);
-#endif /* HAVE_PABLO */
-
   ret_value = (DFGRIreqil(il, IMAGE));
 
-#ifdef HAVE_PABLO
-    TRACE_OFF(PABLO_mask, ID_DF24reqil);
-#endif /* HAVE_PABLO */
-
   return ret_value;
 }   /* end DF24reqil() */
 
@@ -173,10 +154,6 @@
   uint16 compr_type;
   intn         ret_value = SUCCEED;
 
-#ifdef HAVE_PABLO
-    TRACE_ON(PABLO_mask,ID_DF24getimage);
-#endif /* HAVE_PABLO */
-
   HEclear();
 
   if (!filename || !*filename || !image || (xdim <= 0) || (ydim <= 0))
@@ -206,10 +183,6 @@
     } /* end if */
   /* Normal function cleanup */
 
-#ifdef HAVE_PABLO
-    TRACE_OFF(PABLO_mask,ID_DF24getimage);
-#endif /* HAVE_PABLO */
-
   return ret_value;
 }   /* end DF24getimage() */
 
@@ -234,17 +207,9 @@
 {
   intn ret_value;
 
-#ifdef HAVE_PABLO
-    TRACE_ON(PABLO_mask, ID_DF24setdims);
-#endif /* HAVE_PABLO */
-
   dimsset = 1;
   ret_value = (DFGRIsetdims(xdim, ydim, 3, IMAGE));
 
-#ifdef HAVE_PABLO
-    TRACE_OFF(PABLO_mask,ID_DF24setdims);
-#endif /* HAVE_PABLO */
-
   return ret_value;
 }   /* end DF24setdims() */
 
@@ -268,16 +233,8 @@
 {
   intn ret_value;
 
-#ifdef HAVE_PABLO
-  TRACE_ON(PABLO_mask,ID_DF24setil);
-#endif /* HAVE_PABLO */
-
   ret_value = (DFGRIsetil(il, IMAGE));
 
-#ifdef HAVE_PABLO
-    TRACE_OFF(PABLO_mask,ID_DF24setil);
-#endif /* HAVE_PABLO */
-
   return ret_value;
 }   /* end DF24setil() */
 
@@ -306,16 +263,8 @@
 {
   intn ret_value;
 
-#ifdef HAVE_PABLO
-    TRACE_ON(PABLO_mask, ID_DF24setcompress);
-#endif /* HAVE_PABLO */
-
   ret_value = (DFGRsetcompress(type, cinfo));
 
-#ifdef HAVE_PABLO
-    TRACE_OFF(PABLO_mask, ID_DF24setcompress);
-#endif /* HAVE_PABLO */
-
   return ret_value;
 }   /* end DF24setcompress() */
 
@@ -339,16 +288,8 @@
 {
   intn ret_value;
 
-#ifdef HAVE_PABLO
-  TRACE_ON(PABLO_mask, ID_DF24restart);
-#endif /* HAVE_PABLO */
-
   ret_value = (DFGRIrestart());
 
-#ifdef HAVE_PABLO
-  TRACE_OFF(PABLO_mask, ID_DF24restart);
-#endif /* HAVE_PABLO */
-
   return ret_value;
 }   /* end DF24restart() */
 
@@ -378,10 +319,6 @@
   CONSTR(FUNC, "DF24addimage");
   intn ret_value = SUCCEED;
 
-#ifdef HAVE_PABLO
-  TRACE_ON(PABLO_mask,ID_DF24addimage);
-#endif /* HAVE_PABLO */
-
   /* 0 == C */
   if (!dimsset && DFGRIsetdims(xdim, ydim, 3, IMAGE) == FAIL)
     HGOTO_ERROR(DFE_BADDIM, FAIL);
@@ -396,10 +333,6 @@
     } /* end if */
   /* Normal function cleanup */
 
-#ifdef HAVE_PABLO
-  TRACE_OFF(PABLO_mask, ID_DF24addimage);
-#endif /* HAVE_PABLO */
-
   return ret_value;
 }   /* end DF24addimage() */
 
@@ -429,10 +362,6 @@
   CONSTR(FUNC, "DF24putimage");
   intn ret_value = SUCCEED;
 
-#ifdef HAVE_PABLO
-    TRACE_ON(PABLO_mask, ID_DF24putimage);
-#endif /* HAVE_PABLO */
-
   /* 0 == C */
   if (!dimsset && DFGRIsetdims(xdim, ydim, 3, IMAGE) == FAIL)
     HGOTO_ERROR(DFE_BADDIM, FAIL);
@@ -447,10 +376,6 @@
     } /* end if */
   /* Normal function cleanup */
 
-#ifdef HAVE_PABLO
-    TRACE_OFF(PABLO_mask, ID_DF24putimage);
-#endif /* HAVE_PABLO */
-
   return ret_value;
 }   /* end DF24putimage() */
 
@@ -482,10 +407,6 @@
   uint8       GRtbuf[64];     /* local buffer to read the ID element into */
   intn        ret_value = SUCCEED;
 
-#ifdef HAVE_PABLO
-    TRACE_ON(PABLO_mask, ID_DF24nimages);
-#endif /* HAVE_PABLO */
-
   HEclear();
 
   /* should use reopen if same file as last time - more efficient */
@@ -541,10 +462,6 @@
 
     /* Normal function cleanup */
 
-#ifdef HAVE_PABLO
-    TRACE_OFF(PABLO_mask, ID_DF24nimages);
-#endif /* HAVE_PABLO */
-
   return ret_value;
 }   /* end DF24nimages() */
 
@@ -569,16 +486,8 @@
 {
   intn ret_value;
 
-#ifdef HAVE_PABLO
-    TRACE_ON(PABLO_mask, ID_DF24readref);
-#endif /* HAVE_PABLO */
-
   ret_value = (DFGRreadref(filename, ref));
 
-#ifdef HAVE_PABLO
-    TRACE_OFF(PABLO_mask, ID_DF24readref);
-#endif /* HAVE_PABLO */
-  
   return ret_value;
 }   /* end DF24readref() */
 
@@ -601,15 +510,7 @@
 {
   uint16 ret_value;
 
-#ifdef HAVE_PABLO
-    TRACE_ON(PABLO_mask, ID_DF24lastref );
-#endif /* HAVE_PABLO */
- 
   ret_value = (DFGRIlastref());
 
-#ifdef HAVE_PABLO
-    TRACE_OFF(PABLO_mask, ID_DF24lastref);
-#endif /* HAVE_PABLO */
-
   return ret_value;
 }   /* end DF24lastref() */

Modified: packages/libhdf4/branches/upstream/current/hdf/src/dfan.c
===================================================================
--- packages/libhdf4/branches/upstream/current/hdf/src/dfan.c	2007-05-15 09:05:29 UTC (rev 830)
+++ packages/libhdf4/branches/upstream/current/hdf/src/dfan.c	2007-05-15 09:53:05 UTC (rev 831)
@@ -11,10 +11,10 @@
  ****************************************************************************/
 
 #ifdef RCSID
-static char RcsId[] = "@(#)$Revision: 1.41 $";
+static char RcsId[] = "@(#)$Revision: 1.43 $";
 #endif
 
-/* $Id: dfan.c,v 1.41 1999/06/16 21:10:41 dwells Exp $ */
+/* $Id: dfan.c,v 1.43 2005/01/16 21:44:07 mcgrath Exp $ */
 
 /*-----------------------------------------------------------------------------
  * File:     dfan.c
@@ -58,13 +58,6 @@
 
 #include "hdf.h"
 #include "dfan.h"
-/****************************************************************************/
-/* define Pablo trace hooks                                                 */
-/****************************************************************************/
-#ifdef HAVE_PABLO
-#define PABLO_mask ID_dfan_c
-#endif
-
 PRIVATE uint16 Lastref = 0;     /* Last ref read/written */
 PRIVATE uint16 Next_label_ref = 0;  /* Next file label ref to read/write */
 PRIVATE uint16 Next_desc_ref = 0;   /* Next file desc ref to read/write */
@@ -119,16 +112,8 @@
 {
   int32 ret_value;
 
-#ifdef HAVE_PABLO
-  TRACE_ON (PABLO_mask,  ID_DFANgetlablen);
-#endif /* HAVE_PABLO */
-
   ret_value = (DFANIgetannlen(filename, tag, ref, DFAN_LABEL));
 
-#ifdef HAVE_PABLO
-    TRACE_OFF(PABLO_mask, ID_DFANgetlablen);
-#endif /* HAVE_PABLO */
-
   return ret_value;
 }
 
@@ -160,16 +145,8 @@
 {
   intn ret_value;
 
-#ifdef HAVE_PABLO
-  TRACE_ON (PABLO_mask,  ID_DFANgetlabel);
-#endif /* HAVE_PABLO */
-
   ret_value = (DFANIgetann(filename, tag, ref, (uint8 *) label, maxlen, DFAN_LABEL));
 
-#ifdef HAVE_PABLO
-    TRACE_OFF(PABLO_mask, ID_DFANgetlabel);
-#endif /* HAVE_PABLO */
-
   return ret_value;
 }
 
@@ -197,16 +174,8 @@
 {
   int32 ret_value;
 
-#ifdef HAVE_PABLO
-  TRACE_ON (PABLO_mask,  ID_DFANgetdesclen);
-#endif /* HAVE_PABLO */
-
   ret_value = (DFANIgetannlen(filename, tag, ref, DFAN_DESC));
 
-#ifdef HAVE_PABLO
-    TRACE_OFF(PABLO_mask, ID_DFANgetdesclen);
-#endif /* HAVE_PABLO */
-
   return ret_value;
 }
 
@@ -240,16 +209,8 @@
 {
   intn ret_value;
 
-#ifdef HAVE_PABLO
-  TRACE_ON (PABLO_mask,  ID_DFANgetdesc);
-#endif /* HAVE_PABLO */
-
   ret_value = (DFANIgetann(filename, tag, ref, (uint8 *) desc, maxlen, DFAN_DESC));
 
-#ifdef HAVE_PABLO
-    TRACE_OFF(PABLO_mask, ID_DFANgetdesc);
-#endif /* HAVE_PABLO */
-
   return ret_value;
 }
 
@@ -284,16 +245,8 @@
 {
   int32 ret_value;
 
-#ifdef HAVE_PABLO
-  TRACE_ON (PABLO_mask,  ID_DFANgetfidlen);
-#endif /* HAVE_PABLO */
-
   ret_value = (DFANIgetfannlen(file_id, DFAN_LABEL, isfirst));
 
-#ifdef HAVE_PABLO
-    TRACE_OFF(PABLO_mask, ID_DFANgetfidlen);
-#endif /* HAVE_PABLO */
-
   return ret_value;
 }
 
@@ -323,16 +276,8 @@
 {
   int32 ret_value;
 
-#ifdef HAVE_PABLO
-  TRACE_ON (PABLO_mask,  ID_DFANgetfid);
-#endif /* HAVE_PABLO */
-
   ret_value = (DFANIgetfann(file_id, label, maxlen, DFAN_LABEL, isfirst));
 
-#ifdef HAVE_PABLO
-    TRACE_OFF(PABLO_mask, ID_DFANgetfid);
-#endif /* HAVE_PABLO */
-
   return ret_value;
 }
 
@@ -363,16 +308,8 @@
 {
   int32 ret_value;
 
-#ifdef HAVE_PABLO
-  TRACE_ON (PABLO_mask,  ID_DFANgetfdslen);
-#endif /* HAVE_PABLO */
-
   ret_value = (DFANIgetfannlen(file_id, DFAN_DESC, isfirst));
 
-#ifdef HAVE_PABLO
-    TRACE_OFF(PABLO_mask, ID_DFANgetfdslen);
-#endif /* HAVE_PABLO */
-
   return ret_value;
 }
 
@@ -402,16 +339,8 @@
 {
   int32 ret_value;
 
-#ifdef HAVE_PABLO
-  TRACE_ON (PABLO_mask,  ID_DFANgetfds);
-#endif /* HAVE_PABLO */
-
   ret_value = (DFANIgetfann(file_id, desc, maxlen, DFAN_DESC, isfirst));
 
-#ifdef HAVE_PABLO
-    TRACE_OFF(PABLO_mask, ID_DFANgetfds);
-#endif /* HAVE_PABLO */
-
   return ret_value;
 }
 
@@ -444,17 +373,9 @@
 {
   intn ret_value;
 
-#ifdef HAVE_PABLO
-  TRACE_ON (PABLO_mask,  ID_DFANputlabel);
-#endif /* HAVE_PABLO */
-
   ret_value = (DFANIputann(filename, tag, ref, (uint8 *) label,
                            (int32) HDstrlen(label), DFAN_LABEL));
 
-#ifdef HAVE_PABLO
-    TRACE_OFF(PABLO_mask, ID_DFANputlabel);
-#endif /* HAVE_PABLO */
-
   return ret_value;
 }
 
@@ -487,16 +408,8 @@
 {
   intn ret_value;
 
-#ifdef HAVE_PABLO
-  TRACE_ON (PABLO_mask,  ID_DFANputdesc);
-#endif /* HAVE_PABLO */
-
   ret_value = (DFANIputann(filename, tag, ref, (uint8 *) desc, desclen, DFAN_DESC));
 
-#ifdef HAVE_PABLO
-    TRACE_OFF(PABLO_mask, ID_DFANputdesc);
-#endif /* HAVE_PABLO */
-  
   return ret_value;
 }
 
@@ -525,16 +438,8 @@
 {
   intn ret_value;
 
-#ifdef HAVE_PABLO
-  TRACE_ON (PABLO_mask,  ID_DFANaddfid);
-#endif /* HAVE_PABLO */
-
   ret_value = (DFANIaddfann(file_id, id, (int32) HDstrlen(id), DFAN_LABEL));
 
-#ifdef HAVE_PABLO
-    TRACE_OFF(PABLO_mask, ID_DFANaddfid);
-#endif /* HAVE_PABLO */
-
   return ret_value;
 }
 
@@ -562,16 +467,8 @@
 {
   intn ret_value;
 
-#ifdef HAVE_PABLO
-  TRACE_ON (PABLO_mask,  ID_DFANaddfds);
-#endif /* HAVE_PABLO */
-
   ret_value = (DFANIaddfann(file_id, desc, desclen, DFAN_DESC));
 
-#ifdef HAVE_PABLO
-    TRACE_OFF(PABLO_mask, ID_DFANaddfds);
-#endif /* HAVE_PABLO */
-
   return ret_value;
 }
 
@@ -599,16 +496,8 @@
 {
   uint16 ret_value;
 
-#ifdef HAVE_PABLO
-  TRACE_ON (PABLO_mask,  ID_DFANlastref);
-#endif /* HAVE_PABLO */
-
   ret_value = (Lastref);
 
-#ifdef HAVE_PABLO
-    TRACE_OFF(PABLO_mask, ID_DFANlastref);
-#endif /* HAVE_PABLO */
-
   return ret_value;
 }
 
@@ -648,16 +537,8 @@
 {
   intn ret_value;
 
-#ifdef HAVE_PABLO
-  TRACE_ON (PABLO_mask,  ID_DFANlablist);
-#endif /* HAVE_PABLO */
-
   ret_value = (DFANIlablist(filename, tag, reflist, (uint8 *) labellist,
                             listsize, maxlen, startpos, 0));
-#ifdef HAVE_PABLO
-    TRACE_OFF(PABLO_mask, ID_DFANlablist);
-#endif /* HAVE_PABLO */
-
   return ret_value;
 }
 
@@ -682,16 +563,8 @@
 {
   intn ret_value;
 
-#ifdef HAVE_PABLO
-  TRACE_ON (PABLO_mask,ID_DFANclear);
-#endif /* HAVE_PABLO */
-
   ret_value = DFANIclear();
 
-#ifdef HAVE_PABLO
-    TRACE_OFF(PABLO_mask, ID_DFANclear);
-#endif /* HAVE_PABLO */
-
   return ret_value;
 }
 
@@ -733,10 +606,20 @@
 
   for (p=DFANdir[0]; p!=NULL; p=q) {  /* free linked list space */
     q = p->next;
+    if (p->entries != NULL)
+	    HDfree((VOIDP) p->entries);
+    p->nentries=0;
+    p->entries = NULL;
+    p->next=NULL;
     HDfree((VOIDP) p);
   }
   for (p=DFANdir[1]; p!=NULL; p=q) {
     q = p->next;
+    if (p->entries != NULL)
+	    HDfree((VOIDP) p->entries);
+    p->nentries=0;
+    p->entries = NULL;
+    p->next=NULL;
     HDfree((VOIDP) p);
   }
   DFANdir[0] = DFANdir[1] = NULL;
@@ -807,11 +690,21 @@
       for (p = DFANdir[0]; p != NULL; p = q)
         {   /* free linked list space */
           q = p->next;
+	    if (p->entries != NULL)
+		    HDfree((VOIDP) p->entries);
+	    p->nentries=0;
+	    p->entries = NULL;
+	    p->next=NULL;
           HDfree((VOIDP) p);
         }
       for (p = DFANdir[1]; p != NULL; p = q)
         {
           q = p->next;
+	    if (p->entries != NULL)
+		    HDfree((VOIDP) p->entries);
+	    p->nentries=0;
+	    p->entries = NULL;
+	    p->next=NULL;
           HDfree((VOIDP) p);
         }
       DFANdir[0] = DFANdir[1] = NULL;
@@ -893,12 +786,15 @@
       if (nanns == 0)
         HGOTO_ERROR(DFE_INTERNAL, 0);
 
-      /* allocate directory space.  Note head struct includes 1 entry */
-      DFANdir[type] = (DFANdirhead *)
-        HDmalloc(((uint32) sizeof(DFANdirhead) +
-                  (size_t)(nanns - 1) * sizeof(DFANdirentry)));
+      /* allocate directory space, and space for entries. */
+      DFANdir[type] = (DFANdirhead *) HDmalloc((uint32) sizeof(DFANdirhead));
       if (DFANdir[type] == NULL)
         HGOTO_ERROR(DFE_NOSPACE, 0);
+      DFANdir[type]->entries = (DFANdirentry *)
+        HDmalloc( (size_t)nanns * sizeof(DFANdirentry));
+      if (DFANdir[type]->entries == NULL) 
+        HGOTO_ERROR(DFE_NOSPACE, 0);
+
       DFANdir[type]->next = NULL;
       DFANdir[type]->nentries = nanns;
 
@@ -1003,10 +899,12 @@
     }
 
   /* need new list or new node in list */
-  /* allocate directory space.  Note head struct includes 1 entry */
-  if ((q = (DFANdirhead *) HDmalloc((uint32) sizeof(DFANdirhead) +
-               (DFAN_DEFENTRIES - 1) * sizeof(DFANdirentry))) == NULL)
+  /* allocate directory space and space for entries. */
+  if ((q = (DFANdirhead *) HDmalloc((uint32) sizeof(DFANdirhead))) == NULL)
       HGOTO_ERROR(DFE_NOSPACE,FAIL);
+  q->entries = (DFANdirentry *) HDmalloc( DFAN_DEFENTRIES * sizeof(DFANdirentry));
+  if (q->entries == NULL)
+      HGOTO_ERROR(DFE_NOSPACE,FAIL);
 
   q->next = NULL;
   q->nentries = DFAN_DEFENTRIES;

Modified: packages/libhdf4/branches/upstream/current/hdf/src/dfan.h
===================================================================
--- packages/libhdf4/branches/upstream/current/hdf/src/dfan.h	2007-05-15 09:05:29 UTC (rev 830)
+++ packages/libhdf4/branches/upstream/current/hdf/src/dfan.h	2007-05-15 09:53:05 UTC (rev 831)
@@ -11,7 +11,7 @@
  *                                                                          *
  ****************************************************************************/
 
-/* $Id: dfan.h,v 1.9 1994/06/29 13:03:51 koziol Exp $ */
+/* $Id: dfan.h,v 1.10 2005/01/16 21:44:08 mcgrath Exp $ */
 
 /*------------------------------------------------------------------------------
  * File:    dfan.h
@@ -58,7 +58,7 @@
   {
       struct DFANdirhead *next; /* list element */
       int32       nentries;     /* Numer of entries */
-      DFANdirentry entries[1];  /* actually an arbitrary size array */
+      DFANdirentry *entries;  /* actually an arbitrary size array */
   }
 DFANdirhead;
 

Modified: packages/libhdf4/branches/upstream/current/hdf/src/dffunc.inc
===================================================================
--- packages/libhdf4/branches/upstream/current/hdf/src/dffunc.inc	2007-05-15 09:05:29 UTC (rev 830)
+++ packages/libhdf4/branches/upstream/current/hdf/src/dffunc.inc	2007-05-15 09:53:05 UTC (rev 831)
@@ -10,7 +10,7 @@
 C*                                                                          *
 C****************************************************************************
 C
-C $Id: dffunc.inc,v 1.39 2000/02/29 20:31:45 epourmal Exp $
+C $Id: dffunc.inc,v 1.41 2001/09/29 15:47:58 epourmal Exp $
 C
 C     dffunc.inc
 C
@@ -342,6 +342,8 @@
       external sfschnk
       integer  sfscompress
       external sfscompress
+      integer  sfgcompress
+      external sfgcompress
       integer  sfisrcrd
       external sfisrcrd
       integer  sfsblsz
@@ -516,6 +518,12 @@
       external vsfwrtc
       integer  vsfwrit
       external vsfwrit
+      external vsfsetblsz
+      integer  vsfsetblsz
+      external vsfsetnmbl 
+      integer  vsfsetnmbl
+      external vsfgetblinfo
+      integer  vsfgetblinfo
 C
 C     Declarations of return values for HDF Vdata Field Functions
 C
@@ -572,6 +580,8 @@
       external hishdff
       integer  hestringf
       external hestringf
+      integer heprntf
+      external heprntf
       
 
 C
@@ -642,8 +652,12 @@
       external mgrcchnk
       integer  mgscompress
       external mgscompress
+      integer  mggcompress
+      external mggcompress
       integer  mglt2rf
       external mglt2rf
+      integer  mggnluts
+      external mggnluts
 
 C
 C       Decls of ANxxx functions for Fortran multi-file AN interface

Modified: packages/libhdf4/branches/upstream/current/hdf/src/dfp.c
===================================================================
--- packages/libhdf4/branches/upstream/current/hdf/src/dfp.c	2007-05-15 09:05:29 UTC (rev 830)
+++ packages/libhdf4/branches/upstream/current/hdf/src/dfp.c	2007-05-15 09:53:05 UTC (rev 831)
@@ -11,10 +11,10 @@
  ****************************************************************************/
 
 #ifdef RCSID
-static char RcsId[] = "@(#)$Revision: 1.29 $";
+static char RcsId[] = "@(#)$Revision: 1.30 $";
 #endif
 
-/* $Id: dfp.c,v 1.29 1999/06/16 21:10:42 dwells Exp $ */
+/* $Id: dfp.c,v 1.30 2005/01/09 20:53:46 mcgrath Exp $ */
 
 /*-----------------------------------------------------------------------------
  * File:     dfp.c
@@ -33,12 +33,6 @@
  *---------------------------------------------------------------------------*/
 
 #include "hdf.h"
-/*****************************************************************************/
-/* Define Pablo Hooks                                                        */
-/*****************************************************************************/
-#ifdef HAVE_PABLO
-#define PABLO_mask ID_dfp_c
-#endif
 
 /* remember that '0' is invalid ref number */
 PRIVATE uint16 Readref = 0;
@@ -77,10 +71,6 @@
   int32       length;
   intn        ret_value = SUCCEED;
 
-#ifdef HAVE_PABLO
-  TRACE_ON(PABLO_mask,ID_DFPgetpal);
-#endif /* HAVE_PABLO */
-
   HEclear();
 
   if (!palette)
@@ -154,10 +144,6 @@
     } /* end if */
 
   /* Normal function cleanup */
-#ifdef HAVE_PABLO
-    TRACE_OFF(PABLO_mask, ID_DFPgetpal);
-#endif /* HAVE_PABLO */
-
   return ret_value;
 }   /* end DFPgetpal() */
 
@@ -190,10 +176,6 @@
   int32       file_id;
   intn        ret_value = SUCCEED;
 
-#ifdef HAVE_PABLO
-  TRACE_ON(PABLO_mask,ID_DFPputpal);
-#endif /* HAVE_PABLO */
-
   HEclear();
 
   if (!palette)
@@ -236,10 +218,6 @@
     } /* end if */
 
   /* Normal function cleanup */
-#ifdef HAVE_PABLO
-    TRACE_OFF(PABLO_mask, ID_DFPputpal);
-#endif /* HAVE_PABLO */
-
   return ret_value;
 }   /* end DFPputpal() */
 
@@ -264,16 +242,8 @@
 {
   intn ret_value;
 
-#ifdef HAVE_PABLO
-  TRACE_ON(PABLO_mask,ID_DFPaddpal);
-#endif /* HAVE_PABLO */
-
   ret_value = (DFPputpal(filename, palette, 0, "a"));
 
-#ifdef HAVE_PABLO
-    TRACE_OFF(PABLO_mask, ID_DFPaddpal);
-#endif /* HAVE_PABLO */
-
   return ret_value;
 }   /* end DFPaddpal() */
 
@@ -306,10 +276,6 @@
   intn        i, j;           /* local counting variable */
   intn        ret_value = SUCCEED;
 
-#ifdef HAVE_PABLO
-  TRACE_ON(PABLO_mask,ID_DFPnpals);
-#endif /* HAVE_PABLO */
-
   HEclear();
 
   /* should use reopen if same file as last time - more efficient */
@@ -393,10 +359,6 @@
     } /* end if */
 
   /* Normal function cleanup */
-#ifdef HAVE_PABLO
-    TRACE_OFF(PABLO_mask, ID_DFPnpals);
-#endif /* HAVE_PABLO */
-
   return ret_value;
 }   /* end DFPnpals() */
 
@@ -425,10 +387,6 @@
   int32       aid;
   intn        ret_value = SUCCEED;
 
-#ifdef HAVE_PABLO
-  TRACE_ON(PABLO_mask,ID_DFPreadref);
-#endif /* HAVE_PABLO */
-
   HEclear();
 
   if ((file_id = DFPIopen(filename, DFACC_READ)) == FAIL)
@@ -457,10 +415,6 @@
     } /* end if */
 
   /* Normal function cleanup */
-#ifdef HAVE_PABLO
-    TRACE_OFF(PABLO_mask, ID_DFPreadref);
-#endif /* HAVE_PABLO */
-
   return ret_value;
 }   /* end DFPreadref() */
 
@@ -486,18 +440,10 @@
 {
   intn ret_value = SUCCEED;
 
-#ifdef HAVE_PABLO
-  TRACE_ON(PABLO_mask,ID_DFPwriteref);
-#endif /* HAVE_PABLO */
-
   /* shut compiler up */
   filename = filename;
   Writeref = ref;
 
-#ifdef HAVE_PABLO
-    TRACE_OFF(PABLO_mask, ID_DFPwriteref);
-#endif /* HAVE_PABLO */
-
   return ret_value;
 }   /* end DFPwriteref() */
 
@@ -521,16 +467,8 @@
 {
   intn ret_value = SUCCEED;
 
-#ifdef HAVE_PABLO
-  TRACE_ON(PABLO_mask,ID_DFPrestart);
-#endif /* HAVE_PABLO */
-
   Lastfile[0] = '\0';
 
-#ifdef HAVE_PABLO
-    TRACE_OFF(PABLO_mask, ID_DFPrestart);
-#endif /* HAVE_PABLO */
-
   return ret_value;
 }   /* end DFPrestart() */
 
@@ -554,16 +492,8 @@
 {
   uint16 ret_value;
 
-#ifdef HAVE_PABLO
-  TRACE_ON(PABLO_mask,ID_DFPlastref);
-#endif /* HAVE_PABLO */
-
   ret_value = Lastref;
 
-#ifdef HAVE_PABLO
-    TRACE_OFF(PABLO_mask, ID_DFPlastref);
-#endif /* HAVE_PABLO */
-
   return ret_value;
 }   /* end DFPlastref() */
 

Modified: packages/libhdf4/branches/upstream/current/hdf/src/dfr8.c
===================================================================
--- packages/libhdf4/branches/upstream/current/hdf/src/dfr8.c	2007-05-15 09:05:29 UTC (rev 830)
+++ packages/libhdf4/branches/upstream/current/hdf/src/dfr8.c	2007-05-15 09:53:05 UTC (rev 831)
@@ -11,15 +11,11 @@
  ****************************************************************************/
 
 #ifdef RCSID
-static char RcsId[] = "@(#)$Revision: 1.44 $";
+static char RcsId[] = "@(#)$Revision: 1.45 $";
 #endif
 
-#ifdef HAVE_PABLO
-#define PABLO_mask ID_dfr8_c
-#endif
+/* $Id: dfr8.c,v 1.45 2005/01/09 20:53:47 mcgrath Exp $ */
 
-/* $Id: dfr8.c,v 1.44 1999/06/16 21:10:42 dwells Exp $ */
-
 /*-----------------------------------------------------------------------------
  * File:     dfr8.c
  * Purpose:  read and write 8-bit Raster Image Groups
@@ -185,10 +181,6 @@
   CONSTR(FUNC, "DFR8setcompress");
   intn   ret_value = SUCCEED;
 
-#ifdef HAVE_PABLO
- TRACE_ON(PABLO_mask,ID_DFR8setcompress); 
-#endif /* HAVE_PABLO */
-
   /* Perform global, one-time initialization */
   if (library_terminate == FALSE)
       if(DFR8Istart()==FAIL)
@@ -219,10 +211,6 @@
     } /* end if */
 
   /* Normal function cleanup */
-#ifdef HAVE_PABLO
- 	TRACE_OFF(PABLO_mask, ID_DFR8setcompress);
-#endif /* HAVE_PABLO */
-
   return ret_value;
 }   /* end DFR8setcompress() */
 
@@ -255,10 +243,6 @@
   int32       file_id=(-1);
   intn        ret_value = SUCCEED;
 
-#ifdef HAVE_PABLO
- 	TRACE_ON(PABLO_mask,ID_DFR8getdims);
-#endif /* HAVE_PABLO */
-
   HEclear();
 
   if (!filename || !*filename || !pxdim || !pydim)
@@ -291,10 +275,6 @@
   if(file_id!=(-1))
       Hclose(file_id);
 
-#ifdef HAVE_PABLO
-    TRACE_OFF(PABLO_mask, ID_DFR8getdims);
-#endif /* HAVE_PABLO */
-
   return ret_value;
 }   /* end DFR8getdims() */
 
@@ -333,10 +313,6 @@
   int32       file_id=(-1);
   intn        ret_value = SUCCEED;
 
-#ifdef HAVE_PABLO
-  TRACE_ON(PABLO_mask,ID_DFR8getimage);
-#endif /* HAVE_PABLO */
-
   HEclear();
 
   if (!filename || !*filename || !image || (xdim <= 0) || (ydim <= 0))
@@ -409,10 +385,6 @@
 
   /* Normal function cleanup */
 
-#ifdef HAVE_PABLO
-    TRACE_OFF(PABLO_mask, ID_DFR8getimage);
-#endif /* HAVE_PABLO */
-
   return ret_value;
 }   /* end DFR8getimage() */
 
@@ -442,10 +414,6 @@
   CONSTR(FUNC, "DFR8setpalette");
   intn     ret_value = SUCCEED;
 
-#ifdef HAVE_PABLO
-  TRACE_ON(PABLO_mask,ID_DFR8setpalette);
-#endif /* HAVE_PABLO */
-
   /* Perform global, one-time initialization */
   if (library_terminate == FALSE)
       if(DFR8Istart()==FAIL)
@@ -480,10 +448,6 @@
     } /* end if */
 
   /* Normal function cleanup */
-#ifdef HAVE_PABLO
-    TRACE_OFF(PABLO_mask, ID_DFR8setpalette);
-#endif /* HAVE_PABLO */
-
   return ret_value;
 }   /* end DFR8setpalette() */
 
@@ -698,10 +662,6 @@
     CONSTR(FUNC, "DFR8putimage");    /* for HERROR */
     intn ret_value;
 
-#ifdef HAVE_PABLO
-   TRACE_ON(PABLO_mask,ID_DFR8putimage);
-#endif /* HAVE_PABLO */
-
   /* Perform global, one-time initialization */
   if (library_terminate == FALSE)
       if(DFR8Istart()==FAIL)
@@ -717,10 +677,6 @@
 
   /* Normal function cleanup */
 
-#ifdef HAVE_PABLO
-    TRACE_OFF(PABLO_mask, ID_DFR8putimage);
-#endif /* HAVE_PABLO */
-
   return ret_value;
 }   /* end DFR8putimage() */
 
@@ -754,10 +710,6 @@
     CONSTR(FUNC, "DFR8addimage");    /* for HERROR */
     intn ret_value;
 
-#ifdef HAVE_PABLO
-  TRACE_ON(PABLO_mask,ID_DFR8addimage);
-#endif /* HAVE_PABLO */
-
   /* Perform global, one-time initialization */
   if (library_terminate == FALSE)
       if(DFR8Istart()==FAIL)
@@ -773,10 +725,6 @@
 
   /* Normal function cleanup */
 
-#ifdef HAVE_PABLO
-    TRACE_OFF(PABLO_mask, ID_DFR8addimage);
-#endif /* HAVE_PABLO */
-
   return ret_value;
 }   /* end DFR8addimage() */
 
@@ -1053,10 +1001,6 @@
   intn        i, j;           /* local counting variable */
   intn        ret_value = SUCCEED;
 
-#ifdef HAVE_PABLO
-  TRACE_ON(PABLO_mask,ID_DFR8nimages);
-#endif /* HAVE_PABLO */
-
   HEclear();
 
   /* Perform global, one-time initialization */
@@ -1193,10 +1137,6 @@
     } /* end if */
 
   /* Normal function cleanup */
-#ifdef HAVE_PABLO
-    TRACE_OFF(PABLO_mask, ID_DFR8nimages);
-#endif /* HAVE_PABLO */
-
   return ret_value;
 }   /* end DFR8nimages() */
 
@@ -1226,10 +1166,6 @@
   int32       aid;
   intn        ret_value = SUCCEED;
 
-#ifdef HAVE_PABLO
-  TRACE_ON(PABLO_mask,ID_DFR8readref);
-#endif /* HAVE_PABLO */
-
   HEclear();
 
   /* Perform global, one-time initialization */
@@ -1259,10 +1195,6 @@
     } /* end if */
 
   /* Normal function cleanup */
-#ifdef HAVE_PABLO
-    TRACE_OFF(PABLO_mask, ID_DFR8readref);
-#endif /* HAVE_PABLO */
-
   return ret_value;
 }   /* end DFR8readref() */
 
@@ -1289,10 +1221,6 @@
     CONSTR(FUNC, "DFR8writeref");    /* for HERROR */
   intn  ret_value = SUCCEED;
 
-#ifdef HAVE_PABLO
-  TRACE_ON(PABLO_mask,ID_DFR8writeref);
-#endif /* HAVE_PABLO */
-
   HEclear();
 
   /* Perform global, one-time initialization */
@@ -1312,10 +1240,6 @@
 
   /* Normal function cleanup */
 
-#ifdef HAVE_PABLO
-    TRACE_OFF(PABLO_mask, ID_DFR8writeref);
-#endif /* HAVE_PABLO */
-
   return ret_value;
 }   /* end DFR8writeref() */
 
@@ -1340,10 +1264,6 @@
     CONSTR(FUNC, "DFR8restart");    /* for HERROR */
     intn ret_value = SUCCEED;
 
-#ifdef HAVE_PABLO
-  TRACE_ON(PABLO_mask,ID_DFR8restart);
-#endif /* HAVE_PABLO */
-
   /* Perform global, one-time initialization */
   if (library_terminate == FALSE)
       if(DFR8Istart()==FAIL)
@@ -1359,10 +1279,6 @@
 
   /* Normal function cleanup */
 
-#ifdef HAVE_PABLO
-    TRACE_OFF(PABLO_mask, ID_DFR8restart);
-#endif /* HAVE_PABLO */
-
   return ret_value;
 }   /* end DFR8restart() */
 
@@ -1387,10 +1303,6 @@
     CONSTR(FUNC, "DFR8lastref");    /* for HERROR */
     uint16 ret_value;
 
-#ifdef HAVE_PABLO
-  TRACE_ON(PABLO_mask,ID_DFR8lastref);
-#endif /* HAVE_PABLO */
-
   /* Perform global, one-time initialization */
   if (library_terminate == FALSE)
       if(DFR8Istart()==FAIL)
@@ -1406,10 +1318,6 @@
 
   /* Normal function cleanup */
 
-#ifdef HAVE_PABLO
-    TRACE_OFF(PABLO_mask, ID_DFR8lastref);
-#endif /* HAVE_PABLO */
-
   return ret_value;
 }   /* end DFR8lastref() */
 
@@ -1729,10 +1637,6 @@
     CONSTR(FUNC, "DFR8Istart");    /* for HERROR */
     intn        ret_value = SUCCEED;
 
-#ifdef HAVE_PABLO
-  TRACE_ON(PABLO_mask,ID_DFR8Istart);
-#endif /* HAVE_PABLO */
-
     /* Don't call this routine again... */
     library_terminate = TRUE;
 
@@ -1747,10 +1651,6 @@
     } /* end if */
 
   /* Normal function cleanup */
-#ifdef HAVE_PABLO
-    TRACE_OFF(PABLO_mask, ID_DFR8Istart);
-#endif /* HAVE_PABLO */
-
     return(ret_value);
 } /* end DFR8Istart() */
 

Modified: packages/libhdf4/branches/upstream/current/hdf/src/dfsd.c
===================================================================
--- packages/libhdf4/branches/upstream/current/hdf/src/dfsd.c	2007-05-15 09:05:29 UTC (rev 830)
+++ packages/libhdf4/branches/upstream/current/hdf/src/dfsd.c	2007-05-15 09:53:05 UTC (rev 831)
@@ -11,15 +11,11 @@
  ****************************************************************************/
 
 #ifdef RCSID
-static char RcsId[] = "@(#)$Revision: 1.77 $";
+static char RcsId[] = "@(#)$Revision: 1.78 $";
 #endif
 
-/* $Id: dfsd.c,v 1.77 1999/06/16 21:10:44 dwells Exp $ */
+/* $Id: dfsd.c,v 1.78 2005/01/09 20:53:49 mcgrath Exp $ */
 
-#ifdef HAVE_PABLO
-#define PABLO_mask ID_dfsd_c
-#endif
- 
 /*-----------------------------------------------------------------------------
  File:  dfsd.c
 
@@ -241,10 +237,6 @@
   CONSTR(FUNC, "DFSDgetdims");
   intn       ret_value = SUCCEED;
 
-#ifdef HAVE_PABLO
-    TRACE_ON(PABLO_mask,ID_DFSDgetdims);
-#endif /* HAVE_PABLO */
-
   HEclear();  /* Clear error stack */
 
     /* Perform global, one-time initialization */
@@ -286,10 +278,6 @@
     } /* end if */
 
   /* Normal function cleanup */
-#ifdef HAVE_PABLO
-        TRACE_OFF(PABLO_mask, ID_DFSDgetdims);
-#endif /* HAVE_PABLO */
-
   return ret_value;
 }
 
@@ -320,10 +308,6 @@
   CONSTR(FUNC, "DFSDgetdatastrs");
   intn        ret_value = SUCCEED;
 
-#ifdef HAVE_PABLO
-    TRACE_ON(PABLO_mask,ID_DFSDgetdatastrs);
-#endif /* HAVE_PABLO */
-
   HEclear();  /* Clear error stack */
 
     /* Perform global, one-time initialization */
@@ -366,10 +350,6 @@
     } /* end if */
 
   /* Normal function cleanup */
-#ifdef HAVE_PABLO
-        TRACE_OFF(PABLO_mask, ID_DFSDgetdatastrs);
-#endif /* HAVE_PABLO */
-
   return ret_value;
 }
 
@@ -402,10 +382,6 @@
   CONSTR(FUNC, "DFSDgetdimstrs");
   intn        ret_value = SUCCEED;
 
-#ifdef HAVE_PABLO
-    TRACE_ON(PABLO_mask,ID_DFSDgetdimstrs);
-#endif /* HAVE_PABLO */
-
   HEclear();  /* Clear error stack */
 
     /* Perform global, one-time initialization */
@@ -449,10 +425,6 @@
     } /* end if */
 
   /* Normal function cleanup */
-#ifdef HAVE_PABLO
-        TRACE_OFF(PABLO_mask, ID_DFSDgetdimstrs);
-#endif /* HAVE_PABLO */
-
   return ret_value;
 }
 
@@ -481,10 +453,6 @@
   CONSTR(FUNC, "DFSDgetdatalen");
   intn      ret_value = SUCCEED;
 
-#ifdef HAVE_PABLO
-    TRACE_ON(PABLO_mask,ID_DFSDgetdatalen);
-#endif /* HAVE_PABLO */
-
   HEclear();  /* Clear error stack */
 
     /* Perform global, one-time initialization */
@@ -507,10 +475,6 @@
     } /* end if */
 
   /* Normal function cleanup */
-#ifdef HAVE_PABLO
-        TRACE_OFF(PABLO_mask, ID_DFSDgetdatalen);
-#endif /* HAVE_PABLO */
-
   return ret_value;
 }
 
@@ -537,10 +501,6 @@
   CONSTR(FUNC, "DFSDgetdimlen");
   intn ret_value = SUCCEED;
 
-#ifdef HAVE_PABLO
-    TRACE_ON(PABLO_mask,ID_DFSDgetdimlen);
-#endif /* HAVE_PABLO */
-
   HEclear();  /* Clear error stack */
 
     /* Perform global, one-time initialization */
@@ -565,10 +525,6 @@
     } /* end if */
 
   /* Normal function cleanup */
-#ifdef HAVE_PABLO
-        TRACE_OFF(PABLO_mask, ID_DFSDgetdimlen);
-#endif /* HAVE_PABLO */
-
   return ret_value;
 }
 
@@ -600,10 +556,6 @@
   CONSTR(FUNC, "DFSDgetdimscale");
   intn       ret_value = SUCCEED;
 
-#ifdef HAVE_PABLO
-    TRACE_ON(PABLO_mask,ID_DFSDgetdimscale);
-#endif /* HAVE_PABLO */
-
   HEclear();  /* Clear error stack */
 
     /* Perform global, one-time initialization */
@@ -646,10 +598,6 @@
     } /* end if */
 
   /* Normal function cleanup */
-#ifdef HAVE_PABLO
-        TRACE_OFF(PABLO_mask, ID_DFSDgetdimscale);
-#endif /* HAVE_PABLO */
-
   return ret_value;
 }
 
@@ -687,10 +635,6 @@
   CONSTR(FUNC, "DFSDgetrange");
   int         ret_value = SUCCEED;
 
-#ifdef HAVE_PABLO
-    TRACE_ON(PABLO_mask,ID_DFSDgetrange);
-#endif /* HAVE_PABLO */
-
   HEclear();  /* Clear error stack */
 
     /* Perform global, one-time initialization */
@@ -728,10 +672,6 @@
     } /* end if */
 
   /* Normal function cleanup */
-#ifdef HAVE_PABLO
-        TRACE_OFF(PABLO_mask, ID_DFSDgetrange);
-#endif /* HAVE_PABLO */
-
   return ret_value;
 }
 
@@ -771,16 +711,8 @@
 {
   intn ret_value;
 
-#ifdef HAVE_PABLO
-    TRACE_ON(PABLO_mask,ID_DFSDgetdata);
-#endif /* HAVE_PABLO */
-
   ret_value = (DFSDIgetdata(filename, rank, maxsizes, data, 0));   /* 0 == C */
 
-#ifdef HAVE_PABLO
-        TRACE_OFF(PABLO_mask, ID_DFSDgetdata);
-#endif /* HAVE_PABLO */
-
   return ret_value;
 }
 
@@ -810,10 +742,6 @@
   CONSTR(FUNC, "DFSDsetlengths");
   intn ret_value = SUCCEED;
 
-#ifdef HAVE_PABLO
-    TRACE_ON(PABLO_mask,ID_DFSDsetlengths);
-#endif /* HAVE_PABLO */
-
     /* Perform global, one-time initialization */
     if (library_terminate == FALSE)
         if(DFSDIstart()==FAIL)
@@ -835,10 +763,6 @@
     } /* end if */
 
   /* Normal function cleanup */
-#ifdef HAVE_PABLO
-        TRACE_OFF(PABLO_mask, ID_DFSDsetlengths);
-#endif /* HAVE_PABLO */
-
   return ret_value;
 }
 
@@ -867,10 +791,6 @@
   CONSTR(FUNC, "DFSDsetdims");
   intn     ret_value = SUCCEED;
 
-#ifdef HAVE_PABLO
-    TRACE_ON(PABLO_mask,ID_DFSDsetdims);
-#endif /* HAVE_PABLO */
-
   HEclear();
 
     /* Perform global, one-time initialization */
@@ -935,10 +855,6 @@
     } /* end if */
 
   /* Normal function cleanup */
-#ifdef HAVE_PABLO
-    TRACE_OFF(PABLO_mask, ID_DFSDsetdims);
-#endif /* HAVE_PABLO */
-
   return ret_value;
 }
 
@@ -962,16 +878,8 @@
 {
   intn ret_value;
 
-#ifdef HAVE_PABLO
-    TRACE_ON(PABLO_mask,ID_DFSDsetdatastrs);
-#endif /* HAVE_PABLO */
-
   ret_value = (DFSDIsetdatastrs(label, unit, format, coordsys));
 
-#ifdef HAVE_PABLO
-        TRACE_OFF(PABLO_mask, ID_DFSDsetdatastrs);
-#endif /* HAVE_PABLO */
-
   return ret_value;
 }
 
@@ -1083,16 +991,8 @@
 {
   intn ret_value;
 
-#ifdef HAVE_PABLO
-    TRACE_ON(PABLO_mask,ID_DFSDsetdimstrs);
-#endif /* HAVE_PABLO */
-
   ret_value = (DFSDIsetdimstrs(dim, label, unit, format));
 
-#ifdef HAVE_PABLO
-        TRACE_OFF(PABLO_mask, ID_DFSDsetdimstrs);
-#endif /* HAVE_PABLO */
-  
   return ret_value;
 }   /* DFSDsetdimstrs */
 
@@ -1217,10 +1117,6 @@
     intn        ret_value = SUCCEED;
     CONSTR(FUNC, "DFSDsetdimscale");
 
-#ifdef HAVE_PABLO
-    TRACE_ON(PABLO_mask,ID_DFSDsetdimscale);
-#endif /* HAVE_PABLO */
-
     HEclear();
 
     /* Perform global, one-time initialization */
@@ -1313,10 +1209,6 @@
     } /* end if */
 
   /* Normal function cleanup */
-#ifdef HAVE_PABLO
-        TRACE_OFF(PABLO_mask, ID_DFSDsetdimscale);
-#endif /* HAVE_PABLO */
-
   return ret_value;
 }
 
@@ -1355,10 +1247,6 @@
     intn        ret_value = SUCCEED;
     CONSTR(FUNC, "DFSDsetrange");    /* for HERROR */
 
-#ifdef HAVE_PABLO
-    TRACE_ON(PABLO_mask,ID_DFSDsetrange);
-#endif /* HAVE_PABLO */
-
     HEclear();
 
     /* Perform global, one-time initialization */
@@ -1391,10 +1279,6 @@
     } /* end if */
 
   /* Normal function cleanup */
-#ifdef HAVE_PABLO
-        TRACE_OFF(PABLO_mask, ID_DFSDsetrange);
-#endif /* HAVE_PABLO */
-
   return ret_value;
 }
 
@@ -1423,17 +1307,9 @@
 {
   intn ret_value;
 
-#ifdef HAVE_PABLO
-    TRACE_ON(PABLO_mask,ID_DFSDputdata);
-#endif /* HAVE_PABLO */
-
   /* 0, 0 specify create mode, C style array (row major) */
   ret_value = (DFSDIputdata(filename, rank, dimsizes, data, 0, 0));
 
-#ifdef HAVE_PABLO
-        TRACE_OFF(PABLO_mask, ID_DFSDputdata);
-#endif /* HAVE_PABLO */
-
   return ret_value;
 }
 
@@ -1466,17 +1342,9 @@
 {
   intn  ret_value;
 
-#ifdef HAVE_PABLO
-    TRACE_ON(PABLO_mask,ID_DFSDadddata);
-#endif /* HAVE_PABLO */
-
   /* 1, 0 specifies append mode, C style array (row major) */
   ret_value = (DFSDIputdata(filename, rank, dimsizes, data, 1, 0));
 
-#ifdef HAVE_PABLO
-        TRACE_OFF(PABLO_mask, ID_DFSDadddata);
-#endif /* HAVE_PABLO */
-
   return ret_value;
 }
 
@@ -1497,10 +1365,6 @@
   intn ret_value = SUCCEED;
   CONSTR(FUNC, "DFSDndatasets");
 
-#ifdef HAVE_PABLO
-    TRACE_ON(PABLO_mask,ID_DFSDrestart);
-#endif /* HAVE_PABLO */
-
     /* Perform global, one-time initialization */
     if (library_terminate == FALSE)
         if(DFSDIstart()==FAIL)
@@ -1517,10 +1381,6 @@
     } /* end if */
 
   /* Normal function cleanup */
-#ifdef HAVE_PABLO
-        TRACE_OFF(PABLO_mask, ID_DFSDrestart);
-#endif /* HAVE_PABLO */
-
   return ret_value;
 }
 
@@ -1547,10 +1407,6 @@
   int32       ret_value = SUCCEED;
   CONSTR(FUNC, "DFSDndatasets");
 
-#ifdef HAVE_PABLO
-    TRACE_ON(PABLO_mask,ID_DFSDndatasets);
-#endif /* HAVE_PABLO */
-
   HEclear();
 
     /* Perform global, one-time initialization */
@@ -1576,10 +1432,6 @@
     } /* end if */
 
   /* Normal function cleanup */
-#ifdef HAVE_PABLO
-        TRACE_OFF(PABLO_mask, ID_DFSDndatasets);
-#endif /* HAVE_PABLO */
-
   return ret_value;
 }
 
@@ -1601,10 +1453,6 @@
   CONSTR(FUNC, "DFSDclear");
   intn   ret_value = SUCCEED;
 
-#ifdef HAVE_PABLO
-    TRACE_ON(PABLO_mask,ID_DFSDclear);
-#endif /* HAVE_PABLO */
-
     /* Perform global, one-time initialization */
     if (library_terminate == FALSE)
         if(DFSDIstart()==FAIL)
@@ -1624,10 +1472,6 @@
     } /* end if */
 
   /* Normal function cleanup */
-#ifdef HAVE_PABLO
-        TRACE_OFF(PABLO_mask, ID_DFSDclear);
-#endif /* HAVE_PABLO */
-
   return ret_value;
 }
 
@@ -1649,10 +1493,6 @@
   CONSTR(FUNC, "DFSDlastref");
   uint16  ret_value;
 
-#ifdef HAVE_PABLO
-    TRACE_ON(PABLO_mask,ID_DFSDlastref);
-#endif /* HAVE_PABLO */
-
     /* Perform global, one-time initialization */
     if (library_terminate == FALSE)
         if(DFSDIstart()==FAIL)
@@ -1667,10 +1507,6 @@
     } /* end if */
 
   /* Normal function cleanup */
-#ifdef HAVE_PABLO
-        TRACE_OFF(PABLO_mask, ID_DFSDlastref);
-#endif /* HAVE_PABLO */
-
   return ret_value;
 }
 
@@ -1702,10 +1538,6 @@
   intn        ret_value = SUCCEED;
   CONSTR(FUNC, "DFSDreadref");
 
-#ifdef HAVE_PABLO
-    TRACE_ON(PABLO_mask,ID_DFSDreadref);
-#endif /* HAVE_PABLO */
-
   HEclear();
 
     /* Perform global, one-time initialization */
@@ -1734,10 +1566,6 @@
     } /* end if */
 
   /* Normal function cleanup */
-#ifdef HAVE_PABLO
-        TRACE_OFF(PABLO_mask, ID_DFSDreadref);
-#endif /* HAVE_PABLO */
-
   return ret_value;
 }
 
@@ -1783,16 +1611,8 @@
 {
   intn ret_value;
 
-#ifdef HAVE_PABLO
-    TRACE_ON(PABLO_mask,ID_DFSDgetslice);
-#endif /* HAVE_PABLO */
-
   ret_value = (DFSDIgetslice(filename, winst, windims, data, dims, 0));
 
-#ifdef HAVE_PABLO
-        TRACE_OFF(PABLO_mask, ID_DFSDgetslice);
-#endif /* HAVE_PABLO */
-
   return ret_value;
 }
 
@@ -1824,10 +1644,6 @@
   intn        ret_value = SUCCEED;
   CONSTR(FUNC, "DFSDstartslice");
 
-#ifdef HAVE_PABLO
-    TRACE_ON(PABLO_mask,ID_DFSDstartslice);
-#endif /* HAVE_PABLO */
-
   HEclear();
 
     /* Perform global, one-time initialization */
@@ -1877,10 +1693,6 @@
     } /* end if */
 
   /* Normal function cleanup */
-#ifdef HAVE_PABLO
-        TRACE_OFF(PABLO_mask, ID_DFSDstartslice);
-#endif /* HAVE_PABLO */
-
   return ret_value;
 }
 
@@ -1919,16 +1731,8 @@
 {
   intn ret_value;
 
-#ifdef HAVE_PABLO
-    TRACE_ON(PABLO_mask,ID_DFSDputslice);
-#endif /* HAVE_PABLO */
-
   ret_value = (DFSDIputslice(winend, data, dims, 0));
 
-#ifdef HAVE_PABLO
-        TRACE_OFF(PABLO_mask, ID_DFSDputslice);
-#endif /* HAVE_PABLO */
-  
   return ret_value;
 }
 
@@ -1956,16 +1760,8 @@
 {
   intn ret_value;
 
-#ifdef HAVE_PABLO
-    TRACE_ON(PABLO_mask,ID_DFSDendslice);
-#endif /* HAVE_PABLO */
-
   ret_value = (DFSDIendslice(0));
 
-#ifdef HAVE_PABLO
-        TRACE_OFF(PABLO_mask, ID_DFSDendslice);
-#endif /* HAVE_PABLO */
-
   return ret_value;
 }
 
@@ -2002,10 +1798,6 @@
   intn        ret_value = SUCCEED;
   CONSTR(FUNC, "DFSDsetNT");
 
-#ifdef HAVE_PABLO
-    TRACE_ON(PABLO_mask,ID_DFSDsetNT);
-#endif /* HAVE_PABLO */
-
   HEclear();
 
     /* Perform global, one-time initialization */
@@ -2038,10 +1830,6 @@
     } /* end if */
 
   /* Normal function cleanup */
-#ifdef HAVE_PABLO
-        TRACE_OFF(PABLO_mask, ID_DFSDsetNT);
-#endif /* HAVE_PABLO */
-
   return ret_value;
 }
 
@@ -2129,10 +1917,6 @@
   intn    ret_value = SUCCEED;
   CONSTR(FUNC, "DFSDgetNT");
 
-#ifdef HAVE_PABLO
-    TRACE_ON(PABLO_mask,ID_DFSDgetNT);
-#endif /* HAVE_PABLO */
-
   HEclear();
 
     /* Perform global, one-time initialization */
@@ -2151,10 +1935,6 @@
     } /* end if */
 
   /* Normal function cleanup */
-#ifdef HAVE_PABLO
-        TRACE_OFF(PABLO_mask, ID_DFSDgetNT);
-#endif /* HAVE_PABLO */
-
   return ret_value;
 }
 
@@ -2189,10 +1969,6 @@
     intn       ret_value = SUCCEED;
     CONSTR(FUNC, "DFSDpre32sdg");
 
-#ifdef HAVE_PABLO
-    TRACE_ON(PABLO_mask,ID_DFSDpre32sdg);
-#endif /* HAVE_PABLO */
-
     HEclear();
 
     /* Perform global, one-time initialization */
@@ -2240,10 +2016,6 @@
     } /* end if */
 
   /* Normal function cleanup */
-#ifdef HAVE_PABLO
-        TRACE_OFF(PABLO_mask, ID_DFSDpre32sdg);
-#endif /* HAVE_PABLO */
-
   return ret_value;
 }   /* end of DFSDpre32sdg   */
 
@@ -4986,10 +4758,6 @@
   intn      ret_value = SUCCEED;
   CONSTR(FUNC, "DFSDgetcal");
 
-#ifdef HAVE_PABLO
-  TRACE_ON(PABLO_mask,ID_DFSDgetcal);
-#endif /* HAVE_PABLO */
-
   HEclear();
 
     /* Perform global, one-time initialization */
@@ -5019,10 +4787,6 @@
     } /* end if */
 
   /* Normal function cleanup */
-#ifdef HAVE_PABLO
-    TRACE_OFF(PABLO_mask, ID_DFSDgetcal);
-#endif /* HAVE_PABLO */
-
   return ret_value;
 }   /* DFSDgetcal */
 
@@ -5071,10 +4835,6 @@
     CONSTR(FUNC, "DFSDsetcal");
   intn    ret_value = SUCCEED;
 
-#ifdef HAVE_PABLO
-    TRACE_ON(PABLO_mask,ID_DFSDsetcal);
-#endif /* HAVE_PABLO */
-
   HEclear();
 
     /* Perform global, one-time initialization */
@@ -5097,10 +4857,6 @@
     } /* end if */
 
   /* Normal function cleanup */
-#ifdef HAVE_PABLO
-    TRACE_OFF(PABLO_mask, ID_DFSDsetcal);
-#endif /* HAVE_PABLO */
-
   return ret_value;
 }
 
@@ -5127,10 +4883,6 @@
   intn        ret_value = SUCCEED;
   CONSTR(FUNC, "DFSDwriteref");
 
-#ifdef HAVE_PABLO
-    TRACE_ON(PABLO_mask,ID_DFSDwriteref);
-#endif /* HAVE_PABLO */
-
   /* Clear error stack */
   HEclear();
 
@@ -5178,10 +4930,6 @@
     } /* end if */
 
   /* Normal function cleanup */
-#ifdef HAVE_PABLO
-        TRACE_OFF(PABLO_mask, ID_DFSDwriteref);
-#endif /* HAVE_PABLO */
-
   return ret_value;
 }
 
@@ -5213,10 +4961,6 @@
   intn        ret_value = SUCCEED;
   CONSTR(FUNC, "DFSDsetfillvalue");
 
-#ifdef HAVE_PABLO
-    TRACE_ON(PABLO_mask,ID_DFSDsetfillvalue);
-#endif /* HAVE_PABLO */
-
   /* Clear error stack  */
   HEclear();
 
@@ -5251,10 +4995,6 @@
     } /* end if */
 
   /* Normal function cleanup */
-#ifdef HAVE_PABLO
-    TRACE_OFF(PABLO_mask, ID_DFSDsetfillvalue);
-#endif /* HAVE_PABLO */
-
   return ret_value;
 }
 
@@ -5282,10 +5022,6 @@
   intn        ret_value = SUCCEED;
   CONSTR(FUNC, "DFSDgetfillvalue");
 
-#ifdef HAVE_PABLO
-  TRACE_ON(PABLO_mask,ID_DFSDgetfillvalue);
-#endif /* HAVE_PABLO */
-
   /* Clear error stack  */
   HEclear();
 
@@ -5315,10 +5051,6 @@
     } /* end if */
 
   /* Normal function cleanup */
-#ifdef HAVE_PABLO
-    TRACE_OFF(PABLO_mask, ID_DFSDgetfillvalue);
-#endif /* HAVE_PABLO */
-
   return ret_value;
 }
 
@@ -5363,16 +5095,8 @@
   /* shut compiler up */
   stride = stride;
 
-#ifdef HAVE_PABLO
-  TRACE_ON(PABLO_mask,ID_DFSDreadslab);
-#endif /* HAVE_PABLO */
-
   ret_value = (DFSDgetslice(filename, start, slab_size, buffer, buffer_size));
 
-#ifdef HAVE_PABLO
-    TRACE_OFF(PABLO_mask, ID_DFSDreadslab);
-#endif /* HAVE_PABLO */
-
   return ret_value;
 }
 
@@ -5407,10 +5131,6 @@
   intn       ret_value = SUCCEED;
   CONSTR(FUNC, "DFSDstartslab");
 
-#ifdef HAVE_PABLO
-  TRACE_ON(PABLO_mask,ID_DFSDstartslab);
-#endif /* HAVE_PABLO */
-
   /* Clear errors */
   HEclear();
 
@@ -5536,10 +5256,6 @@
     } /* end if */
 
   /* Normal function cleanup */
-#ifdef HAVE_PABLO
-    TRACE_OFF(PABLO_mask, ID_DFSDstartslab);
-#endif /* HAVE_PABLO */
-
   return ret_value;
 }
 
@@ -5608,10 +5324,6 @@
   intn       ret_value = SUCCEED;
   CONSTR(FUNC, "DFSDwriteslab");
 
-#ifdef HAVE_PABLO
-  TRACE_ON(PABLO_mask,ID_DFSDwriteslab);
-#endif /* HAVE_PABLO */
-
   /* shut compiler up */
   stride = stride;
 
@@ -5860,10 +5572,6 @@
     } /* end if */
 
   /* Normal function cleanup */
-#ifdef HAVE_PABLO
-    TRACE_OFF(PABLO_mask, ID_DFSDwriteslab);
-#endif /* HAVE_PABLO */
-
   return ret_value;
 }
 
@@ -5887,10 +5595,6 @@
   intn        ret_value = SUCCEED;
   CONSTR(FUNC, "DFSDendslab");
 
-#ifdef HAVE_PABLO
-  TRACE_ON(PABLO_mask,ID_DFSDendslab);
-#endif /* HAVE_PABLO */
-
   /* Clear error stack */
   HEclear();
 
@@ -5951,10 +5655,6 @@
     } /* end if */
 
   /* Normal function cleanup */
-#ifdef HAVE_PABLO
-    TRACE_OFF(PABLO_mask, ID_DFSDendslab);
-#endif /* HAVE_PABLO */
-
   return ret_value;
 }
 

Modified: packages/libhdf4/branches/upstream/current/hdf/src/dynarray.c
===================================================================
--- packages/libhdf4/branches/upstream/current/hdf/src/dynarray.c	2007-05-15 09:05:29 UTC (rev 830)
+++ packages/libhdf4/branches/upstream/current/hdf/src/dynarray.c	2007-05-15 09:53:05 UTC (rev 831)
@@ -11,15 +11,11 @@
  ****************************************************************************/
 
 #ifdef RCSID
-static char RcsId[] = "@(#)$Revision: 1.4 $";
+static char RcsId[] = "@(#)$Revision: 1.5 $";
 #endif
 
-/* $Id: dynarray.c,v 1.4 1999/06/16 21:10:49 dwells Exp $ */
+/* $Id: dynarray.c,v 1.5 2005/01/09 20:53:51 mcgrath Exp $ */
 
-#ifdef HAVE_PABLO
-#define PABLO_mask ID_dynarray_c
-#endif
-
 /*
 FILE
     dynarray.c - Internal storage routines for handling "dynamic arrays"
@@ -89,10 +85,6 @@
     dynarr_t   *new_arr=NULL;       /* ptr to the new dynarray */
     dynarr_p    ret_value=NULL;
 
-#ifdef HAVE_PABLO
-    TRACE_ON(PABLO_mask,ID_DAcreate_array);
-#endif /* HAVE_PABLO */
-
     HEclear();
     if(start_size<0 || incr_mult<=0)
         HGOTO_ERROR(DFE_ARGS, NULL);
@@ -124,10 +116,6 @@
     } /* end if */
 
   /* Normal function cleanup */
-#ifdef HAVE_PABLO
-        TRACE_OFF(PABLO_mask, ID_DAcreate_array);
-#endif /* HAVE_PABLO */
-
   return ret_value;
 }   /* end DAcreate_array() */
 
@@ -152,10 +140,6 @@
     intn i;
     intn    ret_value=SUCCEED;
 
-#ifdef HAVE_PABLO
-    TRACE_ON(PABLO_mask,ID_DAdestroy_array);
-#endif /* HAVE_PABLO */
-
     HEclear();
     dest_arr=(dynarr_t *)arr;
     if(dest_arr==NULL)
@@ -180,10 +164,6 @@
     } /* end if */
 
   /* Normal function cleanup */
-#ifdef HAVE_PABLO
-        TRACE_OFF(PABLO_mask, ID_DAdestroy_array);
-#endif /* HAVE_PABLO */
-
   return ret_value;
 }   /* end DAdestroy_array() */
 
@@ -205,10 +185,6 @@
     dynarr_t   *arr_ptr;            /* ptr to the dynarray destroy*/
     intn    ret_value=SUCCEED;
 
-#ifdef HAVE_PABLO
-    TRACE_ON(PABLO_mask,ID_DAsize_array);
-#endif /* HAVE_PABLO */
-
     HEclear();
     arr_ptr=(dynarr_t *)arr;
     if(arr_ptr==NULL)
@@ -223,10 +199,6 @@
     } /* end if */
 
   /* Normal function cleanup */
-#ifdef HAVE_PABLO
-        TRACE_OFF(PABLO_mask, ID_DAsize_array);
-#endif /* HAVE_PABLO */
-
   return ret_value;
 }   /* end DAsize_array() */
 
@@ -251,10 +223,6 @@
     dynarr_t   *arr;                /* ptr to the dynarray */
     VOIDP    ret_value=NULL;
 
-#ifdef HAVE_PABLO
-    TRACE_ON(PABLO_mask,ID_DAget_elem);
-#endif /* HAVE_PABLO */
-
     HEclear();
     arr=(dynarr_t *)arr_ptr;
     if(elem<0 || arr==NULL)
@@ -272,10 +240,6 @@
     } /* end if */
 
   /* Normal function cleanup */
-#ifdef HAVE_PABLO
-        TRACE_OFF(PABLO_mask, ID_DAget_elem);
-#endif /* HAVE_PABLO */
-
   return ret_value;
 }   /* end DAget_elem() */
 
@@ -302,10 +266,6 @@
     dynarr_t   *arr;                /* ptr to the dynarray */
     intn        ret_value=SUCCEED;
 
-#ifdef HAVE_PABLO
-    TRACE_ON(PABLO_mask,ID_DAset_elem);
-#endif /* HAVE_PABLO */
-
     HEclear();
     arr=(dynarr_t *)arr_ptr;
     if(elem<0 || arr==NULL)
@@ -343,10 +303,6 @@
     } /* end if */
 
   /* Normal function cleanup */
-#ifdef HAVE_PABLO
-        TRACE_OFF(PABLO_mask, ID_DAset_elem);
-#endif /* HAVE_PABLO */
-
   return ret_value;
 }   /* end DAset_elem() */
 
@@ -371,10 +327,6 @@
     dynarr_t   *arr;                /* ptr to the dynarray */
     VOIDP    ret_value=NULL;
 
-#ifdef HAVE_PABLO
-    TRACE_ON(PABLO_mask,ID_DAdel_elem);
-#endif /* HAVE_PABLO */
-
     HEclear();
     arr=(dynarr_t *)arr_ptr;
     if(elem<0 || arr==NULL)
@@ -395,10 +347,6 @@
     } /* end if */
 
   /* Normal function cleanup */
-#ifdef HAVE_PABLO
-    TRACE_OFF(PABLO_mask, ID_DAdel_elem);
-#endif /* HAVE_PABLO */
-
   return ret_value;
 }   /* end DAdel_elem() */
 

Modified: packages/libhdf4/branches/upstream/current/hdf/src/fort_ps/herrpf.c
===================================================================
--- packages/libhdf4/branches/upstream/current/hdf/src/fort_ps/herrpf.c	2007-05-15 09:05:29 UTC (rev 830)
+++ packages/libhdf4/branches/upstream/current/hdf/src/fort_ps/herrpf.c	2007-05-15 09:53:05 UTC (rev 831)
@@ -11,10 +11,10 @@
  ****************************************************************************/
 
 #ifdef RCSID
-static char RcsId[] = "@(#)$Revision: 1.1 $";
+static char RcsId[] = "@(#)$Revision: 1.4 $";
 #endif
 
-/* $Id: herrpf.c,v 1.1 2000/04/17 20:44:23 epourmal Exp $ */
+/* $Id: herrpf.c,v 1.4 2001/10/15 18:52:51 epourmal Exp $ */
 
 /*-----------------------------------------------------------------------------
  * File:    herrf.c
@@ -39,19 +39,45 @@
 /*-----------------------------------------------------------------------------
  * Name:    heprntc
  * Purpose: call HEprint to print error messages, starting from top of stack
- * Inputs:  print_levels: number of levels to print
- * Returns: 0 on success, FAIL on failure
+ * Inputs:  filename - name of the output file; if lenght is 0 then
+ *                     messages will be printied to stderr. 
+ *          print_levels: number of levels to print
+ *          namelen - length of the filname string
  * Users:   Fortran stub routine
  * Invokes: HEprint
- * Remarks: This routine has one less parameter than HEprint, because it
- *          doesn't allow the user to specify the stream to print to.
- *          Instead it prints automatically to stdout.
+ * Returns: 0 on success, FAIL on failure
  *---------------------------------------------------------------------------*/
 
-FRETVAL(VOID)
-nheprntc(intf * print_levels)
+FRETVAL(intf)
+
+#ifdef PROTOTYPE
+nheprntc(_fcd filename, intf * print_levels, intf *namelen)
+#else
+nheprntc(filename, print_levels, namelen)
+           _fcd  filename;
+           intf *print_levels; 
+           intf  *namelen;
+#endif /* PROTOTYPE */
+
 {
-    HEprint(stderr, *print_levels);
+    FILE *err_file;
+    char * c_name;
+    intn c_len;
+    int ret = 0;
+
+    c_len = *namelen;
+    if(c_len == 0) {
+                HEprint(stderr, *print_levels);
+                return(ret);
+    }
+    c_name = HDf2cstring(filename, c_len);
+    	if (!c_name) return(FAIL);
+    err_file = fopen(c_name, "a");
+    	if (!err_file) return(FAIL);
+    HEprint(err_file, *print_levels);
+    fclose(err_file);
+    return(ret);
+    
 }
 /*-----------------------------------------------------------------------------
  * Name: hestringc
@@ -82,7 +108,6 @@
                 status = 0;
                 HDpackFstring(cstring,  _fcdtocp(error_message),  *len);
    }  
- 
    return status;
  
  

Modified: packages/libhdf4/branches/upstream/current/hdf/src/fort_ps/herrpff.f
===================================================================
--- packages/libhdf4/branches/upstream/current/hdf/src/fort_ps/herrpff.f	2007-05-15 09:05:29 UTC (rev 830)
+++ packages/libhdf4/branches/upstream/current/hdf/src/fort_ps/herrpff.f	2007-05-15 09:53:05 UTC (rev 831)
@@ -17,8 +17,9 @@
       INTERFACE
         INTEGER FUNCTION hestringc(error_code, error_message, length)
           !MS$ATTRIBUTES C,reference,alias:'_HESTRINGC' :: hestringc
+          !DEC$ ATTRIBUTES reference :: error_message 
           integer error_code, length
-	    character*(*) error_message
+	  character*(*) error_message
         END FUNCTION hestringc
       END INTERFACE
       hestringf = hestringc(error_code, error_message,
@@ -26,7 +27,7 @@
       return
       end
 C-----------------------------------------------------------------------------
-C Name: heprnt
+C Name: heprntf
 C Purpose: prints values from the error stack 
 C Inputs:  print_levels - number of levels to print 
 C Retruns: SUCCEED (0) if successful and FAIL(-1) otherwise
@@ -34,18 +35,22 @@
 C Remarks: This routine always prints to the standard output.
 C-----------------------------------------------------------------------------*/
 
-      integer function heprnt(print_levels)
+      integer function heprntf(filename, print_levels)
 	!MS$if defined(BUILD_HDF_DLL)
-	!MS$attributes dllexport :: heprnt
+	!MS$attributes dllexport :: heprntf
 	!MS$endif
       integer print_levels 
+      character*(*) filename
 
       INTERFACE
-        INTEGER FUNCTION heprntc(print_levels)
+        INTEGER FUNCTION heprntc(filename, print_levels, namelen)
           !MS$ATTRIBUTES C,reference,alias:'_HEPRNTC' :: heprntc
+          !DEC$ ATTRIBUTES reference :: filename
           integer print_levels 
+          character*(*) filename
+          integer namelen
         END FUNCTION heprntc
       END INTERFACE
-      heprnt = heprntc(print_levels)
+      heprntf = heprntc(filename, print_levels, len(filename))
       return
       end

Modified: packages/libhdf4/branches/upstream/current/hdf/src/fort_ps/hfilepf.c
===================================================================
--- packages/libhdf4/branches/upstream/current/hdf/src/fort_ps/hfilepf.c	2007-05-15 09:05:29 UTC (rev 830)
+++ packages/libhdf4/branches/upstream/current/hdf/src/fort_ps/hfilepf.c	2007-05-15 09:53:05 UTC (rev 831)
@@ -11,10 +11,10 @@
  ****************************************************************************/
 
 #ifdef RCSID
-static char RcsId[] = "@(#)$Revision: 1.5 $";
+static char RcsId[] = "@(#)$Revision: 1.6 $";
 #endif
 
-/* $Id: hfilepf.c,v 1.5 2000/08/22 20:35:14 epourmal Exp $ */
+/* $Id: hfilepf.c,v 1.6 2001/09/29 15:48:03 epourmal Exp $ */
 
 /*-----------------------------------------------------------------------------
  * File:    hfilepf.c. based on hfilef.c,v 1.19
@@ -37,7 +37,6 @@
 #   define nhxiscdir FNAME(HXISCDIR)
 #   define nhddontatexit FNAME(HDDONTATEXIT)
 #   define nhglibverc FNAME(HGLIBVERC)
-#   define nhgfilverc FNAME(HGFILVERC)
 #else
 #   define nhiopen   FNAME(hiopen)
 #   define nhiclose   FNAME(hiclose)
@@ -289,35 +288,3 @@
     return (ret);
 }
 
-/*-----------------------------------------------------------------------------
- * Name: hestringc
- * Purpose:  Calls HEstring
- * Inputs:   error_code - HDF error code
- * Outputs: error_message - error message assocoated with the error code
- * Retruns: SUCCEED (0) if successful and FAIL(-1) otherwise
- *----------------------------------------------------------------------------*/
- 
- 
- FRETVAL(intf)
-#ifdef PROTOTYPE
-nhestringc(intf *error_code,
-            _fcd error_message, intf *len)
-#else
-nhestringc(error_code, error_message, len)
-           intf *error_code;
-           _fcd  error_message;
-           intf  *len;
-#endif /* PROTOTYPE */
-{
-   char *cstring = NULL;
-   intn   status;
- 
-   status = -1;
-   cstring = (char *)HEstring((hdf_err_code_t) *error_code);
-   if (cstring) {
-                status = 0;
-                HDpackFstring(cstring,  _fcdtocp(error_message),  *len);
-   }  
- 
-   return status;
-}

Modified: packages/libhdf4/branches/upstream/current/hdf/src/fort_ps/hfilepff.f
===================================================================
--- packages/libhdf4/branches/upstream/current/hdf/src/fort_ps/hfilepff.f	2007-05-15 09:05:29 UTC (rev 830)
+++ packages/libhdf4/branches/upstream/current/hdf/src/fort_ps/hfilepff.f	2007-05-15 09:53:05 UTC (rev 831)
@@ -1,288 +1,263 @@
-C****************************************************************************
-C* NCSA HDF                                                                 *
-C* Software Development Group                                               *
-C* National Center for Supercomputing Applications                          *
-C* University of Illinois at Urbana-Champaign                               *
-C* 605 E. Springfield, Champaign IL 61820                                   *
-C*                                                                          *
-C* For conditions of distribution and use, see the accompanying             *
-C* hdf/COPYING file.                                                        *
-C*                                                                          *
-C****************************************************************************
-C
-C $Id: hfilepff.f,v 1.6 2000/08/01 20:51:51 epourmal Exp $
-C
-C------------------------------------------------------------------------------
-C File:     hfilepFf.f, based on hfileff.f,v 1.7
-C Purpose:  Fortran stubs for H Fortran PowerStation routines
-C Invokes:  hfilepF.c 
-C Contents: 
-C   hopen:          Call hiopen to open file
-C hnumber:          Call hnumber
-C Remarks: none
-C--------------------------------------------------------------
-
-
-C------------------------------------------------------------------
-C Name: hopen
-C Purpose:  call hiopen, open file
-C Inputs:   path: Name of file to be opened
-C           access: DFACC_READ, DFACC_WRITE, DFACC_CREATE,
-C                      or any bitwise-or of the above.
-C           ndds: Number of dds in header block if file needs to be created.
-C Returns: 0 on success, FAIL on failure with error set
-C Users:    Fortran stub routine
-C Invokes: hiopen
-C-------------------------------------------------------------------
-
-      integer function hopen(filename, access, defdds)
-	!MS$if defined(BUILD_HDF_DLL)
-	!MS$attributes dllexport :: hopen
-	!MS$endif
-
-      character*(*) filename
-      integer       access, defdds
-C      integer       hiopen
-      INTERFACE 
-        INTEGER FUNCTION hiopen(filename,access, defdds, nmlen)
-          !MS$ATTRIBUTES C, reference, alias: '_HIOPEN' :: hiopen
-	    !DEC$ ATTRIBUTES reference :: filename
-          integer access, defdds, nmlen
-          character*(*) filename
-        END FUNCTION hiopen
-      END INTERFACE
-
-      hopen = hiopen(filename, access, defdds, len(filename))
-      return
-      end
-
-C------------------------------------------------------------------
-C Name: hclose
-C Purpose:  call hiclose, close file
-C           fid:  handle to HDF file to close
-C Returns: 0 on success, FAIL on failure with error set
-C Users:    Fortran stub routine
-C Invokes: hiclose
-C-------------------------------------------------------------------
-
-      integer function hclose(fid)
-	!MS$if defined(BUILD_HDF_DLL)
-	!MS$attributes dllexport :: hclose
-	!MS$endif
-
-      integer       fid
-C      integer       hiclose
-      INTERFACE 
-        INTEGER FUNCTION hiclose(fid)
-          !MS$ATTRIBUTES C, reference, alias: '_HICLOSE' :: hiclose
-          integer fid
-        END FUNCTION hiclose
-      END INTERFACE
-
-      hclose = hiclose(fid)
-      return
-      end
-
-C------------------------------------------------------------------
-C Name: hnumber
-C Purpose:  call hinumbr, get number of elements with tag 
-C           fid:  handle to HDF file to close
-C           tag: the tag which the elements have
-C Returns: number of element on success, FAIL on failure with error set
-C Users:    Fortran stub routine
-C Invokes: hinumbr
-C-------------------------------------------------------------------
-
-      integer function hnumber(fid, tag)
-	!MS$if defined(BUILD_HDF_DLL)
-	!MS$attributes dllexport :: hnumber
-	!MS$endif
-
-      integer       fid, tag
-C      integer       hinumbr
-      INTERFACE 
-        INTEGER FUNCTION hinumbr(fid, tag)
-          !MS$ATTRIBUTES C, reference, alias: '_HINUMBR' :: hinumbr
-          integer fid, tag
-        END FUNCTION hinumbr
-      END INTERFACE
-
-      hnumber = hinumbr(fid, tag)
-      return
-      end
-
-C--------------------------------------------------------------------
-C Name: hxsdir
-C Purpose:  call hxisdir to set directory variable for locating an external file
-C Inputs:   dir: names of directory separated by colons.
-C Returns:  SUCCEED if no error, else FAIL
-C Users:    Fortran stub routine
-C Invokes: hxisdir
-C------------------------------------------------------------------
-
-      integer function hxsdir(dir)
-	!MS$if defined(BUILD_HDF_DLL)
-	!MS$attributes dllexport :: hxsdir
-	!MS$endif
-
-      character*(*) dir
-C      integer       hxisdir
-      INTERFACE
-        INTEGER FUNCTION hxisdir(dir, dirlen)
-          !MS$ATTRIBUTES C, reference, alias: '_HXISDIR' :: hxisdir
-	    !DEC$ ATTRIBUTES reference :: dir
-          character*(*) dir
-          integer dirlen
-        END FUNCTION hxisdir
-      END INTERFACE
-
-      hxsdir = hxisdir(dir, len(dir))
-      return
-      end
-
-C---------------------------------------------------------------------
-C Name: hxscdir
-C Purpose:  call hxiscdir to set directory variable for creating an external file
-C Inputs:   dir: name of the directory
-C Returns:  SUCCEED if no error, else FAIL
-C Users:    Fortran stub routine
-C Invokes: hxiscdir
-C--------------------------------------------------------------*/
-
-      integer function hxscdir(dir)
-	!MS$if defined(BUILD_HDF_DLL)
-	!MS$attributes dllexport :: hxscdir
-	!MS$endif
-
-      character*(*) dir
-C      integer       hxiscdir
-      INTERFACE
-        INTEGER FUNCTION hxiscdir(dir, dirlen)
-          !MS$ATTRIBUTES C, reference, alias: '_HXISCDIR' :: hxiscdir
-	    !DEC$ ATTRIBUTES reference :: dir
-          character*(*) dir
-          integer dirlen
-        END FUNCTION hxiscdir
-      END INTERFACE
-
-      hxscdir = hxiscdir(dir, len(dir))
-      return
-      end
-
-C-----------------------------------------------------------------------------
-C Name: hglibver
-C Purpose: retrieves the version information for the current HDF library
-C Outputs: major_v - major version number
-C          minor_v - minor version number
-C          release - release number
-C          string  - version number test string
-C Retruns: SUCCEED (0) if successful and FAIL(-1) otherwise
-C-----------------------------------------------------------------------------*/
-
-      integer function hglibver(major_v, minor_v, release, string)
-	!MS$if defined(BUILD_HDF_DLL)
-	!MS$attributes dllexport :: hglibver
-	!MS$endif
-
-      integer major_v, minor_v, release
-      character*(*) string
-C      integer hglibverc 
-      INTERFACE
-        INTEGER FUNCTION hglibverc(major_v, minor_v, release, string,
-     +	   stringlen)
-          !MS$ATTRIBUTES C, reference, alias: '_HGLIBVERC' :: hglibverc
-	    !DEC$ ATTRIBUTES reference :: string
-          integer major_v, minor_v, release, stringlen
-          character*(*) string
-        END FUNCTION hglibverc
-      END INTERFACE
-
-      hglibver = hglibverc(major_v, minor_v, release, string,
-     .                     len(string))
-      return
-      end
-C-----------------------------------------------------------------------------
-C Name: hgfilver
-C Purpose: retrieves the version information for the current HDF library
-C Inputs:  file_id - file identifier
-C Outputs: major_v - major version number
-C          minor_v - minor version number
-C          release - release number
-C          string  - version number test string
-C Retruns: SUCCEED (0) if successful and FAIL(-1) otherwise
-C-----------------------------------------------------------------------------*/
-
-      integer function hgfilver(file_id, major_v, minor_v, release,
-     .                          string)
-	!MS$if defined(BUILD_HDF_DLL)
-	!MS$attributes dllexport :: hgfilver
-	!MS$endif
-
-      integer file_id, major_v, minor_v, release
-      character*(*) string
-C      integer hgfilverc 
-      INTERFACE
-        INTEGER FUNCTION hgfilverc(file_id, major_v, minor_v, release,
-     +	                             string, stringlen)
-          !MS$ATTRIBUTES C, reference, alias: '_HGFILVERC' :: hgfilverc
-	    !DEC$ ATTRIBUTES reference :: string
-          integer file_id, major_v, minor_v, release, stringlen
-          character*(*) string
-        END FUNCTION hgfilverc
-      END INTERFACE
-
-      hgfilver = hgfilverc(file_id, major_v, minor_v, release, string,
-     .                     len(string))
-      return
-      end
-
-C------------------------------------------------------------------------------
-C Name: hishdf
-C Purpose:  Identifies if the file "file_name" is an HDF file. 
-C Inputs:   file_name:  File name
-C Returns: TRUE (1) if successful, FALSE (0) otherwise.
-C Invokes: hiopen
-C----------------------------------------------------------------------------*/
-
-      integer function hishdf(filename)
-	!MS$if defined(BUILD_HDF_DLL)
-	!MS$attributes dllexport :: hishdf
-	!MS$endif
-      character*(*) filename
-C      integer       hiishdf
-	INTERFACE
-        INTEGER FUNCTION hiishdf(filename, length)
-          !MS$ATTRIBUTES C,reference,alias:'_HIISHDF' :: hiishdf
-          integer length
-	    character*(*) filename
-        END FUNCTION hiishdf
-      END INTERFACE
-      hishdf = hiishdf(filename, len(filename))
-      return
-      end
-C-----------------------------------------------------------------------------
-C Name: hestring
-C Purpose: retrieves the error message associated with the specified error code 
-C Inputs:  error_code 
-C Outputs: error_message - string associated with the error code 
-C Retruns: SUCCEED (0) if successful and FAIL(-1) otherwise
-C-----------------------------------------------------------------------------*/
-
-      integer function hestring(error_code, error_message)
-	!MS$if defined(BUILD_HDF_DLL)
-	!MS$attributes dllexport :: hestring
-	!MS$endif
-      integer error_code 
-      character*(*) error_message 
-C      integer hestringc 
-
-      INTERFACE
-        INTEGER FUNCTION hestringc(error_code, error_message, length)
-          !MS$ATTRIBUTES C,reference,alias:'_HESTRINGC' :: hestringc
-          integer error_code, length
-	    character*(*) error_message
-        END FUNCTION hestringc
-      END INTERFACE
-      hestring = hestringc(error_code, error_message,len(error_message))
-      return
-      end
+C****************************************************************************
+C* NCSA HDF                                                                 *
+C* Software Development Group                                               *
+C* National Center for Supercomputing Applications                          *
+C* University of Illinois at Urbana-Champaign                               *
+C* 605 E. Springfield, Champaign IL 61820                                   *
+C*                                                                          *
+C* For conditions of distribution and use, see the accompanying             *
+C* hdf/COPYING file.                                                        *
+C*                                                                          *
+C****************************************************************************
+C
+C $Id: hfilepff.f,v 1.9 2004/05/06 16:52:46 ymuqun Exp $
+C
+C------------------------------------------------------------------------------
+C File:     hfilepFf.f, based on hfileff.f,v 1.7
+C Purpose:  Fortran stubs for H Fortran PowerStation routines
+C Invokes:  hfilepF.c 
+C Contents: 
+C   hopen:          Call hiopen to open file
+C hnumber:          Call hnumber
+C Remarks: none
+C--------------------------------------------------------------
+
+
+C------------------------------------------------------------------
+C Name: hopen
+C Purpose:  call hiopen, open file
+C Inputs:   path: Name of file to be opened
+C           access: DFACC_READ, DFACC_WRITE, DFACC_CREATE,
+C                      or any bitwise-or of the above.
+C           ndds: Number of dds in header block if file needs to be created.
+C Returns: 0 on success, FAIL on failure with error set
+C Users:    Fortran stub routine
+C Invokes: hiopen
+C-------------------------------------------------------------------
+
+      integer function hopen(filename, access, defdds)
+	!MS$if defined(BUILD_HDF_DLL)
+	!MS$attributes dllexport :: hopen
+	!MS$endif
+
+      character*(*) filename
+      integer       access, defdds
+C      integer       hiopen
+      INTERFACE 
+        INTEGER FUNCTION hiopen(filename,access, defdds, nmlen)
+          !MS$ATTRIBUTES C, reference, alias: '_HIOPEN' :: hiopen
+	    !DEC$ ATTRIBUTES reference :: filename
+          integer access, defdds, nmlen
+          character*(*) filename
+        END FUNCTION hiopen
+      END INTERFACE
+
+      hopen = hiopen(filename, access, defdds, len(filename))
+      return
+      end
+
+C------------------------------------------------------------------
+C Name: hclose
+C Purpose:  call hiclose, close file
+C           fid:  handle to HDF file to close
+C Returns: 0 on success, FAIL on failure with error set
+C Users:    Fortran stub routine
+C Invokes: hiclose
+C-------------------------------------------------------------------
+
+      integer function hclose(fid)
+	!MS$if defined(BUILD_HDF_DLL)
+	!MS$attributes dllexport :: hclose
+	!MS$endif
+
+      integer       fid
+C      integer       hiclose
+      INTERFACE 
+        INTEGER FUNCTION hiclose(fid)
+          !MS$ATTRIBUTES C, reference, alias: '_HICLOSE' :: hiclose
+          integer fid
+        END FUNCTION hiclose
+      END INTERFACE
+
+      hclose = hiclose(fid)
+      return
+      end
+
+C------------------------------------------------------------------
+C Name: hnumber
+C Purpose:  call hinumbr, get number of elements with tag 
+C           fid:  handle to HDF file to close
+C           tag: the tag which the elements have
+C Returns: number of element on success, FAIL on failure with error set
+C Users:    Fortran stub routine
+C Invokes: hinumbr
+C-------------------------------------------------------------------
+
+      integer function hnumber(fid, tag)
+	!MS$if defined(BUILD_HDF_DLL)
+	!MS$attributes dllexport :: hnumber
+	!MS$endif
+
+      integer       fid, tag
+C      integer       hinumbr
+      INTERFACE 
+        INTEGER FUNCTION hinumbr(fid, tag)
+          !MS$ATTRIBUTES C, reference, alias: '_HINUMBR' :: hinumbr
+          integer fid, tag
+        END FUNCTION hinumbr
+      END INTERFACE
+
+      hnumber = hinumbr(fid, tag)
+      return
+      end
+
+C--------------------------------------------------------------------
+C Name: hxsdir
+C Purpose:  call hxisdir to set directory variable for locating an external file
+C Inputs:   dir: names of directory separated by colons.
+C Returns:  SUCCEED if no error, else FAIL
+C Users:    Fortran stub routine
+C Invokes: hxisdir
+C------------------------------------------------------------------
+
+      integer function hxsdir(dir)
+	!MS$if defined(BUILD_HDF_DLL)
+	!MS$attributes dllexport :: hxsdir
+	!MS$endif
+
+      character*(*) dir
+C      integer       hxisdir
+      INTERFACE
+        INTEGER FUNCTION hxisdir(dir, dirlen)
+          !MS$ATTRIBUTES C, reference, alias: '_HXISDIR' :: hxisdir
+	    !DEC$ ATTRIBUTES reference :: dir
+          character*(*) dir
+          integer dirlen
+        END FUNCTION hxisdir
+      END INTERFACE
+
+      hxsdir = hxisdir(dir, len(dir))
+      return
+      end
+
+C---------------------------------------------------------------------
+C Name: hxscdir
+C Purpose:  call hxiscdir to set directory variable for creating an external file
+C Inputs:   dir: name of the directory
+C Returns:  SUCCEED if no error, else FAIL
+C Users:    Fortran stub routine
+C Invokes: hxiscdir
+C--------------------------------------------------------------*/
+
+      integer function hxscdir(dir)
+	!MS$if defined(BUILD_HDF_DLL)
+	!MS$attributes dllexport :: hxscdir
+	!MS$endif
+
+      character*(*) dir
+C      integer       hxiscdir
+      INTERFACE
+        INTEGER FUNCTION hxiscdir(dir, dirlen)
+          !MS$ATTRIBUTES C, reference, alias: '_HXISCDIR' :: hxiscdir
+	    !DEC$ ATTRIBUTES reference :: dir
+          character*(*) dir
+          integer dirlen
+        END FUNCTION hxiscdir
+      END INTERFACE
+
+      hxscdir = hxiscdir(dir, len(dir))
+      return
+      end
+
+C-----------------------------------------------------------------------------
+C Name: hglibver
+C Purpose: retrieves the version information for the current HDF library
+C Outputs: major_v - major version number
+C          minor_v - minor version number
+C          release - release number
+C          string  - version number test string
+C Retruns: SUCCEED (0) if successful and FAIL(-1) otherwise
+C-----------------------------------------------------------------------------*/
+
+      integer function hglibver(major_v, minor_v, release, string)
+	!MS$if defined(BUILD_HDF_DLL)
+	!MS$attributes dllexport :: hglibver
+	!MS$endif
+
+      integer major_v, minor_v, release
+      character*(*) string
+C      integer hglibverc 
+      INTERFACE
+        INTEGER FUNCTION hglibverc(major_v, minor_v, release, string,
+     +	   stringlen)
+          !MS$ATTRIBUTES C, reference, alias: '_HGLIBVERC' :: hglibverc
+	    !DEC$ ATTRIBUTES reference :: string
+          integer major_v, minor_v, release, stringlen
+          character*(*) string
+        END FUNCTION hglibverc
+      END INTERFACE
+
+      hglibver = hglibverc(major_v, minor_v, release, string,
+     .                     len(string))
+      return
+      end
+C-----------------------------------------------------------------------------
+C Name: hgfilver
+C Purpose: retrieves the version information for the current HDF library
+C Inputs:  file_id - file identifier
+C Outputs: major_v - major version number
+C          minor_v - minor version number
+C          release - release number
+C          string  - version number test string
+C Retruns: SUCCEED (0) if successful and FAIL(-1) otherwise
+C-----------------------------------------------------------------------------*/
+
+      integer function hgfilver(file_id, major_v, minor_v, release,
+     .                          string)
+	!MS$if defined(BUILD_HDF_DLL)
+	!MS$attributes dllexport :: hgfilver
+	!MS$endif
+
+      integer file_id, major_v, minor_v, release
+      character*(*) string
+C      integer hgfilverc 
+      INTERFACE
+        INTEGER FUNCTION hgfilverc(file_id, major_v, minor_v, release,
+     +	                             string, stringlen)
+          !MS$ATTRIBUTES C, reference, alias: '_HGFILVERC' :: hgfilverc
+	    !DEC$ ATTRIBUTES reference :: string
+          integer file_id, major_v, minor_v, release, stringlen
+          character*(*) string
+        END FUNCTION hgfilverc
+      END INTERFACE
+
+      hgfilver = hgfilverc(file_id, major_v, minor_v, release, string,
+     .                     len(string))
+      return
+      end
+
+C------------------------------------------------------------------------------
+C Name: hishdf
+C Purpose:  Identifies if the file "file_name" is an HDF file. 
+C Inputs:   file_name:  File name
+C Returns: TRUE (1) if successful, FALSE (0) otherwise.
+C Invokes: hiopen
+C----------------------------------------------------------------------------*/
+
+      integer function hishdf(filename)
+	!MS$if defined(BUILD_HDF_DLL)
+	!MS$attributes dllexport :: hishdf
+	!MS$endif
+      character*(*) filename
+C      integer       hiishdf
+	INTERFACE
+        INTEGER FUNCTION hiishdf(filename, length)
+          !MS$ATTRIBUTES C,reference,alias:'_HIISHDF' :: hiishdf
+	    !DEC$ ATTRIBUTES reference :: filename
+          integer length
+	    character*(*) filename
+        END FUNCTION hiishdf
+      END INTERFACE
+      hishdf = hiishdf(filename, len(filename))
+      return
+      end

Modified: packages/libhdf4/branches/upstream/current/hdf/src/fort_ps/hprotop.h
===================================================================
--- packages/libhdf4/branches/upstream/current/hdf/src/fort_ps/hprotop.h	2007-05-15 09:05:29 UTC (rev 830)
+++ packages/libhdf4/branches/upstream/current/hdf/src/fort_ps/hprotop.h	2007-05-15 09:53:05 UTC (rev 831)
@@ -10,7 +10,7 @@
  *                                                                          *
  ****************************************************************************/
 
-/* $Id: hprotop.h,v 1.3 1998/02/02 21:46:23 smitchel Exp $ */
+/* $Id: hprotop.h,v 1.4 2005/01/09 20:54:27 mcgrath Exp $ */
 
 #ifndef _H_PROTO
 #define _H_PROTO
@@ -2551,28 +2551,6 @@
 
 extern intn GRPshutdown(void);
 
-/* For Pablo wrapper functions */
-
-#if defined HAVE_PABLO || defined PABLO
-extern int HDFinitIOTrace(char *traceFileName, intn detail, intn lifetime,
-                          intn timeWindow, float64 timeWindowSize,
-                          intn regionTrace, intn regionSize,
-                          uint16 procTraceMask );
-extern int HDFendIOTrace(VOID);
-
-#ifndef PABLO_FNAMES
-#   define PABLO_FNAMES
-#ifdef DF_CAPFNAMES
-#   define nihinitiotrace FNAME(IHINITIOTRACE)
-#   define nhendiotrace   FNAME(HENDIOTRACE)
-#else  /* !DF_CAPFNAMES */
-#   define nihinitiotrace FNAME(ihinitiotrace)
-#   define nhendiotrace   FNAME(hendiotrace)
-#endif /* DF_CAPFNAMES */
-#endif /* PABLO_FNAMES */
-
-#endif /* HAVE_PABLO || PABLO*/
-
 #ifdef HAVE_FMPOOL
 /******************************************************************************
 NAME

Modified: packages/libhdf4/branches/upstream/current/hdf/src/fort_ps/mfgrpf.c
===================================================================
--- packages/libhdf4/branches/upstream/current/hdf/src/fort_ps/mfgrpf.c	2007-05-15 09:05:29 UTC (rev 830)
+++ packages/libhdf4/branches/upstream/current/hdf/src/fort_ps/mfgrpf.c	2007-05-15 09:53:05 UTC (rev 831)
@@ -11,10 +11,10 @@
  ****************************************************************************/
 
 #ifdef RCSID
-static char RcsId[] = "@(#)$Revision: 1.4 $";
+static char RcsId[] = "@(#)$Revision: 1.8 $";
 #endif
 
-/* $Id: mfgrpf.c,v 1.4 2000/08/01 20:51:51 epourmal Exp $ */
+/* $Id: mfgrpf.c,v 1.8 2003/12/10 21:13:28 epourmal Exp $ */
 
 /*-----------------------------------------------------------------------------
  * File:    mfgrpf.c, based on mfgrf.c,v 1.7
@@ -1040,7 +1040,6 @@
 return(ret);
 
 }   
-//#if 0 /* Commented out for now  -EIP 12/29/97 */ 
 /*-----------------------------------------------------------------------------
  * Name:     mgcwcchnk
  * Purpose:  write the specified chunk of CHARACTER data to the GR 
@@ -1120,7 +1119,6 @@
        return(ret);
 
 } 
-//#endif /*Commented out for now -EIP 12/29/97 */
 /*-------------------------------------------------------------------------
  * Name:    mgcscompress
  * Puporse: Call GRsetcompress
@@ -1154,7 +1152,7 @@
 
 int32 riid;               /*  GR id               */
 comp_info c_info;         /* compression info     */
-int32 c_type;              /* compression type definition */
+comp_coder_t c_type;              /* compression type definition */
 
 int   i, CASE;
 intf ret;
@@ -1200,3 +1198,104 @@
 return(ret);
 
 }   
+/*-------------------------------------------------------------------------
+ * Name:    mgcgnluts
+ * Puporse: Call GRgetnluts
+ * Inputs:  id: image identifier
+ * Returns: number of palettes on success and -1 if fails.
+ * Users:   HDF Fortran programmers          
+ *-------------------------------------------------------------------------*/
+
+    FRETVAL (intf)
+#ifdef PROTOTYPE
+       nmgcgnluts(intf *id)
+#else
+       nmgcgnluts( id)
+       intf *id;
+#endif /* PROTOTYPE */
+{
+   intf ret = -1;
+   intn c_ret;
+
+   c_ret = GRgetnluts ( *id );
+   if(c_ret >= 0) ret = c_ret;
+   return(ret);
+}
+/*-------------------------------------------------------------------------
+ * Name:    mgcgcompress
+ * Puporse: Call GRgetcompress
+ * Inputs:  id: access id to GR
+ * Outputs: comp_type:  type of compression
+ *                      COMP_CODE_NONE = 0
+ *                      COMP_CODE_RLE  = 1
+ *                      COMP_CODE_SKPHUFF = 3
+ *                      COMP_CODE_DEFLATE = 4
+ *                      COMP_CODE_JPEG    = 7 
+ *          comp_prm:   compression parameters array
+ *          comp_prm[0]=skphuff_skp_size: size of individual elements for 
+ *                            Adaptive Huffman compression algorithm
+ *          comp_prm[0]=deflate_level:    GZIP  compression parameter
+ * Returns: 0 on success, -1 on failure with error set
+ * Users:   HDF Fortran programmers          
+ *-------------------------------------------------------------------------*/
+
+    FRETVAL (intf)
+#ifdef PROTOTYPE
+       nmgcgcompress(intf *id, intf *comp_type, intf *comp_prm)
+#else
+       nmgcgcompress( id, comp_type, comp_prm)
+       intf *id;
+       intf *comp_type;
+       intf *comp_prm;
+#endif /* PROTOTYPE */
+{
+    comp_info c_info;         /* compression info     */
+    comp_coder_t c_type;              /* compression type definition */
+
+    int CASE;
+    intf ret = -1;
+    intn c_ret;
+
+
+    c_ret = GRgetcompress(*id, &c_type, &c_info);
+
+    if (c_ret == 0) {
+    CASE = (int)c_type;
+    switch (CASE)  {
+
+       case COMP_CODE_NONE:       /* No compression */
+         *comp_type = 0;
+         ret = 0;
+         break;
+    
+       case COMP_CODE_RLE:             /* RLE compression */
+         *comp_type = 1;
+         ret = 0;
+         break;
+ 
+       case COMP_CODE_SKPHUFF:      /* Skipping Huffman encoding */
+          *comp_type = 3;
+          comp_prm[0] = (intf)c_info.skphuff.skp_size;
+          ret = 0;
+          break;
+
+       case COMP_CODE_DEFLATE:      /* GZIP compression */  
+          *comp_type = 4;
+          comp_prm[0] = (intf)c_info.deflate.level;
+          ret = 0;
+          break;
+
+       case COMP_CODE_JPEG:      /* JPEG compression */  
+          *comp_type = 7;
+          ret = 0;
+          break;
+
+       default:
+
+          return FAIL;
+                    
+     } /*end CASE */
+    } /*end if */
+    return(ret);
+
+}   

Modified: packages/libhdf4/branches/upstream/current/hdf/src/fort_ps/mfgrpff.f
===================================================================
--- packages/libhdf4/branches/upstream/current/hdf/src/fort_ps/mfgrpff.f	2007-05-15 09:05:29 UTC (rev 830)
+++ packages/libhdf4/branches/upstream/current/hdf/src/fort_ps/mfgrpff.f	2007-05-15 09:53:05 UTC (rev 831)
@@ -9,7 +9,7 @@
 C* hdf/COPYING file.                                                        *
 C*                                                                          *
 C****************************************************************************
-C $Id: mfgrpff.f,v 1.5 2000/08/01 20:51:51 epourmal Exp $
+C $Id: mfgrpff.f,v 1.8 2003/12/10 21:13:28 epourmal Exp $
 C
 C------------------------------------------------------------------------------
 C File:     mfgrpff.f
@@ -997,7 +997,7 @@
 C                            COMP_CODE_RLE =1
 C                            COMP_CODE_SKPHUFF = 3
 C                            COMP_CODE_DEFLATE = 4
-C                            COMP_CODE_JPEG    = 6 
+C                            COMP_CODE_JPEG    = 7 
 C                   comp_prm  - compression parameters array
 C                   Huffman:   comp_prm(1) = skphuff_skp_size
 C                   GZIP:      comp_prm(1) = deflate_level       
@@ -1025,3 +1025,65 @@
      .                              comp_prm)
          return
          end
+C-------------------------------------------------------------------------
+C        Name:      mggcompress
+C        Purpose:   gets compression information about GR image
+C        Inputs:    riid      - access ID to GR
+C        Outputs:  comp_type - type of compression
+C                   supports the following compression types:
+C                            ( see hcomp.h  file) 
+C                            COMP_CODE_NONE = 0
+C                            COMP_CODE_RLE =1
+C                            COMP_CODE_SKPHUFF = 3
+C                            COMP_CODE_DEFLATE = 4
+C                            COMP_CODE_JPEG    = 6
+C                   comp_prm  - compression parameters array
+C                   Huffman:   comp_prm(1) = skphuff_skp_size
+C                   GZIP:      comp_prm(1) = deflate_level       
+C        Returns:   0 on success, -1 on failure
+C        Calls:     mgcgcompress (C stub for GRgetcompress function)
+C-------------------------------------------------------------------------
+
+         INTEGER function mggcompress(riid, comp_type, comp_prm)
+	!MS$if defined(BUILD_HDF_DLL)
+	!MS$attributes dllexport :: mggcompress
+	!MS$endif
+
+         INTEGER riid, comp_type, comp_prm(1)
+      INTERFACE
+        INTEGER FUNCTION mgcgcompress(riid, comp_type, comp_prm)
+          !MS$ATTRIBUTES C,reference,alias:'_MGCGCOMPRESS'::mgcgcompress
+          integer riid, comp_type, comp_prm(1)
+        END FUNCTION mgcgcompress
+      END INTERFACE
+
+         mggcompress = mgcgcompress(riid, comp_type,
+     .                              comp_prm)
+         return
+         end
+C-------------------------------------------------------------------------
+C        Name:      mggnluts
+C        Purpose:   gets number of palettes (LUTs) for an image
+C        Inputs:    riid      - access ID to GR
+C        Returns:   Number of palettes on success (0 or 1), -1 on failure
+C        Calls:     mgcgnluts (C stub for GRgetnluts function)
+C-------------------------------------------------------------------------
+
+         INTEGER function mggnluts(riid)
+	!MS$if defined(BUILD_HDF_DLL)
+	!MS$attributes dllexport :: mggnluts
+	!MS$endif
+
+         INTEGER riid
+      INTERFACE
+        INTEGER FUNCTION mgcgnluts(riid) 
+          !MS$ATTRIBUTES C,reference,alias:'_MGCGNLUTS'::mgcgnluts
+          integer riid
+        END FUNCTION mgcgnluts
+      END INTERFACE
+
+         mggnluts = mgcgnluts(riid)
+         return
+         end
+
+           

Modified: packages/libhdf4/branches/upstream/current/hdf/src/fort_ps/vgpf.c
===================================================================
--- packages/libhdf4/branches/upstream/current/hdf/src/fort_ps/vgpf.c	2007-05-15 09:05:29 UTC (rev 830)
+++ packages/libhdf4/branches/upstream/current/hdf/src/fort_ps/vgpf.c	2007-05-15 09:53:05 UTC (rev 831)
@@ -11,10 +11,10 @@
  ****************************************************************************/
 
 #ifdef RCSID
-static char RcsId[] = "@(#)$Revision: 1.3 $";
+static char RcsId[] = "@(#)$Revision: 1.5 $";
 #endif
 
-/* $Id: vgpf.c,v 1.3 1998/06/23 20:27:46 epourmal Exp $ */
+/* $Id: vgpf.c,v 1.5 2001/09/27 15:55:07 epourmal Exp $ */
 
 /*
    *
@@ -1435,3 +1435,86 @@
        HDfree(class_name);
        return(ret);
 } 
+/*------------------------------------------------------------------------
+ *       Name:      vscsetblsz
+ *       Purpose:   calls VSsetblocksize
+ *       Inputs:    id    -  vdata identifier
+ *                  block_size - size of the block
+ *       Returns:   0 if succeeds, -1 if fails
+ *       Users:     HDF Fortran programmers
+ ---------------------------------------------------------------------*/
+     FRETVAL (intf)
+#ifdef PROTOTYPE
+       nvscsetblsz( intf *id , intf *block_size)
+#else
+       nvscsetblsz (id, block_size)
+               intf   *id;
+               intf   *block_size;
+#endif /* PROTOTYPE */
+
+{
+       intf  ret = -1;
+       intn c_ret;	
+
+       c_ret = VSsetblocksize( *id, *block_size);
+       if(c_ret == 0) ret = 0;
+       return(ret);
+} 
+/*------------------------------------------------------------------------
+ *       Name:      vscsetnmbl
+ *       Purpose:   calls VSsetnumblocks
+ *       Inputs:    id    -  vdata identifier
+ *                  num_blocks - number of blocks
+ *       Returns:   0 if succeeds, -1 if fails
+ *       Users:     HDF Fortran programmers
+ ---------------------------------------------------------------------*/
+     FRETVAL (intf)
+#ifdef PROTOTYPE
+       nvscsetnmbl( intf *id , intf *num_blocks)
+#else
+       nvscsetnmbl (id, num_blocks)
+               intf   *id;
+               intf   *num_blocks;
+#endif /* PROTOTYPE */
+
+{
+       intf  ret;
+       intn  c_ret;
+
+       c_ret = VSsetnumblocks( *id, *num_blocks);
+       if(c_ret == 0) ret = 0;
+       return(ret);
+} 
+/*------------------------------------------------------------------------
+ *       Name:      vscgblinfo
+ *       Purpose:   calls VSgetblockinfo
+ *       Inputs:    id    -  vdata identifier
+ *                  block_size - size of the block
+ *                  num_blocks - number of blocks
+ *       Returns:   0 if succeeds, -1 if fails
+ *       Users:     HDF Fortran programmers
+ ---------------------------------------------------------------------*/
+     FRETVAL (intf)
+#ifdef PROTOTYPE
+       nvscgblinfo( intf *id , intf *block_size, intf *num_blocks)
+#else
+       nvscgblinfo (id, block_size, num_blocks)
+               intf   *id;
+               intf   *block_size; 
+               intf   *num_blocks;
+#endif /* PROTOTYPE */
+
+{
+       intf  ret = -1;
+        intn c_ret;
+	int32 c_block_size;
+        int32 c_num_blocks;
+
+       c_ret = VSgetblockinfo( *id, &c_block_size, &c_num_blocks);
+       if (c_ret == 0) {
+       		*block_size = c_block_size;
+       	        *num_blocks = c_num_blocks;
+       	      	ret = 0;
+       }
+       return(ret);
+} 

Modified: packages/libhdf4/branches/upstream/current/hdf/src/fort_ps/vgpff.f
===================================================================
--- packages/libhdf4/branches/upstream/current/hdf/src/fort_ps/vgpff.f	2007-05-15 09:05:29 UTC (rev 830)
+++ packages/libhdf4/branches/upstream/current/hdf/src/fort_ps/vgpff.f	2007-05-15 09:53:05 UTC (rev 831)
@@ -10,7 +10,7 @@
 C*                                                                          *
 C****************************************************************************
 C
-C $Id: vgpff.f,v 1.3 1998/07/20 13:30:24 epourmal Exp $ 
+C $Id: vgpff.f,v 1.6 2001/09/27 15:55:07 epourmal Exp $ 
 C     
 c **************************************************************************
 c *
@@ -1794,3 +1794,86 @@
          end
  
 
+C-------------------------------------------------------------------------
+C        Name:      vsfsetblsz
+C        Purpose:   sets the block size of the linked-block element
+C        Inputs:    id       -  vdata identifier
+C                   block_size - size of each block
+C        Returns:   returns 0 if succeeds and -1 if fails
+C        Calls:     vscsetblsz (C stub for VSsetblocksize function)
+C        Users:     HDF Fortran programmers
+C-------------------------------------------------------------------------
+
+         INTEGER function vsfsetblsz(id, block_size)
+C
+	!MS$if defined(BUILD_HDF_DLL)
+	!MS$attributes dllexport :: vsfsetblsz
+	!MS$endif
+         INTEGER id, block_size
+C
+      INTERFACE
+        INTEGER FUNCTION vscsetblsz(id, block_size)
+          !MS$ATTRIBUTES C,reference,alias:'_VSCSETBLSZ' :: vscsetblsz
+          integer id, block_size
+        END FUNCTION vscsetblsz
+      END INTERFACE
+         vsfsetblsz = vscsetblsz(id, block_size) 
+         return 
+         end
+
+C-------------------------------------------------------------------------
+C        Name:      vsfsetnmbl
+C        Purpose:   sets the number of blocks for a linked-block element
+C        Inputs:    id       -  vdata identifier
+C                   num_blocks - number of blocks to be used for the linked-block
+C                                elements
+C        Returns:   returns 0 if succeeds and -1 if fails
+C        Calls:     vscsetnmbl (C stub for VSsetnumblocks function)
+C        Users:     HDF Fortran programmers
+C-------------------------------------------------------------------------
+
+         INTEGER function vsfsetnmbl(id, num_blocks)
+C
+	!MS$if defined(BUILD_HDF_DLL)
+	!MS$attributes dllexport :: vsfsetnmbl
+	!MS$endif
+         INTEGER id, num_blocks
+      INTERFACE
+        INTEGER FUNCTION vscsetnmbl(id, num_blocks)
+          !MS$ATTRIBUTES C,reference,alias:'_VSCSETNMBL' :: vscsetnmbl
+          integer id, num_blocks
+        END FUNCTION vscsetnmbl
+      END INTERFACE
+C
+         vsfsetnmbl = vscsetnmbl(id, num_blocks) 
+         return 
+         end
+
+C-------------------------------------------------------------------------
+C        Name:      vsfgetblinfo
+C        Purpose:   retrieves the block size and the number of blocks
+C                   of a linked-block element.
+C        Inputs:    id       -  vdata identifier
+C        Outputs:   block_size - the linked-block size
+C                   num_blocks - number of blocks the element has
+C        Returns:   returns 0 if succeeds and -1 if fails
+C        Calls:     vscgetblinfo (C stub for VSgetblockinfo function)
+C        Users:     HDF Fortran programmers
+C-------------------------------------------------------------------------
+
+         INTEGER function vsfgetblinfo(id, block_size, num_blocks)
+C
+	!MS$if defined(BUILD_HDF_DLL)
+	!MS$attributes dllexport :: vsfgetblinfo
+	!MS$endif
+         INTEGER id, num_blocks, block_size
+C
+      INTERFACE
+        INTEGER FUNCTION vscgblinfo(id, block_size, num_blocks)
+          !MS$ATTRIBUTES C,reference,alias:'_VSCGBLINFO' :: vscgblinfo
+          integer id, block_size, num_blocks
+        END FUNCTION vscgblinfo
+      END INTERFACE
+         vsfgetblinfo = vscgblinfo(id, block_size, num_blocks) 
+         return 
+         end

Added: packages/libhdf4/branches/upstream/current/hdf/src/h4config.h.in
===================================================================
--- packages/libhdf4/branches/upstream/current/hdf/src/h4config.h.in	                        (rev 0)
+++ packages/libhdf4/branches/upstream/current/hdf/src/h4config.h.in	2007-05-15 09:53:05 UTC (rev 831)
@@ -0,0 +1,88 @@
+/* hdf/src/h4config.h.in.  Generated from configure.ac by autoheader.  */
+
+/* Define to 1 if your Fortran 77 compiler doesn't accept -c and -o together.
+   */
+#undef F77_NO_MINUS_C_MINUS_O
+
+/* Define to 1 if you have the <inttypes.h> header file. */
+#undef HAVE_INTTYPES_H
+
+/* Define to 1 if you have the <jpeglib.h> header file. */
+#undef HAVE_JPEGLIB_H
+
+/* Define to 1 if you have the `jpeg' library (-ljpeg). */
+#undef HAVE_LIBJPEG
+
+/* Define to 1 if you have the `sz' library (-lsz). */
+#undef HAVE_LIBSZ
+
+/* Define to 1 if you have the `z' library (-lz). */
+#undef HAVE_LIBZ
+
+/* Define to 1 if you have the <memory.h> header file. */
+#undef HAVE_MEMORY_H
+
+/* Define to 1 if you have the <stdint.h> header file. */
+#undef HAVE_STDINT_H
+
+/* Define to 1 if you have the <stdlib.h> header file. */
+#undef HAVE_STDLIB_H
+
+/* Define to 1 if you have the <strings.h> header file. */
+#undef HAVE_STRINGS_H
+
+/* Define to 1 if you have the <string.h> header file. */
+#undef HAVE_STRING_H
+
+/* Define to 1 if you have the <sys/stat.h> header file. */
+#undef HAVE_SYS_STAT_H
+
+/* Define to 1 if you have the <sys/types.h> header file. */
+#undef HAVE_SYS_TYPES_H
+
+/* Define to 1 if you have the <szlib.h> header file. */
+#undef HAVE_SZLIB_H
+
+/* Define to 1 if you have the <unistd.h> header file. */
+#undef HAVE_UNISTD_H
+
+/* Define to 1 if you have the <zlib.h> header file. */
+#undef HAVE_ZLIB_H
+
+/* Define to 1 if your C compiler doesn't accept -c and -o together. */
+#undef NO_MINUS_C_MINUS_O
+
+/* Name of package */
+#undef PACKAGE
+
+/* Define to the address where bug reports for this package should be sent. */
+#undef PACKAGE_BUGREPORT
+
+/* Define to the full name of this package. */
+#undef PACKAGE_NAME
+
+/* Define to the full name and version of this package. */
+#undef PACKAGE_STRING
+
+/* Define to the one symbol short name of this package. */
+#undef PACKAGE_TARNAME
+
+/* Define to the version of this package. */
+#undef PACKAGE_VERSION
+
+/* The size of a `int*', as computed by sizeof. */
+#undef SIZEOF_INTP
+
+/* Define to 1 if you have the ANSI C header files. */
+#undef STDC_HEADERS
+
+/* Version number of package */
+#undef VERSION
+
+/* Define to 1 if your processor stores words with the most significant byte
+   first (like Motorola and SPARC, unlike Intel and VAX). */
+#undef WORDS_BIGENDIAN
+
+/* Define to 1 if `lex' declares `yytext' as a `char *' by default, not a
+   `char[]'. */
+#undef YYTEXT_POINTER

Modified: packages/libhdf4/branches/upstream/current/hdf/src/hbitio.c
===================================================================
--- packages/libhdf4/branches/upstream/current/hdf/src/hbitio.c	2007-05-15 09:05:29 UTC (rev 830)
+++ packages/libhdf4/branches/upstream/current/hdf/src/hbitio.c	2007-05-15 09:53:05 UTC (rev 831)
@@ -11,15 +11,11 @@
  ****************************************************************************/
 
 #ifdef RCSID
-static char RcsId[] = "@(#)$Revision: 1.41 $";
+static char RcsId[] = "@(#)$Revision: 1.42 $";
 #endif
 
-/* $Id: hbitio.c,v 1.41 1999/06/16 21:10:51 dwells Exp $ */
+/* $Id: hbitio.c,v 1.42 2005/01/09 20:53:51 mcgrath Exp $ */
 
-#ifdef HAVE_PABLO
-#define PABLO_mask ID_hbitio_c
-#endif
- 
 /*
 FILE
    hbitio.c
@@ -784,10 +780,6 @@
     CONSTR(FUNC, "HIbitstart");    /* for HERROR */
     intn        ret_value = SUCCEED;
 
-#ifdef HAVE_PABLO
-  TRACE_ON(PABLO_mask,ID_HIbitstart);
-#endif /* HAVE_PABLO */
-
     /* Don't call this routine again... */
     library_terminate = TRUE;
 
@@ -802,10 +794,6 @@
     } /* end if */
 
   /* Normal function cleanup */
-#ifdef HAVE_PABLO
-  TRACE_OFF(PABLO_mask,ID_HIbitstart);
-#endif /* HAVE_PABLO */
-
     return(ret_value);
 } /* end HIbitstart() */
 

Modified: packages/libhdf4/branches/upstream/current/hdf/src/hblocks.c
===================================================================
--- packages/libhdf4/branches/upstream/current/hdf/src/hblocks.c	2007-05-15 09:05:29 UTC (rev 830)
+++ packages/libhdf4/branches/upstream/current/hdf/src/hblocks.c	2007-05-15 09:53:05 UTC (rev 831)
@@ -11,15 +11,11 @@
  ****************************************************************************/
 
 #ifdef RCSID
-static char RcsId[] = "@(#)$Revision: 1.63 $";
+static char RcsId[] = "@(#)$Revision: 1.67 $";
 #endif
 
-#ifdef HAVE_PABLO
-#define PABLO_mask ID_hblocks_c
-#endif
+/* $Id: hblocks.c,v 1.67 2005/01/09 20:53:52 mcgrath Exp $ */
 
-/* $Id: hblocks.c,v 1.63 1999/06/16 21:10:52 dwells Exp $ */
-
 /*LINTLIBRARY */
 /* ------------------------------ hblocks.c -------------------------------
    routines to implement linked-block elements
@@ -245,10 +241,6 @@
     uint8       local_ptbuf[16];
     int32       ret_value = SUCCEED;
 
-#ifdef HAVE_PABLO
-  TRACE_ON(PABLO_mask,ID_HLcreate);
-#endif /* HAVE_PABLO */
-
 #ifdef QAK
 printf("%s: block_length=%ld, number_blocks=%ld\n",FUNC,block_length,number_blocks);
 #endif /* QAK */
@@ -392,10 +384,6 @@
     } /* end if */
 
   /* Normal function cleanup */
-#ifdef HAVE_PABLO
-  TRACE_OFF(PABLO_mask,ID_HLcreate);
-#endif /* HAVE_PABLO */
-
   return ret_value;
 } /* HLcreate() */
 
@@ -458,10 +446,6 @@
     int32       old_posn;       /* position in the access element */
     intn        ret_value = SUCCEED;
 
-#ifdef HAVE_PABLO
-  TRACE_ON(PABLO_mask,ID_HLconvert);
-#endif /* HAVE_PABLO */
-
 #ifdef QAK
 printf("%s: block_length=%ld, number_blocks=%ld\n",FUNC,block_length,number_blocks);
 #endif /* QAK */
@@ -596,10 +580,6 @@
     } /* end if */
 
   /* Normal function cleanup */
-#ifdef HAVE_PABLO
-  TRACE_OFF(PABLO_mask,ID_HLconvert);
-#endif /* HAVE_PABLO */
-
   return ret_value;
 }   /* end HLconvert() */
 
@@ -1212,8 +1192,7 @@
 {
     CONSTR(FUNC, "HLPwrite");   /* for HERROR */
     const uint8      *data = datap;
-    filerec_t  *file_rec =      /* file record */
-        HAatom_object(access_rec->file_id);
+    filerec_t  *file_rec;       /* file record */
     int32       dd_aid;         /* AID for writing the special info */
     uint16      data_tag, data_ref;  /* Tag/ref of the data in the file */
     linkinfo_t *info =          /* linked blocks information record */
@@ -1223,7 +1202,7 @@
     int32       relative_posn = /* relative position in linked block */
         access_rec->posn;
     int32       block_idx;      /* block table index of current block */
-    link_t     *prev_link = NULL;   /* ptr to block table before current block table.
+    link_t     *prev_link = NULL; /* ptr to block table before current block table.
                                        for groking the offset of
                                        current block table */
     int32       current_length; /* length of current block */
@@ -1232,6 +1211,9 @@
     uint8       local_ptbuf[4];
     int32       ret_value = SUCCEED;
 
+    /* convert file id to file record */
+    file_rec = HAatom_object(access_rec->file_id);
+
 #ifdef QAK
 printf("%s: length=%d\n",FUNC,(int)length);
 printf("%s: info->first_length=%d\n",FUNC,(int)info->first_length);
@@ -1660,10 +1642,12 @@
 HLPendaccess(accrec_t * access_rec)
 {
     CONSTR(FUNC, "HLPendaccess");   /* for HERROR */
-    filerec_t  *file_rec =      /* file record */
-        HAatom_object(access_rec->file_id);
+    filerec_t  *file_rec;           /* file record */
     intn      ret_value = SUCCEED;
 
+    /* convert file id to file record */
+    file_rec = HAatom_object(access_rec->file_id);
+
     /* detach the special information record.
        If no more references to that, free the record */
     HLPcloseAID(access_rec);
@@ -1800,3 +1784,135 @@
 
   return ret_value;
 }   /* HLPinfo */
+
+/*--------------------------------------------------------------------------
+NAME
+   HLsetblocksize -- set the block length of a linked-block element
+
+USAGE
+   intn HLsetblockinfo(
+   int32 aid		IN: access record id
+   int32 block_size	IN: length to be used for each linked-block 
+   int32 num_blocks	IN: number of blocks the element will have
+
+RETURNS
+   SUCCEED / FAIL
+
+DESCRIPTION
+   HLsetblocksize sets (accrec_t).block_size and (accrec_t).num_blocks
+   to block_size and num_blocks, respectively.  An error will occur, if
+   either of the parameters is a 0 or a negative number, that is not
+   -1, which is used to indicate that the respective field is not to be
+   changed.
+
+   In the library, this routine is used by:
+	VSsetblocksize 
+	VSsetnumblocks
+
+MODIFICATION
+   BMR - added in June 2001 to fix bug# 267
+
+--------------------------------------------------------------------------*/
+intn
+HLsetblockinfo(int32 aid,	/* access record id */
+              int32 block_size, /* length to be used for each linked-block */
+              int32 num_blocks) /* number of blocks the element will have */
+{
+    CONSTR(FUNC, "HLsetblockinfo");  	/* for HERROR */
+    accrec_t   *access_rec;               /* access record */
+    intn	ret_value = SUCCEED;
+
+    /* clear error stack */
+    HEclear();
+
+    /* validate aid */
+    if (HAatom_group(aid)!=AIDGROUP)
+        HGOTO_ERROR(DFE_ARGS, FAIL);
+
+    /* block_size and num_blocks should be either -1, to keep the original 
+       values, or positive values to change the block size and/or the 
+       number of blocks */ 
+    if ((block_size <= 0 && block_size != -1) || 
+        (num_blocks <= 0 && num_blocks != -1))
+        HGOTO_ERROR(DFE_ARGS, FAIL);
+
+    /* get the access record */
+    if ((access_rec = HAatom_object(aid)) == NULL)        
+        HGOTO_ERROR(DFE_ARGS, FAIL);
+
+    /* change the linked-block size if requested */
+    if (block_size != -1)
+        access_rec->block_size = block_size;
+
+    /* change the number of linked-blocks if requested */
+    if (num_blocks != -1)
+        access_rec->num_blocks = num_blocks;
+
+done:
+    if(ret_value == FAIL)
+    { /* Error condition cleanup */
+
+    } /* end if */
+
+  /* Normal function cleanup */
+    return ret_value;
+}       /* end HLsetblockinfo */
+
+/*--------------------------------------------------------------------------
+NAME
+   HLgetblocksize -- get the block size and the number of blocks of a 
+		    linked-block element
+
+USAGE
+   intn HLgetblockinfo(aid, block_size, num_blocks)
+   int32  aid		IN: access record id
+   int32* block_size	OUT: the returned block size of each linked-block 
+   int32* num_blocks	OUT: the returned number of blocks of the element
+
+RETURNS
+   SUCCEED / FAIL
+
+DESCRIPTION
+   HLgetblocksize retrieves the values of (accrec_t).block_size and 
+   (accrec_t).num_blocks to block_size and num_blocks, respectively.  
+   A NULL can be passed in for an unwanted value.
+
+   In the library, this routine is used by:
+	VSgetblockinfo 
+
+MODIFICATION
+   BMR - added in June 2001 to fix bug# 267
+
+--------------------------------------------------------------------------*/
+intn
+HLgetblockinfo(int32 aid,	/* access record id */
+              int32* block_size, /* length being used for each linked-block */
+              int32* num_blocks) /* number of blocks the element will have */
+{
+    CONSTR(FUNC, "HLgetblockinfo");  /* for HERROR */
+    accrec_t   *access_rec;               /* access record */
+    intn	ret_value = SUCCEED;
+
+    /* clear error stack */
+    HEclear();
+
+    /* get the access record */
+    if ((access_rec = HAatom_object(aid)) == NULL)        
+        HGOTO_ERROR(DFE_ARGS, FAIL);
+
+    /* get the linked-block size and the number of linked-blocks if requested */
+    if (block_size != NULL)
+        *block_size = access_rec->block_size;
+    if (num_blocks != NULL)
+        *num_blocks = access_rec->num_blocks;
+
+done:
+    if(ret_value == FAIL)
+    { /* Error condition cleanup */
+
+    } /* end if */
+
+  /* Normal function cleanup */
+    return ret_value;
+}       /* end HLgetblockinfo */
+

Modified: packages/libhdf4/branches/upstream/current/hdf/src/hbuffer.c
===================================================================
--- packages/libhdf4/branches/upstream/current/hdf/src/hbuffer.c	2007-05-15 09:05:29 UTC (rev 830)
+++ packages/libhdf4/branches/upstream/current/hdf/src/hbuffer.c	2007-05-15 09:53:05 UTC (rev 831)
@@ -11,14 +11,10 @@
  ****************************************************************************/
 
 #ifdef RCSID
-static char RcsId[] = "@(#)$Revision: 1.6 $";
+static char RcsId[] = "@(#)$Revision: 1.8 $";
 #endif
 
-/* $Id: hbuffer.c,v 1.6 1999/06/16 21:10:55 dwells Exp $ */
-#ifdef HAVE_PABLO
-#define PABLO_mask ID_hbuffer_c
-#endif
-
+/* $Id: hbuffer.c,v 1.8 2005/01/10 19:38:18 mcgrath Exp $ */
 /*LINTLIBRARY */
 /* ------------------------------ hbuffer.c -------------------------------
 
@@ -125,10 +121,6 @@
     int32       data_len;		/* length of the data we are checking */
     intn        ret_value = SUCCEED;
 
-#ifdef HAVE_PABLO
-    TRACE_ON(PABLO_mask,ID_HBconvert);
-#endif /* HAVE_PABLO */
-    /* clear error stack and validate args */
     HEclear();
     if ((access_rec = HAatom_object(aid)) == NULL)	/* get the access_rec pointer */
         HGOTO_ERROR(DFE_ARGS, FAIL);
@@ -219,10 +211,7 @@
     { /* Error condition cleanup */
     } /* end if */
 
-#ifdef HAVE_PABLO
-    TRACE_OFF(PABLO_mask,ID_HBconvert);
-#endif /* HAVE_PABLO */
-  return ret_value; 
+  return ret_value;
 } /* HBconvert */
 
 /* ------------------------------ HBPstread ------------------------------- */

Modified: packages/libhdf4/branches/upstream/current/hdf/src/hchunks.c
===================================================================
--- packages/libhdf4/branches/upstream/current/hdf/src/hchunks.c	2007-05-15 09:05:29 UTC (rev 830)
+++ packages/libhdf4/branches/upstream/current/hdf/src/hchunks.c	2007-05-15 09:53:05 UTC (rev 831)
@@ -11,15 +11,11 @@
  ****************************************************************************/
 
 #ifdef RCSID
-static char RcsId[] = "@(#)$Revision: 1.31 $";
+static char RcsId[] = "@(#)$Revision: 1.38 $";
 #endif
 
-/* $Id: hchunks.c,v 1.31 1999/06/16 21:10:55 dwells Exp $ */
+/* $Id: hchunks.c,v 1.38 2005/01/09 20:53:54 mcgrath Exp $ */
 
-#ifdef HAVE_PABLO
-#define PABLO_mask ID_hchunks_c
-#endif
-
 /*LINTLIBRARY */
 /* ------------------------------ HMCxxx -------------------------------
    Routines to implement chunked elements via a Vdatas for
@@ -223,6 +219,7 @@
    HMCPinquire     -- Hinquire for chunked element
    HMCPendacess    -- close a chunked element AID
    HMCPinfo        -- return info about a chunked element
+   HMCPgetnumrecs  -- get the number of records in a chunked element
 
    TBBT helper rotuines
    -------------------
@@ -957,7 +954,7 @@
     chunkinfo_t *info    = NULL;     /* information about data elt */
     int32       dd_aid;              /* AID for writing the special info */
     uint16      data_tag, data_ref;  /* Tag/ref of the data in the file */
-    uint8       local_ptbuf[4];      /* 4 bytes for special header length */
+    uint8       local_ptbuf[6];      /* 6 bytes for special header length */
 #if 0
     uint8       *c_sp_header = NULL;   /* special element header(dynamic) */
 #endif
@@ -971,12 +968,13 @@
     CHUNK_REC   *chkptr = NULL;      /* Chunk record */
     int32       *chk_key   = NULL;   /* chunk key */
     int32       npages     = 1;      /* number of chunks */
+    int32       chunks_needed;       /* default chunk cache size  */
     int32       access_aid = FAIL;   /* access id */
     int32       ret_value = SUCCEED;
     char        name[VSNAMELENMAX + 1];  /* Vdata name */
     char        class[VSNAMELENMAX + 1]; /* Vdata class */
     char        v_class[VSNAMELENMAX + 1] = ""; /* Vdata class for comparison */
-    intn        j,k;                     /* loop indicies */
+    intn        i,j,k;                     /* loop indicies */
 
     /* Check args */
     if (access_rec == NULL)
@@ -1375,11 +1373,15 @@
 
           /* create chunk cache with 'maxcache' set to the number of chunks
              along the last dimension i.e subscript changes the fastest*/
+	  chunks_needed = 1;
+	  for (i = 1; i < info->ndims; i++) {
+		chunks_needed *= info->ddims[i].num_chunks;
+	  }
           if ((info->chk_cache = 
                mcache_open(&access_rec->file_id,                   /* cache key */
                            access_aid,                             /* object id */
                            (info->chunk_size*info->nt_size),       /* chunk size */
-                           info->ddims[info->ndims -1].num_chunks, /* maxcache */
+                           chunks_needed, /* maxcache */
                            npages,                                 /* num chunks */
                            0                                       /* flags */)) 
               == NULL)
@@ -1523,6 +1525,7 @@
     chunkinfo_t *info      = NULL; /* information for the chunked elt */
     uint8       *c_sp_header = NULL; /* special element header */
     int32       npages     = 1;    /* i.e. number of chunks in element */
+    int32       chunks_needed;     /* default size of chunk cache */
     int32       access_aid = FAIL; /* access id */
     uint16      chktbl_ref;        /* the ref of the link structure
                                       chunk table i.e. Vdata */
@@ -1535,10 +1538,6 @@
     char        v_class[VSNAMELENMAX + 1] = ""; /* Vdata class */
     intn        i;                 /* loop index */
 
-#ifdef HAVE_PABLO
-    TRACE_ON(PABLO_mask,ID_HMCcreate);
-#endif /* HAVE_PABLO */
-
     /* shut compiler up */
     nlevels=nlevels;
 
@@ -1933,12 +1932,16 @@
     /* register this valid access record for the chunked element */
     access_aid = HAregister_atom(AIDGROUP,access_rec);
 
+    chunks_needed = 1;
+    for (i = 1; i < info->ndims; i++) {
+	chunks_needed *= info->ddims[i].num_chunks;
+    }
     /* create chunk cache */
     if ((info->chk_cache = 
          mcache_open(&access_rec->file_id,                   /* cache key */
                      access_aid,                             /* object id */
                      (info->chunk_size*info->nt_size),       /* chunk size */
-                     info->ddims[info->ndims -1].num_chunks, /* maxcache */
+                     chunks_needed, /* maxcache */
                      npages,                                 /* num chunks */
                      0                                       /* flags */)) 
         == NULL)
@@ -2005,14 +2008,63 @@
     if (c_sp_header != NULL)
         HDfree(c_sp_header);
 
-#ifdef HAVE_PABLO
-        TRACE_OFF(PABLO_mask, ID_HMCcreate);
-#endif /* HAVE_PABLO */
-
     return ret_value;
 } /* HMCcreate() */
 
+/*--------------------------------------------------------------------------
+NAME
+     HMCgetcompress - get compression information for chunked element
 
+DESCRIPTION
+     Checks if the given element is compressed then get the compression
+     information using HCPdecode_header.
+     This routine is used by HCgetcompress for the chunked element part.
+
+RETURNS
+     Returns SUCCEED/FAIL
+
+REVISION LOG
+     September 2001: Added to fix bug #307 - BMR
+
+-------------------------------------------------------------------------- */
+int32
+HMCgetcompress( accrec_t*    access_rec, /* IN: access record */
+		comp_coder_t* comp_type, /* OUT: compression type */
+		comp_info* c_info)       /* OUT: retrieved compression info */
+{
+    CONSTR(FUNC, "HMCgetcompress");   /* for HERROR */
+    chunkinfo_t *info = NULL;   /* chunked element information record */
+    model_info  m_info;         /* modeling information - dummy */
+    comp_model_t model_type;    /* modeling type - dummy */
+    int32       ret_value = SUCCEED;
+
+    /* Get the special info from the given record */
+    info = (chunkinfo_t *) access_rec->special_info;
+    if (info == NULL) HGOTO_ERROR(DFE_COMPINFO, FAIL);
+
+    /* If this chunked element is compressed, retrieve its comp info */
+    if (info->flag == SPECIAL_COMP)
+    {
+        /* Decode header from storage */
+        ret_value = HCPdecode_header((uint8 *)info->comp_sp_tag_header,
+                 &model_type, &m_info, /* dummy */ 
+		 comp_type, c_info);
+    }
+    /* It's not compressed */
+    else
+	*comp_type = COMP_CODE_NONE;
+
+  done:
+    if(ret_value == FAIL)
+      { /* Error condition cleanup */
+
+      } /* end if */
+
+    /* Normal function cleanup */
+    return ret_value;
+} /* HMCgetcompress() */
+
+
 /*--------------------------------------------------------------------------
 NAME
      HMCsetMaxcache - maximum number of chunks to cache 
@@ -2055,10 +2107,6 @@
     chunkinfo_t *info       = NULL;   /* chunked element information record */
     int32       ret_value = SUCCEED;
 
-#ifdef HAVE_PABLO
-    TRACE_ON(PABLO_mask,ID_HMCsetMaxcache);
-#endif /* HAVE_PABLO */
-
     /* shut compiler up */
     flags=flags;
 
@@ -2096,10 +2144,6 @@
       } /* end if */
 
     /* Normal function cleanup */
-#ifdef HAVE_PABLO
-        TRACE_OFF(PABLO_mask, ID_HMCsetMaxcache);
-#endif /* HAVE_PABLO */
-
     return ret_value;
 } /* HMCsetMaxcache() */
 
@@ -2121,16 +2165,8 @@
 {
     int32 ret_value;
 
-#ifdef HAVE_PABLO
-    TRACE_ON(PABLO_mask,ID_HMCPstread);
-#endif /* HAVE_PABLO */
-
     ret_value = HMCIstaccess(access_rec, DFACC_READ);
 
-#ifdef HAVE_PABLO
-        TRACE_OFF(PABLO_mask, ID_HMCPstread);
-#endif /* HAVE_PABLO */
-
     return ret_value;
 }   /* HMCPstread */
 
@@ -2152,16 +2188,8 @@
 {
     int32  ret_value;
 
-#ifdef HAVE_PABLO
-    TRACE_ON(PABLO_mask,ID_HMCPstwrite);
-#endif /* HAVE_PABLO */
-
     ret_value = HMCIstaccess(access_rec, DFACC_WRITE);
 
-#ifdef HAVE_PABLO
-        TRACE_OFF(PABLO_mask, ID_HMCPstwrite);
-#endif /* HAVE_PABLO */
-
     return ret_value;
 }   /* HMCPstwrite */
 
@@ -2187,10 +2215,6 @@
     chunkinfo_t *info = NULL;    /* information for the chunked elt */
     int32   ret_value = SUCCEED;
 
-#ifdef HAVE_PABLO
-    TRACE_ON(PABLO_mask,ID_HMCPseek);
-#endif /* HAVE_PABLO */
-
 #ifdef CHK_DEBUG_3
     printf("HMCPseek called with offset %d \n",offset);
 #endif
@@ -2235,10 +2259,6 @@
       } /* end if */
 
     /* Normal function cleanup */
-#ifdef HAVE_PABLO
-        TRACE_OFF(PABLO_mask, ID_HMCPseek);
-#endif /* HAVE_PABLO */
-
     return ret_value;
 }   /* HMCPseek */
 
@@ -2274,10 +2294,6 @@
     int32       nitems = 1;        /* used in HDmemfill(), */
     int32       ret_value = SUCCEED;
 
-#ifdef HAVE_PABLO
-    TRACE_ON(PABLO_mask,ID_HMCPchunkread);
-#endif /* HAVE_PABLO */
-
     /* Check args */
     if (access_rec == NULL)
         HGOTO_ERROR(DFE_ARGS, FAIL);
@@ -2356,9 +2372,6 @@
       } /* end if */
 
     /* Normal function cleanup */
-#ifdef HAVE_PABLO
-        TRACE_OFF(PABLO_mask, ID_HMCPchunkread);
-#endif /* HAVE_PABLO */
 #ifdef CHK_DEBUG_3
     printf("HMCPchunkread exit with ret_value= %d \n",ret_value);
 #endif
@@ -2403,9 +2416,6 @@
     int32       ret_value = SUCCEED;
     intn        i;
 
-#ifdef HAVE_PABLO
-    TRACE_ON(PABLO_mask,ID_HMCreadChunk);
-#endif /* HAVE_PABLO */
 #ifdef CHK_DEBUG_5
     printf("HMCreadChunk: entered \n");
 #endif
@@ -2529,9 +2539,6 @@
 
     /* Normal function cleanup */
 
-#ifdef HAVE_PABLO
-        TRACE_OFF(PABLO_mask, ID_HMCreadChunk);
-#endif /* HAVE_PABLO */
 #ifdef CHK_DEBUG_5
     printf("HMCreadChunk: exited, ret=%d \n",ret_value);
 #endif
@@ -2577,10 +2584,6 @@
 #endif
     int32       ret_value = SUCCEED;
 
-#ifdef HAVE_PABLO
-    TRACE_ON(PABLO_mask,ID_HMCPread);
-#endif /* HAVE_PABLO */
-
 #ifdef CHK_DEBUG_3
     printf("HMCPread called with length %d \n",length);
 #endif
@@ -2730,10 +2733,6 @@
       } /* end if */
 
     /* Normal function cleanup */
-#ifdef HAVE_PABLO
-        TRACE_OFF(PABLO_mask, ID_HMCPread);
-#endif /* HAVE_PABLO */
-
     return ret_value;
 }   /* HMCPread  */
 
@@ -2775,10 +2774,6 @@
     int32       ret_value = SUCCEED;
     intn        k;                 /* loop index */
 
-#ifdef HAVE_PABLO
-    TRACE_ON(PABLO_mask,ID_HMCPchunkwrite);
-#endif /* HAVE_PABLO */
-
     /* Check args */
     if (access_rec == NULL)
         HGOTO_ERROR(DFE_ARGS, FAIL);
@@ -2829,6 +2824,10 @@
           printf(")\n");
 #endif
 
+          if (chkptr->chk_ref == 0) {
+                    /* out of ref numbers -- extremely fatal  */
+                    HGOTO_ERROR(DFE_NOREF, FAIL);
+          }
           /* Copy origin first to vdata record*/
           pntr = v_data;
           for (k = 0; k < info->ndims; k++)
@@ -2898,9 +2897,6 @@
     if (v_data != NULL)
         HDfree(v_data);
 
-#ifdef HAVE_PABLO
-        TRACE_OFF(PABLO_mask, ID_HMCPchunkwrite);
-#endif /* HAVE_PABLO */
 #ifdef CHK_DEBUG_4
     printf("HMCPchunkwrite exited with ret_value %d \n",ret_value);
 #endif
@@ -2951,9 +2947,6 @@
     intn        i;
 
 
-#ifdef HAVE_PABLO
-    TRACE_ON(PABLO_mask,ID_HMCwriteChunk);
-#endif /* HAVE_PABLO */
 #ifdef CHK_DEBUG_4
     printf("HMCwriteChunk: entered \n");
 #endif
@@ -3147,9 +3140,6 @@
 
     /* Normal function cleanup */
 
-#ifdef HAVE_PABLO
-        TRACE_OFF(PABLO_mask, ID_HMCwriteChunk);
-#endif /* HAVE_PABLO */
 #ifdef CHK_DEBUG_4
     printf("HMCwriteChunk: exited, ret=%d \n",ret_value);
 #endif
@@ -3203,10 +3193,6 @@
     intn         i;
 #endif
 
-#ifdef HAVE_PABLO_4
-    TRACE_ON(PABLO_mask,ID_HMCPwrite);
-#endif /* HAVE_PABLO */
-
 #ifdef CHK_DEBUG_4
     printf("HMCPwrite called with length %d \n",length);
 #endif
@@ -3409,9 +3395,6 @@
 
     /* Normal function cleanup */
 
-#ifdef HAVE_PABLO
-        TRACE_OFF(PABLO_mask, ID_HMCPwrite);
-#endif /* HAVE_PABLO */
 #ifdef CHK_DEBUG_4
     printf("HMCPwrite: exited, ret=%d \n",ret_value);
 #endif
@@ -3551,10 +3534,6 @@
     filerec_t   *file_rec = NULL;    /* file record */
     intn        ret_value = SUCCEED;
 
-#ifdef HAVE_PABLO
-    TRACE_ON(PABLO_mask,ID_HMCPendaccess);
-#endif /* HAVE_PABLO */
-
     /* validate arguments first */
     if (access_rec == NULL)
         HGOTO_ERROR(DFE_ARGS, FAIL);        
@@ -3592,10 +3571,6 @@
       } /* end if */
 
     /* Normal function cleanup */
-#ifdef HAVE_PABLO
-        TRACE_OFF(PABLO_mask, ID_HMCPendaccess);
-#endif /* HAVE_PABLO */
-
     return ret_value;
 }   /* HMCPendaccess */
 
@@ -3621,10 +3596,6 @@
     int32       ret_value = SUCCEED;
     intn        i;                  /* loop variable */
 
-#ifdef HAVE_PABLO
-    TRACE_ON(PABLO_mask,ID_HMCPinfo);
-#endif /* HAVE_PABLO */
-
     /* Check args */
     if (access_rec == NULL)
         HGOTO_ERROR(DFE_ARGS, FAIL);
@@ -3668,10 +3639,6 @@
 
     /* Normal function cleanup */
 
-#ifdef HAVE_PABLO
-        TRACE_OFF(PABLO_mask, ID_HMCPinfo);
-#endif /* HAVE_PABLO */
-
     return ret_value;
 }   /* HMCPinfo */
 
@@ -3705,10 +3672,6 @@
     chunkinfo_t *info = NULL;       /* special information record */
     int32       ret_value = SUCCEED;
 
-#ifdef HAVE_PABLO
-    TRACE_ON(PABLO_mask,ID_HMCPinquire);
-#endif /* HAVE_PABLO */
-
     /* Check args */
     if (access_rec == NULL)
         HGOTO_ERROR(DFE_ARGS, FAIL);
@@ -3745,9 +3708,49 @@
       } /* end if */
 
     /* Normal function cleanup */
-#ifdef HAVE_PABLO
-        TRACE_OFF(PABLO_mask, ID_HMCPinquire);
-#endif /* HAVE_PABLO */
+    return ret_value;
+}   /* HMCPinquire */
 
+/* -------------------------------------------------------------------------
+NAME
+   HMCPgetnumrecs -- get the number of records in a chunked element
+DESCRIPTION
+   Retrieves the number of records in a chunked element.  
+   This function was originally added for SDcheckempty/HDcheckempty to 
+   determine whether a chunked SDS has been written with data.
+RETURNS
+   SUCCEED/FAIL - FAIL when num_recs is NULL
+AUTHOR
+   bmribler - 10/3/2004
+---------------------------------------------------------------------------*/
+int32
+HMCPgetnumrecs(accrec_t* access_rec,	/* access record */
+               int32 *num_recs		/* OUT: length of the chunked elt */)
+{
+    CONSTR(FUNC, "HMCPgetnumrecs");	/* for HGOTO_ERROR */
+    chunkinfo_t *chunk_info = NULL;	/* chunked element information record */
+    int32       ret_value = SUCCEED;
+
+    /* Check args */
+    if (access_rec == NULL)
+        HGOTO_ERROR(DFE_ARGS, FAIL);
+
+    /* get the special info from the given record */
+    chunk_info = (chunkinfo_t *) access_rec->special_info;
+    if (chunk_info == NULL) HGOTO_ERROR(DFE_ARGS, FAIL);
+
+    if (num_recs)
+        *num_recs = chunk_info->num_recs;
+    else
+	ret_value = FAIL;
+
+  done:
+    if(ret_value == FAIL)   
+      { /* Error condition cleanup */
+
+      } /* end if */
+
+    /* Normal function cleanup */
     return ret_value;
-}   /* HMCPinquire */
+}   /* HMCPgetnumrecs */
+

Modified: packages/libhdf4/branches/upstream/current/hdf/src/hchunks.h
===================================================================
--- packages/libhdf4/branches/upstream/current/hdf/src/hchunks.h	2007-05-15 09:05:29 UTC (rev 830)
+++ packages/libhdf4/branches/upstream/current/hdf/src/hchunks.h	2007-05-15 09:53:05 UTC (rev 831)
@@ -10,7 +10,7 @@
  *                                                                          *
  ****************************************************************************/
 
-/* $Id: hchunks.h,v 1.18 1998/07/22 16:06:56 koziol Exp $ */
+/* $Id: hchunks.h,v 1.20 2004/10/31 06:40:13 bmribler Exp $ */
 
 /*-----------------------------------------------------------------------------
  * File:         hchunks.h
@@ -177,6 +177,11 @@
          HCHUNK_DEF *chk_array /* IN: structure describing chunk distribution
                                  can be an array? but we only handle 1 level */);
 
+    HDFLIBAPI int32 HMCgetcompress
+	(accrec_t* access_rec,    /* IN: access record */
+	 comp_coder_t* comp_type, /* OUT: compression type */
+         comp_info* c_info        /* OUT: retrieved compression info */);
+
     HDFLIBAPI int32 HMCsetMaxcache
         (int32 access_id, /* IN: access aid to mess with */
          int32 maxcache,  /* IN: max number of pages to cache */
@@ -254,6 +259,10 @@
          int16 *paccess,        /* OUT: access mode; */
          int16 *pspecial        /* OUT: special code; */);
 
+    extern int32 HMCPgetnumrecs
+        (accrec_t * access_rec, /* IN:  access record to return info about */
+         int32 *num_recs        /* OUT: length of the chunked elt */);
+
 #endif /* _HCHUNKS_MAIN_ */
 
 #if defined c_plusplus || defined __cplusplus

Modified: packages/libhdf4/branches/upstream/current/hdf/src/hcomp.c
===================================================================
--- packages/libhdf4/branches/upstream/current/hdf/src/hcomp.c	2007-05-15 09:05:29 UTC (rev 830)
+++ packages/libhdf4/branches/upstream/current/hdf/src/hcomp.c	2007-05-15 09:53:05 UTC (rev 831)
@@ -11,10 +11,10 @@
  ****************************************************************************/
 
 #ifdef RCSID
-static char RcsId[] = "@(#)$Revision: 1.57 $";
+static char RcsId[] = "@(#)$Revision: 1.68 $";
 #endif
 
-/* $Id: hcomp.c,v 1.57 1999/03/27 19:44:01 epourmal Exp $ */
+/* $Id: hcomp.c,v 1.68 2005/01/09 20:53:55 mcgrath Exp $ */
 
 /*
 FILE
@@ -155,8 +155,15 @@
 HCIinit_coder(int16 acc_mode, comp_coder_info_t * cinfo, comp_coder_t coder_type,
               comp_info * c_info)
 {
+    uint32 comp_info;
     CONSTR(FUNC, "HCIinit_coder");  /* for HERROR */
 
+    HCget_config_info(coder_type, &comp_info);
+    if ((comp_info & COMP_DECODER_ENABLED|COMP_ENCODER_ENABLED) == 0) {
+	/* coder not present?? */
+              HRETURN_ERROR(DFE_BADCODER, FAIL)
+    }
+
     switch (coder_type)
       {     /* determin the type of encoding */
           case COMP_CODE_NONE:      /* "none" (i.e. no) encoding */
@@ -188,29 +195,52 @@
               if(c_info->skphuff.skp_size<1)
                   HRETURN_ERROR(DFE_BADCODER, FAIL)
 
-              cinfo->coder_type = COMP_CODE_SKPHUFF;    /* set the coding type */
-              cinfo->coder_funcs = cskphuff_funcs;  /* set the skipping huffman func. ptrs */
+              /* set the coding type and the skipping huffman func. ptrs */
+              cinfo->coder_type = COMP_CODE_SKPHUFF;
+              cinfo->coder_funcs = cskphuff_funcs;
 
               /* copy encoding info */
               cinfo->coder_info.skphuff_info.skip_size = c_info->skphuff.skp_size;
               break;
 
           case COMP_CODE_DEFLATE:   /* gzip 'deflate' encoding */
-   /* valid deflate levels are from 0 to 9, this error checking
-      caused the problem in HDF4r1.2 , fixed by Apu Kapadia    
-              if(c_info->deflate.level<1 || c_info->deflate.level>9)
-   */
+	      /* valid deflate levels are from 0 to 9, this error checking
+		 caused the problem in HDF4r1.2 , fixed by Apu Kapadia    
+	      if(c_info->deflate.level<1 || c_info->deflate.level>9)
+	      */
               if(c_info->deflate.level<0 || c_info->deflate.level>9)
                   HRETURN_ERROR(DFE_BADCODER, FAIL)
 
-              cinfo->coder_type = COMP_CODE_DEFLATE;    /* set the coding type */
-              cinfo->coder_funcs = cdeflate_funcs;  /* set the gzip 'deflate' func. ptrs */
+              /* set the coding type and the gzip 'deflate' func. ptrs */
+              cinfo->coder_type = COMP_CODE_DEFLATE;
+              cinfo->coder_funcs = cdeflate_funcs;
 
               /* copy encoding info */
               if(acc_mode&DFACC_WRITE)
                   cinfo->coder_info.deflate_info.deflate_level = c_info->deflate.level;
               break;
 
+#ifdef H4_HAVE_LIBSZ
+           case COMP_CODE_SZIP:
+              /* set the coding type and the szip func. ptrs */
+              cinfo->coder_type = COMP_CODE_SZIP;
+              cinfo->coder_funcs = cszip_funcs;
+
+              /* copy encoding info */
+              cinfo->coder_info.szip_info.pixels = c_info->szip.pixels;
+              cinfo->coder_info.szip_info.bits_per_pixel = c_info->szip.bits_per_pixel;
+              cinfo->coder_info.szip_info.pixels_per_block = c_info->szip.pixels_per_block;
+              cinfo->coder_info.szip_info.pixels_per_scanline = c_info->szip.pixels_per_scanline;
+              cinfo->coder_info.szip_info.options_mask = c_info->szip.options_mask;
+              cinfo->coder_info.szip_info.buffer = NULL;
+              cinfo->coder_info.szip_info.buffer_size = 0;
+              cinfo->coder_info.szip_info.offset = 0;
+              cinfo->coder_info.szip_info.szip_state = SZIP_INIT;
+              cinfo->coder_info.szip_info.szip_dirty = SZIP_CLEAN;
+              break;
+
+#endif /* H4_HAVE_LIBSZ */
+
           default:
               HRETURN_ERROR(DFE_BADCODER, FAIL)
       }     /* end switch */
@@ -306,18 +336,22 @@
     /* add any additional information needed for coding type */
     switch (coder_type)
       {
-          case COMP_CODE_NBIT:      /* N-bit coding needs 16 bytes of info */
+          case COMP_CODE_NBIT:    /* N-bit coding needs 16 bytes of info */
               coder_len+=16;
               break;
 
-          case COMP_CODE_SKPHUFF:   /* Skipping Huffman coding needs 8 bytes of info */
+          case COMP_CODE_SKPHUFF: /* Skipping Huffman coding needs 8 bytes of info */
               coder_len+=8;
               break;
 
-          case COMP_CODE_DEFLATE:   /* Deflation coding stores deflation level */
+          case COMP_CODE_DEFLATE: /* Deflation coding stores deflation level */
               coder_len+=2;
               break;
 
+          case COMP_CODE_SZIP:   /* Szip coding ...? */
+	      coder_len += 14;
+	      break;
+
           default:      /* no additional information needed */
               break;
       }     /* end switch */
@@ -414,6 +448,14 @@
               UINT16ENCODE(p, (uint16) c_info->deflate.level);
               break;
 
+          case COMP_CODE_SZIP:  /* Szip coding ...? */
+              UINT32ENCODE(p, (uint32) c_info->szip.pixels);
+              UINT32ENCODE(p, (uint32) c_info->szip.pixels_per_scanline);
+              UINT32ENCODE(p, (uint32) (c_info->szip.options_mask | SZ_H4_REV_2));
+              *p++ = (uint8) c_info->szip.bits_per_pixel;
+              *p++ = (uint8) c_info->szip.pixels_per_block;
+              break;
+
           default:      /* no additional information needed */
               break;
       }     /* end switch */
@@ -523,6 +565,16 @@
               }     /* end case */
               break;
 
+          case COMP_CODE_SZIP:   /* Szip coding stores the following values*/
+	      {
+                  UINT32DECODE(p, c_info->szip.pixels);
+                  UINT32DECODE(p, c_info->szip.pixels_per_scanline);
+                  UINT32DECODE(p, c_info->szip.options_mask);
+                  c_info->szip.bits_per_pixel = *p++;
+                  c_info->szip.pixels_per_block = *p++;
+	      }
+              break;
+
           default:      /* no additional information needed */
               break;
       }     /* end switch */
@@ -608,6 +660,14 @@
               UINT32ENCODE(p, (uint32) info->cinfo.coder_info.skphuff_info.skip_size);
               break;
 
+          case COMP_CODE_SZIP:
+              UINT32ENCODE(p, (uint32) c_info->szip.pixels);
+              UINT32ENCODE(p, (uint32) c_info->szip.pixels_per_scanline);
+              UINT32ENCODE(p, (uint32) c_info->szip.options_mask);
+              UINT8ENCODE(p, (uint8) c_info->szip.bits_per_pixel);
+              UINT8ENCODE(p, (uint8) c_info->szip.pixels_per_block);
+              break;
+
           default:      /* no additional information needed */
               break;
       }     /* end switch */
@@ -857,6 +917,106 @@
 
 /*--------------------------------------------------------------------------
  NAME
+    HCPgetcompress -- Retrieves compression information of an element
+ USAGE
+    intn HCPgetcompress(aid, coder_type, c_info)
+    int32 aid;                  IN: access record ID
+    comp_coder_t* coder_type;   OUT: the type of compression
+    comp_info* c_info;          OUT: ptr to compression information
+                                structure for storing the retrieved info
+ RETURNS
+    SUCCEED/FAIL
+ DESCRIPTION
+    This routine retrieves the compression type and the compression
+    information of the element, identified by 'aid'.  The routine is 
+    used by GRgetcompress and SDgetcompress at this time.
+
+ GLOBAL VARIABLES
+ COMMENTS, BUGS, ASSUMPTIONS
+ EXAMPLES
+ REVISION LOG
+    July 2001: Added to fix bug #307 - BMR
+    Dec. 2004: Changed name to HCPgetcompress, to be consistent with other
+               practice.  REM
+--------------------------------------------------------------------------*/
+intn
+HCPgetcompress(int32 file_id,
+              uint16 data_tag, uint16 data_ref,
+              comp_coder_t* comp_type,  /* OUT: compression type */
+              comp_info* c_info)        /* OUT: retrieved compression info */
+{
+    CONSTR(FUNC, "HCPgetcompress");   /* for HGOTO_ERROR */
+    int32   aid=0, status;
+    accrec_t*    access_rec=NULL;/* access element record */
+    compinfo_t*  info=NULL;  /* compressed element information */
+    model_info  m_info;         /* modeling information - dummy */
+    int32       ret_value=SUCCEED;
+
+    /* clear error stack */
+    HEclear();
+
+    /* start read access on the access record of the data element, which
+       is being inquired for its compression information */
+    aid = Hstartread(file_id, data_tag, data_ref);
+
+    /* get the access_rec pointer */
+    access_rec = HAatom_object(aid);
+    if (access_rec == NULL) HGOTO_ERROR(DFE_ARGS, FAIL);
+
+    /* if the element is compressed, get the compression info as requested*/
+    if (access_rec->special == SPECIAL_COMP)
+    {
+        info = (compinfo_t *) access_rec->special_info;
+        if (info == NULL) HGOTO_ERROR(DFE_COMPINFO, FAIL);
+
+        status = HCIread_header(access_rec, info, c_info, &m_info);
+        if (status == FAIL) HGOTO_ERROR(DFE_COMPINFO, FAIL);
+
+        /* get the compression type */
+        *comp_type = info->cinfo.coder_type;
+
+    }  /* end if element is compressed */
+
+    /* if the element is chunked, call HMCgetcompress to get the 
+	compression info as appropriate */
+    else if (access_rec->special == SPECIAL_CHUNKED)
+    {
+	status = HMCgetcompress(access_rec, comp_type, c_info);
+        if (status == FAIL) HGOTO_ERROR(DFE_COMPINFO, FAIL);
+    }
+
+    /* flag the error when attempting to get compression info on a
+       non-compressed element */
+    else 
+    /* EIP 9/16/03  Fail but return compression type COMP_CODE_NONE
+       instead of junk in this case.
+    */
+     {
+        /*Mac OSX screams here (comp_coder_t)*comp_type = COMP_CODE_NONE; */
+        *comp_type = COMP_CODE_NONE; 
+        HGOTO_ERROR(DFE_ARGS, FAIL);
+     }
+    /* end access to the aid appropriately */
+    if (Hendaccess(aid)== FAIL)
+        HGOTO_ERROR(DFE_CANTENDACCESS, FAIL);
+
+done:
+  if(ret_value == FAIL)
+    { /* Error condition cleanup */
+       /* end access to the aid if it's been accessed */
+        if (aid != 0)
+            if (Hendaccess(aid)== FAIL)
+       /* EIP 9/16/03 This causes infinite loop since HGOTO_ERROR has goto done in it 
+                HGOTO_ERROR(DFE_CANTENDACCESS, FAIL); Replaced with HERROR call*/
+                HERROR(DFE_CANTENDACCESS);
+    } /* end if */
+
+  /* Normal function cleanup */
+  return ret_value;
+} /* HCgetcompress */
+
+/*--------------------------------------------------------------------------
+ NAME
     HCIstaccess -- Start accessing a compressed data element.
  USAGE
     int32 HCIstaccess(access_rec, access)
@@ -1147,10 +1307,12 @@
     compinfo_t *info;           /* information on the special element */
     uint8       local_ptbuf[4];
     uint8       *p = local_ptbuf;  /* temp buffer ptr */
-    filerec_t   *file_rec =     /* file record */
-                           HAatom_object(access_rec->file_id);  
+    filerec_t  *file_rec;           /* file record */
     int32       ret_value;
 
+    /* convert file id to file record */
+    file_rec = HAatom_object(access_rec->file_id);
+
     /* validate length */
     if (length < 0)
         HRETURN_ERROR(DFE_RANGE, FAIL);
@@ -1281,9 +1443,12 @@
 HCPendaccess(accrec_t * access_rec)
 {
     CONSTR(FUNC, "HCPendaccess");   /* for HERROR */
-    filerec_t  *file_rec = HAatom_object(access_rec->file_id);    /* file record */
+    filerec_t  *file_rec;           /* file record */
     intn      ret_value = SUCCEED;
 
+    /* convert file id to file record */
+    file_rec = HAatom_object(access_rec->file_id);
+
     /* validate file record */
     if (BADFREC(file_rec))
         HGOTO_ERROR(DFE_INTERNAL, FAIL);
@@ -1385,3 +1550,70 @@
 
     return SUCCEED;
 }   /* HCPinfo */
+
+/* ------------------------------- HCPgetinfo ----------------------------- */
+/*
+NAME
+   HCget_config_info -- return info about configuration of a compression method
+
+USAGE
+     intn HCget_config_info( comp_coder_t coder_type,  
+	uint32* compression_config_info)
+        comp_coder_t coder_type;  IN: the compression type queried  
+	compression_config_info;  OUT: flags to indiat compression status
+               
+                0 -- not enabled
+		COMP_DECODER_ENABLED - decoding enabled
+                COMP_ENCODER_ENABLED - encoding enabled
+
+RETURNS
+   SUCCEED / FAIL
+DESCRIPTION
+   Return information about the given compresion method. 
+
+   Currently, reports if encoding and/or decoding are available. SZIP
+   is the only method that varies in the current versions.
+
+
+---------------------------------------------------------------------------*/
+intn
+HCget_config_info( comp_coder_t coder_type,  /* IN: compression type */
+		uint32* compression_config_info)
+{
+    CONSTR(FUNC, "HCget_config_info");
+
+    *compression_config_info = 0;
+    switch (coder_type)
+      {     
+          case COMP_CODE_NONE:      /* "none" (i.e. no) encoding */
+		*compression_config_info = 0;
+          case COMP_CODE_RLE:   /* Run-length encoding */
+          case COMP_CODE_NBIT:      /* N-bit encoding */
+          case COMP_CODE_SKPHUFF:   /* Skipping Huffman encoding */
+		*compression_config_info = COMP_DECODER_ENABLED|COMP_ENCODER_ENABLED;
+              break;
+
+          case COMP_CODE_JPEG:  /* jpeg may be optional */
+		*compression_config_info = COMP_DECODER_ENABLED|COMP_ENCODER_ENABLED;
+              break;
+          case COMP_CODE_DEFLATE:   /* gzip 'deflate' encoding, maybe optional */
+		*compression_config_info = COMP_DECODER_ENABLED|COMP_ENCODER_ENABLED;
+              break;
+
+           case COMP_CODE_SZIP:
+#ifdef H4_HAVE_LIBSZ
+	      if (SZ_encoder_enabled()) {
+		*compression_config_info = COMP_DECODER_ENABLED|COMP_ENCODER_ENABLED;
+		} else {
+		*compression_config_info = COMP_DECODER_ENABLED;
+		}
+#else
+		*compression_config_info = 0;
+#endif /* H4_HAVE_LIBSZ */
+              break;
+          default:
+		*compression_config_info = 0;
+              HRETURN_ERROR(DFE_BADCODER, FAIL)
+	}
+    return SUCCEED;
+}

Modified: packages/libhdf4/branches/upstream/current/hdf/src/hcomp.h
===================================================================
--- packages/libhdf4/branches/upstream/current/hdf/src/hcomp.h	2007-05-15 09:05:29 UTC (rev 830)
+++ packages/libhdf4/branches/upstream/current/hdf/src/hcomp.h	2007-05-15 09:53:05 UTC (rev 831)
@@ -10,7 +10,7 @@
  *                                                                          *
  ****************************************************************************/
 
-/* $Id: hcomp.h,v 1.19 1999/02/12 23:37:11 koziol Exp $ */
+/* $Id: hcomp.h,v 1.22 2004/12/09 18:51:57 mcgrath Exp $ */
 
 /*-----------------------------------------------------------------------------
  * File:    hcomp.h
@@ -41,6 +41,7 @@
       COMP_CODE_NBIT,           /* for N-bit encoding */
       COMP_CODE_SKPHUFF,        /* for Skipping huffman encoding */
       COMP_CODE_DEFLATE,        /* for gzip 'deflate' encoding */
+      COMP_CODE_SZIP,		/* for szip encoding */
       COMP_CODE_INVALID,        /* invalid last code, for range checking */
       COMP_CODE_JPEG            /* _Ugly_ hack to allow JPEG images to be created with GRsetcompress */
   }
@@ -52,6 +53,10 @@
 #define COMP_RLE        11
 #define COMP_IMCOMP     12
 
+/* Compression encoder/decoder configuration */
+#define COMP_DECODER_ENABLED     1
+#define COMP_ENCODER_ENABLED     2
+
 #ifndef COMPRESS_MASTER
 extern uint16 compress_map[];
 #else
@@ -121,6 +126,16 @@
             intn    level;   /* how hard to work when compressing the data */
         }
       deflate;
+      struct
+        {
+            int32 options_mask;   /* IN */
+            int32 pixels_per_block;   /* IN */
+            int32 pixels_per_scanline; /* OUT: computed */
+	    int32 bits_per_pixel; /* OUT: size of NT */
+            int32 pixels; /* OUT: size of dataset or chunk */
+         }
+       szip;  /* for szip encoding */
+
   }
 comp_info;
 

Modified: packages/libhdf4/branches/upstream/current/hdf/src/hcompi.h
===================================================================
--- packages/libhdf4/branches/upstream/current/hdf/src/hcompi.h	2007-05-15 09:05:29 UTC (rev 830)
+++ packages/libhdf4/branches/upstream/current/hdf/src/hcompi.h	2007-05-15 09:53:05 UTC (rev 831)
@@ -10,7 +10,7 @@
  *                                                                          *
  ****************************************************************************/
 
-/* $Id: hcompi.h,v 1.13 1995/10/25 17:51:45 koziol Exp $ */
+/* $Id: hcompi.h,v 1.15 2003/12/10 21:13:19 epourmal Exp $ */
 
 /*-----------------------------------------------------------------------------
  * File:    hcompi.h
@@ -57,6 +57,7 @@
 #include "cnbit.h"  /* N-bit encoding header */
 #include "cskphuff.h"   /* Skipping huffman encoding header */
 #include "cdeflate.h"   /* gzip 'deflate' encoding header */
+#include "cszip.h"   /* szip encoding header */
 
 typedef struct comp_coder_info_tag
   {
@@ -68,6 +69,8 @@
             comp_coder_nbit_info_t nbit_info;   /* N-bit coding info */
             comp_coder_skphuff_info_t skphuff_info;     /* Skipping huffman coding info */
             comp_coder_deflate_info_t deflate_info;   /* gzip 'deflate' coding info */
+	    comp_coder_szip_info_t szip_info;   /* szip coding info */
+
         }
       coder_info;
       funclist_t  coder_funcs;  /* functions to perform encoding */

Modified: packages/libhdf4/branches/upstream/current/hdf/src/hcompri.c
===================================================================
--- packages/libhdf4/branches/upstream/current/hdf/src/hcompri.c	2007-05-15 09:05:29 UTC (rev 830)
+++ packages/libhdf4/branches/upstream/current/hdf/src/hcompri.c	2007-05-15 09:53:05 UTC (rev 831)
@@ -11,14 +11,10 @@
  ****************************************************************************/
 
 #ifdef RCSID
-static char RcsId[] = "@(#)$Revision: 1.4 $";
+static char RcsId[] = "@(#)$Revision: 1.6 $";
 #endif
 
-/* $Id: hcompri.c,v 1.4 2000/02/29 21:34:46 koziol Exp $ */
-#ifdef HAVE_PABLO
-#define PABLO_mask ID_hcompri_c
-#endif
-
+/* $Id: hcompri.c,v 1.6 2005/01/09 20:53:57 mcgrath Exp $ */
 /*LINTLIBRARY */
 /* ------------------------------ hcompri.c -------------------------------
 
@@ -120,10 +116,6 @@
     crinfo_t  *info;                /* information for the compressed raster element */
     int32      ret_value = SUCCEED;
 
-#ifdef HAVE_PABLO
-    TRACE_ON(PABLO_mask,ID_HRPconvert);
-#endif /* HAVE_PABLO */
-    /* clear error stack and validate args */
     HEclear();
 
 #ifdef QAK
@@ -184,9 +176,6 @@
     { /* Error condition cleanup */
     } /* end if */
 
-#ifdef HAVE_PABLO
-    TRACE_OFF(PABLO_mask,ID_HRPconvert);
-#endif /* HAVE_PABLO */
   return ret_value; 
 } /* HRPconvert */
 
@@ -462,10 +451,12 @@
 #ifdef LATER
     CONSTR(FUNC, "HRPendaccess");   /* for HERROR */
 #endif /* LATER */
-    filerec_t  *file_rec =      /* file record */
-        HAatom_object(access_rec->file_id);
+    filerec_t  *file_rec; 	    /* file record */
     intn     ret_value = SUCCEED;
 
+    /* convert file id to file record */
+    file_rec = HAatom_object(access_rec->file_id);
+
 #ifdef QAK
 printf("%s: check 1.0\n",FUNC);
 #endif /* QAK */

Modified: packages/libhdf4/branches/upstream/current/hdf/src/hconv.h
===================================================================
--- packages/libhdf4/branches/upstream/current/hdf/src/hconv.h	2007-05-15 09:05:29 UTC (rev 830)
+++ packages/libhdf4/branches/upstream/current/hdf/src/hconv.h	2007-05-15 09:53:05 UTC (rev 831)
@@ -11,7 +11,7 @@
  *                                                                          *
  ****************************************************************************/
 
-/* $Id: hconv.h,v 1.20 2000/05/23 18:03:29 acheng Exp $ */
+/* $Id: hconv.h,v 1.22 2003/12/10 21:13:19 epourmal Exp $ */
 
 /*-----------------------------------------------------------------------------
  * File:    hconv.h
@@ -63,7 +63,7 @@
 /* CONSTANT DEFINITIONS                                                      */
 /*****************************************************************************/
 /* Generally Big-Endian machines */
-#if !defined(VMS) && !defined(INTEL86) && !defined(MIPSEL) && !defined(DEC_ALPHA) && !defined(I860) && !defined(SUN386) && !defined(IA64)
+#if !defined(VMS) && !defined(INTEL86) && !defined(MIPSEL) && !defined(DEC_ALPHA) && !defined(I860) && !defined(SUN386) && !defined(__ia64) && !defined(__x86_64__)
 #   if !defined(UNICOS)
 #       define UI8_IN     DFKnb1b   /* Unsigned Integer, 8 bits */
 #       define UI8_OUT    DFKnb1b
@@ -165,7 +165,7 @@
 #       define LF64_OUT   DFKluo8f
 
 #   endif   /* !UNICOS */
-#else  /* must be VMS || INTEL86 || MIPSEL || DEC_ALPHA || I860 || SUN386 || IA64 (Generally, little-endian machines */
+#else  /* must be VMS || INTEL86 || MIPSEL || DEC_ALPHA || I860 || SUN386 || IA64 || Linux64 (Generally, little-endian machines */
 #   define UI8_IN     DFKnb1b   /* Big-Endian IEEE support */
 #   define UI8_OUT    DFKnb1b   /* The s in DFKsb2b is for swap */
 #   define SI16_IN    DFKsb2b
@@ -210,7 +210,7 @@
 #       define LF64_OUT   DFKnb8b
 #   endif   /* VMS */
 
-#endif /* !VMS && !INTEL86 && !MIPS && !DEC_ALPHA && !I860 && !SUN386 && !IA64 */
+#endif /* !VMS && !INTEL86 && !MIPS && !DEC_ALPHA && !I860 && !SUN386 && !IA64 && !Linux64*/
 
 /* All Machines (except the Cray) currently use the same routines */
 /* for Native mode "conversions" */

Modified: packages/libhdf4/branches/upstream/current/hdf/src/hdf.h
===================================================================
--- packages/libhdf4/branches/upstream/current/hdf/src/hdf.h	2007-05-15 09:05:29 UTC (rev 830)
+++ packages/libhdf4/branches/upstream/current/hdf/src/hdf.h	2007-05-15 09:53:05 UTC (rev 831)
@@ -11,11 +11,12 @@
  *                                                                          *
  ****************************************************************************/
 
-/* $Id: hdf.h,v 1.60 1998/09/02 21:09:17 acheng Exp $ */
+/* $Id: hdf.h,v 1.64 2005/01/09 20:53:57 mcgrath Exp $ */
 
 #ifndef HDF_H
 #define HDF_H
 
+#include "h4config.h"
 #include "hdfi.h"
 #include "hlimits.h"
 
@@ -101,10 +102,6 @@
 #   define TRUE (!FALSE)
 #endif
 
-#ifndef NULL
-#   define NULL (void *)0
-#endif
-
 /* macros */
 #define STREQ(s, t) (HDstrcmp((s), (t)) == 0)
 #define NSTREQ(s, t, n) (HDstrncmp((s), (t), (n)) == 0)
@@ -150,15 +147,9 @@
 #include "vg.h"         /* Add the Vgroup/Vdata header so the users don't have to */
 #include "mfgr.h"       /* Add the GR header so the users don't have to */
 
-/* For Pablo Instrumentation */
-#ifdef HAVE_PABLO
-#include "ProcIDs.h"
-#include "trace.h"
-#endif /* PABLO */
-
 /* these may eventaully evolve into real-life functions but not yet */
 #define HDFopen(f,a,d)      Hopen((f), (a), (d))
-#define HDFclose(f,a,d)     Hclose((f), (a), (d))
+#define HDFclose(f)         Hclose((f))
 #define Vstart(f)           Vinitialize((f))
 #define Vend(f)             Vfinish((f))
 

Modified: packages/libhdf4/branches/upstream/current/hdf/src/hdfi.h
===================================================================
--- packages/libhdf4/branches/upstream/current/hdf/src/hdfi.h	2007-05-15 09:05:29 UTC (rev 830)
+++ packages/libhdf4/branches/upstream/current/hdf/src/hdfi.h	2007-05-15 09:53:05 UTC (rev 831)
@@ -10,7 +10,7 @@
  *                                                                          *
  ****************************************************************************/
 
-/* $Id: hdfi.h,v 1.146 2000/08/22 20:26:57 epourmal Exp $ */
+/* $Id: hdfi.h,v 1.156 2005/01/25 03:36:44 epourmal Exp $ */
 
 #ifndef HDFI_H
 #define HDFI_H
@@ -61,6 +61,7 @@
 #define     DFMT_VAX            0x2221
 #define     DFMT_MIPSEL         0x4441
 #define     DFMT_PC             0x4441
+#define     DFMT_APPLE          0x1111
 #define     DFMT_MAC            0x1111
 #define     DFMT_SUN386         0x4441
 #define     DFMT_NEXT           0x1111
@@ -70,6 +71,7 @@
 #define     DFMT_I860           0x4441
 #define     DFMT_CRAYMPP        0x1171
 #define     DFMT_IA64           0x4441
+#define     DFMT_LINUX64        0x4441
 
 /* I/O library constants */
 #define UNIXUNBUFIO 1
@@ -91,12 +93,6 @@
 #include <limits.h>
 #include <string.h>
 
-/* PABLO support files */
-#ifdef HAVE_PABLO
-#define HDFIOTRACE
-#include "HDFIOTrace.h"
-#endif  /* HAVE_PABLO */
-
 /**
  * Provide the macros to adapt the HDF public functions to
  * dll entry points.
@@ -193,14 +189,23 @@
 typedef unsigned char     uint8;
 typedef short int         int16;
 typedef unsigned short int uint16;
+#ifdef _LP64 /* 64-bit environment */
+typedef int               int32;
+typedef unsigned int      uint32;
+#else /* 32-bit environment */
 typedef long int          int32;
 typedef unsigned long int uint32;
+#endif
 typedef int               intn;
 typedef unsigned int      uintn;
 typedef int               intf;     /* size of INTEGERs in Fortran compiler */
 typedef float             float32;
 typedef double            float64;
+#ifdef _LP64 /* 64-bit environment */
+typedef long              hdf_pint_t;   /* an integer the same size as a pointer */
+#else /* 32-bit environment */
 typedef int               hdf_pint_t;   /* an integer the same size as a pointer */
+#endif
 #define FNAME_POST_UNDERSCORE
 #define _fcdtocp(desc) (desc)
 #ifdef  HAVE_FMPOOL
@@ -307,19 +312,23 @@
 #ifndef _ALL_SOURCE       
 typedef char              int8;
 typedef short int         int16; 
-typedef long int          int32; 
+typedef int               int32;
 #endif  
 typedef char              char8;
 typedef unsigned char     uchar8;
 typedef unsigned char     uint8;
 typedef unsigned short int uint16;
-typedef unsigned long int uint32;
+typedef unsigned int      uint32;
 typedef int               intn;
 typedef unsigned int      uintn;
 typedef float             float32;
 typedef double            float64;
 typedef int               intf;     /* size of INTEGERs in Fortran compiler */
+#ifdef AIX5L64
+typedef long              hdf_pint_t;   /* an integer the same size as a pointer */
+#else /*AIX5L64 */
 typedef int               hdf_pint_t;   /* an integer the same size as a pointer */
+#endif /*AIX5L64 */
 #define _fcdtocp(desc) (desc)
 #ifdef  HAVE_FMPOOL
 #define FILELIB PAGEBUFIO  /* enable page buffering */
@@ -454,9 +463,11 @@
 #else
 #define FILELIB UNIXBUFIO
 #endif
+/*
 #ifdef IRIX64
 #define BIG_LONGS
 #endif
+*/
 
 
 /* JPEG #define's - Look in the JPEG docs before changing - (Q) */
@@ -706,6 +717,63 @@
 #endif /* CONVEX */
 
 
+#if defined (__APPLE__)
+
+#ifndef __APPLE__
+#define __APPLE__
+#endif
+
+#ifdef GOT_MACHINE
+If you get an error on this line more than one machine type has been defined.
+Please check your Makefile.
+#endif
+#define GOT_MACHINE 1
+
+#ifndef __GNUC__
+#define DUMBCC 	/* because it is.  for later use in macros */
+#endif /* __GNUC__ */
+
+#include <sys/types.h>
+#include <sys/file.h>               /* for unbuffered i/o stuff */
+#include <sys/stat.h>
+#define DF_MT   DFMT_APPLE 
+typedef void            VOID;
+typedef void            *VOIDP;
+typedef char            *_fcd;
+typedef char            char8;
+typedef unsigned char   uchar8;
+typedef char            int8;
+typedef unsigned char   uint8;
+typedef short           int16;
+typedef unsigned short  uint16;
+typedef int             int32;
+typedef unsigned int    uint32;
+typedef int             intn;
+typedef unsigned int    uintn;
+typedef float           float32;
+typedef double          float64;
+typedef int             intf;     /* size of INTEGERs in Fortran compiler */
+typedef int               hdf_pint_t;   /* an integer the same size as a pointer */
+#define _fcdtocp(desc) (desc)
+#define FNAME(x) x
+#ifdef H4_ABSOFT
+#define DF_CAPFNAMES
+#endif /*ABSOFT*/
+#ifdef  HAVE_FMPOOL
+#define FILELIB PAGEBUFIO  /* enable page buffering */
+#else
+#define FILELIB UNIXBUFIO
+#endif
+
+/* JPEG #define's - Look in the JPEG docs before changing - (Q) */
+
+/* Determine the memory manager we are going to use. Valid values are: */
+/*  MEM_DOS, MEM_ANSI, MEM_NAME, MEM_NOBS.  See the JPEG docs for details on */
+/*  what each does */
+#define JMEMSYS         MEM_ANSI
+
+#endif /* __APPLE__ */
+
 #if defined(MIPSEL) || ((defined(mips) || defined(__mips)) && (defined(ultrix) || defined(__ultrix)))
 
 #ifndef MIPSEL
@@ -780,7 +848,7 @@
 #else  /* MPW, possibly others */
 #include <Files.h>              /* for unbuffered I/O stuff */
 #endif /* SYMANTEC_C*/
-#ifndef ABSOFT
+#ifndef ABSOFT 
 #define DF_CAPFNAMES            /* fortran names are in all caps */
 #endif /* ABSOFT */
 #define DF_DYNAMIC              /* use dynamic allocation */
@@ -869,7 +937,7 @@
 #endif
 
 #if defined(_MSC_VER) && !defined(_MFHDFLIB_) && !defined(_HDFLIB_)	/* Auto-link when possible */
-#	define HDF_LIB_VER	"414"
+#	define HDF_LIB_VER	"421"
 #	if !defined(_DEBUG)
 #		if !defined(_HDFDLL_)
 #			define HDF_LIB_NAME	"HD" HDF_LIB_VER ".lib"
@@ -925,7 +993,12 @@
 #endif
 
 #if defined UNIX386
+#ifdef H4_ABSOFT
+#define FNAME(x) x
+#define DF_CAPFNAMES
+#else
 #define FNAME_POST_UNDERSCORE
+#endif
 #elif defined INTEL386
 #define DF_CAPFNAMES
 #endif
@@ -1202,9 +1275,68 @@
 
 #endif /* I860 */
 
+/* Linux 64 */
+#if defined __x86_64__
 
+#ifdef GOT_MACHINE
+If you get an error on this line more than one machine type has been defined.
+Please check your Makefile.
+#endif
+#define GOT_MACHINE
+
+#include <sys/file.h>               /* for unbuffered i/o stuff */
+#include <sys/stat.h>
+#define DF_MT             DFMT_LINUX64
+typedef void              VOID;
+typedef void              *VOIDP;
+typedef char              *_fcd;
+typedef char              char8;
+typedef unsigned char     uchar8;
+typedef char              int8;
+typedef unsigned char     uint8;
+typedef short int         int16;
+typedef unsigned short int uint16;
+typedef int               int32;
+typedef unsigned int      uint32;
+typedef int               intn;
+typedef unsigned int      uintn;
+typedef int               intf;     /* size of INTEGERs in Fortran compiler */
+typedef float             float32;
+typedef double            float64;
+typedef long              hdf_pint_t;   /* an integer the same size as a pointer */
+#define FNAME_POST_UNDERSCORE
+#define _fcdtocp(desc) (desc)
+#ifdef  HAVE_FMPOOL
+#define FILELIB PAGEBUFIO  /* enable page buffering */
+#else
+#define FILELIB UNIXBUFIO
+#endif
+
+/* JPEG #define's - Look in the JPEG docs before changing - (Q) */
+
+/* Determine the memory manager we are going to use. Valid values are: */
+/*  MEM_DOS, MEM_ANSI, MEM_NAME, MEM_NOBS.  See the JPEG docs for details on */
+/*  what each does */
+#define JMEMSYS         MEM_ANSI
+
+#ifdef __GNUC__
+#define HAVE_STDC
+#define INCLUDES_ARE_ANSI
+#endif
+
+#endif /*Linux 64 */
+
+/*#ifndef GOT_MACHINE
+No machine type has been defined.  Your Makefile needs to have someing like
+-DSUN or -DUNICOS in order for the HDF internal structures to be defined
+correctly.
+#endif
+*/
+
+/*-----------------------------------------------------*/
+
 /* IA64 running Linux */
-#if defined IA64
+#if defined __ia64
 
 #ifdef GOT_MACHINE
 If you get an error on this line more than one machine type has been defined.

Modified: packages/libhdf4/branches/upstream/current/hdf/src/herr.c
===================================================================
--- packages/libhdf4/branches/upstream/current/hdf/src/herr.c	2007-05-15 09:05:29 UTC (rev 830)
+++ packages/libhdf4/branches/upstream/current/hdf/src/herr.c	2007-05-15 09:53:05 UTC (rev 831)
@@ -11,15 +11,11 @@
  ****************************************************************************/
 
 #ifdef RCSID
-static char RcsId[] = "@(#)$Revision: 1.34 $";
+static char RcsId[] = "@(#)$Revision: 1.35 $";
 #endif
 
-/* $Id: herr.c,v 1.34 1999/06/16 21:10:58 dwells Exp $ */
+/* $Id: herr.c,v 1.35 2005/01/09 20:53:59 mcgrath Exp $ */
 
-#ifdef HAVE_PABLO
-#define PABLO_mask ID_herr_c
-#endif
-
 /*LINTLIBRARY */
 /* -------------------------------- herr.c -------------------------------- */
 /*
@@ -90,23 +86,14 @@
 HEstring(hdf_err_code_t error_code)
 {
     int         i;              /* temp int index */
-#ifdef HAVE_PABLO
-    TRACE_ON(PABLO_mask,ID_HEstring);
-#endif /* HAVE_PABLO */
 
     /* look for the error_code in error message table */
     for (i = 0; i < (int)ERRMESG_SZ; i++)
         if (error_messages[i].error_code == error_code)
           {
-#ifdef HAVE_PABLO
-            TRACE_OFF(PABLO_mask, ID_HEstring);
-#endif /* HAVE_PABLO */
             return error_messages[i].str;
           }
 
-#ifdef HAVE_PABLO
-        TRACE_OFF(PABLO_mask, ID_HEstring);
-#endif /* HAVE_PABLO */
     /* otherwise, return default message */
     return DEFAULT_MESG;
 } /* HEstring */
@@ -125,9 +112,6 @@
 VOID
 HEPclear(void)
 {
-#ifdef HAVE_PABLO
-  TRACE_ON(PABLO_mask,ID_HEclear);
-#endif /* HAVE_PABLO */
     if (!error_top)
         goto done;
 
@@ -143,9 +127,6 @@
       }
 
 done:
-#ifdef HAVE_PABLO
-    TRACE_OFF(PABLO_mask, ID_HEclear);
-#endif /* HAVE_PABLO */
   return;
 } /* HEPclear */
 
@@ -173,9 +154,6 @@
 HEpush(hdf_err_code_t error_code, const char *function_name, const char *file_name, intn line)
 {
     intn        i;
-#ifdef HAVE_PABLO
-    TRACE_ON(PABLO_mask,ID_HEpush);
-#endif /* HAVE_PABLO */
 
     /* if the stack is not allocated, then do it */
     if (!error_stack)
@@ -206,9 +184,6 @@
             }
           error_top++;
       }
-#ifdef HAVE_PABLO
-    TRACE_OFF(PABLO_mask, ID_HEpush);
-#endif /* HAVE_PABLO */
 }   /* HEpush */
 
 /*-------------------------------------------------------------------------
@@ -232,10 +207,6 @@
     char       *tmp;
     CONSTR(FUNC, "HEreport");   /* name of function if HIalloc fails */
 
-#ifdef HAVE_PABLO
-    TRACE_ON(PABLO_mask,ID_HEreport);
-#endif /* HAVE_PABLO */
-
     va_start(arg_ptr, format);
 
     if ((error_top < ERR_STACK_SZ + 1) && (error_top > 0))
@@ -255,9 +226,6 @@
     va_end(arg_ptr);
 
 done:
-#ifdef HAVE_PABLO
-     TRACE_OFF(PABLO_mask, ID_HEreport);
-#endif /* HAVE_PABLO */
     return;
 } /* HEreport */
 
@@ -279,9 +247,6 @@
 VOID
 HEprint(FILE * stream, int32 print_levels)
 {
-#ifdef HAVE_PABLO
-  TRACE_ON(PABLO_mask,ID_HEprint);
-#endif /* HAVE_PABLO */
     if (print_levels == 0 || print_levels > error_top)  /* print all errors */
         print_levels = error_top;
 
@@ -297,9 +262,6 @@
           if (error_stack[print_levels].desc)
               fprintf(stream, "\t%s\n", error_stack[print_levels].desc);
       }
-#ifdef HAVE_PABLO
-    TRACE_OFF(PABLO_mask, ID_HEprint);
-#endif /* HAVE_PABLO */
 } /* HEprint */
 
 /* ------------------------------- HEvalue -------------------------------- */

Modified: packages/libhdf4/branches/upstream/current/hdf/src/herr.h
===================================================================
--- packages/libhdf4/branches/upstream/current/hdf/src/herr.h	2007-05-15 09:05:29 UTC (rev 830)
+++ packages/libhdf4/branches/upstream/current/hdf/src/herr.h	2007-05-15 09:53:05 UTC (rev 831)
@@ -10,7 +10,7 @@
  *                                                                          *
  ****************************************************************************/
 
-/* $Id: herr.h,v 1.36 1996/08/27 15:05:59 sxu Exp $ */
+/* $Id: herr.h,v 1.41 2004/12/09 18:51:57 mcgrath Exp $ */
 
 /*+ herr.h
    ***  header file for using error routines
@@ -91,7 +91,15 @@
 
 /* always points to the next available slot; the last error record is in slot (top-1) */
 #ifndef _H_ERR_MASTER_
+#if defined WIN32 && defined HDFAPDLL
+__declspec(dllimport)
+#else
 extern
+#endif
+#else
+#if defined WIN32 && defined HDFLIBDLL
+__declspec(dllexport)
+#endif
 #endif /* _H_ERR_MASTER_ */
 int32       error_top
 #ifdef _H_ERR_MASTER_
@@ -216,12 +224,14 @@
       DFE_COMPINFO,             /* Invalid compression header */
       DFE_CANTCOMP,             /* Can't compress an object */
       DFE_CANTDECOMP,           /* Can't de-compress an object */
+      DFE_NOENCODER,            /* Encoder not available */
 
 /* Raster errors */
       DFE_NODIM,                /* No dimension record associated with image */
       DFE_BADRIG,               /* Error processing a RIG */
       DFE_RINOTFOUND,           /* Can't find raster image */
       DFE_BADATTR,              /* Bad Attribute */
+      DFE_LUTNOTFOUND,          /* No palette information for RIG */
 
 /* SDG/NDG errors */
       DFE_BADTABLE,             /* the nsdg table is wrong */
@@ -245,6 +255,7 @@
       DFE_VSWRITE,              /* Error writing to VData */
       DFE_VSREAD,               /* Error reading from VData */
       DFE_BADVH,                /* Error in VData Header */
+      DFE_FIELDSSET,            /* Fields already set for vdata */
 /* High-level Vdata/Vset errors */
       DFE_VSCANTCREATE,         /* Cannot create VData */
       DFE_VGCANTCREATE,         /* Cannot create VGroup */
@@ -387,12 +398,14 @@
     {DFE_COMPINFO,      "Invalid compression header"},
     {DFE_CANTCOMP,      "Can't compress an object"},
     {DFE_CANTDECOMP,    "Can't de-compress an object"},
+    {DFE_NOENCODER,     "Encoder not available"},
 
 /* Raster errors */
     {DFE_NODIM,         "No dimension record associated with image"},
     {DFE_BADRIG,        "Error processing a RIG"},
     {DFE_RINOTFOUND,    "Can't find raster image"},
     {DFE_BADATTR,       "Bad Attribute"},
+    {DFE_LUTNOTFOUND,   "No palette information for RIG"},
 
 /* SDG/NDG errors */
     {DFE_BADTABLE,      "The nsdg table is wrong"},
@@ -415,6 +428,7 @@
     {DFE_BADVSCLASS,    "Cannot set VData class"},
     {DFE_VSWRITE,       "Error writing to VData"},
     {DFE_VSREAD,        "Error reading from VData"},
+    {DFE_FIELDSSET,     "Fields already set for vdata"},
 
 /* High-level Vdata/Vset errors */
     {DFE_VSCANTCREATE,  "Cannot create VData"},

Modified: packages/libhdf4/branches/upstream/current/hdf/src/herrf.c
===================================================================
--- packages/libhdf4/branches/upstream/current/hdf/src/herrf.c	2007-05-15 09:05:29 UTC (rev 830)
+++ packages/libhdf4/branches/upstream/current/hdf/src/herrf.c	2007-05-15 09:53:05 UTC (rev 831)
@@ -11,10 +11,10 @@
  ****************************************************************************/
 
 #ifdef RCSID
-static char RcsId[] = "@(#)$Revision: 1.10 $";
+static char RcsId[] = "@(#)$Revision: 1.14 $";
 #endif
 
-/* $Id: herrf.c,v 1.10 2000/02/29 20:31:46 epourmal Exp $ */
+/* $Id: herrf.c,v 1.14 2001/10/15 18:52:45 epourmal Exp $ */
 
 /*-----------------------------------------------------------------------------
  * File:    herrf.c
@@ -54,6 +54,49 @@
     HEprint(stderr, *print_levels);
 }
 /*-----------------------------------------------------------------------------
+ * Name:    heprntc
+ * Purpose: call HEprint to print error messages, starting from top of stack
+ * Inputs:  print_levels: number of levels to print
+ * Returns: 0 on success, FAIL on failure
+ * Users:   Fortran stub routine
+ * Invokes: HEprint
+ * Remarks: This routine has one less parameter than HEprint, because it
+ *          doesn't allow the user to specify the stream to print to.
+ *          Instead it prints automatically to stdout.
+ *---------------------------------------------------------------------------*/
+
+FRETVAL(intf)
+
+#ifdef PROTOTYPE
+nheprntc(_fcd filename, intf * print_levels, intf *namelen)
+#else
+nheprntc(filename, print_levels, namelen)
+           _fcd  filename;
+           intf *print_levels; 
+           intf  *namelen;
+#endif /* PROTOTYPE */
+
+{
+    FILE *err_file;
+    char * c_name;
+    intn c_len;
+    int ret = 0;
+
+    c_len = *namelen;
+    if(c_len == 0) {
+                HEprint(stderr, *print_levels);
+                return(ret);
+    }
+    c_name = HDf2cstring(filename, c_len);
+    	if (!c_name) return(FAIL);
+    err_file = fopen(c_name, "a");
+    	if (!err_file) return(FAIL);
+    HEprint(err_file, *print_levels);
+    fclose(err_file);
+    return(ret);
+    
+}
+/*-----------------------------------------------------------------------------
  * Name: hestringc
  * Purpose:  Calls HEstring
  * Inputs:   error_code - HDF error code
@@ -82,7 +125,6 @@
                 status = 0;
                 HDpackFstring(cstring,  _fcdtocp(error_message),  *len);
    }  
- 
    return status;
  
  

Modified: packages/libhdf4/branches/upstream/current/hdf/src/hextelt.c
===================================================================
--- packages/libhdf4/branches/upstream/current/hdf/src/hextelt.c	2007-05-15 09:05:29 UTC (rev 830)
+++ packages/libhdf4/branches/upstream/current/hdf/src/hextelt.c	2007-05-15 09:53:05 UTC (rev 831)
@@ -11,13 +11,10 @@
  ****************************************************************************/
 
 #ifdef RCSID
-static char RcsId[] = "@(#)$Revision: 1.82 $";
+static char RcsId[] = "@(#)$Revision: 1.84 $";
 #endif
 
-/* $Id: hextelt.c,v 1.82 1999/06/16 21:10:58 dwells Exp $ */
-#ifdef HAVE_PABLO
-#define PABLO_mask ID_hextelt_c
-#endif
+/* $Id: hextelt.c,v 1.84 2005/01/09 20:53:59 mcgrath Exp $ */
 
 /*LINTLIBRARY */
 /* ------------------------------ hextelt.c -------------------------------
@@ -212,9 +209,6 @@
     void *       buf = NULL;      /* temporary buffer */
     int32       ret_value = SUCCEED;
 
-#ifdef HAVE_PABLO
-    TRACE_ON(PABLO_mask,ID_HXcreate);
-#endif /* HAVE_PABLO */
     /* clear error stack and validate args */
     HEclear();
     file_rec = HAatom_object(file_id);
@@ -364,9 +358,6 @@
   if (buf != NULL)
       HDfree(buf);
 
-#ifdef HAVE_PABLO
-        TRACE_OFF(PABLO_mask, ID_HXcreate);
-#endif /* HAVE_PABLO */
   return ret_value; 
 } /* HXcreate */
 
@@ -737,11 +728,13 @@
     CONSTR(FUNC, "HXPwrite");   /* for HERROR */
     extinfo_t  *info =          /* information on the special element */
                     (extinfo_t *) (access_rec->special_info);
-    uint8      *p =local_ptbuf;/* temp buffer ptr */
-    filerec_t  *file_rec =     /* file record */
-                          HAatom_object(access_rec->file_id);
+    uint8      *p =local_ptbuf; /* temp buffer ptr */
+    filerec_t  *file_rec;       /* file record */
     int32      ret_value = SUCCEED;
 
+    /* convert file id to file record */
+    file_rec = HAatom_object(access_rec->file_id);
+
     /* validate length */
     if (length < 0)
         HGOTO_ERROR(DFE_RANGE, FAIL);
@@ -905,10 +898,12 @@
 HXPendaccess(accrec_t * access_rec)
 {
     CONSTR(FUNC, "HXPendaccess");   /* for HERROR */
-    filerec_t  *file_rec =      /* file record */
-        HAatom_object(access_rec->file_id);
+    filerec_t  *file_rec;           /* file record */
     intn     ret_value = SUCCEED;
 
+    /* convert file id to file record */
+    file_rec = HAatom_object(access_rec->file_id);
+
     /* close the file pointed to by this access rec */
     HXPcloseAID(access_rec);
 
@@ -1159,9 +1154,6 @@
   char	*pt;
   intn       ret_value = SUCCEED;
 
-#ifdef HAVE_PABLO
-    TRACE_ON(PABLO_mask,ID_HXsetcreatedir);
-#endif /* HAVE_PABLO */
 
   if (dir)
     {
@@ -1183,9 +1175,6 @@
     } /* end if */
 
   /* Normal function cleanup */
-#ifdef HAVE_PABLO
-        TRACE_OFF(PABLO_mask, ID_HXsetcreatedir);
-#endif /* HAVE_PABLO */
   return ret_value; 
 }	/* HXsetcreatedir */
 
@@ -1216,9 +1205,6 @@
   char	*pt;
   intn   ret_value = SUCCEED;
 
-#ifdef HAVE_PABLO
-    TRACE_ON(PABLO_mask,ID_HXsetdir);
-#endif /* HAVE_PABLO */
   if (dir)
     {
       if (!(pt = HDstrdup(dir)))
@@ -1239,9 +1225,6 @@
     } /* end if */
 
   /* Normal function cleanup */
-#ifdef HAVE_PABLO
-        TRACE_OFF(PABLO_mask, ID_HXsetdir);
-#endif /* HAVE_PABLO */
   return ret_value; 
 }	/* HXsetdir */
 

Modified: packages/libhdf4/branches/upstream/current/hdf/src/hfile.c
===================================================================
--- packages/libhdf4/branches/upstream/current/hdf/src/hfile.c	2007-05-15 09:05:29 UTC (rev 830)
+++ packages/libhdf4/branches/upstream/current/hdf/src/hfile.c	2007-05-15 09:53:05 UTC (rev 831)
@@ -11,15 +11,11 @@
 ****************************************************************************/
 
 #ifdef RCSID
-static char RcsId[] = "@(#)$Revision: 1.154 $";
+static char RcsId[] = "@(#)$Revision: 1.160 $";
 #endif
 
-/* $Id: hfile.c,v 1.154 1999/06/16 21:10:59 dwells Exp $ */
+/* $Id: hfile.c,v 1.160 2005/01/09 20:53:59 mcgrath Exp $ */
 
-#ifdef HAVE_PABLO
-#define PABLO_mask ID_hfile_c
-#endif
- 
 /*LINTLIBRARY */
 /*+
    FILE
@@ -82,6 +78,7 @@
    Hgetfileversion -- return version info on HDF file
    HPgetdiskblock  -- Get the offset of a free block in the file.
    HPfreediskblock -- Release a block in a file to be re-used.
+   HDcheck_empty   -- determines if an element has been written with data
    HDget_special_info -- get information about a special element
    HDset_special_info -- reset information about a special element
 
@@ -270,10 +267,6 @@
   int32       fid=FAIL;     /* File ID */
   int32       ret_value = SUCCEED;
 
-#ifdef HAVE_PABLO
-    TRACE_ON(PABLO_mask,ID_Hopen);
-#endif /* HAVE_PABLO */
-
   /* Clear errors and check args and all the boring stuff. */
   HEclear();
   if (!path || ((acc_mode & DFACC_ALL) != acc_mode))
@@ -322,7 +315,7 @@
             }
           file_rec->file = f;
           file_rec->f_cur_off=0;
-          file_rec->last_op=OP_UNKNOWN;
+          file_rec->last_op=H4_OP_UNKNOWN;
 #else  /* NO_MULTI_OPEN */
           HGOTO_ERROR(DFE_DENIED, FAIL);
 #endif /* NO_MULTI_OPEN */
@@ -368,7 +361,7 @@
                 }
 
               file_rec->f_cur_off=0;
-              file_rec->last_op=OP_UNKNOWN;
+              file_rec->last_op=H4_OP_UNKNOWN;
               /* Read in all the relevant data descriptor records. */
               if (HTPstart(file_rec) == FAIL)
                 {
@@ -387,7 +380,7 @@
           if (OPENERR(file_rec->file))
             HGOTO_ERROR(DFE_BADOPEN, FAIL);
           file_rec->f_cur_off=0;
-          file_rec->last_op=OP_UNKNOWN;
+          file_rec->last_op=H4_OP_UNKNOWN;
 #ifdef STDIO_BUF
 	/* Testing stdio buffered i/o */
           if (setvbuf(file_rec->file, my_stdio_buf, _IOFBF, MY_STDIO_BUF_SIZE) != 0)
@@ -445,10 +438,6 @@
     } /* end if */
 
   /* Normal function cleanup */
-#ifdef HAVE_PABLO
-        TRACE_OFF(PABLO_mask, ID_Hopen);
-#endif /* HAVE_PABLO */
-
   return ret_value;
 }	/* Hopen */
 
@@ -473,10 +462,6 @@
   filerec_t  *file_rec;		/* file record pointer */
   intn  ret_value = SUCCEED;
 
-#ifdef HAVE_PABLO
-  TRACE_ON(PABLO_mask,ID_Hclose);
-#endif /* HAVE_PABLO */
-
   /* Clear errors and check args and all the boring stuff. */
   HEclear();
 
@@ -526,10 +511,6 @@
     } /* end if */
 
   /* Normal function cleanup */
-#ifdef HAVE_PABLO
-        TRACE_OFF(PABLO_mask, ID_Hclose);
-#endif /* HAVE_PABLO */
-
   return ret_value;
 }	/* Hclose */
 
@@ -565,16 +546,8 @@
   int32       find_offset, find_length;
   intn        ret_value;
 
-#ifdef HAVE_PABLO
-    TRACE_ON(PABLO_mask,ID_Hexist);
-#endif /* HAVE_PABLO */
-
   ret_value = (Hfind(file_id, search_tag, search_ref, &find_tag, &find_ref,
                 &find_offset, &find_length, DF_FORWARD));
-#ifdef HAVE_PABLO
-        TRACE_OFF(PABLO_mask, ID_Hexist);
-#endif /* HAVE_PABLO */
-
   return ret_value;
 }	/* end Hexist() */
 
@@ -613,10 +586,6 @@
   accrec_t   *access_rec;	/* access record */
   intn   ret_value = SUCCEED;
 
-#ifdef HAVE_PABLO
-  TRACE_ON(PABLO_mask,ID_Hinquire);
-#endif /* HAVE_PABLO */
-
   /* clear error stack and check validity of access id */
   HEclear();
   access_rec = HAatom_object(access_id);
@@ -649,10 +618,6 @@
     } /* end if */
 
   /* Normal function cleanup */
-#ifdef HAVE_PABLO
-        TRACE_OFF(PABLO_mask, ID_Hinquire);
-#endif /* HAVE_PABLO */
-
   return ret_value;
 }	/* end Hinquire */
 
@@ -679,10 +644,6 @@
     filerec_t *file_rec;
     intn      ret_value = SUCCEED;
 
-#ifdef HAVE_PABLO
-    TRACE_ON(PABLO_mask,ID_Hfidinquire);
-#endif /* HAVE_PABLO */
-
     HEclear();
 
     file_rec = HAatom_object(file_id);
@@ -700,10 +661,6 @@
     } /* end if */
 
   /* Normal function cleanup */
-#ifdef HAVE_PABLO
-        TRACE_OFF(PABLO_mask, ID_Hfidinquire);
-#endif /* HAVE_PABLO */
-
   return ret_value;
 } /* Hfidinquire */
 
@@ -734,10 +691,6 @@
   int32       ret;			/* AID to return */
   int32  ret_value = SUCCEED;
 
-#ifdef HAVE_PABLO
-  TRACE_ON(PABLO_mask,ID_Hstartread);
-#endif /* HAVE_PABLO */
-
   /* clear error stack */
   HEclear();
 
@@ -754,10 +707,6 @@
     } /* end if */
 
   /* Normal function cleanup */
-#ifdef HAVE_PABLO
-    TRACE_OFF(PABLO_mask, ID_Hstartread);
-#endif /* HAVE_PABLO */
-
   return ret_value;
 }	/* Hstartread() */
 
@@ -794,10 +743,6 @@
   int32  new_off, new_len;      /* offset & length of new tag & ref */
   intn        ret_value = SUCCEED;
 
-#ifdef HAVE_PABLO
-  TRACE_ON(PABLO_mask,ID_Hnextread);
-#endif /* HAVE_PABLO */
-
     /* clear error stack and check validity of the access id */
     HEclear();
     access_rec = HAatom_object(access_id);
@@ -909,10 +854,6 @@
     } /* end if */
 
   /* Normal function cleanup */
-#ifdef HAVE_PABLO
-    TRACE_OFF(PABLO_mask, ID_Hnextread);
-#endif /* HAVE_PABLO */
-
   return ret_value;
 }	/* end Hnextread() */
 
@@ -942,10 +883,6 @@
   int32       ret;			/* AID to return */
   int32       ret_value = SUCCEED;
 
-#ifdef HAVE_PABLO
-  TRACE_ON(PABLO_mask,ID_Hstartwrite);
-#endif /* HAVE_PABLO */
-
   /* clear error stack */
   HEclear();
 
@@ -972,10 +909,6 @@
     } /* end if */
 
   /* Normal function cleanup */
-#ifdef HAVE_PABLO
-    TRACE_OFF(PABLO_mask, ID_Hstartwrite);
-#endif /* HAVE_PABLO */
-
   return ret_value;
 }	/* end Hstartwrite */
 
@@ -1008,10 +941,6 @@
   int32  new_off, new_len;      /* offset & length of new tag & ref */
   int32      ret_value = SUCCEED;
 
-#ifdef HAVE_PABLO
-  TRACE_ON(PABLO_mask,ID_Hstartaccess);
-#endif /* HAVE_PABLO */
-
   /* clear error stack and check validity of file id */
   HEclear();
 
@@ -1033,8 +962,14 @@
   if (flags & DFACC_APPENDABLE)
     access_rec->appendable = TRUE;	/* start data as appendable */
   else
-    access_rec->appendable = FALSE;		/* start data as non-appendable */
+    access_rec->appendable = FALSE;	/* start data as non-appendable */
 
+  /* set the default values for block size and number of blocks for use in */
+  /* linked-block creation/conversion; they can be changed by the user via */
+  /* VSsetblocksize and VSsetnumblocks - BMR (bug #267 - June 2001) */
+  access_rec->block_size = HDF_APPENDABLE_BLOCK_LEN;
+  access_rec->num_blocks = HDF_APPENDABLE_BLOCK_NUM;
+
   access_rec->special_info = NULL; /* reset */
 
   /* if the DFACC_CURRENT flag is set, start searching for the tag/ref from */
@@ -1125,10 +1060,6 @@
     } /* end if */
 
   /* Normal function cleanup */
-#ifdef HAVE_PABLO
-    TRACE_OFF(PABLO_mask, ID_Hstartaccess);
-#endif /* HAVE_PABLO */
-
   return ret_value;
 }	/* end Hstartaccess */
 
@@ -1156,10 +1087,6 @@
   int32       offset;			/* offset of this data element in file */
   intn       ret_value = SUCCEED;
 
-#ifdef HAVE_PABLO
-   TRACE_ON(PABLO_mask,ID_Hsetlength);
-#endif /* HAVE_PABLO */
-
   /* clear error stack and check validity of file id */
   HEclear();
 
@@ -1192,10 +1119,6 @@
     } /* end if */
 
   /* Normal function cleanup */
-#ifdef HAVE_PABLO
-    TRACE_OFF(PABLO_mask, ID_Hsetlength);
-#endif /* HAVE_PABLO */
-
   return ret_value;
 }	/* end Hsetlength */
 
@@ -1221,10 +1144,6 @@
   accrec_t   *access_rec;		/* access record */
   intn   ret_value = SUCCEED;
 
-#ifdef HAVE_PABLO
-  TRACE_ON(PABLO_mask,ID_Happendable);
-#endif /* HAVE_PABLO */
-
   /* clear error stack and check validity of file id */
   HEclear();
   if ((access_rec = HAatom_object(aid)) == NULL)	/* get the access_rec pointer */
@@ -1241,10 +1160,6 @@
     } /* end if */
 
   /* Normal function cleanup */
-#ifdef HAVE_PABLO
-    TRACE_OFF(PABLO_mask, ID_Happendable);
-#endif /* HAVE_PABLO */
-
   return ret_value;
 }	/* end Happendable */
 
@@ -1273,10 +1188,6 @@
   int32       data_off;		/* offset of the data we are checking */
   intn        ret_value = SUCCEED;
 
-#ifdef HAVE_PABLO
-  TRACE_ON(PABLO_mask,ID_Hisappendable);
-#endif /* HAVE_PABLO */
-
   /* clear error stack and check validity of file id */
   HEclear();
   if ((access_rec = HAatom_object(aid)) == NULL)	/* get the access_rec pointer */
@@ -1303,10 +1214,6 @@
     } /* end if */
 
   /* Normal function cleanup */
-#ifdef HAVE_PABLO
-    TRACE_OFF(PABLO_mask, ID_Hisappendable);
-#endif /* HAVE_PABLO */
-
   return ret_value;
 }	/* end HPisappendable */
 
@@ -1342,10 +1249,6 @@
   int32       data_off;		/* offset of the data we are checking */
   intn        ret_value = SUCCEED;
 
-#ifdef HAVE_PABLO
-  TRACE_ON(PABLO_mask,ID_Hseek);
-#endif /* HAVE_PABLO */
-
   /* clear error stack and check validity of this access id */
   HEclear();
 
@@ -1407,7 +1310,7 @@
       /* check if we are at end of file */
       if (data_len + data_off != file_rec->f_end_off)
           {	/* nope, so try to convert element into linked-block element */
-            if (HLconvert(access_id, HDF_APPENDABLE_BLOCK_LEN, HDF_APPENDABLE_BLOCK_NUM) == FAIL)
+            if (HLconvert(access_id, access_rec->block_size, access_rec->num_blocks) == FAIL)
               {
                 access_rec->appendable = FALSE;
                 HEreport("Tried to seek to %d (object length:  %d)", offset, data_len);
@@ -1436,10 +1339,6 @@
     } /* end if */
 
   /* Normal function cleanup */
-#ifdef HAVE_PABLO
-    TRACE_OFF(PABLO_mask, ID_Hseek);
-#endif /* HAVE_PABLO */
-
   return ret_value;
 }	/* Hseek() */
 
@@ -1464,10 +1363,6 @@
   accrec_t   *access_rec;		/* access record */
   int32     ret_value = SUCCEED;
 
-#ifdef HAVE_PABLO
-  TRACE_ON(PABLO_mask,ID_Htell);
-#endif /* HAVE_PABLO */
-
   /* clear error stack and check validity of this access id */
   HEclear();
 
@@ -1485,10 +1380,6 @@
     } /* end if */
 
   /* Normal function cleanup */
-#ifdef HAVE_PABLO
-    TRACE_OFF(PABLO_mask, ID_Htell);
-#endif /* HAVE_PABLO */
-
   return ret_value;
 }	/* Htell() */
 
@@ -1519,10 +1410,6 @@
   int32       data_off;		/* offset of the data we are checking */
   int32      ret_value = SUCCEED;
 
-#ifdef HAVE_PABLO
-  TRACE_ON(PABLO_mask,ID_Hread);
-#endif /* HAVE_PABLO */
-
   /* clear error stack and check validity of access id */
   HEclear();
   access_rec = HAatom_object(access_id);
@@ -1578,10 +1465,6 @@
     } /* end if */
 
   /* Normal function cleanup */
-#ifdef HAVE_PABLO
-    TRACE_OFF(PABLO_mask, ID_Hread);
-#endif /* HAVE_PABLO */
-
   return ret_value;
 }	/* Hread */
 
@@ -1615,10 +1498,6 @@
   int32       data_off;		/* offset of the data we are checking */
   int32       ret_value = SUCCEED;
 
-#ifdef HAVE_PABLO
-  TRACE_ON(PABLO_mask,ID_Hwrite);
-#endif /* HAVE_PABLO */
-
   /* clear error stack and check validity of access id */
   HEclear();
   access_rec = HAatom_object(access_id);
@@ -1682,7 +1561,7 @@
       if (data_len + data_off != file_rec->f_end_off)
         {	/* nope, not at end of file. Try to promote to
                linked-block element. */
-          if (HLconvert(access_id, HDF_APPENDABLE_BLOCK_LEN, HDF_APPENDABLE_BLOCK_NUM) == FAIL)
+          if (HLconvert(access_id, access_rec->block_size, access_rec->num_blocks) == FAIL)
             {
               access_rec->appendable = FALSE;
               HGOTO_ERROR(DFE_BADSEEK, FAIL);
@@ -1726,10 +1605,6 @@
     } /* end if */
 
   /* Normal function cleanup */
-#ifdef HAVE_PABLO
-    TRACE_OFF(PABLO_mask, ID_Hwrite);
-#endif /* HAVE_PABLO */
-
   return ret_value;
 }	/* end Hwrite */
 
@@ -1837,10 +1712,6 @@
     accrec_t   *access_rec=NULL;/* access record */
     intn        ret_value = SUCCEED;
 
-#ifdef HAVE_PABLO
-    TRACE_ON(PABLO_mask,ID_Hendaccess);
-#endif /* HAVE_PABLO */
-
     /* clear error stack and check validity of access id */
     HEclear();
     if ((access_rec = HAremove_atom(access_id))==NULL)
@@ -1877,10 +1748,6 @@
     } /* end if */
 
   /* Normal function cleanup */
-#ifdef HAVE_PABLO
-    TRACE_OFF(PABLO_mask, ID_Hendaccess);
-#endif /* HAVE_PABLO */
-
   return ret_value;
 }	/* Hendaccess */
 
@@ -1910,10 +1777,6 @@
   int32       length;			/* length of this elt */
   int32       ret_value = SUCCEED;
 
-#ifdef HAVE_PABLO
-  TRACE_ON(PABLO_mask,ID_Hgetelement);
-#endif /* HAVE_PABLO */
-
   /* clear error stack */
   HEclear();
 
@@ -1938,10 +1801,6 @@
     } /* end if */
 
   /* Normal function cleanup */
-#ifdef HAVE_PABLO
-    TRACE_OFF(PABLO_mask, ID_Hgetelement);
-#endif /* HAVE_PABLO */
-
   return ret_value;
 }	/* Hgetelement() */
 
@@ -1971,10 +1830,6 @@
   int32       access_id=FAIL;   /* access record id */
   int32       ret_value = SUCCEED;
 
-#ifdef HAVE_PABLO
-  TRACE_ON(PABLO_mask,ID_Hputelement);
-#endif /* HAVE_PABLO */
-
   /* clear error stack */
   HEclear();
 
@@ -1996,10 +1851,6 @@
     } /* end if */
 
   /* Normal function cleanup */
-#ifdef HAVE_PABLO
-    TRACE_OFF(PABLO_mask, ID_Hputelement);
-#endif /* HAVE_PABLO */
-
   return ret_value;
 }	/* end Hputelement() */
 
@@ -2032,10 +1883,6 @@
   int32       idx;			/* index into DDB i.e. DD of element */
   int32       ret_value = SUCCEED;
 
-#ifdef HAVE_PABLO
-  TRACE_ON(PABLO_mask,ID_Hlength);
-#endif /* HAVE_PABLO */
-
   /* clear error stack */
   HEclear();
 
@@ -2057,10 +1904,6 @@
     } /* end if */
 
   /* Normal function cleanup */
-#ifdef HAVE_PABLO
-    TRACE_OFF(PABLO_mask, ID_Hlength);
-#endif /* HAVE_PABLO */
-
   return ret_value;
 #else /* FASTER_BUT_DOESNT_WORK */
   CONSTR(FUNC, "Hlength");    /* for HERROR */
@@ -2068,10 +1911,6 @@
   int32       length=FAIL;    /* length of elt inquired */
   int32       ret_value = SUCCEED;
 
-#ifdef HAVE_PABLO
-  TRACE_ON(PABLO_mask,ID_Hlength);
-#endif /* HAVE_PABLO */
-
   /* clear error stack */
   HEclear();
 
@@ -2096,10 +1935,6 @@
     } /* end if */
 
   /* Normal function cleanup */
-#ifdef HAVE_PABLO
-    TRACE_OFF(PABLO_mask, ID_Hlength);
-#endif /* HAVE_PABLO */
-
   return ret_value;
 #endif /* FASTER_BUT_DOESNT_WORK */
 }	/* end Hlength */
@@ -2134,10 +1969,6 @@
   int32       offset=FAIL;	/* offset of elt inquired */
   int32       ret_value = SUCCEED;
 
-#ifdef HAVE_PABLO
-  TRACE_ON(PABLO_mask,ID_Hoffset);
-#endif /* HAVE_PABLO */
-
   /* clear error stack */
   HEclear();
 
@@ -2161,10 +1992,6 @@
     } /* end if */
 
   /* Normal function cleanup */
-#ifdef HAVE_PABLO
-    TRACE_OFF(PABLO_mask, ID_Hoffset);
-#endif /* HAVE_PABLO */
-
   return ret_value;
 }	/* Hoffset */
 
@@ -2194,10 +2021,6 @@
   int32       fid;
   intn   ret_value = TRUE;
 
-#ifdef HAVE_PABLO
-   TRACE_ON(PABLO_mask,ID_Hishdf);
-#endif /* HAVE_PABLO */
-
   fid = Hopen(filename, DFACC_READ, 0);
   if (fid == FAIL)
     {
@@ -2214,20 +2037,12 @@
     } /* end if */
 
   /* Normal function cleanup */
-#ifdef HAVE_PABLO
-    TRACE_OFF(PABLO_mask, ID_Hishdf);
-#endif /* HAVE_PABLO */
-
   return ret_value;
 #else
   intn        ret;
   hdf_file_t  fp;
   intn   ret_value = TRUE;
 
-#ifdef HAVE_PABLO
-  TRACE_ON(PABLO_mask,ID_Hishdf);
-#endif /* HAVE_PABLO */
-
   /* Search for a matching slot in the already open files. */
   if(HAsearch_atom(FIDGROUP,HPcompare_filerec_path,filename)!=NULL)
       HGOTO_DONE(TRUE);
@@ -2251,10 +2066,6 @@
     } /* end if */
 
   /* Normal function cleanup */
-#ifdef HAVE_PABLO
-    TRACE_OFF(PABLO_mask, ID_Hishdf);
-#endif /* HAVE_PABLO */
-
   return ret_value;
 #endif
 }	/* Hishdf */
@@ -2282,10 +2093,6 @@
   int32       data_off;		/* offset of the data we are checking */
   int32      ret_value = SUCCEED;
 
-#ifdef HAVE_PABLO
-  TRACE_ON(PABLO_mask,ID_Htrunc);
-#endif /* HAVE_PABLO */
-
   /* clear error stack and check validity of access id */
   HEclear();
   access_rec = HAatom_object(aid);
@@ -2328,10 +2135,6 @@
     } /* end if */
 
   /* Normal function cleanup */
-#ifdef HAVE_PABLO
-    TRACE_OFF(PABLO_mask, ID_Htrunc);
-#endif /* HAVE_PABLO */
-
   return ret_value;
 }	/* end Htrunc() */
 
@@ -2404,10 +2207,6 @@
   filerec_t  *file_rec;		/* file record */
   intn        ret_value = SUCCEED;
 
-#ifdef HAVE_PABLO
-  TRACE_ON(PABLO_mask,ID_Hsync);
-#endif /* HAVE_PABLO */
-
   /* check validity of file record and get dd ptr */
   file_rec = HAatom_object(file_id);
   if (BADFREC(file_rec))
@@ -2424,10 +2223,6 @@
     } /* end if */
 
   /* Normal function cleanup */
-#ifdef HAVE_PABLO
-   TRACE_OFF(PABLO_mask, ID_Hsync);
-#endif /* HAVE_PABLO */
-
   return ret_value;
 }	/* Hsync */
 
@@ -2452,10 +2247,6 @@
   filerec_t  *file_rec;		/* file record */
   intn        ret_value = SUCCEED;
 
-#ifdef HAVE_PABLO
-  TRACE_ON(PABLO_mask,ID_Hcache);
-#endif /* HAVE_PABLO */
-
   if (file_id == CACHE_ALL_FILES)/* check whether to modify the default cache */
     {	/* set the default caching for all further files Hopen'ed */
       default_cache = (cache_on != 0 ? TRUE : FALSE);
@@ -2483,10 +2274,6 @@
     } /* end if */
 
   /* Normal function cleanup */
-#ifdef HAVE_PABLO
-    TRACE_OFF(PABLO_mask, ID_Hcache);
-#endif /* HAVE_PABLO */
-
   return ret_value;
 }	/* Hcache */
 
@@ -2505,9 +2292,11 @@
 intn
 HDvalidfid(int32 file_id)
 {
-  filerec_t  *file_rec = HAatom_object(file_id);
+  filerec_t  *file_rec;
   intn        ret_value = TRUE;
 
+  /* convert file id to file rec and check for validity */
+  file_rec = HAatom_object(file_id);
   if (BADFREC(file_rec))
     ret_value = FALSE;
 
@@ -2547,10 +2336,6 @@
   accrec_t   *access_rec;		/* access record */
   intn       ret_value = SUCCEED;
 
-#ifdef HAVE_PABLO
-  TRACE_ON(PABLO_mask,ID_Hsetaccesstype);
-#endif /* HAVE_PABLO */
-
   /* clear error stack and check validity of this access id */
   HEclear();
 
@@ -2581,10 +2366,6 @@
     } /* end if */
 
   /* Normal function cleanup */
-#ifdef HAVE_PABLO
-    TRACE_OFF(PABLO_mask, ID_Hsetaccesstype);
-#endif /* HAVE_PABLO */
-
   return ret_value;
 }	/* Hsetacceesstype() */
 
@@ -2621,10 +2402,6 @@
 #endif /* LATER */
     intn        ret_value = SUCCEED;
 
-#ifdef HAVE_PABLO
-  TRACE_ON(PABLO_mask,ID_HDdont_atexit);
-#endif /* HAVE_PABLO */
-
     if(install_atexit == TRUE)
         install_atexit=FALSE;
 
@@ -2637,10 +2414,6 @@
 #endif /* LATER */
 
   /* Normal function cleanup */
-#ifdef HAVE_PABLO
-    TRACE_OFF(PABLO_mask, ID_HPregister_term_func);
-#endif /* HAVE_PABLO */
-
     return(ret_value);
 } /* end HDdont_atexit() */
 
@@ -2671,10 +2444,6 @@
     CONSTR(FUNC, "HIstart");    /* for HERROR */
     intn        ret_value = SUCCEED;
 
-#ifdef HAVE_PABLO
-  TRACE_ON(PABLO_mask,ID_HIstart);
-#endif /* HAVE_PABLO */
-
     /* Don't call this routine again... */
     library_terminate = TRUE;
 
@@ -2712,10 +2481,6 @@
     } /* end if */
 
   /* Normal function cleanup */
-#ifdef HAVE_PABLO
-    TRACE_OFF(PABLO_mask, ID_HIstart);
-#endif /* HAVE_PABLO */
-
     return(ret_value);
 } /* end HIstart() */
 
@@ -2743,10 +2508,6 @@
 {
     CONSTR(FUNC, "HPregister_term_func");    /* for HERROR */
     intn        ret_value = SUCCEED;
-#ifdef HAVE_PABLO
-  TRACE_ON(PABLO_mask,ID_HPregister_term_func);
-#endif /* HAVE_PABLO */
-
     if(library_terminate == FALSE)
         if(HIstart()==FAIL)
             HGOTO_ERROR(DFE_CANTINIT, FAIL);
@@ -2766,10 +2527,6 @@
     } /* end if */
 
   /* Normal function cleanup */
-#ifdef HAVE_PABLO
-    TRACE_OFF(PABLO_mask, ID_HPregister_term_func);
-#endif /* HAVE_PABLO */
-
     return(ret_value);
 } /* end HPregister_term_func() */
 
@@ -3161,10 +2918,6 @@
 #ifdef LATER
   CONSTR(FUNC, "Hgetlibversion");
 #endif
-#ifdef HAVE_PABLO
-  TRACE_ON(PABLO_mask,ID_Hgetlibversion);
-#endif /* HAVE_PABLO */
-
   HEclear();
 
   *majorv = LIBVER_MAJOR;
@@ -3172,10 +2925,6 @@
   *releasev = LIBVER_RELEASE;
   HIstrncpy(string, LIBVER_STRING, LIBVSTR_LEN + 1);
 
-#ifdef HAVE_PABLO
-	TRACE_OFF(PABLO_mask, ID_Hgetlibversion);
-#endif /* HAVE_PABLO */
-
   return (SUCCEED);
 }	/* HDgetlibversion */
 
@@ -3206,10 +2955,6 @@
   filerec_t  *file_rec;
   intn      ret_value = SUCCEED;
 
-#ifdef HAVE_PABLO
-  TRACE_ON(PABLO_mask,ID_Hgetfileversion);
-#endif /* HAVE_PABLO */
-
   HEclear();
 
   file_rec = HAatom_object(file_id);
@@ -3232,10 +2977,6 @@
     } /* end if */
 
   /* Normal function cleanup */
-#ifdef HAVE_PABLO
-    TRACE_OFF(PABLO_mask, ID_Hgetfileversion);
-#endif /* HAVE_PABLO */
-
   return ret_value;
 }	/* Hgetfileversion */
 
@@ -4021,12 +3762,12 @@
   intn     ret_value = SUCCEED;
 
   /* Check for switching file access operations */
-  if(file_rec->last_op==OP_WRITE || file_rec->last_op==OP_UNKNOWN)
+  if(file_rec->last_op==H4_OP_WRITE || file_rec->last_op==H4_OP_UNKNOWN)
     {
 #ifdef HFILE_SEEKINFO
       read_force_seek++;
 #endif /* HFILE_SEEKINFO */
-      file_rec->last_op=OP_UNKNOWN;
+      file_rec->last_op=H4_OP_UNKNOWN;
       if(HPseek(file_rec,file_rec->f_cur_off)==FAIL)
         HGOTO_ERROR(DFE_INTERNAL,FAIL);
     } /* end if */
@@ -4034,7 +3775,7 @@
   if(HI_READ(file_rec->file,buf,bytes)==FAIL)
     HGOTO_ERROR(DFE_READERROR, FAIL);
   file_rec->f_cur_off+=bytes;
-  file_rec->last_op=OP_READ;
+  file_rec->last_op=H4_OP_READ;
 done:
   if(ret_value == FAIL)   
     { /* Error condition cleanup */
@@ -4074,7 +3815,7 @@
 #ifdef HFILE_SEEKINFO
 printf("%s: file_rec=%p, last_offset=%ld, offset=%ld, last_op=%d",FUNC,file_rec,(long)file_rec->f_cur_off,(long)offset,(int)file_rec->last_op);
 #endif /* HFILE_SEEKINFO */
-  if(file_rec->f_cur_off!=offset || file_rec->last_op==OP_UNKNOWN)
+  if(file_rec->f_cur_off!=offset || file_rec->last_op==H4_OP_UNKNOWN)
     {
 #ifdef HFILE_SEEKINFO
       seek_taken++;
@@ -4083,7 +3824,7 @@
       if (HI_SEEK(file_rec->file, offset) == FAIL)
         HGOTO_ERROR(DFE_SEEKERROR, FAIL);
       file_rec->f_cur_off=offset;
-      file_rec->last_op=OP_SEEK;
+      file_rec->last_op=H4_OP_SEEK;
     } /* end if */
 #ifdef HFILE_SEEKINFO
   else
@@ -4131,12 +3872,12 @@
   intn    ret_value = SUCCEED;
 
   /* Check for switching file access operations */
-  if(file_rec->last_op==OP_READ || file_rec->last_op==OP_UNKNOWN)
+  if(file_rec->last_op==H4_OP_READ || file_rec->last_op==H4_OP_UNKNOWN)
     {
 #ifdef HFILE_SEEKINFO
       write_force_seek++;
 #endif /* HFILE_SEEKINFO */
-      file_rec->last_op=OP_UNKNOWN;
+      file_rec->last_op=H4_OP_UNKNOWN;
       if(HPseek(file_rec,file_rec->f_cur_off)==FAIL)
         HGOTO_ERROR(DFE_INTERNAL,FAIL);
     } /* end if */
@@ -4144,7 +3885,7 @@
   if(HI_WRITE(file_rec->file,buf,bytes)==FAIL)
     HGOTO_ERROR(DFE_WRITEERROR, FAIL);
   file_rec->f_cur_off+=bytes;
-  file_rec->last_op=OP_WRITE;
+  file_rec->last_op=H4_OP_WRITE;
 
 done:
   if(ret_value == FAIL)   
@@ -4157,6 +3898,90 @@
   return ret_value;
 } /* end HP_write() */
 
+/*--------------------------------------------------------------------------
+ NAME
+    HDcheck_empty -- determines if an element has been written with data
+ USAGE
+    int32 HDcheck_empty(file_id, tag, ref, *emptySDS)
+    int32 file_id;             IN: id of file
+    uint16 tag;                IN: tag of data element
+    uint16 ref;                IN: ref of data element
+    intn *emptySDS;	      OUT: TRUE if data element is empty 
+ RETURNS
+    Returns SUCCEED/FAIL
+ DESCRIPTION
+    If the data element is SPECIAL_CHUNKED, calls HMCPgetnumrecs to get the
+    data length, or if the data element is SPECIAL_COMP, lets Hinquire
+    retrieve the data length via macro HQuerylength.
+
+    Uses the data length to determine the value for 'emptySDS'.
+ GLOBAL VARIABLES
+ COMMENTS, BUGS, ASSUMPTIONS
+ EXAMPLES
+ REVISION LOG
+    10-30-2004 BMR: This function was added for SDcheckempty
+--------------------------------------------------------------------------*/
+int32
+HDcheck_empty(int32 file_id, uint16 tag, uint16 ref,
+	      intn  *emptySDS /* TRUE if data element is empty */)
+{
+    CONSTR(FUNC, "HDcheck_empty");	/* for HERROR */
+    accrec_t*   access_rec=NULL;	/* access element record */
+    int32	aid;			/* access id */
+    int32       length;			/* length of the element's data */
+    int32       ret_value = SUCCEED;
+
+    /* clear error stack */
+    HEclear();
+
+    /* start read access on the access record of the data element, which
+       is being inquired about */
+    aid = Hstartread(file_id, tag, ref);
+
+    /* get the access_rec pointer */
+    access_rec = HAatom_object(aid);
+    if (access_rec == NULL)
+        HGOTO_ERROR(DFE_ARGS, FAIL);
+
+    /* if the element is chunked, call HMCPgetnumrecs to get the
+        number of records */
+    if (access_rec->special == SPECIAL_CHUNKED)
+    {
+	/* get the access_rec pointer */
+	access_rec = HAatom_object(aid);
+	if (access_rec == NULL) HGOTO_ERROR(DFE_ARGS, FAIL);
+
+        ret_value = HMCPgetnumrecs(access_rec, &length);
+        if (ret_value == FAIL) HGOTO_ERROR(DFE_INTERNAL, FAIL);
+    }
+
+    /* otherwise, let Hinquire retrieve the data length via macro 
+	HQuerylength */
+    else /* if (access_rec->special == SPECIAL_COMP) */
+    {
+	ret_value = HQuerylength(aid, &length);
+	if (ret_value == FAIL) HGOTO_ERROR(DFE_INTERNAL, FAIL);
+    } 
+
+    /* end access to the aid appropriately */
+    if (Hendaccess(aid)== FAIL)
+        HGOTO_ERROR(DFE_CANTENDACCESS, FAIL);
+
+    if (length == 0)
+	*emptySDS = TRUE;
+    else
+	*emptySDS = FALSE;
+
+done:
+  if(ret_value == FAIL)   
+    { /* Error condition cleanup */
+
+    } /* end if */
+
+  /* Normal function cleanup */
+  return ret_value;
+} /* end HDcheck_empty() */
+
 #ifdef HAVE_FMPOOL
 /******************************************************************************
 NAME

Modified: packages/libhdf4/branches/upstream/current/hdf/src/hfile.h
===================================================================
--- packages/libhdf4/branches/upstream/current/hdf/src/hfile.h	2007-05-15 09:05:29 UTC (rev 830)
+++ packages/libhdf4/branches/upstream/current/hdf/src/hfile.h	2007-05-15 09:53:05 UTC (rev 831)
@@ -10,7 +10,7 @@
  *                                                                          *
  ****************************************************************************/
 
-/* $Id: hfile.h,v 1.117 2000/11/20 15:35:18 epourmal Exp $ */
+/* $Id: hfile.h,v 1.128 2005/02/17 21:44:08 epourmal Exp $ */
 
 /*+ hfile.h
    *** Header for hfile.c, routines for low level data element I/O
@@ -47,9 +47,9 @@
 /* Library version numbers */
 
 #define LIBVER_MAJOR    4
-#define LIBVER_MINOR    1 
-#define LIBVER_RELEASE  4 
-#define LIBVER_STRING   "NCSA HDF Version 4.1 Release 4, December 2000"
+#define LIBVER_MINOR    2 
+#define LIBVER_RELEASE  1 
+#define LIBVER_STRING   "NCSA HDF Version 4.2 Release 1, February 17, 2005"
 #define LIBVSTR_LEN    80   /* length of version string  */
 #define LIBVER_LEN  92      /* 4+4+4+80 = 92 */
 /* end of version tags */
@@ -337,10 +337,10 @@
 /* For determining what the last file operation was */
 typedef enum
   {
-      OP_UNKNOWN = 0,   /* Don't know what the last operation was (after fopen frex) */
-      OP_SEEK,          /* Last operation was a seek */
-      OP_WRITE,         /* Last operation was a write */
-      OP_READ           /* Last operation was a read */
+      H4_OP_UNKNOWN = 0,   /* Don't know what the last operation was (after fopen frex) */
+      H4_OP_SEEK,          /* Last operation was a seek */
+      H4_OP_WRITE,         /* Last operation was a write */
+      H4_OP_READ           /* Last operation was a read */
   }
 fileop_t;
 
@@ -399,7 +399,8 @@
       intn        appendable;   /* whether appends to the data are allowed */
       intn        special;      /* special element ? */
       intn        new_elem;     /* is a new element (i.e. no length set yet) */
-      
+      int32       block_size;   /* size of the blocks for linked-block element*/
+      int32       num_blocks;   /* number blocks in the linked-block element */
       uint32      access;       /* access codes */
       uintn       access_type;  /* I/O access type: serial/parallel/... */
       int32       file_id;      /* id of attached file */
@@ -555,6 +556,9 @@
     HDFLIBAPI intn HPfreediskblock
                 (filerec_t * file_rec, int32 block_offset, int32 block_size);
 
+    HDFLIBAPI int32 HDcheck_empty
+                (int32 file_id, uint16 tag, uint16 ref, intn *emptySDS);
+
     HDFLIBAPI int32 HDget_special_info
                 (int32 access_id, sp_info_block_t * info_block);
 
@@ -682,6 +686,9 @@
     HDFLIBAPI int32 HCPinfo
                 (accrec_t * access_rec, sp_info_block_t * info_block);
 
+    HDFLIBAPI int32 get_comp_len
+	        (accrec_t* access_rec);
+
 /*
    ** from hchunks.c - should be the same as found in 'hchunks.h'
  */

Modified: packages/libhdf4/branches/upstream/current/hdf/src/hfiledd.c
===================================================================
--- packages/libhdf4/branches/upstream/current/hdf/src/hfiledd.c	2007-05-15 09:05:29 UTC (rev 830)
+++ packages/libhdf4/branches/upstream/current/hdf/src/hfiledd.c	2007-05-15 09:53:05 UTC (rev 831)
@@ -11,15 +11,11 @@
  ****************************************************************************/
 
 #ifdef RCSID
-static char RcsId[] = "@(#)$Revision: 1.14 $";
+static char RcsId[] = "@(#)$Revision: 1.20 $";
 #endif
 
-/* $Id: hfiledd.c,v 1.14 1999/06/16 21:11:06 dwells Exp $ */
+/* $Id: hfiledd.c,v 1.20 2005/01/09 20:54:04 mcgrath Exp $ */
 
-#ifdef HAVE_PABLO
-#define PABLO_mask ID_filedd_c
-#endif
-
 /*
 FILE
     hfiledd.c - DD & DD block management routines.
@@ -122,7 +118,21 @@
 #define REF_DYNARRAY_START  64
 /* The increment of a ref dynarray */
 #define REF_DYNARRAY_INCR   256
+/* macros to encode and decode a DD */
+#define DDENCODE(p, tag,ref,offset,length) \
+   {UINT16ENCODE(p, tag); \
+    UINT16ENCODE(p, ref); \
+    INT32ENCODE(p, offset); \
+    INT32ENCODE(p, length); \
+   }
+#define DDDECODE(p, tag,ref,offset,length) \
+   {UINT16DECODE(p, tag); \
+    UINT16DECODE(p, ref); \
+    INT32DECODE(p, offset); \
+    INT32DECODE(p, length); \
+   }
 
+
 /******************************************************************************
  NAME
      HTPstart - Initialize the DD list in memory
@@ -238,10 +248,8 @@
         p = tbuf;
         for (i = 0; i < ndds; i++, curr_dd_ptr++)
           {
-            UINT16DECODE(p, curr_dd_ptr->tag);
-            UINT16DECODE(p, curr_dd_ptr->ref);
-            INT32DECODE(p, curr_dd_ptr->offset);
-            INT32DECODE(p, curr_dd_ptr->length);
+	    DDDECODE(p, curr_dd_ptr->tag, curr_dd_ptr->ref,
+		curr_dd_ptr->offset, curr_dd_ptr->length);
             curr_dd_ptr->blk=ddcurr;
   
              /* check if maximum ref # exceeded */
@@ -365,7 +373,7 @@
 
     /* Fill the first memory DD block with NIL dd's */
     list[0].tag = DFTAG_NULL;
-    list[0].ref = 0; /* invalid ref */
+    list[0].ref = DFREF_NONE;
     list[0].length = INVALID_LENGTH;
     list[0].offset = INVALID_OFFSET;
     list[0].blk = block;
@@ -377,10 +385,8 @@
   
     /* Fill the first disk DD block with NIL dd's */
     p = tbuf;
-    UINT16ENCODE(p, (uint16) DFTAG_NULL);
-    UINT16ENCODE(p, (uint16) 0); /* invalid ref */
-    INT32ENCODE(p, (int32) INVALID_LENGTH);
-    INT32ENCODE(p, (int32) INVALID_OFFSET);
+    DDENCODE(p, (uint16) DFTAG_NULL, (uint16) DFREF_NONE,
+	(int32) INVALID_LENGTH, (int32) INVALID_OFFSET);
     HDmemfill(p,tbuf,DD_SZ,(uint32)(ndds-1));
 
     /* Write the NIL dd's out into the DD block on disk */
@@ -478,12 +484,7 @@
             list = &block->ddlist[0];	/* start at the first DD, go from there */
             p = tbuf;
             for (i = 0; i < ndds; i++, list++)
-              {
-                UINT16ENCODE(p, list->tag);
-                UINT16ENCODE(p, list->ref);
-                INT32ENCODE(p, list->offset);
-                INT32ENCODE(p, list->length);
-              }	/* end for */
+		DDENCODE(p, list->tag, list->ref, list->offset, list->length);
 
             if (HP_write(file_rec, tbuf, ndds * DD_SZ) == FAIL)
               HGOTO_ERROR(DFE_WRITEERROR, FAIL);
@@ -947,10 +948,6 @@
     int32       old_off;        /* The offset of the old DD */
     intn ret_value=SUCCEED;
 
-#ifdef HAVE_PABLO
-  TRACE_ON(PABLO_mask,ID_Hdupdd);
-#endif /* HAVE_PABLO */
-
     /* clear error stack and check validity of file id */
     HEclear();
     file_rec = HAatom_object(file_id);
@@ -986,10 +983,6 @@
     } /* end if */
 
   /* Normal function cleanup */
-#ifdef HAVE_PABLO
-    TRACE_OFF(PABLO_mask, ID_Hdupdd);
-#endif /* HAVE_PABLO */
-
   return ret_value;
 }   /* Hdupdd() */
 
@@ -1015,12 +1008,11 @@
     CONSTR(FUNC, "Hnumber");
     uintn       all_cnt;
     uintn       real_cnt;
-    filerec_t  *file_rec = HAatom_object(file_id);
+    filerec_t  *file_rec;           /* file record */
     int32 ret_value=SUCCEED;
 
-#ifdef HAVE_PABLO
-  TRACE_ON(PABLO_mask,ID_Hnumber);
-#endif /* HAVE_PABLO */
+    /* convert file id to file record */
+    file_rec = HAatom_object(file_id);
 
     HEclear();
     if (BADFREC(file_rec))
@@ -1039,10 +1031,6 @@
     } /* end if */
 
   /* Normal function cleanup */
-#ifdef HAVE_PABLO
-    TRACE_OFF(PABLO_mask, ID_Hnumber);
-#endif /* HAVE_PABLO */
-
   return ret_value;
 }   /* Hnumber() */
 
@@ -1066,12 +1054,9 @@
     CONSTR(FUNC, "Hnewref");
     filerec_t  *file_rec;	   /* file record */
     uint16      ref;		   /* the new ref */
-    uint16      ret_value = 0; /* 0 is invalid ref */
+    uint16      ret_value = DFREF_NONE;
+    uint32      i_ref;        /* index for FOR loop */
 
-#ifdef HAVE_PABLO
-  TRACE_ON(PABLO_mask,ID_Hnewref);
-#endif /* HAVE_PABLO */
-
     /* clear error stack and check validity of file record id */
     HEclear();
     file_rec = HAatom_object(file_id);
@@ -1086,10 +1071,10 @@
       { /* otherwise, search for an empty ref */
         /* incredibly slow but unlikely situation */
 /* This could possibly get replaced with some sort of bit-vector manipulation -QAK */
-        for (ref = 1; ref <= MAX_REF; ref++)
+        for (i_ref = 1; i_ref <= (uint32)MAX_REF; i_ref++)
           {
             dd_t *dd_ptr=NULL;
-      
+            ref = (uint16)i_ref; 
             if (HTIfind_dd(file_rec, (uint16) DFTAG_WILDCARD, ref, &dd_ptr, DF_FORWARD) == FAIL)
               {
                ret_value = ref; /* set return value to ref found */
@@ -1099,16 +1084,12 @@
       } /* end else */
 
 done:
-  if(ret_value == 0)   /* Zero is invalid ref */
+  if(ret_value == DFREF_NONE)
     { /* Error condition cleanup */
 
     } /* end if */
 
   /* Normal function cleanup */
-#ifdef HAVE_PABLO
-    TRACE_OFF(PABLO_mask, ID_Hnewref);
-#endif /* HAVE_PABLO */
-
   return ret_value;
 }   /* Hnewref() */
 
@@ -1135,12 +1116,8 @@
     tag_info   *tinfo_ptr; /* pointer to the info for a tag */
     tag_info  **tip_ptr;   /* ptr to the ptr to the info for a tag */
     uint16      base_tag = BASETAG(tag); /* corresponding base tag (if the tag is special) */
-    uint16      ret_value = 0; /* 0 is invalid ref */
+    uint16      ret_value = DFREF_NONE;
 
-#ifdef HAVE_PABLO
-  TRACE_ON(PABLO_mask,ID_Htagnewref);
-#endif /* HAVE_PABLO */
-
     /* clear error stack and check validity of file record id */
     HEclear();
     file_rec = HAatom_object(file_id);
@@ -1163,10 +1140,6 @@
     } /* end if */
 
   /* Normal function cleanup */
-#ifdef HAVE_PABLO
-    TRACE_OFF(PABLO_mask, ID_Htagnewref);
-#endif /* HAVE_PABLO */
-
   return ret_value;
 }   /* Htagnewref() */
 
@@ -1206,10 +1179,6 @@
     dd_t       *dd_ptr;		   /* ptr to current ddlist searched */
     intn    ret_value = SUCCEED;
 
-#ifdef HAVE_PABLO
-    TRACE_ON(PABLO_mask,ID_Hfind);
-#endif /* HAVE_PABLO */
-
     /* clear error stack and check validity of the access id */
     HEclear();
     if (file_id == FAIL || /* search_ref > MAX_REF || */ find_tag == NULL
@@ -1245,10 +1214,6 @@
       } /* end if */
 
   /* Normal function cleanup */
-#ifdef HAVE_PABLO
-     TRACE_OFF(PABLO_mask, ID_Hfind);
-#endif /* HAVE_PABLO */
-
     return ret_value;
 }	/* end Hfind() */
 
@@ -1346,10 +1311,6 @@
   atom_t      ddid;            /* ID for the DD */
   intn        ret_value = SUCCEED;
 
-#ifdef HAVE_PABLO
-  TRACE_ON(PABLO_mask,ID_HDreuse_tagref);
-#endif /* HAVE_PABLO */
-
   /* clear error stack and check validity of file record id */
   HEclear();
 
@@ -1388,10 +1349,6 @@
     } /* end if */
 
   /* Normal function cleanup */
-#ifdef HAVE_PABLO
-  TRACE_OFF(PABLO_mask, ID_HDreuse_tagref);
-#endif /* HAVE_PABLO */
-
   return ret_value;
 }	/* end HDreuse_tagref */
 
@@ -1420,10 +1377,6 @@
   atom_t      ddid;         /* ID for the DD */
   intn        ret_value = SUCCEED;
 
-#ifdef HAVE_PABLO
-  TRACE_ON(PABLO_mask,ID_Hdeldd);
-#endif /* HAVE_PABLO */
-
   /* clear error stack and check validity of file record id */
   HEclear();
   file_rec = HAatom_object(file_id);
@@ -1445,10 +1398,6 @@
     } /* end if */
 
   /* Normal function cleanup */
-#ifdef HAVE_PABLO
-  TRACE_OFF(PABLO_mask, ID_Hdeldd);
-#endif /* HAVE_PABLO */
-
   return ret_value;
 }	/* end Hdeldd */
 
@@ -1635,7 +1584,7 @@
 
     /* Fill the block with NIL tags */
     list[0].tag = DFTAG_NULL;
-    list[0].ref = 0; /* invalid ref */
+    list[0].ref = DFREF_NONE;
     list[0].length = INVALID_LENGTH;
     list[0].offset = INVALID_OFFSET;
     list[0].blk = block;
@@ -1650,10 +1599,8 @@
             HGOTO_ERROR(DFE_NOSPACE, FAIL);
 
         p = tbuf;
-        UINT16ENCODE(p, (uint16) DFTAG_NULL);
-        UINT16ENCODE(p, (uint16) 0); /* invalid ref */
-        INT32ENCODE(p, (int32) INVALID_LENGTH);
-        INT32ENCODE(p, (int32) INVALID_OFFSET);
+	DDENCODE(p, (uint16) DFTAG_NULL, (uint16) DFREF_NONE,
+	    (int32) INVALID_LENGTH, (int32) INVALID_OFFSET);
         HDmemfill(p,tbuf,DD_SZ,(uint32)(ndds-1));
 
         if (HP_write(file_rec, tbuf, ndds * DD_SZ) == FAIL)
@@ -2045,10 +1992,7 @@
           HGOTO_ERROR(DFE_SEEKERROR, FAIL);
   
         p = tbuf;
-        UINT16ENCODE(p, dd_ptr->tag);
-        UINT16ENCODE(p, dd_ptr->ref);
-        INT32ENCODE(p, dd_ptr->offset);
-        INT32ENCODE(p, dd_ptr->length);
+	DDENCODE(p, dd_ptr->tag, dd_ptr->ref, dd_ptr->offset, dd_ptr->length);
         if (HP_write(file_rec, tbuf, DD_SZ) == FAIL)
           HGOTO_ERROR(DFE_WRITEERROR, FAIL);
       } /* end else */

Modified: packages/libhdf4/branches/upstream/current/hdf/src/hfileff.f
===================================================================
--- packages/libhdf4/branches/upstream/current/hdf/src/hfileff.f	2007-05-15 09:05:29 UTC (rev 830)
+++ packages/libhdf4/branches/upstream/current/hdf/src/hfileff.f	2007-05-15 09:53:05 UTC (rev 831)
@@ -10,7 +10,7 @@
 C*                                                                          *
 C****************************************************************************
 C
-C $Id: hfileff.f,v 1.11 1999/04/27 19:58:49 epourmal Exp $
+C $Id: hfileff.f,v 1.13 2001/10/01 21:53:47 epourmal Exp $
 C
 C------------------------------------------------------------------------------
 C File:     hfileFf.f
@@ -155,3 +155,22 @@
      .                      len(error_message))
       return
       end
+C-----------------------------------------------------------------------------
+C Name: heprntf
+C Purpose: prints values from the error stack 
+C Inputs:  filename - name of the output file; if length of the
+C          filename is 0, then output goes to stdout.  
+C          print_levels - number of levels to print 
+C Retruns: SUCCEED (0) if successful and FAIL(-1) otherwise
+C
+C Remarks: This routine always prints to the standard output.
+C-----------------------------------------------------------------------------*/
+
+      integer function heprntf(filename, print_levels)
+      integer print_levels 
+      character*(*) filename
+      
+      integer heprntc
+      heprntf = heprntc(filename, print_levels,len(filename))
+      return
+      end

Modified: packages/libhdf4/branches/upstream/current/hdf/src/hlimits.h
===================================================================
--- packages/libhdf4/branches/upstream/current/hdf/src/hlimits.h	2007-05-15 09:05:29 UTC (rev 830)
+++ packages/libhdf4/branches/upstream/current/hdf/src/hlimits.h	2007-05-15 09:53:05 UTC (rev 831)
@@ -10,7 +10,7 @@
  *                                                                          *
  ****************************************************************************/
 
-/* $Id: hlimits.h,v 1.17 2000/05/05 20:51:11 epourmal Exp $ */
+/* $Id: hlimits.h,v 1.18 2002/04/04 01:04:48 bmribler Exp $ */
 
 /*+ hlimits.h
    *** This file contains all hard coded limits for the library
@@ -179,6 +179,9 @@
 #define MAX_NC_NAME MIN(256,MIN(VSNAMELENMAX,VGNAMELENMAX)) */
 
 #define MAX_NC_NAME 256		 /* max length of a name */
+#define MAX_NC_CLASS 128         /* max length of a class name - added this
+        because 128 was used commonly in SD for class name, and this will help
+        changing the class name variable declaration much easier - BMR 4/1/02*/
 #define MAX_VAR_DIMS 32          /* max per variable dimensions */
 
 /* ----------------- Constants for MFGR interface --------------------- */

Modified: packages/libhdf4/branches/upstream/current/hdf/src/hproto.h
===================================================================
--- packages/libhdf4/branches/upstream/current/hdf/src/hproto.h	2007-05-15 09:05:29 UTC (rev 830)
+++ packages/libhdf4/branches/upstream/current/hdf/src/hproto.h	2007-05-15 09:53:05 UTC (rev 831)
@@ -10,7 +10,7 @@
  *                                                                          *
  ****************************************************************************/
 
-/* $Id: hproto.h,v 1.184 2000/02/25 19:13:02 epourmal Exp $ */
+/* $Id: hproto.h,v 1.197 2005/01/09 20:54:05 mcgrath Exp $ */
 
 #ifndef _H_PROTO
 #define _H_PROTO
@@ -427,6 +427,12 @@
                 (int32 aid, int32 *length, int32 *first_length, int32 *block_length,
                  int32 *number_blocks);
 
+    HDFLIBAPI intn HLsetblockinfo
+                (int32 aid, int32 block_size, int32 num_blocks);
+
+    HDFLIBAPI intn HLgetblockinfo
+                (int32 aid, int32* block_size, int32* num_blocks);
+
 /*
    ** from hextelt.c
  */
@@ -448,6 +454,12 @@
                  comp_model_t model_type, model_info * m_info,
                  comp_coder_t coder_type, comp_info * c_info);
 
+    HDFLIBAPI intn HCPgetcompress
+                (int32 file_id, uint16 data_tag, uint16 data_ref, 
+		 comp_coder_t *coder_type, comp_info * c_info);
+
+    HDFPUBLIC intn HCget_config_info ( comp_coder_t coder_type, uint32 *compression_config_info);
+
     HDFLIBAPI int32 HCPquery_encode_header(comp_model_t model_type, model_info * m_info,
              comp_coder_t coder_type, comp_info * c_info);
 
@@ -457,7 +469,11 @@
     HDFLIBAPI intn HCPdecode_header(uint8 *p, comp_model_t *model_type, model_info * m_info,
              comp_coder_t *coder_type, comp_info * c_info);
 
+/*
+   ** from cszip.c
+ */
 
+     HDFLIBAPI intn HCPsetup_szip_parms ( comp_info *c_info, int32 nt, int32 ncomp, int32 ndims, int32 *dims, int32 *cdims);
 /*
    ** from hbuffer.c
  */
@@ -2040,9 +2056,11 @@
 #   define HERR_FNAMES
 #ifdef DF_CAPFNAMES
 #   define nheprnt   FNAME(HEPRNT)
+#   define nheprntc   FNAME(HEPRNTC)
 #   define nhestringc FNAME(HESTRINGC)
 #else
 #   define nheprnt   FNAME(heprnt)
+#   define nheprntc   FNAME(heprntc)
 #   define nhestringc FNAME(hestringc)
 #endif                          /* DF_CAPFNAMES */
 #endif                          /* HERR_FNAMES */
@@ -2050,6 +2068,9 @@
     HDFLIBAPI      FRETVAL(void) nheprnt
                 (intf  * print_levels);
 
+    HDFLIBAPI      FRETVAL(intf) nheprntc
+                (_fcd filename, intf  * print_levels, intf *namelen);
+
     HDFLIBAPI      FRETVAL(intf) nhestringc
 				(intf *error_code,_fcd error_message, intf *len);
 /*
@@ -2263,7 +2284,7 @@
 naffcreate(intf *an_id, intf *atype);
 
 HDFLIBAPI FRETVAL(intf)
-nafselect(intf *an_id, intf *index, intf *atype);
+nafselect(intf *an_id, intf *idx, intf *atype);
 
 HDFLIBAPI FRETVAL(intf)
 nafnumann(intf *an_id, intf *atype, intf *etag, intf *eref);
@@ -2284,7 +2305,7 @@
 nafendaccess(intf *ann_id);
 
 HDFLIBAPI FRETVAL(intf)
-nafgettagref(intf *an_id, intf *index, intf *type, intf *tag, intf *ref);
+nafgettagref(intf *an_id, intf *idx, intf *type, intf *tag, intf *ref);
 
 HDFLIBAPI FRETVAL(intf)
 nafidtagref(intf *ann_id, intf *tag, intf *ref);
@@ -2311,7 +2332,7 @@
 
 HDFLIBAPI int32 ANcreatef(int32 an_id, ann_type type);
 
-HDFLIBAPI int32 ANselect(int32 an_id, int32 index, ann_type type);
+HDFLIBAPI int32 ANselect(int32 an_id, int32 idx, ann_type type);
 
 HDFLIBAPI intn  ANnumann(int32 an_id, ann_type type, uint16 elem_tag, 
                       uint16 elem_ref);
@@ -2327,7 +2348,7 @@
 
 HDFLIBAPI intn  ANendaccess(int32 ann_id);
 
-HDFLIBAPI int32 ANget_tagref(int32 an_id, int32 index, ann_type type,
+HDFLIBAPI int32 ANget_tagref(int32 an_id, int32 idx, ann_type type,
                           uint16 *ann_tag, uint16 *ann_ref);
 
 HDFLIBAPI int32 ANid2tagref(int32 an_id, uint16 *ann_tag, uint16 *ann_ref);
@@ -2384,7 +2405,9 @@
 # define nmgcwcchnk        FNAME(MGCWCCHNK)
 # define nmgcwchnk         FNAME(MGCWCHNK)
 # define nmgcscompress     FNAME(MGCSCOMPRESS)
+# define nmgcgcompress     FNAME(MGCGCOMPRESS)
 # define nmglt2rf         FNAME(MGLT2RF)
+# define nmgcgnluts       FNAME(MGCGNLUTS)
 # else                                  /* !sl */
 #  define nmgistrt      FNAME(MGISTRT)
 #  define nmgifinf      FNAME(MGIFINF)
@@ -2425,7 +2448,9 @@
 # define nmgcwcchnk        FNAME(MGCWCCHNK)
 # define nmgcwchnk         FNAME(MGCWCHNK)
 # define nmgcscompress     FNAME(MGCSCOMPRESS)
+# define nmgcgcompress     FNAME(MGCGCOMPRESS)
 # define nmglt2rf         FNAME(MGLT2RF)
+# define nmgcgnluts       FNAME(MGCGNLUTS)
 # endif
 #else  /* !DF_CAPFNAMES */
 # if defined(UNIX386) || (!(defined INTEL86) && !(defined WIN32))
@@ -2468,7 +2493,9 @@
 # define nmgcwcchnk        FNAME(mgcwcchnk)
 # define nmgcwchnk         FNAME(mgcwchnk)
 # define nmgcscompress     FNAME(mgcscompress)
+# define nmgcgcompress     FNAME(mgcgcompress)
 # define nmglt2rf         FNAME(mglt2rf)
+# define nmgcgnluts       FNAME(mgcgnluts)
 # else                                    /* !sl */
 #  define nmgistrt      FNAME(mgistrt)
 #  define nmgifinf      FNAME(mgifinf)
@@ -2509,7 +2536,9 @@
 # define nmgcwcchnk        FNAME(mgcwcchnk)
 # define nmgcwchnk         FNAME(mgcwchnk)
 # define nmgcscompress     FNAME(mgcscompress)
+# define nmgcgcompress     FNAME(mgcgcompress)
 # define nmglt2rf         FNAME(mglt2rf)
+# define nmgcgnluts       FNAME(mgcgnluts)
 # endif
 
 #endif /* DF_CAPFNAMES */
@@ -2523,7 +2552,7 @@
 nmgirimg(intf * riid, intf *start, intf *stride, intf *count, VOIDP data);
 
 HDFLIBAPI FRETVAL(intf)     /* !sl */
-nmgignat(intf * riid, intf *index, VOIDP data);
+nmgignat(intf * riid, intf *idx, VOIDP data);
 
 HDFLIBAPI FRETVAL(intf)
 nmgstart(intf * fid);
@@ -2538,7 +2567,7 @@
 nmgicreat(intf * grid, _fcd name, intf *ncomp, intf *nt, intf *il, intf dimsizes[2], intf *nlen);
 
 HDFLIBAPI FRETVAL(intf)
-nmgselct(intf * grid, intf *index);
+nmgselct(intf * grid, intf *idx);
 
 HDFLIBAPI FRETVAL(intf)
 nmgin2ndx(intf * grid, _fcd name, intf *nlen);
@@ -2605,16 +2634,16 @@
 nmgisattr(intf * riid, _fcd name, intf *nt, intf *count, void * data, intf *nlen);
 
 HDFLIBAPI FRETVAL(intf)
-nmgatinf(intf * riid, intf *index, _fcd name, intf *nt, intf *count);
+nmgatinf(intf * riid, intf *idx, _fcd name, intf *nt, intf *count);
 
 HDFLIBAPI FRETVAL(intf)
-nmggcatt(intf * riid, intf *index, _fcd data);
+nmggcatt(intf * riid, intf *idx, _fcd data);
 
 HDFLIBAPI FRETVAL(intf)
-nmggnatt(intf * riid, intf *index, void * data);
+nmggnatt(intf * riid, intf *idx, void * data);
 
 HDFLIBAPI FRETVAL(intf)
-nmggattr(intf * riid, intf *index, void * data);
+nmggattr(intf * riid, intf *idx, void * data);
 
 HDFLIBAPI FRETVAL(intf)
 nmgifndat(intf * riid, _fcd name, intf *nlen);
@@ -2644,8 +2673,14 @@
        nmgcscompress(intf *id, intf *comp_type, intf *comp_prm);
 
     HDFLIBAPI FRETVAL (intf)
+       nmgcgcompress(intf *id, intf *comp_type, intf *comp_prm);
+
+    HDFLIBAPI FRETVAL (intf)
        nmglt2rf(intf *id);
 
+    HDFLIBAPI FRETVAL (intf)
+       nmgcgnluts(intf *id);
+
 /* Multi-file Raster C-routines found in mfgr.c */
 HDFLIBAPI intn rigcompare(void * k1, void * k2, intn cmparg);
 
@@ -2658,13 +2693,15 @@
 HDFLIBAPI int32 GRcreate(int32 grid,const char *name,int32 ncomp,int32 nt,int32 il,
     int32 dimsizes[2]);
 
-HDFLIBAPI int32 GRselect(int32 grid,int32 index);
+HDFLIBAPI int32 GRselect(int32 grid,int32 idx);
 
 HDFLIBAPI int32 GRnametoindex(int32 grid,const char *name);
 
 HDFLIBAPI intn GRgetiminfo(int32 riid,char *name,int32 *ncomp,int32 *nt,int32 *il,
     int32 dimsizes[2],int32 *n_attr);
 
+HDFLIBAPI intn GRgetnluts(int32 riid);
+
 HDFLIBAPI intn GRwriteimage(int32 riid,int32 start[2],int32 stride[2],
     int32 count[2],void * data);
 
@@ -2681,7 +2718,7 @@
 
 HDFLIBAPI intn GRreqimageil(int32 riid,intn il);
 
-HDFLIBAPI int32 GRgetlutid(int32 riid,int32 index);
+HDFLIBAPI int32 GRgetlutid(int32 riid,int32 idx);
 
 HDFLIBAPI uint16 GRluttoref(int32 lutid);
 
@@ -2697,13 +2734,15 @@
 
 HDFLIBAPI intn GRsetaccesstype(int32 riid,uintn accesstype);
 
-HDFLIBAPI intn GRsetcompress(int32 riid,int32 comp_type,comp_info *cinfo);
+HDFLIBAPI intn GRsetcompress(int32 riid,comp_coder_t comp_type,comp_info *cinfo);
 
+HDFLIBAPI intn GRgetcompress(int32 riid,comp_coder_t* comp_type,comp_info *cinfo);
+
 HDFLIBAPI intn GRsetattr(int32 id,const char *name,int32 attr_nt,int32 count,const void * data);
 
-HDFLIBAPI intn GRattrinfo(int32 id,int32 index,char *name,int32 *attr_nt,int32 *count);
+HDFLIBAPI intn GRattrinfo(int32 id,int32 idx,char *name,int32 *attr_nt,int32 *count);
 
-HDFLIBAPI intn GRgetattr(int32 id,int32 index,void * data);
+HDFLIBAPI intn GRgetattr(int32 id,int32 idx,void * data);
 
 HDFLIBAPI int32 GRfindattr(int32 id,const char *name);
 
@@ -2991,28 +3030,6 @@
      int32 flags      /* IN: flags = 0, HDF_CACHEALL */);
 
 
-/* For Pablo wrapper functions */
-
-#if defined HAVE_PABLO || defined PABLO
-HDFLIBAPI int HDFinitIOTrace(char *traceFileName, intn detail, intn lifetime,
-                          intn timeWindow, float64 timeWindowSize,
-                          intn regionTrace, intn regionSize,
-                          uint16 procTraceMask );
-HDFLIBAPI int HDFendIOTrace(void);
-
-#ifndef PABLO_FNAMES
-#   define PABLO_FNAMES
-#ifdef DF_CAPFNAMES
-#   define nihinitiotrace FNAME(IHINITIOTRACE)
-#   define nhendiotrace   FNAME(HENDIOTRACE)
-#else  /* !DF_CAPFNAMES */
-#   define nihinitiotrace FNAME(ihinitiotrace)
-#   define nhendiotrace   FNAME(hendiotrace)
-#endif /* DF_CAPFNAMES */
-#endif /* PABLO_FNAMES */
-
-#endif /* HAVE_PABLO || PABLO*/
-
 #ifdef HAVE_FMPOOL
 /******************************************************************************
 NAME
@@ -3195,6 +3212,15 @@
     HDFLIBAPI int32 VSfindclass
                 (HFILEID f, const char  * vsclass);
 
+    HDFLIBAPI intn VSsetblocksize
+                (int32 vkey, int32 block_size);
+
+    HDFLIBAPI intn VSsetnumblocks
+                (int32 vkey, int32 num_blocks);
+
+    HDFLIBAPI intn VSgetblockinfo
+                (int32 vkey, int32* block_size, int32* num_blocks);
+
     HDFLIBAPI void Vsetzap
                 (void);
 
@@ -3393,19 +3419,19 @@
                 (int32 vkey);
 
     HDFLIBAPI char *VFfieldname
-                (int32 vkey, int32 index);
+                (int32 vkey, int32 idx);
 
     HDFLIBAPI int32 VFfieldtype
-                (int32 vkey, int32 index);
+                (int32 vkey, int32 idx);
 
     HDFLIBAPI int32 VFfieldisize
-                (int32 vkey, int32 index);
+                (int32 vkey, int32 idx);
 
     HDFLIBAPI int32 VFfieldesize
-                (int32 vkey, int32 index);
+                (int32 vkey, int32 idx);
 
     HDFLIBAPI int32 VFfieldorder
-                (int32 vkey, int32 index);
+                (int32 vkey, int32 idx);
 
     HDFLIBAPI intn VSsetexternalfile
 		(int32 vkey, const char *filename, int32 offset);
@@ -3517,6 +3543,9 @@
 #   define  nvsfncpk    FNAME(VSFNCPK)
 #   define  nvdtrc      FNAME(VDTRC)
 #   define  nvscfcls    FNAME(VSCFCLS)
+#   define  nvscsetblsz FNAME(VSCSETBLSZ)
+#   define  nvscsetnmbl FNAME (VSCSETNMBL)
+#   define  nvscgblinfo FNAME(VSCGBLINFO)
 #  else                                /* !sl */
 #   define  ndfivopn FNAME(DFIVOPN)
 #   define  ndfvclos FNAME(DFVCLOS)
@@ -3599,6 +3628,9 @@
 #   define  nvsfncpk    FNAME(VSFNCPK)
 #   define  nvdtrc      FNAME(VDTRC)
 #   define  nvscfcls    FNAME(VSCFCLS)
+#   define  nvscsetblsz FNAME(VSCSETBLSZ)
+#   define  nvscsetnmbl FNAME (VSCSETNMBL)
+#   define  nvscgblinfo FNAME(VSCGBLINFO)
 #  endif
 #else                           /* !DF_CAPFNAMES */
 # if defined(UNIX386) || (!(defined INTEL86) && !(defined WIN32))
@@ -3683,6 +3715,9 @@
 #   define  nvsfncpk    FNAME(vsfncpk)
 #   define  nvdtrc      FNAME(vdtrc)
 #   define  nvscfcls    FNAME(vscfcls)
+#   define  nvscsetblsz FNAME(vscsetblsz)
+#   define  nvscsetnmbl FNAME (vscsetnmbl)
+#   define  nvscgblinfo FNAME(vscgblinfo)
 #  else                            /* !sl */
 #   define  ndfivopn FNAME(dfivopn)
 #   define  ndfvclos FNAME(dfvclos)
@@ -3765,6 +3800,9 @@
 #   define  nvsfncpk    FNAME(vsfncpk)
 #   define  nvdtrc      FNAME(vdtrc)
 #   define  nvscfcls    FNAME(vscfcls)
+#   define  nvscsetblsz FNAME(vscsetblsz)
+#   define  nvscsetnmbl FNAME (vscsetnmbl)
+#   define  nvscgblinfo FNAME(vscgblinfo)
 #  endif
 #endif                          /* DF_CAPFNAMES */
 #endif                          /* VG_FNAMES */
@@ -3890,19 +3928,19 @@
                 (intf  * vkey);
 
     HDFLIBAPI      FRETVAL(intf) nvffnamec
-                (intf  * vkey, intf  *index, _fcd fname, intf *len);
+                (intf  * vkey, intf  *idx, _fcd fname, intf *len);
 
     HDFLIBAPI      FRETVAL(intf) nvfftype
-                (intf  * vkey, intf  *index);
+                (intf  * vkey, intf  *idx);
 
     HDFLIBAPI      FRETVAL(intf) nvffisiz
-                (intf  * vkey, intf  *index);
+                (intf  * vkey, intf  *idx);
 
     HDFLIBAPI      FRETVAL(intf) nvffesiz
-                (intf  * vkey, intf  *index);
+                (intf  * vkey, intf  *idx);
 
     HDFLIBAPI      FRETVAL(intf) nvffordr
-                (intf  * vkey, intf  *index);
+                (intf  * vkey, intf  *idx);
 
     HDFLIBAPI      FRETVAL(intf) nvsfrdc
                 (intf  * vkey, _fcd  cbuf, intf  * nelt,
@@ -4016,26 +4054,35 @@
     HDFLIBAPI      FRETVAL(intf) nvsqfnelt
                 (intf * vkey, intf * nelt);
 
-    HDFLIBAPI      FRETVAL(intf)nvsqfintr
+    HDFLIBAPI      FRETVAL(intf) nvsqfintr
                 (intf * vkey, intf * interlace);
 
-    HDFLIBAPI      FRETVAL(intf)nvsqfldsc
+    HDFLIBAPI      FRETVAL(intf) nvsqfldsc
                 (intf * vkey, _fcd fields, intf *fieldslen);
 
-    HDFLIBAPI      FRETVAL(intf)nvsqfvsiz
+    HDFLIBAPI      FRETVAL(intf) nvsqfvsiz
                 (intf * vkey, intf * size);
 
-    HDFLIBAPI      FRETVAL(intf)nvsqnamec  
+    HDFLIBAPI      FRETVAL(intf) nvsqnamec  
                 (intf * vkey, _fcd name, intf *namelen);
 
-    HDFLIBAPI      FRETVAL(intf)nvsfccpk
+    HDFLIBAPI      FRETVAL(intf) nvsfccpk
                 (intf *vs, intf *packtype, _fcd buflds, intf *buf, intf *bufsz,
         intf *nrecs, _fcd pckfld, _fcd fldbuf, intf *buflds_len, intf *fld_len);
 
-    HDFLIBAPI      FRETVAL(intf)nvsfncpk
+    HDFLIBAPI      FRETVAL(intf) nvsfncpk
                 (intf *vs, intf *packtype, _fcd buflds, intf *buf, intf *bufsz,
         intf *nrecs, _fcd pckfld, intf *fldbuf, intf *buflds_len, intf *fld_len);
 
+    HDFLIBAPI      FRETVAL(intf) nvscsetblsz
+                (intf *id, intf *block_size);
+
+    HDFLIBAPI      FRETVAL(intf) nvscsetnmbl
+                (intf *id, intf *num_blocks);
+
+    HDFLIBAPI      FRETVAL(intf) nvscgblinfo
+                (intf *id, intf *block_size, intf *num_blocks);
+
 /* 
   ** from vattrf.c
  */

Modified: packages/libhdf4/branches/upstream/current/hdf/src/linklist.c
===================================================================
--- packages/libhdf4/branches/upstream/current/hdf/src/linklist.c	2007-05-15 09:05:29 UTC (rev 830)
+++ packages/libhdf4/branches/upstream/current/hdf/src/linklist.c	2007-05-15 09:53:05 UTC (rev 831)
@@ -11,15 +11,11 @@
  ****************************************************************************/
 
 #ifdef RCSID
-static char RcsId[] = "@(#)$Revision: 1.4 $";
+static char RcsId[] = "@(#)$Revision: 1.5 $";
 #endif
 
-/* $Id: linklist.c,v 1.4 1999/06/16 21:11:06 dwells Exp $ */
+/* $Id: linklist.c,v 1.5 2005/01/09 20:54:06 mcgrath Exp $ */
 
-#ifdef HAVE_PABLO
-#define PABLO_mask ID_linklist_c
-#endif
-
 /*
 FILE
     linklist.c - Internal storage routines for handling generic linked lists
@@ -87,10 +83,6 @@
     CONSTR(FUNC, "HULcreate_list");	/* for HERROR */
     list_head_t *ret_value=NULL;     /* ptr to the linked list "head" node */
 
-#ifdef HAVE_PABLO
-    TRACE_ON(PABLO_mask,ID_HULcreate_list);
-#endif /* HAVE_PABLO */
-
     HEclear();
 
     /* Allocate the head information */
@@ -114,10 +106,6 @@
     } /* end if */
 
   /* Normal function cleanup */
-#ifdef HAVE_PABLO
-        TRACE_OFF(PABLO_mask,ID_HULcreate_list);
-#endif /* HAVE_PABLO */
-
   return ret_value;
 }   /* end HULcreate_list() */
 
@@ -143,10 +131,6 @@
         *next_node;                 /* next node in the list */
     intn ret_value=SUCCEED;         /* return value */
 
-#ifdef HAVE_PABLO
-    TRACE_ON(PABLO_mask,ID_HULdestroy_list);
-#endif /* HAVE_PABLO */
-
     HEclear();
     if(lst==NULL)
         HGOTO_ERROR(DFE_ARGS,FAIL);
@@ -170,10 +154,6 @@
     } /* end if */
 
   /* Normal function cleanup */
-#ifdef HAVE_PABLO
-        TRACE_OFF(PABLO_mask,ID_HULdestroy_list);
-#endif /* HAVE_PABLO */
-
   return ret_value;
 }   /* end HULdestroy_list() */
 
@@ -198,10 +178,6 @@
     node_info_t *new_node;          /* new node to insert into the list */
     intn ret_value=SUCCEED;         /* return value */
 
-#ifdef HAVE_PABLO
-    TRACE_ON(PABLO_mask,ID_HULadd_node);
-#endif /* HAVE_PABLO */
-
     HEclear();
     if(lst==NULL || obj==NULL)
         HGOTO_ERROR(DFE_ARGS,FAIL);
@@ -252,10 +228,6 @@
     } /* end if */
 
   /* Normal function cleanup */
-#ifdef HAVE_PABLO
-        TRACE_OFF(PABLO_mask,ID_HULadd_node);
-#endif /* HAVE_PABLO */
-
   return ret_value;
 }   /* end HULadd_node() */
 
@@ -279,10 +251,6 @@
     node_info_t *curr_node;         /* current node we are on */
     VOIDP ret_value=NULL;           /* default return value */
 
-#ifdef HAVE_PABLO
-    TRACE_ON(PABLO_mask,ID_HULsearch_node);
-#endif /* HAVE_PABLO */
-
     HEclear();
     if(lst==NULL || srch_func==NULL || key==NULL)
         HGOTO_ERROR(DFE_ARGS,NULL);
@@ -301,10 +269,6 @@
     } /* end if */
 
   /* Normal function cleanup */
-#ifdef HAVE_PABLO
-        TRACE_OFF(PABLO_mask,ID_HULsearch_node);
-#endif /* HAVE_PABLO */
-
   return ret_value;
 }   /* end HULsearch_node() */
 
@@ -326,10 +290,6 @@
     CONSTR(FUNC, "HULfirst_node");	/* for HERROR */
     VOIDP ret_value=NULL;           /* default return value */
 
-#ifdef HAVE_PABLO
-    TRACE_ON(PABLO_mask,ID_HULfirst_node);
-#endif /* HAVE_PABLO */
-
     HEclear();
     if(lst==NULL)
         HGOTO_ERROR(DFE_ARGS,NULL);
@@ -347,10 +307,6 @@
     } /* end if */
 
   /* Normal function cleanup */
-#ifdef HAVE_PABLO
-        TRACE_OFF(PABLO_mask,ID_HULfirst_node);
-#endif /* HAVE_PABLO */
-
   return ret_value;
 }   /* end HULfirst_node() */
 
@@ -371,10 +327,6 @@
     CONSTR(FUNC, "HULnext_node");	/* for HERROR */
     VOIDP ret_value=NULL;           /* default return value */
 
-#ifdef HAVE_PABLO
-    TRACE_ON(PABLO_mask,ID_HULnext_node);
-#endif /* HAVE_PABLO */
-
     HEclear();
     if(lst==NULL)
         HGOTO_ERROR(DFE_ARGS,NULL);
@@ -393,10 +345,6 @@
     } /* end if */
 
   /* Normal function cleanup */
-#ifdef HAVE_PABLO
-        TRACE_OFF(PABLO_mask,ID_HULnext_node);
-#endif /* HAVE_PABLO */
-
   return ret_value;
 }   /* end HULnext_node() */
 
@@ -422,10 +370,6 @@
         *prev_node;                 /* previous node we looked at */
     VOIDP ret_value=NULL;           /* default return value */
 
-#ifdef HAVE_PABLO
-    TRACE_ON(PABLO_mask,ID_HULremove_node);
-#endif /* HAVE_PABLO */
-
     HEclear();
     if(lst==NULL || srch_func==NULL || key==NULL)
         HGOTO_ERROR(DFE_ARGS,NULL);
@@ -453,10 +397,6 @@
     } /* end if */
 
   /* Normal function cleanup */
-#ifdef HAVE_PABLO
-        TRACE_OFF(PABLO_mask,ID_HULremove_node);
-#endif /* HAVE_PABLO */
-
   return ret_value;
 }   /* end HULremove_node() */
 

Modified: packages/libhdf4/branches/upstream/current/hdf/src/mcache.c
===================================================================
--- packages/libhdf4/branches/upstream/current/hdf/src/mcache.c	2007-05-15 09:05:29 UTC (rev 830)
+++ packages/libhdf4/branches/upstream/current/hdf/src/mcache.c	2007-05-15 09:53:05 UTC (rev 831)
@@ -44,10 +44,10 @@
  *****************************************************************************/ 
 
 #ifdef RCSID
-static char RcsId[] = "@(#)$Revision: 1.3 $";
+static char RcsId[] = "@(#)$Revision: 1.4 $";
 #endif
 
-/* $Id: mcache.c,v 1.3 1996/10/28 15:21:39 koziol Exp $ */
+/* $Id: mcache.c,v 1.4 2005/01/03 22:18:43 mcgrath Exp $ */
 
 /*
  *  NOTE:
@@ -620,6 +620,7 @@
                 if (((mp->pgin)(mp->pgcookie, pgno-1, bp->page)) == FAIL)
                   {
                       HEreport("mcache_get: error reading chunk=%d\n",(intn)pgno-1);
+                      lp = NULL; /* don't clobber the cache! */
                       ret_value = RET_ERROR;
                       goto done;
                   }
@@ -627,6 +628,7 @@
           else
             {
                 HEreport("mcache_get: reading fcn not set,chunk=%d\n",(intn)pgno-1);
+                lp = NULL;
                 ret_value = RET_ERROR;
                 goto done;
             }

Modified: packages/libhdf4/branches/upstream/current/hdf/src/mfan.c
===================================================================
--- packages/libhdf4/branches/upstream/current/hdf/src/mfan.c	2007-05-15 09:05:29 UTC (rev 830)
+++ packages/libhdf4/branches/upstream/current/hdf/src/mfan.c	2007-05-15 09:53:05 UTC (rev 831)
@@ -11,15 +11,11 @@
  ****************************************************************************/
 
 #ifdef RCSID
-static char RcsId[] = "@(#)$Revision: 1.52 $";
+static char RcsId[] = "@(#)$Revision: 1.53 $";
 #endif
 
-/* $Id: mfan.c,v 1.52 1999/06/16 21:11:08 dwells Exp $ */
+/* $Id: mfan.c,v 1.53 2005/01/09 20:54:07 mcgrath Exp $ */
 
-#ifdef HAVE_PABLO
-#define PABLO_mask ID_mfan_c
-#endif
-
 /*-----------------------------------------------------------------------------
  * File:     mfan.c
  * Author:   GeorgeV
@@ -1356,10 +1352,6 @@
     filerec_t  *file_rec = NULL;		/* file record pointer */
     int32       ret_value = SUCCEED;
 
-#ifdef HAVE_PABLO
-    TRACE_ON(PABLO_mask,ID_ANstart);
-#endif /* HAVE_PABLO */
-
     /* Clear error stack */
     HEclear();
 
@@ -1380,10 +1372,6 @@
       } /* end if */
 
     /* Normal function cleanup */
-#ifdef HAVE_PABLO
-        TRACE_OFF(PABLO_mask, ID_ANstart);
-#endif /* HAVE_PABLO */
-
     return ret_value;
 } /* ANstart() */
 
@@ -1415,10 +1403,6 @@
     filerec_t  *file_rec  = NULL;  /* file record pointer */
     intn        ret_value = SUCCEED;
 
-#ifdef HAVE_PABLO
-    TRACE_ON(PABLO_mask,ID_ANfileinfo);
-#endif /* HAVE_PABLO */
-
     /* Clear error stack */
     HEclear();
 
@@ -1470,10 +1454,6 @@
       } /* end if */
 
     /* Normal function cleanup */
-#ifdef HAVE_PABLO
-        TRACE_OFF(PABLO_mask, ID_ANfileinfo);
-#endif /* HAVE_PABLO */
-
     return ret_value;
 } /* ANfileinfo() */
 
@@ -1497,10 +1477,6 @@
     ANnode    *ann_node  = NULL;
     int32      ret_value = SUCCEED;
 
-#ifdef HAVE_PABLO
-    TRACE_ON(PABLO_mask,ID_ANend);
-#endif /* HAVE_PABLO */
-  
     /* Clear error stack */
     HEclear();
 
@@ -1613,10 +1589,6 @@
       } /* end if */
 
     /* Normal function cleanup */
-#ifdef HAVE_PABLO
-        TRACE_OFF(PABLO_mask, ID_ANend);
-#endif /* HAVE_PABLO */
-
     return ret_value;
 } /* ANend() */
 
@@ -1647,16 +1619,8 @@
 #endif /* LATER */
     int32    ret_value;
 
-#ifdef HAVE_PABLO
-    TRACE_ON(PABLO_mask,ID_ANcreate);
-#endif /* HAVE_PABLO */
-
     ret_value = (ANIcreate(an_id, elem_tag, elem_ref, type));
 
-#ifdef HAVE_PABLO
-        TRACE_OFF(PABLO_mask, ID_ANcreate);
-#endif /* HAVE_PABLO */
-
     return ret_value;
 } /* ANcreate() */
 
@@ -1687,10 +1651,6 @@
     uint16 ann_ref;
     int32  ret_value = SUCCEED;
 
-#ifdef HAVE_PABLO
-    TRACE_ON(PABLO_mask,ID_ANcreatef);
-#endif /* HAVE_PABLO */
-
     /* deal with type */
     switch((ann_type)type)
       {
@@ -1717,10 +1677,6 @@
       } /* end if */
 
     /* Normal function cleanup */
-#ifdef HAVE_PABLO
-        TRACE_OFF(PABLO_mask, ID_ANcreatef);
-#endif /* HAVE_PABLO */
-
     return ret_value;
 } /* ANcreateann() */
 
@@ -1752,10 +1708,6 @@
     ANentry   *ann_entry = NULL;
     int32      ret_value = SUCCEED;
 
-#ifdef HAVE_PABLO
-    TRACE_ON(PABLO_mask,ID_ANselect);
-#endif /* HAVE_PABLO */
-
     /* Clear error stack */
     HEclear();
 
@@ -1793,10 +1745,6 @@
       } /* end if */
 
     /* Normal function cleanup */
-#ifdef HAVE_PABLO
-        TRACE_OFF(PABLO_mask, ID_ANselect);
-#endif /* HAVE_PABLO */
-
     return ret_value;
 } /* ANselect() */
 
@@ -1829,10 +1777,6 @@
     CONSTR(FUNC, "ANnumann");
     intn   ret_value = SUCCEED;
 
-#ifdef HAVE_PABLO
-    TRACE_ON(PABLO_mask,ID_ANnumann);
-#endif /* HAVE_PABLO */
-
     /* deal with invalid types */
     if(type == AN_FILE_LABEL || type == AN_FILE_DESC)
         HGOTO_ERROR(DFE_ARGS, FAIL);
@@ -1847,10 +1791,6 @@
 
     /* Normal function cleanup */
 
-#ifdef HAVE_PABLO
-        TRACE_OFF(PABLO_mask, ID_ANnumann);
-#endif /* HAVE_PABLO */
-
     return ret_value;
 } /* ANnumann() */
 
@@ -1884,10 +1824,6 @@
     CONSTR(FUNC, "ANannlist");
     intn  ret_value = SUCCEED;
 
-#ifdef HAVE_PABLO
-    TRACE_ON(PABLO_mask,ID_ANannlist);
-#endif /* HAVE_PABLO */
-
     /* deal with invalid types */
     if(type == AN_FILE_LABEL || type == AN_FILE_DESC)
         HGOTO_ERROR(DFE_ARGS, FAIL);
@@ -1902,10 +1838,6 @@
 
     /* Normal function cleanup */
 
-#ifdef HAVE_PABLO
-        TRACE_OFF(PABLO_mask, ID_ANannlist);
-#endif /* HAVE_PABLO */
-
     return ret_value;
 } /* ANannlist() */
 
@@ -1931,15 +1863,7 @@
 #endif /* LATER */
     int32  ret_value;
 
-#ifdef HAVE_PABLO
-    TRACE_ON(PABLO_mask,ID_ANannlen);
-#endif /* HAVE_PABLO */
-
     ret_value =  ANIannlen(ann_id);
-#ifdef HAVE_PABLO
-        TRACE_OFF(PABLO_mask, ID_ANannlen);
-#endif /* HAVE_PABLO */
-
     return ret_value;
 } /* ANannlen() */
 
@@ -1968,15 +1892,7 @@
 #endif /* LATER */
     int32  ret_value;
 
-#ifdef HAVE_PABLO
-    TRACE_ON(PABLO_mask,ID_ANwriteann);
-#endif /* HAVE_PABLO */
-
     ret_value = ANIwriteann(ann_id, ann, annlen);
-#ifdef HAVE_PABLO
-        TRACE_OFF(PABLO_mask, ID_ANwriteann);
-#endif /* HAVE_PABLO */
-
     return ret_value;
 } /* ANwriteann() */
 
@@ -2005,15 +1921,7 @@
 #endif /* LATER */
     int32   ret_value;
 
-#ifdef HAVE_PABLO
-    TRACE_ON(PABLO_mask,ID_ANreadann);
-#endif /* HAVE_PABLO */
-
     ret_value = ANIreadann(ann_id, ann, maxlen);
-#ifdef HAVE_PABLO
-        TRACE_OFF(PABLO_mask, ID_ANreadann);
-#endif /* HAVE_PABLO */
-
     return ret_value;
 } /* ANreadann() */
 
@@ -2038,18 +1946,9 @@
     CONSTR(FUNC, "ANendaccess");    /* for HERROR */
 #endif /* LATER */
     intn  ret_value = SUCCEED;
-#ifdef HAVE_PABLO
-    TRACE_ON(PABLO_mask,ID_ANendaccess);
-#endif /* HAVE_PABLO */
-
     /* shut compiler up */
     ann_id=ann_id;
 
-#ifdef HAVE_PABLO
-        TRACE_OFF(PABLO_mask, ID_ANendaccess);
-#endif /* HAVE_PABLO */
-
-
     return ret_value;
 } /* ANendaccess() */
 

Modified: packages/libhdf4/branches/upstream/current/hdf/src/mfgr.c
===================================================================
--- packages/libhdf4/branches/upstream/current/hdf/src/mfgr.c	2007-05-15 09:05:29 UTC (rev 830)
+++ packages/libhdf4/branches/upstream/current/hdf/src/mfgr.c	2007-05-15 09:53:05 UTC (rev 831)
@@ -11,13 +11,10 @@
  ****************************************************************************/
 
 #ifdef RCSID
-static char RcsId[] = "$Revision: 1.77 $";
+static char RcsId[] = "$Revision: 1.91 $";
 #endif
 
-/* $Id: mfgr.c,v 1.77 2000/11/16 15:41:04 koziol Exp $ */
-#ifdef HAVE_PABLO
-#define PABLO_mask ID_mfgr_c
-#endif
+/* $Id: mfgr.c,v 1.91 2005/02/14 00:03:09 bmribler Exp $ */
 
 /*
 FILE
@@ -82,6 +79,8 @@
     - Maps a RI name to an index which is returned.
 intn GRgetiminfo(int32 riid,char *name,int32 *ncomp,int32 *nt,int32 *il,int32 dimsizes[2],int32 *n_attr)
     - Gets information about an RI which has been selected/created.
+intn GRgetnluts(int32 riid)
+    - Get the number of palettes (LUTs) for an image
 intn GRwriteimage(int32 riid,int32 start[2],int32 stride[2],int32 count[2],void * data)
     - Writes image data to an RI.  Partial dataset writing and subsampling is
         allowed, but only with the dimensions of the dataset (ie. no UNLIMITED
@@ -129,8 +128,10 @@
     - Makes the image data of an RI into an external element special element.
 intn GRsetaccesstype(int32 riid,uintn accesstype)
     - Sets the access for an RI to be either serial or parallel I/O.
-intn GRsetcompress(int32 riid,int32 comp_type,comp_info *cinfo)
+intn GRsetcompress(int32 riid,comp_coder_t comp_type,comp_info *cinfo)
     - Makes the image data of an RI into a compressed special element.
+intn GRgetcompress(int32 riid,comp_coder_t* comp_type,comp_info *cinfo)
+    - Retrieves the compression information of a raster image's data.
 
 Attribute Functions:
 intn GRsetattr(int32 dimid|riid|grid,char *name,int32 attr_nt,int32 count,void * data)
@@ -164,7 +165,15 @@
 
 #define MFGR_MASTER
 #include "hdf.h"
+#include "hlimits.h"
 
+#ifdef  H4_GR_SZIP
+/* not supported for GR */
+#ifdef H4_HAVE_LIBSZ          /* we have the library */
+#include "szlib.h"
+#endif
+#endif
+
 /* Local pre-processor macros */
 #define XDIM    0
 #define YDIM    1
@@ -191,6 +200,8 @@
 
 PRIVATE intn GRIgetaid(ri_info_t *img_ptr, intn acc_perm);
 
+PRIVATE intn GRIisspecial_type(int32 file_id, uint16 tag, uint16 ref);
+
 /*--------------------------------------------------------------------------
  NAME
     rigcompare
@@ -323,7 +334,87 @@
     return((gr_info_t *)(t==NULL ? NULL : *t));
 } /* end Get_grfile() */
 
-        
+/*--------------------------------------------------------------------------
+ NAME
+    GRIisspecial_type
+ PURPOSE
+    Returns the special type if the given element is special.
+ USAGE
+    intn GRIisspecial_type(file_id, tag, ref)
+        int32 file_id;		IN: file id
+        uint16 tag;		IN: tag of the element
+        uint16 ref;		IN: ref of the element
+ RETURNS
+    Special type:
+	SPECIAL_LINKED
+	SPECIAL_EXT
+	SPECIAL_COMP
+	SPECIAL_VLINKED
+	SPECIAL_CHUNKED
+	SPECIAL_BUFFERED
+	SPECIAL_COMPRAS
+    or 0 if the element is not special element.
+ DESCRIPTION
+    Called internally by the GRIget_image_list to allow a chunked or 
+    linked-block element to proceed eventhough its offset is 0.
+ GLOBAL VARIABLES
+ COMMENTS, BUGS, ASSUMPTIONS
+
+  *** Only called by library routines, should _not_ be called externally ***
+
+ EXAMPLES
+ REVISION LOG
+--------------------------------------------------------------------------*/
+PRIVATE intn
+GRIisspecial_type(int32 file_id, uint16 tag, uint16 ref)
+{
+    CONSTR(FUNC, "GRIisspecial_type");
+    accrec_t* access_rec=NULL;/* access element record */
+    int32     aid;
+    intn      ret_value=0;
+
+    /* clear error stack */
+    HEclear();
+
+    /* start read access on the access record of the data element, which
+       is being inquired for its special information */
+    aid = Hstartread(file_id, tag, ref);
+
+    /* get the access_rec pointer */
+    access_rec = HAatom_object(aid);
+    if (access_rec == NULL) HGOTO_ERROR(DFE_ARGS, FAIL);
+
+    /* only return the valid special code, anything else return 0 */
+    switch (access_rec->special)
+    {
+	case SPECIAL_LINKED:
+	case SPECIAL_EXT:
+	case SPECIAL_COMP:
+	case SPECIAL_VLINKED:
+	case SPECIAL_CHUNKED:
+	case SPECIAL_BUFFERED:
+	case SPECIAL_COMPRAS:
+	    ret_value = access_rec->special;
+	    break;
+	default:
+	    ret_value = 0;
+    } /* switch */
+
+    if (Hendaccess(aid)== FAIL)
+        HERROR(DFE_CANTENDACCESS);
+done:
+  if(ret_value == FAIL)
+    { /* Error condition cleanup */
+	/* end access to the aid if it's been accessed */
+	if (aid != 0)
+	    if (Hendaccess(aid)== FAIL)
+		HERROR(DFE_CANTENDACCESS);
+    } /* end if */
+
+  /* Normal function cleanup */
+  return ret_value;
+}   /* GRIisspecial_type */
+
 /* -------------------------- New_grfile ------------------------ */
 /*
    Creates gr_info_t structure and adds it to the tree
@@ -662,9 +753,23 @@
           if(img_info[i].img_tag!=DFTAG_NULL)
               for (j = i+1; j < curr_image; j++)
                 {
+		  /* if their refs are different, they're not duplicate, skip */
+		  if(img_info[i].img_ref == img_info[j].img_ref)
                     if(img_info[j].img_tag!=DFTAG_NULL)
-                        if ((img_info[i].offset!= INVALID_OFFSET && img_info[i].offset!=0)
-                            && img_info[i].offset == img_info[j].offset)
+		      {
+                        /* If the element is special, get its type, to allow
+                           linked block or chunked images to go into the if
+                           statement below in order for the duplicate image be
+                           eliminated - bug #814, BMR Feb, 2005 */
+                        intn special_type = GRIisspecial_type(file_id,img_info[i
+].img_tag,img_info[i].img_ref);
+
+                        if (((img_info[i].offset!= INVALID_OFFSET && img_info[i]
+.offset!=0)
+                                && img_info[i].offset == img_info[j].offset) ||
+                             (img_info[i].offset==0
+                                && (special_type == SPECIAL_LINKED ||
+                                    special_type == SPECIAL_CHUNKED)))
                           {
                               /* eliminate the oldest tag from the match */
                               switch(img_info[i].img_tag) {
@@ -701,6 +806,7 @@
                                 } /* end switch */
                               nimages--;  /* if duplicate found, decrement the number of images */
                           } /* end if */
+                     } /* end if */
                 } /* end for */
       } /* end for */
 #ifdef QAK
@@ -1492,9 +1598,6 @@
     gr_info_t *gr_ptr;          /* ptr to the new GR information for a file */
     int32  ret_value = SUCCEED;
 
-#ifdef HAVE_PABLO
-    TRACE_ON(PABLO_mask,ID_GRstart);
-#endif /* HAVE_PABLO */
     /* clear error stack and check validity of file id */
     HEclear();
 
@@ -1567,9 +1670,6 @@
     } /* end if */
 
   /* Normal function cleanup */
-#ifdef HAVE_PABLO
-        TRACE_OFF(PABLO_mask, ID_GRstart);
-#endif /* HAVE_PABLO */
   return ret_value;
 } /* end GRstart() */
 
@@ -1600,9 +1700,6 @@
     gr_info_t *gr_ptr;          /* ptr to the GR information for a file */
     intn  ret_value = SUCCEED;
 
-#ifdef HAVE_PABLO
-    TRACE_ON(PABLO_mask,ID_GRfileinfo);
-#endif /* HAVE_PABLO */
     /* clear error stack and check validity of file id */
     HEclear();
 
@@ -1627,9 +1724,6 @@
     } /* end if */
 
   /* Normal function cleanup */
-#ifdef HAVE_PABLO
-        TRACE_OFF(PABLO_mask, ID_GRfileinfo);
-#endif /* HAVE_PABLO */
   return ret_value;
 } /* end GRfileinfo() */
 
@@ -2074,9 +2168,6 @@
                                 that may return a ref or a FAIL - BMR */
 
 
-#ifdef HAVE_PABLO
-    TRACE_ON(PABLO_mask,ID_GRend);
-#endif /* HAVE_PABLO */
     /* clear error stack and check validity of file id */
     HEclear();
 
@@ -2314,9 +2405,6 @@
     } /* end if */
 
   /* Normal function cleanup */
-#ifdef HAVE_PABLO
-        TRACE_OFF(PABLO_mask, ID_GRend);
-#endif /* HAVE_PABLO */
   return ret_value;
 } /* end GRend() */
 
@@ -2350,9 +2438,6 @@
     void * *t;                   /* temp. ptr to the image found */
     int32  ret_value = SUCCEED;
 
-#ifdef HAVE_PABLO
-    TRACE_ON(PABLO_mask,ID_GRselect);
-#endif /* HAVE_PABLO */
     /* clear error stack and check validity of file id */
     HEclear();
 
@@ -2383,9 +2468,6 @@
     } /* end if */
 
   /* Normal function cleanup */
-#ifdef HAVE_PABLO
-        TRACE_OFF(PABLO_mask, ID_GRselect);
-#endif /* HAVE_PABLO */
   return ret_value;
 } /* end GRselect() */
 
@@ -2428,9 +2510,6 @@
     int32 temp_ref;     /* used to hold the returned value from a function
                                 that may return a ref or a FAIL - BMR */
 
-#ifdef HAVE_PABLO
-    TRACE_ON(PABLO_mask,ID_GRcreate);
-#endif /* HAVE_PABLO */
     /* clear error stack */
     HEclear();
 
@@ -2521,9 +2600,6 @@
     } /* end if */
 
   /* Normal function cleanup */
-#ifdef HAVE_PABLO
-        TRACE_OFF(PABLO_mask, ID_GRcreate);
-#endif /* HAVE_PABLO */
   return ret_value;
 } /* end GRcreate() */
 
@@ -2556,9 +2632,6 @@
     void * *t;                   /* temp. ptr to the image found */
     int32   ret_value = SUCCEED;
 
-#ifdef HAVE_PABLO
-	TRACE_ON(PABLO_mask,ID_GRnametoindex);
-#endif /* HAVE_PABLO */
     /* clear error stack and check validity of file id */
     HEclear();
 
@@ -2587,9 +2660,6 @@
     } /* end if */
 
   /* Normal function cleanup */
-#ifdef HAVE_PABLO
-        TRACE_OFF(PABLO_mask, ID_GRnametoindex);
-#endif /* HAVE_PABLO */
   return ret_value;
 } /* end GRnametoindex() */
 
@@ -2630,9 +2700,6 @@
     ri_info_t *ri_ptr;          /* ptr to the image to work with */
     intn  ret_value = SUCCEED;
 
-#ifdef HAVE_PABLO
-    TRACE_ON(PABLO_mask,ID_GRgetiminfo);
-#endif /* HAVE_PABLO */
     /* clear error stack and check validity of args */
     HEclear();
 
@@ -2678,14 +2745,67 @@
     } /* end if */
 
   /* Normal function cleanup */
-#ifdef HAVE_PABLO
-        TRACE_OFF(PABLO_mask, ID_GRgetiminfo);
-#endif /* HAVE_PABLO */
   return ret_value;
 } /* end GRgetiminfo() */
 
 /*--------------------------------------------------------------------------
  NAME
+    GRgetnluts
+
+ PURPOSE
+    Get the number of palettes (LUTs) for an image
+
+ USAGE
+    intn GRgetnluts(riid)
+        int32 riid;         IN: RI ID from GRselect/GRcreate
+
+ RETURNS
+    The number of palettes on success, FAIL (-1) on failure
+
+ DESCRIPTION
+    Determines the number of palettes for an image (0 or 1 for now).  In the
+    future, if multiple palettes are supported, this function may return
+    values greater than 1.
+
+ GLOBAL VARIABLES
+ COMMENTS, BUGS, ASSUMPTIONS
+ EXAMPLES
+ REVISION LOG
+--------------------------------------------------------------------------*/
+intn GRgetnluts(int32 riid)
+{
+    CONSTR(FUNC, "GRgetnluts");   /* for HERROR */
+    ri_info_t *ri_ptr;          /* ptr to the image to work with */
+    intn  ret_value = FAIL;
+
+    /* clear error stack and check validity of args */
+    HEclear();
+
+    /* check the validity of the RI ID */
+    if (HAatom_group(riid)!=RIIDGROUP)
+        HGOTO_ERROR(DFE_ARGS, FAIL);
+    
+    /* locate LUT's object in hash table */
+    if (NULL == (ri_ptr = (ri_info_t *) HAatom_object(riid)))
+        HGOTO_ERROR(DFE_NOVS, FAIL);
+
+    if(ri_ptr->lut_ref==DFREF_WILDCARD) /* check for no palette defined currently */
+        ret_value=0;
+    else        /* we've got a valid palette currently */
+        ret_value=1;
+
+done:
+  if(ret_value == FAIL)   
+    { /* Error condition cleanup */
+
+    } /* end if */
+
+  /* Normal function cleanup */
+    return ret_value;
+} /* end GRgetnluts() */
+
+/*--------------------------------------------------------------------------
+ NAME
     GRwriteimage
 
  PURPOSE
@@ -2732,15 +2852,17 @@
     void * *img_data;            /* pointer to the converted image data to write */
     uintn pixel_mem_size,       /* size of a pixel in memory */
         pixel_disk_size;        /* size of a pixel on disk */
+    uint16 scheme;	/* compression scheme used for JPEG images */
+    uint32     comp_config;
+    comp_coder_t comp_type; 
+    comp_info cinfo;
+    intn status;
     intn convert=FALSE;         /* true if machine NT != NT to be written */
     uint8 platnumsubclass;      /* class of this NT for this platform */
     intn new_image=FALSE;       /* whether we are writing a new image out */
     intn switch_interlace=FALSE;/* whether the memory interlace needs to be switched around */
     intn ret_value = SUCCEED;
 
-#ifdef HAVE_PABLO
-    TRACE_ON(PABLO_mask,ID_GRwriteimage);
-#endif /* HAVE_PABLO */
     /* clear error stack and check validity of args */
     HEclear();
 
@@ -2783,6 +2905,34 @@
     gr_ptr=ri_ptr->gr_ptr;
     hdf_file_id=gr_ptr->hdf_file_id;
 
+    comp_type = COMP_CODE_NONE;
+    scheme = ri_ptr->img_dim.comp_tag;
+    if (scheme == DFTAG_JPEG5 || scheme == DFTAG_GREYJPEG5
+            || scheme==DFTAG_JPEG || scheme==DFTAG_GREYJPEG)
+    {
+	comp_type = COMP_CODE_JPEG;
+	cinfo.jpeg.quality = 0;
+	cinfo.jpeg.force_baseline = 0;
+    }
+    else
+    {
+	/* use lower-level routine to get the compression information */
+	status = HCPgetcompress(ri_ptr->gr_ptr->hdf_file_id,
+                        ri_ptr->img_tag, ri_ptr->img_ref,
+                        &comp_type, &cinfo);
+    }
+    if (comp_type != COMP_CODE_NONE) {
+	    /* Check that the compression encoder is available */
+	    HCget_config_info(comp_type, &comp_config);
+	    if ((comp_config & COMP_DECODER_ENABLED|COMP_ENCODER_ENABLED) == 0) {
+		/* coder not present?? */
+		     HGOTO_ERROR(DFE_BADCODER,FAIL); 
+	    }
+	    if ((comp_config & COMP_ENCODER_ENABLED) == 0) {
+		/* encoder not present?? */
+		     HGOTO_ERROR(DFE_NOENCODER,FAIL); 
+	    }
+    }
 #ifdef QAK
 printf("%s: stride[XDIM,YDIM]=%ld, %ld\n",FUNC,stride[XDIM],stride[YDIM]);
 printf("%s: start[XDIM,YDIM]=%ld, %ld\n",FUNC,start[XDIM],start[YDIM]);
@@ -3235,9 +3385,6 @@
     } /* end if */
 
   /* Normal function cleanup */
-#ifdef HAVE_PABLO
-        TRACE_OFF(PABLO_mask, ID_GRwriteimage);
-#endif /* HAVE_PABLO */
   return ret_value;
 } /* end GRwriteimage() */
 
@@ -3291,11 +3438,13 @@
     uintn pixel_mem_size;       /* size of a pixel in memory */
     intn convert;               /* true if machine NT != NT to be written */
     uint8 platnumsubclass;      /* class of this NT for this platform */
+    uint16 scheme;	/* compression scheme used for JPEG images */
+    uint32     comp_config;
+    comp_coder_t comp_type; 
+    comp_info cinfo;
+    intn status;
     intn  ret_value = SUCCEED;
 
-#ifdef HAVE_PABLO
-    TRACE_ON(PABLO_mask,ID_GRreadimage);
-#endif /* HAVE_PABLO */
     /* clear error stack and check validity of args */
     HEclear();
 
@@ -3331,6 +3480,34 @@
     gr_ptr=ri_ptr->gr_ptr;
     hdf_file_id=gr_ptr->hdf_file_id;
 
+    comp_type = COMP_CODE_NONE;
+    scheme = ri_ptr->img_dim.comp_tag;
+    if (scheme == DFTAG_JPEG5 || scheme == DFTAG_GREYJPEG5
+            || scheme==DFTAG_JPEG || scheme==DFTAG_GREYJPEG)
+    {
+	comp_type = COMP_CODE_JPEG;
+	cinfo.jpeg.quality = 0;
+	cinfo.jpeg.force_baseline = 0;
+    }
+    else
+    {
+	/* use lower-level routine to get the compression information */
+	status = HCPgetcompress(ri_ptr->gr_ptr->hdf_file_id,
+                        ri_ptr->img_tag, ri_ptr->img_ref,
+                        &comp_type, &cinfo);
+    }
+    if (status != FAIL && comp_type != COMP_CODE_NONE) {
+	    /* Check that the compression encoder is available */
+	    HCget_config_info(comp_type, &comp_config);
+	    if ((comp_config & COMP_DECODER_ENABLED|COMP_ENCODER_ENABLED) == 0) {
+		/* coder not present?? */
+		     HGOTO_ERROR(DFE_BADCODER,FAIL); 
+	    }
+	    if ((comp_config & COMP_DECODER_ENABLED) == 0) {
+		/* decoder not present?? */
+		     HGOTO_ERROR(DFE_NOENCODER,FAIL); 
+	    }
+    }
     if(stride[XDIM]==1 && stride[YDIM]==1)
       { /* solid block of data */
           solid_block=TRUE;
@@ -3550,9 +3727,6 @@
     } /* end if */
 
   /* Normal function cleanup */
-#ifdef HAVE_PABLO
-        TRACE_OFF(PABLO_mask, ID_GRreadimage);
-#endif /* HAVE_PABLO */
   return ret_value;
 } /* end GRreadimage() */
 
@@ -3585,9 +3759,6 @@
     ri_info_t *ri_ptr;          /* ptr to the image to work with */
     intn  ret_value = SUCCEED;
 
-#ifdef HAVE_PABLO
-    TRACE_ON(PABLO_mask,ID_GRendaccess);
-#endif /* HAVE_PABLO */
     /* clear error stack and check validity of args */
     HEclear();
 
@@ -3642,9 +3813,6 @@
     } /* end if */
 
   /* Normal function cleanup */
-#ifdef HAVE_PABLO
-        TRACE_OFF(PABLO_mask, ID_GRendaccess);
-#endif /* HAVE_PABLO */
   return ret_value;
 } /* end GRendaccess() */
 
@@ -3676,9 +3844,6 @@
     ri_info_t *ri_ptr;          /* ptr to the image to work with */
     uint16  ret_value = 0; /* FAIL? */
 
-#ifdef HAVE_PABLO
-    TRACE_ON(PABLO_mask,ID_GRidtoref);
-#endif /* HAVE_PABLO */
     /* clear error stack and check validity of args */
     HEclear();
 
@@ -3715,9 +3880,6 @@
     } /* end if */
 
   /* Normal function cleanup */
-#ifdef HAVE_PABLO
-        TRACE_OFF(PABLO_mask, ID_GRidtoref);
-#endif /* HAVE_PABLO */
   return ret_value;
 } /* end GRidtoref() */
 
@@ -3752,9 +3914,6 @@
     void * *t;                   /* temp. ptr to the image found */
     int32   ret_value = SUCCEED;
 
-#ifdef HAVE_PABLO
-    TRACE_ON(PABLO_mask,ID_GRreftoindex);
-#endif /* HAVE_PABLO */
     /* clear error stack and check validity of args */
     HEclear();
 
@@ -3783,9 +3942,6 @@
     } /* end if */
 
   /* Normal function cleanup */
-#ifdef HAVE_PABLO
-        TRACE_OFF(PABLO_mask, ID_GRreftoindex);
-#endif /* HAVE_PABLO */
   return ret_value;
 } /* end GRreftoindex() */
 
@@ -3822,9 +3978,6 @@
     ri_info_t *ri_ptr;          /* ptr to the image to work with */
     intn  ret_value = SUCCEED;
 
-#ifdef HAVE_PABLO
-    TRACE_ON(PABLO_mask,ID_GRreqlutil);
-#endif /* HAVE_PABLO */
     /* clear error stack and check validity of args */
     HEclear();
 
@@ -3847,9 +4000,6 @@
     } /* end if */
 
   /* Normal function cleanup */
-#ifdef HAVE_PABLO
-    TRACE_ON(PABLO_mask,ID_GRreqlutil);
-#endif /* HAVE_PABLO */
   return ret_value;
 } /* end GRreqlutil() */
 
@@ -3886,9 +4036,6 @@
     ri_info_t *ri_ptr;          /* ptr to the image to work with */
     intn  ret_value = SUCCEED;
 
-#ifdef HAVE_PABLO
-     TRACE_ON(PABLO_mask,ID_GRreqimageil);
-#endif /* HAVE_PABLO */
     /* clear error stack and check validity of args */
     HEclear();
 
@@ -3911,9 +4058,6 @@
     } /* end if */
 
   /* Normal function cleanup */
-#ifdef HAVE_PABLO
-        TRACE_OFF(PABLO_mask, ID_GRreqimageil);
-#endif /* HAVE_PABLO */
   return ret_value;
 } /* end GRreqimageil() */
 
@@ -3947,9 +4091,6 @@
     CONSTR(FUNC, "GRgetlutid");   /* for HERROR */
     int32  ret_value = SUCCEED;
 
-#ifdef HAVE_PABLO
-    TRACE_ON(PABLO_mask,ID_GRgetlutid);
-#endif /* HAVE_PABLO */
     /* clear error stack and check validity of args */
     HEclear();
 
@@ -3966,9 +4107,6 @@
     } /* end if */
 
   /* Normal function cleanup */
-#ifdef HAVE_PABLO
-        TRACE_OFF(PABLO_mask, ID_GRgetlutid);
-#endif /* HAVE_PABLO */
   return ret_value;
 } /* end GRgetlutid() */
 
@@ -4002,9 +4140,6 @@
     ri_info_t *ri_ptr;          /* ptr to the image to work with */
     uint16 ret_value = 0;
 
-#ifdef HAVE_PABLO
-    TRACE_ON(PABLO_mask,ID_GRluttoref);
-#endif /* HAVE_PABLO */
     /* clear error stack and check validity of args */
     HEclear();
 
@@ -4025,9 +4160,6 @@
     } /* end if */
 
   /* Normal function cleanup */
-#ifdef HAVE_PABLO
-       TRACE_OFF(PABLO_mask, ID_GRluttoref);
-#endif /* HAVE_PABLO */
   return ret_value;
 } /* end GRluttoref() */
 
@@ -4063,9 +4195,6 @@
     ri_info_t *ri_ptr;          /* ptr to the image to work with */
     intn  ret_value = SUCCEED;
 
-#ifdef HAVE_PABLO
-    TRACE_ON(PABLO_mask,ID_GRgetlutinfo);
-#endif /* HAVE_PABLO */
     /* clear error stack and check validity of args */
     HEclear();
 
@@ -4077,17 +4206,16 @@
     if (NULL == (ri_ptr = (ri_info_t *) HAatom_object(lutid)))
         HGOTO_ERROR(DFE_NOVS, FAIL);
 
-    if(ri_ptr->lut_ref==DFREF_WILDCARD) /* check for no palette defined currently */
-      {
-          if(ncomp!=NULL)
-              *ncomp=0;
-          if(nt!=NULL)
-              *nt=DFNT_NONE;
-          if(il!=NULL)
-              *il=-1;
-          if(nentries!=NULL)
-              *nentries=0;
-      } /* end if */
+    if(ri_ptr->lut_ref==DFREF_WILDCARD) { /* check for no palette defined currently */
+        if(ncomp!=NULL)
+            *ncomp=0;
+        if(nt!=NULL)
+            *nt=DFNT_NONE;
+        if(il!=NULL)
+            *il=-1;
+        if(nentries!=NULL)
+            *nentries=0;
+    } /* end if */
     else        /* we've got a valid palette currently */
       {
           if(ncomp!=NULL)
@@ -4107,10 +4235,7 @@
     } /* end if */
 
   /* Normal function cleanup */
-#ifdef HAVE_PABLO
-        TRACE_OFF(PABLO_mask, ID_GRgetlutinfo);
-#endif /* HAVE_PABLO */
-  return ret_value;
+    return ret_value;
 } /* end GRgetlutinfo() */
 
 /*--------------------------------------------------------------------------
@@ -4147,9 +4272,6 @@
     ri_info_t *ri_ptr;          /* ptr to the image to work with */
     intn  ret_value = SUCCEED;
 
-#ifdef HAVE_PABLO
-    TRACE_ON(PABLO_mask,ID_GRwritelut);
-#endif /* HAVE_PABLO */
     /* clear error stack and check validity of args */
     HEclear();
 
@@ -4164,7 +4286,8 @@
     hdf_file_id=ri_ptr->gr_ptr->hdf_file_id;
 
     /* Check if this is compatible with older-style palettes */
-    if(ncomps==3 && nt==DFNT_UINT8 && il==MFGR_INTERLACE_PIXEL && nentries==256)
+    if(ncomps==3 && (nt==DFNT_UINT8 ||nt==DFNT_UCHAR8) && 
+		    il==MFGR_INTERLACE_PIXEL && nentries==256)
       {
           /* Check if LUT exists already */
           if(ri_ptr->lut_tag!=DFTAG_NULL && ri_ptr->lut_ref!=DFREF_WILDCARD)
@@ -4208,9 +4331,6 @@
     } /* end if */
 
   /* Normal function cleanup */
-#ifdef HAVE_PABLO
-        TRACE_OFF(PABLO_mask, ID_GRwritelut);
-#endif /* HAVE_PABLO */
   return ret_value;
 } /* end GRwritelut() */
 
@@ -4244,9 +4364,6 @@
     ri_info_t *ri_ptr;          /* ptr to the image to work with */
     intn  ret_value = SUCCEED;
 
-#ifdef HAVE_PABLO
-    TRACE_ON(PABLO_mask,ID_GRreadlut);
-#endif /* HAVE_PABLO */
     /* clear error stack and check validity of args */
     HEclear();
 
@@ -4295,9 +4412,6 @@
     } /* end if */
 
   /* Normal function cleanup */
-#ifdef HAVE_PABLO
-        TRACE_OFF(PABLO_mask, ID_GRreadlut);
-#endif /* HAVE_PABLO */
   return ret_value;
 } /* end GRreadlut() */
 
@@ -4332,9 +4446,6 @@
     int32 tmp_aid;  /* AID returned from HXcreate() */
     intn  ret_value = SUCCEED;
 
-#ifdef HAVE_PABLO
-    TRACE_ON(PABLO_mask,ID_GRsetexternalfile);
-#endif /* HAVE_PABLO */
     /* clear error stack and check validity of args */
     HEclear();
 
@@ -4383,9 +4494,6 @@
     } /* end if */
 
   /* Normal function cleanup */
-#ifdef HAVE_PABLO
-   TRACE_OFF(PABLO_mask, ID_GRsetexternalfile);
-#endif /* HAVE_PABLO */
   return ret_value;
 } /* end GRsetexternalfile() */
 
@@ -4421,9 +4529,6 @@
     ri_info_t *ri_ptr;          /* ptr to the image to work with */
     intn  ret_value = SUCCEED;
 
-#ifdef HAVE_PABLO
-    TRACE_ON(PABLO_mask,ID_GRsetaccesstype);
-#endif /* HAVE_PABLO */
     /* clear error stack and check validity of args */
     HEclear();
 
@@ -4447,14 +4552,64 @@
     } /* end if */
 
   /* Normal function cleanup */
-#ifdef HAVE_PABLO
-        TRACE_OFF(PABLO_mask, ID_GRsetaccesstype);
-#endif /* HAVE_PABLO */
   return ret_value;
 } /* end GRsetaccesstype() */
 
+
+#ifdef H4_GR_SZIP
+/* not supported */
+#ifdef H4_HAVE_LIBSZ          /* we have the library */
 /*--------------------------------------------------------------------------
  NAME
+    GRsetup_szip_parms( ri_info_t *ri_ptr, comp_info *c_info, int32 *cdims)
+
+ PURPOSE
+    Set up the szip parameters
+
+ USAGE
+    intn GRsetaccesstype( ri_info_t *ri_ptr, comp_info *c_info, int32 *cdims)
+       ri_info_t *ri_ptr;  IN: the RI object 
+       comp_info *c_info;  IN/OUT: the compression info (szip) 
+       int32 *cdims;       IN: chunk dims if chunked, else NULL
+
+ RETURNS
+    SUCCEED/FAIL
+
+ DESCRIPTION
+    Sets the computed szip parameters before calling HCcreate.
+
+ GLOBAL VARIABLES
+ COMMENTS, BUGS, ASSUMPTIONS
+ EXAMPLES
+ REVISION LOG
+--------------------------------------------------------------------------*/
+intn 
+GRsetup_szip_parms( ri_info_t *ri_ptr, comp_info *c_info, int32 *cdims)
+{
+int32 nt;
+int32 ndims;
+int32 ncomp;
+int32 xdims[MAX_VAR_DIMS];
+    intn       ret_value = SUCCEED;
+
+
+	ndims = 2;
+	xdims[0] = ri_ptr->img_dim.xdim;
+	xdims[1] = ri_ptr->img_dim.ydim;
+
+	nt = ri_ptr->img_dim.nt;
+	ncomp = ri_ptr->img_dim.ncomps;
+
+        ret_value = HCPsetup_szip_parms( c_info, nt, ncomp, ndims, xdims, cdims);
+
+done:
+	return(ret_value);
+}
+#endif
+#endif
+
+/*--------------------------------------------------------------------------
+ NAME
     GRsetcompress
 
  PURPOSE
@@ -4462,9 +4617,9 @@
 
  USAGE
     intn GRsetcompress(riid,comp_type,cinfo)
-        int32 riid;         IN: RI ID from GRselect/GRcreate
-        int32 comp_type;    IN: type of compression, from list in hcomp.h
-        comp_info *cinfo;   IN: compression specific information
+        int32 riid;         	IN: RI ID from GRselect/GRcreate
+        comp_coder_t comp_type;	IN: type of compression
+        comp_info *cinfo;   	IN: compression specific information
 
  RETURNS
     SUCCEED/FAIL
@@ -4478,24 +4633,25 @@
  EXAMPLES
  REVISION LOG
 --------------------------------------------------------------------------*/
-intn GRsetcompress(int32 riid,int32 comp_type,comp_info *cinfo)
+intn GRsetcompress(int32 riid,comp_coder_t comp_type,comp_info *cinfo)
 {
     CONSTR(FUNC, "GRsetcompress");   /* for HERROR */
     ri_info_t *ri_ptr;          /* ptr to the image to work with */
+    comp_info cinfo_x;
+    uint32 comp_config;
     intn  ret_value = SUCCEED;
 
-#ifdef HAVE_PABLO
-    TRACE_ON(PABLO_mask,ID_GRsetcompress);
-#endif /* HAVE_PABLO */
     /* clear error stack and check validity of args */
     HEclear();
 
+    HDmemcpy(&cinfo_x,cinfo,sizeof(comp_info));
     /* check the validity of the RI ID */
     if (HAatom_group(riid)!=RIIDGROUP)
         HGOTO_ERROR(DFE_ARGS, FAIL);
     
     /* Check the validity of the compression type */
-    if ((comp_type < 0 || comp_type >= COMP_CODE_INVALID) && comp_type!=COMP_CODE_JPEG)
+    if ((comp_type < COMP_CODE_NONE || comp_type >= COMP_CODE_INVALID) 
+	&& comp_type!=COMP_CODE_JPEG)
         HGOTO_ERROR(DFE_ARGS, FAIL);
 
     /* locate RI's object in hash table */
@@ -4506,6 +4662,37 @@
     if (ri_ptr->use_buf_drvr)
         HGOTO_ERROR(DFE_CANTMOD, FAIL);
 
+    /* Check that the compression method is enabled */
+    HCget_config_info(comp_type, &comp_config);
+    if ((comp_config & COMP_DECODER_ENABLED|COMP_ENCODER_ENABLED) == 0) {
+	/* coder not present?? */
+	    HGOTO_ERROR(DFE_BADCODER, FAIL);
+    }
+    if ((comp_config & COMP_ENCODER_ENABLED) == 0) {
+	/* encoder not present?? */
+	    HGOTO_ERROR(DFE_NOENCODER, FAIL);
+    }
+
+    /* SZIP is not supported for GR */
+    if (comp_type==COMP_CODE_SZIP) 
+        HGOTO_ERROR(DFE_CANTMOD, FAIL);
+
+#ifdef  H4_GR_SZIP
+/* not supported */
+#ifndef H4_HAVE_LIBSZ
+    /* probably covered by above */
+    if (comp_type==COMP_CODE_SZIP) 
+        HGOTO_ERROR(DFE_CANTMOD, FAIL);
+#else
+    if (comp_type==COMP_CODE_SZIP)  {
+    /* szip is enabled, check and set up szip parms */
+	if (GRsetup_szip_parms( ri_ptr, &cinfo_x, NULL) == FAIL) {
+	    HGOTO_ERROR(DFE_INTERNAL, FAIL);
+	}
+    }
+#endif
+#endif
+
     /* Mark the image as being compressed and cache args */
     if(comp_type==COMP_CODE_JPEG)
       {
@@ -4524,7 +4711,7 @@
       } /* end else */
 
     /* Store compression parameters */
-    HDmemcpy(&(ri_ptr->cinfo),cinfo,sizeof(comp_info));
+    HDmemcpy(&(ri_ptr->cinfo),&cinfo_x,sizeof(comp_info));
 
     /* Mark the image as needing to be a buffered special element */
     ri_ptr->use_buf_drvr=1;
@@ -4543,14 +4730,98 @@
     } /* end if */
 
   /* Normal function cleanup */
-#ifdef HAVE_PABLO
-        TRACE_OFF(PABLO_mask, ID_GRsetcompress);
-#endif /* HAVE_PABLO */
   return ret_value;
 } /* end GRsetcompress() */
 
 /*--------------------------------------------------------------------------
  NAME
+    GRgetcompress
+
+ PURPOSE
+    Get the compression information of a raster image's data.
+
+ USAGE
+    intn GRgetcompress(riid,comp_type,cinfo)
+        int32 riid;		   IN: RI ID from GRselect/GRcreate
+        comp_coder_t* comp_type;   OUT: type of compression
+        comp_info* cinfo;	   OUT: retrieved compression information
+
+ RETURNS
+    SUCCEED/FAIL
+
+ DESCRIPTION
+    This routine gets the compression type of the given RI's data, then
+    retrieves the appropriate information into the provided compression
+    info structure.
+
+ GLOBAL VARIABLES
+ COMMENTS, BUGS, ASSUMPTIONS
+    JPEG information is currently not retrievable because the JPEG 
+    parameters, 'quality' and 'force_baseline', are irreversibly 
+    mapped to a quantization table.  Thus, only the correct compression 
+    type will be returned; cinfo will only contain 0s.
+
+ EXAMPLES
+ REVISION LOG
+    July 2001: Added to fix bug #307 - BMR
+--------------------------------------------------------------------------*/
+intn GRgetcompress(int32 riid, comp_coder_t* comp_type, comp_info* cinfo)
+{
+    CONSTR(FUNC, "GRgetcompress");   /* for HGOTO_ERROR */
+    ri_info_t *ri_ptr;          /* ptr to the image to work with */
+    int32 file_id;
+    uint16 scheme;	/* compression scheme used for JPEG images */
+    intn  ret_value = SUCCEED;
+
+    /* clear error stack and check validity of args */
+    HEclear();
+
+    /* check the validity of the RI ID */
+    if (HAatom_group(riid) != RIIDGROUP)
+        HGOTO_ERROR(DFE_ARGS, FAIL);
+
+    /* and check the output arguments */
+    if (comp_type == NULL || cinfo == NULL)
+        HGOTO_ERROR(DFE_ARGS, FAIL);
+
+    /* locate RI's object in hash table */
+    if (NULL == (ri_ptr = (ri_info_t *) HAatom_object(riid)))
+        HGOTO_ERROR(DFE_BADPTR, FAIL);
+
+    file_id = ri_ptr->gr_ptr->hdf_file_id;	/* temporary use */
+
+    /* If the compression scheme used was JPEG, return the compression type
+       and 0 for the 'quality' and 'force_baseline' parameters, because 
+       these parameters are currently not possible to be retrieved. */
+    scheme = ri_ptr->img_dim.comp_tag;
+    if (scheme == DFTAG_JPEG5 || scheme == DFTAG_GREYJPEG5
+            || scheme==DFTAG_JPEG || scheme==DFTAG_GREYJPEG)
+    {
+	*comp_type = COMP_CODE_JPEG;
+	cinfo->jpeg.quality = 0;
+	cinfo->jpeg.force_baseline = 0;
+    }
+    else
+    {
+	/* use lower-level routine to get the compression information */
+	ret_value = HCPgetcompress(file_id, ri_ptr->img_tag, ri_ptr->img_ref,
+                                comp_type, cinfo);
+	if (ret_value == FAIL)
+	    HGOTO_ERROR(DFE_INTERNAL, FAIL);
+    }
+
+done:
+  if(ret_value == 0)
+    { /* Error condition cleanup */
+
+    } /* end if */
+
+  /* Normal function cleanup */
+  return ret_value;
+} /* end GRgetcompress() */
+
+/*--------------------------------------------------------------------------
+ NAME
     GRsetattr
 
  PURPOSE
@@ -4593,9 +4864,6 @@
     intn is_riid=FALSE;         /* whether we had a RIID */
     intn ret_value = SUCCEED;
 
-#ifdef HAVE_PABLO
-    TRACE_ON(PABLO_mask,ID_GRsetattr);
-#endif /* HAVE_PABLO */
     /* clear error stack and check validity of args */
     HEclear();
 
@@ -4829,9 +5097,6 @@
     } /* end if */
 
   /* Normal function cleanup */
-#ifdef HAVE_PABLO
-        TRACE_OFF(PABLO_mask, ID_GRsetattr);
-#endif /* HAVE_PABLO */
   return ret_value;
 } /* end GRsetattr() */
 
@@ -4871,9 +5136,6 @@
     at_info_t *at_ptr;          /* ptr to the attribute to work with */
     intn   ret_value = SUCCEED;
 
-#ifdef HAVE_PABLO
-    TRACE_ON(PABLO_mask,ID_GRattrinfo);
-#endif /* HAVE_PABLO */
     /* clear error stack and check validity of args */
     HEclear();
 
@@ -4929,9 +5191,6 @@
     } /* end if */
 
   /* Normal function cleanup */
-#ifdef HAVE_PABLO
-        TRACE_OFF(PABLO_mask, ID_GRattrinfo);
-#endif /* HAVE_PABLO */
   return ret_value;
 } /* end GRattrinfo() */
 
@@ -4971,9 +5230,6 @@
     int32 at_size;              /* size in bytes of the attribute data */
     intn  ret_value = SUCCEED;
 
-#ifdef HAVE_PABLO
-    TRACE_ON(PABLO_mask,ID_GRgetattr);
-#endif /* HAVE_PABLO */
     /* clear error stack and check validity of args */
     HEclear();
 
@@ -5054,9 +5310,6 @@
     } /* end if */
 
   /* Normal function cleanup */
-#ifdef HAVE_PABLO
-        TRACE_OFF(PABLO_mask, ID_GRgetattr);
-#endif /* HAVE_PABLO */
   return ret_value;
 } /* end GRgetattr() */
 
@@ -5093,9 +5346,6 @@
     at_info_t *at_ptr;          /* ptr to the attribute to work with */
     int32 ret_value = SUCCEED;
 
-#ifdef HAVE_PABLO
-    TRACE_ON(PABLO_mask,ID_GRfindattr);
-#endif /* HAVE_PABLO */
     /* clear error stack and check validity of args */
     HEclear();
 
@@ -5139,9 +5389,6 @@
     } /* end if */
 
   /* Normal function cleanup */
-#ifdef HAVE_PABLO
-        TRACE_OFF(PABLO_mask, ID_GRfindattr);
-#endif /* HAVE_PABLO */
   return ret_value;
 } /* end GRfindattr() */
 
@@ -5496,6 +5743,7 @@
     uintn      pixel_disk_size;      /* size of a pixel on disk */
     void *      fill_pixel = NULL;    /* converted value for the filled pixel */
     int32      at_index;             /* attribute index for the fill value */
+    uint32     comp_config;
     int32      ndims    = 0;         /* # dimensions i.e. rank */
     uint8      nlevels  = 1;         /* default # levels is 1 */
     intn       i;                    /* loop variable */
@@ -5503,9 +5751,6 @@
     gr_info_t *gr_ptr;               /* ptr to the file GR information for this image */
     intn       ret_value = SUCCEED;  /* return value */
 
-#ifdef HAVE_PABLO
-	TRACE_ON(PABLO_mask,ID_GRsetchunk);
-#endif /* HAVE_PABLO */
 
 #ifdef CHK_DEBUG
     fprintf(stderr,"GRsetchunk: called  \n");
@@ -5513,6 +5758,7 @@
     /* clear error stack and check validity of args */
     HEclear();
 
+    memset(chunk,0,sizeof(chunk[0]));
     /* Check some args */
 
     /* check the validity of the RI ID */
@@ -5555,13 +5801,54 @@
           chunk[0].minfo = &minfo; /* dummy */
           break;
       case (HDF_CHUNK | HDF_COMP):
+      /*  EIP 9/12/03 
+       *  We have to take special care if SZIP library is not available;
+       *  Fow all other compression types do
+       */
           cdef  = (HDF_CHUNK_DEF *)&chunk_def;
+
+    /* Check that the compression encoder is available */
+    HCget_config_info((comp_coder_t )(cdef->comp.comp_type), &comp_config);
+    if ((comp_config & COMP_DECODER_ENABLED|COMP_ENCODER_ENABLED) == 0) {
+	/* coder not present?? */
+                 HGOTO_ERROR(DFE_BADCODER,FAIL); 
+    }
+    if ((comp_config & COMP_ENCODER_ENABLED) == 0) {
+	/* encoder not present?? */
+                 HGOTO_ERROR(DFE_NOENCODER,FAIL); 
+    }
+      if ((comp_coder_t)cdef->comp.comp_type != COMP_CODE_SZIP) {
           cdims = cdef->comp.chunk_lengths;
           chunk[0].chunk_flag = SPECIAL_COMP;  /* Compression */
           chunk[0].comp_type  = (comp_coder_t)cdef->comp.comp_type; 
           chunk[0].model_type = COMP_MODEL_STDIO; /* Default */
           chunk[0].cinfo = &cdef->comp.cinfo; 
           chunk[0].minfo = &minfo; /* dummy */
+       }
+       else /* requested compression is SZIP */
+	 /* SZIP not supported for GR */
+		HGOTO_ERROR(DFE_CANTMOD, FAIL);
+#ifdef H4_GR_SZIP
+#ifdef H4_HAVE_LIBSZ          /* we have the library */
+          {
+            cdims = cdef->comp.chunk_lengths;
+            chunk[0].chunk_flag = SPECIAL_COMP;  /* Compression */
+            chunk[0].comp_type  = (comp_coder_t)cdef->comp.comp_type; 
+            chunk[0].model_type = COMP_MODEL_STDIO; /* Default */
+    	    HDmemcpy(&cinfo,&(cdef->comp.cinfo),sizeof(comp_info));
+            chunk[0].minfo = &minfo; /* dummy */
+	    if (GRsetup_szip_parms( ri_ptr, &cinfo, cdims) == FAIL) 
+                HGOTO_ERROR(DFE_INTERNAL,FAIL); 
+            chunk[0].cinfo = &cinfo; 
+	}
+#else                         /* we do not have the SZIP library */
+          {
+/* covered by new test above ??*/
+		HGOTO_ERROR(DFE_CANTMOD, FAIL);
+          }
+#endif /* H4_HAVE_LIBSZ */
+#endif
+
           break;
       case (HDF_CHUNK | HDF_NBIT): /* don't support NBIT for GRs */
           ret_value = FAIL;
@@ -5736,9 +6023,6 @@
     if (chunk[0].pdims != NULL)
         HDfree(chunk[0].pdims);
 
-#ifdef HAVE_PABLO
-    TRACE_OFF(PABLO_mask,ID_GRsetchunk);
-#endif /* HAVE_PABLO */
     return ret_value;
 } /* GRsetchunk */
 
@@ -5783,9 +6067,6 @@
     intn            i;                    /* loop variable */
     intn            ret_value = SUCCEED;  /* return value */
 
-#ifdef HAVE_PABLO
-    TRACE_ON(PABLO_mask,ID_GRgetchunkinfo);
-#endif /* HAVE_PABLO */
 
     /* clear error stack and check validity of args */
     HEclear();
@@ -5864,9 +6145,6 @@
 
       }
     /* Normal cleanup */
-#ifdef HAVE_PABLO
-    TRACE_OFF(PABLO_mask,ID_GRgetchunkinfo);
-#endif /* HAVE_PABLO */
     return ret_value;
 } /* GRgetchunkinfo() */
 
@@ -5878,8 +6156,8 @@
  DESCRIPTION
      This routine writes a whole chunk of data to the chunked GR 
      specified by chunk 'origin' for the given GR and can be used
-     instead of GRwritedata() when this information is known. This
-     routine has less overhead and is much faster than using GRwritedata().
+     instead of GRwriteimage() when this information is known. This
+     routine has less overhead and is much faster than using GRwriteimage().
 
      Origin specifies the co-ordinates of the chunk according to the chunk
      position in the overall chunk array.
@@ -5914,12 +6192,14 @@
     int8       platnumsubclass; /* the machine type of the current platform */
     uintn      convert;         /* whether to convert or not */
     intn       i;
+    uint16 scheme;	/* compression scheme used for JPEG images */
+    uint32     comp_config;
+    comp_coder_t comp_type; 
+    comp_info cinfo;
+    intn       status;
     intn       switch_interlace = FALSE;/* whether the memory interlace needs to be switched around */
     intn       ret_value = SUCCEED;
 
-#ifdef HAVE_PABLO
-    TRACE_ON(PABLO_mask,ID_GRwritechunk);
-#endif /* HAVE_PABLO */
 
     /* clear error stack and check validity of args */
     HEclear();
@@ -5954,8 +6234,36 @@
 #ifdef CHK_DEBUG
     fprintf(stderr,"%s: ri_ptr->img_aid =%d \n", FUNC, ri_ptr->img_aid);
 #endif
+    comp_type = COMP_CODE_NONE;
+    scheme = ri_ptr->img_dim.comp_tag;
+    if (scheme == DFTAG_JPEG5 || scheme == DFTAG_GREYJPEG5
+            || scheme==DFTAG_JPEG || scheme==DFTAG_GREYJPEG)
+    {
+	comp_type = COMP_CODE_JPEG;
+	cinfo.jpeg.quality = 0;
+	cinfo.jpeg.force_baseline = 0;
+    }
+    else
+    {
+	/* use lower-level routine to get the compression information */
+	status = HCPgetcompress(ri_ptr->gr_ptr->hdf_file_id,
+                        ri_ptr->img_tag, ri_ptr->img_ref,
+                        &comp_type, &cinfo);
+    }
+    if (status != FAIL && comp_type != COMP_CODE_NONE) {
+	    /* Check that the compression encoder is available */
+	    HCget_config_info(comp_type, &comp_config);
+	    if ((comp_config & COMP_DECODER_ENABLED|COMP_ENCODER_ENABLED) == 0) {
+		/* coder not present?? */
+		     HGOTO_ERROR(DFE_BADCODER,FAIL); 
+	    }
+	    if ((comp_config & COMP_ENCODER_ENABLED) == 0) {
+		/* encoder not present?? */
+		     HGOTO_ERROR(DFE_NOENCODER,FAIL); 
+	    } 
+   }
 
-    /* inquire about element */
+   /* inquire about element */
     ret_value = Hinquire(ri_ptr->img_aid, NULL, NULL, NULL, NULL, NULL, NULL, NULL, &special);
     if (ret_value != FAIL)
       {
@@ -6055,9 +6363,6 @@
     if (img_data != NULL)
         HDfree(img_data);
 
-#ifdef HAVE_PABLO
-    TRACE_OFF(PABLO_mask,ID_GRwritechunk);
-#endif /* HAVE_PABLO */
     return ret_value;
 } /* GRwritechunk() */
 
@@ -6104,12 +6409,14 @@
     int8       platnumsubclass; /* the machine type of the current platform */
     uintn      convert;         /* whether to convert or not */
     intn       i;
+    uint16 scheme;	/* compression scheme used for JPEG images */
+    uint32     comp_config;
+    comp_coder_t comp_type; 
+    comp_info cinfo;
+    intn       status;
     intn       switch_interlace = FALSE;/* whether the memory interlace needs to be switched around */
     intn       ret_value = SUCCEED;
 
-#ifdef HAVE_PABLO
-    TRACE_ON(PABLO_mask,ID_GRreadchunk);
-#endif /* HAVE_PABLO */
 
     /* clear error stack and check validity of args */
     HEclear();
@@ -6145,6 +6452,34 @@
     fprintf(stderr,"%s: ri_ptr->img_aid =%d \n", FUNC, ri_ptr->img_aid);
 #endif
 
+    comp_type = COMP_CODE_NONE;
+    scheme = ri_ptr->img_dim.comp_tag;
+    if (scheme == DFTAG_JPEG5 || scheme == DFTAG_GREYJPEG5
+            || scheme==DFTAG_JPEG || scheme==DFTAG_GREYJPEG)
+    {
+	comp_type = COMP_CODE_JPEG;
+	cinfo.jpeg.quality = 0;
+	cinfo.jpeg.force_baseline = 0;
+    }
+    else
+    {
+	/* use lower-level routine to get the compression information */
+	status = HCPgetcompress(ri_ptr->gr_ptr->hdf_file_id,
+                        ri_ptr->img_tag, ri_ptr->img_ref,
+                        &comp_type, &cinfo);
+    }
+    if (status != FAIL && comp_type != COMP_CODE_NONE) {
+	    /* Check that the compression encoder is available */
+	    HCget_config_info(comp_type, &comp_config);
+	    if ((comp_config & COMP_DECODER_ENABLED|COMP_ENCODER_ENABLED) == 0) {
+		/* coder not present?? */
+		     HGOTO_ERROR(DFE_BADCODER,FAIL); 
+	    }
+	    if ((comp_config & COMP_DECODER_ENABLED) == 0) {
+		/* decoder not present?? */
+		     HGOTO_ERROR(DFE_NOENCODER,FAIL); 
+	    } 
+   }
     /* inquire about element */
     ret_value = Hinquire(ri_ptr->img_aid, NULL, NULL, NULL, NULL, NULL, NULL, NULL, &special);
     if (ret_value != FAIL)
@@ -6251,9 +6586,6 @@
     if (img_data != NULL)
         HDfree(img_data);
 
-#ifdef HAVE_PABLO
-	TRACE_OFF(PABLO_mask,ID_GRreadchunk);
-#endif /* HAVE_PABLO */
     return ret_value;
 } /* GRreadchunk() */
 
@@ -6318,9 +6650,6 @@
     int16      special;              /* Special code */
     intn       ret_value = SUCCEED;
 
-#ifdef HAVE_PABLO
-    TRACE_ON(PABLO_mask,ID_GRsetchunkcache);
-#endif /* HAVE_PABLO */
 
     /* clear error stack and check validity of args */
     HEclear();
@@ -6376,9 +6705,6 @@
 
       }
     /* Normal cleanup */
-#ifdef HAVE_PABLO
-    TRACE_OFF(PABLO_mask,ID_GRsetchunkcache);
-#endif /* HAVE_PABLO */
     return ret_value;
 } /* GRsetchunkcache() */
 

Modified: packages/libhdf4/branches/upstream/current/hdf/src/mfgr.h
===================================================================
--- packages/libhdf4/branches/upstream/current/hdf/src/mfgr.h	2007-05-15 09:05:29 UTC (rev 830)
+++ packages/libhdf4/branches/upstream/current/hdf/src/mfgr.h	2007-05-15 09:53:05 UTC (rev 831)
@@ -10,7 +10,7 @@
  *                                                                          *
  ****************************************************************************/
 
-/* $Id: mfgr.h,v 1.21 1999/02/06 03:21:48 koziol Exp $ */
+/* $Id: mfgr.h,v 1.22 2001/09/26 20:47:34 bmribler Exp $ */
 
 /*-----------------------------------------------------------------------------
  * File:    mfgr.h
@@ -115,7 +115,7 @@
     uintn use_buf_drvr;         /* access to image needs to be through the buffered special element driver */
     uintn use_cr_drvr;          /* access to image needs to be through the compressed raster special element driver */
     uintn comp_img;             /* whether to compress image data */
-    int32 comp_type;            /* compression type */
+    comp_coder_t comp_type;     /* compression type */
     comp_info cinfo;            /* compression information */
     uintn ext_img;              /* whether to make image data external */
     char *ext_name;             /* name of the external file */

Modified: packages/libhdf4/branches/upstream/current/hdf/src/mfgrf.c
===================================================================
--- packages/libhdf4/branches/upstream/current/hdf/src/mfgrf.c	2007-05-15 09:05:29 UTC (rev 830)
+++ packages/libhdf4/branches/upstream/current/hdf/src/mfgrf.c	2007-05-15 09:53:05 UTC (rev 831)
@@ -1,3 +1,4 @@
+
 /****************************************************************************
  * NCSA HDF                                                                 *
  * Software Development Group                                               *
@@ -11,10 +12,10 @@
  ****************************************************************************/
 
 #ifdef RCSID
-static char RcsId[] = "@(#)$Revision: 1.15 $";
+static char RcsId[] = "@(#)$Revision: 1.21 $";
 #endif
 
-/* $Id: mfgrf.c,v 1.15 2000/08/29 13:55:36 koziol Exp $ */
+/* $Id: mfgrf.c,v 1.21 2003/12/10 21:13:24 epourmal Exp $ */
 
 /*-----------------------------------------------------------------------------
  * File:    mfsdf.c
@@ -46,7 +47,8 @@
  *  mgrclut:    Call GRreadlut to read a character palette from the file
  *  mgsxfil:    Call GRsetexternalfile to move an image into an external file
  *  mgsactp:    Call GRsetaccesstype to set the access type for an image
- *  mgscomp:    Call GRsetcompress to compress an image in the file [Later]
+ *  mgscomp:    Call GRsetcompress to compress an image in the file 
+ *  mggcomp:    Call GRgetcompress to get image compression information 
  *  mgisattr:    Call GRsetattr to write an attribute for an object
  *  mgiscatt:   Call GRsetattr to write a char attribute for an obj.
  *  mgatinf:    Call GRattrinfo get information about an attribute
@@ -1122,7 +1124,7 @@
  *                      COMP_CODE_RLE  = 1
  *                      COMP_CODE_SKPHUFF = 3
  *                      COMP_CODE_DEFLATE = 4
- *                      COMP_CODE_JPEG    = 6
+ *                      COMP_CODE_JPEG    = 7 
  *          comp_prm:   compression parameters array
  *          comp_prm[0]=skphuff_skp_size: size of individual elements for 
  *                            Adaptive Huffman compression algorithm
@@ -1145,7 +1147,7 @@
 {
     int32 riid;               /*  GR id               */
     comp_info c_info;         /* compression info     */
-    int32 c_type;              /* compression type definition */
+    comp_coder_t c_type;              /* compression type definition */
 
     int CASE;
     intf ret;
@@ -1191,6 +1193,84 @@
 
 }   
 /*-------------------------------------------------------------------------
+ * Name:    mgcgcompress
+ * Puporse: Call GRgetcompress
+ * Inputs:  id: access id to GR
+ * Outputs: comp_type:  type of compression
+ *                      COMP_CODE_NONE = 0
+ *                      COMP_CODE_RLE  = 1
+ *                      COMP_CODE_SKPHUFF = 3
+ *                      COMP_CODE_DEFLATE = 4
+ *                      COMP_CODE_JPEG    = 7 
+ *          comp_prm:   compression parameters array
+ *          comp_prm[0]=skphuff_skp_size: size of individual elements for 
+ *                            Adaptive Huffman compression algorithm
+ *          comp_prm[0]=deflate_level:    GZIP  compression parameter
+ * Returns: 0 on success, -1 on failure with error set
+ * Users:   HDF Fortran programmers          
+ *-------------------------------------------------------------------------*/
+
+    FRETVAL (intf)
+#ifdef PROTOTYPE
+       nmgcgcompress(intf *id, intf *comp_type, intf *comp_prm)
+#else
+       nmgcgcompress( id, comp_type, comp_prm)
+       intf *id;
+       intf *comp_type;
+       intf *comp_prm;
+#endif /* PROTOTYPE */
+{
+    comp_info c_info;         /* compression info     */
+    comp_coder_t c_type;              /* compression type definition */
+
+    int CASE;
+    intf ret = -1;
+    intn c_ret;
+
+
+    c_ret = GRgetcompress(*id, &c_type, &c_info);
+
+    if (c_ret == 0) {
+    CASE = (int)c_type;
+    switch (CASE)  {
+
+       case COMP_CODE_NONE:       /* No compression */
+         *comp_type = 0;
+         ret = 0;
+         break;
+    
+       case COMP_CODE_RLE:             /* RLE compression */
+         *comp_type = 1;
+         ret = 0;
+         break;
+ 
+       case COMP_CODE_SKPHUFF:      /* Skipping Huffman encoding */
+          *comp_type = 3;
+          comp_prm[0] = (intf)c_info.skphuff.skp_size;
+          ret = 0;
+          break;
+
+       case COMP_CODE_DEFLATE:      /* GZIP compression */  
+          *comp_type = 4;
+          comp_prm[0] = (intf)c_info.deflate.level;
+          ret = 0;
+          break;
+
+       case COMP_CODE_JPEG:      /* JPEG compression */  
+          *comp_type = 7;
+          ret = 0;
+          break;
+
+       default:
+
+          return FAIL;
+                    
+     } /*end CASE */
+    } /*end if */
+    return(ret);
+
+}   
+/*-------------------------------------------------------------------------
  * Name:    mglt2rf
  * Puporse: Call GRluttoref
  * Inputs:  id: LUT id returned by GRgetlutid(mggltid) 
@@ -1212,3 +1292,26 @@
    ret = GRluttoref ( *id );
    return(ret);
 }
+/*-------------------------------------------------------------------------
+ * Name:    mgcgnluts
+ * Puporse: Call GRgetnluts
+ * Inputs:  id: image identifier
+ * Returns: number of palettes on success and -1 if fails.
+ * Users:   HDF Fortran programmers          
+ *-------------------------------------------------------------------------*/
+
+    FRETVAL (intf)
+#ifdef PROTOTYPE
+       nmgcgnluts(intf *id)
+#else
+       nmgcgnluts( id)
+       intf *id;
+#endif /* PROTOTYPE */
+{
+   intf ret = -1;
+   intn c_ret;
+
+   c_ret = GRgetnluts ( *id );
+   if(c_ret >= 0) ret = c_ret;
+   return(ret);
+}

Modified: packages/libhdf4/branches/upstream/current/hdf/src/mfgrff.f
===================================================================
--- packages/libhdf4/branches/upstream/current/hdf/src/mfgrff.f	2007-05-15 09:05:29 UTC (rev 830)
+++ packages/libhdf4/branches/upstream/current/hdf/src/mfgrff.f	2007-05-15 09:53:05 UTC (rev 831)
@@ -10,7 +10,7 @@
 C*                                                                          *
 C****************************************************************************
 C
-C $Id: mfgrff.f,v 1.8 2000/02/15 19:50:10 epourmal Exp $
+C $Id: mfgrff.f,v 1.12 2003/12/10 21:13:25 epourmal Exp $
 C
 C------------------------------------------------------------------------------
 C File:     mfgrff.f
@@ -346,7 +346,7 @@
 C                            COMP_CODE_RLE =1
 C                            COMP_CODE_SKPHUFF = 3
 C                            COMP_CODE_DEFLATE = 4
-C                            COMP_CODE_JPEG    = 6
+C                            COMP_CODE_JPEG    = 7 
 C                   comp_prm  - compression parameters array
 C                   Huffman:   comp_prm(1) = skphuff_skp_size
 C                   GZIP:      comp_prm(1) = deflate_level       
@@ -366,4 +366,50 @@
          return
          end
 
+C-------------------------------------------------------------------------
+C        Name:      mggcompress
+C        Purpose:   gets compression information about GR image
+C        Inputs:    riid      - access ID to GR
+C        Outputs:  comp_type - type of compression
+C                   supports the following compression types:
+C                            ( see hcomp.h  file) 
+C                            COMP_CODE_NONE = 0
+C                            COMP_CODE_RLE =1
+C                            COMP_CODE_SKPHUFF = 3
+C                            COMP_CODE_DEFLATE = 4
+C                            COMP_CODE_JPEG    = 7 
+C                   comp_prm  - compression parameters array
+C                   Huffman:   comp_prm(1) = skphuff_skp_size
+C                   GZIP:      comp_prm(1) = deflate_level       
+C        Returns:   0 on success, -1 on failure
+C        Calls:     mgcgcompress (C stub for GRgetcompress function)
+C-------------------------------------------------------------------------
+
+         INTEGER function mggcompress(riid, comp_type, comp_prm)
+
+         INTEGER riid, comp_type, comp_prm(1)
+         INTEGER mgcgcompress 
+
+         mggcompress = mgcgcompress(riid, comp_type,
+     .                              comp_prm)
+         return
+         end
+C-------------------------------------------------------------------------
+C        Name:      mggnluts
+C        Purpose:   gets number of palettes (LUTs) for an image
+C        Inputs:    riid      - access ID to GR
+C        Returns:   Number of palettes on success (0 or 1), -1 on failure
+C        Calls:     mgcgnluts (C stub for GRgetnluts function)
+C-------------------------------------------------------------------------
+
+         INTEGER function mggnluts(riid)
+
+         INTEGER riid
+         INTEGER mgcgnluts 
+
+         mggnluts = mgcgnluts(riid)
+         return
+         end
+
            
+           

Modified: packages/libhdf4/branches/upstream/current/hdf/src/src.inc
===================================================================
--- packages/libhdf4/branches/upstream/current/hdf/src/src.inc	2007-05-15 09:05:29 UTC (rev 830)
+++ packages/libhdf4/branches/upstream/current/hdf/src/src.inc	2007-05-15 09:53:05 UTC (rev 831)
@@ -10,7 +10,7 @@
 # *                                                                          *
 # ***************************************************************************
 #
-# $Id: src.inc,v 1.33 1999/02/06 03:21:48 koziol Exp $
+# $Id: src.inc,v 1.35 2003/12/10 21:13:25 epourmal Exp $
 #
 # ##################################################################
 #
@@ -33,7 +33,7 @@
 H_HDRS=hfile.h hdf.h hdfi.h herr.h hproto.h hcomp.h hconv.h hbitio.h \
        tbbt.h crle.h cnbit.h mstdio.h cnone.h cskphuff.h cdeflate.h \
        hlimits.h hntdefs.h htags.h hkit.h hcompi.h bitvect.h atom.h \
-       dynarray.h linklist.h hchunks.h vattr.h
+       dynarray.h linklist.h hchunks.h vattr.h cszip.h
 
 DF_HDRS=df.h dfi.h dfstubs.h dfufp2i.h
 DFAN_HDRS=dfan.h
@@ -47,7 +47,7 @@
 HCSRCS=hfile.c herr.c hblocks.c hbuffer.c hcompri.c hextelt.c hkit.c hdfalloc.c \
     hcomp.c hbitio.c tbbt.c hdfalloc.c hcomp.c crle.c cnbit.c mstdio.c cnone.c \
     cskphuff.c cdeflate.c bitvect.c atom.c hfiledd.c dynarray.c linklist.c \
-    glist.c hchunks.c mcache.c 
+    glist.c hchunks.c mcache.c cszip.c
 
 VCSRCS=vg.c vrw.c vio.c vparse.c vconv.c vsfld.c vgp.c vhi.c vattr.c
 
@@ -67,7 +67,7 @@
 HCOBJS=hfile.o herr.o hblocks.o hbuffer.o hcompri.o hextelt.o hkit.o hdfalloc.o \
     hcomp.o hbitio.o tbbt.o crle.o cnbit.o mstdio.o cnone.o cskphuff.o \
     cdeflate.o bitvect.o atom.o hfiledd.o dynarray.o linklist.o glist.o \
-    hchunks.o mcache.o
+    hchunks.o mcache.o cszip.o
 
 VCOBJS=vg.o vrw.o vio.o vparse.o vconv.o vsfld.o vgp.o vhi.o vattr.o
 

Modified: packages/libhdf4/branches/upstream/current/hdf/src/trace.h
===================================================================
--- packages/libhdf4/branches/upstream/current/hdf/src/trace.h	2007-05-15 09:05:29 UTC (rev 830)
+++ packages/libhdf4/branches/upstream/current/hdf/src/trace.h	2007-05-15 09:53:05 UTC (rev 831)
@@ -1,10 +1,6 @@
-#ifdef HAVE_PABLO 
-#include "ProcIDs.h"
-#else
 #define HDF_TRACE_ON( eventID )
 #define HDF_TRACE_OFF( eventID, p1, p2, p3 )
 #define HDF_MASK_TRACE_ON( mask, eventID )
 #define HDF_MASK_TRACE_OFF( mask, eventID, p1, p2, p3 )
 #define TRACE_ON(mask, eventID)
 #define TRACE_OFF(mask, eventID )
-#endif /* HAVE_PABLO */

Modified: packages/libhdf4/branches/upstream/current/hdf/src/vattr.c
===================================================================
--- packages/libhdf4/branches/upstream/current/hdf/src/vattr.c	2007-05-15 09:05:29 UTC (rev 830)
+++ packages/libhdf4/branches/upstream/current/hdf/src/vattr.c	2007-05-15 09:53:05 UTC (rev 831)
@@ -11,13 +11,10 @@
  *******************************************************************/
 
 #ifdef RCSID
-static char RcsId[] = "@(#)$Revision: 1.16 $";
+static char RcsId[] = "@(#)$Revision: 1.19 $";
 #endif
 
-/* $Id: vattr.c,v 1.16 1999/06/16 21:11:12 dwells Exp $ */
-#ifdef HAVE_PABLO
-#define PABLO_mask ID_vattr_c
-#endif
+/* $Id: vattr.c,v 1.19 2005/01/09 20:54:11 mcgrath Exp $ */
 
 /**************************************************************
 *
@@ -209,10 +206,6 @@
      int32 ret_value = SUCCEED;
      intn i, found = 0;
 
-#ifdef PABLO
-     TRACE_ON(PABLO_mask,ID_VSfindex);
-#endif
-     
      HEclear();
      if (HAatom_group(vsid) != VSIDGROUP)
         HGOTO_ERROR(DFE_ARGS, FAIL);
@@ -249,10 +242,6 @@
     } /* end if */
 
   /* Normal function cleanup */
-#ifdef HAVE_PABLO
-    TRACE_OFF(PABLO_mask,ID_VSfindex);
-#endif /* HAVE_PABLO */
-
   return ret_value;
 }       /* VSfindex */
 
@@ -295,19 +284,26 @@
      int32 nattrs, ret_value = SUCCEED;
      int32 attr_vs_ref, fid, attr_vsid;
 
-#ifdef HAVE_PABLO
-  TRACE_ON(PABLO_mask,ID_VSsetattr);
-#endif /* HAVE_PABLO */
-
      HEclear();
+
+     /* check if id is valid vdata */
      if (HAatom_group(vsid) != VSIDGROUP)
         HGOTO_ERROR(DFE_ARGS, FAIL);
 
+     /* check for null attribute name */
+     if (attrname == NULL)
+        HGOTO_ERROR(DFE_ARGS, FAIL);
+
      /* locate vs' index in vstab */
      if (NULL == (vs_inst = (vsinstance_t *)HAatom_object(vsid)))
         HGOTO_ERROR(DFE_NOVS, FAIL);
      if (NULL == (vs = vs_inst->vs))
         HGOTO_ERROR(DFE_NOVS, FAIL);
+
+     /* check for read access */
+     if (vs->access == 'r')
+        HGOTO_ERROR(DFE_BADATTACH, FAIL);
+
      w = &(vs->wlist);
      /* check field index */
      if ((findex >= w->n || findex < 0) && (findex != _HDF_VDATA))
@@ -378,10 +374,6 @@
     } /* end if */
 
   /* Normal function cleanup */
-#ifdef HAVE_PABLO
-    TRACE_OFF(PABLO_mask, ID_VSsetattr);
-#endif /* HAVE_PABLO */
-
   return ret_value;
 }  /* VSsetattr */
 /* ------------------------------------------------ 
@@ -406,10 +398,6 @@
     VDATA *vs;
     int32 ret_value = SUCCEED;
     
-#ifdef HAVE_PABLO
-  TRACE_ON(PABLO_mask,ID_VSnattrs);
-#endif /* HAVE_PABLO */
-
      HEclear();
      if (HAatom_group(vsid) != VSIDGROUP)
         HGOTO_ERROR(DFE_ARGS, FAIL);
@@ -427,10 +415,6 @@
     } /* end if */
 
   /* Normal function cleanup */
-#ifdef HAVE_PABLO
-       TRACE_OFF(PABLO_mask, ID_VSnattrs);
-#endif /* HAVE_PABLO */
-
   return ret_value;
 }  /* VSnattrs */
 
@@ -459,10 +443,6 @@
     vs_attr_t *vs_alist;
     intn i, nattrs, t_attrs;
  
-#ifdef HAVE_PABLO
-  TRACE_ON(PABLO_mask,ID_VSfnattrs);
-#endif /* HAVE_PABLO */
-
      HEclear();
      if (HAatom_group(vsid) != VSIDGROUP)
         HGOTO_ERROR(DFE_ARGS, FAIL);
@@ -491,10 +471,6 @@
     } /* end if */
 
   /* Normal function cleanup */
-#ifdef HAVE_PABLO
-        TRACE_OFF(PABLO_mask, ID_VSfnattrs);
-#endif /* HAVE_PABLO */
-
   return ret_value;
 }  /* VSfattrs */
               
@@ -525,13 +501,15 @@
      int32 ret_value = FAIL;
      intn i, nattrs, a_index, found;
 
-#ifdef HAVE_PABLO
-     TRACE_ON(PABLO_mask,ID_VSfindattr);
-#endif /* HAVE_PABLO */
-
      HEclear();
+     /* check if id is valid vdata */
      if (HAatom_group(vsid) != VSIDGROUP)
         HGOTO_ERROR(DFE_ARGS, FAIL);
+
+     /* check for null attribute name */
+     if (attrname == NULL)
+        HGOTO_ERROR(DFE_ARGS, FAIL);
+
      /* locate vs' index in vstab */
      if (NULL == (vs_inst = (vsinstance_t *)HAatom_object(vsid)))
         HGOTO_ERROR(DFE_NOVS, FAIL);
@@ -588,10 +566,6 @@
 
   /* Normal function cleanup */
 
-#ifdef HAVE_PABLO
-        TRACE_OFF(PABLO_mask, ID_VSfindattr);
-#endif /* HAVE_PABLO */
-
   return ret_value;
 }   /* VSfindattr */
 
@@ -629,10 +603,6 @@
      DYN_VWRITELIST *w;
      char *fldname;
 
-#ifdef HAVE_PABLO
-     TRACE_ON(PABLO_mask,ID_VSattrinfo);
-#endif /* HAVE_PABLO */
-
      HEclear();
      if (HAatom_group(vsid) != VSIDGROUP)
         HGOTO_ERROR(DFE_ARGS, FAIL);
@@ -696,10 +666,6 @@
     } /* end if */
 
   /* Normal function cleanup */
-#ifdef HAVE_PABLO
-            TRACE_OFF(PABLO_mask, ID_VSattrinfo);
-#endif /* HAVE_PABLO */
-
   return ret_value;
 }  /* VSattrinfo */
 
@@ -731,10 +697,6 @@
      int32 n_recs, il;
      char fields[FIELDNAMELENMAX+1];
 
-#ifdef HAVE_PABLO
-     TRACE_ON(PABLO_mask,ID_VSgetattr);
-#endif /* HAVE_PABLO */
-
      HEclear();
      if (HAatom_group(vsid) != VSIDGROUP)
         HGOTO_ERROR(DFE_ARGS, FAIL);
@@ -797,10 +759,6 @@
     } /* end if */
 
   /* Normal function cleanup */
-#ifdef HAVE_PABLO
-             TRACE_OFF(PABLO_mask, ID_VSgetattr);
-#endif /* HAVE_PABLO */
-
   return ret_value;
 }  /* VSgetattr */
 
@@ -824,10 +782,6 @@
      VDATA    *vs;
      int32  ret_value = FALSE;
 
-#ifdef HAVE_PABLO
-  TRACE_ON(PABLO_mask,ID_VSisattr);
-#endif /* HAVE_PABLO */
-
      HEclear();
      if (HAatom_group(vsid) != VSIDGROUP)
         HGOTO_ERROR(DFE_ARGS, FALSE);
@@ -845,10 +799,6 @@
     } /* end if */
 
   /* Normal function cleanup */
-#ifdef HAVE_PABLO
-            TRACE_OFF(PABLO_mask, ID_VSisattr);
-#endif /* HAVE_PABLO */
-
   return ret_value;
 }  /* VSisattr */
 
@@ -888,14 +838,16 @@
     int32 attr_vs_ref,fid, vsid;
     intn i;
 
-#ifdef HAVE_PABLO
-  TRACE_ON(PABLO_mask,ID_Vsetattr);
-#endif /* HAVE_PABLO */
-
     HEclear();
+
+    /* check if id is valid vgroup */
     if (HAatom_group(vgid)!=VGIDGROUP)
         HGOTO_ERROR(DFE_ARGS, FAIL);
 
+    /* check for null attribute name */
+    if (attrname == NULL)
+        HGOTO_ERROR(DFE_ARGS, FAIL);
+
     /* locate vg's index in vgtab */
     if (NULL == (v = (vginstance_t *) HAatom_object(vgid)))
         HGOTO_ERROR(DFE_VTAB, FAIL);
@@ -971,10 +923,6 @@
     } /* end if */
 
   /* Normal function cleanup */
-#ifdef HAVE_PABLO
-        TRACE_OFF(PABLO_mask, ID_Vsetattr);
-#endif /* HAVE_PABLO */
-  
   return ret_value;
 }  /* Vsetattr */
 
@@ -1003,10 +951,6 @@
     int16 vg_version;
     int32 ret_value = FAIL;
 
-#ifdef HAVE_PABLO
-  TRACE_ON(PABLO_mask,ID_Vgetversion);
-#endif /* HAVE_PABLO */
-
     HEclear();
     if (HAatom_group(vgid)!=VGIDGROUP)
         HGOTO_ERROR(DFE_ARGS, FAIL);
@@ -1028,10 +972,6 @@
     } /* end if */
 
   /* Normal function cleanup */
-#ifdef HAVE_PABLO
-            TRACE_OFF(PABLO_mask, ID_Vgetversion);
-#endif /* HAVE_PABLO */
-  
   return ret_value;
 }  /* Vgetversion */
 
@@ -1053,10 +993,6 @@
     vginstance_t *v;
     int32 ret_value = SUCCEED;
 
-#ifdef HAVE_PABLO
-  TRACE_ON(PABLO_mask,ID_Vnattrs);
-#endif  /* HAVE_PABLO */
-
     HEclear();
     if (HAatom_group(vgid) != VGIDGROUP)
         HGOTO_ERROR(DFE_ARGS, FAIL);
@@ -1078,10 +1014,6 @@
     } /* end if */
 
   /* Normal function cleanup */
-#ifdef HAVE_PABLO
-            TRACE_OFF(PABLO_mask, ID_Vnattrs);
-#endif /* HAVE_PABLO */
-  
   return ret_value;
 }  /* Vnattrs */
 
@@ -1109,13 +1041,16 @@
     int32 ret_value = FAIL;
     intn i, found;
 
-#ifdef HAVE_PABLO
-    TRACE_ON(PABLO_mask,ID_Vfindattr);
-#endif /* HAVE_PABLO */
-
     HEclear();
+
+    /* check if id is valid vgroup */
     if (HAatom_group(vgid) != VGIDGROUP)
        HGOTO_ERROR(DFE_ARGS, FAIL);
+
+    /* check for null attribute name */
+    if (attrname == NULL)
+        HGOTO_ERROR(DFE_ARGS, FAIL);
+
     /* locate vg's index in vgtab */
     if (NULL == (v = (vginstance_t *)HAatom_object(vgid)))
        HGOTO_ERROR(DFE_VTAB, FAIL);
@@ -1155,10 +1090,6 @@
 
   /* Normal function cleanup */
 
-#ifdef HAVE_PABLO
-        TRACE_OFF(PABLO_mask, ID_Vfindattr);
-#endif /* HAVE_PABLO */
-
   return ret_value;
 }   /* Vfindattr */
         
@@ -1196,10 +1127,6 @@
     int32 fid, vsid;
     int32 ret_value = SUCCEED;
 
-#ifdef HAVE_PABLO
-    TRACE_ON(PABLO_mask,ID_Vattrinfo);
-#endif /* HAVE_PABLO */
-
     HEclear();
     if (HAatom_group(vgid) != VGIDGROUP)
        HGOTO_ERROR(DFE_ARGS, FAIL);
@@ -1250,10 +1177,6 @@
     } /* end if */
 
   /* Normal function cleanup */
-#ifdef HAVE_PABLO
-            TRACE_OFF(PABLO_mask, ID_Vattrinfo);
-#endif /* HAVE_PABLO */
-
   return ret_value;
 }  /* Vattrinfo */
 
@@ -1283,10 +1206,6 @@
     int32 n_recs, il;
     int32 ret_value = SUCCEED;
     
-#ifdef HAVE_PABLO
-    TRACE_ON(PABLO_mask,ID_Vgetattr);
-#endif /* HAVE_PABLO */
-
     HEclear();
     if (HAatom_group(vgid) != VGIDGROUP)
        HGOTO_ERROR(DFE_ARGS, FAIL);
@@ -1333,10 +1252,6 @@
     } /* end if */
 
   /* Normal function cleanup */
-#ifdef HAVE_PABLO
-            TRACE_OFF(PABLO_mask, ID_Vgetattr);
-#endif /* HAVE_PABLO */
-
   return ret_value;
 }  /* Vgetattr */
 

Modified: packages/libhdf4/branches/upstream/current/hdf/src/vg.c
===================================================================
--- packages/libhdf4/branches/upstream/current/hdf/src/vg.c	2007-05-15 09:05:29 UTC (rev 830)
+++ packages/libhdf4/branches/upstream/current/hdf/src/vg.c	2007-05-15 09:53:05 UTC (rev 831)
@@ -11,14 +11,10 @@
  ****************************************************************************/
 
 #ifdef RCSID
-static char RcsId[] = "@(#)$Revision: 1.55 $";
+static char RcsId[] = "@(#)$Revision: 1.62 $";
 #endif
 /* vg.c,v 1.15.4.1 1993/10/26 19:25:07 georgev Exp */
 
-#ifdef HAVE_PABLO
-#define PABLO_mask ID_vg_c
-#endif
-
 /*
 FILE  
      vg.c
@@ -44,6 +40,10 @@
                        the vgroup with the specified class
      VSfindclass    -- looks in the file and returns the ref of the vdata 
                        with specified class
+     VSsetblocksize -- sets the block size of the linked-block element.
+     VSsetnumblocks -- sets the number of blocks for a linked-block element.
+     VSgetblockinfo -- retrieves the block size and the number of blocks 
+		       of a linked-block element.
      Vsetzap        -- maintaind for back compatibility
 PRIVATE FUNCTIONS
      matchnocase    -- compares to strings, ignoring case
@@ -115,10 +115,6 @@
     int32        ret_value = SUCCEED;
     CONSTR(FUNC, "VSelts");
 
-#ifdef HAVE_PABLO
-    TRACE_ON(PABLO_mask,ID_VSelts);
-#endif /* HAVE_PABLO */
-
     /* make sure vdata key is part of vdata group */
     if (HAatom_group(vkey) != VSIDGROUP)
         HGOTO_ERROR(DFE_ARGS, FAIL);
@@ -142,10 +138,6 @@
     } /* end if */
 
   /* Normal function cleanup */
-#ifdef HAVE_PABLO
-    TRACE_OFF(PABLO_mask,ID_VSelts);
-#endif /* HAVE_PABLO */
-
   return ret_value;
 }   /* VSelts */
 
@@ -168,10 +160,6 @@
     int32        ret_value = SUCCEED;
     CONSTR(FUNC, "VSgetinterlace");
 
-#ifdef HAVE_PABLO
-    TRACE_ON(PABLO_mask,ID_VSgetinterlace);
-#endif /* HAVE_PABLO */
-
     /* check key is valid vdata */
     if (HAatom_group(vkey) != VSIDGROUP)
         HGOTO_ERROR(DFE_ARGS, FAIL);
@@ -195,10 +183,6 @@
     } /* end if */
 
   /* Normal function cleanup */
-#ifdef HAVE_PABLO
-    TRACE_OFF(PABLO_mask,ID_VSgetinterlace);
-#endif /* HAVE_PABLO */
-
   return ret_value;
 }   /* VSgetinterlace */
 
@@ -222,10 +206,6 @@
     intn         ret_value = SUCCEED;
     CONSTR(FUNC, "VSsetinterlace");
 
-#ifdef HAVE_PABLO
-  TRACE_ON(PABLO_mask,ID_VSsetinterlace);
-#endif /* HAVE_PABLO */
-
     /* check key is valid vdata */
     if (HAatom_group(vkey)!=VSIDGROUP)
         HGOTO_ERROR(DFE_ARGS, FAIL);
@@ -264,10 +244,6 @@
     } /* end if */
 
   /* Normal function cleanup */
-#ifdef HAVE_PABLO
-    TRACE_OFF(PABLO_mask,ID_VSsetinterlace);
-#endif /* HAVE_PABLO */
-
   return ret_value;
 }   /* VSsetinterlace */
 
@@ -293,9 +269,10 @@
     int32        ret_value = SUCCEED;
     CONSTR(FUNC, "VSgetfields");
 
-#ifdef HAVE_PABLO
-  TRACE_ON(PABLO_mask,ID_VSgetfields);
-#endif /* HAVE_PABLO */
+    /* check if a NULL field list is passed in, then return with
+       error (found while fixing bug #554) - BMR 4/30/01 */
+    if (fields == NULL)
+        HGOTO_ERROR(DFE_ARGS, FAIL);
 
     /* check key is valid vdata */
     if (HAatom_group(vkey) != VSIDGROUP)
@@ -330,10 +307,6 @@
     } /* end if */
 
   /* Normal function cleanup */
-#ifdef HAVE_PABLO
-    TRACE_OFF(PABLO_mask, ID_VSgetfields);
-#endif /* HAVE_PABLO */
-
   return ret_value;
 }   /* VSgetfields */
 
@@ -364,10 +337,6 @@
     intn          ret_value = SUCCEED;
     CONSTR(FUNC, "VSfexist");
 
-#ifdef HAVE_PABLO
-  TRACE_ON(PABLO_mask,ID_VSfexist);
-#endif /* HAVE_PABLO */
-
     /* check key is valid vdata */
     if (HAatom_group(vkey) != VSIDGROUP)
         HGOTO_ERROR(DFE_ARGS, FAIL);
@@ -422,10 +391,6 @@
     } /* end if */
 
   /* Normal function cleanup */
-#ifdef HAVE_PABLO
-    TRACE_OFF(PABLO_mask, ID_VSfexist);
-#endif /* HAVE_PABLO */
-
   return ret_value;
 }	/* VSfexist */
 
@@ -454,10 +419,6 @@
     int32        ret_value = SUCCEED;
     CONSTR(FUNC, "VSsizeof");
 
-#ifdef HAVE_PABLO
-  TRACE_ON(PABLO_mask,ID_VSsizeof);
-#endif /* HAVE_PABLO */
-
     /* check key is valid vdata */
     if (HAatom_group(vkey)!=VSIDGROUP)
         HGOTO_ERROR(DFE_ARGS, FAIL);
@@ -507,10 +468,6 @@
     } /* end if */
 
   /* Normal function cleanup */
-#ifdef HAVE_PABLO
-    TRACE_OFF(PABLO_mask, ID_VSsizeof);
-#endif /* HAVE_PABLO */
-
   return ret_value;
 }   /* VSsizeof */
 
@@ -554,14 +511,14 @@
     int32       ret_value = SUCCEED;
     CONSTR(FUNC, "VSsetname");
 
-#ifdef HAVE_PABLO
-  TRACE_ON(PABLO_mask,ID_VSsetname);
-#endif /* HAVE_PABLO */
-
     /* check key is valid vdata */
     if (HAatom_group(vkey) != VSIDGROUP)
         HGOTO_ERROR(DFE_ARGS, FAIL);
 
+    /* check for null vdata name */
+    if (vsname == NULL)
+        HGOTO_ERROR(DFE_ARGS, FAIL);
+
     /* get vdata instance */
     if (NULL == (w = (vsinstance_t *) HAatom_object(vkey)))
         HGOTO_ERROR(DFE_NOVS, FAIL);
@@ -595,10 +552,6 @@
     } /* end if */
 
   /* Normal function cleanup */
-#ifdef HAVE_PABLO
-    TRACE_OFF(PABLO_mask, ID_VSsetname);
-#endif /* HAVE_PABLO */
-
   return ret_value;
 }   /* VSsetname */
 
@@ -626,14 +579,14 @@
     int32       ret_value = SUCCEED;
     CONSTR(FUNC, "VSsetclass");
 
-#ifdef HAVE_PABLO
-  TRACE_ON(PABLO_mask,ID_VSsetclass);
-#endif /* HAVE_PABLO */
-
     /* check key is valid vdata */
     if (HAatom_group(vkey) != VSIDGROUP)
         HGOTO_ERROR(DFE_ARGS, FAIL);
 
+    /* check for null vdata class */
+    if (vsclass == NULL)
+        HGOTO_ERROR(DFE_ARGS, FAIL);
+
     /* get vdata instance */
     if (NULL == (w = (vsinstance_t *) HAatom_object(vkey)))
         HGOTO_ERROR(DFE_NOVS, FAIL);
@@ -667,10 +620,6 @@
     } /* end if */
 
   /* Normal function cleanup */
-#ifdef HAVE_PABLO
-    TRACE_OFF(PABLO_mask, ID_VSsetclass);
-#endif /* HAVE_PABLO */
-
   return ret_value;
 }   /* VSsetclass */
 
@@ -694,10 +643,6 @@
     int32        ret_value = SUCCEED;
     CONSTR(FUNC, "VSgetname");
 
-#ifdef HAVE_PABLO
-  TRACE_ON(PABLO_mask,ID_VSgetname);
-#endif /* HAVE_PABLO */
-
     /* check key is valid vdata */
     if (HAatom_group(vkey) != VSIDGROUP)
         HGOTO_ERROR(DFE_ARGS, FAIL);
@@ -725,10 +670,6 @@
     } /* end if */
 
   /* Normal function cleanup */
-#ifdef HAVE_PABLO
-    TRACE_OFF(PABLO_mask, ID_VSgetname);
-#endif /* HAVE_PABLO */
-
   return ret_value;
 }   /* VSgetname */
 
@@ -752,14 +693,14 @@
     int32     ret_value = SUCCEED;
     CONSTR(FUNC, "VSgetclass");
 
-#ifdef HAVE_PABLO
-  TRACE_ON(PABLO_mask,ID_VSgetclass);
-#endif /* HAVE_PABLO */
-
     /* check key is valid vdata */
     if (HAatom_group(vkey) != VSIDGROUP)
         HGOTO_ERROR(DFE_ARGS, FAIL);
 
+    /* check user allocated space */
+    if (vsclass == NULL)
+        HGOTO_ERROR(DFE_ARGS, FAIL);
+
     /* get vdata instance */
     if (NULL == (w = (vsinstance_t *) HAatom_object(vkey)))
         HGOTO_ERROR(DFE_NOVS, FAIL);
@@ -779,10 +720,6 @@
     } /* end if */
 
   /* Normal function cleanup */
-#ifdef HAVE_PABLO
-    TRACE_OFF(PABLO_mask, ID_VSgetclass);
-#endif /* HAVE_PABLO */
-
   return ret_value;
 }   /* VSgetclass */
 
@@ -810,10 +747,6 @@
   intn status;
   CONSTR(FUNC, "VSinquire");
 
-#ifdef HAVE_PABLO
-  TRACE_ON(PABLO_mask,ID_VSinquire);
-#endif /* HAVE_PABLO */
-
     /* check key is valid vdata */
     if (HAatom_group(vkey) != VSIDGROUP)
         HGOTO_ERROR(DFE_ARGS, FAIL);
@@ -853,10 +786,6 @@
     } /* end if */
 
   /* Normal function cleanup */
-#ifdef HAVE_PABLO
-    TRACE_OFF(PABLO_mask, ID_VSinquire);
-#endif /* HAVE_PABLO */
-
     return ret_value;   /* ok */
 
 }   /* VSinquire */
@@ -888,10 +817,6 @@
     int32   ret_value = SUCCEED;
     CONSTR(FUNC, "VSlone");
 
-#ifdef HAVE_PABLO
-  TRACE_ON(PABLO_mask,ID_VSlone);
-#endif /* HAVE_PABLO */
-
     /* -- allocate local space for vdata refs, init to zeros -- */
     if (NULL == (lonevdata = (uint8 *) HDcalloc(MAX_REF , sizeof(uint8))))
         HGOTO_ERROR(DFE_NOSPACE, FAIL);
@@ -940,10 +865,6 @@
     } /* end if */
 
   /* Normal function cleanup */
-#ifdef HAVE_PABLO
-    TRACE_OFF(PABLO_mask, ID_VSlone);
-#endif /* HAVE_PABLO */
-
   return ret_value;
 }   /* VSlone */
 
@@ -974,10 +895,6 @@
     int32       ret_value = SUCCEED;
     CONSTR(FUNC, "Vlone");
 
-#ifdef HAVE_PABLO
-  TRACE_ON(PABLO_mask,ID_Vlone);
-#endif /* HAVE_PABLO */
-
     /* -- allocate space for vgroup refs, init to zeroes -- */
     if (NULL == (lonevg = (uint8 *) HDcalloc(MAX_REF , sizeof(uint8))))
         HGOTO_ERROR(DFE_NOSPACE, FAIL);
@@ -1027,10 +944,6 @@
     } /* end if */
 
   /* Normal function cleanup */
-#ifdef HAVE_PABLO
-    TRACE_OFF( PABLO_mask, ID_Vlone );
-#endif /* HAVE_PABLO */
-
   return ret_value;
 }   /* Vlone */
 
@@ -1055,13 +968,11 @@
     vginstance_t *v = NULL;
     VGROUP       *vg = NULL;
     int32       ret_value = 0;
-#ifdef LATER
     CONSTR(FUNC, "Vfind");
-#endif
 
-#ifdef HAVE_PABLO
-  TRACE_ON(PABLO_mask,ID_Vfind);
-#endif /* HAVE_PABLO */
+    /* check for null vgroup name */
+    if (vgname == NULL)
+        HGOTO_ERROR(DFE_ARGS, FAIL);
 
     /* process through Vgroups in file */
     while (FAIL != (vgid = Vgetid(f, vgid)))
@@ -1086,10 +997,6 @@
     } /* end if */
 
   /* Normal function cleanup */
-#ifdef HAVE_PABLO
-    TRACE_OFF( PABLO_mask, ID_Vfind );
-#endif /* HAVE_PABLO */
-
   return ret_value;
 }	/* Vfind */
 
@@ -1114,13 +1021,11 @@
     vsinstance_t *v = NULL;
     VDATA        *vs = NULL;
     int32 ret_value = 0;
-#ifdef LATER
     CONSTR(FUNC, "VSfind");
-#endif
 
-#ifdef HAVE_PABLO
-  TRACE_ON(PABLO_mask,ID_VSfind);
-#endif /* HAVE_PABLO */
+    /* check for null vdata name */
+    if (vsname == NULL)
+        HGOTO_ERROR(DFE_ARGS, FAIL);
 
     /* process through Vdatas in file */
     while (FAIL != (vsid = VSgetid(f, vsid)))
@@ -1145,10 +1050,6 @@
     } /* end if */
 
   /* Normal function cleanup */
-#ifdef HAVE_PABLO
-    TRACE_OFF(PABLO_mask, ID_VSfind);
-#endif /* HAVE_PABLO */
-
   return ret_value;
 }   /* VSfind */
 
@@ -1173,13 +1074,11 @@
     vginstance_t *v = NULL;
     VGROUP       *vg = NULL;
     int32       ret_value = 0;
-#ifdef LATER
     CONSTR(FUNC, "Vfindclass");
-#endif
 
-#ifdef HAVE_PABLO
-  TRACE_ON(PABLO_mask,ID_Vfindclass);
-#endif /* HAVE_PABLO */
+    /* check for null vgroup class */
+    if (vgclass == NULL)
+        HGOTO_ERROR(DFE_ARGS, FAIL);
 
     /* process through Vgroups in file */
     while (FAIL != (vgid = Vgetid(f, vgid)))
@@ -1204,10 +1103,6 @@
     } /* end if */
 
   /* Normal function cleanup */
-#ifdef HAVE_PABLO
-    TRACE_OFF( PABLO_mask, ID_Vfindclass);
-#endif /* HAVE_PABLO */
-
   return ret_value;    
 }	/* Vfindclass */
 
@@ -1232,13 +1127,11 @@
     vsinstance_t *v = NULL;
     VDATA        *vs = NULL;
     int32        ret_value = 0;
-#ifdef LATER
-    CONSTR(FUNC, "VSfind");
-#endif
+    CONSTR(FUNC, "VSfindclass");
 
-#ifdef HAVE_PABLO
-  TRACE_ON(PABLO_mask,ID_VSfindclass);
-#endif /* HAVE_PABLO */
+    /* check for null vdata class */
+    if (vsclass == NULL)
+        HGOTO_ERROR(DFE_ARGS, FAIL);
 
     /* process through Vdatas in file */
     while (FAIL != (vsid = VSgetid(f, vsid)))
@@ -1263,13 +1156,197 @@
     } /* end if */
 
   /* Normal function cleanup */
-#ifdef HAVE_PABLO
-    TRACE_OFF(PABLO_mask, ID_VSfindclass);
-#endif /* HAVE_PABLO */
-
   return ret_value;
 }   /* VSfindclass */
 
+/* ----------------------------------------------------------------- 
+NAME
+   VSsetblocksize -- sets the block size of the linked-block element.
+
+USAGE
+   intn VSsetblocksize(vkey, block_size)
+   int32 vkey;		IN: vdata key
+   int32 block_size	IN: length to be used for each linked-block
+   
+DESCRIPTION
+   Sets the size of the blocks, that are after the first block, of a 
+   linked-block element used for storing a vdata.  This routine is 
+   to be called before the first write to the vdata to change the block 
+   size from the default value HDF_APPENDABLE_BLOCK_LEN (4096).  Once the
+   linked-block element is created, the block size cannot be changed.
+
+RETURNS
+   Returns SUCCEED/FAIL
+
+MODIFICATION
+   BMR - added in June 2001 to fix bug# 267
+
+---------------------------------------------------------------------*/
+intn
+VSsetblocksize(	int32 vkey, /* IN: vdata key */
+		int32 block_size) /* length to be used for each linked-block */
+{
+    vsinstance_t *w = NULL;
+    VDATA        *vs = NULL;
+    intn        ret_value = SUCCEED;
+    CONSTR(FUNC, "VSsetblocksize");
+
+    /* clear error stack */
+    HEclear();
+
+    /* check if the given vdata id is part of vdata group */
+    if (HAatom_group(vkey) != VSIDGROUP)
+        HGOTO_ERROR(DFE_ARGS, FAIL);
+
+    /* get vdata instance */
+    if (NULL == (w = (vsinstance_t *) HAatom_object(vkey)))
+        HGOTO_ERROR(DFE_NOVS, FAIL);
+
+    /* get vdata itself and check it */
+    vs = w->vs;
+    if ((vs == NULL) || (vs->otag != VSDESCTAG))
+      HGOTO_ERROR(DFE_ARGS,FAIL);
+
+    /* internal routine handles the actual setting */
+    if (HLsetblockinfo(vs->aid, block_size, -1) == FAIL)
+        HGOTO_ERROR(DFE_INTERNAL, FAIL);
+
+done:
+  if(ret_value == FAIL)
+    { /* Error condition cleanup */
+
+    } /* end if */
+
+  /* Normal function cleanup */
+  return ret_value;
+}       /* VSsetblocksize */
+
+/* ----------------------------------------------------------------- 
+NAME
+   VSsetnumblocks -- sets the number of blocks for a linked-block element.
+
+USAGE
+   intn VSsetnumblocks(vkey, num_blocks)
+   int32 vkey;		IN: vdata key
+   int32 num_blocks	IN: number of blocks to be used for the linked-block
+			    element
+   
+DESCRIPTION
+   Sets the number of blocks of a linked-block element used for storing
+   a vdata.  This routine is to be called before the first write to the
+   vdata to change the number of blocks from the default value
+   HDF_APPENDABLE_BLOCK_NUM (16).  Once the linked-block element is
+   created, the number of blocks cannot be changed.
+
+RETURNS
+   Returns SUCCEED/FAIL
+
+MODIFICATION
+   BMR - added in June 2001 to fix bug# 267
+
+---------------------------------------------------------------------*/
+intn
+VSsetnumblocks( int32 vkey, /* IN: vdata key */
+		int32 num_blocks) /* number of blocks the element can have */
+{
+    vsinstance_t *w = NULL;
+    VDATA        *vs = NULL;
+    intn        ret_value = SUCCEED;
+    CONSTR(FUNC, "VSsetnumblocks");
+
+    /* clear error stack */
+    HEclear();
+
+    /* check if the given vdata id is part of vdata group */
+    if (HAatom_group(vkey) != VSIDGROUP)
+        HGOTO_ERROR(DFE_ARGS, FAIL);
+
+    /* get vdata instance */
+    if (NULL == (w = (vsinstance_t *) HAatom_object(vkey)))
+        HGOTO_ERROR(DFE_NOVS, FAIL);
+
+    /* get vdata itself and check it */
+    vs = w->vs;
+    if ((vs == NULL) || (vs->otag != VSDESCTAG))
+      HGOTO_ERROR(DFE_ARGS,FAIL);
+
+    /* internal routine handles the actual setting */
+    if (HLsetblockinfo(vs->aid, -1, num_blocks) == FAIL)
+        HGOTO_ERROR(DFE_INTERNAL, FAIL);
+
+done:
+  if(ret_value == FAIL)
+    { /* Error condition cleanup */
+
+    } /* end if */
+
+  /* Normal function cleanup */
+  return ret_value;
+}       /* VSsetnumblocks */
+
+/* ----------------------------------------------------------------- 
+NAME
+   VSgetblockinfo -- retrieves the block size and the number of blocks 
+		     of a linked-block element.
+
+USAGE
+   intn VSgetblockinfo(vkey, block_size, num_blocks)
+   int32 vkey		IN: vdata key
+   int32* block_size	OUT: the linked-block size
+   int32* num_blocks	OUT: the number of blocks the element has
+   
+DESCRIPTION
+   Retrieves the block size and the number of blocks of a linked-block
+   element used for storing a vdata.  A NULL can be passed in for
+   unwanted value.
+
+RETURNS
+   Returns SUCCEED/FAIL
+
+MODIFICATION
+   BMR - added in June 2001 to fix bug# 267
+
+---------------------------------------------------------------------*/
+intn
+VSgetblockinfo(int32 vkey, /* IN: vdata id */
+               int32* block_size, /* OUT: length used for each linked-block */
+               int32* num_blocks) /* OUT: number of blocks the element has */
+{
+    vsinstance_t *w = NULL;
+    VDATA        *vs = NULL;
+    intn        ret_value = SUCCEED;
+    CONSTR(FUNC, "VSgetblockinfo");
+
+    /* clear error stack */
+    HEclear();
+
+    /* check if vdata is part of vdata group */
+    if (HAatom_group(vkey) != VSIDGROUP)
+        HGOTO_ERROR(DFE_ARGS, FAIL);
+
+    /* get vdata instance */
+    if (NULL == (w = (vsinstance_t *) HAatom_object(vkey)))
+        HGOTO_ERROR(DFE_NOVS, FAIL);
+
+    /* get vdata itself and check it */
+    vs = w->vs;
+    if ((vs == NULL) || (vs->otag != VSDESCTAG))
+      HGOTO_ERROR(DFE_ARGS,FAIL);
+
+    /* internal routine handles the actual retrieval */
+    if (HLgetblockinfo(vs->aid, block_size, num_blocks) == FAIL)
+        HGOTO_ERROR(DFE_INTERNAL, FAIL);
+
+done:
+  if(ret_value == FAIL)
+    { /* Error condition cleanup */
+
+    } /* end if */
+
+  /* Normal function cleanup */
+  return ret_value;
+}       /* VSgetblockinfo */
+
 /* ------------------------------- Vsetzap -------------------------------- */
 /*
  * Vsetzap: Useless now. Maintained for back compatibility.

Modified: packages/libhdf4/branches/upstream/current/hdf/src/vgf.c
===================================================================
--- packages/libhdf4/branches/upstream/current/hdf/src/vgf.c	2007-05-15 09:05:29 UTC (rev 830)
+++ packages/libhdf4/branches/upstream/current/hdf/src/vgf.c	2007-05-15 09:53:05 UTC (rev 831)
@@ -11,10 +11,10 @@
  ****************************************************************************/
 
 #ifdef RCSID
-static char RcsId[] = "@(#)$Revision: 1.42 $";
+static char RcsId[] = "@(#)$Revision: 1.44 $";
 #endif
 
-/* $Id: vgf.c,v 1.42 2000/02/29 21:35:30 koziol Exp $ */
+/* $Id: vgf.c,v 1.44 2001/09/27 15:55:02 epourmal Exp $ */
 
 /*-----------------------------------------------------------------------------
   FUNCTION NAMEING CONVENTION:(For the most part true)
@@ -1453,3 +1453,86 @@
        HDfree(class_name);
        return(ret);
 } 
+/*------------------------------------------------------------------------
+ *       Name:      vscsetblsz
+ *       Purpose:   calls VSsetblocksize
+ *       Inputs:    id    -  vdata identifier
+ *                  block_size - size of the block
+ *       Returns:   0 if succeeds, -1 if fails
+ *       Users:     HDF Fortran programmers
+ ---------------------------------------------------------------------*/
+     FRETVAL (intf)
+#ifdef PROTOTYPE
+       nvscsetblsz( intf *id , intf *block_size)
+#else
+       nvscsetblsz (id, block_size)
+               intf   *id;
+               intf   *block_size;
+#endif /* PROTOTYPE */
+
+{
+       intf  ret = -1;
+       intn c_ret;	
+
+       c_ret = VSsetblocksize( *id, *block_size);
+       if(c_ret == 0) ret = 0;
+       return(ret);
+} 
+/*------------------------------------------------------------------------
+ *       Name:      vscsetnmbl
+ *       Purpose:   calls VSsetnumblocks
+ *       Inputs:    id    -  vdata identifier
+ *                  num_blocks - number of blocks
+ *       Returns:   0 if succeeds, -1 if fails
+ *       Users:     HDF Fortran programmers
+ ---------------------------------------------------------------------*/
+     FRETVAL (intf)
+#ifdef PROTOTYPE
+       nvscsetnmbl( intf *id , intf *num_blocks)
+#else
+       nvscsetnmbl (id, num_blocks)
+               intf   *id;
+               intf   *num_blocks;
+#endif /* PROTOTYPE */
+
+{
+       intf  ret;
+       intn  c_ret;
+
+       c_ret = VSsetnumblocks( *id, *num_blocks);
+       if(c_ret == 0) ret = 0;
+       return(ret);
+} 
+/*------------------------------------------------------------------------
+ *       Name:      vscgblinfo
+ *       Purpose:   calls VSgetblockinfo
+ *       Inputs:    id    -  vdata identifier
+ *                  block_size - size of the block
+ *                  num_blocks - number of blocks
+ *       Returns:   0 if succeeds, -1 if fails
+ *       Users:     HDF Fortran programmers
+ ---------------------------------------------------------------------*/
+     FRETVAL (intf)
+#ifdef PROTOTYPE
+       nvscgblinfo( intf *id , intf *block_size, intf *num_blocks)
+#else
+       nvscgblinfo (id, block_size, num_blocks)
+               intf   *id;
+               intf   *block_size; 
+               intf   *num_blocks;
+#endif /* PROTOTYPE */
+
+{
+       intf  ret = -1;
+        intn c_ret;
+	int32 c_block_size;
+        int32 c_num_blocks;
+
+       c_ret = VSgetblockinfo( *id, &c_block_size, &c_num_blocks);
+       if (c_ret == 0) {
+       		*block_size = c_block_size;
+       	        *num_blocks = c_num_blocks;
+       	      	ret = 0;
+       }
+       return(ret);
+} 

Modified: packages/libhdf4/branches/upstream/current/hdf/src/vgff.f
===================================================================
--- packages/libhdf4/branches/upstream/current/hdf/src/vgff.f	2007-05-15 09:05:29 UTC (rev 830)
+++ packages/libhdf4/branches/upstream/current/hdf/src/vgff.f	2007-05-15 09:53:05 UTC (rev 831)
@@ -10,7 +10,7 @@
 C*                                                                          *
 C****************************************************************************
 C
-C $Id: vgff.f,v 1.24 2000/02/25 19:13:01 epourmal Exp $ 
+C $Id: vgff.f,v 1.27 2001/09/27 15:55:02 epourmal Exp $ 
 C     
 c **************************************************************************
 c *
@@ -769,3 +769,62 @@
      .                      len(field_name)) 
          return 
          end
+C-------------------------------------------------------------------------
+C        Name:      vsfsetblsz
+C        Purpose:   sets the block size of the linked-block element
+C        Inputs:    id       -  vdata identifier
+C                   block_size - size of each block
+C        Returns:   returns 0 if succeeds and -1 if fails
+C        Calls:     vscsetblsz (C stub for VSsetblocksize function)
+C        Users:     HDF Fortran programmers
+C-------------------------------------------------------------------------
+
+         INTEGER function vsfsetblsz(id, block_size)
+C
+         INTEGER id, block_size
+         INTEGER vscsetblsz
+C
+         vsfsetblsz = vscsetblsz(id, block_size) 
+         return 
+         end
+
+C-------------------------------------------------------------------------
+C        Name:      vsfsetnmbl
+C        Purpose:   sets the number of blocks for a linked-block element
+C        Inputs:    id       -  vdata identifier
+C                   num_blocks - number of blocks to be used for the linked-block
+C                                elements
+C        Returns:   returns 0 if succeeds and -1 if fails
+C        Calls:     vscsetnmbl (C stub for VSsetnumblocks function)
+C        Users:     HDF Fortran programmers
+C-------------------------------------------------------------------------
+
+         INTEGER function vsfsetnmbl(id, num_blocks)
+C
+         INTEGER id, num_blocks
+         INTEGER vscsetnmbl
+C
+         vsfsetnmbl = vscsetnmbl(id, num_blocks) 
+         return 
+         end
+
+C-------------------------------------------------------------------------
+C        Name:      vsfgetblinfo
+C        Purpose:   retrieves the block size and the number of blocks
+C                   of a linked-block element.
+C        Inputs:    id       -  vdata identifier
+C        Outputs:   block_size - the linked-block size
+C                   num_blocks - number of blocks the element has
+C        Returns:   returns 0 if succeeds and -1 if fails
+C        Calls:     vscgetblinfo (C stub for VSgetblockinfo function)
+C        Users:     HDF Fortran programmers
+C-------------------------------------------------------------------------
+
+         INTEGER function vsfgetblinfo(id, block_size, num_blocks)
+C
+         INTEGER id, num_blocks, block_size
+         INTEGER vscgblinfo
+C
+         vsfgetblinfo = vscgblinfo(id, block_size, num_blocks) 
+         return 
+         end

Modified: packages/libhdf4/branches/upstream/current/hdf/src/vgp.c
===================================================================
--- packages/libhdf4/branches/upstream/current/hdf/src/vgp.c	2007-05-15 09:05:29 UTC (rev 830)
+++ packages/libhdf4/branches/upstream/current/hdf/src/vgp.c	2007-05-15 09:53:05 UTC (rev 831)
@@ -11,14 +11,10 @@
  ****************************************************************************/
 
 #ifdef RCSID
-static char RcsId[] = "@(#)$Revision: 1.96 $";
+static char RcsId[] = "@(#)$Revision: 1.97 $";
 #endif
 
-/* $Id: vgp.c,v 1.96 1999/06/16 21:11:16 dwells Exp $ */
-#ifdef HAVE_PABLO
-#define PABLO_mask ID_vgp_c
-#endif
-
+/* $Id: vgp.c,v 1.97 2005/01/09 20:54:12 mcgrath Exp $ */
 /*****************************************************************************
 
  file - vgp.c
@@ -705,10 +701,6 @@
     intn   ret_value = SUCCEED;
     CONSTR(FUNC, "Vinitialize");
 
-#ifdef HAVE_PABLO
-    TRACE_ON(PABLO_mask,ID_Vinitialize);
-#endif /* HAVE_PABLO */
-  
     /* clear error stack */
     HEclear();
 
@@ -730,10 +722,6 @@
     } /* end if */
 
   /* Normal function cleanup */
-#ifdef HAVE_PABLO
-    TRACE_OFF(PABLO_mask,ID_Vinitialize);
-#endif /* HAVE_PABLO */
-
   return ret_value;
 } /* Vinitialize() */
 
@@ -755,10 +743,6 @@
   intn    ret_value = SUCCEED;
   CONSTR(FUNC, "Vfinish");
 
-#ifdef HAVE_PABLO
-  TRACE_ON(PABLO_mask,ID_Vfinish);
-#endif /* HAVE_PABLO */
-
   /* clear error stack */
   HEclear();
 
@@ -773,10 +757,6 @@
     } /* end if */
 
   /* Normal function cleanup */
-#ifdef HAVE_PABLO
-    TRACE_OFF(PABLO_mask,ID_Vfinish);
-#endif /* HAVE_PABLO */
-
   return ret_value;
 } /* Vfinish() */
 
@@ -906,10 +886,6 @@
     uint8 *bb = NULL;
     int32 ret_value = SUCCEED;
 
-#ifdef HAVE_PABLO
-    TRACE_ON(PABLO_mask,ID_vpackvg);
-#endif /* HAVE_PABLO */
-
     /* clear error stack */
     HEclear();
 
@@ -984,10 +960,6 @@
 #endif /* LATER */
 
   /* Normal function cleanup */
-#ifdef HAVE_PABLO
-        TRACE_OFF(PABLO_mask,ID_vpackvg);
-#endif /* HAVE_PABLO */
- 
   return ret_value;
 }   /* vpackvg */
 
@@ -1017,10 +989,6 @@
     int32 ret_value = SUCCEED;
     CONSTR(FUNC, "vunpackvg");
 
-#ifdef HAVE_PABLO
-    TRACE_ON(PABLO_mask,ID_vunpackvg);
-#endif /* HAVE_PABLO */
-
     /* clear error stack */
     HEclear();
 
@@ -1099,10 +1067,6 @@
     } /* end if */
 
   /* Normal function cleanup */
-#ifdef HAVE_PABLO
-        TRACE_OFF(PABLO_mask,ID_vunpackvg);
-#endif /* HAVE_PABLO */
-
   return ret_value;
 
 }   /* vunpackvg */
@@ -1213,10 +1177,6 @@
     atom_t      ret_value = FAIL;
     CONSTR(FUNC, "Vattach");
 
-#ifdef HAVE_PABLO
-    TRACE_ON(PABLO_mask,ID_Vattach);
-#endif /* HAVE_PABLO */
-
     /* clear error stack */
     HEclear();
 
@@ -1317,10 +1277,6 @@
     } /* end if */
 
   /* Normal function cleanup */
-#ifdef HAVE_PABLO
-    TRACE_OFF(PABLO_mask,ID_Vattach);
-#endif /* HAVE_PABLO */
-
   return ret_value;
 }   /* Vattach */
 
@@ -1353,10 +1309,6 @@
     int32      ret_value = SUCCEED;
     CONSTR(FUNC, "Vdetach");
 
-#ifdef HAVE_PABLO
-    TRACE_ON(PABLO_mask,ID_Vdetach);
-#endif /* HAVE_PABLO */
-
     /* clear error stack */
     HEclear();
 
@@ -1435,10 +1387,6 @@
     } /* end if */
 
   /* Normal function cleanup */
-#ifdef HAVE_PABLO
-    TRACE_OFF(PABLO_mask,ID_Vdetach);
-#endif /* HAVE_PABLO */
-
   return ret_value;
 }   /* Vdetach */
 
@@ -1471,10 +1419,6 @@
     int32       ret_value = SUCCEED;
     CONSTR(FUNC, "Vinsert");
 
-#ifdef HAVE_PABLO
-    TRACE_ON(PABLO_mask,ID_Vinsert);
-#endif /* HAVE_PABLO */
-
     /* clear error stack */
     HEclear();
 
@@ -1555,10 +1499,6 @@
     } /* end if */
 
   /* Normal function cleanup */
-#ifdef HAVE_PABLO
-    TRACE_OFF(PABLO_mask,ID_Vinsert);
-#endif /* HAVE_PABLO */
-
   return ret_value;
 }   /* Vinsert */
 
@@ -1662,10 +1602,6 @@
     intn       ret_value = FALSE;
     CONSTR(FUNC, "Vinqtagref");
 
-#ifdef HAVE_PABLO
-    TRACE_ON(PABLO_mask,ID_Vinqtagref);
-#endif /* HAVE_PABLO */
-
     /* clear error stack */
     HEclear();
 
@@ -1698,10 +1634,6 @@
     } /* end if */
 
   /* Normal function cleanup */
-#ifdef HAVE_PABLO
-    TRACE_OFF(PABLO_mask,ID_Vinqtagref);
-#endif /* HAVE_PABLO */
-
   return ret_value;
 }   /* Vinqtagref */
 
@@ -1740,10 +1672,6 @@
     If the case of duplicate tag/ref pairs the user can call Vinqtagref() 
     to see if there are more occurences and then delete them. */
 
-#ifdef HAVE_PABLO
-    TRACE_ON(PABLO_mask,ID_Vdeletetagref);
-#endif /* HAVE_PABLO */
-
     /* clear error stack */
     HEclear();
 
@@ -1821,10 +1749,6 @@
     } /* end if */
 
   /* Normal function cleanup */
-#ifdef HAVE_PABLO
-  TRACE_OFF(PABLO_mask,ID_Vdeletetagref);
-#endif /* HAVE_PABLO */
-
   return ret_value;
 }   /* Vdeletetagref */
 
@@ -1848,10 +1772,6 @@
     int32      ret_value = SUCCEED;
     CONSTR(FUNC, "Vntagrefs");
 
-#ifdef HAVE_PABLO
-    TRACE_ON(PABLO_mask,ID_Vntagrefs);
-#endif /* HAVE_PABLO */
-
     /* clear error stack */
     HEclear();
 
@@ -1877,10 +1797,6 @@
     } /* end if */
 
   /* Normal function cleanup */
-#ifdef HAVE_PABLO
-    TRACE_OFF(PABLO_mask,ID_Vntagrefs);
-#endif /* HAVE_PABLO */
-
   return ret_value;
 }   /* Vntagrefs */
 
@@ -1968,10 +1884,6 @@
     int32      ret_value = SUCCEED;
     CONSTR(FUNC, "Vgettagrefs");
 
-#ifdef HAVE_PABLO
-  TRACE_ON(PABLO_mask,ID_Vgettagrefs);
-#endif /* HAVE_PABLO */
-
     /* clear error stack */
     HEclear();
 
@@ -2006,10 +1918,6 @@
     } /* end if */
 
   /* Normal function cleanup */
-#ifdef HAVE_PABLO
-    TRACE_OFF(PABLO_mask,ID_Vgettagrefs);
-#endif /* HAVE_PABLO */
-
   return ret_value;
 }   /* Vgettagrefs */
 
@@ -2040,10 +1948,6 @@
     intn       ret_value = SUCCEED;
     CONSTR(FUNC, "Vgettagref");
 
-#ifdef HAVE_PABLO
-  TRACE_ON(PABLO_mask,ID_Vgettagref);
-#endif /* HAVE_PABLO */
-
     /* clear error stack */
     HEclear();
 
@@ -2073,10 +1977,6 @@
     } /* end if */
 
   /* Normal function cleanup */
-#ifdef HAVE_PABLO
-    TRACE_OFF(PABLO_mask,ID_Vgettagref);
-#endif /* HAVE_PABLO */
-
   return ret_value;
 }   /* Vgettagref */
 
@@ -2206,10 +2106,6 @@
     int32      ret_value = SUCCEED;
     CONSTR(FUNC, "Vaddtagref");
 
-#ifdef HAVE_PABLO
-  TRACE_ON(PABLO_mask,ID_Vaddtagref);
-#endif /* HAVE_PABLO */
-
     /* clear error stack */
     HEclear();
 
@@ -2244,10 +2140,6 @@
     } /* end if */
 
   /* Normal function cleanup */
-#ifdef HAVE_PABLO
-    TRACE_OFF(PABLO_mask,ID_Vaddtagref);
-#endif /* HAVE_PABLO */
-
   return ret_value;
 }   /* Vaddtagref */
 
@@ -2372,10 +2264,6 @@
     int32      ret_value = SUCCEED;
     CONSTR(FUNC, "Vsetname");
 
-#ifdef HAVE_PABLO
-    TRACE_ON(PABLO_mask,ID_Vsetname);
-#endif /* HAVE_PABLO */
-
     /* clear error stack */
     HEclear();
 
@@ -2404,10 +2292,6 @@
     } /* end if */
 
   /* Normal function cleanup */
-#ifdef HAVE_PABLO
-    TRACE_OFF(PABLO_mask,ID_Vsetname);
-#endif /* HAVE_PABLO */
-
   return ret_value;
 }   /* Vsetname */
 
@@ -2432,9 +2316,6 @@
     int32      ret_value = SUCCEED;
     CONSTR(FUNC, "Vsetclass");
 
-#ifdef HAVE_PABLO
-  TRACE_ON(PABLO_mask,ID_Vsetclass);
-#endif /* HAVE_PABLO */
     /* clear error stack */
     HEclear();
 
@@ -2467,9 +2348,6 @@
     } /* end if */
 
   /* Normal function cleanup */
-#ifdef HAVE_PABLO
-    TRACE_OFF(PABLO_mask,ID_Vsetclass);
-#endif /* HAVE_PABLO */
 
   return ret_value;
 }   /* Vsetclass */
@@ -2617,9 +2495,6 @@
     int32        ret_value = SUCCEED;
     CONSTR(FUNC, "Vgetid");
 
-#ifdef HAVE_PABLO
-  TRACE_ON(PABLO_mask,ID_Vgetid);
-#endif /* HAVE_PABLO */
 
     /* clear error stack */
     HEclear();
@@ -2671,9 +2546,6 @@
     } /* end if */
 
   /* Normal function cleanup */
-#ifdef HAVE_PABLO
-    TRACE_OFF(PABLO_mask,ID_Vgetid);
-#endif /* HAVE_PABLO */
 
   return ret_value;
 }   /* Vgetid */
@@ -2795,9 +2667,6 @@
     int32        ret_value = SUCCEED;
     CONSTR(FUNC, "Vgetname");
 
-#ifdef HAVE_PABLO
-  TRACE_ON(PABLO_mask,ID_Vgetname);
-#endif /* HAVE_PABLO */
 
     /* clear error stack */
     HEclear();
@@ -2825,9 +2694,6 @@
     } /* end if */
 
   /* Normal function cleanup */
-#ifdef HAVE_PABLO
-    TRACE_OFF(PABLO_mask,ID_Vgetname);
-#endif /* HAVE_PABLO */
 
   return ret_value;
 }   /* Vgetname */
@@ -2854,9 +2720,6 @@
     int32        ret_value = SUCCEED;
     CONSTR(FUNC, "Vgetclass");
 
-#ifdef HAVE_PABLO
-  TRACE_ON(PABLO_mask,ID_Vgetclass);
-#endif /* HAVE_PABLO */
 
     /* clear error stack */
     HEclear();
@@ -2884,9 +2747,6 @@
     } /* end if */
 
   /* Normal function cleanup */
-#ifdef HAVE_PABLO
-    TRACE_OFF(PABLO_mask,ID_Vgetclass);
-#endif /* HAVE_PABLO */
 
   return ret_value;
 }   /* Vgetclass */
@@ -2916,9 +2776,6 @@
     intn    ret_value = SUCCEED;
     CONSTR(FUNC, "Vinquire");
 
-#ifdef HAVE_PABLO
-  TRACE_ON(PABLO_mask,ID_Vinquire);
-#endif /* HAVE_PABLO */
 
     /* clear error stack */
     HEclear();
@@ -2955,9 +2812,6 @@
     } /* end if */
 
   /* Normal function cleanup */
-#ifdef HAVE_PABLO
-    TRACE_OFF(PABLO_mask,ID_Vinquire);
-#endif /* HAVE_PABLO */
 
   return ret_value;
 }   /* Vinquire */

Modified: packages/libhdf4/branches/upstream/current/hdf/src/vhi.c
===================================================================
--- packages/libhdf4/branches/upstream/current/hdf/src/vhi.c	2007-05-15 09:05:29 UTC (rev 830)
+++ packages/libhdf4/branches/upstream/current/hdf/src/vhi.c	2007-05-15 09:53:05 UTC (rev 831)
@@ -11,14 +11,10 @@
  ****************************************************************************/
 
 #ifdef RCSID
-static char RcsId[] = "@(#)$Revision: 1.26 $";
+static char RcsId[] = "@(#)$Revision: 1.27 $";
 #endif
 
-/* $Id: vhi.c,v 1.26 1999/06/16 21:11:18 dwells Exp $ */
-#ifdef HAVE_PABLO
-#define PABLO_mask ID_vhi_c
-#endif
-
+/* $Id: vhi.c,v 1.27 2005/01/09 20:54:13 mcgrath Exp $ */
 /*
    * File
    *       vhi.c
@@ -68,14 +64,8 @@
     int32       order = 1;
     int32       ret_value;
 
-#ifdef HAVE_PABLO
-    TRACE_ON(PABLO_mask,ID_VHstoredata);
-#endif /* HAVE_PABLO */
     ret_value = ((int32)VHstoredatam(f, field, buf, n, datatype, vsname, vsclass, order));
 
-#ifdef HAVE_PABLO
-        TRACE_OFF( PABLO_mask, ID_VHstoredata );
-#endif /* HAVE_PABLO */
     return ret_value;
 } /* end VHstoredata */
 
@@ -112,9 +102,6 @@
     int32       vs;
     int32       ret_value = SUCCEED;
 
-#ifdef HAVE_PABLO
-    TRACE_ON(PABLO_mask,ID_VHstoredatam);
-#endif /* HAVE_PABLO */
 
     if ((vs = VSattach(f, -1, "w")) == FAIL)
         HGOTO_ERROR(DFE_CANTATTACH,FAIL);
@@ -147,9 +134,6 @@
     } /* end if */
 
   /* Normal function cleanup */
-#ifdef HAVE_PABLO
-        TRACE_OFF(PABLO_mask, ID_VHstoredatam );
-#endif /* HAVE_PABLO */
   return ret_value;
 }   /* VHstoredatam */
 
@@ -188,9 +172,6 @@
     int32       ret_value = SUCCEED;
     CONSTR(FUNC, "VHmakegroup");
 
-#ifdef HAVE_PABLO
-    TRACE_ON(PABLO_mask,ID_VHmakegroup);
-#endif /* HAVE_PABLO */
 
     if (( vg = Vattach(f, -1, "w"))== FAIL)
         HGOTO_ERROR(DFE_CANTATTACH,FAIL);
@@ -222,9 +203,6 @@
     } /* end if */
 
   /* Normal function cleanup */
-#ifdef HAVE_PABLO
-        TRACE_OFF(PABLO_mask, ID_VHmakegroup );
-#endif /* HAVE_PABLO */
 
   return ret_value;
 }   /* VHmakegroup */

Modified: packages/libhdf4/branches/upstream/current/hdf/src/vio.c
===================================================================
--- packages/libhdf4/branches/upstream/current/hdf/src/vio.c	2007-05-15 09:05:29 UTC (rev 830)
+++ packages/libhdf4/branches/upstream/current/hdf/src/vio.c	2007-05-15 09:53:05 UTC (rev 831)
@@ -11,10 +11,10 @@
  ****************************************************************************/
 
 #ifdef RCSID
-static char RcsId[] = "@(#)$Revision: 1.76 $";
+static char RcsId[] = "@(#)$Revision: 1.77 $";
 #endif
 
-/* $Id: vio.c,v 1.76 1999/06/16 21:11:18 dwells Exp $ */
+/* $Id: vio.c,v 1.77 2005/01/09 20:54:13 mcgrath Exp $ */
 
 /*****************************************************************************
  file - vio.c
@@ -74,10 +74,6 @@
 PRIVATE uint32 Vhbufsize = 0;
 PRIVATE uint8 *Vhbuf = NULL;
 
-#ifdef HAVE_PABLO
-#define PABLO_mask ID_vio_c
-#endif
-
 /* Pointers to the VDATA & vsinstance node free lists */
 static VDATA *vdata_free_list=NULL;
 static vsinstance_t *vsinstance_free_list=NULL;
@@ -419,10 +415,6 @@
     uint8 *bb = NULL;
     intn  ret_value = SUCCEED;
 
-#ifdef HAVE_PABLO
-         TRACE_ON(PABLO_mask, ID_vpackvs);
-#endif /* HAVE_PABLO */
-
     /* clear error stack */
     HEclear();
 
@@ -527,10 +519,6 @@
 #endif /* LATER */
 
   /* Normal function cleanup */
-#ifdef HAVE_PABLO
-        TRACE_OFF(PABLO_mask, ID_vpackvs);
-#endif /* HAVE_PABLO */
-
   return ret_value;
 }   /* vpackvs */
 
@@ -558,10 +546,6 @@
     int32       ret_value = SUCCEED;
     CONSTR(FUNC, "vunpackvs");
 
-#ifdef HAVE_PABLO
-      TRACE_ON(PABLO_mask, ID_vunpackvs);
-#endif /* HAVE_PABLO */
-
     /* clear error stack */
     HEclear();
 
@@ -714,10 +698,6 @@
     } /* end if */
 
 	  /* Normal function cleanup */
-	#ifdef HAVE_PABLO
-        TRACE_OFF(PABLO_mask, ID_vunpackvs);
-#endif /* HAVE_PABLO */
-
   return ret_value;
 }   /* vunpackvs */
 
@@ -909,9 +889,6 @@
     int32      ret_value = FAIL;
     CONSTR(FUNC, "VSattach");
 
-#ifdef HAVE_PABLO
-        TRACE_ON(PABLO_mask, ID_VSattach);
-#endif /* HAVE_PABLO */
     /* clear error stack */
     HEclear();
 
@@ -1056,9 +1033,6 @@
     } /* end if */
 
   /* Normal function cleanup */
-#ifdef HAVE_PABLO
-        TRACE_OFF(PABLO_mask, ID_VSattach);
-#endif /* HAVE_PABLO */
 
   return ret_value;
 }	/* VSattach */
@@ -1098,10 +1072,6 @@
     int32        ret_value = SUCCEED;
     CONSTR(FUNC, "VSdetach");
 
-#ifdef HAVE_PABLO
-        TRACE_ON(PABLO_mask, ID_VSdetach);
-#endif /* HAVE_PABLO */
-
     /* clear error stack */
     HEclear();
 
@@ -1219,10 +1189,6 @@
     } /* end if */
 
   /* Normal function cleanup */
-#ifdef HAVE_PABLO
-        TRACE_OFF(PABLO_mask, ID_VSdetach);
-#endif /* HAVE_PABLO */
-
   return ret_value;
 }	/* VSdetach */
 
@@ -1245,10 +1211,6 @@
     int32      ret_value = SUCCEED;
     CONSTR(FUNC, "VSappendable");
 
-#ifdef HAVE_PABLO
-        TRACE_ON(PABLO_mask, ID_VSappendable);
-#endif /* HAVE_PABLO */
-
     /* clear error stack */
     HEclear();
 
@@ -1280,10 +1242,6 @@
     } /* end if */
 
   /* Normal function cleanup */
-#ifdef HAVE_PABLO
-    TRACE_OFF(PABLO_mask, ID_VSappendable);
-#endif /* HAVE_PABLO */
-
   return ret_value;
 }   /* VSappendable */
 
@@ -1311,10 +1269,6 @@
     int32        ret_value = SUCCEED;
     CONSTR(FUNC, "VSgetid");
 
-#ifdef HAVE_PABLO
-        TRACE_ON(PABLO_mask, ID_VSgetid);
-#endif /* HAVE_PABLO */
-
     /* clear error stack */
     HEclear();
 
@@ -1363,10 +1317,6 @@
     } /* end if */
 
   /* Normal function cleanup */
-#ifdef HAVE_PABLO
-        TRACE_OFF(PABLO_mask, ID_VSgetid);
-#endif /* HAVE_PABLO */
-
   return ret_value;
 }   /* VSgetid */
 
@@ -1594,10 +1544,6 @@
     int32       ret_value = SUCCEED;
     CONSTR(FUNC, "VSdelete");
 
-#ifdef HAVE_PABLO
-        TRACE_ON(PABLO_mask, ID_VSdelete);
-#endif /* HAVE_PABLO */
-
     /* clear error stack */
     HEclear();
 
@@ -1635,9 +1581,5 @@
     } /* end if */
 
   /* Normal function cleanup */
-#ifdef HAVE_PABLO
-        TRACE_OFF(PABLO_mask, ID_VSdelete);
-#endif /* HAVE_PABLO */
-
   return ret_value;
 }	/* VSdelete */

Modified: packages/libhdf4/branches/upstream/current/hdf/src/vrw.c
===================================================================
--- packages/libhdf4/branches/upstream/current/hdf/src/vrw.c	2007-05-15 09:05:29 UTC (rev 830)
+++ packages/libhdf4/branches/upstream/current/hdf/src/vrw.c	2007-05-15 09:53:05 UTC (rev 831)
@@ -11,13 +11,10 @@
  ****************************************************************************/
 
 #ifdef RCSID
-static char RcsId[] = "@(#)$Revision: 1.52 $";
+static char RcsId[] = "@(#)$Revision: 1.53 $";
 #endif
 
-/* $Id: vrw.c,v 1.52 1999/06/16 21:11:19 dwells Exp $ */
-#ifdef HAVE_PABLO
-#define PABLO_mask ID_vrw_c
-#endif
+/* $Id: vrw.c,v 1.53 2005/01/09 20:54:15 mcgrath Exp $ */
 
 /***********************************************************************
 *
@@ -111,10 +108,6 @@
     int32        ret_value = SUCCEED;
     CONSTR(FUNC, "VSseek");
 
-#ifdef HAVE_PABLO
-    TRACE_ON(PABLO_mask,ID_VSseek);
-#endif /* HAVE_PABLO */
-
     /* clear error stack */
     HEclear();
 
@@ -151,10 +144,6 @@
     } /* end if */
 
   /* Normal function cleanup */
-#ifdef HAVE_PABLO
-        TRACE_OFF( PABLO_mask, ID_VSseek );
-#endif /* HAVE_PABLO */
-
   return ret_value;
 }	/* VSseek */
 
@@ -201,10 +190,6 @@
     int32      ret_value = SUCCEED;
     CONSTR(FUNC, "VSread");
 
-#ifdef HAVE_PABLO
-    TRACE_ON(PABLO_mask,ID_VSread);
-#endif /* HAVE_PABLO */
-
     /* clear error stack */
     HEclear();
 
@@ -479,10 +464,6 @@
     } /* end if */
 
   /* Normal function cleanup */
-#ifdef HAVE_PABLO
-        TRACE_OFF( PABLO_mask,ID_VSread);
-#endif /* HAVE_PABLO */
-
   return ret_value;
 }   /* VSread */
 
@@ -533,10 +514,6 @@
     int32       ret_value = SUCCEED;
     CONSTR(FUNC, "VSwrite");
 
-#ifdef HAVE_PABLO
-    TRACE_ON(PABLO_mask,ID_VSwrite);
-#endif /* HAVE_PABLO */
-
     /* clear error stack */
     HEclear();
 
@@ -819,10 +796,6 @@
     } /* end if */
 
   /* Normal function cleanup */
-#ifdef HAVE_PABLO
-        TRACE_OFF( PABLO_mask, ID_VSwrite );
-#endif /* HAVE_PABLO */
-
   return ret_value;
 }	/* VSwrite */
 

Modified: packages/libhdf4/branches/upstream/current/hdf/src/vsfld.c
===================================================================
--- packages/libhdf4/branches/upstream/current/hdf/src/vsfld.c	2007-05-15 09:05:29 UTC (rev 830)
+++ packages/libhdf4/branches/upstream/current/hdf/src/vsfld.c	2007-05-15 09:53:05 UTC (rev 831)
@@ -11,15 +11,11 @@
  ****************************************************************************/
 
 #ifdef RCSID
-static char RcsId[] = "@(#)$Revision: 1.66 $";
+static char RcsId[] = "@(#)$Revision: 1.70 $";
 #endif
 
-/* $Id: vsfld.c,v 1.66 1999/06/16 21:11:21 dwells Exp $ */
+/* $Id: vsfld.c,v 1.70 2005/01/09 20:54:16 mcgrath Exp $ */
 
-#ifdef HAVE_PABLO
-#define PABLO_mask ID_vsfld_c
-#endif
-
 /*****************************************************************************
 * vsetf.c
 * Part of the HDF VSet interface.
@@ -95,9 +91,10 @@
     intn       ret_value = FAIL;
     CONSTR(FUNC, "VSsetfields");
 
-#ifdef HAVE_PABLO
-    TRACE_ON(PABLO_mask,ID_VSsetfields);
-#endif /* HAVE_PABLO */
+    /* check if a NULL field list is passed in, then return with
+       error (bug #554) - BMR 4/30/01 */
+    if (fields == NULL)
+        HGOTO_ERROR(DFE_ARGS, FAIL);
 
     if (HAatom_group(vkey)!=VSIDGROUP)
         HGOTO_ERROR(DFE_ARGS, FAIL);
@@ -121,115 +118,118 @@
      * write to an empty vdata : set the write list but do not set the
      *   read list cuz there is nothing there to read yet...
      */
-    if ((vs->access == 'w') && (vs->nvertices == 0))
+    if (vs->access == 'w')
        {
-          wlist=&(vs->wlist);
-          if (wlist->n == 0) /* fields not set yet, Sept. 96. */
-            /* do not re-set fields if they were already set. */
-          {
-              wlist->ivsize = 0;
-              wlist->n = 0;
+        if (vs->nvertices == 0)
+           {
+              wlist=&(vs->wlist);
+              if (wlist->n == 0) /* fields not set yet, Sept. 96. */
+                /* do not re-set fields if they were already set. */
+              {
+                  wlist->ivsize = 0;
+                  wlist->n = 0;
 
-          /* allocate space for the internal WRITELIST structures */
-              /* Allocate buffer to hold all the int16/uint16 arrays */
-              if((wlist->bptr=HDmalloc(sizeof(uint16)*(size_t)(ac*5)))==NULL)
-                  HGOTO_ERROR(DFE_NOSPACE,FAIL);
+              /* allocate space for the internal WRITELIST structures */
+                  /* Allocate buffer to hold all the int16/uint16 arrays */
+                  if((wlist->bptr=HDmalloc(sizeof(uint16)*(size_t)(ac*5)))==NULL)
+                      HGOTO_ERROR(DFE_NOSPACE,FAIL);
 
-              /* Use buffer to support the other arrays */
-              wlist->type=(int16 *)wlist->bptr;
-              wlist->off=(uint16 *)wlist->type+ac;
-              wlist->isize=wlist->off+ac;
-              wlist->order=wlist->isize+ac;
-              wlist->esize=wlist->order+ac;
-              if((wlist->name=HDmalloc(sizeof(char *)*(size_t)ac))==NULL)
-                {
-                  HDfree(wlist->bptr);
-                  HGOTO_ERROR(DFE_NOSPACE,FAIL);
-                } /* end if */
+                  /* Use buffer to support the other arrays */
+                  wlist->type=(int16 *)wlist->bptr;
+                  wlist->off=(uint16 *)wlist->type+ac;
+                  wlist->isize=wlist->off+ac;
+                  wlist->order=wlist->isize+ac;
+                  wlist->esize=wlist->order+ac;
+                  if((wlist->name=HDmalloc(sizeof(char *)*(size_t)ac))==NULL)
+                    {
+                      HDfree(wlist->bptr);
+                      HGOTO_ERROR(DFE_NOSPACE,FAIL);
+                    } /* end if */
 
-              for (i = 0; i < ac; i++)
-                {
-                    found = FALSE;
-                /* --- first look in the user's symbol table --- */
-                    for (j = 0; j < vs->nusym; j++)
-                        if (!HDstrcmp(av[i], vs->usym[j].name))
-                          {
-                              found = TRUE;
-                            
-                              if((wlist->name[wlist->n]=HDstrdup(vs->usym[j].name))==NULL)
-                               {
-                                  HDfree(wlist->name);
-                                  HDfree(wlist->bptr);
-                                  HGOTO_ERROR(DFE_NOSPACE,FAIL);
-                                } /* end if */
-                              order = vs->usym[j].order;
-                              wlist->type[wlist->n] = vs->usym[j].type;
-                              wlist->order[wlist->n] = order;
+                  for (i = 0; i < ac; i++)
+                    {
+                        found = FALSE;
+                    /* --- first look in the user's symbol table --- */
+                        for (j = 0; j < vs->nusym; j++)
+                            if (!HDstrcmp(av[i], vs->usym[j].name))
+                              {
+                                  found = TRUE;
+                                
+                                  if((wlist->name[wlist->n]=HDstrdup(vs->usym[j].name))==NULL)
+                                   {
+                                      HDfree(wlist->name);
+                                      HDfree(wlist->bptr);
+                                      HGOTO_ERROR(DFE_NOSPACE,FAIL);
+                                    } /* end if */
+                                  order = vs->usym[j].order;
+                                  wlist->type[wlist->n] = vs->usym[j].type;
+                                  wlist->order[wlist->n] = order;
 
-                              value = order * DFKNTsize(vs->usym[j].type | DFNT_NATIVE);
-                              if (value == FAIL)
-                                  HGOTO_ERROR(DFE_BADFIELDS, FAIL);
-                              wlist->esize[wlist->n] = (uint16) value;
+                                  value = order * DFKNTsize(vs->usym[j].type | DFNT_NATIVE);
+                                  if (value == FAIL)
+                                      HGOTO_ERROR(DFE_BADFIELDS, FAIL);
+                                  wlist->esize[wlist->n] = (uint16) value;
 
-                              value = order * vs->usym[j].isize;
-                              if (value > MAX_FIELD_SIZE)
-                                  HGOTO_ERROR(DFE_BADFIELDS, FAIL);
-                              wlist->isize[wlist->n] = (uint16) value;
+                                  value = order * vs->usym[j].isize;
+                                  if (value > MAX_FIELD_SIZE)
+                                      HGOTO_ERROR(DFE_BADFIELDS, FAIL);
+                                  wlist->isize[wlist->n] = (uint16) value;
 
-                              value = (int32) wlist->ivsize + (int32) (wlist->isize[wlist->n]);
-                              if (value > MAX_FIELD_SIZE)
-                                  HGOTO_ERROR(DFE_BADFIELDS, FAIL);
-                              wlist->ivsize = (uint16) value;
+                                  value = (int32) wlist->ivsize + (int32) (wlist->isize[wlist->n]);
+                                  if (value > MAX_FIELD_SIZE)
+                                      HGOTO_ERROR(DFE_BADFIELDS, FAIL);
+                                  wlist->ivsize = (uint16) value;
 
-                              wlist->n++;
-                              break;
-                          }
+                                  wlist->n++;
+                                  break;
+                              }
 
-                /* --- now look in the reserved symbol table --- */
-                    if (!found)
-                      {
-                          for (j = 0; j < (intn)NRESERVED; j++)
-                              if (!HDstrcmp(av[i], rstab[j].name))
-                                {
-                                    found = TRUE;
+                    /* --- now look in the reserved symbol table --- */
+                        if (!found)
+                          {
+                              for (j = 0; j < (intn)NRESERVED; j++)
+                                  if (!HDstrcmp(av[i], rstab[j].name))
+                                    {
+                                        found = TRUE;
 
-                                    if((wlist->name[wlist->n]=HDstrdup(rstab[j].name))==NULL)
-                                      {
-                                        HDfree(wlist->name);
-                                        HDfree(wlist->bptr);
-                                        HGOTO_ERROR(DFE_NOSPACE,FAIL);
-                                      } /* end if */
-                                    order = rstab[j].order;
-                                    wlist->type[wlist->n] = rstab[j].type;
-                                    wlist->order[wlist->n] = order;
-                                    value = order * DFKNTsize(rstab[j].type | DFNT_NATIVE);
-                                    if (value == FAIL)
-                                      HGOTO_ERROR(DFE_BADFIELDS, FAIL);
-                                    wlist->esize[wlist->n] = (uint16) value;
-                                    wlist->isize[wlist->n] = (uint16) (order * rstab[j].isize);
-                                    wlist->ivsize += (uint16) (wlist->isize[wlist->n]);
-                                    wlist->n++;
-                                    break;
-                                }
-                      }
-                    if (!found)     /* field is not a defined field - error  */
-                        HGOTO_ERROR(DFE_BADFIELDS, FAIL);
-                }
+                                        if((wlist->name[wlist->n]=HDstrdup(rstab[j].name))==NULL)
+                                          {
+                                            HDfree(wlist->name);
+                                            HDfree(wlist->bptr);
+                                            HGOTO_ERROR(DFE_NOSPACE,FAIL);
+                                          } /* end if */
+                                        order = rstab[j].order;
+                                        wlist->type[wlist->n] = rstab[j].type;
+                                        wlist->order[wlist->n] = order;
+                                        value = order * DFKNTsize(rstab[j].type | DFNT_NATIVE);
+                                        if (value == FAIL)
+                                          HGOTO_ERROR(DFE_BADFIELDS, FAIL);
+                                        wlist->esize[wlist->n] = (uint16) value;
+                                        wlist->isize[wlist->n] = (uint16) (order * rstab[j].isize);
+                                        wlist->ivsize += (uint16) (wlist->isize[wlist->n]);
+                                        wlist->n++;
+                                        break;
+                                    }
+                          }
+                        if (!found)     /* field is not a defined field - error  */
+                            HGOTO_ERROR(DFE_BADFIELDS, FAIL);
+                    }
 
-          /* *********************************************************** */
-          /* compute and save the fields' offsets */
-               for (uj = 0, i = 0; i < wlist->n; i++)
-                {
-                    wlist->off[i] = (uint16) uj;
-                    uj += wlist->isize[i];
-                }
+              /* *********************************************************** */
+              /* compute and save the fields' offsets */
+                   for (uj = 0, i = 0; i < wlist->n; i++)
+                    {
+                        wlist->off[i] = (uint16) uj;
+                        uj += wlist->isize[i];
+                    }
 
-              vs->marked = TRUE; /* mark vdata as being modified */
-              vs->new_h_sz = TRUE; /* mark vdata header size being changed */
+                  vs->marked = TRUE; /* mark vdata as being modified */
+                  vs->new_h_sz = TRUE; /* mark vdata header size being changed */
 
-              HGOTO_DONE(SUCCEED); /* OK */
-          } /* if wlist->n == 0 */
-      }     /* writing to empty vdata */
+                  HGOTO_DONE(SUCCEED); /* OK */
+              } /* if wlist->n == 0 */
+          } /* writing to empty vdata */
+      } /* writing to vdata */
 
     /*
      *   No matter the access mode, if there are elements in the VData
@@ -271,10 +271,6 @@
     } /* end if */
 
   /* Normal function cleanup */
-#ifdef HAVE_PABLO
-        TRACE_OFF(PABLO_mask, ID_VSsetfields);
-#endif /* HAVE_PABLO */
-
   return ret_value;
 }   /* VSsetfields */
 
@@ -297,10 +293,6 @@
     intn       ret_value = SUCCEED;
     CONSTR(FUNC, "VSfdefine");
 
-#ifdef HAVE_PABLO
-    TRACE_ON(PABLO_mask,ID_VSfdefine);
-#endif /* HAVE_PABLO */
-
     if (HAatom_group(vkey)!=VSIDGROUP)
         HGOTO_ERROR(DFE_ARGS, FAIL);
 
@@ -386,10 +378,6 @@
     } /* end if */
 
   /* Normal function cleanup */
-#ifdef HAVE_PABLO
-        TRACE_OFF(PABLO_mask, ID_VSfdefine);
-#endif /* HAVE_PABLO */
-
   return ret_value;
 }	/* VSfdefine */
 
@@ -406,10 +394,6 @@
     int32      ret_value = SUCCEED;
     CONSTR(FUNC, "VFnfields");
 
-#ifdef HAVE_PABLO
-    TRACE_ON(PABLO_mask,ID_VFnfields);
-#endif /* HAVE_PABLO */
-
     if (HAatom_group(vkey)!=VSIDGROUP)
         HGOTO_ERROR(DFE_ARGS,FAIL);
 
@@ -430,10 +414,6 @@
     } /* end if */
 
   /* Normal function cleanup */
-#ifdef HAVE_PABLO
-        TRACE_OFF(PABLO_mask, ID_VFnfields);
-#endif /* HAVE_PABLO */
-
   return ret_value;
 }	/* VFnfields */
 
@@ -453,10 +433,6 @@
     char       *ret_value = NULL; /* FAIL */
     CONSTR(FUNC, "VFfieldname");
 
-#ifdef HAVE_PABLO
-    TRACE_ON(PABLO_mask,ID_VFfieldname);
-#endif /* HAVE_PABLO */
-
     if (HAatom_group(vkey)!=VSIDGROUP)
       HGOTO_ERROR(DFE_ARGS,NULL);
 
@@ -480,10 +456,6 @@
     } /* end if */
 
   /* Normal function cleanup */
-#ifdef HAVE_PABLO
-  TRACE_OFF(PABLO_mask, ID_VFfieldname);;
-#endif /* HAVE_PABLO */
-
   return ret_value;
 }   /* VFfieldname */
 
@@ -501,10 +473,6 @@
     int32      ret_value = SUCCEED;
     CONSTR(FUNC, "VFfeildtype");
 
-#ifdef HAVE_PABLO
-    TRACE_ON(PABLO_mask,ID_VFfieldtype);
-#endif /* HAVE_PABLO */
-
     if (HAatom_group(vkey)!=VSIDGROUP)
       HGOTO_ERROR(DFE_ARGS,FAIL);
 
@@ -528,10 +496,6 @@
     } /* end if */
 
   /* Normal function cleanup */
-#ifdef HAVE_PABLO
-      TRACE_OFF(PABLO_mask, ID_VFfieldtype);
-#endif /* HAVE_PABLO */
-
   return ret_value;
 }   /* VFfieldtype */
 
@@ -550,10 +514,6 @@
     int32      ret_value = SUCCEED;
     CONSTR(FUNC, "VFfieldisize");
 
-#ifdef HAVE_PABLO
-    TRACE_ON(PABLO_mask,ID_VFfieldisize);
-#endif /* HAVE_PABLO */
-
     if (HAatom_group(vkey)!=VSIDGROUP)
       HGOTO_ERROR(DFE_ARGS,FAIL);
 
@@ -577,10 +537,6 @@
     } /* end if */
 
   /* Normal function cleanup */
-#ifdef HAVE_PABLO
-     TRACE_OFF(PABLO_mask, ID_VFfieldisize);
-#endif /* HAVE_PABLO */
-
   return ret_value;
 }   /* VFfieldisize */
 
@@ -599,10 +555,6 @@
     int32      ret_value = SUCCEED;
     CONSTR(FUNC, "VFfieldesize");
 
-#ifdef HAVE_PABLO
-    TRACE_ON(PABLO_mask,ID_VFfieldesize);
-#endif /* HAVE_PABLO */
-
     if (HAatom_group(vkey)!=VSIDGROUP)
       HGOTO_ERROR(DFE_ARGS,FAIL);
 
@@ -626,11 +578,7 @@
     } /* end if */
 
   /* Normal function cleanup */
-#ifdef HAVE_PABLO
-  TRACE_OFF(PABLO_mask, ID_VFfieldesize);
 
-#endif /* HAVE_PABLO */
-
   return ret_value;
 }   /* VFfieldesize */
 
@@ -648,10 +596,6 @@
     int32      ret_value = SUCCEED;
     CONSTR(FUNC, "VFfieldorder");
 
-#ifdef HAVE_PABLO
-    TRACE_ON(PABLO_mask,ID_VFfieldorder);
-#endif /* HAVE_PABLO */
-
     if (HAatom_group(vkey)!=VSIDGROUP)
       HGOTO_ERROR(DFE_ARGS,FAIL);
 
@@ -675,10 +619,6 @@
     } /* end if */
 
   /* Normal function cleanup */
-#ifdef HAVE_PABLO
-    TRACE_OFF(PABLO_mask, ID_VFfieldorder);
-#endif /* HAVE_PABLO */
-
   return ret_value;
 }	/* VFfieldorder */
 
@@ -822,10 +762,6 @@
        int32 *offs; /* offset of buf fields in buf */
     }  blist;
 
-#ifdef HAVE_PABLO
-  TRACE_ON(PABLO_mask,ID_VSfpack);
-#endif /* HAVE_PABLO */
-
     if (HAatom_group(vsid)!=VSIDGROUP)
         HGOTO_ERROR(DFE_ARGS, FAIL);
     /* locate vs' index in vgtab */
@@ -980,10 +916,6 @@
     if (fbufps != NULL)
        HDfree(fbufps);
 
-#ifdef HAVE_PABLO
-    TRACE_OFF(PABLO_mask, ID_VSfpack);
-#endif /* HAVE_PABLO */
-
   return ret_value;
 }       /* VSfpack */
 /*--------------------------------------------------------- */

Added: packages/libhdf4/branches/upstream/current/hdf/test/MAKECOM.OLD
===================================================================
--- packages/libhdf4/branches/upstream/current/hdf/test/MAKECOM.OLD	                        (rev 0)
+++ packages/libhdf4/branches/upstream/current/hdf/test/MAKECOM.OLD	2007-05-15 09:53:05 UTC (rev 831)
@@ -0,0 +1,182 @@
+$!
+$!
+$! File to build the test files in the HDF test suite
+$!
+$!
+$! The following constants should probably be defined
+$!   only once in the main HDF MAKE.COM...
+$!
+$! define/nolog hdf$lib [-.lib]df
+$! define/nolog hdf$include [-.include]
+$! define/nolog sys$clib sys$library:vaxcrtl
+$!
+$ type sys$input
+  **  Making H level test programs **
+$!
+$ type sys$input
+        Making tlinkage
+$ cc/define=VMS/include=hdf$include   tlinkage
+$ link tlinkage, hdf$lib/lib, sys$clib/lib
+$!
+$ type sys$input
+        Making thfile
+$ cc/define=VMS/include=hdf$include   thfile
+$ link thfile, hdf$lib/lib, sys$clib/lib
+$!
+$ type sys$input
+        Making thfile1
+$ cc/define=VMS/include=hdf$include   thfile1
+$ link thfile1, hdf$lib/lib, sys$clib/lib
+$!
+$ type sys$input
+        Making thblocks
+$ cc/define=VMS/include=hdf$include   thblocks
+$ link thblocks, hdf$lib/lib, sys$clib/lib
+$!
+$ type sys$input
+        Making thextelt
+$ cc/define=VMS/include=hdf$include   thextelt
+$ link thextelt, hdf$lib/lib, sys$clib/lib
+$!
+$ type sys$input
+        Making terr
+$ cc/define=VMS/include=hdf$include   terr
+$ link terr, hdf$lib/lib, sys$clib/lib
+$!
+$ type sys$input
+        Making tvers
+$ cc/define=VMS/include=hdf$include   tvers
+$ link tvers, hdf$lib/lib, sys$clib/lib
+$!
+$ type sys$input 
+  **  Making C interface test programs **
+$!
+$ type sys$input
+        Making trig
+$ cc/define=VMS/include=hdf$include   trig
+$ link trig, hdf$lib/lib, sys$clib/lib
+$!
+$ type sys$input
+        Making tsdmms
+$ cc/define=VMS/include=hdf$include   tsdmms
+$ link tsdmms, hdf$lib/lib, sys$clib/lib
+$!
+$ type sys$input
+        Making tsdnmms
+$ cc/define=VMS/include=hdf$include   tsdnmms
+$ link tsdnmms, hdf$lib/lib, sys$clib/lib
+$!
+$ type sys$input
+        Making tsdnt
+$ cc/define=VMS/include=hdf$include   tsdnt
+$ link tsdnt, hdf$lib/lib, sys$clib/lib
+$!
+$ type sys$input
+        Making tsdnnt
+$ cc/define=VMS/include=hdf$include   tsdnnt
+$ link tsdnnt, hdf$lib/lib, sys$clib/lib
+$!
+$ type sys$input
+        Making tan
+$ cc/define=VMS/include=hdf$include   tan
+$ link tan, hdf$lib/lib, sys$clib/lib
+$!
+$ type sys$input
+        Making tanfile
+$ cc/define=VMS/include=hdf$include   tanfile
+$ link tanfile, hdf$lib/lib, sys$clib/lib
+$!
+$ type sys$input
+        Making tv1
+$ cc/define=VMS/include=hdf$include   tv1
+$ link tv1, hdf$lib/lib, sys$clib/lib
+$!
+$ type sys$input
+        Making tv2
+$ cc/define=VMS/include=hdf$include   tv2
+$ link tv2, hdf$lib/lib, sys$clib/lib
+$!
+$ type sys$input
+        Making egchi
+$ cc/define=VMS/include=hdf$include   egchi
+$ link egchi, hdf$lib/lib, sys$clib/lib
+$!
+$ type sys$input
+        Making tstubs
+$ cc/define=VMS/include=hdf$include   tstubs
+$ link tstubs, hdf$lib/lib, sys$clib/lib
+$!
+$ type sys$input
+        Making tsdstr
+$ cc/define=VMS/include=hdf$include   tsdstr
+$ link tsdstr, hdf$lib/lib, sys$clib/lib
+$!
+$ type sys$input
+        Making tlitend
+$ cc/define=VMS/include=hdf$include   tlitend
+$ link tlitend, hdf$lib/lib, sys$clib/lib
+$!
+$ type sys$input 
+  **  Making Fortran interface test programs **
+$!
+$ type sys$input
+        Making tr8F
+$ fortran tr8F.f
+$ link tr8F, hdf$lib/lib, sys$clib/lib
+$!
+$ type sys$input
+        Making t24F
+$ fortran t24F.f
+$ link t24F, hdf$lib/lib, sys$clib/lib
+$!
+$ type sys$input
+        Making tpF
+$ fortran tpF.f
+$ link tpF, hdf$lib/lib, sys$clib/lib
+$!
+$ type sys$input
+        Making tsdmmsF
+$ fortran tsdmmsF.f
+$ link tsdmmsF, hdf$lib/lib, sys$clib/lib
+$!
+$ type sys$input
+        Making tsdnmmsF
+$ fortran tsdnmmsF.f
+$ link tsdnmmsF, hdf$lib/lib, sys$clib/lib
+$!
+$ type sys$input
+        Making tsdntF
+$ fortran tsdntF.f
+$ link tsdntF, hdf$lib/lib, sys$clib/lib
+$!
+$ type sys$input
+        Making tsdnntF
+$ fortran tsdnntF.f
+$ link tsdnntF, hdf$lib/lib, sys$clib/lib
+$!
+$ type sys$input
+        Making tanF
+$ fortran tanF.f
+$ link tanF, hdf$lib/lib, sys$clib/lib
+$!
+$ type sys$input
+        Making tanfileF
+$ fortran tanfileF.f
+$ link tanfileF, hdf$lib/lib, sys$clib/lib
+$!
+$ type sys$input
+        Making egfhi
+$ fortran egfhi.f
+$ link egfhi, hdf$lib/lib, sys$clib/lib
+$!
+$ type sys$input
+        Making tstubsF
+$ fortran tstubsF.f
+$ link tstubsF, hdf$lib/lib, sys$clib/lib
+$!
+$ type sys$input
+        Making tsdstrF
+$ fortran tsdstrF.f
+$ link tsdstrF, hdf$lib/lib, sys$clib/lib
+$!
+

Added: packages/libhdf4/branches/upstream/current/hdf/test/Makefile.am
===================================================================
--- packages/libhdf4/branches/upstream/current/hdf/test/Makefile.am	                        (rev 0)
+++ packages/libhdf4/branches/upstream/current/hdf/test/Makefile.am	2007-05-15 09:53:05 UTC (rev 831)
@@ -0,0 +1,46 @@
+#############################################################################
+##                      Setup for building programs                        ##
+#############################################################################
+
+AM_CPPFLAGS=-I$(top_srcdir)/hdf/src
+
+#############################################################################
+##                              Testing                                    ##
+#############################################################################
+
+if HDF_BUILD_FORTRAN
+TESTS = testhdf fortest
+check_PROGRAMS = testhdf fortest fortestF
+else
+TESTS = testhdf
+check_PROGRAMS = testhdf
+endif
+
+testhdf_SOURCES = an.c anfile.c bitio.c blocks.c buffer.c chunks.c comp.c   \
+                  conv.c extelt.c file.c file1.c litend.c macros.c man.c    \
+                  mgr.c nbit.c rig.c sdmms.c sdnmms.c sdstr.c slab.c tbv.c  \
+                  tdupimgs.c testhdf.c tree.c tszip.c tvattr.c tvset.c      \
+		  tvsfpack.c vers.c
+testhdf_LDADD = ../src/libdf.a
+testhdf_DEPENDENCIES = testdir ../src/libdf.a
+
+if HDF_BUILD_FORTRAN
+fortest_SOURCES = fortest.c
+fortest_LDADD = ../src/libdf.a
+fortest_DEPENDENCIES = testdir fortestF ../src/libdf.a
+
+fortestF_SOURCES = forsupff.f forsupf.c fortestF.f manf.f mgrf.f slabwf.f   \
+                   t24f.f tanf.f tanfilef.f tpf.f tr8f.f tsdmmsf.f          \
+                   tsdnmmsf.f tsdnntf.f tsdntf.f tsdstrf.f tstubsf.f        \
+                   tvattrf.f tvsetf.f
+fortestF_LDADD = ../src/libdf.a
+fortestF_DEPENDENCIES = testdir ../src/libdf.a
+endif
+
+testdir:
+	-mkdir testdir
+#############################################################################
+##                          And the cleanup                                ##
+#############################################################################
+
+DISTCLEANFILES = fortest.arg Fortran_err.dat testdir/t5.hdf

Modified: packages/libhdf4/branches/upstream/current/hdf/test/Makefile.in
===================================================================
--- packages/libhdf4/branches/upstream/current/hdf/test/Makefile.in	2007-05-15 09:05:29 UTC (rev 830)
+++ packages/libhdf4/branches/upstream/current/hdf/test/Makefile.in	2007-05-15 09:53:05 UTC (rev 831)
@@ -1,432 +1,599 @@
-# ****************************************************************************
-# * NCSA HDF                                                                 *
-# * Software Development Group                                               *
-# * National Center for Supercomputing Applications                          *
-# * University of Illinois at Urbana-Champaign                               *
-# * 605 E. Springfield, Champaign IL 61820                                   *
-# *                                                                          *
-# * For conditions of distribution and use, see the accompanying             *
-# * hdf/COPYING file.                                                        *
-# *                                                                          *
-# ****************************************************************************
-#
-# $Id: Makefile.in,v 1.38 1999/01/13 19:19:37 koziol Exp $
-#
-# ##################################################################
-#
-#                          ABOUT THIS MAKEFILE
-#
-# This makefile creates HDF test programs.  There are three categories
-# of test programs:
-#
-#              application layer C test programs
-#              application layer FORTRAN test programs
-#              lower level C test programs
-#
-# The application layer C test programs are:
-#
-#          trig    (8-bit, 24-bit raster image sets and palette interface)
-#          tsdnt  (scientific data sets, data only)
-#          tsdnnt (same as tdfsd_nt with native number types)
-#          tsdmms (scientific data sets, data, max/min and scales)
-#          tsdnmms(same as tdfsd_mms with native number types)
-#          tsdstr (data and dimension strings: label, unit, format and coordsys)
-#          tan     (annotations for HDF objects)
-#          tanfile (annotations for HDF files)
-#          tstubs  (emulation of old lower level i/o routines)
-#
-# The application layer FORTRAN test programs are:
-#
-#          tr8F     (8-bit raster image sets)
-#          t24F     (24-bit raster image sets)
-#          tpF      (Palettes)
-#          tsdntF   (scientific data sets, data only)
-#          tsdnntF  (same as tdfsd_nntF except all data types are native
-#                           machine number types)
-#          tsdmmsF  (scientific data sets, data, max/min and scales)
-#          tsdnmmsF (same as tdfsd_mmsF with native number types)
-#          tsdstrF  (data and dimenstrings: label, unit, format and coordsys)
-#          tanF     (annotations for HDF objects)
-#          tanfileF (annotations for HDF files)
-#          tstubsF  (emulation of old lower level i/o routines)
-#
-# Vset test programs:
-#
-#          tvset.c  (the basic vgroup and vdata creation routines)
-#          tvsfpack.c (pack/unpack field values into/from a vdata buf)
-#          egfhi.f  (Fortran version of egchi.c)
-#          tvsetf.f (Fortran version of tvset.c)
-#          tvattrf.f (Fortran version of tvattr.c)
-# The lower level C test programs are:
-#
-#              vers.c     (get version string from an HDF file)
-#              thfile     (basic i/o)
-#              terr       (error handling)
-#              thblocks   (linked blocks)
-#              thextelt   (i/o involving external files)
-#              tvers      (storing and retrieving version strings)
-#              thlinkage  (linkage of functions)
-#
-# Hyperslab C test programs
-#              slabw      (write data as 5 slabs )
-#              slab1w     (write data as first 3 of 5 slabs )
-#              slab2w     (write data as last 2 of 5 slabs )
-#              slab3w     (write data as 24 slabs i.e. each element )
-#              slab4w     (write data as 1 slab )
-#              slabwf     (write data as 5 slabs )
-#
-# Hyperslab Fortran test programs
-#              slabw      (write data as 5 slabs )
-#              slab1wf    (write data as first 3 of 5 slabs )
-#              slab2wf    (write data as last 2 of 5 slabs )
-#              slab3wf    (write data as 24 slabs i.e. each element )
-#              slab4wf    (write data as 1 slab )
-#
-# ##################################################################
-#
-#                      HOW TO USE THIS MAKEFILE
-#
-# You need libdf.a to compile any of these test programs.  You will
-# also need selected header files as described below.
-#
-# To compile the application layer C test programs, enter "make ctests".
-# If there are test programs that you do not want to compile, do this
-# by removing them from the lines "COBJS=" and "CSRCS=" below.
-# You need access to the header files indicated in the "CHDRS=" line
-# below to compile these programs.
-#
-# To compile the application layer FORTRAN test programs, enter
-# "make ftests".  You need access to the header files indicated in
-# the "FHDRS=" line below to compile these programs.
-# If there are test programs that you do not want to compile, do this
-# by removing them from the lines "FOBJS=" and "FSRCS=" below.
-#
-# To compile the lower level C test programs, enter "make htests".
-# You need access to the header files indicated in the "HHDRS=" line
-# below to compile these programs.  If there are test programs that
-# you do not want to compile, do this by removing them from the lines
-# "HOBJS=" and "HSRCS=" below.
-#
-# To remove all object files created by this makefile, enter "make clean"
-#
-# ##################################################################
-#
-#                       PORTING INSTRUCTIONS
-#
-# You must modify the lines containing the symbol "==>" to make
-# this makefile compatible with your platform.
-#
-# ##################################################################
+# Makefile.in generated by automake 1.7.7 from Makefile.am.
+# @configure_input@
 
-### Start of system configuration section. ####
-# Set shell so we know what it is
-SHELL = /bin/sh
+# Copyright 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003
+# 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.
 
-# 'srcdir' Gets set to directory this Makefile is found in
-srcdir = .
-TOP_SRCDIR = ../..
+# 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.
 
-prefix = $(TOP_SRCDIR)/NewHDF
+ at SET_MAKE@
 
-exec_prefix = $(prefix)
-tooldir = $(exec_prefix)/$(target)
+#############################################################################
+#############################################################################
 
-program_transform_name =
+srcdir = @srcdir@
+top_srcdir = @top_srcdir@
+VPATH = @srcdir@
+pkgdatadir = $(datadir)/@PACKAGE@
+pkglibdir = $(libdir)/@PACKAGE@
+pkgincludedir = $(includedir)/@PACKAGE@
+top_builddir = ../..
 
-datadir = $(prefix)/lib
-mandir = $(prefix)/man
-man1dir = $(mandir)/man1
-man2dir = $(mandir)/man2
-man3dir = $(mandir)/man3
-man4dir = $(mandir)/man4
-man5dir = $(mandir)/man5
-man6dir = $(mandir)/man6
-man7dir = $(mandir)/man7
-man8dir = $(mandir)/man8
-man9dir = $(mandir)/man9
-docdir = $(datadir)/doc
+am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
+INSTALL = @INSTALL@
+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 = :
+host_triplet = @host@
+ACLOCAL = @ACLOCAL@
+AMDEP_FALSE = @AMDEP_FALSE@
+AMDEP_TRUE = @AMDEP_TRUE@
+AMTAR = @AMTAR@
+AR = @AR@
+AUTOCONF = @AUTOCONF@
+AUTOHEADER = @AUTOHEADER@
+AUTOMAKE = @AUTOMAKE@
+AWK = @AWK@
+CC = @CC@
+CCDEPMODE = @CCDEPMODE@
+CFLAGS = @CFLAGS@
+CPP = @CPP@
+CPPFLAGS = @CPPFLAGS@
+CXX = @CXX@
+CXXCPP = @CXXCPP@
+CXXDEPMODE = @CXXDEPMODE@
+CXXFLAGS = @CXXFLAGS@
+CYGPATH_W = @CYGPATH_W@
+DEFS = @DEFS@
+DEPDIR = @DEPDIR@
+DIFF = @DIFF@
+ECHO_C = @ECHO_C@
+ECHO_N = @ECHO_N@
+ECHO_T = @ECHO_T@
+EGREP = @EGREP@
+EXEEXT = @EXEEXT@
+F77 = @F77@
+FFLAGS = @FFLAGS@
+HDF_BUILD_FORTRAN_FALSE = @HDF_BUILD_FORTRAN_FALSE@
+HDF_BUILD_FORTRAN_TRUE = @HDF_BUILD_FORTRAN_TRUE@
+HDF_BUILD_XDR_FALSE = @HDF_BUILD_XDR_FALSE@
+HDF_BUILD_XDR_TRUE = @HDF_BUILD_XDR_TRUE@
+INSTALL_DATA = @INSTALL_DATA@
+INSTALL_PROGRAM = @INSTALL_PROGRAM@
+INSTALL_SCRIPT = @INSTALL_SCRIPT@
+INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
+LDFLAGS = @LDFLAGS@
+LEX = @LEX@
+LEXLIB = @LEXLIB@
+LEX_OUTPUT_ROOT = @LEX_OUTPUT_ROOT@
+LIBOBJS = @LIBOBJS@
+LIBS = @LIBS@
+LN_S = @LN_S@
+LTLIBOBJS = @LTLIBOBJS@
+MAINT = @MAINT@
+MAINTAINER_MODE_FALSE = @MAINTAINER_MODE_FALSE@
+MAINTAINER_MODE_TRUE = @MAINTAINER_MODE_TRUE@
+MAKEINFO = @MAKEINFO@
+NEQN = @NEQN@
+OBJEXT = @OBJEXT@
+PACKAGE = @PACKAGE@
+PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
+PACKAGE_NAME = @PACKAGE_NAME@
+PACKAGE_STRING = @PACKAGE_STRING@
+PACKAGE_TARNAME = @PACKAGE_TARNAME@
+PACKAGE_VERSION = @PACKAGE_VERSION@
+PATH_SEPARATOR = @PATH_SEPARATOR@
+RANLIB = @RANLIB@
+SET_MAKE = @SET_MAKE@
+SHELL = @SHELL@
+STRIP = @STRIP@
+TBL = @TBL@
+VERSION = @VERSION@
+YACC = @YACC@
+ac_ct_CC = @ac_ct_CC@
+ac_ct_CXX = @ac_ct_CXX@
+ac_ct_F77 = @ac_ct_F77@
+ac_ct_RANLIB = @ac_ct_RANLIB@
+ac_ct_STRIP = @ac_ct_STRIP@
+am__fastdepCC_FALSE = @am__fastdepCC_FALSE@
+am__fastdepCC_TRUE = @am__fastdepCC_TRUE@
+am__fastdepCXX_FALSE = @am__fastdepCXX_FALSE@
+am__fastdepCXX_TRUE = @am__fastdepCXX_TRUE@
+am__include = @am__include@
+am__leading_dot = @am__leading_dot@
+am__quote = @am__quote@
+bindir = @bindir@
+build = @build@
+build_alias = @build_alias@
+build_cpu = @build_cpu@
+build_os = @build_os@
+build_vendor = @build_vendor@
+datadir = @datadir@
+exec_prefix = @exec_prefix@
+host = @host@
+host_alias = @host_alias@
+host_cpu = @host_cpu@
+host_os = @host_os@
+host_vendor = @host_vendor@
+includedir = @includedir@
+infodir = @infodir@
+install_sh = @install_sh@
+libdir = @libdir@
+libexecdir = @libexecdir@
+localstatedir = @localstatedir@
+mandir = @mandir@
+oldincludedir = @oldincludedir@
+prefix = @prefix@
+program_transform_name = @program_transform_name@
+sbindir = @sbindir@
+sharedstatedir = @sharedstatedir@
+sysconfdir = @sysconfdir@
+target_alias = @target_alias@
 
-INSTALL = $${srcroot}/install.sh -c
-INSTALL_PROGRAM = $(INSTALL)
-INSTALL_DATA = $(INSTALL) -m 644
+AM_CPPFLAGS = -I$(top_srcdir)/hdf/src
 
-# /usr/local/bin/m4 (GNU version?)
-M4   = /usr/local/bin/m4
-# /usr/local/bin/perl (GNU version?)
-PERL = /usr/local/bin/perl
 
-# Name of achive randomizer, usually ranlib (use 'touch' if non-existant)
-RANLIB = ranlib
+#############################################################################
+#############################################################################
+ at HDF_BUILD_FORTRAN_TRUE@TESTS = testhdf fortest
+ at HDF_BUILD_FORTRAN_FALSE@TESTS = testhdf
+ at HDF_BUILD_FORTRAN_TRUE@check_PROGRAMS = testhdf fortest fortestF
+ at HDF_BUILD_FORTRAN_FALSE@check_PROGRAMS = testhdf
 
-# Name of library archiver and flags to send, default 'AR=ar', 'ARFLAGS=r'
-AR = ar
-ARFLAGS = r
+testhdf_SOURCES = an.c anfile.c bitio.c blocks.c buffer.c chunks.c comp.c   \
+                  conv.c extelt.c file.c file1.c litend.c macros.c man.c    \
+                  mgr.c nbit.c rig.c sdmms.c sdnmms.c sdstr.c slab.c tbv.c  \
+                  tdupimgs.c testhdf.c tree.c tszip.c tvattr.c tvset.c      \
+		  tvsfpack.c vers.c
 
-# Name of remove utility, default 'RM=/bin/rm', 'RMFLAGS=-f'
-RM = /bin/rm
-RMFLAGS = -f
+testhdf_LDADD = ../src/libdf.a
+testhdf_DEPENDENCIES = testdir ../src/libdf.a
 
-#Compilier defaults overriden by top level make
-AS = as
-CC = gcc
-CFLAGS = -ansi
-FC = f77
-FFLAGS=
+ at HDF_BUILD_FORTRAN_TRUE@fortest_SOURCES = fortest.c
+ at HDF_BUILD_FORTRAN_TRUE@fortest_LDADD = ../src/libdf.a
+ at HDF_BUILD_FORTRAN_TRUE@fortest_DEPENDENCIES = testdir fortestF ../src/libdf.a
 
-# Set for document generation
-MAKEINFO = makeinfo
-TEXI2DVI = texi2dvi
+ at HDF_BUILD_FORTRAN_TRUE@fortestF_SOURCES = forsupff.f forsupf.c fortestF.f manf.f mgrf.f slabwf.f   \
+ at HDF_BUILD_FORTRAN_TRUE@                   t24f.f tanf.f tanfilef.f tpf.f tr8f.f tsdmmsf.f          \
+ at HDF_BUILD_FORTRAN_TRUE@                   tsdnmmsf.f tsdnntf.f tsdntf.f tsdstrf.f tstubsf.f        \
+ at HDF_BUILD_FORTRAN_TRUE@                   tvattrf.f tvsetf.f
 
-# Directory in which to install scripts.
-bindir = $(exec_prefix)/bin
+ at HDF_BUILD_FORTRAN_TRUE@fortestF_LDADD = ../src/libdf.a
+ at HDF_BUILD_FORTRAN_TRUE@fortestF_DEPENDENCIES = testdir ../src/libdf.a
 
-# Directory in which to install library files.
-libdir = $(prefix)/lib
+#############################################################################
+#############################################################################
+DISTCLEANFILES = fortest.arg Fortran_err.dat testdir/t5.hdf
+subdir = hdf/test
+ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
+mkinstalldirs = $(SHELL) $(top_srcdir)/bin/mkinstalldirs
+CONFIG_HEADER = $(top_builddir)/hdf/src/h4config.h
+CONFIG_CLEAN_FILES =
+ at HDF_BUILD_FORTRAN_TRUE@check_PROGRAMS = testhdf$(EXEEXT) \
+ at HDF_BUILD_FORTRAN_TRUE@	fortest$(EXEEXT) fortestF$(EXEEXT)
+ at HDF_BUILD_FORTRAN_FALSE@check_PROGRAMS = testhdf$(EXEEXT)
+am__fortest_SOURCES_DIST = fortest.c
+ at HDF_BUILD_FORTRAN_TRUE@am_fortest_OBJECTS = fortest.$(OBJEXT)
+fortest_OBJECTS = $(am_fortest_OBJECTS)
+ at HDF_BUILD_FORTRAN_FALSE@fortest_DEPENDENCIES =
+fortest_LDFLAGS =
+am__fortestF_SOURCES_DIST = forsupff.f forsupf.c fortestF.f manf.f \
+	mgrf.f slabwf.f t24f.f tanf.f tanfilef.f tpf.f tr8f.f tsdmmsf.f \
+	tsdnmmsf.f tsdnntf.f tsdntf.f tsdstrf.f tstubsf.f tvattrf.f \
+	tvsetf.f
+ at HDF_BUILD_FORTRAN_TRUE@am_fortestF_OBJECTS = forsupff.$(OBJEXT) \
+ at HDF_BUILD_FORTRAN_TRUE@	forsupf.$(OBJEXT) fortestF.$(OBJEXT) \
+ at HDF_BUILD_FORTRAN_TRUE@	manf.$(OBJEXT) mgrf.$(OBJEXT) \
+ at HDF_BUILD_FORTRAN_TRUE@	slabwf.$(OBJEXT) t24f.$(OBJEXT) \
+ at HDF_BUILD_FORTRAN_TRUE@	tanf.$(OBJEXT) tanfilef.$(OBJEXT) \
+ at HDF_BUILD_FORTRAN_TRUE@	tpf.$(OBJEXT) tr8f.$(OBJEXT) \
+ at HDF_BUILD_FORTRAN_TRUE@	tsdmmsf.$(OBJEXT) tsdnmmsf.$(OBJEXT) \
+ at HDF_BUILD_FORTRAN_TRUE@	tsdnntf.$(OBJEXT) tsdntf.$(OBJEXT) \
+ at HDF_BUILD_FORTRAN_TRUE@	tsdstrf.$(OBJEXT) tstubsf.$(OBJEXT) \
+ at HDF_BUILD_FORTRAN_TRUE@	tvattrf.$(OBJEXT) tvsetf.$(OBJEXT)
+fortestF_OBJECTS = $(am_fortestF_OBJECTS)
+ at HDF_BUILD_FORTRAN_FALSE@fortestF_DEPENDENCIES =
+fortestF_LDFLAGS =
+am_testhdf_OBJECTS = an.$(OBJEXT) anfile.$(OBJEXT) bitio.$(OBJEXT) \
+	blocks.$(OBJEXT) buffer.$(OBJEXT) chunks.$(OBJEXT) \
+	comp.$(OBJEXT) conv.$(OBJEXT) extelt.$(OBJEXT) file.$(OBJEXT) \
+	file1.$(OBJEXT) litend.$(OBJEXT) macros.$(OBJEXT) man.$(OBJEXT) \
+	mgr.$(OBJEXT) nbit.$(OBJEXT) rig.$(OBJEXT) sdmms.$(OBJEXT) \
+	sdnmms.$(OBJEXT) sdstr.$(OBJEXT) slab.$(OBJEXT) tbv.$(OBJEXT) \
+	tdupimgs.$(OBJEXT) testhdf.$(OBJEXT) tree.$(OBJEXT) \
+	tszip.$(OBJEXT) tvattr.$(OBJEXT) tvset.$(OBJEXT) \
+	tvsfpack.$(OBJEXT) vers.$(OBJEXT)
+testhdf_OBJECTS = $(am_testhdf_OBJECTS)
+testhdf_LDFLAGS =
 
-# Directory in which to install documentation info files.
-infodir = $(prefix)/info
+DEFAULT_INCLUDES =  -I. -I$(srcdir) -I$(top_builddir)/hdf/src
+depcomp = $(SHELL) $(top_srcdir)/bin/depcomp
+am__depfiles_maybe = depfiles
+ at AMDEP_TRUE@DEP_FILES = ./$(DEPDIR)/an.Po ./$(DEPDIR)/anfile.Po \
+ at AMDEP_TRUE@	./$(DEPDIR)/bitio.Po ./$(DEPDIR)/blocks.Po \
+ at AMDEP_TRUE@	./$(DEPDIR)/buffer.Po ./$(DEPDIR)/chunks.Po \
+ at AMDEP_TRUE@	./$(DEPDIR)/comp.Po ./$(DEPDIR)/conv.Po \
+ at AMDEP_TRUE@	./$(DEPDIR)/extelt.Po ./$(DEPDIR)/file.Po \
+ at AMDEP_TRUE@	./$(DEPDIR)/file1.Po ./$(DEPDIR)/forsupf.Po \
+ at AMDEP_TRUE@	./$(DEPDIR)/fortest.Po ./$(DEPDIR)/litend.Po \
+ at AMDEP_TRUE@	./$(DEPDIR)/macros.Po ./$(DEPDIR)/man.Po \
+ at AMDEP_TRUE@	./$(DEPDIR)/mgr.Po ./$(DEPDIR)/nbit.Po \
+ at AMDEP_TRUE@	./$(DEPDIR)/rig.Po ./$(DEPDIR)/sdmms.Po \
+ at AMDEP_TRUE@	./$(DEPDIR)/sdnmms.Po ./$(DEPDIR)/sdstr.Po \
+ at AMDEP_TRUE@	./$(DEPDIR)/slab.Po ./$(DEPDIR)/tbv.Po \
+ at AMDEP_TRUE@	./$(DEPDIR)/tdupimgs.Po ./$(DEPDIR)/testhdf.Po \
+ at AMDEP_TRUE@	./$(DEPDIR)/tree.Po ./$(DEPDIR)/tszip.Po \
+ at AMDEP_TRUE@	./$(DEPDIR)/tvattr.Po ./$(DEPDIR)/tvset.Po \
+ at AMDEP_TRUE@	./$(DEPDIR)/tvsfpack.Po ./$(DEPDIR)/vers.Po
+COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \
+	$(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
+CCLD = $(CC)
+LINK = $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@
+F77COMPILE = $(F77) $(AM_FFLAGS) $(FFLAGS)
+F77LD = $(F77)
+F77LINK = $(F77LD) $(AM_FFLAGS) $(FFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@
+DIST_SOURCES = $(am__fortest_SOURCES_DIST) $(am__fortestF_SOURCES_DIST) \
+	$(testhdf_SOURCES)
+DIST_COMMON = README $(srcdir)/Makefile.in Makefile.am
+SOURCES = $(fortest_SOURCES) $(fortestF_SOURCES) $(testhdf_SOURCES)
 
-#### ----- host and target specific makefile fragments come in here.-------
-### ------------------- end of makefile fragments -------------------------
+all: all-am
 
-# ############# End of system configuration section. ###############
+.SUFFIXES:
+.SUFFIXES: .c .f .o .obj
+$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ Makefile.am  $(top_srcdir)/configure.ac $(ACLOCAL_M4)
+	cd $(top_srcdir) && \
+	  $(AUTOMAKE) --foreign  hdf/test/Makefile
+Makefile: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.in  $(top_builddir)/config.status
+	cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)
 
-HDF_FLAGS       = \
-        CC="$(CC)" \
-        CFLAGS="$(CFLAGS)" \
-        FC="$(FC)" \
-        FFLAGS="$(FFLAGS)" \
-        RANLIB="$(RANLIB)" \
-        AR="$(AR)" \
-        ARFLAGS="$(ARFLAGS)" \
-        RM="$(RM)" \
-        RMFLAGS="$(RMFLAGS)" \
-        MACHINE="$(MACHINE)" 
+clean-checkPROGRAMS:
+	-test -z "$(check_PROGRAMS)" || rm -f $(check_PROGRAMS)
+fortest$(EXEEXT): $(fortest_OBJECTS) $(fortest_DEPENDENCIES) 
+	@rm -f fortest$(EXEEXT)
+	$(LINK) $(fortest_LDFLAGS) $(fortest_OBJECTS) $(fortest_LDADD) $(LIBS)
+fortestF$(EXEEXT): $(fortestF_OBJECTS) $(fortestF_DEPENDENCIES) 
+	@rm -f fortestF$(EXEEXT)
+	$(F77LINK) $(fortestF_LDFLAGS) $(fortestF_OBJECTS) $(fortestF_LDADD) $(LIBS)
+testhdf$(EXEEXT): $(testhdf_OBJECTS) $(testhdf_DEPENDENCIES) 
+	@rm -f testhdf$(EXEEXT)
+	$(LINK) $(testhdf_LDFLAGS) $(testhdf_OBJECTS) $(testhdf_LDADD) $(LIBS)
 
-LOCAL_MACROS  = CC="$(CC)" \
-	CFLAGS="$(CFLAGS)" \
-	CPP="$(CPP)" \
-	CPPFLAGS="$(CPPFLAGS)" \
-	exec_prefix="$(exec_prefix)" \
-	FC="$(FC)" \
-	prefix="$(prefix)"
+mostlyclean-compile:
+	-rm -f *.$(OBJEXT) core *.core
 
-# ==> where is your HDF library (libdf.a) located?
-# ==> where are your hdf.h, hdfi.h and vg.h files located?
-HDFINC= $(srcdir)/../src
-HDFLIB=$(srcdir)/../src
-HDFSRC=$(srcdir)/../src
-HDFBIN=$(srcdir)/../bin
+distclean-compile:
+	-rm -f *.tab.c
 
-# ==> where is your JPEG library (libjpeg.a) located?
-JPEGLIB=$(srcdir)/../jpeg
-JPEGINC=$(srcdir)/../jpeg
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/an.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/anfile.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/bitio.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/blocks.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/buffer.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/chunks.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/comp.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/conv.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/extelt.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/file.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/file1.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/forsupf.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/fortest.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/litend.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/macros.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/man.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/mgr.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/nbit.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/rig.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/sdmms.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/sdnmms.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/sdstr.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/slab.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/tbv.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/tdupimgs.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/testhdf.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/tree.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/tszip.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/tvattr.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/tvset.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/tvsfpack.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/vers.Po at am__quote@
 
-# ==> where is your PABLO include files
-PABLO_HINC= $(srcdir)/../pablo
+.c.o:
+ at am__fastdepCC_TRUE@	if $(COMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" \
+ at am__fastdepCC_TRUE@	  -c -o $@ `test -f '$<' || echo '$(srcdir)/'`$<; \
+ at am__fastdepCC_TRUE@	then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; \
+ at am__fastdepCC_TRUE@	else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; \
+ at am__fastdepCC_TRUE@	fi
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	depfile='$(DEPDIR)/$*.Po' tmpdepfile='$(DEPDIR)/$*.TPo' @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	$(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCC_FALSE@	$(COMPILE) -c `test -f '$<' || echo '$(srcdir)/'`$<
 
-# ==> specify where to find the FMPOOL include and source files 
-FMPOOL_INC=$(srcdir)/../fmpool
-FMPOOL_SRC=$(srcdir)/../fmpool
+.c.obj:
+ at am__fastdepCC_TRUE@	if $(COMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" \
+ at am__fastdepCC_TRUE@	  -c -o $@ `if test -f '$<'; then $(CYGPATH_W) '$<'; else $(CYGPATH_W) '$(srcdir)/$<'; fi`; \
+ at am__fastdepCC_TRUE@	then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; \
+ at am__fastdepCC_TRUE@	else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; \
+ at am__fastdepCC_TRUE@	fi
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	depfile='$(DEPDIR)/$*.Po' tmpdepfile='$(DEPDIR)/$*.TPo' @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	$(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCC_FALSE@	$(COMPILE) -c `if test -f '$<'; then $(CYGPATH_W) '$<'; else $(CYGPATH_W) '$(srcdir)/$<'; fi`
 
-# ==> where is your zlib library (libzlib.a) located?
-ZLIBLIB=$(srcdir)/../zlib
-ZLIBINC=$(srcdir)/../zlib
+.f.o:
+	$(F77COMPILE) -c -o $@ `test -f '$<' || echo '$(srcdir)/'`$<
 
-ALL_CFLAGS = $(CFLAGS) $(FMPOOL_FLAGS) -I$(HDFINC) -I$(JPEGINC) -I$(ZLIBINC)
+.f.obj:
+	$(F77COMPILE) -c -o $@ `if test -f '$<'; then $(CYGPATH_W) '$<'; else $(CYGPATH_W) '$(srcdir)/$<'; fi`
+uninstall-info-am:
 
-MANIFEST = $(DISTFILES)
+ETAGS = etags
+ETAGSFLAGS =
 
-DISTFILES = Makefile.in bitio.dat litend.dat nbit.dat tmgr.dat win32tst.mak \
-	$(CSRCS) $(FSRCS) $(CHDRS) gentest.c
+CTAGS = ctags
+CTAGSFLAGS =
 
-CHDRS= tproto.h tutils.h
+tags: TAGS
 
-CSRCS= 	rig.c sdstr.c blocks.c an.c anfile.c extelt.c file.c file1.c vers.c \
-	sdmms.c sdnmms.c slab.c litend.c tvset.c comp.c bitio.c tree.c macros.c \
-	conv.c nbit.c man.c mgr.c testhdf.c tbv.c tvsfpack.c chunks.c tvattr.c \
-    buffer.c
+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; } \
+	       END { for (i in files) print i; }'`; \
+	mkid -fID $$unique
 
-COBJS= rig.o sdstr.o blocks.o an.o anfile.o extelt.o file.o file1.o vers.o \
-	sdmms.o sdnmms.o slab.o litend.o tvset.o comp.o bitio.o tree.o macros.o \
-	conv.o nbit.o man.o mgr.o testhdf.o tbv.o tvsfpack.o chunks.o tvattr.o \
-    buffer.o
+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; } \
+	       END { for (i in files) print i; }'`; \
+	test -z "$(ETAGS_ARGS)$$tags$$unique" \
+	  || $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
+	     $$tags $$unique
 
-FSRCS= fortest.c fortestF.f forsupff.f forsupf.c \
-	manf.f mgrf.f slabwf.f t24f.f tanf.f tanfilef.f tpf.f tr8f.f \
-	tsdmmsf.f tsdnmmsf.f tsdnntf.f tsdntf.f tsdstrf.f tstubsf.f \
-        tvsetf.f, tvattrf.f
+ctags: CTAGS
+CTAGS:  $(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; } \
+	       END { for (i in files) print i; }'`; \
+	test -z "$(CTAGS_ARGS)$$tags$$unique" \
+	  || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
+	     $$tags $$unique
 
-FOBJS = fortestF.o forsupff.o forsupf.o \
-	manf.o mgrf.o slabwf.o t24f.o tanf.o tanfilef.o tpf.o tr8f.o \
-	tsdmmsf.o tsdnmmsf.o tsdnntf.o tsdntf.o tsdstrf.o tstubsf.o  \
-        tvsetf.o tvattrf.o
+GTAGS:
+	here=`$(am__cd) $(top_builddir) && pwd` \
+	  && cd $(top_srcdir) \
+	  && gtags -i $(GTAGS_ARGS) $$here
 
-#CFORSUPSRCS = forsupf.c
+distclean-tags:
+	-rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
 
-FTESTS = fortest fortestF
+check-TESTS: $(TESTS)
+	@failed=0; all=0; xfail=0; xpass=0; skip=0; \
+	srcdir=$(srcdir); export srcdir; \
+	list='$(TESTS)'; \
+	if test -n "$$list"; then \
+	  for tst in $$list; do \
+	    if test -f ./$$tst; then dir=./; \
+	    elif test -f $$tst; then dir=; \
+	    else dir="$(srcdir)/"; fi; \
+	    if $(TESTS_ENVIRONMENT) $${dir}$$tst; then \
+	      all=`expr $$all + 1`; \
+	      case " $(XFAIL_TESTS) " in \
+	      *" $$tst "*) \
+	        xpass=`expr $$xpass + 1`; \
+	        failed=`expr $$failed + 1`; \
+	        echo "XPASS: $$tst"; \
+	      ;; \
+	      *) \
+	        echo "PASS: $$tst"; \
+	      ;; \
+	      esac; \
+	    elif test $$? -ne 77; then \
+	      all=`expr $$all + 1`; \
+	      case " $(XFAIL_TESTS) " in \
+	      *" $$tst "*) \
+	        xfail=`expr $$xfail + 1`; \
+	        echo "XFAIL: $$tst"; \
+	      ;; \
+	      *) \
+	        failed=`expr $$failed + 1`; \
+	        echo "FAIL: $$tst"; \
+	      ;; \
+	      esac; \
+	    else \
+	      skip=`expr $$skip + 1`; \
+	      echo "SKIP: $$tst"; \
+	    fi; \
+	  done; \
+	  if test "$$failed" -eq 0; then \
+	    if test "$$xfail" -eq 0; then \
+	      banner="All $$all tests passed"; \
+	    else \
+	      banner="All $$all tests behaved as expected ($$xfail expected failures)"; \
+	    fi; \
+	  else \
+	    if test "$$xpass" -eq 0; then \
+	      banner="$$failed of $$all tests failed"; \
+	    else \
+	      banner="$$failed of $$all tests did not behave as expected ($$xpass unexpected passes)"; \
+	    fi; \
+	  fi; \
+	  dashes="$$banner"; \
+	  skipped=""; \
+	  if test "$$skip" -ne 0; then \
+	    skipped="($$skip tests were not run)"; \
+	    test `echo "$$skipped" | wc -c` -gt `echo "$$banner" | wc -c` && \
+	      dashes="$$skipped"; \
+	  fi; \
+	  report=""; \
+	  if test "$$failed" -ne 0 && test -n "$(PACKAGE_BUGREPORT)"; then \
+	    report="Please report to $(PACKAGE_BUGREPORT)"; \
+	    test `echo "$$report" | wc -c` -gt `echo "$$banner" | wc -c` && \
+	      dashes="$$report"; \
+	  fi; \
+	  dashes=`echo "$$dashes" | sed s/./=/g`; \
+	  echo "$$dashes"; \
+	  echo "$$banner"; \
+	  test -n "$$skipped" && echo "$$skipped"; \
+	  test -n "$$report" && echo "$$report"; \
+	  echo "$$dashes"; \
+	  test "$$failed" -eq 0; \
+	else :; fi
+DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
 
-#CFORSUPOBJS = forsupf.o
+top_distdir = ../..
+distdir = $(top_distdir)/$(PACKAGE)-$(VERSION)
 
-TESTF = fortest.o
+distdir: $(DISTFILES)
+	@srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \
+	topsrcdirstrip=`echo "$(top_srcdir)" | sed 's|.|.|g'`; \
+	list='$(DISTFILES)'; for file in $$list; do \
+	  case $$file in \
+	    $(srcdir)/*) file=`echo "$$file" | sed "s|^$$srcdirstrip/||"`;; \
+	    $(top_srcdir)/*) file=`echo "$$file" | sed "s|^$$topsrcdirstrip/|$(top_builddir)/|"`;; \
+	  esac; \
+	  if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
+	  dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \
+	  if test "$$dir" != "$$file" && test "$$dir" != "."; then \
+	    dir="/$$dir"; \
+	    $(mkinstalldirs) "$(distdir)$$dir"; \
+	  else \
+	    dir=''; \
+	  fi; \
+	  if test -d $$d/$$file; then \
+	    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
+	$(MAKE) $(AM_MAKEFLAGS) $(check_PROGRAMS)
+	$(MAKE) $(AM_MAKEFLAGS) check-TESTS
+check: check-am
+all-am: Makefile
 
-# directory used by extelt test.
-TESTDIR = testdir
+installdirs:
+install: install-am
+install-exec: install-exec-am
+install-data: install-data-am
+uninstall: uninstall-am
 
-all::		FORCE
-	@case "$(FC)" in \
-	NONE*|none*) \
-	    $(MAKE) $(MFLAGS) $(HDF_FLAGS) nofortran ;; \
-	*) \
-	    $(MAKE) $(MFLAGS) $(HDF_FLAGS) rall ; \
-	esac
+install-am: all-am
+	@$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
 
-rall::         FORCE
-	@if test -z "$(FMPOOL_FLAGS)"; then \
-	  $(MAKE) $(MFLAGS) $(HDF_FLAGS) testhdf $(FTESTS) gentest; \
-	else		 \
-	  $(MAKE) $(MFLAGS) $(HDF_FLAGS) FMPOOL_FLAGS="$(FMPOOL_FLAGS) -I$(FMPOOL_INC)" testhdf $(FTESTS) gentest; \
-	fi
+installcheck: installcheck-am
+install-strip:
+	$(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
+	  INSTALL_STRIP_FLAG=-s \
+	  `test -z '$(STRIP)' || \
+	    echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
+mostlyclean-generic:
 
-nofortran::         FORCE
-	@if test -z "$(FMPOOL_FLAGS)"; then \
-	  $(MAKE) $(MFLAGS) $(HDF_FLAGS) testhdf gentest; \
-	else		 \
-	  $(MAKE) $(MFLAGS) $(HDF_FLAGS) FMPOOL_FLAGS="$(FMPOOL_FLAGS) -I$(FMPOOL_INC)" testhdf gentest; \
-	fi
+clean-generic:
 
-rebuild:
-	@$(MAKE) all $(HDF_FLAGS) FRC=force_rebuild
+distclean-generic:
+	-rm -f $(CONFIG_CLEAN_FILES)
+	-test -z "$(DISTCLEANFILES)" || rm -f $(DISTCLEANFILES)
 
-rebuildnofortran:
-	@$(MAKE) nofortran $(MFLAGS) $(HDF_FLAGS) FRC=force_rebuild
+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
 
-# Leave this target blank with no actions, the rebuild macros above depend on it
-force_rebuild:
+clean-am: clean-checkPROGRAMS clean-generic mostlyclean-am
 
-debug: ptesthdf
+distclean: distclean-am
+	-rm -rf ./$(DEPDIR)
+	-rm -f Makefile
 
-$(HDFLIB)/libdf.a:
-#	cd $(HDFLIB); echo Making \`$(TARG)\' in `pwd`; \        
-#	$(MAKE) $(MFLAGS) $(HDF_FLAGS) $(TARG); 
+distclean-am: clean-am distclean-compile distclean-generic \
+	distclean-tags
 
-$(JPEGLIB)/libjpeg.a:
-#	cd $(JPEGLIB); echo Making \`$(TARG)\' in `pwd`; \        
-#	$(MAKE) $(MFLAGS) $(HDF_FLAGS) $(TARG); 
+dvi: dvi-am
 
-$(ZLIBLIB)/libz.a:
-#	cd $(JPEGLIB); echo Making \`$(TARG)\' in `pwd`; \        
-#	$(MAKE) $(MFLAGS) $(HDF_FLAGS) $(TARG); 
+dvi-am:
 
-#.c.o: 
-#	 $(CC) $(CFLAGS) -c -I$(HDFINC) $*.c 
-#
-.c.o: 
-	$(CC) $(ALL_CFLAGS) -c $*.c 
+info: info-am
 
-.f.o:
-	$(FC) $(FFLAGS) -c $*.f 
+info-am:
 
-$(COBJS) $(TESTF) $(FTESTS): $(FRC)
+install-data-am:
 
-$(FOBJS): fortest.inc
+install-exec-am:
 
-#$(FTESTS): $(FOBJS) $(CFORSUPOBJS) $(FFORSUPOBJS) $(HDFLIB)/libdf.a $(JPEGLIB)/libjpeg.a $(ZLIBLIB)/libz.a
-#	$(FC) $(FFLAGS) $@.o -o $@ $(CFORSUPOBJS) $(FFORSUPOBJS) $(HDFLIB)/libdf.a $(JPEGLIB)/libjpeg.a $(ZLIBLIB)/libz.a
+install-info: install-info-am
 
-#$(FTESTS): $(FRC)
+install-man:
 
-test-hdf::		FORCE
-	@case "$(FC)" in \
-	NONE*|none*) \
-	    $(MAKE) $(MFLAGS) $(HDF_FLAGS) test-hdfnofortran ;; \
-	*) \
-	    $(MAKE) $(MFLAGS) $(HDF_FLAGS) atest-hdf ; \
-	esac
+installcheck-am:
 
-atest-hdf: testhdf $(FTESTS)
-	-$(RM) $(RMFLAGS) *.hdf 
-	./testhdf
-	-$(RM) $(RMFLAGS) *.hdf 
-	./fortest
+maintainer-clean: maintainer-clean-am
+	-rm -rf ./$(DEPDIR)
+	-rm -f Makefile
 
-test-hdfnofortran: testhdf
-	-$(RM) $(RMFLAGS) *.hdf 
-	./testhdf
+maintainer-clean-am: distclean-am maintainer-clean-generic
 
-test-hdffortran: $(FTESTS) fortest.sav
-	-$(RM) $(RMFLAGS) *.hdf 
-	./fortest > fortest.out
-	@cmp fortest.out fortest.sav && echo "*** Fortran tests passed ***";
+mostlyclean: mostlyclean-am
 
-qtesthdf: $(COBJS) $(HDFLIB)/libdf.a
-	quantify $(CC) $(ALL_CFLAGS) -o qtesthdf $(COBJS) $(HDFSRC)/libdf.a $(JPEGLIB)/libjpeg.a $(ZLIBLIB)/libz.a -lm
+mostlyclean-am: mostlyclean-compile mostlyclean-generic
 
-ptesthdf: $(COBJS) $(HDFLIB)/libdf.a
-	purify $(CC) $(ALL_CFLAGS) -o ptesthdf $(COBJS) $(HDFSRC)/libdf.a $(JPEGLIB)/libjpeg.a $(ZLIBLIB)/libz.a -lm
+pdf: pdf-am
 
-testhdf.tc: $(COBJS) $(HDFLIB)/libdf.a
-	proof $(CC) $(ALL_CFLAGS) -o testhdf.tc $(COBJS) $(HDFLIB)/libdf.a $(JPEGLIB)/libjpeg.a $(ZLIBLIB)/libz.a -lm
+pdf-am:
 
-testhdf: $(COBJS) $(HDFLIB)/libdf.a
-	$(CC) $(ALL_CFLAGS) -o testhdf $(COBJS) $(HDFLIB)/libdf.a $(JPEGLIB)/libjpeg.a $(ZLIBLIB)/libz.a -lm
-	test -d $(TESTDIR) || mkdir $(TESTDIR)
+ps: ps-am
 
-fortestF: $(FOBJS) $(HDFLIB)/libdf.a
-	$(FC) $(FFLAGS) -o $@ $(FOBJS) $(HDFLIB)/libdf.a $(JPEGLIB)/libjpeg.a $(ZLIBLIB)/libz.a -lm
+ps-am:
 
-fortest: $(HDFLIB)/libdf.a fortest.c $(CHDRS)
-	$(CC) $(ALL_CFLAGS) -o fortest fortest.c $(HDFLIB)/libdf.a $(JPEGLIB)/libjpeg.a $(ZLIBLIB)/libz.a -lm
+uninstall-am: uninstall-info-am
 
-gentest: gentest.c $(HDFLIB)/libdf.a
-	$(CC) $(ALL_CFLAGS) gentest.c -o gentest $(HDFLIB)/libdf.a $(JPEGLIB)/libjpeg.a $(ZLIBLIB)/libz.a -lm
+.PHONY: CTAGS GTAGS all all-am check check-TESTS check-am clean \
+	clean-checkPROGRAMS clean-generic ctags distclean \
+	distclean-compile distclean-generic distclean-tags distdir dvi \
+	dvi-am info info-am install install-am install-data \
+	install-data-am install-exec install-exec-am install-info \
+	install-info-am install-man 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-info-am
 
-ftests: $(FTESTS)
 
-clean: 
-	-$(RM) $(RMFLAGS) $(COBJS) testhdf $(FOBJS) $(FTESTS) \
-	core *.hdf ptesthdf qtesthdf gentest *.o fortest.arg $(TESTDIR)/*
-
-distclean: 
-	-$(RM) $(RMFLAGS) $(COBJS) testhdf $(FOBJS) $(FTESTS) \
-	core *.hdf ptesthdf qtesthdf gentest *.o fortest.arg $(TESTDIR)/* \
-	config.status Makefile
-
-depend: 
-	makedepend -I$(HDFINC) *.c
-
-saber:	$(CSRCS)
-	 #load $(ALL_CFLAGS) $(CSRCS) 
-
-# for distribution creation
-distdir = $(TOP_SRCDIR)/$(PACKAGE)-$(VERSION)/$(curdir)
-curdir = hdf/test
-dist: $(DISTFILES)
-	@for file in $(DISTFILES); do \
-	  ln $(srcdir)/$$file $(distdir)/$$file 2> /dev/null \
-	    || { echo copying $$file instead; \
-	    cp -p $(srcdir)/$$file $(distdir)/$$file;}; \
-	done
-
-# The following dummy target is useful as a dependency to ensure that a
-# rule is always executed.
-#
-FORCE:
-
-help:
-	@echo ""
-	@echo "Make supports the following targets in the 'tests' directory"
-	@echo "make help    - prints this usage section"
-	@echo "make all     - (DEFAULT) makes tests"
-	@echo "make nofortran - makes HDF tests excluding fortran tests"
-	@echo "make testhdf   - makes HDF C test program "
-	@echo "make fortest   - makes HDF Fortran test program "
-	@echo "make test-hdf          - run HDF tests " 
-	@echo "make test-hdfnofortran - run HDF tests except the fortran test " 
-	@echo "make test-hdffortran   - run HDF fortran tests only " 
-	@echo "make clean     - cleans up tests (both C and Fortran)"
-	@echo "make distclean - cleans up HDF tests including"
-	@echo "                 configuration(Makefiles,config.status,..)"
-	@echo ""
-
-# DO NOT DELETE THIS LINE -- make depend depends on it.
+testdir:
+	-mkdir testdir
+# 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:

Modified: packages/libhdf4/branches/upstream/current/hdf/test/an.c
===================================================================
--- packages/libhdf4/branches/upstream/current/hdf/test/an.c	2007-05-15 09:05:29 UTC (rev 830)
+++ packages/libhdf4/branches/upstream/current/hdf/test/an.c	2007-05-15 09:53:05 UTC (rev 831)
@@ -11,10 +11,10 @@
  ****************************************************************************/
 
 #ifdef RCSID
-static char RcsId[] = "@(#)$Revision: 1.17 $";
+static char RcsId[] = "@(#)$Revision: 1.18 $";
 #endif
 
-/* $Id: an.c,v 1.17 1996/11/11 20:39:45 koziol Exp $ */
+/* $Id: an.c,v 1.18 2005/01/16 21:44:10 mcgrath Exp $ */
 
 /***********************************************************
 *
@@ -35,7 +35,7 @@
 #define MAXLEN_DESC  1000
 #define ROWS           10
 #define COLS           10
-#define REPS            2   /* number of data sets to write to file */
+#define REPS            32/*2*/   /* number of data sets to write to file */
 
 static VOID gen2Dfloat
             (int height, int width, float *data);
@@ -237,3 +237,97 @@
           HDfree((VOIDP) indesc);
       }
 }
+
+
+void
+test_an_2(void)
+{
+    char        labsds[MAXLEN_LAB], labris[MAXLEN_LAB], descsds[MAXLEN_DESC],
+                descris[MAXLEN_DESC];
+    uint8       pal[768];
+    uint8      *image, *newimage;
+    uint16      refnum;
+    int32       ret;
+    intn        rank;
+    int         j;
+    int32       dimsizes[2];
+    float      *data;
+
+/* set up object labels and descriptions */
+
+    HDstrcpy(labsds, "Object label #1: sds");
+    HDstrcpy(labris, "Object label #2: image");
+    HDstrcpy(descsds, "Object Descr #1: 1  2  3  4  5  6  7  8  9 10 11 12 \n");
+    HDstrcat(descsds, "             13 14 15 16 17 18 19 20 **END SDS DESCR**\n");
+    HDstrcpy(descris, "Object Descr #2: A B C D E F G H I J K L \n");
+    HDstrcat(descris, "                M N O **END IMAGE DESCR **\n");
+
+/***** generate float array and image *****/
+
+    data = (float *) HDmalloc(ROWS * COLS * sizeof(float));
+    image = (uint8 *) HDmalloc(ROWS * COLS * sizeof(char));
+    newimage = (uint8 *) HDmalloc(ROWS * COLS * sizeof(char));
+
+    dimsizes[0] = ROWS;
+    dimsizes[1] = COLS;
+
+    gen2Dfloat(ROWS, COLS, data);
+    genimage(ROWS, COLS, data, image);
+
+    ret = DFSDsetdims(2, dimsizes);
+    RESULT("DFSDsetdims");
+
+/********  Write labels and descriptions *********/
+    MESSAGE(5, printf("***  Writing labels and descriptions with SDS and RIS ***\n");
+        );
+    for (j = 0; j < REPS; j++)
+      {
+
+          /* write out scientific data set */
+          ret = DFSDadddata(TESTFILE, 2, dimsizes, (VOIDP) data);
+          RESULT("DFSDadddata");
+
+          if ((j % 3) != 0)
+            {   /* write out annotations for 2 out of every 3 */
+                refnum = DFSDlastref();
+                ret = DFANputlabel(TESTFILE, DFTAG_SDG, refnum, labsds);
+                RESULT("DFANputlabel");
+                ret = DFANputdesc(TESTFILE, DFTAG_SDG, refnum,
+                                  descsds, (int32)HDstrlen(descsds));
+                RESULT("DFANputdesc");
+            }
+
+          ret = DFR8addimage(TESTFILE, (VOIDP) image, COLS, ROWS, 0);
+          RESULT("DFR8addimage");
+          refnum = DFR8lastref();
+          ret = DFANputlabel(TESTFILE, DFTAG_RIG, refnum, labris);
+          RESULT("DFANputlabel");
+          ret = DFANputdesc(TESTFILE, DFTAG_RIG, refnum, descris, (int32)HDstrlen(descris));
+          RESULT("DFANputdesc");
+      }
+
+/********  Read labels and descriptions *********/
+
+    MESSAGE(5, printf("*** Reading labels and descriptions for SDS and RIS ***\n");
+        );
+
+    for (j = 0; j < REPS; j++)
+      {
+
+          ret = DFSDgetdims(TESTFILE, &rank, dimsizes, 3);
+          RESULT("DFSDgetdims");
+          refnum = DFSDlastref();
+
+          if ((j % 3) != 0)     /* read in annotations for 2 out of every 3 */
+              check_lab_desc(DFTAG_SDG, refnum, labsds, descsds);
+
+          ret = DFR8getimage(TESTFILE, newimage, (int32) COLS, (int32) ROWS, pal);
+          RESULT("DFR8getimage");
+          refnum = DFR8lastref();
+          check_lab_desc(DFTAG_RIG, refnum, labris, descris);
+      }
+
+    HDfree((VOIDP) data);
+    HDfree((VOIDP) image);
+    HDfree((VOIDP) newimage);
+}

Modified: packages/libhdf4/branches/upstream/current/hdf/test/bitio.c
===================================================================
--- packages/libhdf4/branches/upstream/current/hdf/test/bitio.c	2007-05-15 09:05:29 UTC (rev 830)
+++ packages/libhdf4/branches/upstream/current/hdf/test/bitio.c	2007-05-15 09:53:05 UTC (rev 831)
@@ -30,10 +30,10 @@
    10/19/93 - Started coding.
  */
 
-/* $Id: bitio.c,v 1.21 1999/02/19 23:28:57 koziol Exp $ */
+/* $Id: bitio.c,v 1.22 2003/12/10 21:13:32 epourmal Exp $ */
 
 #ifdef RCSID
-static char RcsId[] = "@(#)$Revision: 1.21 $";
+static char RcsId[] = "@(#)$Revision: 1.22 $";
 #endif
 
 #include "tproto.h"
@@ -158,13 +158,22 @@
     uint32      tempbuf;
     intn        i;
     uint8      *test_ptr;
+    char        datafile[512] = "";
+    char       *srcdir = getenv("srcdir");
 
     SEED((uintn) time(NULL));
 
     MESSAGE(6, printf("Testing bitio read routines\n");
         );
 
-    fid = Hopen(DATAFILE_NAME, DFACC_READ, 0);
+    /* Generate the correct name for the test file, by prepending the source path */
+    if (srcdir && ((strlen(srcdir) + strlen(DATAFILE_NAME) + 1) < sizeof(datafile))) {
+        strcpy(datafile, srcdir);
+        strcat(datafile, "/");
+    }
+    strcat(datafile, DATAFILE_NAME);
+
+    fid = Hopen(datafile, DFACC_READ, 0);
     CHECK(fid, FAIL, "Hopen");
 
     ret = Hgetelement(fid, DATA_TAG_1, DATA_REF_1, inbuf);
@@ -175,7 +184,7 @@
 
     MESSAGE(8, printf("Reading 8 bits at a time\n");
         );
-    fid = Hopen(DATAFILE_NAME, DFACC_READ, 0);
+    fid = Hopen(datafile, DFACC_READ, 0);
     CHECK(fid, FAIL, "Hopen");
 
     bitid1 = Hstartbitread(fid, DATA_TAG_1, DATA_REF_1);

Modified: packages/libhdf4/branches/upstream/current/hdf/test/extelt.c
===================================================================
--- packages/libhdf4/branches/upstream/current/hdf/test/extelt.c	2007-05-15 09:05:29 UTC (rev 830)
+++ packages/libhdf4/branches/upstream/current/hdf/test/extelt.c	2007-05-15 09:53:05 UTC (rev 831)
@@ -11,10 +11,10 @@
  ****************************************************************************/
 
 #ifdef RCSID
-static char RcsId[] = "@(#)$Revision: 1.24 $";
+static char RcsId[] = "@(#)$Revision: 1.25 $";
 #endif
 
-/* $Id: extelt.c,v 1.24 1998/12/08 21:37:50 koziol Exp $ */
+/* $Id: extelt.c,v 1.25 2003/12/10 21:13:32 epourmal Exp $ */
 
 /*
  * These is a first pass at rewriting how these tests for exteranl 

Modified: packages/libhdf4/branches/upstream/current/hdf/test/forsupf.c
===================================================================
--- packages/libhdf4/branches/upstream/current/hdf/test/forsupf.c	2007-05-15 09:05:29 UTC (rev 830)
+++ packages/libhdf4/branches/upstream/current/hdf/test/forsupf.c	2007-05-15 09:53:05 UTC (rev 831)
@@ -11,10 +11,10 @@
  ****************************************************************************/
 
 #ifdef RCSID
-static char RcsId[] = "$Revision: 1.3 $";
+static char RcsId[] = "$Revision: 1.4 $";
 #endif
 
-/* $Id: forsupf.c,v 1.3 1996/06/22 23:07:24 acheng Exp $ */
+/* $Id: forsupf.c,v 1.4 2003/12/10 21:13:32 epourmal Exp $ */
 
 #include "hdf.h"
 #include "fortest.h"
@@ -67,3 +67,41 @@
     return (ret);
 }   /* end nhisystem() */
 
+/*-----------------------------------------------------------------------------
+ * Name:    fixname
+ * Purpose: Fix name for srcdir build and test
+ * Inputs:  IN: name - original namea 
+ *          IN: name_len - name length
+ *          IN/OUT: name_out - buffer to hold modified name
+ *          IN/OUT: name_out_len - length of the buffer, and length of modified
+ *                  string. 
+ * Returns: 0 on success and -1 on failure  
+ * Users:   HDF Fortran programmers
+ *---------------------------------------------------------------------------*/
+
+FRETVAL(intf)
+nfixnamec(_fcd name, intf *name_len, _fcd name_out, intf *name_len_out)
+{
+    char       *c_name;
+    intf        ret;
+
+    char    testfile[1024] = "";
+    char   *srcdir = getenv("srcdir");
+
+    c_name = HDf2cstring(name, (intn) *name_len);
+    if (!c_name) return(FAIL);
+
+    /* Here comes Bill's code */
+    /* Generate the correct name for the test file, by prepending the source path */
+    if (srcdir && ((strlen(srcdir) + strlen(c_name) + 1) < sizeof(testfile))) {
+        strcpy(testfile, srcdir);
+        strcat(testfile, "/");
+    }
+    strcat(testfile, c_name);
+    *name_len_out = (intf) strlen(testfile);
+    HDpackFstring(testfile, _fcdtocp(name_out), *name_len_out);
+ 
+    ret = 0;
+    HDfree(c_name);
+    return (ret);
+}   /* end nfixname() */

Modified: packages/libhdf4/branches/upstream/current/hdf/test/forsupff.f
===================================================================
--- packages/libhdf4/branches/upstream/current/hdf/test/forsupff.f	2007-05-15 09:05:29 UTC (rev 830)
+++ packages/libhdf4/branches/upstream/current/hdf/test/forsupff.f	2007-05-15 09:53:05 UTC (rev 831)
@@ -10,7 +10,7 @@
 C*                                                                          *
 C****************************************************************************
 C
-C $Id: forsupff.f,v 1.11 1997/10/24 17:27:55 acheng Exp $
+C $Id: forsupff.f,v 1.12 2003/12/10 21:13:32 epourmal Exp $
 C
 C------------------------------------------------------------------------------
 C File:     forsupff.f
@@ -311,3 +311,21 @@
       retcode = hisystem(cmd, len(cmd))
       return
       end
+
+
+CCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCC
+C
+C     SUBROUTINE fixname(name, name_out, name_out_len)
+C     Takes care of srcdir build
+C
+CCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCC
+      subroutine fixname(name, name_out, name_out_len)
+      implicit none
+
+      character*(*)  name
+      character*(*)  name_out
+      integer retcode, fixnamec, name_out_len
+
+      retcode = fixnamec(name, len(name), name_out, name_out_len)
+      return
+      end

Modified: packages/libhdf4/branches/upstream/current/hdf/test/fort_ps/forsupffp.f
===================================================================
--- packages/libhdf4/branches/upstream/current/hdf/test/fort_ps/forsupffp.f	2007-05-15 09:05:29 UTC (rev 830)
+++ packages/libhdf4/branches/upstream/current/hdf/test/fort_ps/forsupffp.f	2007-05-15 09:53:05 UTC (rev 831)
@@ -1,357 +1,383 @@
-C****************************************************************************
-C* NCSA HDF                                                                 *
-C* Software Development Group                                               *
-C* National Center for Supercomputing Applications                          *
-C* University of Illinois at Urbana-Champaign                               *
-C* 605 E. Springfield, Champaign IL 61820                                   *
-C*                                                                          *
-C* For conditions of distribution and use, see the accompanying             *
-C* hdf/COPYING file.                                                        *
-C*                                                                          *
-C****************************************************************************
-C
-C $Id: forsupffp.f,v 1.2 1998/06/12 21:54:12 epourmal Exp $
-C
-C------------------------------------------------------------------------------
-C File:     forsupffp.f
-C Purpose:  Fortran support routines for Fortran test routines
-C Invokes:  Nothing currently...
-C Contents: 
-C Remarks: none
-C------------------------------------------------------------------------------
-
-
-C------------------------------------------------------------------------------
-C Name: RESULT
-C Purpose:  Report on success of HDF routines
-C Inputs:   
-C       errval: value to check for error
-C       routine: name of routine tested
-C       num_failed: running sum of the number of failures
-C Returns: none
-C Users:    HDF Fortran programmers
-C Invokes: none
-C------------------------------------------------------------------------------
-      subroutine RESULT(errval, routine, num_failed)
-      implicit none
-C For VMS uncomment next line and comment out the line after next
-C     include '[-.src]hdf.inc'
-      include '../src/hdf.inc'
-      include 'fortest.inc'
-
-      integer errval
-      character*(*)  routine
-      integer num_failed
-
-      if (errval .eq. FAIL) then
-          num_failed = num_failed + 1
-          print *, '    >>> ', routine, ' FAILED: ret = ',
-     *           errval, '    <<<'
-      else 
-          print *, routine, ' SUCCESSFUL'
-      endif
-
-      return
-      end
-
-C------------------------------------------------------------------------------
-C Name: VERIFY
-C Purpose:  Report on success of HDF routines, using verbosity
-C Inputs:   
-C       errval: value to check for error
-C       routine: name of routine tested
-C       num_failed: running sum of the number of failures
-C Returns: none
-C Users:    HDF Fortran programmers
-C Invokes: none
-C------------------------------------------------------------------------------
-      subroutine VERIFY(errval, routine, num_failed)
-      implicit none
-C For VMS uncomment next line and comment out the line after next
-C     include '[-.src]hdf.inc'
-      include '../src/hdf.inc'
-      include 'fortest.inc'
-
-      integer errval
-      character*(*)  routine
-      integer num_failed
-
-      if (errval .eq. FAIL) then
-          num_failed = num_failed + 1
-          print *, '    >>> ', routine, ' FAILED: ret = ',
-     *           errval, '    <<<'
-      else 
-          if (verbosity .ge. VERBO_HI) then
-              print *, routine, ' SUCCESSFUL'
-          endif
-      endif
-
-      return
-      end
-
-C------------------------------------------------------------------------------
-C Name: VRFY
-C Purpose:  Report on success of HDF routines, using verbosity
-C Inputs:   
-C       errval: value to check for error
-C       routine: name of routine tested
-C       num_failed: running sum of the number of failures
-C Returns: none
-C Users:    HDF Fortran programmers
-C Invokes: none
-C-----------------------------------------------------------------------------
-      subroutine VRFY(errval, routine, num_failed)
-      implicit none
-C For VMS uncomment next line and comment out the line after next
-C     include '[-.src]hdf.inc'
-      include '../src/hdf.inc'
-      include 'fortest.inc'
-
-      integer errval
-      character*(*)  routine
-      integer num_failed
-
-      if (errval .eq. FAIL) then
-          num_failed = num_failed + 1
-          print *, '    >>> ', routine, ' FAILED: ret = ',
-     *           errval, '    <<<'
-      else 
-          if (verbosity .ge. VERBO_HI) then
-              print *, routine, ' SUCCESSFUL'
-          endif
-      endif
-
-      return
-      end
-
-C------------------------------------------------------------------------------
-C Name: MESSAGE
-C Purpose:  Print something, depending on the verbosity level
-C Inputs:   
-C       priority: priority of message (lower values have higher priority)
-C       out_str: string to output
-C Returns: none
-C Users:    HDF Fortran programmers
-C Invokes: none
-C------------------------------------------------------------------------------
-      subroutine MESSAGE(priority, out_str)
-      implicit none
-      include 'fortest.inc'
-
-      integer priority
-      character*(*)  out_str
-
-      if (priority .le. Verbosity) then
-          print *, out_str
-      endif
-
-      return
-      end
-
-
-C***************************************************************
-C
-C  gen2Dfloat:  generate 2-D data array 
-C
-C***************************************************************
-      subroutine gen2Dfloat(height, width, data)
-      implicit none
-      include 'fortest.inc'
-
-      integer   height, width
-      real data(height,width)
-
-      integer i, j
-
-C     store one value per row, increasing by one for each row 
-      do 110 i=1, height
-          do 100 j=1, width
-             data(i, j) = float(i)
-  100     continue
-  110 continue
-      return
-      end
-
-
-C***************************************************************
-C
-C  genimage:  generate image from 2-D float array
-C
-C***************************************************************
-      subroutine genimage(height, width, data, image)
-      implicit none
-      include 'fortest.inc'
-
-      integer   height, width
-      real      data(height, width)
-      character image(height, width)
-
-      integer i, j
-      real   max, min, multiplier
-
-      max = data(1,1)
-      min = data(1,1)
-      do 110 i=1, height
-          do 100 j=1, width
-             if (max .gt. data(i,j)) max = data(i,j)
-             if (min .lt. data(i,j)) min = data(i,j)
-  100     continue
-  110 continue
-
-C     store one value per row, increasing by one for each row 
-      multiplier = 255.0 /(max-min)
-      do 210 i=1, height
-          do 200 j=1, width
-             image(i,j) = char( int((data(i,j)-min) * multiplier) )
-  200     continue
-  210 continue
-      return 
-      end
-
-
-CCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCC
-C
-C     SUBROUTINE errchkio
-C
-CCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCC
-      subroutine errchkio(err1, err2, err3, num_err, msg)
-      implicit none
-C For VMS uncomment next line and comment out the line after next
-C     include '[-.src]hdf.inc'
-      include '../src/hdf.inc'
-      include 'fortest.inc'
-
-      integer err1, err2, err3, num_err
-      character*(*)  msg
-
-      if (err1.eq.FAIL .or. err2.eq.FAIL .or. err3.eq.FAIL) then
-          num_err = num_err + 1
-          print *
-          print *,'>>> Test failed for ',msg, ' <<<'
-          print *, '  err1=',err1, '   err2=',err2, '   err3=',err3
-      else
-          if (verbosity .ge. VERBO_HI) then
-	      print *,'Test passed for ', msg
-	  endif
-      endif
-
-      return
-      end
-
-      
-CCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCC
-C
-C     SUBROUTINE errchkarr
-C
-CCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCC
-      subroutine errchkarr(err1, err2, err3, num_err, type)
-      implicit none
-      include 'fortest.inc'
-
-      integer err1, err2, err3, num_err
-      character*(*)  type
-      
-      if (err1 .eq. 1) then
-        print *, '>>> Test failed for ', type, ' array' 
-        num_err = num_err + 1
-      else
-          if (verbosity .ge. VERBO_HI) then
-	    print *, 'Test passed for ', type, ' array'
-	  endif
-      endif
-
-      if (err2 .eq. 1) then
-        print *, '>>> Test failed for ',type, ' scales.'
-        num_err = num_err + 1
-      else
-          if (verbosity .ge. VERBO_HI) then
-	    print *, 'Test passed for ', type, ' scales.'
-	  endif
-      endif
-
-      if (err3 .eq. 1) then
-        print *, '>>> Test failed for ', type, ' max/min.'
-        num_err = num_err + 1
-      else
-          if (verbosity .ge. VERBO_HI) then
-	    print *, 'Test passed for ', type, ' max/min.'
-	  endif
-      endif
-
-      return
-      end
-
-       
-CCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCC
-C
-C     SUBROUTINE err_check
-C
-CCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCC
-      subroutine err_check(err, num_err, type)
-      implicit none
-      include 'fortest.inc'
-
-      integer err, num_err
-      character*(*) type
-
-      if (err .eq. 1) then 
-  	print *,'>>> Test failed for ',type, ' array.'
-        num_err = num_err+1
-      else
-          if (verbosity .ge. VERBO_HI) then
-	    print *,'Test passed for ', type, ' array.'
-	  endif
-      endif
-
-      return
-      end
-
-
-CCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCC
-C
-C     SUBROUTINE ptestban
-C     Print the Test banner
-C
-CCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCC
-      subroutine ptestban(action, name)
-      implicit none
-      include 'fortest.inc'
-
-      character*(*) action, name
-
-      if (Verbosity .ge. VERBO_DEF) then
-	call MESSAGE(VERBO_LO,
-     +     '=====================================')
-	print *, action, ' -- ', name
-	call MESSAGE(VERBO_LO,
-     +     '=====================================')
-      endif
-
-      return
-      end
-
-
-CCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCC
-C
-C     SUBROUTINE hsystem(cmd)
-C     Print the Test banner
-C
-CCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCC
-      subroutine hsystem(cmd)
-      implicit none
-
-      character*(*) cmd
-      integer retcode
-C		integer hisystem
-      INTERFACE 
-	   INTEGER FUNCTION hisystem(cmd, cmdlen)
-	     !MS$ATTRIBUTES C, reference,alias:'_HISYSTEM' :: hisystem
-	     !DEC$ ATTRIBUTES reference :: cmd
-	     character*(*) cmd
-	     integer cmdlen
-	   END FUNCTION hisystem
-	END INTERFACE
-
-      retcode = hisystem(cmd, len(cmd))
-      return
-      end
+C****************************************************************************
+C* NCSA HDF                                                                 *
+C* Software Development Group                                               *
+C* National Center for Supercomputing Applications                          *
+C* University of Illinois at Urbana-Champaign                               *
+C* 605 E. Springfield, Champaign IL 61820                                   *
+C*                                                                          *
+C* For conditions of distribution and use, see the accompanying             *
+C* hdf/COPYING file.                                                        *
+C*                                                                          *
+C****************************************************************************
+C
+C $Id: forsupffp.f,v 1.3 2003/12/10 21:13:39 epourmal Exp $
+C
+C------------------------------------------------------------------------------
+C File:     forsupffp.f
+C Purpose:  Fortran support routines for Fortran test routines
+C Invokes:  Nothing currently...
+C Contents: 
+C Remarks: none
+C------------------------------------------------------------------------------
+
+
+C------------------------------------------------------------------------------
+C Name: RESULT
+C Purpose:  Report on success of HDF routines
+C Inputs:   
+C       errval: value to check for error
+C       routine: name of routine tested
+C       num_failed: running sum of the number of failures
+C Returns: none
+C Users:    HDF Fortran programmers
+C Invokes: none
+C------------------------------------------------------------------------------
+      subroutine RESULT(errval, routine, num_failed)
+      implicit none
+C For VMS uncomment next line and comment out the line after next
+C     include '[-.src]hdf.inc'
+      include '../src/hdf.inc'
+      include 'fortest.inc'
+
+      integer errval
+      character*(*)  routine
+      integer num_failed
+
+      if (errval .eq. FAIL) then
+          num_failed = num_failed + 1
+          print *, '    >>> ', routine, ' FAILED: ret = ',
+     *           errval, '    <<<'
+      else 
+          print *, routine, ' SUCCESSFUL'
+      endif
+
+      return
+      end
+
+C------------------------------------------------------------------------------
+C Name: VERIFY
+C Purpose:  Report on success of HDF routines, using verbosity
+C Inputs:   
+C       errval: value to check for error
+C       routine: name of routine tested
+C       num_failed: running sum of the number of failures
+C Returns: none
+C Users:    HDF Fortran programmers
+C Invokes: none
+C------------------------------------------------------------------------------
+      subroutine VERIFY(errval, routine, num_failed)
+      implicit none
+C For VMS uncomment next line and comment out the line after next
+C     include '[-.src]hdf.inc'
+      include '../src/hdf.inc'
+      include 'fortest.inc'
+
+      integer errval
+      character*(*)  routine
+      integer num_failed
+
+      if (errval .eq. FAIL) then
+          num_failed = num_failed + 1
+          print *, '    >>> ', routine, ' FAILED: ret = ',
+     *           errval, '    <<<'
+      else 
+          if (verbosity .ge. VERBO_HI) then
+              print *, routine, ' SUCCESSFUL'
+          endif
+      endif
+
+      return
+      end
+
+C------------------------------------------------------------------------------
+C Name: VRFY
+C Purpose:  Report on success of HDF routines, using verbosity
+C Inputs:   
+C       errval: value to check for error
+C       routine: name of routine tested
+C       num_failed: running sum of the number of failures
+C Returns: none
+C Users:    HDF Fortran programmers
+C Invokes: none
+C-----------------------------------------------------------------------------
+      subroutine VRFY(errval, routine, num_failed)
+      implicit none
+C For VMS uncomment next line and comment out the line after next
+C     include '[-.src]hdf.inc'
+      include '../src/hdf.inc'
+      include 'fortest.inc'
+
+      integer errval
+      character*(*)  routine
+      integer num_failed
+
+      if (errval .eq. FAIL) then
+          num_failed = num_failed + 1
+          print *, '    >>> ', routine, ' FAILED: ret = ',
+     *           errval, '    <<<'
+      else 
+          if (verbosity .ge. VERBO_HI) then
+              print *, routine, ' SUCCESSFUL'
+          endif
+      endif
+
+      return
+      end
+
+C------------------------------------------------------------------------------
+C Name: MESSAGE
+C Purpose:  Print something, depending on the verbosity level
+C Inputs:   
+C       priority: priority of message (lower values have higher priority)
+C       out_str: string to output
+C Returns: none
+C Users:    HDF Fortran programmers
+C Invokes: none
+C------------------------------------------------------------------------------
+      subroutine MESSAGE(priority, out_str)
+      implicit none
+      include 'fortest.inc'
+
+      integer priority
+      character*(*)  out_str
+
+      if (priority .le. Verbosity) then
+          print *, out_str
+      endif
+
+      return
+      end
+
+
+C***************************************************************
+C
+C  gen2Dfloat:  generate 2-D data array 
+C
+C***************************************************************
+      subroutine gen2Dfloat(height, width, data)
+      implicit none
+      include 'fortest.inc'
+
+      integer   height, width
+      real data(height,width)
+
+      integer i, j
+
+C     store one value per row, increasing by one for each row 
+      do 110 i=1, height
+          do 100 j=1, width
+             data(i, j) = float(i)
+  100     continue
+  110 continue
+      return
+      end
+
+
+C***************************************************************
+C
+C  genimage:  generate image from 2-D float array
+C
+C***************************************************************
+      subroutine genimage(height, width, data, image)
+      implicit none
+      include 'fortest.inc'
+
+      integer   height, width
+      real      data(height, width)
+      character image(height, width)
+
+      integer i, j
+      real   max, min, multiplier
+
+      max = data(1,1)
+      min = data(1,1)
+      do 110 i=1, height
+          do 100 j=1, width
+             if (max .gt. data(i,j)) max = data(i,j)
+             if (min .lt. data(i,j)) min = data(i,j)
+  100     continue
+  110 continue
+
+C     store one value per row, increasing by one for each row 
+      multiplier = 255.0 /(max-min)
+      do 210 i=1, height
+          do 200 j=1, width
+             image(i,j) = char( int((data(i,j)-min) * multiplier) )
+  200     continue
+  210 continue
+      return 
+      end
+
+
+CCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCC
+C
+C     SUBROUTINE errchkio
+C
+CCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCC
+      subroutine errchkio(err1, err2, err3, num_err, msg)
+      implicit none
+C For VMS uncomment next line and comment out the line after next
+C     include '[-.src]hdf.inc'
+      include '../src/hdf.inc'
+      include 'fortest.inc'
+
+      integer err1, err2, err3, num_err
+      character*(*)  msg
+
+      if (err1.eq.FAIL .or. err2.eq.FAIL .or. err3.eq.FAIL) then
+          num_err = num_err + 1
+          print *
+          print *,'>>> Test failed for ',msg, ' <<<'
+          print *, '  err1=',err1, '   err2=',err2, '   err3=',err3
+      else
+          if (verbosity .ge. VERBO_HI) then
+	      print *,'Test passed for ', msg
+	  endif
+      endif
+
+      return
+      end
+
+      
+CCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCC
+C
+C     SUBROUTINE errchkarr
+C
+CCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCC
+      subroutine errchkarr(err1, err2, err3, num_err, type)
+      implicit none
+      include 'fortest.inc'
+
+      integer err1, err2, err3, num_err
+      character*(*)  type
+      
+      if (err1 .eq. 1) then
+        print *, '>>> Test failed for ', type, ' array' 
+        num_err = num_err + 1
+      else
+          if (verbosity .ge. VERBO_HI) then
+	    print *, 'Test passed for ', type, ' array'
+	  endif
+      endif
+
+      if (err2 .eq. 1) then
+        print *, '>>> Test failed for ',type, ' scales.'
+        num_err = num_err + 1
+      else
+          if (verbosity .ge. VERBO_HI) then
+	    print *, 'Test passed for ', type, ' scales.'
+	  endif
+      endif
+
+      if (err3 .eq. 1) then
+        print *, '>>> Test failed for ', type, ' max/min.'
+        num_err = num_err + 1
+      else
+          if (verbosity .ge. VERBO_HI) then
+	    print *, 'Test passed for ', type, ' max/min.'
+	  endif
+      endif
+
+      return
+      end
+
+       
+CCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCC
+C
+C     SUBROUTINE err_check
+C
+CCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCC
+      subroutine err_check(err, num_err, type)
+      implicit none
+      include 'fortest.inc'
+
+      integer err, num_err
+      character*(*) type
+
+      if (err .eq. 1) then 
+  	print *,'>>> Test failed for ',type, ' array.'
+        num_err = num_err+1
+      else
+          if (verbosity .ge. VERBO_HI) then
+	    print *,'Test passed for ', type, ' array.'
+	  endif
+      endif
+
+      return
+      end
+
+
+CCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCC
+C
+C     SUBROUTINE ptestban
+C     Print the Test banner
+C
+CCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCC
+      subroutine ptestban(action, name)
+      implicit none
+      include 'fortest.inc'
+
+      character*(*) action, name
+
+      if (Verbosity .ge. VERBO_DEF) then
+	call MESSAGE(VERBO_LO,
+     +     '=====================================')
+	print *, action, ' -- ', name
+	call MESSAGE(VERBO_LO,
+     +     '=====================================')
+      endif
+
+      return
+      end
+
+
+CCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCC
+C
+C     SUBROUTINE hsystem(cmd)
+C     Print the Test banner
+C
+CCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCC
+      subroutine hsystem(cmd)
+      implicit none
+
+      character*(*) cmd
+      integer retcode
+C		integer hisystem
+      INTERFACE 
+	   INTEGER FUNCTION hisystem(cmd, cmdlen)
+	     !MS$ATTRIBUTES C, reference,alias:'_HISYSTEM' :: hisystem
+	     !DEC$ ATTRIBUTES reference :: cmd
+	     character*(*) cmd
+	     integer cmdlen
+	   END FUNCTION hisystem
+	END INTERFACE
+
+      retcode = hisystem(cmd, len(cmd))
+      return
+      end
+CCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCC
+C
+C     SUBROUTINE fixname(name, name_out, name_out_len)
+C     Takes care of srcdir build
+C
+CCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCCC
+      subroutine fixname(name, name_out, name_out_len)
+      implicit none
+
+      character*(*)  name
+      character*(*)  name_out
+      integer  retcode, name_out_len
+	!MS$if defined(BUILD_HDF_DLL)
+	!MS$attributes dllexport :: fixname
+	!MS$endif
+      INTERFACE
+      INTEGER FUNCTION fixnamec(name, len_name, name_out, name_out_len)
+           !MS$ATTRIBUTES C,reference,alias:'_FIXNAMEC' :: fixnamec
+	     !DEC$ ATTRIBUTES reference :: name, name_out
+           integer len_name, name_out_len
+	     character*(*) name, name_out
+         END FUNCTION fixnamec
+       END INTERFACE
+      retcode = fixnamec(name, len(name), name_out, name_out_len)
+      return
+      end

Modified: packages/libhdf4/branches/upstream/current/hdf/test/fort_ps/fortest.arg
===================================================================
--- packages/libhdf4/branches/upstream/current/hdf/test/fort_ps/fortest.arg	2007-05-15 09:05:29 UTC (rev 830)
+++ packages/libhdf4/branches/upstream/current/hdf/test/fort_ps/fortest.arg	2007-05-15 09:53:05 UTC (rev 831)
@@ -1,5 +1,7 @@
 Cleanup del *.hdf
 Test manf
 Test mgrf
+Test grcompress
 Test vsetf
+Test vsblock
 Test vattrf

Modified: packages/libhdf4/branches/upstream/current/hdf/test/fort_ps/fortestFp.f
===================================================================
--- packages/libhdf4/branches/upstream/current/hdf/test/fort_ps/fortestFp.f	2007-05-15 09:05:29 UTC (rev 830)
+++ packages/libhdf4/branches/upstream/current/hdf/test/fort_ps/fortestFp.f	2007-05-15 09:53:05 UTC (rev 831)
@@ -1,4 +1,4 @@
-C $Id: fortestFp.f,v 1.1 1997/05/22 23:25:22 sxu Exp $
+C $Id: fortestFp.f,v 1.2 2001/09/26 19:58:31 epourmal Exp $
 C Interface to invoke tests for HDF Fortran interfaces.
 
 	Program main
@@ -209,6 +209,11 @@
 	    call mgrf(retcode)
 	    return
 	endif
+	
+	if (param .EQ. 'grcompress')  then
+            call test_grcompress(retcode)
+            return
+        endif  
 
 C	if (param .EQ. 'p') then
 C	    call tpf(retcode)
@@ -250,6 +255,11 @@
 	    return
 	endif
 
+	if (param .EQ. 'vsblock') then
+	    call tvsetblock(retcode)
+	    return
+	endif
+
 	if (param .EQ. 'vattrf') then
 	    call tvattrf(retcode)
 	    return

Modified: packages/libhdf4/branches/upstream/current/hdf/test/fort_ps/manpf.f
===================================================================
--- packages/libhdf4/branches/upstream/current/hdf/test/fort_ps/manpf.f	2007-05-15 09:05:29 UTC (rev 830)
+++ packages/libhdf4/branches/upstream/current/hdf/test/fort_ps/manpf.f	2007-05-15 09:53:05 UTC (rev 831)
@@ -10,7 +10,7 @@
 C*                                                                          *
 C****************************************************************************
 C
-C $Id: manpf.f,v 1.2 1999/04/02 18:34:33 ptlu Exp $
+C $Id: manpf.f,v 1.6 2001/10/02 21:31:33 epourmal Exp $
 C
       subroutine manf (number_failed)
 C
@@ -37,6 +37,12 @@
 
 C      integer dssdims, dsadata, dslref, dsgdims
 C      integer d8aimg, DFR8lastref, d8gimg
+C
+      integer hishdf, hestringf, heprntf
+      character*80 error_message
+      integer fileh
+      character*15 ERR_FILE
+      parameter (ERR_FILE = 'Fortran_err.dat')
 
       integer numberfailed, ISFIRST, NOTFIRST, MAXLENLAB
       integer MAXLEN_DESC, ROWS, COLS, REPS
@@ -302,6 +308,36 @@
           print *,'***** ',numberfailed,' TESTS FAILED ***** '
       endif
 
+C ***** Test if the file fname is an HDF file
+C
+C
+      ret = hishdf(TESTFILE)
+      if (ret .ne. 1) then
+          numberfailed = numberfailed + 1
+          write(*,*) 'HISHDF function failed'
+      endif
+      ret = hestringf(0, error_message)
+       if (ret .ne. 0) then
+          numberfailed = numberfailed + 1
+          write(*,*) 'HESTRINGF function failed'
+      endif
+
+C
+C     Call hishdf with  file not being an hdf file. Call should return
+C     0 
+C
+      ret = hishdf('manf.f')
+      if (ret .ne. 0) then
+          numberfailed = numberfailed + 1
+          write(*,*) 'HISHDF function failed'
+      endif
+C
+C *****  end of hishdf test
+C
+      fileh = hopen('nonexist', DFACC_READ,0)
+      ret = heprntf(ERR_FILE, 0)
+      ret = hclose(fileh)
+      ret = heprntf(ERR_FILE, 0)
       return
       end
 
@@ -324,12 +360,11 @@
       parameter ( MAXLENLAB =    30,
      *            MAXLEN_DESC =  500 )
 
+
       integer  inlablen, indesclen, ret
 
       integer affileinfo, afnumann, afannlist, afannlen
       integer afreadann, afstart, afend, afendaccess, hopen, hclose
-      integer hishdf, hestring
-      character*80 error_message
 
       integer fileh, anh
       integer nflabs, nfdescs, nolabs, nodescs
@@ -346,32 +381,6 @@
       AN_FILE_LABEL = 2
       AN_FILE_DESC  = 3
 
-C ***** Test if the file fname is an HDF file
-C
-C
-      ret = hishdf(fname)
-      if (ret .ne. 1) then
-          num_failed = num_failed + 1
-          write(*,*) "HISHDF function failed"
-      endif
-      ret = hestring(0, error_message)
-       if (ret .ne. 0) then
-          num_failed = num_failed + 1
-          write(*,*) "HESTRING function failed"
-      endif
-
-C
-C     Call hishdf with  file not being an hdf file. Call should return
-C     0 
-C
-      ret = hishdf("manf.f")
-      if (ret .ne. 0) then
-          num_failed = num_failed + 1
-          write(*,*) "HISHDF function failed"
-      endif
-C
-C *****  end of hishdf test
-C
 C *****start annotation access on file *****
       fileh = hopen(fname, DFACC_READ,0)
       ret = fileh

Modified: packages/libhdf4/branches/upstream/current/hdf/test/fortest.c
===================================================================
--- packages/libhdf4/branches/upstream/current/hdf/test/fortest.c	2007-05-15 09:05:29 UTC (rev 830)
+++ packages/libhdf4/branches/upstream/current/hdf/test/fortest.c	2007-05-15 09:53:05 UTC (rev 831)
@@ -11,10 +11,10 @@
  ****************************************************************************/
 
 #ifdef RCSID
-static char RcsId[] = "@(#)$Revision: 1.36 $";
+static char RcsId[] = "@(#)$Revision: 1.39 $";
 #endif
 
-/* $Id: fortest.c,v 1.36 1998/03/04 21:36:03 acheng Exp $ */
+/* $Id: fortest.c,v 1.39 2003/12/10 21:13:33 epourmal Exp $ */
 
 #define TESTMASTER
 
@@ -89,8 +89,9 @@
     num_tests=InitTest("sdnt", "tsdntf", "");
     num_tests=InitTest("sdstr", "tsdstrf", "");
     num_tests=InitTest("vsetf", "tvsetf", "");
+    num_tests=InitTest("vsetblock", "tvsetblock", "");
     num_tests=InitTest("vattrf", "tvattrf", "");
-#ifdef DEC_ALPHA
+#if defined DEC_ALPHA || (defined SUN && defined _LP64) || defined __ia64  ||defined AIX5L64
     printf("   Skipping stubs\n");
 #else
     num_tests=InitTest("stubs", "tstubsf", "");

Modified: packages/libhdf4/branches/upstream/current/hdf/test/fortest.h
===================================================================
--- packages/libhdf4/branches/upstream/current/hdf/test/fortest.h	2007-05-15 09:05:29 UTC (rev 830)
+++ packages/libhdf4/branches/upstream/current/hdf/test/fortest.h	2007-05-15 09:53:05 UTC (rev 831)
@@ -10,7 +10,7 @@
  *                                                                          *
  ****************************************************************************/
 
-/* $Id: fortest.h,v 1.3 1997/05/22 23:36:55 sxu Exp $ */
+/* $Id: fortest.h,v 1.4 2003/12/10 21:13:33 epourmal Exp $ */
 
 #ifndef __FORTEST_H
 #define __FORTEST_H
@@ -22,15 +22,18 @@
 #ifdef DF_CAPFNAMES
 #  define ngetverb      FNAME(GETVERB)
 #  define nhisystem       FNAME(HISYSTEM)
+#  define nfixnamec        FNAME(FIXNAMEC) 
 #else  /* !DF_CAPFNAMES */
 #  define ngetverb      FNAME(getverb)
 #  define nhisystem       FNAME(hisystem)
+#  define nfixnamec        FNAME(fixnamec) 
 #endif /* DF_CAPFNAMES */
 
 /* FORTRAN support C-stubs for FORTRAN interface tests */
 
 extern FRETVAL(intf) ngetverb(void);
 extern FRETVAL(intf) nhisystem(_fcd cmd, intf *cmdlen);
+extern FRETVAL(intf) nfixname(_fcd name, intf *name_len, _fcd name_out, intf *name_len_out);
 
 #endif /* __FORTEST_H */
 

Modified: packages/libhdf4/branches/upstream/current/hdf/test/fortestF.f
===================================================================
--- packages/libhdf4/branches/upstream/current/hdf/test/fortestF.f	2007-05-15 09:05:29 UTC (rev 830)
+++ packages/libhdf4/branches/upstream/current/hdf/test/fortestF.f	2007-05-15 09:53:05 UTC (rev 831)
@@ -1,4 +1,4 @@
-C $Id: fortestF.f,v 1.19 1999/05/04 17:36:31 koziol Exp $
+C $Id: fortestF.f,v 1.20 2001/09/24 21:57:46 epourmal Exp $
 C Interface to invoke tests for HDF Fortran interfaces.
 
 	Program main
@@ -266,6 +266,11 @@
 	    return
 	endif
 
+	if (param .EQ. 'vsetblock') then
+	    call tvsetblock(retcode)
+	    return
+	endif
+
 	if (param .EQ. 'vattrf') then
 	    call tvattrf(retcode)
 	    return

Modified: packages/libhdf4/branches/upstream/current/hdf/test/litend.c
===================================================================
--- packages/libhdf4/branches/upstream/current/hdf/test/litend.c	2007-05-15 09:05:29 UTC (rev 830)
+++ packages/libhdf4/branches/upstream/current/hdf/test/litend.c	2007-05-15 09:53:05 UTC (rev 831)
@@ -11,10 +11,10 @@
  ****************************************************************************/
 
 #ifdef RCSID
-static char RcsId[] = "@(#)$Revision: 1.17 $";
+static char RcsId[] = "@(#)$Revision: 1.18 $";
 #endif
 
-/* $Id: litend.c,v 1.17 1996/11/11 20:39:55 koziol Exp $ */
+/* $Id: litend.c,v 1.18 2003/12/10 21:13:33 epourmal Exp $ */
 
 #include "tproto.h"
 
@@ -83,11 +83,21 @@
     float64 *data_f64;
     int ret;
 
+    char        filename[512] = "";
+    char       *srcdir = getenv("srcdir");
+
     MESSAGE(5,printf("Testing Little-Endian Read Routines\n"););
 
     MESSAGE(10,printf("Testing Little-Endian INT8 Reading Routines\n"););
 
-    ret=DFSDgetdims(FILENAME,&rank,dimsizes,2);
+    /* Generate the correct name for the test file, by prepending the source path */
+    if (srcdir && ((strlen(srcdir) + strlen(FILENAME) + 1) < sizeof(filename))) {
+        strcpy(filename, srcdir);
+        strcat(filename, "/");
+    }
+    strcat(filename, FILENAME);
+
+    ret=DFSDgetdims(filename,&rank,dimsizes,2);
     RESULT("DFSDgetdims");
     if(dimsizes[0]!=CDIM_Y || dimsizes[1]!=CDIM_X) {
         fprintf(stderr, "Dimensions for INT8 data were incorrect\n");
@@ -102,7 +112,7 @@
           } /* end if */
         else {
             data_i8=(int8 *)HDmalloc((size_t)(dimsizes[0]*dimsizes[1])*sizeof(int8));
-            ret=DFSDgetdata(FILENAME,rank,dimsizes,(VOIDP)data_i8);
+            ret=DFSDgetdata(filename,rank,dimsizes,(VOIDP)data_i8);
             RESULT("DFSDgetdata");
 
             if(HDmemcmp(cdata_i8,data_i8,CDIM_X*CDIM_Y*sizeof(int8))) {
@@ -115,7 +125,7 @@
 
     MESSAGE(10,printf("Testing Little-Endian UINT8 Reading Routines\n"););
 
-    ret=DFSDgetdims(FILENAME,&rank,dimsizes,2);
+    ret=DFSDgetdims(filename,&rank,dimsizes,2);
     RESULT("DFSDgetdims");
     if(dimsizes[0]!=CDIM_Y || dimsizes[1]!=CDIM_X) {
         fprintf(stderr, "Dimensions for UINT8 data were incorrect\n");
@@ -130,7 +140,7 @@
           } /* end if */
         else {
             data_u8=(uint8 *)HDmalloc((size_t)(dimsizes[0]*dimsizes[1])*sizeof(uint8));
-            ret=DFSDgetdata(FILENAME,rank,dimsizes,(VOIDP)data_u8);
+            ret=DFSDgetdata(filename,rank,dimsizes,(VOIDP)data_u8);
             RESULT("DFSDgetdata");
 
             if(HDmemcmp(cdata_u8,data_u8,CDIM_X*CDIM_Y*sizeof(uint8))) {
@@ -143,7 +153,7 @@
 
     MESSAGE(10,printf("Testing Little-Endian INT16 Reading Routines\n"););
 
-    ret=DFSDgetdims(FILENAME,&rank,dimsizes,2);
+    ret=DFSDgetdims(filename,&rank,dimsizes,2);
     RESULT("DFSDgetdims");
     if(dimsizes[0]!=CDIM_Y || dimsizes[1]!=CDIM_X) {
         fprintf(stderr, "Dimensions for INT16 data were incorrect\n");
@@ -158,7 +168,7 @@
           } /* end if */
         else {
             data_i16=(int16 *)HDmalloc((size_t)(dimsizes[0]*dimsizes[1])*sizeof(int16));
-            ret=DFSDgetdata(FILENAME,rank,dimsizes,(VOIDP)data_i16);
+            ret=DFSDgetdata(filename,rank,dimsizes,(VOIDP)data_i16);
             RESULT("DFSDgetdata");
 
             if(HDmemcmp(cdata_i16,data_i16,CDIM_X*CDIM_Y*sizeof(int16))) {
@@ -171,7 +181,7 @@
 
     MESSAGE(10,printf("Testing Little-Endian UINT16 Reading Routines\n"););
 
-    ret=DFSDgetdims(FILENAME,&rank,dimsizes,2);
+    ret=DFSDgetdims(filename,&rank,dimsizes,2);
     RESULT("DFSDgetdims");
     if(dimsizes[0]!=CDIM_Y || dimsizes[1]!=CDIM_X) {
         fprintf(stderr, "Dimensions for UINT16 data were incorrect\n");
@@ -186,7 +196,7 @@
           } /* end if */
         else {
             data_u16=(uint16 *)HDmalloc((size_t)(dimsizes[0]*dimsizes[1])*sizeof(uint16));
-            ret=DFSDgetdata(FILENAME,rank,dimsizes,(VOIDP)data_u16);
+            ret=DFSDgetdata(filename,rank,dimsizes,(VOIDP)data_u16);
             RESULT("DFSDgetdata");
 
             if(HDmemcmp(cdata_u16,data_u16,CDIM_X*CDIM_Y*sizeof(uint16))) {
@@ -199,7 +209,7 @@
 
     MESSAGE(10,printf("Testing Little-Endian INT32 Reading Routines\n"););
 
-    ret=DFSDgetdims(FILENAME,&rank,dimsizes,2);
+    ret=DFSDgetdims(filename,&rank,dimsizes,2);
     RESULT("DFSDgetdims");
     if(dimsizes[0]!=CDIM_Y || dimsizes[1]!=CDIM_X) {
         fprintf(stderr, "Dimensions for INT32 data were incorrect\n");
@@ -214,7 +224,7 @@
           } /* end if */
         else {
             data_i32=(int32 *)HDmalloc((size_t)(dimsizes[0]*dimsizes[1])*sizeof(int32));
-            ret=DFSDgetdata(FILENAME,rank,dimsizes,(VOIDP)data_i32);
+            ret=DFSDgetdata(filename,rank,dimsizes,(VOIDP)data_i32);
             RESULT("DFSDgetdata");
 
             if(HDmemcmp(cdata_i32,data_i32,CDIM_X*CDIM_Y*sizeof(int32))) {
@@ -227,7 +237,7 @@
 
     MESSAGE(10,printf("Testing Little-Endian UINT32 Reading Routines\n"););
 
-    ret=DFSDgetdims(FILENAME,&rank,dimsizes,2);
+    ret=DFSDgetdims(filename,&rank,dimsizes,2);
     RESULT("DFSDgetdims");
     if(dimsizes[0]!=CDIM_Y || dimsizes[1]!=CDIM_X) {
         fprintf(stderr, "Dimensions for UINT32 data were incorrect\n");
@@ -242,7 +252,7 @@
           } /* end if */
         else {
             data_u32=(uint32 *)HDmalloc((size_t)(dimsizes[0]*dimsizes[1])*sizeof(uint32));
-            ret=DFSDgetdata(FILENAME,rank,dimsizes,(VOIDP)data_u32);
+            ret=DFSDgetdata(filename,rank,dimsizes,(VOIDP)data_u32);
             RESULT("DFSDgetdata");
 
             if(HDmemcmp(cdata_u32,data_u32,CDIM_X*CDIM_Y*sizeof(uint32))) {
@@ -255,7 +265,7 @@
 
     MESSAGE(10,printf("Testing Little-Endian FLOAT32 Reading Routines\n"););
 
-    ret=DFSDgetdims(FILENAME,&rank,dimsizes,2);
+    ret=DFSDgetdims(filename,&rank,dimsizes,2);
     RESULT("DFSDgetdims");
     if(dimsizes[0]!=CDIM_Y || dimsizes[1]!=CDIM_X) {
         fprintf(stderr, "Dimensions for FLOAT32 data were incorrect\n");
@@ -270,7 +280,7 @@
           } /* end if */
         else {
             data_f32=(float32 *)HDmalloc((size_t)(dimsizes[0]*dimsizes[1])*sizeof(float32));
-            ret=DFSDgetdata(FILENAME,rank,dimsizes,(VOIDP)data_f32);
+            ret=DFSDgetdata(filename,rank,dimsizes,(VOIDP)data_f32);
             RESULT("DFSDgetdata");
 
             if(HDmemcmp(cdata_f32,data_f32,CDIM_X*CDIM_Y*sizeof(float32))) {
@@ -283,7 +293,7 @@
 
     MESSAGE(10,printf("Testing Little-Endian FLOAT64 Reading Routines\n"););
 
-    ret=DFSDgetdims(FILENAME,&rank,dimsizes,2);
+    ret=DFSDgetdims(filename,&rank,dimsizes,2);
     RESULT("DFSDgetdims");
     if(dimsizes[0]!=CDIM_Y || dimsizes[1]!=CDIM_X) {
         fprintf(stderr, "Dimensions for FLOAT64 data were incorrect\n");
@@ -298,7 +308,7 @@
           } /* end if */
         else {
             data_f64=(float64 *)HDmalloc((size_t)(dimsizes[0]*dimsizes[1])*sizeof(float64));
-            ret=DFSDgetdata(FILENAME,rank,dimsizes,(VOIDP)data_f64);
+            ret=DFSDgetdata(filename,rank,dimsizes,(VOIDP)data_f64);
             RESULT("DFSDgetdata");
 
 #if defined CONVEXNATIVE

Modified: packages/libhdf4/branches/upstream/current/hdf/test/manf.f
===================================================================
--- packages/libhdf4/branches/upstream/current/hdf/test/manf.f	2007-05-15 09:05:29 UTC (rev 830)
+++ packages/libhdf4/branches/upstream/current/hdf/test/manf.f	2007-05-15 09:53:05 UTC (rev 831)
@@ -10,7 +10,7 @@
 C*                                                                          *
 C****************************************************************************
 C
-C $Id: manf.f,v 1.22 2000/02/29 20:38:04 epourmal Exp $
+C $Id: manf.f,v 1.23 2001/10/01 21:53:57 epourmal Exp $
 C
       subroutine manf (number_failed)
 C
@@ -323,12 +323,14 @@
       integer MAXLENLAB, MAXLEN_DESC
       parameter ( MAXLENLAB =    30,
      *            MAXLEN_DESC =  500 )
+      character*15 ERR_FILE
+      parameter (ERR_FILE = 'Fortran_err.dat')
 
       integer  inlablen, indesclen, ret
 
       integer affileinfo, afnumann, afannlist, afannlen
       integer afreadann, afstart, afend, afendaccess, hopen, hclose
-      integer hishdff, hestringf
+      integer hishdff, hestringf, heprntf
       character*80 error_message
 
       integer fileh, anh
@@ -380,7 +382,8 @@
 C *****  end of hishdff test
 C
 C *****start annotation access on file *****
-
+      fileh = hopen('nonexist', DFACC_READ,0)
+      ret = heprntf(ERR_FILE, 0)
       fileh = hopen(fname, DFACC_READ,0)
       ret = fileh
       call VRFY(ret, 'hopen', num_failed)
@@ -479,6 +482,8 @@
       call VRFY(ret, 'afend', num_failed)
       ret = hclose(fileh)
       call VRFY(ret, 'hclose', num_failed)
+      ret = hclose(fileh)
+      ret = heprntf(ERR_FILE, 0)
 
 
       return

Modified: packages/libhdf4/branches/upstream/current/hdf/test/mgr.c
===================================================================
--- packages/libhdf4/branches/upstream/current/hdf/test/mgr.c	2007-05-15 09:05:29 UTC (rev 830)
+++ packages/libhdf4/branches/upstream/current/hdf/test/mgr.c	2007-05-15 09:53:05 UTC (rev 831)
@@ -11,10 +11,10 @@
  ****************************************************************************/
 
 #ifdef RCSID
-static char RcsId[] = "$Revision: 1.30 $";
+static char RcsId[] = "$Revision: 1.39 $";
 #endif
 
-/* $Id: mgr.c,v 1.30 2000/11/16 15:41:36 koziol Exp $ */
+/* $Id: mgr.c,v 1.39 2005/02/14 00:08:13 bmribler Exp $ */
 
 /***********************************************************
 *
@@ -360,7 +360,15 @@
             2. GRgetattr
         C. GRfindattr
     VIII. Old-Style Raster Image Access
+        A. Read data from RLE compressed image
+        B. Create RLE compressed image & write to it (not implemented)
+        C. Read data from 8-bit JPEG compressed image
+        D. Create 8-bit JPEG compressed image & write to it
+        E. Read data from 24-bit JPEG compressed image
+        F. Create 24-bit JPEG compressed image & write to it
     IX. Compressed image Functions
+    X.  Chunking write/read test
+
         
 */
 
@@ -382,12 +390,21 @@
     int32 n_datasets;       /* number of datasets */
     int32 n_attrs;          /* number of attributes */
     int32 ret;              /* generic return value */
+    char datafile[512] = "";
+    char *srcdir = getenv("srcdir");
 
     /* Output message about test being performed */
     MESSAGE(6, printf("Testing Multi-file Raster Initialization routines\n"););
 
     MESSAGE(8, printf("Try creating a new file and checking it out\n"););
 
+    /* Generate the correct name for the test file, by prepending the source path */
+    if (srcdir && ((strlen(srcdir) + strlen(DATAFILE) + 1) < sizeof(datafile))) {
+        strcpy(datafile, srcdir);
+        strcat(datafile, "/");
+    }
+    strcat(datafile, DATAFILE);
+
     /* Ok, now create a new file */
     fid=Hopen(TESTFILE,DFACC_RDWR,0);
     CHECK(fid,FAIL,"Hopen");
@@ -418,7 +435,7 @@
 
     /* Ok, now check an existing file */
 
-    fid=Hopen(DATAFILE,DFACC_READ,0);
+    fid=Hopen(datafile,DFACC_READ,0);
     CHECK(fid,FAIL,"Hopen");
 
     /* Try initializing the GR interface */
@@ -2279,12 +2296,21 @@
     int32 fid;              /* HDF file ID */
     int32 grid;             /* GRID for the interface */
     int32 ret;              /* generic return value */
+    char datafile[512] = "";
+    char *srcdir = getenv("srcdir");
 
 /* B2b1 - Read/Write images - with real Data - Existing Image - Whole Image */
     MESSAGE(8, printf("Check out I/O from Existing Image - Whole Image\n"););
 
+    /* Generate the correct name for the test file, by prepending the source path */
+    if (srcdir && ((strlen(srcdir) + strlen(DATAFILE) + 1) < sizeof(datafile))) {
+        strcpy(datafile, srcdir);
+        strcat(datafile, "/");
+    }
+    strcat(datafile, DATAFILE);
+
     /* Open up the existing datafile and get the image information from it */
-    fid=Hopen(DATAFILE,DFACC_READ,0);
+    fid=Hopen(datafile,DFACC_READ,0);
     CHECK(fid,FAIL,"Hopen");
 
     /* Try initializing the GR interface */
@@ -2645,7 +2671,7 @@
 /****************************************************************
 **
 **  test_mgr_image(): Multi-file Raster Image I/O Test Routine
-** 
+**  II. Create Images
 **      A. GRcreate/GRselect/GRendaccess w/GRgetiminfo
 **      B. Write/Read images
 **          1. With no Data
@@ -2883,6 +2909,10 @@
         ret=GRgetiminfo(riid,name,&ncomp,&nt,&il,dimsizes,&n_attr);
         CHECK(ret,FAIL,"GRgetiminfo");
 
+        /* Get the number of palettes */
+        ret=GRgetnluts(riid);
+        VERIFY(ret,0,"GRgetnluts");
+
         lutid=GRgetlutid(riid,0);
         CHECK(lutid,FAIL,"GRgetlutid");
         
@@ -3383,12 +3413,21 @@
     int32 fid;              /* HDF file ID */
     int32 grid;             /* GRID for the interface */
     int32 ret;              /* generic return value */
+    char oldrlefile[512] = "";
+    char *srcdir = getenv("srcdir");
 
+    /* Generate the correct name for the test file, by prepending the source path */
+    if (srcdir && ((strlen(srcdir) + strlen(OLDRLEFILE) + 1) < sizeof(oldrlefile))) {
+        strcpy(oldrlefile, srcdir);
+        strcat(oldrlefile, "/");
+    }
+    strcat(oldrlefile, OLDRLEFILE);
+
 /* A - Read RLE compressed data from old raster image file */
     MESSAGE(8, printf("Read RLE compressed image\n"););
 
     /* Open up the existing datafile and get the image information from it */
-    fid=Hopen(OLDRLEFILE,DFACC_RDWR,0);
+    fid=Hopen(oldrlefile,DFACC_RDWR,0);
     CHECK(fid,FAIL,"Hopen");
 
     /* Initialize the GR interface */
@@ -3444,12 +3483,21 @@
     int32 fid;              /* HDF file ID */
     int32 grid;             /* GRID for the interface */
     int32 ret;              /* generic return value */
+    char oldgreyjpegfile[512] = "";
+    char *srcdir = getenv("srcdir");
 
+    /* Generate the correct name for the test file, by prepending the source path */
+    if (srcdir && ((strlen(srcdir) + strlen(OLDGREYJPEGFILE) + 1) < sizeof(oldgreyjpegfile))) {
+        strcpy(oldgreyjpegfile, srcdir);
+        strcat(oldgreyjpegfile, "/");
+    }
+    strcat(oldgreyjpegfile, OLDGREYJPEGFILE);
+
 /* C - Read 8-bit JPEG compressed data from old raster image file */
     MESSAGE(8, printf("Read 8-bit JPEG compressed image\n"););
 
     /* Open up the existing datafile and get the image information from it */
-    fid=Hopen(OLDGREYJPEGFILE,DFACC_READ,0);
+    fid=Hopen(oldgreyjpegfile,DFACC_READ,0);
     CHECK(fid,FAIL,"Hopen");
 
     /* Initialize the GR interface */
@@ -3498,12 +3546,21 @@
     int32 fid;              /* HDF file ID */
     int32 grid;             /* GRID for the interface */
     int32 ret;              /* generic return value */
+    char oldjpegfile[512] = "";
+    char *srcdir = getenv("srcdir");
 
+    /* Generate the correct name for the test file, by prepending the source path */
+    if (srcdir && ((strlen(srcdir) + strlen(OLDJPEGFILE) + 1) < sizeof(oldjpegfile))) {
+        strcpy(oldjpegfile, srcdir);
+        strcat(oldjpegfile, "/");
+    }
+    strcat(oldjpegfile, OLDJPEGFILE);
+
 /* E - Read 24-bit JPEG compressed data from old raster image file */
     MESSAGE(8, printf("Read 24-bit JPEG compressed image\n"););
 
     /* Open up the existing datafile and get the image information from it */
-    fid=Hopen(OLDJPEGFILE,DFACC_READ,0);
+    fid=Hopen(oldjpegfile,DFACC_READ,0);
     CHECK(fid,FAIL,"Hopen");
 
     /* Initialize the GR interface */
@@ -3583,7 +3640,13 @@
 #define GZIPFILE    "gr_gzip.hdf"
 #define JPEGFILE    "gr_jpeg.hdf"
 
-/* Sub-tests for test_mgr_compress() */
+/* Sub-tests for test_mgr_compress():
+   - test_mgr_compress_a: Create/Write/Read gzip compressed image
+   - test_mgr_compress_b: Create/Write/Read 8-bit JPEG compressed image
+   - test_mgr_compress_c: Create/Read/Write 24-bit JPEG compressed Image
+   - test_get_compress:   Retrieve various compression information of 
+				compressed Image 
+*/
 static void test_mgr_compress_a(int flag)
 {
     int32 fid;              /* HDF file ID */
@@ -3603,7 +3666,7 @@
 
     {
         int32 riid;     /* RI ID for the new image */
-        int32 comp_type;            /* Compression method */
+        comp_coder_t comp_type;            /* Compression method */
         comp_info cinfo;            /* Compression parameters */
         int32 dims[2]={10,10};    /* dimensions for the empty image */
         uint8 image[10][10]; /* space for the image data */
@@ -3742,7 +3805,7 @@
 
     {
         int32 riid;     /* RI ID for the new image */
-        int32 comp_type;            /* Compression method */
+        comp_coder_t comp_type;            /* Compression method */
         comp_info cinfo;            /* Compression parameters */
         int32 dims[2]={10,10};    /* dimensions for the empty image */
         int32 dims_out[2];          /* Buffer for retrieving dimensions */
@@ -4023,14 +4086,542 @@
  
 } /* end test_mgr_compress_c() */
 
+/*--------------------------------------------------------------------------
+    The following 2 routines are added when bug# 307 was fixed:
+
+    - test_get_compress: tests the new functionality, getting compression
+                information of compressed image data.  The test
+        + creates a file and four compressed images written to the file,
+          then closes the file.
+        + re-opens the file, then reads and verifies each image's
+          compression information
+        The four images are created using the following compression
+        methods in that order: RLE, Skipping Huffman, Deflate, and JPEG.
+        For simplicity, all four images use the same data sample.
+
+    - make_comp_image: is a helper that test_get_compress uses to create
+                several compressed images.
+
+ -BMR (Sept 7, 01)
+--------------------------------------------------------------------------*/
+
+#define	COMPFILE	"gr_comp.hdf"
+#define	RLE_IMAGE	"Image with RLE Compression"
+#define	DEFLATE_IMAGE	"Image with Deflate Compression"
+#define	SKPHUFF_IMAGE	"Image with Skphuff Compression"
+#define	JPEG_IMAGE	"Image with JPEG Compression"
+#define	DEFLATE_LEVEL		7  /* arbitrary */
+#define	SKPHUFF_SKIPSIZE	28  /* arbitrary */
+
+intn make_comp_image( 
+		int32 grid,
+		char* img_name,
+		comp_coder_t comp_type,    /* Compression method */
+		comp_info* cinfo)    /* Compression parameters */
+{
+    int32 riid;         /* RI ID of the working image */
+    int32 dims[2]={10,10};	/* dimensions for the empty image */
+    uint8 image_data[10][10];	/* space for the image data */
+    int32 start[2];		/* start of image data to grab */
+    int32 stride[2];	/* stride of image data to grab */
+    intn i,j;		/* indices */
+    intn ret_value;        /* generic return value */
+
+    /* Initialize data we are going to write out */
+    for (i = 0; i < 10; i++)
+        for (j = 0; j < 10; j++)
+            image_data[i][j] = (uint8) (i + j + 10);
+
+    /* Create the image */
+    riid = GRcreate(grid, img_name, 1, DFNT_UINT8, MFGR_INTERLACE_PIXEL, dims);
+    CHECK(riid, FAIL, "GRcreate");
+
+    /* Set the compression as provided */
+    ret_value = GRsetcompress(riid, comp_type, cinfo);
+    CHECK(ret_value, FAIL, "GRsetcompress");
+
+    /* Write the image out */
+    start[0] = start[1] = 0;
+    stride[0] = stride[1] = 1;
+    ret_value = GRwriteimage(riid, start, stride, dims, image_data);
+    CHECK(ret_value, FAIL, "GRwriteimage");
+
+    /* Close the image */
+    ret_value = GRendaccess(riid);
+    CHECK(ret_value, FAIL, "GRendaccess");
+
+    return ret_value;
+}
+
+static void test_get_compress(int flag)
+{
+    int32 fid;          /* HDF file ID */
+    int32 grid;         /* GRID for the interface */
+    int32 riid;     	/* RI ID of the working image */
+    comp_coder_t comp_type;    /* Compression method */
+    comp_info cinfo;    /* Compression parameters - union */
+    intn status;        /* generic return value */
+
+/* D - Retrieve compression information of compressed images */
+    MESSAGE(8, printf("Verify the compression information of compressed images\n"););
+
+    /*
+     * Create a new file and several images with different compression
+     * schemes then close the images and the file
+     */
+
+    /* Create an hdf file, and initiate the GR interface */
+    fid = Hopen(COMPFILE, DFACC_CREATE, 0);
+    CHECK(fid, FAIL, "Hopen");
+
+    grid = GRstart(fid);
+    CHECK(grid, FAIL, "GRstart");
+
+    /* Create and write 4 images, with RLE, deflate, skipping huffman,
+       and JPEG compression methods. */
+
+    /* No compression info for the RLE image */
+    HDmemset(&cinfo, 0, sizeof(cinfo)) ;
+
+    /* Create and write the first compressed image in this file */
+    make_comp_image(grid, RLE_IMAGE, COMP_CODE_RLE, &cinfo);
+
+    /* Set the compression info for the second image with skipping 
+       huffman method */
+    HDmemset(&cinfo, 0, sizeof(cinfo)) ;
+    cinfo.skphuff.skp_size = SKPHUFF_SKIPSIZE;
+
+    /* Create and write the second compressed image in this file */
+    make_comp_image(grid, SKPHUFF_IMAGE, COMP_CODE_SKPHUFF, &cinfo);
+
+    /* Set the compression info for the third image with deflate method */
+    HDmemset(&cinfo, 0, sizeof(cinfo)) ;
+    cinfo.deflate.level = DEFLATE_LEVEL;
+
+    /* Create and write the third compressed image in this file */
+    make_comp_image(grid, DEFLATE_IMAGE, COMP_CODE_DEFLATE, &cinfo);
+
+    /* Set the compression method for the fourth image */
+    HDmemset(&cinfo, 0, sizeof(cinfo)) ;
+    cinfo.jpeg.quality = 100;	/* won't be able to retrieved anyway */
+    cinfo.jpeg.force_baseline = 1;
+
+    /* Create and write the fourth compressed image in this file */
+    make_comp_image(grid, JPEG_IMAGE, COMP_CODE_JPEG, &cinfo);
+
+    /* Terminate access to the GR interface and close the file */
+    status = GRend(grid);
+    CHECK(status, FAIL, "GRend");
+    status = Hclose(fid);
+    CHECK(status, FAIL, "Hclose");
+
+    /*
+     * Re-open the file COMPFILE, and retrieve the compression information
+     * of its two images 
+     */
+    fid = Hopen(COMPFILE, DFACC_READ, 0);
+    CHECK(fid, FAIL, "Hopen");
+
+    grid = GRstart(fid);
+    CHECK(grid, FAIL, "GRstart");
+
+    /* get access to the first image */
+    riid = GRselect(grid, 0);
+    CHECK(riid, FAIL, "GRselect");
+
+    /* First image uses RLE compression method, so no info will be
+       retrieved */
+    status = GRgetcompress(riid, &comp_type, &cinfo);
+    CHECK(status, FAIL, "GRsetcompress");
+    VERIFY(comp_type, COMP_CODE_RLE, "GRgetcompress");
+
+    /* end access to the first image */
+    status = GRendaccess(riid);
+    CHECK(status, FAIL, "GRendaccess");
+
+    /* get the compression info of the second image, and then check 
+     * the values against the values set earlier, which are:
+     *		comp_type = COMP_CODE_SKPHUFF 
+     *		skp_size = SKPHUFF_SKIPSIZE
+     */
+
+    /* get access to the second image */
+    riid = GRselect(grid, 1);
+    CHECK(riid, FAIL, "GRselect");
+
+    comp_type = COMP_CODE_INVALID;  /* reset variables before retrieving info */
+    HDmemset(&cinfo, 0, sizeof(cinfo)) ;
+    status = GRgetcompress(riid, &comp_type, &cinfo);
+    CHECK(status, FAIL, "GRsetcompress");
+    VERIFY(comp_type, COMP_CODE_SKPHUFF, "GRgetcompress");
+    VERIFY(cinfo.skphuff.skp_size, SKPHUFF_SKIPSIZE, "GRgetcompress");
+
+    /* end access to the second image */
+    status = GRendaccess(riid);
+    CHECK(status, FAIL, "GRendaccess");
+
+    /* get the compression info of the third image, and then check 
+       the values against the values set earlier, which are:
+		comp_type = COMP_CODE_DEFLATE 
+		level = DEFLATE_LEVEL
+    */
+
+    /* get access to the third image */
+    riid = GRselect(grid, 2);
+    CHECK(riid, FAIL, "GRselect");
+
+    comp_type = COMP_CODE_INVALID;  /* reset variables before retrieving info */
+    HDmemset(&cinfo, 0, sizeof(cinfo)) ;
+    status = GRgetcompress(riid, &comp_type, &cinfo);
+    CHECK(status, FAIL, "GRsetcompress");
+    VERIFY(comp_type, COMP_CODE_DEFLATE, "GRgetcompress");
+    VERIFY(cinfo.deflate.level, DEFLATE_LEVEL, "GRgetcompress");
+
+    /* Terminate access to the third image */
+    status = GRendaccess(riid);
+    CHECK(status, FAIL, "GRendaccess");
+
+    /* get access to the fourth image */
+    riid = GRselect(grid, 3);
+    CHECK(riid, FAIL, "GRselect");
+
+    /* get the compression info of the second image, but only check 
+       the compression type value against that being set earlier 
+       ('quality' and 'force_baseline' are currently not retrievable) */
+    comp_type = COMP_CODE_INVALID;  /* reset variables before retrieving info */
+    HDmemset(&cinfo, 0, sizeof(cinfo)) ;
+    status = GRgetcompress(riid, &comp_type, &cinfo);
+    CHECK(status, FAIL, "GRgetcompress");
+    VERIFY(comp_type, COMP_CODE_JPEG, "GRgetcompress");
+    VERIFY(cinfo.jpeg.quality, 0, "GRgetcompress");
+    VERIFY(cinfo.jpeg.force_baseline, 0, "GRgetcompress");
+
+    /* Terminate access to the third image */
+    status = GRendaccess(riid);
+    CHECK(status, FAIL, "GRendaccess");
+
+    /* Terminate access and close the file */
+    status = GRend(grid);
+    CHECK(status, FAIL, "GRend");
+    status = Hclose(fid);
+    CHECK(status, FAIL, "Hclose");
+
+} /* end test_get_compress */
+
+/*--------------------------------------------------------------------------
+    The test routine test_mgr_chunk_compress is added when bug# 307 was 
+    fixed.
+
+    test_mgr_chunk_compress tests the new functionality, getting 
+    compression information of compressed chunked image data.  It 
+        + creates the file CHKCOMPFILE and adds four compressed chunked 
+	  images to it, then closes the file.
+        + re-opens the file, then reads and verifies each chunked image's
+          compression information
+        The first image is only chunked and not compressed.
+        The last three chunked images are compressed using the following
+        methods in that order: RLE, Skipping Huffman, Deflate.
+        For simplicity, all four images use the same data sample.
+    Note: At this time JPEG is not working correctly for chunked images,
+    but when it is, its tests should be added to this routines (and to 
+    test_mgr_chunkwr_pixelone as well) appropriately, i.e. another image 
+    should be added to the image list.
+
+ -BMR (Oct 7, 01)
+--------------------------------------------------------------------------*/
+
+static void 
+test_mgr_chunk_compress()
+{
+#define  CHKCOMPFILE  "gr_chunkcomp.hdf"
+#define  X_LENGTH     10    /* number of columns in the image */
+#define  Y_LENGTH     6     /* number of rows in the image */
+#define  N_COMPS      3     /* number of components in the image */
+#define  N_IMAGES     4     /* number of images tested used - 5 comp. methods */
+
+   /************************* Variable declaration **************************/
+
+   intn  status;         /* status for functions returning an intn */
+   int32 file_id,        /* HDF file identifier */
+         gr_id,          /* GR interface identifier */
+         ri_id[N_IMAGES],       /* raster image identifier */
+         origin[2],      /* start position to write for each dimension */
+         dim_sizes[2],   /* dimension sizes of the image array */
+         interlace_mode, /* interlace mode of the image */
+         data_type,      /* data type of the image data */
+         comp_flag,      /* compression flag */
+         index,
+         img_num;
+   int32 start[2],
+         stride[2],
+         edge[2];
+   comp_info cinfo;    /* Compression parameters - union */
+
+   comp_coder_t comp_type;
+   int16 data_out[3*Y_LENGTH*X_LENGTH];
+   char *image_name[] = { "Image_NO", "Image_RL", "Image_Sk", "Image_DF"};
+   HDF_CHUNK_DEF chunk_def[N_IMAGES];
+   int16 chunk_buf[18];
+
+   int16 chunk00[] = {        110, 111, 112, 120, 121, 122,
+                              130, 131, 132, 140, 141, 142,
+                              150, 151, 152, 160, 161, 162 };
+ 
+   int16 chunk01[] = {    210, 211, 212, 220, 221, 222,
+                          230, 231, 232, 240, 241, 242,
+                          250, 251, 252, 260, 261, 262};
+ 
+   int16 chunk14[] = {    1010, 1011, 1012, 1020, 1021, 1022,
+                          1030, 1031, 1032, 1040, 1041, 1042,
+                          1050, 1051, 1052, 1060, 1061, 1062};
+
+   int16 data[]    = {
+                110, 111, 112, 120, 121, 122, 210, 211, 212, 220, 221, 222, 0, 
+                0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 130, 131, 132, 140, 
+                141, 142, 230, 231, 232, 240, 241, 242, 0, 0, 0, 0, 0, 0, 0, 0, 0, 
+                0, 0, 0, 0, 0, 0, 0, 0, 0, 150, 151, 152, 160, 161, 162, 250, 251, 
+                252, 260, 261, 262, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 
+                0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 
+                1010, 1011, 1012, 1020, 1021, 1022, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 
+                0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1030, 1031, 1032, 1040, 1041, 
+                1042, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 
+                0, 1050, 1051, 1052, 1060, 1061, 1062 }; 
+
+
+   /********************** End of variable declaration **********************/
+   /*
+   * Create and open the file.
+   */
+   file_id = Hopen (CHKCOMPFILE, DFACC_CREATE, 0);
+   CHECK(file_id, FAIL, "Hopen");
+
+   /*
+   * Initialize the GR interface.
+   */
+   gr_id = GRstart (file_id);
+   CHECK(gr_id, FAIL, "GRstart");
+
+   /*
+   * Set the data type, interlace mode, and dimensions of the image.
+   */
+   data_type = DFNT_INT16;
+   interlace_mode = MFGR_INTERLACE_PIXEL;
+   dim_sizes[0] = Y_LENGTH;
+   dim_sizes[1] = X_LENGTH;
+
+   for (img_num = 0; img_num < N_IMAGES; img_num++ ) {  
+
+   /*
+   * Create the raster image array.
+   */
+   ri_id[img_num] = GRcreate (gr_id, image_name[img_num], N_COMPS, data_type, 
+                     interlace_mode, dim_sizes);
+   CHECK(ri_id[img_num], FAIL, "GRcreate");
+
+   /* 
+   * Create chunked image array.
+   */
+   switch (img_num) {
+	case 0: 
+		comp_flag = HDF_CHUNK;
+		chunk_def[img_num].chunk_lengths[0] = 3;
+		chunk_def[img_num].chunk_lengths[1] = 2;
+		break;
+	case 1 :
+		comp_flag = HDF_CHUNK | HDF_COMP;
+		chunk_def[img_num].comp.chunk_lengths[0] = 3;
+		chunk_def[img_num].comp.chunk_lengths[1] = 2;
+		chunk_def[img_num].comp.comp_type = COMP_CODE_RLE;
+		break;
+	case 2 :
+		comp_flag = HDF_CHUNK | HDF_COMP;
+		chunk_def[img_num].comp.chunk_lengths[0] = 3;
+		chunk_def[img_num].comp.chunk_lengths[1] = 2;
+		chunk_def[img_num].comp.comp_type = COMP_CODE_SKPHUFF;
+		chunk_def[img_num].comp.cinfo.skphuff.skp_size = 2;
+		break;
+	case 3 :
+		comp_flag = HDF_CHUNK | HDF_COMP;
+		chunk_def[img_num].comp.chunk_lengths[0] = 3;
+		chunk_def[img_num].comp.chunk_lengths[1] = 2;
+		chunk_def[img_num].comp.comp_type = COMP_CODE_DEFLATE;
+		chunk_def[img_num].comp.cinfo.deflate.level = 6;
+		break;
+#ifdef NOT_WORKING
+	/* JPEG compression for chunked images is not working correctly 
+	   yet.  Add test here when it is */
+	case 4 :
+		comp_flag = HDF_CHUNK | HDF_COMP;
+		chunk_def[img_num].comp.chunk_lengths[0] = 3;
+		chunk_def[img_num].comp.chunk_lengths[1] = 2;
+		chunk_def[img_num].comp.comp_type = COMP_CODE_JPEG;
+		chunk_def[img_num].comp.cinfo.jpeg.quality = 5;
+		chunk_def[img_num].comp.cinfo.jpeg.force_baseline = 8;
+		break;
+#endif
+	default:
+		printf("Error\n");
+		break;
+
+   } /* end switch */
+    
+   status = GRsetchunk(ri_id[img_num], chunk_def[img_num], comp_flag);
+   CHECK(status, FAIL, "GRsetchunk");
+
+   /*
+   * Write first data chunk ( 0, 0 ). 
+   */
+   origin[0] = origin[1] = 0;
+   status = GRwritechunk(ri_id[img_num], origin, (VOIDP)chunk00);
+   CHECK(status, FAIL, "GRwritechunk");
+
+   /*
+   * Write second data chunk ( 0, 1 ). 
+   */
+   origin[0] = 0; origin[1] = 1;
+   status = GRwritechunk(ri_id[img_num], origin, (VOIDP)chunk01);
+   CHECK(status, FAIL, "GRwritechunk");
+
+   /*
+   * Write third data chunk ( 1, 4 ). 
+   */
+   origin[0] = 1; origin[1] = 4;
+   status = GRwritechunk(ri_id[img_num], origin, (VOIDP)chunk14);
+   CHECK(status, FAIL, "GRwritechunk");
+   /*
+   * Read third chunk back.
+   */
+   origin[0] = 1; origin[1] = 4;
+   status = GRreadchunk(ri_id[img_num], origin, (VOIDP)chunk_buf);
+   CHECK(status, FAIL, "GRreadchunk");
+
+   /*
+   * Terminate access to the GR interface and close the HDF file.
+   */
+   status = GRendaccess (ri_id[img_num]);
+   CHECK(status, FAIL, "GRendaccess");
+ }  /* end for*/
+
+   status = GRend (gr_id);
+   CHECK(status, FAIL, "GRend");
+   status = Hclose (file_id);
+   CHECK(status, FAIL, "Hclose");
+
+    /* 
+    * Open the file.
+    */
+
+    file_id = Hopen (CHKCOMPFILE, DFACC_WRITE, 0); 
+    CHECK(file_id, FAIL, "Hopen");
+
+   /*
+   * Initialize the GR interface.
+   */
+   gr_id = GRstart (file_id);
+   CHECK(gr_id, FAIL, "GRstart");
+
+   for (img_num = 0; img_num < N_IMAGES; img_num++ ) {  
+
+   /*
+   * Find the index of the specified image.
+   */
+   index = GRnametoindex(gr_id, image_name[img_num]);
+   CHECK(index, FAIL, "GRnametoindex");
+   
+   /* 
+   * Select the image.
+   */
+   ri_id[img_num] = GRselect(gr_id, index);
+   CHECK(ri_id[img_num], FAIL, "GRselect");
+
+   /*
+   * Get and verify the image's compression information
+   */
+    comp_type = COMP_CODE_INVALID;  /* reset variables before retrieving info */
+    HDmemset(&cinfo, 0, sizeof(cinfo)) ;
+
+    status = GRgetcompress(ri_id[img_num], &comp_type, &cinfo);
+    CHECK(status, FAIL, "GRsetcompress");
+    switch (img_num) {
+	case 0: 
+	    VERIFY(comp_type, COMP_CODE_NONE, "GRgetcompress");
+	    break;
+	case 1 :
+	    VERIFY(comp_type, COMP_CODE_RLE, "GRgetcompress");
+	    break;
+	case 2 :
+	    VERIFY(comp_type, COMP_CODE_SKPHUFF, "GRgetcompress");
+	    VERIFY(cinfo.skphuff.skp_size, 
+		   chunk_def[img_num].comp.cinfo.skphuff.skp_size, "GRgetcompress");
+	    break;
+	case 3 :
+	    VERIFY(comp_type, COMP_CODE_DEFLATE, "GRgetcompress");
+	    VERIFY(cinfo.deflate.level, 
+		   chunk_def[img_num].comp.cinfo.deflate.level, "GRgetcompress");
+	    break;
+#ifdef NOT_WORKING
+	/* JPEG is not working correctly yet.  Add test here when it is */
+	case 4 :  /* only return comp type for JPEG */
+	    VERIFY(comp_type, COMP_CODE_JPEG, "GRgetcompress");
+	    break;
+#endif
+	default:
+	    printf("Error\n");
+	    break;
+   } /* end switch */
+
+   /*
+   * Read third chunk back.
+   */
+   origin[0] = 1; origin[1] = 4;
+   status = GRreadchunk(ri_id[img_num], origin, (VOIDP)chunk_buf);
+   CHECK(status, FAIL, "GRreadchunk");
+   if (0 != HDmemcmp(chunk_buf, chunk14 , sizeof(chunk14)))
+      {
+            MESSAGE(3, printf("Error in reading chunk at line %d\n",__LINE__););
+            MESSAGE(3, printf("Image #%d\n", (int)img_num););
+            num_errs++;
+      } /* end if */
+   /*
+   * Read the whole image.
+   */
+   start[0] = start[1] = 0;
+   stride[0] = stride[1] = 1;
+   edge[0] = Y_LENGTH;
+   edge[1] = X_LENGTH;
+   status = GRreadimage(ri_id[img_num], start, stride, edge, (VOIDP)data_out);
+   CHECK(status, FAIL, "GRreadimage");
+   if (0!= HDmemcmp(data_out, data, sizeof(data)))
+      {
+            MESSAGE(3, printf("%d: Error reading data for the whole image\n",__LINE__););
+            MESSAGE(3, printf("%d: Compression method\n", (int)img_num););
+            num_errs++;
+      } /* end if */
+
+   status = GRendaccess (ri_id[img_num]);
+   CHECK(status, FAIL, "GRendaccess");
+
+   } /* end for */    
+   /*
+   * Terminate access to the GR interface and close the HDF file.
+   */
+   status = GRend (gr_id);
+   CHECK(status, FAIL, "GRend");
+   status = Hclose (file_id);
+   CHECK(status, FAIL, "Hclose");
+}  /* end of test_mgr_chunk_compress */
+
+
 /****************************************************************
 **
 **  test_mgr_compress(): Multi-file Raster Compression tests
 ** 
-**  VIII. Compressed image tests
+**  IX. Compressed image tests
 **      A. Create/Read/Write gzip compressed Image
 **      B. Create/Read/Write 8-bit JPEG compressed Image
 **      C. Create/Read/Write 24-bit JPEG compressed Image
+**      D. Retrieve various compression information of compressed Image
+**	E. Retrieve various compression info. of compressed, chunked images
 ** 
 ****************************************************************/
 static void
@@ -4042,6 +4633,7 @@
     test_mgr_compress_a(flag);
     test_mgr_compress_b(flag);
     test_mgr_compress_c(flag);
+    test_get_compress(flag);
 
 }   /* end test_mgr_compress() */
 
@@ -4055,12 +4647,21 @@
     int32 fid;              /* HDF file ID */
     int32 grid;             /* GRID for the interface */
     int32 ret;              /* generic return value */
+    char gr_r24file[512] = "";
+    char *srcdir = getenv("srcdir");
 
+    /* Generate the correct name for the test file, by prepending the source path */
+    if (srcdir && ((strlen(srcdir) + strlen(GR_R24FILE) + 1) < sizeof(gr_r24file))) {
+        strcpy(gr_r24file, srcdir);
+        strcat(gr_r24file, "/");
+    }
+    strcat(gr_r24file, GR_R24FILE);
+
 /* A - Write/Read DF24 image */
     MESSAGE(8, printf("Operate on DF24 images\n"););
 
     /* Open up the existing datafile and get the image information from it */
-    fid=Hopen(GR_R24FILE,DFACC_READ,0);
+    fid=Hopen(gr_r24file,DFACC_READ,0);
     CHECK(fid,FAIL,"Hopen");
 
     /* Initialize the GR interface */
@@ -4127,7 +4728,7 @@
 **
 **  test_mgr_r24(): Multi-file Raster/DF24 Compatibility Tests
 ** 
-**  VIII. Multi-File Raster/DF24 Compatibility Tests
+**  X. Multi-File Raster/DF24 Compatibility Tests
 **      A. Read/Write DF24 Image
 ** 
 ****************************************************************/
@@ -4262,7 +4863,7 @@
 **
 **  test_mgr_r8(): Multi-file Raster/DF8 Compatibility Tests
 ** 
-**  VIII. Multi-File Raster/DF8 Compatibility Tests
+**  XI. Multi-File Raster/DF8 Compatibility Tests
 **      A. Read/Write DF8 Image with palette
 ** 
 ****************************************************************/
@@ -4302,12 +4903,21 @@
     int32 fid;              /* HDF file ID */
     int32 grid;             /* GRID for the interface */
     int32 ret;              /* generic return value */
+    char gr_r24file[512] = "";
+    char *srcdir = getenv("srcdir");
 
+    /* Generate the correct name for the test file, by prepending the source path */
+    if (srcdir && ((strlen(srcdir) + strlen(GR_R24FILE) + 1) < sizeof(gr_r24file))) {
+        strcpy(gr_r24file, srcdir);
+        strcat(gr_r24file, "/");
+    }
+    strcat(gr_r24file, GR_R24FILE);
+
 /* A - Write/Read DFP palette */
     MESSAGE(8, printf("Operate on DFP palette\n"););
 
     /* Open up the existing datafile and get the palette information from it */
-    fid=Hopen(GR_R24FILE,DFACC_READ,0);
+    fid=Hopen(gr_r24file,DFACC_READ,0);
     CHECK(fid,FAIL,"Hopen");
 
     /* Initialize the GR interface */
@@ -4374,7 +4984,7 @@
 **
 **  test_mgr_pal(): Multi-file Raster/DFP Compatibility Tests
 ** 
-**  VIII. Multi-File Raster/DFP Compatibility Tests
+**  XII. Multi-File Raster/DFP Compatibility Tests
 **      A. Read/Write DFP palettes
 ** 
 ****************************************************************/
@@ -4402,7 +5012,7 @@
     *                COMP_CODE_DEFLATE
     * and PIXEL interlace mode.
     */                    
-#define  FILE_NAME     "ChunkedGR.hdf"
+#define  CHUNKFILE     "ChunkedGR.hdf"
 #define  X_LENGTH      10    /* number of columns in the image */
 #define  Y_LENGTH      6     /* number of rows in the image */
 #define  N_COMPS       3     /* number of components in the image */
@@ -4459,7 +5069,7 @@
    /*
    * Create and open the file.
    */
-   file_id = Hopen (FILE_NAME, DFACC_WRITE, 0);
+   file_id = Hopen (CHUNKFILE, DFACC_WRITE, 0);
    CHECK(file_id, FAIL, "Hopen");
 
    /*
@@ -4571,7 +5181,7 @@
     * Open the file.
     */
 
-    file_id = Hopen (FILE_NAME, DFACC_WRITE, 0); 
+    file_id = Hopen (CHUNKFILE, DFACC_WRITE, 0); 
     CHECK(file_id, FAIL, "Hopen");
 
    /*
@@ -4593,6 +5203,7 @@
    */
    ri_id[i] = GRselect(gr_id, index);
    CHECK(ri_id[i], FAIL, "GRselect");
+
    /*
    * Read third chunk back.
    */
@@ -4895,8 +5506,8 @@
 **
 **  test_mgr_chunkwr(): GR chunking test 
 ** 
-**  X. GR write/read chunking test with enabled compression and
-**     different interlace modes.
+**  XIII. GR write/read chunking test with enabled compression and
+**       different interlace modes.
 **
 **      A. Write/read GR chunks with different kinds of compressions
 **         and PIXEL Interlace Mode  (test_mgr_chunkrw_pixel) 
@@ -4910,6 +5521,7 @@
     MESSAGE(6, printf("Testing GR chunking WRITE/READ\n"););
     
     test_mgr_chunkwr_pixelone();
+    test_mgr_chunk_compress();
     test_mgr_chunkwr_pixel(0);
     test_mgr_chunkwr_pixel(1);
     test_mgr_chunkwr_pixel(2);
@@ -4926,17 +5538,22 @@
 {
     /*
         Each major outline portion has it's own main function:
-        I. Interface Initialization     - test_mgr_init
-        II. Create Images               - test_mgr_image
-        III. ID/Ref/Index Functions     - test_mgr_index
-        IV. Interlace Functions         - test_mgr_interlace
-        V. Palette Functions            - test_mgr_lut
-        VI. Special Element Functions   - test_mgr_special
-        VII. Atribute Functions         - test_mgr_attr
+        I. Interface Initialization      - test_mgr_init
+        II. Create Images                - test_mgr_image
+        III. ID/Ref/Index Functions      - test_mgr_index
+        IV. Interlace Functions          - test_mgr_interlace
+        V. Palette Functions             - test_mgr_lut
+        VI. Special Element Functions    - test_mgr_special
+        VII. Atribute Functions          - test_mgr_attr
         VIII. Access to old-style images - test_mgr_old
-        VIII. Compressed images         - test_mgr_compress
-        X.  Chunking write/read test 
-            with enabled compression    - test_mgr_chunkwr
+        IX. Compressed Image Functions   - test_mgr_compress
+        X. DF24 Compatibility tests      - test_mgr_r24
+        XI. DF8 Compatibility tests      - test_mgr_r8
+	XII. DFP Compatibility tests     - test_mgr_pal
+        XIII.  Chunking write/read test
+            with enabled compression     - test_mgr_chunkwr
+	XIV. Szip Compression test       - test_mgr_szip
+
     */
 
     /* Output message about test being performed */
@@ -4954,9 +5571,23 @@
     test_mgr_compress(0);
     test_mgr_r24(0);
     test_mgr_r8(0);
-    test_mgr_chunkwr();
 #ifdef LATER
     test_mgr_pal(0);    /* read in old-style DFP palette tests */
 #endif /* LATER */
+    test_mgr_chunkwr();
+
+#ifdef H4_GR_SZIP
+/* szip not supported for GR */
+#ifdef H4_HAVE_LIBSZ
+
+    test_mgr_szip();   /* write/read with szip compression */
+#else                  /* skip szip test it and report */
+    printf("         -- ***** GR SZIP test skipped *****\n");
+#endif
+#endif
+
+    /* Added after fixing bug #814 to test eliminating of duplicate images */
+    test_mgr_dup_images();
+
 }   /* test_mgr() */
 

Modified: packages/libhdf4/branches/upstream/current/hdf/test/mgrf.f
===================================================================
--- packages/libhdf4/branches/upstream/current/hdf/test/mgrf.f	2007-05-15 09:05:29 UTC (rev 830)
+++ packages/libhdf4/branches/upstream/current/hdf/test/mgrf.f	2007-05-15 09:53:05 UTC (rev 831)
@@ -10,7 +10,7 @@
 C*                                                                          *
 C****************************************************************************
 C
-C $Id: mgrf.f,v 1.27 2000/10/02 19:46:30 epourmal Exp $
+C $Id: mgrf.f,v 1.34 2004/12/21 15:57:05 epourmal Exp $
 C
        subroutine mgrf (num_err)
 C
@@ -42,6 +42,8 @@
 	integer mgatinf, mggattr, mgfndat
       integer mgscatt, mgsnatt, mggcatt, mggnatt
       integer mgwcimg, mgrcimg
+      integer mggnluts
+      
       integer MFGR_INTERLACE_PIXEL, MFGR_INTERLACE_LINE,
      *      MFGR_INTERLACE_COMPONENT
 
@@ -100,6 +102,7 @@
       character attr_c(6), attr2_c(6)
       character cbuf(2,3,4), icbuf(2,3,4)
       integer i, j, k, ret, number_failed
+      integer n_pal
 
       DATA attr_c/'A','T','T','R','_','C'/
       DATA cbuf/'A','B','C','D','E','F','G','H','I','J','K','L',
@@ -134,7 +137,7 @@
       do 157 i=1,2
           do 156 j=1,3
              do 155 k=1,4
-                 icbuf(k, j, i) = ' '
+                 icbuf(i,j,k) = ' '
 155          continue
 156       continue
 157   continue
@@ -241,7 +244,11 @@
       call VRFY(index,'mgn2ndx',number_failed)
       ri_id = mgselct(gr_id,index)
       call VRFY(ri_id,'mgselct',number_failed)
-
+      n_pal = mggnluts(ri_id)
+      call VRFY(ri_id,'mggnluts',number_failed)
+      if(n_pal .ne. 1) then
+         print *, 'Wrong number of palettes returned for IMAGE1'
+      endif
 C Get info about the image
       call MESSAGE(5,'Getting image information')
       ret = mggiinf(ri_id,IMAGE2,n_comp,nt,il,dims,n_attrs)
@@ -318,6 +325,11 @@
       call VRFY(index,'mgn2ndx',number_failed)
       ri_id = mgselct(gr_id,index)
       call VRFY(ri_id,'mgselct',number_failed)
+      n_pal = mggnluts(ri_id)
+      call VRFY(ri_id,'mggnluts',number_failed)
+      if(n_pal .ne. 0) then
+         print *,'Wrong number of palettes returned for IMAGEC'
+      endif
 
 C Get info about the image
       call MESSAGE(5,'Getting image information')
@@ -808,7 +820,7 @@
 C
 C---GR compression function 
 C
-      integer mgscompress
+      integer mgscompress, mggcompress
 C
       integer hopen, hclose
       integer DFACC_CREATE, 
@@ -828,8 +840,8 @@
 C
 C---Compression types and parameters arrays 
 C
-      integer comp_type(N_COMP_TYPES)
-      integer comp_prm(N_COMP_ARG)
+      integer comp_type(N_COMP_TYPES), comp_type_out
+      integer comp_prm(N_COMP_ARG), comp_prm_out(N_COMP_ARG)
 C
 C---Compression parameters
 C
@@ -847,8 +859,8 @@
      .          COMP_CODE_RLE     = 1,
      .          COMP_CODE_SKPHUFF = 3,
      .          COMP_CODE_DEFLATE = 4,
-     .          COMP_CODE_JPEG = 6)
-      parameter (DEFLATE_LEVEL = 1,
+     .          COMP_CODE_JPEG = 7)
+      parameter (DEFLATE_LEVEL = 6,
      .           SKPHUFF_SKP_SIZE = 2)
       parameter (JPEG_QUALITY = 100,
      .           JPEG_COMPATIBILITY = 1)
@@ -1036,7 +1048,7 @@
          print *, 'mgstart failed for', i_comp, '-th data set'
          err_grcompress = err_grcompress +1
       endif 
-      do 2000 i_comp=1, N_COMP_TYPES - 1
+      do 2000 i_comp=1, N_COMP_TYPES 
       index = mgn2ndx(gr_id, name(i_comp))
       if(index .eq. -1 ) then
          print *, 'mgn2ndx failed for',  name(i_comp), ' data set'
@@ -1049,6 +1061,53 @@
          goto 1999
       endif 
 C
+C  Find out type of compression used and compression parameters.
+C
+       status = mggcompress(ri_id(i_comp), comp_type_out, comp_prm_out)
+	    if (status .eq. -1) then
+            print *, 'mggcompress failed for', i, ' -th dataset'
+                err_grcompress = err_grcompress + 1
+            endif
+            if (name(i_comp) .eq. 'Nocomp_data') then
+                if (comp_type_out .ne. COMP_CODE_NONE) then
+            print *, 'wrong compression type for Nocomp_data dataset'
+                err_grcompress = err_grcompress + 1
+                endif
+            endif
+            if (name(i_comp) .eq. 'Rlcomp_data') then
+                if (comp_type_out .ne. COMP_CODE_RLE) then
+            print *, 'wrong compression type for Rlcomp_data dataset'
+                err_grcompress = err_grcompress + 1
+                endif
+            endif
+            if (name(i_comp) .eq. 'Hucomp_data') then
+                if (comp_type_out .ne. COMP_CODE_SKPHUFF) then
+            print *, 'wrong compression type for Hucomp_data dataset'
+                err_grcompress = err_grcompress + 1
+                endif
+                if (comp_prm_out(1). ne. skphuff_skp_size) then
+         print *, 'wrong compression parameter for Hucomp_data dataset'
+                err_grcompress = err_grcompress + 1
+                endif
+
+            endif
+            if (name(i_comp) .eq. 'Gzcomp_data') then
+                if (comp_type_out .ne. COMP_CODE_DEFLATE) then
+          print *, 'wrong compression type for Gzcomp_data dataset'
+                endif
+                if (comp_prm_out(1). ne. deflate_level) then
+          print *, 'wrong compression parameter for Gzcomp_data dataset'
+                err_grcompress = err_grcompress + 1
+                endif
+            endif
+            if (name(i_comp) .eq. 'Jpcomp_data') then
+                if (comp_type_out .ne. COMP_CODE_JPEG) then
+            print *, 'wrong compression type for Jpcomp_data dataset'
+                err_grcompress = err_grcompress + 1
+                endif
+            goto 1111
+            endif
+C
 C     Read the stored data to the image array.
 C
       start(1) = 0
@@ -1077,7 +1136,7 @@
 50    continue
 60    continue
 
-  
+1111  continue  
 C
 C     Terminate access to the array.
 C
@@ -1129,7 +1188,8 @@
 C---GR interface functions
 C
       integer mgstart, mgcreat, mgsnatt,
-     .        mgrdimg, mgn2ndx, mgselct, mgendac, mgend, mgfinfo
+     .        mgrdimg, mgn2ndx, mgselct, mgendac, mgend, mgfinfo,
+     .        mggcompress
 C
 C---GR chunking functions 
 C
@@ -1156,7 +1216,9 @@
 C---Compression types and parameters arrays 
 C
       integer comp_type(N_COMP_TYPES), comp_type_out(N_COMP_TYPES)
+      integer comp_typegr
       integer comp_prm(N_COMP_ARG)
+      integer comp_prm_out(N_COMP_ARG)
 C
 C---Compression parameters
 C
@@ -1171,8 +1233,8 @@
      .          COMP_CODE_RLE     = 1,
      .          COMP_CODE_SKPHUFF = 3,
      .          COMP_CODE_DEFLATE = 4)
-      parameter (DEFLATE_LEVEL = 1,
-     .           SKPHUFF_SKP_SIZE = 2)
+      parameter (DEFLATE_LEVEL = 6,
+     .           SKPHUFF_SKP_SIZE = 3)
 C
 C---Data
 C 
@@ -1228,38 +1290,29 @@
 C 
       data chunk11 / 110, 111, 112, 120, 121, 122,
      .                130, 131, 132, 140, 141, 142,
-     .                150, 151, 152, 160, 161, 162/, 
-     .      chunk21 /
-     .                210, 211, 212, 220, 221, 222,
+     .                150, 151, 152, 160, 161, 162/
+      data chunk21 /  210, 211, 212, 220, 221, 222,
      .                230, 231, 232, 240, 241, 242,
-     .                250, 251, 252, 260, 261, 262
-     .              /,
-     .      chunk52 /
-     .                1010, 1011, 1012, 1020, 1021, 1022,
+     .                250, 251, 252, 260, 261, 262/
+      data chunk52 / 1010, 1011, 1012, 1020, 1021, 1022,
      .                1030, 1031, 1032, 1040, 1041, 1042,
-     .                1050, 1051, 1052, 1060, 1061, 1062
-     .              /,
-     .      data_org /
-     .                110, 111, 112, 120, 121, 122, 
-     .                210, 211, 212, 220, 221, 222, 0,
-     .                 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 
-     .                 0, 0, 0, 0, 0, 0, 0, 
-     .                130, 131, 132, 140,
-     .                141, 142, 230, 231, 232, 240, 241, 242, 
-     .                0, 0, 0, 0, 0, 0, 0, 0, 0,
-     .                0, 0, 0, 0, 0, 0, 0, 0, 0, 
-     .                150, 151, 152, 160, 161, 162, 250, 251,
-     .                252, 260, 261, 262, 0, 0, 0, 0, 0, 0, 0, 
-     .                0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
-     .                0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 
-     .                0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
-     .                1010, 1011, 1012, 1020, 1021, 1022, 
-     .                0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
-     .                0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 
-     .                1030, 1031, 1032, 1040, 1041,
-     .                1042, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 
-     .                0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
-     .                0, 1050, 1051, 1052, 1060, 1061, 1062 /
+     .                1050, 1051, 1052, 1060, 1061, 1062/
+      data data_org /
+     .     110, 111, 112, 120, 121, 122, 210, 211, 212, 220, 221, 222,
+     .     0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+     .     0, 0, 0, 0, 0, 0, 130, 131, 132, 140, 141, 142,
+     .     230, 231, 232, 240, 241, 242, 0, 0, 0, 0, 0, 0,
+     .     0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 
+     .     150, 151, 152, 160, 161, 162, 250, 251, 252, 260, 261, 262,
+     .     0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+     .     0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+     .     0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+     .     0, 0, 0, 0, 0, 0, 1010, 1011, 1012, 1020, 1021, 1022, 
+     .     0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+     .     0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 
+     .     1030, 1031, 1032, 1040, 1041, 1042, 0, 0, 0, 0, 0, 0,
+     .     0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+     .     0, 0, 0, 0, 0, 0, 1050, 1051, 1052, 1060, 1061, 1062/
 C
 C  Initialize compression argument array
 C
@@ -1438,6 +1491,44 @@
          err_grwrchunk = err_grwrchunk +1
          goto 2000 
       endif 
+      status = mggcompress(ri_id(i_comp), comp_typegr, comp_prm_out)
+      if (status .eq. -1) then
+      print *, 'mggcompress failed for', i, ' -th dataset'
+         err_grwrchunk = err_grwrchunk +1
+      endif
+      
+            if (name(i_comp) .eq. 'Nocomp_data') then
+                if (comp_typegr .ne. COMP_CODE_NONE) then
+            print *, 'wrong compression type for Nocomp_data dataset'
+                err_grwrchunk = err_grwrchunk +1
+                endif
+            endif
+            if (name(i_comp) .eq. 'Rlcomp_data') then
+                if (comp_typegr .ne. COMP_CODE_RLE) then
+            print *, 'wrong compression type for Rlcomp_data dataset'
+                err_grwrchunk = err_grwrchunk +1
+                endif
+            endif
+            if (name(i_comp) .eq. 'Hucomp_data') then
+                if (comp_typegr .ne. COMP_CODE_SKPHUFF) then
+            print *, 'wrong compression type for Hucomp_data dataset'
+                err_grwrchunk = err_grwrchunk +1
+                endif
+                if (comp_prm_out(1). ne. skphuff_skp_size) then
+         print *, 'wrong compression parameter for Hucomp_data dataset'
+                err_grwrchunk = err_grwrchunk +1
+                endif
+
+            endif
+            if (name(i_comp) .eq. 'Gzcomp_data') then
+                if (comp_typegr .ne. COMP_CODE_DEFLATE) then
+          print *, 'wrong compression type for Gzcomp_data dataset'
+                endif
+                if (comp_prm_out(1). ne. deflate_level) then
+          print *, 'wrong compression parameter for Gzcomp_data dataset'
+                err_grwrchunk = err_grwrchunk +1
+                endif
+            endif
 C
 C     Read the stored data to the image array.
 C

Modified: packages/libhdf4/branches/upstream/current/hdf/test/nbit.c
===================================================================
--- packages/libhdf4/branches/upstream/current/hdf/test/nbit.c	2007-05-15 09:05:29 UTC (rev 830)
+++ packages/libhdf4/branches/upstream/current/hdf/test/nbit.c	2007-05-15 09:53:05 UTC (rev 831)
@@ -32,10 +32,10 @@
    1/19/94 - Started coding
  */
 
-/* $Id: nbit.c,v 1.17 1996/11/11 20:39:59 koziol Exp $ */
+/* $Id: nbit.c,v 1.21 2003/12/10 21:13:35 epourmal Exp $ */
 
 #ifdef RCSID
-static char RcsId[] = "@(#)$Revision: 1.17 $";
+static char RcsId[] = "@(#)$Revision: 1.21 $";
 #endif
 
 #include "tproto.h"
@@ -201,7 +201,7 @@
           test_val = (uint8) (outbuf[i] & NBIT_MASK1);
           if ((uint8) inbuf[i] != (uint8) test_val)
             {
-                printf("Wrong data at %d, out (%d)%d in %d\n", i, outbuf[i], test_val, inbuf[i]);
+                printf("test_nbit1: Wrong data at %d, out (%d)%d in %d\n", i, outbuf[i], test_val, inbuf[i]);
                 errors++;
             }
       }
@@ -267,7 +267,7 @@
       {
           if ((int8) inbuf[i] != (int8) outbuf[i])
             {
-                printf("Wrong data at %d, out %d in %d\n", i, outbuf[i], inbuf[i]);
+                printf("test_nbit2: Wrong data at %d, out %d in %d\n", i, outbuf[i], inbuf[i]);
                 errors++;
             }
       }
@@ -344,7 +344,7 @@
 #ifndef TESTING
           if ((int16) test_in != (int16) test_out)
             {
-                printf("Wrong data at %d, out (%d)%d in (%d)%d\n", i, outbuf[i], test_out, inbuf[i], test_in);
+                printf("test_nbit3: Wrong data at %d, out (%d)%d in (%d)%d\n", i, outbuf[i], test_out, inbuf[i], test_in);
                 errors++;
             }
 #else
@@ -428,7 +428,7 @@
 #ifndef TESTING
           if ((int16) test_in != (int16) test_out)
             {
-                printf("Wrong data at %d, out (%d)%d in (%d)%d\n", i, outbuf[i], test_out, inbuf[i], test_in);
+                printf("test_nbit4: Wrong data at %d, out (%d)%d in (%d)%d\n", i, outbuf[i], test_out, inbuf[i], test_in);
                 errors++;
             }
 #else
@@ -513,7 +513,7 @@
 #ifndef TESTING
           if ((uint32) test_in != (uint32) test_out)
             {
-                printf("Wrong data at %d, out (%lu)%lu in (%lu)%lu\n", i, (unsigned long) outbuf[i], (unsigned long) test_out, (unsigned long) inbuf[i], (unsigned long) test_in);
+                printf("test_nbit5: Wrong data at %d, out (%lu)%lu in (%lu)%lu\n", i, (unsigned long) outbuf[i], (unsigned long) test_out, (unsigned long) inbuf[i], (unsigned long) test_in);
                 errors++;
             }
 #else
@@ -598,7 +598,7 @@
 #ifndef TESTING
           if ((int32) test_in != (int32) test_out)
             {
-                printf("Wrong data at %d, out (%ld)%ld in (%ld)%ld\n", i, (long) outbuf[i], (long) test_out, (long) inbuf[i], (long) test_in);
+                printf("test_nbit6: Wrong data at %d, out (%ld)%ld in (%ld)%ld\n", i, (long) outbuf[i], (long) test_out, (long) inbuf[i], (long) test_in);
                 errors++;
             }
 #else
@@ -670,7 +670,7 @@
           test_val = (uint8) ((outbuf[i] & NBIT_MASK7A) | NBIT_MASK7B);
           if ((uint8) inbuf[i] != (uint8) test_val)
             {
-                printf("Wrong data at %d, out (%d)%d in %d\n", i, outbuf[i], test_val, inbuf[i]);
+                printf("test_nbit7: Wrong data at %d, out (%d)%d in %d\n", i, outbuf[i], test_val, inbuf[i]);
                 errors++;
             }
       }
@@ -738,7 +738,7 @@
           test_val = (int8) (outbuf[i] | NBIT_MASK8);
           if ((int8) inbuf[i] != (int8) test_val)
             {
-                printf("Wrong data at %d, out (%d:%x)%d in %d\n", i, outbuf[i], outbuf[i], test_val, inbuf[i]);
+                printf("test_nbit8: Wrong data at %d, out (%d:%x)%d in %d\n", i, outbuf[i], outbuf[i], test_val, inbuf[i]);
                 errors++;
             }
       }
@@ -819,7 +819,7 @@
 #ifndef TESTING
           if ((uint16) test_in != (uint16) test_out)
             {
-                printf("Wrong data at %d, out (%d)%d in (%d)%d\n", i, outbuf[i], test_out, inbuf[i], test_in);
+                printf("test_nbit9: Wrong data at %d, out (%d)%d in (%d)%d\n", i, outbuf[i], test_out, inbuf[i], test_in);
                 errors++;
             }
 #else
@@ -899,7 +899,22 @@
 
     for (i = 0; i < NBIT_SIZE10; i++)
       {
-          test_out = (int16) ((outbuf[i] | NBIT_MASK10A) & NBIT_MASK10B);
+/* intel windows c++ compiler has a bug when masking outbuf[i], it extends the
+ * signed bit to all bits of higher 16 bit, so don't use MASK for intel windows
+ * c++ compiler. Kent Yang 09/02/02
+ * The same error occur in the Unix Intel Compiler. Albert Cheng 10/26/02
+ */
+/* Apparently Intel compiler bug was fixed and the fix below causes problems
+ * when optimization is used. We decided to go to the original code that
+ * works now with Intel 7.0 and Intel 7.1 compilers on both UNIX and Windows  
+ * EIP 12/2/03
+#if (defined __INTEL_COMPILER || defined __ICL)
+     test_out = (int16)(outbuf[i] | NBIT_MASK10A);
+#else
+     test_out = (int16) ((outbuf[i] | NBIT_MASK10A) & NBIT_MASK10B);
+#endif
+*/
+     test_out = (int16) ((outbuf[i] | NBIT_MASK10A) & NBIT_MASK10B);
           test_in = (int16) (inbuf[i] & NBIT_MASK10B);
 /* The following ifdef block fixes a compiler bug on the */
 /* HP9000, leave it in! -QAK */
@@ -913,7 +928,7 @@
 #ifndef TESTING
           if ((int16) test_in != (int16) test_out)
             {
-                printf("Wrong data at %d, out (%d)%d in (%d)%d\n", i, outbuf[i], test_out, inbuf[i], test_in);
+                printf("test_nbit10: Wrong data at %d, out (%d)%d in (%d)%d\n", i, outbuf[i], test_out, inbuf[i], test_in);
                 errors++;
             }
 #else
@@ -998,7 +1013,7 @@
 #ifndef TESTING
           if ((uint32) test_in != (uint32) test_out)
             {
-                printf("Wrong data at %d, out (%lu)%lu in (%lu)%lu\n", i, (unsigned long) outbuf[i], (unsigned long) test_out, (unsigned long) inbuf[i], (unsigned long) test_in);
+                printf("test_nbit11: Wrong data at %d, out (%lu)%lu in (%lu)%lu\n", i, (unsigned long) outbuf[i], (unsigned long) test_out, (unsigned long) inbuf[i], (unsigned long) test_in);
                 errors++;
             }
 #else
@@ -1083,7 +1098,7 @@
 #ifndef TESTING
           if ((int32) test_in != (int32) test_out)
             {
-                printf("Wrong data at %d, out (%ld)%ld in (%ld)%ld\n", i, (long) outbuf[i], (long) test_out, (long) inbuf[i], (long) test_in);
+                printf("test_nbit12: Wrong data at %d, out (%ld)%ld in (%ld)%ld\n", i, (long) outbuf[i], (long) test_out, (long) inbuf[i], (long) test_in);
                 errors++;
             }
 #else

Modified: packages/libhdf4/branches/upstream/current/hdf/test/t24f.f
===================================================================
--- packages/libhdf4/branches/upstream/current/hdf/test/t24f.f	2007-05-15 09:05:29 UTC (rev 830)
+++ packages/libhdf4/branches/upstream/current/hdf/test/t24f.f	2007-05-15 09:53:05 UTC (rev 831)
@@ -10,7 +10,7 @@
 C*                                                                          *
 C****************************************************************************
 C
-C $Id: t24f.f,v 1.10 1997/10/24 17:28:00 acheng Exp $
+C $Id: t24f.f,v 1.11 2004/12/21 15:57:06 epourmal Exp $
 C
       subroutine t24f (number_failed)
       implicit none
@@ -229,7 +229,7 @@
       do 600 i=1, 2
           do 580 j=1, 2
               do 560 k = 1, 3
-                  if (in2(k,j,i) .ne. buf2(k,j,i)) then
+                  if (in2(j,i,k) .ne. buf2(j,i,k)) then
                       print *, 'Error at  ', k, j, i
                   endif
 560           continue

Added: packages/libhdf4/branches/upstream/current/hdf/test/tdupimgs.c
===================================================================
--- packages/libhdf4/branches/upstream/current/hdf/test/tdupimgs.c	                        (rev 0)
+++ packages/libhdf4/branches/upstream/current/hdf/test/tdupimgs.c	2007-05-15 09:53:05 UTC (rev 831)
@@ -0,0 +1,164 @@
+#include "hdf.h"
+#include <stdio.h>
+#include "tutils.h"
+
+#define FILE_NAME     "gr_double_test.hdf"
+#define IMAGE_COMP    "Compressed Image"
+#define IMAGE_CHUNK   "Chunked Image"
+#define IMAGE_CMP_CHK "Comp_Chunked Image"
+#define  N_COMPS  3  /* number of components in the image */
+#define N_IMAGES  3  /* currently, 3 images in the file, must be updated as needed */
+#define X_LENGTH 10
+#define Y_LENGTH 10
+
+extern void test_mgr_dup_images()
+{
+    int32 fid, grid, riid, index, il = MFGR_INTERLACE_PIXEL;
+    int32 ncomp=1; 
+    int32 start[2], stride[2], edges[2],dims[2];
+    uint8 image_data[X_LENGTH][Y_LENGTH]; 
+    intn i, j; 
+    intn status; 
+    int32 n_datasets;       /* number of datasets */
+    int32 n_attrs;          /* number of attributes */
+
+    /* Output message about test being performed */
+    MESSAGE(6, printf("Testing eliminating duplicate images\n"););
+
+    MESSAGE(8, printf("Try creating a new file and checking it out\n"););
+
+    /* Create the file. */
+    fid = Hopen(FILE_NAME, DFACC_CREATE, 0); 
+    CHECK(fid, FAIL,"Hopen");
+
+    /* Initiate the GR interface. */
+    grid = GRstart(fid); 
+    CHECK(grid, FAIL, "GRstart");
+
+    /* Define the location, pattern, and size of the data set */
+    dims[0] = X_LENGTH;
+    dims[1] = Y_LENGTH;
+    for (i = 0; i < 2; i++) 
+    {
+	start[i] = 0; 
+	edges[i] = dims[i]; 
+    }
+
+    /* Initialize data we are going to write out, same for all images */
+    for (i = 0; i < Y_LENGTH; i++)
+	for (j = 0; j < X_LENGTH; j++)
+	    image_data[i][j] = (uint8) (i + j);
+
+    /**** Make an image with compressed data ****/
+    {
+	HDF_CHUNK_DEF c_def; 
+	comp_info cinfo;
+	int32 comp_type;
+
+        /* Create the first image in this file */
+        riid=GRcreate(grid, IMAGE_COMP, 1, DFNT_UINT8, il, dims);
+        CHECK(riid, FAIL, "GRcreate");
+
+        /* Set the compression method for the image */
+        comp_type=COMP_CODE_DEFLATE;
+        cinfo.deflate.level=7;
+        status = GRsetcompress(riid, comp_type, &cinfo);
+        CHECK(status, FAIL, "GRsetcompress");
+
+        /* Write the whole image out */
+        start[0]=start[1]=0;
+        stride[0]=stride[1]=1;
+        status = GRwriteimage(riid, start, stride, dims, image_data);
+        CHECK(status, FAIL, "GRreadimage");
+
+        /* Close the image */
+        status = GRendaccess(riid);
+	CHECK(status, FAIL, "GRendaccess");
+    }
+
+    /**** Make an image with chunked  data ****/
+    {
+	int32 comp_flag;
+	HDF_CHUNK_DEF c_def; 
+
+	/* Create the second image */
+	riid=GRcreate(grid, IMAGE_CHUNK, N_COMPS, DFNT_UINT8, il, dims);
+	CHECK(riid, FAIL, "GRcreate");
+
+	/* Make it chunked image */
+	comp_flag = HDF_CHUNK;
+	c_def.chunk_lengths[0] = 3;
+	c_def.chunk_lengths[1] = 2;
+
+	status = GRsetchunk(riid, c_def, comp_flag);
+	CHECK(status, FAIL, "GRsetchunk");
+
+	/* Write data to the entire image */
+	start[0]=start[1]=0;
+	stride[0]=stride[1]=1;
+	status = GRwriteimage(riid, start, stride, dims, image_data);
+	CHECK(status, FAIL, "GRwriteimage");
+
+	/* Terminate access to this image */
+	status = GRendaccess (riid);
+	CHECK(status, FAIL, "GRendaccess");
+    } /* finish creating an image with chunked data */
+
+    /**** Make a GR image with chunked and DEFLATE compressed data */
+    {
+	int32 comp_type, comp_flag;
+	HDF_CHUNK_DEF c_def; 
+	comp_info cinfo;
+
+	/* Create the image */
+	riid = GRcreate(grid, IMAGE_CMP_CHK, 3, DFNT_UINT8, il, dims); 
+	CHECK(riid, FAIL, "GRcreate");
+
+	/* Define the location, pattern, and size of the data set */
+	for (i = 0; i < 2; i++) 
+	{ 
+	    c_def.comp.chunk_lengths[i]=dims[i]/2; 
+	} 
+
+	/* Set info for compression/chunk */
+	c_def.comp.comp_type = COMP_CODE_DEFLATE;
+	comp_flag = HDF_CHUNK|HDF_COMP;
+	c_def.comp.cinfo.deflate.level = 9;
+	status = GRsetchunk(riid,c_def,comp_flag);
+	CHECK(status, FAIL, "GRsetchunk");
+
+	/* Write the stored data to the image array */
+	status = GRwriteimage(riid, start, NULL, edges, (VOIDP)image_data);
+	CHECK(status, FAIL, "GRwriteimage");
+
+	/* Terminate access to the image */
+	status = GRendaccess(riid);
+	CHECK(status, FAIL, "GRendaccess");
+    }
+
+    /* Terminate access to the file */
+    status = GRend(grid);
+    CHECK(status, FAIL, "GRend");
+    status = Hclose(fid);
+    CHECK(status, FAIL, "Hclose");
+
+    /* Open the file again and check its info */
+    fid = Hopen(FILE_NAME, DFACC_READ, 0); 
+    CHECK(fid, FAIL, "Hopen");
+
+    /* Initiate the GR interface. */
+    grid = GRstart(fid); 
+    CHECK(grid, FAIL, "GRstart");
+
+    /* There currently should only be 3 images in the file */
+    status = GRfileinfo(grid,&n_datasets,&n_attrs);
+    CHECK(status, FAIL, "GRfileinfo");
+    VERIFY(n_datasets, N_IMAGES, "GRfileinfo");
+
+    /* Terminate access to the file */
+    status = GRend(grid);
+    CHECK(status, FAIL, "GRend");
+    status = Hclose(fid);
+    CHECK(status, FAIL, "Hclose");
+}
+

Modified: packages/libhdf4/branches/upstream/current/hdf/test/testhdf.c
===================================================================
--- packages/libhdf4/branches/upstream/current/hdf/test/testhdf.c	2007-05-15 09:05:29 UTC (rev 830)
+++ packages/libhdf4/branches/upstream/current/hdf/test/testhdf.c	2007-05-15 09:53:05 UTC (rev 831)
@@ -11,10 +11,10 @@
  ****************************************************************************/
 
 #ifdef RCSID
-static char RcsId[] = "@(#)$Revision: 1.46 $";
+static char RcsId[] = "@(#)$Revision: 1.48 $";
 #endif
 
-/* $Id: testhdf.c,v 1.46 1999/01/13 19:19:39 koziol Exp $ */
+/* $Id: testhdf.c,v 1.48 2005/01/16 21:44:10 mcgrath Exp $ */
 
 /*
    FILE
@@ -162,6 +162,7 @@
     InitTest("sdstr", test_tsdstr, "DATASTRINGS");
     InitTest("slabs", test_slab, "HYPERSLAB INTERFACE");
     InitTest("anot", test_an, "ANNOTATIONS");
+    InitTest("anot_2", test_an_2, "UPDATE ANNOTATIONS");
     InitTest("anfile", test_anfile, "FILE ANNOTATIONS");
     InitTest("manot", test_man, "MULTI-ANNOTATIONS");
     InitTest("nbit", test_nbit, "N-Bit Dataset Interface");
@@ -334,6 +335,6 @@
 #endif  /* OLD_WAY */
 #endif  /* VMS */
       }     /* end if */
-    exit(0);
-    return (0);
+    exit(num_errs);
+    return num_errs;
 }   /* end main() */

Modified: packages/libhdf4/branches/upstream/current/hdf/test/tproto.h
===================================================================
--- packages/libhdf4/branches/upstream/current/hdf/test/tproto.h	2007-05-15 09:05:29 UTC (rev 830)
+++ packages/libhdf4/branches/upstream/current/hdf/test/tproto.h	2007-05-15 09:53:05 UTC (rev 831)
@@ -10,7 +10,7 @@
  *                                                                          *
  ****************************************************************************/
 
-/* $Id: tproto.h,v 1.27 1999/01/13 19:19:40 koziol Exp $ */
+/* $Id: tproto.h,v 1.28 2005/01/16 21:44:11 mcgrath Exp $ */
 
 #ifndef _TPROTO_H
 #define _TPROTO_H
@@ -19,6 +19,7 @@
 #include "tutils.h"
 
 void        test_an(void);
+void        test_an_2(void);
 void        test_anfile(void);
 void        test_man(void);
 void        test_hblocks(void);

Added: packages/libhdf4/branches/upstream/current/hdf/test/tszip.c
===================================================================
--- packages/libhdf4/branches/upstream/current/hdf/test/tszip.c	                        (rev 0)
+++ packages/libhdf4/branches/upstream/current/hdf/test/tszip.c	2007-05-15 09:53:05 UTC (rev 831)
@@ -0,0 +1,1155 @@
+/****************************************************************************
+ * NCSA HDF                                                                 *
+ * Software Development Group                                               *
+ * National Center for Supercomputing Applications                          *
+ * University of Illinois at Urbana-Champaign                               *
+ * 605 E. Springfield, Champaign IL 61820                                   *
+ *                                                                          *
+ * For conditions of distribution and use, see the accompanying             *
+ * hdf/COPYING file.                                                        *
+ *                                                                          *
+ ****************************************************************************/
+
+/*
+ *  SZIP support eliminated for HDF4.2R1
+ */
+#ifdef H4_GR_SZIP
+#include <hdf.h>
+#ifdef H4_HAVE_LIBSZ
+#include "szlib.h"
+#endif
+#include "tutils.h"
+
+
+/*
+ *  NOTE: these tests should be elaborated:
+ *     - use NN and EC options
+ *     - bigger datasets
+ *     - more data types
+ */     
+
+#define  FILE_NAME8     "RI_8_sziped.hdf"
+#define  FILE_NAME16    "RI_16_sziped.hdf"
+#define  FILE_NAME32    "RI_32_sziped.hdf"
+#define  FILE_NAMEfl32  "RI_fl32_sziped.hdf"
+#define  FILE_NAMEfl64  "RI_fl64_sziped.hdf"
+#define  WIDTH 		10    /* number of columns in the image */
+#define  LENGTH		6     /* number of rows in the image */
+#define  N_COMPS	3     /* number of components in the image */
+#define  IMAGE_NAME 	"Sziped_Image"
+
+/* 
+ * Sub-tests for test_mgr_szip():
+ *  test_szip_RI8bit()
+ *  test_szip_RI16bit()
+ *  test_szip_RI32bit()
+ *  test_szip_RIfl32bit()
+ *  test_szip_RIfl64bit()
+ */
+
+/* 
+ * Write/Read szip compressed image with 8-bit integer data
+ */
+static void 
+test_szip_RI8bit()
+{
+#ifdef H4_HAVE_LIBSZ
+   /************************* Variable declaration **************************/
+
+    intn  status;         /* status for functions returning an intn */
+    int32 file_id,        /* HDF file identifier */
+          gr_id,          /* GR interface identifier */
+          ri_id,       	  /* raster image identifier */
+          dim_sizes[2],   /* dimension sizes of the image array */
+          interlace_mode, /* interlace mode of the image */
+          data_type,      /* data type of the image data */
+          index;
+    int32 start[2],
+          edges[2];
+    uint32 comp_config;
+    comp_info cinfo;    /* Compression parameters - union */
+ 
+    comp_coder_t comp_type;
+    int8 out_data[LENGTH][WIDTH][N_COMPS];
+    int8 in_data[LENGTH][WIDTH][N_COMPS]    = {
+		10, 11, 12, 13, 14, 15, 40, 41, 42, 43, 44, 45,  0,
+                 0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0, 
+		 0,  0,  0,  0, 20, 21, 22, 23, 24, 25, 50, 51, 52, 
+		53, 54, 55,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  
+		 0,  0,  0,  0,  0,  0,  0,  0, 30, 31, 32, 33, 34, 
+		35, 60, 61, 62, 63, 64, 65,  0,  0,  0,  0,  0,  0,  
+		 0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  
+		 0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  
+		 0,  0,  0,  0,  0,  0,  0,  0,  0,  0, 70, 71, 72, 
+		73, 74, 75,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  
+		 0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  
+		 0, 80, 81, 82, 83, 84, 85,  0,  0,  0,  0,  0,  0,  
+		 0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  
+		 0,  0,  0,  0,  0, 90, 91, 92, 93, 94, 95};
+
+
+    /********************** End of variable declaration **********************/
+
+    HCget_config_info(COMP_CODE_SZIP, &comp_config);
+    CHECK( (comp_config & COMP_DECODER_ENABLED|COMP_ENCODER_ENABLED),0, "SZIP Compression not available" );
+    /* Create and open the file for sziped data */
+    file_id = Hopen (FILE_NAME8, DFACC_CREATE, 0);
+    CHECK(file_id, FAIL, "Hopen");
+
+    /* Initialize the GR interface */
+    gr_id = GRstart (file_id);
+    CHECK(gr_id, FAIL, "GRstart");
+
+    /* Set the data type, interlace mode, and dimensions of the image */
+    data_type = DFNT_INT8;
+    interlace_mode = MFGR_INTERLACE_PIXEL;
+    dim_sizes[0] = WIDTH;
+    dim_sizes[1] = LENGTH;
+
+    /* Create the raster image array */
+    ri_id = GRcreate (gr_id, IMAGE_NAME, N_COMPS, data_type, 
+                     interlace_mode, dim_sizes);
+    CHECK(ri_id, FAIL, "GRcreate:Failed to create a raster image for szip compression testing");
+
+    /* Define the location, pattern, and size of the data set */
+    start[0] = start[1] = 0;
+    edges[0] = WIDTH;
+    edges[1] = LENGTH;
+
+    /* Initializate for SZIP */
+    comp_type = COMP_CODE_SZIP;
+    cinfo.szip.pixels_per_block = 2;
+    cinfo.szip.options_mask = SZ_EC_OPTION_MASK;
+    cinfo.szip.options_mask |= SZ_MSB_OPTION_MASK;
+    cinfo.szip.options_mask |= SZ_RAW_OPTION_MASK;
+    cinfo.szip.pixels = 0;
+    cinfo.szip.pixels_per_scanline = 0;
+    cinfo.szip.bits_per_pixel = 0;
+
+    /* Set the compression */
+    status = GRsetcompress(ri_id, comp_type, &cinfo);
+    if ((comp_config & COMP_ENCODER_ENABLED) == COMP_ENCODER_ENABLED) {
+	/* should work */
+       CHECK(status, FAIL, "GRsetcompress");
+    } else {
+       /* skip rest of test?? */
+        /* Terminate access to the raster image */
+        status = GRendaccess (ri_id);
+        CHECK(status, FAIL, "GRendaccess");
+
+        /* Terminate access to the GR interface and close the HDF file */
+        status = GRend (gr_id);
+        CHECK(status, FAIL, "GRend");
+        status = Hclose (file_id);
+        CHECK(status, FAIL, "Hclose");
+        MESSAGE(1,printf("test_szip_RI8bit(): %s\n",SKIP_STR););
+       return;  
+    }
+
+    status = GRwriteimage(ri_id, start, NULL, edges, (VOIDP)in_data);
+    CHECK(status, FAIL, "GRwriteimage");
+
+    /* Terminate access to the raster image */
+    status = GRendaccess (ri_id);
+    CHECK(status, FAIL, "GRendaccess");
+
+    /* Terminate access to the GR interface and close the file to
+       flush the compressed info to the file */
+    status = GRend (gr_id);
+    CHECK(status, FAIL, "GRend");
+    status = Hclose (file_id);
+    CHECK(status, FAIL, "Hclose");
+
+    /*
+     * Verify the compressed data
+     */
+
+    /* Reopen the file */
+
+    file_id = Hopen (FILE_NAME8, DFACC_WRITE, 0); 
+    CHECK(file_id, FAIL, "Hopen");
+
+    gr_id = GRstart (file_id);
+    CHECK(gr_id, FAIL, "GRstart");
+
+    /* Find the index of the specified image */
+    index = GRnametoindex(gr_id, IMAGE_NAME);
+    CHECK(index, FAIL, "GRnametoindex");
+   
+    /* Select the image */
+    ri_id = GRselect(gr_id, index);
+    CHECK(ri_id, FAIL, "GRselect");
+
+    /* Get and verify the image's compression information */
+    comp_type = COMP_CODE_INVALID;  /* reset variables before retrieving info */
+    HDmemset(&cinfo,  0, sizeof(cinfo)) ;
+
+    status = GRgetcompress(ri_id, &comp_type, &cinfo);
+    CHECK(status, FAIL, "GRgetcompress");
+    VERIFY(comp_type, COMP_CODE_SZIP, "GRgetcompress");
+
+    /* Wipe out the output buffer */
+    HDmemset(&out_data, 0, sizeof(out_data));
+
+    /* Read the whole image */
+    start[0] = start[1] = 0;
+    edges[0] = WIDTH;
+    edges[1] = LENGTH;
+    status = GRreadimage(ri_id, start, NULL, edges, (VOIDP)out_data);
+    CHECK(status, FAIL, "GRreadimage");
+
+    /* Compare read data against input data */
+    if (0!= HDmemcmp(out_data, in_data, sizeof(in_data)))
+        printf("Error in reading the whole image \n" );
+
+    /* Terminate access to the raster image */
+    status = GRendaccess (ri_id);
+    CHECK(status, FAIL, "GRendaccess");
+
+    /* Terminate access to the GR interface and close the HDF file */
+    status = GRend (gr_id);
+    CHECK(status, FAIL, "GRend");
+    status = Hclose (file_id);
+    CHECK(status, FAIL, "Hclose");
+
+#endif
+}  /* end of test_szip_RI8bit */
+
+/* 
+ * Write/Read szip compressed image with 16-bit integer data
+ */
+static void 
+test_szip_RI16bit()
+{
+#ifdef H4_HAVE_LIBSZ
+   /************************* Variable declaration **************************/
+
+    intn  status;         /* status for functions returning an intn */
+    int32 file_id,        /* HDF file identifier */
+          gr_id,          /* GR interface identifier */
+          ri_id,       	  /* raster image identifier */
+          dim_sizes[2],   /* dimension sizes of the image array */
+          interlace_mode, /* interlace mode of the image */
+          data_type,      /* data type of the image data */
+          index;
+    int32 start[2],
+          edges[2];
+    comp_info cinfo;    /* Compression parameters - union */
+uint32 comp_config;
+
+    comp_coder_t comp_type;
+    int16 out_data[LENGTH][WIDTH][N_COMPS];
+    int16 in_data[LENGTH][WIDTH][N_COMPS]    = {
+		10, 11, 12, 13, 14, 15, 40, 41, 42, 43, 44, 45,  0,
+                 0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0, 
+		 0,  0,  0,  0, 20, 21, 22, 23, 24, 25, 50, 51, 52, 
+		53, 54, 55,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  
+		 0,  0,  0,  0,  0,  0,  0,  0, 30, 31, 32, 33, 34, 
+		35, 60, 61, 62, 63, 64, 65,  0,  0,  0,  0,  0,  0,  
+		 0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  
+		 0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  
+		 0,  0,  0,  0,  0,  0,  0,  0,  0,  0, 70, 71, 72, 
+		73, 74, 75,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  
+		 0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  
+		 0, 80, 81, 82, 83, 84, 85,  0,  0,  0,  0,  0,  0,  
+		 0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  
+		 0,  0,  0,  0,  0, 90, 91, 92, 93, 94, 95};
+
+
+    /********************** End of variable declaration **********************/
+
+    HCget_config_info(COMP_CODE_SZIP, &comp_config);
+    CHECK( (comp_config & COMP_DECODER_ENABLED|COMP_ENCODER_ENABLED),0, "SZIP Compression not available" );
+    /* Create and open the file for sziped data */
+    file_id = Hopen (FILE_NAME16, DFACC_CREATE, 0);
+    CHECK(file_id, FAIL, "Hopen");
+
+    /* Initialize the GR interface */
+    gr_id = GRstart (file_id);
+    CHECK(gr_id, FAIL, "GRstart");
+
+    /* Set the data type, interlace mode, and dimensions of the image */
+    data_type = DFNT_INT16;
+    interlace_mode = MFGR_INTERLACE_PIXEL;
+    dim_sizes[0] = WIDTH;
+    dim_sizes[1] = LENGTH;
+
+    /* Create the raster image array */
+    ri_id = GRcreate (gr_id, IMAGE_NAME, N_COMPS, data_type, 
+                     interlace_mode, dim_sizes);
+    CHECK(ri_id, FAIL, "GRcreate:Failed to create a raster image for szip compression testing");
+
+    /* Define the location, pattern, and size of the data set */
+    start[0] = start[1] = 0;
+    edges[0] = WIDTH;
+    edges[1] = LENGTH;
+
+    /* Initializate for SZIP */
+    comp_type = COMP_CODE_SZIP;
+    cinfo.szip.pixels_per_block = 2;
+    cinfo.szip.options_mask = SZ_EC_OPTION_MASK;
+    cinfo.szip.options_mask |= SZ_MSB_OPTION_MASK;
+    cinfo.szip.options_mask |= SZ_RAW_OPTION_MASK;
+    cinfo.szip.pixels = 0;
+    cinfo.szip.pixels_per_scanline = 0;
+    cinfo.szip.bits_per_pixel = 0;
+ 
+    /* Set the compression */
+    status = GRsetcompress(ri_id, comp_type, &cinfo);
+    if ((comp_config & COMP_ENCODER_ENABLED) == COMP_ENCODER_ENABLED) {
+	/* should work */
+       CHECK(status, FAIL, "GRsetcompress");
+    } else {
+       /* skip rest of test?? */
+        /* Terminate access to the raster image */
+        status = GRendaccess (ri_id);
+        CHECK(status, FAIL, "GRendaccess");
+
+        /* Terminate access to the GR interface and close the HDF file */
+        status = GRend (gr_id);
+        CHECK(status, FAIL, "GRend");
+        status = Hclose (file_id);
+        CHECK(status, FAIL, "Hclose");
+        MESSAGE(1,printf("szip_RI16: %s\n",SKIP_STR););
+       return;  
+    }
+
+    status = GRwriteimage(ri_id, start, NULL, edges, (VOIDP)in_data);
+    CHECK(status, FAIL, "SDwritedata");
+
+    /* Terminate access to the raster image */
+    status = GRendaccess (ri_id);
+    CHECK(status, FAIL, "GRendaccess");
+
+   /* Terminate access to the GR interface and close the file to
+      flush the compressed info to the file */
+    status = GRend (gr_id);
+    CHECK(status, FAIL, "GRend");
+    status = Hclose (file_id);
+    CHECK(status, FAIL, "Hclose");
+
+    /*
+     * Verify the compressed data
+     */
+
+    /* Reopen the file */
+    file_id = Hopen (FILE_NAME16, DFACC_WRITE, 0); 
+    CHECK(file_id, FAIL, "Hopen");
+
+    gr_id = GRstart (file_id);
+    CHECK(gr_id, FAIL, "GRstart");
+
+    /* Find the index of the specified image */
+    index = GRnametoindex(gr_id, IMAGE_NAME);
+    CHECK(index, FAIL, "GRnametoindex");
+   
+    /* Select the image */
+    ri_id = GRselect(gr_id, index);
+    CHECK(ri_id, FAIL, "GRselect");
+
+    /* Get and verify the image's compression information */
+    comp_type = COMP_CODE_INVALID;  /* reset variables before retrieving info */
+    HDmemset(&cinfo,  0, sizeof(cinfo)) ;
+
+    status = GRgetcompress(ri_id, &comp_type, &cinfo);
+    CHECK(status, FAIL, "GRgetcompress");
+    VERIFY(comp_type, COMP_CODE_SZIP, "GRgetcompress");
+
+    /* Wipe out the output buffer */
+    HDmemset(&out_data, 0, sizeof(out_data));
+
+    /* Read the whole image */
+    start[0] = start[1] = 0;
+    edges[0] = WIDTH;
+    edges[1] = LENGTH;
+    status = GRreadimage(ri_id, start, NULL, edges, (VOIDP)out_data);
+    CHECK(status, FAIL, "GRreadimage");
+
+    /* Compare read data against input data */
+    if (0!= HDmemcmp(out_data, in_data, sizeof(in_data)))
+        printf("Error in reading the whole image \n" );
+
+    /* Terminate access to the raster image */
+    status = GRendaccess (ri_id);
+    CHECK(status, FAIL, "GRendaccess");
+
+    /* Terminate access to the GR interface and close the HDF file */
+    status = GRend (gr_id);
+    CHECK(status, FAIL, "GRend");
+    status = Hclose (file_id);
+    CHECK(status, FAIL, "Hclose");
+
+#endif
+}  /* end of test_szip_RI16bit */
+
+/* 
+ * Write/Read szip compressed image with 32-bit integer data
+ */
+static void 
+test_szip_RI32bit()
+{
+#ifdef H4_HAVE_LIBSZ
+   /************************* Variable declaration **************************/
+
+    intn  status;         /* status for functions returning an intn */
+    int32 file_id,        /* HDF file identifier */
+          gr_id,          /* GR interface identifier */
+          ri_id,       	  /* raster image identifier */
+          dim_sizes[2],   /* dimension sizes of the image array */
+          interlace_mode, /* interlace mode of the image */
+          data_type,      /* data type of the image data */
+          index;
+    int32 start[2],
+          edges[2];
+    comp_info cinfo;    /* Compression parameters - union */
+uint32 comp_config;
+
+    comp_coder_t comp_type;
+    int32 out_data[LENGTH][WIDTH][N_COMPS];
+    int32 in_data[LENGTH][WIDTH][N_COMPS]    = {
+		10, 11, 12, 13, 14, 15, 40, 41, 42, 43, 44, 45,  0,
+                 0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0, 
+		 0,  0,  0,  0, 20, 21, 22, 23, 24, 25, 50, 51, 52, 
+		53, 54, 55,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  
+		 0,  0,  0,  0,  0,  0,  0,  0, 30, 31, 32, 33, 34, 
+		35, 60, 61, 62, 63, 64, 65,  0,  0,  0,  0,  0,  0,  
+		 0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  
+		 0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  
+		 0,  0,  0,  0,  0,  0,  0,  0,  0,  0, 70, 71, 72, 
+		73, 74, 75,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  
+		 0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  
+		 0, 80, 81, 82, 83, 84, 85,  0,  0,  0,  0,  0,  0,  
+		 0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  
+		 0,  0,  0,  0,  0, 90, 91, 92, 93, 94, 95};
+
+
+   /********************** End of variable declaration **********************/
+
+    HCget_config_info(COMP_CODE_SZIP, &comp_config);
+    CHECK( (comp_config & COMP_DECODER_ENABLED|COMP_ENCODER_ENABLED),0, "SZIP Compression not available" );
+    /* Create and open the file for sziped data */
+    file_id = Hopen (FILE_NAME32, DFACC_CREATE, 0);
+    CHECK(file_id, FAIL, "Hopen");
+
+    /* Initialize the GR interface */
+    gr_id = GRstart (file_id);
+    CHECK(gr_id, FAIL, "GRstart");
+
+    /* Set the data type, interlace mode, and dimensions of the image */
+    data_type = DFNT_INT32;
+    interlace_mode = MFGR_INTERLACE_PIXEL;
+    dim_sizes[0] = WIDTH;
+    dim_sizes[1] = LENGTH;
+ 
+    /* Create the raster image array */
+    ri_id = GRcreate (gr_id, IMAGE_NAME, N_COMPS, data_type, 
+                     interlace_mode, dim_sizes);
+    CHECK(ri_id, FAIL, "GRcreate:Failed to create a raster image for szip compression testing");
+
+    /* Define the location, pattern, and size of the data set */
+    start[0] = start[1] = 0;
+    edges[0] = WIDTH;
+    edges[1] = LENGTH;
+
+    /* Initializate for SZIP */
+    comp_type = COMP_CODE_SZIP;
+    cinfo.szip.pixels_per_block = 2;
+    cinfo.szip.options_mask = SZ_EC_OPTION_MASK;
+    cinfo.szip.options_mask |= SZ_MSB_OPTION_MASK;
+    cinfo.szip.options_mask |= SZ_RAW_OPTION_MASK;
+    cinfo.szip.pixels = 0;
+    cinfo.szip.pixels_per_scanline = 0;
+    cinfo.szip.bits_per_pixel = 0;
+
+    /* Set the compression */
+    status = GRsetcompress(ri_id, comp_type, &cinfo);
+    if ((comp_config & COMP_ENCODER_ENABLED) == COMP_ENCODER_ENABLED) {
+	/* should work */
+       CHECK(status, FAIL, "GRsetcompress");
+    } else {
+       /* skip rest of test?? */
+        /* Terminate access to the raster image */
+        status = GRendaccess (ri_id);
+        CHECK(status, FAIL, "GRendaccess");
+
+        /* Terminate access to the GR interface and close the HDF file */
+        status = GRend (gr_id);
+        CHECK(status, FAIL, "GRend");
+        status = Hclose (file_id);
+        CHECK(status, FAIL, "Hclose");
+        MESSAGE(1,printf("szip_RI32: %s\n",SKIP_STR););
+       return;  
+    }
+
+    status = GRwriteimage(ri_id, start, NULL, edges, (VOIDP)in_data);
+    CHECK(status, FAIL, "GRwriteimage");
+
+    /* Terminate access to the raster image */
+    status = GRendaccess (ri_id);
+    CHECK(status, FAIL, "GRendaccess");
+
+   /* Terminate access to the GR interface and close the file to
+      flush the compressed info to the file */
+    status = GRend (gr_id);
+    CHECK(status, FAIL, "GRend");
+    status = Hclose (file_id);
+    CHECK(status, FAIL, "Hclose");
+
+    /*
+     * Verify the compressed data
+     */
+
+    /* Reopen the file */
+
+    file_id = Hopen (FILE_NAME32, DFACC_WRITE, 0); 
+    CHECK(file_id, FAIL, "Hopen");
+
+    gr_id = GRstart (file_id);
+    CHECK(gr_id, FAIL, "GRstart");
+
+    /* Find the index of the specified image */
+    index = GRnametoindex(gr_id, IMAGE_NAME);
+    CHECK(index, FAIL, "GRnametoindex");
+   
+    /* Select the image */
+    ri_id = GRselect(gr_id, index);
+    CHECK(ri_id, FAIL, "GRselect");
+
+    /* Get and verify the image's compression information */
+    comp_type = COMP_CODE_INVALID;  /* reset variables before retrieving info */
+    HDmemset(&cinfo,  0, sizeof(cinfo)) ;
+
+    status = GRgetcompress(ri_id, &comp_type, &cinfo);
+    CHECK(status, FAIL, "GRgetcompress");
+    VERIFY(comp_type, COMP_CODE_SZIP, "GRgetcompress");
+
+    /* Wipe out the output buffer */
+    HDmemset(&out_data, 0, sizeof(out_data));
+
+    /* Read the whole image */
+    start[0] = start[1] = 0;
+    edges[0] = WIDTH;
+    edges[1] = LENGTH;
+    status = GRreadimage(ri_id, start, NULL, edges, (VOIDP)out_data);
+    CHECK(status, FAIL, "GRreadimage");
+
+    /* Compare read data against input data */
+    if (0!= HDmemcmp(out_data, in_data, sizeof(in_data)))
+        printf("Error in reading the whole image \n" );
+
+    /* Terminate access to the raster image */
+    status = GRendaccess (ri_id);
+    CHECK(status, FAIL, "GRendaccess");
+
+    /* Terminate access to the GR interface and close the HDF file */
+    status = GRend (gr_id);
+    CHECK(status, FAIL, "GRend");
+    status = Hclose (file_id);
+    CHECK(status, FAIL, "Hclose");
+
+#endif
+}  /* end of test_szip_RI32bit */
+
+/* 
+ * Write/Read szip compressed image with 32-bit floating point data
+ */
+static void 
+test_szip_RIfl32bit()
+{
+#ifdef H4_HAVE_LIBSZ
+   /************************* Variable declaration **************************/
+
+    intn  status;         /* status for functions returning an intn */
+    int32 file_id,        /* HDF file identifier */
+          gr_id,          /* GR interface identifier */
+          ri_id,       	  /* raster image identifier */
+          dim_sizes[2],   /* dimension sizes of the image array */
+          interlace_mode, /* interlace mode of the image */
+          data_type,      /* data type of the image data */
+          index;
+    int32 start[2],
+          edges[2];
+    comp_info cinfo;    /* Compression parameters - union */
+    uint32 comp_config;
+
+    comp_coder_t comp_type;
+    float32 out_data[LENGTH][WIDTH][N_COMPS];
+    float32 in_data[LENGTH][WIDTH][N_COMPS]    = {
+		10.0, 11.0, 12.0, 13.0, 14.0, 15.0, 40.0, 41.0, 42.0, 43.0, 44.0, 45.0,  0.0,
+                 0.0,  0.0,  0.0,  0.0,  0.0,  0.0,  0.0,  0.0,  0.0,  0.0,  0.0,  0.0,  0.0, 
+		 0.0,  0.0,  0.0,  0.0, 20.0, 21.0, 22.0, 23.0, 24.0, 25.0, 50.0, 51.0, 52.0, 
+		53.0, 54.0, 55.0,  0.0,  0.0,  0.0,  0.0,  0.0,  0.0,  0.0,  0.0,  0.0,  0.0,  
+		 0.0,  0.0,  0.0,  0.0,  0.0,  0.0,  0.0,  0.0, 30.0, 31.0, 32.0, 33.0, 34.0, 
+		35.0, 60.0, 61.0, 62.0, 63.0, 64.0, 65.0,  0.0,  0.0,  0.0,  0.0,  0.0,  0.0,  
+		 0.0,  0.0,  0.0,  0.0,  0.0,  0.0,  0.0,  0.0,  0.0,  0.0,  0.0,  0.0,  0.0,  
+		 0.0,  0.0,  0.0,  0.0,  0.0,  0.0,  0.0,  0.0,  0.0,  0.0,  0.0,  0.0,  0.0,  
+		 0.0,  0.0,  0.0,  0.0,  0.0,  0.0,  0.0,  0.0,  0.0,  0.0, 70.0, 71.0, 72.0, 
+		73.0, 74.0, 75.0,  0.0,  0.0,  0.0,  0.0,  0.0,  0.0,  0.0,  0.0,  0.0,  0.0,  
+		 0.0,  0.0,  0.0,  0.0,  0.0,  0.0,  0.0,  0.0,  0.0,  0.0,  0.0,  0.0,  0.0,  
+		 0.0, 80.0, 81.0, 82.0, 83.0, 84.0, 85.0,  0.0,  0.0,  0.0,  0.0,  0.0,  0.0,  
+		 0.0,  0.0,  0.0,  0.0,  0.0,  0.0,  0.0,  0.0,  0.0,  0.0,  0.0,  0.0,  0.0,  
+		 0.0,  0.0,  0.0,  0.0,  0.0, 90.0, 91.0, 92.0, 93.0, 94.0, 95.0};
+
+
+   /********************** End of variable declaration **********************/
+
+    HCget_config_info(COMP_CODE_SZIP, &comp_config);
+    CHECK( (comp_config & COMP_DECODER_ENABLED|COMP_ENCODER_ENABLED),0, "SZIP Compression not available" );
+
+    /* Create and open the file for sziped data */
+    /* Create and open the file for sziped data */
+    file_id = Hopen (FILE_NAMEfl32, DFACC_CREATE, 0);
+    CHECK(file_id, FAIL, "Hopen");
+
+    /* Initialize the GR interface */
+    gr_id = GRstart (file_id);
+    CHECK(gr_id, FAIL, "GRstart");
+
+    /* Set the data type, interlace mode, and dimensions of the image */
+    data_type = DFNT_FLOAT32;
+    interlace_mode = MFGR_INTERLACE_PIXEL;
+    dim_sizes[0] = WIDTH;
+    dim_sizes[1] = LENGTH;
+
+    /* Create the raster image array */
+    ri_id = GRcreate (gr_id, IMAGE_NAME, N_COMPS, data_type, 
+                     interlace_mode, dim_sizes);
+    CHECK(ri_id, FAIL, "GRcreate:Failed to create a raster image for szip compression testing");
+
+    /* Define the location, pattern, and size of the data set */
+    start[0] = start[1] = 0;
+    edges[0] = WIDTH;
+    edges[1] = LENGTH;
+
+    /* Initializate for SZIP */
+    comp_type = COMP_CODE_SZIP;
+    cinfo.szip.pixels_per_block = 2;
+
+    cinfo.szip.options_mask = SZ_EC_OPTION_MASK;
+    cinfo.szip.options_mask |= SZ_MSB_OPTION_MASK;
+    cinfo.szip.options_mask |= SZ_RAW_OPTION_MASK;
+    cinfo.szip.pixels = 0;
+    cinfo.szip.pixels_per_scanline = 0;
+    cinfo.szip.bits_per_pixel = 0;
+ 
+    /* Set the compression */
+    status = GRsetcompress(ri_id, comp_type, &cinfo);
+    if ((comp_config & COMP_ENCODER_ENABLED) == COMP_ENCODER_ENABLED) {
+	/* should work */
+       CHECK(status, FAIL, "GRsetcompress");
+    } else {
+       /* skip rest of test?? */
+        /* Terminate access to the raster image */
+        status = GRendaccess (ri_id);
+        CHECK(status, FAIL, "GRendaccess");
+
+        /* Terminate access to the GR interface and close the HDF file */
+        status = GRend (gr_id);
+        CHECK(status, FAIL, "GRend");
+        status = Hclose (file_id);
+        CHECK(status, FAIL, "Hclose");
+        MESSAGE(1,printf("szip_RIflt32: %s\n",SKIP_STR););
+       return;  
+    }
+
+    status = GRwriteimage(ri_id, start, NULL, edges, (VOIDP)in_data);
+    CHECK(status, FAIL, "GRwriteimage");
+
+    /* Terminate access to the raster image */
+    status = GRendaccess (ri_id);
+    CHECK(status, FAIL, "GRendaccess");
+
+   /* Terminate access to the GR interface and close the file to
+      flush the compressed info to the file */
+    status = GRend (gr_id);
+    CHECK(status, FAIL, "GRend");
+    status = Hclose (file_id);
+    CHECK(status, FAIL, "Hclose");
+
+    /*
+     * Verify the compressed data
+     */
+
+    /* Reopen the file */
+    file_id = Hopen (FILE_NAMEfl32, DFACC_WRITE, 0); 
+    CHECK(file_id, FAIL, "Hopen");
+
+    gr_id = GRstart (file_id);
+    CHECK(gr_id, FAIL, "GRstart");
+
+    /* Find the index of the specified image */
+    index = GRnametoindex(gr_id, IMAGE_NAME);
+    CHECK(index, FAIL, "GRnametoindex");
+   
+    /* Select the image */
+    ri_id = GRselect(gr_id, index);
+    CHECK(ri_id, FAIL, "GRselect");
+
+    /* Get and verify the image's compression information */
+    comp_type = COMP_CODE_INVALID;  /* reset variables before retrieving info */
+    HDmemset(&cinfo,  0, sizeof(cinfo)) ;
+
+    status = GRgetcompress(ri_id, &comp_type, &cinfo);
+    CHECK(status, FAIL, "GRgetcompress");
+    VERIFY(comp_type, COMP_CODE_SZIP, "GRgetcompress");
+
+    /* Wipe out the output buffer */
+    HDmemset(&out_data, 0, sizeof(out_data));
+
+    /* Read the whole image */
+    start[0] = start[1] = 0;
+    edges[0] = WIDTH;
+    edges[1] = LENGTH;
+    status = GRreadimage(ri_id, start, NULL, edges, (VOIDP)out_data);
+    CHECK(status, FAIL, "GRreadimage");
+
+    /* Compare read data against input data */
+    if (0!= HDmemcmp(out_data, in_data, sizeof(in_data)))
+        printf("Error in reading the whole image \n" );
+
+    /* Terminate access to the raster image */
+    status = GRendaccess (ri_id);
+    CHECK(status, FAIL, "GRendaccess");
+
+    /* Terminate access to the GR interface and close the HDF file */
+    status = GRend (gr_id);
+    CHECK(status, FAIL, "GRend");
+    status = Hclose (file_id);
+    CHECK(status, FAIL, "Hclose");
+
+#endif
+}  /* end of test_szip_RIfl32bit */
+
+/* 
+ * Write/Read szip compressed image with 64-bit floating point data
+ */
+static void 
+test_szip_RIfl64bit()
+{
+#ifdef H4_HAVE_LIBSZ
+   /************************* Variable declaration **************************/
+
+    intn  status;         /* status for functions returning an intn */
+    int32 file_id,        /* HDF file identifier */
+          gr_id,          /* GR interface identifier */
+          ri_id,       	  /* raster image identifier */
+          dim_sizes[2],   /* dimension sizes of the image array */
+          interlace_mode, /* interlace mode of the image */
+          data_type,      /* data type of the image data */
+          index;
+    int32 start[2],
+          edges[2];
+    comp_info cinfo;    /* Compression parameters - union */
+    uint32 comp_config;
+
+    comp_coder_t comp_type;
+    float64 out_data[LENGTH][WIDTH][N_COMPS];
+    float64 in_data[LENGTH][WIDTH][N_COMPS]    = {
+		10.0, 11.0, 12.0, 13.0, 14.0, 15.0, 40.0, 41.0, 42.0, 43.0, 44.0, 45.0,  0.0,
+                 0.0,  0.0,  0.0,  0.0,  0.0,  0.0,  0.0,  0.0,  0.0,  0.0,  0.0,  0.0,  0.0, 
+		 0.0,  0.0,  0.0,  0.0, 20.0, 21.0, 22.0, 23.0, 24.0, 25.0, 50.0, 51.0, 52.0, 
+		53.0, 54.0, 55.0,  0.0,  0.0,  0.0,  0.0,  0.0,  0.0,  0.0,  0.0,  0.0,  0.0,  
+		 0.0,  0.0,  0.0,  0.0,  0.0,  0.0,  0.0,  0.0, 30.0, 31.0, 32.0, 33.0, 34.0, 
+		35.0, 60.0, 61.0, 62.0, 63.0, 64.0, 65.0,  0.0,  0.0,  0.0,  0.0,  0.0,  0.0,  
+		 0.0,  0.0,  0.0,  0.0,  0.0,  0.0,  0.0,  0.0,  0.0,  0.0,  0.0,  0.0,  0.0,  
+		 0.0,  0.0,  0.0,  0.0,  0.0,  0.0,  0.0,  0.0,  0.0,  0.0,  0.0,  0.0,  0.0,  
+		 0.0,  0.0,  0.0,  0.0,  0.0,  0.0,  0.0,  0.0,  0.0,  0.0, 70.0, 71.0, 72.0, 
+		73.0, 74.0, 75.0,  0.0,  0.0,  0.0,  0.0,  0.0,  0.0,  0.0,  0.0,  0.0,  0.0,  
+		 0.0,  0.0,  0.0,  0.0,  0.0,  0.0,  0.0,  0.0,  0.0,  0.0,  0.0,  0.0,  0.0,  
+		 0.0, 80.0, 81.0, 82.0, 83.0, 84.0, 85.0,  0.0,  0.0,  0.0,  0.0,  0.0,  0.0,  
+		 0.0,  0.0,  0.0,  0.0,  0.0,  0.0,  0.0,  0.0,  0.0,  0.0,  0.0,  0.0,  0.0,  
+		 0.0,  0.0,  0.0,  0.0,  0.0, 90.0, 91.0, 92.0, 93.0, 94.0, 95.0};
+
+
+    /********************** End of variable declaration **********************/
+
+    HCget_config_info(COMP_CODE_SZIP, &comp_config);
+    CHECK( (comp_config & COMP_DECODER_ENABLED|COMP_ENCODER_ENABLED),0, "SZIP Compression not available" );
+
+    /* Create and open the file for sziped data */
+    /* Create and open the file for sziped data */
+    file_id = Hopen (FILE_NAMEfl64, DFACC_CREATE, 0);
+    CHECK(file_id, FAIL, "Hopen");
+
+    /* Initialize the GR interface */
+    gr_id = GRstart (file_id);
+    CHECK(gr_id, FAIL, "GRstart");
+
+    /* Set the data type, interlace mode, and dimensions of the image */
+    data_type = DFNT_FLOAT64;
+    interlace_mode = MFGR_INTERLACE_PIXEL;
+    dim_sizes[0] = WIDTH;
+    dim_sizes[1] = LENGTH;
+ 
+    /* Create the raster image array */
+    ri_id = GRcreate (gr_id, IMAGE_NAME, N_COMPS, data_type, 
+                     interlace_mode, dim_sizes);
+    CHECK(ri_id, FAIL, "GRcreate:Failed to create a raster image for szip compression testing");
+
+    /* Define the location, pattern, and size of the data set */
+    start[0] = start[1] = 0;
+    edges[0] = WIDTH;
+    edges[1] = LENGTH;
+ 
+    /* Initializate for SZIP */
+    comp_type = COMP_CODE_SZIP;
+    cinfo.szip.pixels_per_block = 2;
+ 
+    cinfo.szip.options_mask = SZ_EC_OPTION_MASK;
+    cinfo.szip.options_mask |= SZ_MSB_OPTION_MASK;
+    cinfo.szip.options_mask |= SZ_RAW_OPTION_MASK;
+    cinfo.szip.pixels = 0;
+    cinfo.szip.pixels_per_scanline = 0;
+    cinfo.szip.bits_per_pixel = 0;
+
+    /* Set the compression */
+    status = GRsetcompress(ri_id, comp_type, &cinfo);
+    if ((comp_config & COMP_ENCODER_ENABLED) == COMP_ENCODER_ENABLED) {
+	/* should work */
+       CHECK(status, FAIL, "GRsetcompress");
+    } else {
+       /* skip rest of test?? */
+        /* Terminate access to the raster image */
+        status = GRendaccess (ri_id);
+        CHECK(status, FAIL, "GRendaccess");
+
+        /* Terminate access to the GR interface and close the HDF file */
+        status = GRend (gr_id);
+        CHECK(status, FAIL, "GRend");
+        status = Hclose (file_id);
+        CHECK(status, FAIL, "Hclose");
+        MESSAGE(1,printf("szip_RIflt 64: %s\n",SKIP_STR););
+       return;  
+    }
+
+    status = GRwriteimage(ri_id, start, NULL, edges, (VOIDP)in_data);
+    CHECK(status, FAIL, "GRwriteimage");
+
+    /* Terminate access to the raster image */
+    status = GRendaccess (ri_id);
+    CHECK(status, FAIL, "GRendaccess");
+
+    /* Terminate access to the GR interface and close the file to
+      flush the compressed info to the file */
+    status = GRend (gr_id);
+    CHECK(status, FAIL, "GRend");
+    status = Hclose (file_id);
+    CHECK(status, FAIL, "Hclose");
+
+    /*
+     * Verify the compressed data
+     */
+
+    /* Reopen the file */
+    file_id = Hopen (FILE_NAMEfl64, DFACC_WRITE, 0); 
+    CHECK(file_id, FAIL, "Hopen");
+
+    gr_id = GRstart (file_id);
+    CHECK(gr_id, FAIL, "GRstart");
+
+    /* Find the index of the specified image */
+    index = GRnametoindex(gr_id, IMAGE_NAME);
+    CHECK(index, FAIL, "GRnametoindex");
+   
+    /* Select the image */
+    ri_id = GRselect(gr_id, index);
+    CHECK(ri_id, FAIL, "GRselect");
+
+    /* Get and verify the image's compression information */
+    comp_type = COMP_CODE_INVALID;  /* reset variables before retrieving info */
+    HDmemset(&cinfo,  0, sizeof(cinfo)) ;
+
+    status = GRgetcompress(ri_id, &comp_type, &cinfo);
+    CHECK(status, FAIL, "GRgetcompress");
+    VERIFY(comp_type, COMP_CODE_SZIP, "GRgetcompress");
+
+    /* Wipe out the output buffer */
+    HDmemset(&out_data, 0, sizeof(out_data));
+
+    /* Read the whole image */
+    start[0] = start[1] = 0;
+    edges[0] = WIDTH;
+    edges[1] = LENGTH;
+    status = GRreadimage(ri_id, start, NULL, edges, (VOIDP)out_data);
+    CHECK(status, FAIL, "GRreadimage");
+
+    /* Compare read data against input data */
+    if (0!= HDmemcmp(out_data, in_data, sizeof(in_data)))
+        printf("Error in reading the whole image \n" );
+
+    /* Terminate access to the raster image */
+    status = GRendaccess (ri_id);
+    CHECK(status, FAIL, "GRendaccess");
+
+    /* Terminate access to the GR interface and close the HDF file */
+    status = GRend (gr_id);
+    CHECK(status, FAIL, "GRend");
+    status = Hclose (file_id);
+    CHECK(status, FAIL, "Hclose");
+
+#endif
+}  /* end of test_szip_RIfl64bit */
+
+/*
+* This function tests GR chunking write/read operations for the
+* szip compressions
+*/                    
+#define  CHKSZIPFILE	"RIchunkedsziped.hdf"
+#define  WIDTH_CH	10    /* number of columns in the image */
+#define  LENGTH_CH	 6    /* number of rows in the image */
+
+static void 
+test_szip_chunk()
+{
+#ifdef H4_HAVE_LIBSZ
+
+    /************************* Variable declaration **************************/
+
+    intn  status;         /* status for functions returning an intn */
+    int32 file_id,        /* HDF file identifier */
+          gr_id,          /* GR interface identifier */
+          ri_id,       /* raster image identifier */
+          origin[2],      /* start position to write for each dimension */
+          dim_sizes[2],   /* dimension sizes of the image array */
+          interlace_mode, /* interlace mode of the image */
+          data_type,      /* data type of the image data */
+          comp_flag,      /* compression flag */
+          index;
+    int32 start[2],
+          stride[2],
+          edge[2];
+    comp_info cinfo_out;    /* Compression parameters - union */
+    uint32 comp_config;
+    comp_coder_t comp_type;
+    int8 data_out[N_COMPS*LENGTH_CH*WIDTH_CH];
+    char *image_name = "Image_chunked_sziped";
+    HDF_CHUNK_DEF chunk_def;
+    int8 chunk_buf[18];
+
+    /* 
+     * Initialize data for RI
+     */
+    int8 chunk00[] = {10, 11, 12, 13, 14, 15,
+                      20, 21, 22, 23, 24, 25,
+                      30, 31, 32, 33, 34, 35 };
+ 
+ 
+    int8 chunk01[] = {40, 41, 42, 43, 44, 45,
+                      50, 51, 52, 53, 54, 55,
+                      60, 61, 62, 63, 64, 65};
+ 
+    int8 chunk14[] = {70, 71, 72, 73, 74, 75,
+                      80, 81, 82, 83, 84, 85,
+                      90, 91, 92, 93, 94, 95};
+
+    int8 data[]    = {
+		10, 11, 12, 13, 14, 15, 40, 41, 42, 43, 44, 45,  0,
+                 0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0, 
+		 0,  0,  0,  0, 20, 21, 22, 23, 24, 25, 50, 51, 52, 
+		53, 54, 55,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  
+		 0,  0,  0,  0,  0,  0,  0,  0, 30, 31, 32, 33, 34, 
+		35, 60, 61, 62, 63, 64, 65,  0,  0,  0,  0,  0,  0,  
+		 0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  
+		 0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  
+		 0,  0,  0,  0,  0,  0,  0,  0,  0,  0, 70, 71, 72, 
+		73, 74, 75,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  
+		 0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  
+		 0, 80, 81, 82, 83, 84, 85,  0,  0,  0,  0,  0,  0,  
+		 0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  0,  
+		 0,  0,  0,  0,  0, 90, 91, 92, 93, 94, 95};
+
+
+    /********************** End of variable declaration **********************/
+
+    HCget_config_info(COMP_CODE_SZIP, &comp_config);
+    CHECK( (comp_config & COMP_DECODER_ENABLED|COMP_ENCODER_ENABLED),0, "SZIP Compression not available" );
+    /* Create and open the file for sziped data */
+    /* Create and open the file for chunked and sziped data. */
+    file_id = Hopen (CHKSZIPFILE, DFACC_CREATE, 0);
+    CHECK(file_id, FAIL, "Hopen");
+
+    /* Initialize the GR interface. */
+    gr_id = GRstart (file_id);
+    CHECK(gr_id, FAIL, "GRstart");
+
+    /* Set the data type, interlace mode, and dimensions of the image. */
+    data_type = DFNT_INT8;
+    interlace_mode = MFGR_INTERLACE_PIXEL;
+    dim_sizes[0] = LENGTH_CH;
+    dim_sizes[1] = WIDTH_CH;
+ 
+    /* Create the raster image array. */
+    ri_id = GRcreate (gr_id, image_name, N_COMPS, data_type, 
+                      interlace_mode, dim_sizes);
+    CHECK(ri_id, FAIL, "GRcreate");
+ 
+    /* Create chunked image array. */
+    comp_flag = HDF_CHUNK | HDF_COMP;
+    chunk_def.comp.chunk_lengths[0] = 3;
+    chunk_def.comp.chunk_lengths[1] = 2;
+    chunk_def.comp.comp_type = COMP_CODE_SZIP;
+    chunk_def.comp.cinfo.szip.pixels_per_block = 2;
+
+    chunk_def.comp.cinfo.szip.options_mask = SZ_EC_OPTION_MASK;
+    chunk_def.comp.cinfo.szip.options_mask |= SZ_MSB_OPTION_MASK;
+    chunk_def.comp.cinfo.szip.options_mask |= SZ_RAW_OPTION_MASK;
+    chunk_def.comp.cinfo.szip.pixels = 0;
+    chunk_def.comp.cinfo.szip.pixels_per_scanline = 0;
+    chunk_def.comp.cinfo.szip.bits_per_pixel = 0;
+ 
+    status = GRsetchunk(ri_id, chunk_def, comp_flag);
+    if ((comp_config & COMP_ENCODER_ENABLED) == COMP_ENCODER_ENABLED) {
+	/* should work */
+       CHECK(status, FAIL, "GRsetchunk");
+    } else {
+       /* skip rest of test?? */
+        /* Terminate access to the raster image */
+        status = GRendaccess (ri_id);
+        CHECK(status, FAIL, "GRendaccess");
+
+        /* Terminate access to the GR interface and close the HDF file */
+        status = GRend (gr_id);
+        CHECK(status, FAIL, "GRend");
+        status = Hclose (file_id);
+        CHECK(status, FAIL, "Hclose");
+        MESSAGE(1,printf("szip RI chunk: %s\n",SKIP_STR););
+       return;  
+    }
+
+    /* Write first data chunk ( 0, 0 ). */
+    origin[0] = origin[1] = 0;
+    status = GRwritechunk(ri_id, origin, (VOIDP)chunk00);
+    CHECK(status, FAIL, "GRwritechunk");
+ 
+    /* Write second data chunk ( 0, 1 ). */
+    origin[0] = 0; origin[1] = 1;
+    status = GRwritechunk(ri_id, origin, (VOIDP)chunk01);
+    CHECK(status, FAIL, "GRwritechunk");
+
+    /* Write third data chunk ( 1, 4 ). */
+    origin[0] = 1; origin[1] = 4;
+    status = GRwritechunk(ri_id, origin, (VOIDP)chunk14);
+    CHECK(status, FAIL, "GRwritechunk");
+
+    /* Terminate accesses and close the HDF file. */
+    status = GRendaccess (ri_id);
+    CHECK(status, FAIL, "GRendaccess");
+    status = GRend (gr_id);
+    CHECK(status, FAIL, "GRend");
+    status = Hclose (file_id);
+    CHECK(status, FAIL, "Hclose");
+
+    /*
+     * Verify the compressed data
+     */
+
+    /* Reopen the file.  */
+    file_id = Hopen (CHKSZIPFILE, DFACC_WRITE, 0); 
+    CHECK(file_id, FAIL, "Hopen");
+
+    /* Initialize the GR interface. */
+    gr_id = GRstart (file_id);
+    CHECK(gr_id, FAIL, "GRstart");
+ 
+    /* Find the index of the specified image. */
+    index = GRnametoindex(gr_id, image_name);
+    CHECK(index, FAIL, "GRnametoindex");
+   
+    /* Select the image. */
+    ri_id = GRselect(gr_id, index);
+    CHECK(ri_id, FAIL, "GRselect");
+
+    /* Get and verify the image's compression information. */
+    comp_type = COMP_CODE_INVALID;  /* reset variables before retrieving info */
+    HDmemset(&cinfo_out,  0, sizeof(cinfo_out)) ;
+
+    status = GRgetcompress(ri_id, &comp_type, &cinfo_out);
+    CHECK(status, FAIL, "GRgetcompress");
+    VERIFY(comp_type, COMP_CODE_SZIP, "GRgetcompress");
+
+    /* Read first chunk back and compare with input chunk. */
+    origin[0] = 0; origin[1] = 0;
+    status = GRreadchunk(ri_id, origin, (VOIDP)chunk_buf);
+    CHECK(status, FAIL, "GRreadchunk");
+    if (0 != HDmemcmp(chunk_buf, chunk00 , sizeof(chunk00)))
+    {
+	printf("Error in reading chunk 00\n" );
+        num_errs++;
+    }
+
+    /* Read second chunk back and compare with input chunk. */
+    origin[0] = 0; origin[1] = 1;
+    status = GRreadchunk(ri_id, origin, (VOIDP)chunk_buf);
+    CHECK(status, FAIL, "GRreadchunk");
+    if (0 != HDmemcmp(chunk_buf, chunk01 , sizeof(chunk01)))
+    {
+        printf("Error in reading chunk 01\n" );
+        num_errs++;
+    }
+
+    /* Read third chunk back and compare with input chunk. */
+    origin[0] = 1; origin[1] = 4;
+    status = GRreadchunk(ri_id, origin, (VOIDP)chunk_buf);
+    CHECK(status, FAIL, "GRreadchunk");
+    if (0 != HDmemcmp(chunk_buf, chunk14 , sizeof(chunk14)))
+    {
+        printf("Error in reading chunk 14\n" );
+        num_errs++;
+    }
+
+    /* Read the whole image. */
+    start[0] = start[1] = 0;
+    stride[0] = stride[1] = 1;
+    edge[0] = LENGTH_CH;
+    edge[1] = WIDTH_CH;
+    status = GRreadimage(ri_id, start, stride, edge, (VOIDP)data_out);
+    CHECK(status, FAIL, "GRreadimage");
+    if (0!= HDmemcmp(data_out, data, sizeof(data)))
+    {
+        printf("Error in reading the whole image \n" );
+        num_errs++;
+    }
+
+    /* Terminate accesses and close the HDF file. */
+    status = GRendaccess (ri_id);
+    CHECK(status, FAIL, "GRendaccess");
+    status = GRend (gr_id);
+    CHECK(status, FAIL, "GRend");
+    status = Hclose (file_id);
+    CHECK(status, FAIL, "Hclose");
+#endif
+}  /* end of test_szip_chunk */
+
+/****************************************************************
+ * 
+ *   test_mgr_szip(): SZIP Compression tests
+ * 
+ *   XIV. GR write/read szip compression tests with different data types
+ *        and with chunked data
+ *       A. Write/Read szip compressed image with 8-bit integer data type
+ *       B. Write/Read szip compressed image with 16-bit integer data type
+ *       C. Write/Read szip compressed image with 32-bit integer data type
+ *       D. Write/Read szip compressed image with 32-bit floating point data type
+ *       E. Write/Read szip compressed image with 64-bit floating point data type
+ *       F. Write/Read image with chunked and sziped data
+ * 
+ * ****************************************************************/
+extern void
+test_mgr_szip()
+{
+#ifdef H4_HAVE_LIBSZ
+    /* Output message about test being performed */
+    MESSAGE(6, printf("Testing GR szip compression WRITE/READ\n"););
+
+    test_szip_RI8bit();
+    test_szip_RI16bit();
+    test_szip_RI32bit();
+    test_szip_RIfl32bit();
+    test_szip_RIfl64bit();
+    test_szip_chunk();
+#else
+    /* Output message about test being performed */
+    MESSAGE(6, printf("Skipping GR szip compression WRITE/READ\n"););
+#endif
+} 
+#endif

Modified: packages/libhdf4/branches/upstream/current/hdf/test/tvattr.c
===================================================================
--- packages/libhdf4/branches/upstream/current/hdf/test/tvattr.c	2007-05-15 09:05:29 UTC (rev 830)
+++ packages/libhdf4/branches/upstream/current/hdf/test/tvattr.c	2007-05-15 09:53:05 UTC (rev 831)
@@ -11,10 +11,10 @@
  *******************************************************************/
 
 #ifdef RCSID
-static char RcsId[] = "@(#)$Revision: 1.11 $";
+static char RcsId[] = "@(#)$Revision: 1.12 $";
 #endif
 
-/* $Id: tvattr.c,v 1.11 1998/02/02 18:44:52 pharten Exp $ */
+/* $Id: tvattr.c,v 1.12 2004/11/05 05:19:14 bmribler Exp $ */
 
 /**************************************************************
 *
@@ -384,6 +384,24 @@
          num_errs++;
          return FAIL;
   }
+  /* attach again with "r" access to test VSsetattr on "r" access vdata 
+     BMR - Nov 4, 2004 */
+  if (FAIL == (vsref = VSfind(fid, VSNAME0)))  {
+         num_errs++;
+         return FAIL;
+      }
+  if (FAIL == (vsid = VSattach(fid, vsref, "r")))  {
+         num_errs++;
+         return FAIL;
+      }
+  if (FAIL != VSsetattr(vsid, 1, "NO ATTRIBUTE", DFNT_FLOAT32,1, &attr4[1])) {
+         num_errs++;
+         printf(">>> VSsetattr did not fail on read access vdata.\n");
+      }
+  if (FAIL == VSdetach(vsid)) {
+         num_errs++;
+         return FAIL;
+  }
    /* create vgroup and add attrs */
    if (FAIL == (vgid = (Vattach(fid, -1, "w"))))   {
          num_errs++;

Modified: packages/libhdf4/branches/upstream/current/hdf/test/tvattrf.f
===================================================================
--- packages/libhdf4/branches/upstream/current/hdf/test/tvattrf.f	2007-05-15 09:05:29 UTC (rev 830)
+++ packages/libhdf4/branches/upstream/current/hdf/test/tvattrf.f	2007-05-15 09:53:05 UTC (rev 831)
@@ -19,7 +19,7 @@
 C   *
 C***************************************************
 C
-C $Id: tvattrf.f,v 1.15 1998/03/05 00:24:46 pharten Exp $
+C $Id: tvattrf.f,v 1.16 2003/12/10 21:13:36 epourmal Exp $
 C
 C **************************************************
 C *
@@ -39,6 +39,8 @@
 
       integer number_failed
 
+      integer len_in
+      character*1024 ifn_out
       character*20 myname, ifn, ofn
       parameter (myname = 'vattrf',
      +           ifn = 'tvattr.dat' ,
@@ -57,6 +59,7 @@
       integer nattrs, itype, icount, imsize, vsver
       integer fid1, vsid, vgid, vsref, vgref
       integer ret, findex, vsbuf, aindex
+      integer fixname
 C
 C iattri is for int32 values
 C iattrs is for int16 values
@@ -95,7 +98,9 @@
       call ptestban('Testing', myname)
 C      number_failed = 0
 C Open the file 
-      fid1 = hopen(ifn, DFACC_RDWR, 0)
+      len_in = len(ifn_out)
+      ret = fixname(ifn, ifn_out, len_in)
+      fid1 = hopen(ifn_out(1:len_in), DFACC_RDWR, 0)
       call VRFY(fid1, 'hopen', number_failed)
       ret = vfstart(fid1)
       call VRFY(ret, 'vfstart', number_failed)

Modified: packages/libhdf4/branches/upstream/current/hdf/test/tvset.c
===================================================================
--- packages/libhdf4/branches/upstream/current/hdf/test/tvset.c	2007-05-15 09:05:29 UTC (rev 830)
+++ packages/libhdf4/branches/upstream/current/hdf/test/tvset.c	2007-05-15 09:53:05 UTC (rev 831)
@@ -11,10 +11,10 @@
  ****************************************************************************/
 
 #ifdef RCSID
-static char RcsId[] = "@(#)$Revision: 1.35 $";
+static char RcsId[] = "@(#)$Revision: 1.37 $";
 #endif
 
-/* $Id: tvset.c,v 1.35 1998/12/08 21:37:53 koziol Exp $ */
+/* $Id: tvset.c,v 1.37 2001/07/03 05:27:40 bmribler Exp $ */
 
 /*
  *
@@ -37,6 +37,7 @@
 #define FNAME2   "tvset2.hdf"
 #define EXTFNM	 "tvsetext.hdf"
 #define EMPTYNM  "tvsempty.hdf"
+#define BLKINFO  "tvsblkinfo.hdf"
 
 #define FIELD1       "FIELD_name_HERE"
 #define FIELD1_UPPER "FIELD_NAME_HERE"
@@ -47,6 +48,7 @@
 #define FL "FLOATS"
 #define MX "STATION_NAME,VALUES,FLOATS"
 #define EMPTY_VDATA "Empty"
+#define APPENDABLE_VDATA "Appendable"
 
 static int32 write_vset_stuff(void);
 static int32 read_vset_stuff(void);
@@ -245,6 +247,11 @@
     status=VSfdefine(vs1, FIELD1, DFNT_FLOAT32, 1);
     CHECK(status,FAIL,"VSfdefine");
 
+    /* Verify that VSsetfields will return FAIL when passing in a NULL
+       for field name list (bug #554) - BMR 5/17/01 */
+    status = VSsetfields(vs1, NULL);
+    VERIFY(status, FAIL, "VSsetfields");
+
     status = VSsetfields(vs1, FIELD1);
     if (status == FAIL)
       {
@@ -1665,7 +1672,6 @@
 
 } /* test_vdeletetagref */
 
-
 static void
 test_emptyvdata(void)
 {
@@ -1736,6 +1742,12 @@
     status=VFnfields(vs1);
     VERIFY(status,0,"VFnfields");
 
+    /* Verify that VSgetfields will return FAIL when passing in a NULL
+       for field name list (from bug #554), although this might never 
+       happen - BMR 5/17/01 */
+    status = VSgetfields(vs1, NULL);
+    VERIFY(status, FAIL, "VSgetfields");
+
     status=VSgetfields(vs1,fields);
     CHECK(status,FAIL,"VSgetfields");
 
@@ -1838,6 +1850,203 @@
 
 } /* test_emptyvdata() */
 
+/*************************** test_blockinfo ***************************
+
+This test routine creates an hdf file, "Block_info.hdf", and creates
+and writes two vdatas in a way that one of the vdatas will be promoted
+to a linked-block element.
+
+The first vdata is named "Appendable Vdata", contains 10 records, and 
+belongs to a class, named "Linked-block Vdata".  The fields of the vdata 
+include "Field1", "Field2", and "Field3" and all data are integer.  
+"Field1" has an order of 3, "Field2" has an order of 1, and "Field3" has 
+an order of 2.
+
+The second vdata named "Another Vdata", contains 5 records, and also
+belongs to class "Linked-block Vdata".  This vdata has only one field
+of order 1 and its data are integer.
+
+The test writes 5 records to the first vdata, "Appendable Vdata", then
+creates and writes the second vdata, "Another Vdata", then, writes 
+another 5 records to the first vdata.  The purpose of the second vdata 
+is to cause the subsequent write to the first vdata, "Appendable Vdata", 
+to promote the vdata to a linked-block element.
+
+***********************************************************************/
+
+#define FILE_NAME	"Block_info.hdf"
+#define APPENDABLE_VD	"Appendable Vdata"
+#define ANOTHER_VD	"Another Vdata"
+#define CLASS_NAME	"Linked-block Vdata"
+#define FIELD1_NAME	"Field1"	/* contains three integers */
+#define FIELD2_NAME	"Field2"	/* contains one integer */
+#define FIELD3_NAME	"Field3"	/* contains two integers */
+#define	FIELD_NAME_LIST	"Field1,Field2,Field3"
+#define ANOTHER_FD	"Another field"	/* contains one integer */
+#define	ANOTHER_FD_LIST	"Another field"
+#define N_RECORDS	5	/* number of records to be written to the
+				   vdatas at every write */
+#define ORDER_1 	3	/* order of first field of 1st vdata */
+#define ORDER_2 	1	/* order of second field of 1st vdata */
+#define ORDER_3 	2	/* order of third field of 1st vdata */
+#define N_VALS_PER_REC_2   1    /* # of values per record in the 2nd vdata */
+#define N_VALS_PER_REC_1 (ORDER_1+ORDER_2+ORDER_3) /* # of vals/rec. in 1st vd*/
+#define	BLOCK_SIZE	128	/* arbitrary number for block size */
+#define	NUM_BLOCKS	8	/* arbitrary number for number of blocks */
+
+static void
+test_blockinfo(void) 
+{
+   intn	 status_n;	/* returned status for functions returning an intn  */
+   int32 status_32;	/* returned status for functions returning an int32 */
+   int16 rec_num;	/* current record number */
+   int32 file_id, vdata1_id, vdata2_id,
+	 vdata_ref = -1,  /* ref number of a vdata, set to -1 to create  */
+   	 num_of_records,  /* number of records actually written to vdata */
+         data_buf1[N_RECORDS][N_VALS_PER_REC_1], /* for first vdata's data */
+	 data_buf2[N_RECORDS][N_VALS_PER_REC_2], /* for second vdata's data */
+	 block_size, num_blocks; /* retrieved by VSgetblockinfo */
+
+    /* Create the HDF file for data used in this test routine */
+    file_id = Hopen (FILE_NAME, DFACC_CREATE, 0);
+    CHECK(file_id, FAIL, "Hopen");
+
+    /* Initialize the VS interface */
+    status_n = Vstart (file_id);
+    CHECK(status_n, FAIL, "Vstart");
+
+    /* Create the first vdata */
+    vdata1_id = VSattach (file_id, vdata_ref, "w");
+    CHECK(vdata1_id, FAIL, "VSattach");
+
+    /* Set name and class name of the vdata. */
+    status_32 = VSsetname (vdata1_id, APPENDABLE_VD);
+    CHECK(status_32, FAIL, "VSsetname");
+    status_32 = VSsetclass (vdata1_id, CLASS_NAME);
+    CHECK(status_32, FAIL, "VSsetclass");
+
+    /* Introduce each field's name, data type, and order.  This is the first
+      part in defining a field.  */
+    status_n = VSfdefine (vdata1_id, FIELD1_NAME, DFNT_INT32, ORDER_1);
+    CHECK(status_n, FAIL, "VSfdefine");
+    status_n = VSfdefine (vdata1_id, FIELD2_NAME, DFNT_INT32, ORDER_2);
+    CHECK(status_n, FAIL, "VSfdefine");
+    status_n = VSfdefine (vdata1_id, FIELD3_NAME, DFNT_INT32, ORDER_3);
+    CHECK(status_n, FAIL, "VSfdefine");
+
+    /* Finalize the definition of the fields. */
+    status_n = VSsetfields (vdata1_id, FIELD_NAME_LIST);
+    CHECK(status_n, FAIL, "VSsetfields");
+
+    /* 
+     * Buffer the data by the record for fully interlaced mode.  Note that the
+     * first three elements contain the three values of the first field, the
+     * fourth element contains the value of the second field, and the last two
+     * elements contain the two values of the third field.
+     */
+    for (rec_num = 0; rec_num < N_RECORDS; rec_num++)
+    {
+        data_buf1[rec_num][0] = 1 + rec_num;
+        data_buf1[rec_num][1] = 2 + rec_num;
+        data_buf1[rec_num][2] = 3 + rec_num;
+        data_buf1[rec_num][3] = 10 + rec_num;
+        data_buf1[rec_num][4] = 10;
+        data_buf1[rec_num][5] = 65;
+    }
+
+    /* Test for invalid arguments passed in these functions */
+    status_n = VSsetblocksize(vdata1_id, -2);
+    VERIFY(status_n, FAIL, "VSsetblocksize");
+    status_n = VSsetnumblocks(vdata1_id, 0);
+    VERIFY(status_n, FAIL, "VSsetnumblocks");
+
+    /* Set the block size and the number of blocks the first vdata */
+    status_n = VSsetblocksize(vdata1_id, BLOCK_SIZE);
+    CHECK(status_n, FAIL, "VSsetblocksize");
+    status_n = VSsetnumblocks(vdata1_id, NUM_BLOCKS);
+    CHECK(status_n, FAIL, "VSsetnumblocks");
+
+    /* Write the data from data_buf1 to the vdata with full interlacing mode. */
+    num_of_records = VSwrite(vdata1_id, (uint8 *)data_buf1, N_RECORDS, 
+				FULL_INTERLACE);
+    VERIFY(num_of_records, N_RECORDS, "VSwrite:vdata1_id");
+
+    /******************************************************************
+     * Creates and writes another vdata right after APPENDABLE_VDATA.
+     * This will cause the storage of APPENDABLE_VDATA to be promoted to a
+     * linked-block element if a subsequent write to APPENDABLE_VDATA occurs. 
+     ******************************************************************/
+ 
+    /* Create another vdata. */
+    vdata2_id = VSattach (file_id, vdata_ref, "w");
+    CHECK(vdata2_id, FAIL, "VSattach");
+
+    /* Set name and class name of the vdata. */
+    status_32 = VSsetname (vdata2_id, ANOTHER_VD);
+    CHECK(status_32, FAIL, "VSsetname");
+    status_32 = VSsetclass (vdata2_id, CLASS_NAME);
+    CHECK(status_32, FAIL, "VSsetclass");
+
+    /* Define the vdata's field. */
+    status_n = VSfdefine (vdata2_id, ANOTHER_FD, DFNT_INT32, ORDER_2);
+    CHECK(status_n, FAIL, "VSfdefine");
+    status_n = VSsetfields (vdata2_id, ANOTHER_FD_LIST);
+    CHECK(status_n, FAIL, "VSsetfields");
+
+    /* Buffer the data for ANOTHER_VDATA */
+    for (rec_num = 0; rec_num < N_RECORDS; rec_num++)
+    {
+        data_buf2[rec_num][0] = 100 + rec_num;
+    }
+
+    /* Write the data from data_buf2 to the second vdata with full 
+       interlacing mode. */
+    num_of_records = VSwrite(vdata2_id, (uint8 *)data_buf2, N_RECORDS, 
+				FULL_INTERLACE);
+    VERIFY(num_of_records, N_RECORDS, "VSwrite:vdata2_id");
+
+    /******************************************************************
+     * Writes more data to APPENDABLE_VDATA, i.e. first vdata.  Its
+     * storage will be promoted to a linked-block element.
+     ******************************************************************/
+
+    for (rec_num = 0; rec_num < N_RECORDS; rec_num++)
+    {
+        data_buf1[rec_num][0] = 10 + rec_num;
+        data_buf1[rec_num][1] = 20 + rec_num;
+        data_buf1[rec_num][2] = 30 + rec_num;
+        data_buf1[rec_num][3] = 100 + rec_num;
+        data_buf1[rec_num][4] = 100;
+        data_buf1[rec_num][5] = 650;
+    }
+
+    /* Write the data from data_buf1 to the vdata with full interlacing mode. */
+    num_of_records = VSwrite(vdata1_id, (uint8 *)data_buf1, N_RECORDS, 
+				FULL_INTERLACE); 
+    VERIFY(num_of_records, N_RECORDS, "VSwrite:vdata1_id");
+
+    /* Retrieve the first vdata's block size and number of blocks and 
+       verify them */
+    status_n = VSgetblockinfo (vdata1_id, &block_size, &num_blocks);
+    CHECK(status_n, FAIL, "VSsetfields");
+    VERIFY(block_size, BLOCK_SIZE, "VSgetblockinfo");
+    VERIFY(num_blocks, NUM_BLOCKS, "VSgetblockinfo");
+
+    /* Terminate access to the vdatas and to the VS interface, then 
+       close the HDF file. */
+    status_32 = VSdetach (vdata1_id);
+    CHECK(status_32, FAIL, "Vdetach");
+
+    status_32 = VSdetach (vdata2_id);
+    CHECK(status_32, FAIL, "Vdetach");
+
+    status_n = Vend (file_id);
+    CHECK(status_n, FAIL, "Vend");
+
+    status_32 = Hclose (file_id);
+    CHECK(status_32, FAIL, "Hclose");
+} /* test_blockinfo() */
+
 /* main test driver */
 void
 test_vsets(void)
@@ -1864,5 +2073,8 @@
     /* test Vdatas with no fields defined */
     test_emptyvdata();
 
+    /* test functionality about set/get linked-block information */
+    test_blockinfo();
+
 }   /* test_vsets */
 

Modified: packages/libhdf4/branches/upstream/current/hdf/test/tvsetf.f
===================================================================
--- packages/libhdf4/branches/upstream/current/hdf/test/tvsetf.f	2007-05-15 09:05:29 UTC (rev 830)
+++ packages/libhdf4/branches/upstream/current/hdf/test/tvsetf.f	2007-05-15 09:53:05 UTC (rev 831)
@@ -18,7 +18,7 @@
 C*
 C*
 C*********************************************************************
-C $Id: tvsetf.f,v 1.22 1999/01/22 22:45:09 epourmal Exp $
+C $Id: tvsetf.f,v 1.24 2005/02/09 22:55:28 epourmal Exp $
 C*********************************************************************
 C      test vset Fortran data types
 C
@@ -545,3 +545,170 @@
 
       return
       end
+C
+C This subroutine tests vsfsetblsz, vsfsetnm, vsfgetinfo functions
+C
+C It creates and writes multi-component Vdata and single-component Vdata; 
+C then it sets sizes and number of blocks
+C for multi-component Vdata's link block and appends to the Vdata.
+C File is then closed and reponened once more; block information
+C is retrieved for the multi-component Vdata.
+C
+      subroutine tvsetblock(number_failed)
+      implicit none
+      character*20 myname
+      parameter (myname = 'vsetblock')
+      integer number_failed
+C
+C     Parameter declaration
+C
+      character*22 FILE_NAME
+      character*9  CLASS1_NAME
+      character*9  CLASS2_NAME
+      character*11 VDATA1_NAME
+      character*12 VDATA2_NAME
+      character*22 FIELD1_NAME
+      character*21 FIELD2_NAME
+      integer      N_RECORDS_1, N_RECORDS_2
+      integer      ORDER_2
+      integer      FULL_INTERLACE
+C
+      parameter (FILE_NAME   = 'Vdatas_blocks_test.hdf',
+     +           CLASS1_NAME = '5x1 Array',
+     +           CLASS2_NAME = '6x4 Array',
+     +           VDATA1_NAME = 'First Vdata',
+     +           VDATA2_NAME = 'Second Vdata',
+     +           FIELD1_NAME = 'Single-component Field',
+     +           FIELD2_NAME = 'Multi-component Field')
+      parameter (N_RECORDS_1 = 5,
+     +           N_RECORDS_2 = 256,
+     +           ORDER_2     = 2,
+     +           FULL_INTERLACE = 0)               
+   
+      integer DFACC_WRITE, DFNT_CHAR8, DFNT_INT32
+      parameter (DFACC_WRITE = 2,
+     +           DFNT_CHAR8  = 4,
+     +           DFNT_INT32  = 24)
+      integer BLOCK_SIZE, NUM_BLOCKS
+      parameter (BLOCK_SIZE = 256,
+     +           NUM_BLOCKS = 3)
+      
+C
+C     Function declaration
+C
+      integer hopen, hclose
+      integer vfstart, vhfscd, vhfsdm, vfend 
+      integer vsfsetblsz, vsfsetnmbl, vsfgetblinfo
+      integer vsfatch, vsfdtch, vsffnd, vsfwrt, vsfrd, vsfseek
+
+C
+C**** Variable declaration *******************************************
+C
+      integer   status, return_flag
+      integer   file_id
+      integer   vdata1_ref, vdata2_ref 
+      integer   vdata2_id 
+      character vdata1_buf(N_RECORDS_1)
+      integer   vdata2_buf(ORDER_2, N_RECORDS_2)
+      integer   buf(ORDER_2)
+      integer   i, j
+      integer   block_size_out, num_blocks_out
+      integer   n_records
+      data vdata1_buf /'V','D','A','T','A'/
+C
+C**** End of variable declaration ************************************
+      call ptestban('Testing', myname)
+C
+C     Initialize vdata2_buf
+C
+      do i = 1, N_RECORDS_2
+         do j = 1, ORDER_2
+            vdata2_buf(j,i) = j + i
+         enddo
+      enddo
+C
+C
+C     Open the HDF file for writing.
+C
+      file_id = hopen(FILE_NAME, DFACC_WRITE, 0)
+      call VRFY(file_id,'hopen',number_failed)
+C
+C     Initialize the VS interface.
+C
+      status = vfstart(file_id) 
+      call VRFY(status,'vfstart',number_failed)
+C
+C     Create multi-component vdata and populate it with data from vdata2_buf array.
+C     
+      vdata2_ref = vhfsdm(file_id, FIELD2_NAME, vdata2_buf, N_RECORDS_2,
+     +                    DFNT_INT32, VDATA2_NAME, CLASS2_NAME,
+     +                    ORDER_2)
+      call VRFY(vdata2_ref,'vhfsdm',number_failed)
+C
+C     Create single-component vdata and populate it with data from vdata1_buf array.
+C     
+      vdata1_ref = vhfscd(file_id, FIELD1_NAME, vdata1_buf, N_RECORDS_1,
+     +                    DFNT_CHAR8, VDATA1_NAME, CLASS1_NAME)
+      call VRFY(vdata1_ref,'vhfscd',number_failed)
+C
+C     Terminate access to the VS interface and close the HDF file.
+C
+      status = vfend(file_id)
+      call VRFY(status,'vfend',number_failed)
+      status = hclose(file_id)
+      call VRFY(status,'hclose',number_failed)
+      if (number_failed .gt. 0) goto 1000
+C
+C     Reopen the HDF file for writing.
+C
+      file_id = hopen(FILE_NAME, DFACC_WRITE, 0)
+      call VRFY(file_id,'hopen',number_failed)
+C
+C     Initialize the VS interface.
+C
+      status = vfstart(file_id) 
+      call VRFY(status,'vfstart',number_failed)
+C
+C     Attach to the multi-component Vdata
+C
+      vdata2_ref = vsffnd(file_id, VDATA2_NAME) 
+      call VRFY(vdata2_ref,'vsffnd',number_failed)
+      vdata2_id = vsfatch(file_id, vdata2_ref, 'w')
+      status = vsfsetblsz(vdata2_id, BLOCK_SIZE) 
+      call VRFY(status,'vsfsetblsz',number_failed)
+      status = vsfsetnmbl(vdata2_id, NUM_BLOCKS) 
+      call VRFY(status,'vsfsetblnm',number_failed)
+C
+C     Append to the multi-component Vdata 
+C
+      n_records = vsfseek(vdata2_id, N_RECORDS_2-1)
+      call VRFY(n_records,'vsfseek',number_failed)
+      n_records = 1
+      status = vsfrd(vdata2_id, buf, n_records, FULL_INTERLACE)
+      call VRFY(status,'vsfrd',number_failed)
+       
+      n_records = N_RECORDS_2
+      status = vsfwrt(vdata2_id, vdata2_buf, n_records,
+     +                FULL_INTERLACE)
+      if (status .ne. N_RECORDS_2) then
+          number_failed = number_failed + 1
+          call MESSAGE(3,'Wrong number of records added ')
+          call MESSAGE(3,'Append to multi-component Vdata failed ')
+      endif
+      call VRFY(vdata2_id,'vsfatch',number_failed)
+      status = vsfgetblinfo(vdata2_id, block_size_out, num_blocks_out)
+      if (block_size_out .ne. BLOCK_SIZE .or. 
+     +    num_blocks_out .ne. NUM_BLOCKS) then
+          call MESSAGE(3,'Linked-block info is wrong ')
+          number_failed = number_failed + 1
+      endif
+      status = vsfdtch(vdata2_id)
+      call VRFY(status,'vsfdtch',number_failed)
+      status = vfend(file_id)
+      call VRFY(status,'vfend',number_failed)
+      status = hclose(file_id)
+      call VRFY(status,'hclose',number_failed)
+
+1000  continue
+      return
+      end

Added: packages/libhdf4/branches/upstream/current/hdf/util/Makefile.am
===================================================================
--- packages/libhdf4/branches/upstream/current/hdf/util/Makefile.am	                        (rev 0)
+++ packages/libhdf4/branches/upstream/current/hdf/util/Makefile.am	2007-05-15 09:53:05 UTC (rev 831)
@@ -0,0 +1,106 @@
+#############################################################################
+##                      Setup for building programs                        ##
+#############################################################################
+
+## Setup the different includes and preprocessor #defines we need.
+AM_CPPFLAGS=-I$(top_srcdir)/hdf/src
+
+#############################################################################
+##                          Programs to build                              ##
+#############################################################################
+
+bin_PROGRAMS = gif2hdf hdf2gif hdf2jpeg hdf24to8 hdf8to24 hdfcomp hdfed     \
+               hdfls hdfpack hdftopal hdftor8 hdfunpac jpeg2hdf paltohdf    \
+               r8tohdf ristosds vmake vshow 
+
+if HDF_BUILD_FORTRAN
+bin_SCRIPTS = h4redeploy h4cc h4fc
+else
+bin_SCRIPTS = h4redeploy h4cc
+endif
+
+gif2hdf_SOURCES = gif2hdf.c gif2mem.c gifread.c decompress.c writehdf.c
+gif2hdf_LDADD = ../src/libdf.a
+gif2hdf_DEPENDENCIES = ../src/libdf.a
+
+hdf2gif_SOURCES = hdf2gif.c hdfgifwr.c
+hdf2gif_LDADD = ../src/libdf.a
+hdf2gif_DEPENDENCIES = ../src/libdf.a
+
+hdf2jpeg_SOURCES = hdf2jpeg.c
+hdf2jpeg_LDADD = ../src/libdf.a
+hdf2jpeg_DEPENDENCIES = ../src/libdf.a
+
+hdf24to8_SOURCES = hdf24to8.c
+hdf24to8_LDADD = ../src/libdf.a
+hdf24to8_DEPENDENCIES = ../src/libdf.a
+
+hdf8to24_SOURCES = hdf8to24.c
+hdf8to24_LDADD = ../src/libdf.a
+hdf8to24_DEPENDENCIES = ../src/libdf.a
+
+hdfcomp_SOURCES = hdfcomp.c
+hdfcomp_LDADD = ../src/libdf.a
+hdfcomp_DEPENDENCIES = ../src/libdf.a
+
+hdfed_SOURCES = he_cntrl.c he_disp.c he_file.c he_main.c
+hdfed_LDADD = ../src/libdf.a
+hdfed_DEPENDENCIES = ../src/libdf.a
+
+hdfls_SOURCES = hdfls.c
+hdfls_LDADD = ../src/libdf.a
+hdfls_DEPENDENCIES = ../src/libdf.a
+
+hdfpack_SOURCES = hdfpack.c
+hdfpack_LDADD = ../src/libdf.a
+hdfpack_DEPENDENCIES = ../src/libdf.a
+
+hdftopal_SOURCES = hdftopal.c
+hdftopal_LDADD = ../src/libdf.a
+hdftopal_DEPENDENCIES = ../src/libdf.a
+
+hdftor8_SOURCES = hdftor8.c
+hdftor8_LDADD = ../src/libdf.a
+hdftor8_DEPENDENCIES = ../src/libdf.a
+
+hdfunpac_SOURCES = hdfunpac.c
+hdfunpac_LDADD = ../src/libdf.a
+hdfunpac_DEPENDENCIES = ../src/libdf.a
+
+jpeg2hdf_SOURCES = jpeg2hdf.c
+jpeg2hdf_LDADD = ../src/libdf.a
+jpeg2hdf_DEPENDENCIES = ../src/libdf.a
+
+paltohdf_SOURCES = paltohdf.c
+paltohdf_LDADD = ../src/libdf.a
+paltohdf_DEPENDENCIES = ../src/libdf.a
+
+r8tohdf_SOURCES = r8tohdf.c
+r8tohdf_LDADD = ../src/libdf.a
+r8tohdf_DEPENDENCIES = ../src/libdf.a
+
+ristosds_SOURCES = ristosds.c
+ristosds_LDADD = ../src/libdf.a
+ristosds_DEPENDENCIES = ../src/libdf.a
+
+vmake_SOURCES = vmake.c
+vmake_LDADD = ../src/libdf.a
+vmake_DEPENDENCIES = ../src/libdf.a
+
+vshow_SOURCES = vshow.c
+vshow_LDADD = ../src/libdf.a
+vshow_DEPENDENCIES = ../src/libdf.a
+
+#############################################################################
+##                   Testing -- Here there be dragons.                     ##
+#############################################################################
+
+check:  $(bin_PROGRAMS)
+	sh ./testutil.sh $(target_canonical)
+
+#############################################################################
+##                          And the cleanup                                ##
+#############################################################################
+
+DISTCLEANFILES = gif_hdf_temp/bttrfly.hdf gif_hdf_temp/skull.gif    \
+                 gif_hdf_temp/SunWheel.hdf

Modified: packages/libhdf4/branches/upstream/current/hdf/util/Makefile.in
===================================================================
--- packages/libhdf4/branches/upstream/current/hdf/util/Makefile.in	2007-05-15 09:05:29 UTC (rev 830)
+++ packages/libhdf4/branches/upstream/current/hdf/util/Makefile.in	2007-05-15 09:53:05 UTC (rev 831)
@@ -1,292 +1,698 @@
-# ****************************************************************************
-# * NCSA HDF                                                                 *
-# * Software Development Group                                               *
-# * National Center for Supercomputing Applications                          *
-# * University of Illinois at Urbana-Champaign                               *
-# * 605 E. Springfield, Champaign IL 61820                                   *
-# *                                                                          *
-# * For conditions of distribution and use, see the accompanying             *
-# * hdf/COPYING file.                                                        *
-# *                                                                          *
-# ****************************************************************************
-#
-# $Id: Makefile.in,v 1.24 2000/06/26 19:51:31 rushabh Exp $
-#
-# ##################################################################
-#
+# Makefile.in generated by automake 1.7.7 from Makefile.am.
+# @configure_input@
 
-### Start of system configuration section. ####
-# Set shell so we know what it is
-SHELL = /bin/sh
+# Copyright 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003
+# 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.
 
-# 'srcdir' Gets set to directory this Makefile is found in
-srcdir = .
-TOP_SRCDIR = ../..
+# 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.
 
-prefix = $(TOP_SRCDIR)/NewHDF
+ at SET_MAKE@
 
-exec_prefix = $(prefix)
-tooldir = $(exec_prefix)/$(target)
+#############################################################################
+#############################################################################
 
-program_transform_name =
+srcdir = @srcdir@
+top_srcdir = @top_srcdir@
+VPATH = @srcdir@
+pkgdatadir = $(datadir)/@PACKAGE@
+pkglibdir = $(libdir)/@PACKAGE@
+pkgincludedir = $(includedir)/@PACKAGE@
+top_builddir = ../..
 
-datadir = $(prefix)/lib
-mandir = $(prefix)/man
-man1dir = $(mandir)/man1
-man2dir = $(mandir)/man2
-man3dir = $(mandir)/man3
-man4dir = $(mandir)/man4
-man5dir = $(mandir)/man5
-man6dir = $(mandir)/man6
-man7dir = $(mandir)/man7
-man8dir = $(mandir)/man8
-man9dir = $(mandir)/man9
-docdir = $(datadir)/doc
+am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
+INSTALL = @INSTALL@
+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 = :
+host_triplet = @host@
+ACLOCAL = @ACLOCAL@
+AMDEP_FALSE = @AMDEP_FALSE@
+AMDEP_TRUE = @AMDEP_TRUE@
+AMTAR = @AMTAR@
+AR = @AR@
+AUTOCONF = @AUTOCONF@
+AUTOHEADER = @AUTOHEADER@
+AUTOMAKE = @AUTOMAKE@
+AWK = @AWK@
+CC = @CC@
+CCDEPMODE = @CCDEPMODE@
+CFLAGS = @CFLAGS@
+CPP = @CPP@
+CPPFLAGS = @CPPFLAGS@
+CXX = @CXX@
+CXXCPP = @CXXCPP@
+CXXDEPMODE = @CXXDEPMODE@
+CXXFLAGS = @CXXFLAGS@
+CYGPATH_W = @CYGPATH_W@
+DEFS = @DEFS@
+DEPDIR = @DEPDIR@
+DIFF = @DIFF@
+ECHO_C = @ECHO_C@
+ECHO_N = @ECHO_N@
+ECHO_T = @ECHO_T@
+EGREP = @EGREP@
+EXEEXT = @EXEEXT@
+F77 = @F77@
+FFLAGS = @FFLAGS@
+HDF_BUILD_FORTRAN_FALSE = @HDF_BUILD_FORTRAN_FALSE@
+HDF_BUILD_FORTRAN_TRUE = @HDF_BUILD_FORTRAN_TRUE@
+HDF_BUILD_XDR_FALSE = @HDF_BUILD_XDR_FALSE@
+HDF_BUILD_XDR_TRUE = @HDF_BUILD_XDR_TRUE@
+INSTALL_DATA = @INSTALL_DATA@
+INSTALL_PROGRAM = @INSTALL_PROGRAM@
+INSTALL_SCRIPT = @INSTALL_SCRIPT@
+INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
+LDFLAGS = @LDFLAGS@
+LEX = @LEX@
+LEXLIB = @LEXLIB@
+LEX_OUTPUT_ROOT = @LEX_OUTPUT_ROOT@
+LIBOBJS = @LIBOBJS@
+LIBS = @LIBS@
+LN_S = @LN_S@
+LTLIBOBJS = @LTLIBOBJS@
+MAINT = @MAINT@
+MAINTAINER_MODE_FALSE = @MAINTAINER_MODE_FALSE@
+MAINTAINER_MODE_TRUE = @MAINTAINER_MODE_TRUE@
+MAKEINFO = @MAKEINFO@
+NEQN = @NEQN@
+OBJEXT = @OBJEXT@
+PACKAGE = @PACKAGE@
+PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
+PACKAGE_NAME = @PACKAGE_NAME@
+PACKAGE_STRING = @PACKAGE_STRING@
+PACKAGE_TARNAME = @PACKAGE_TARNAME@
+PACKAGE_VERSION = @PACKAGE_VERSION@
+PATH_SEPARATOR = @PATH_SEPARATOR@
+RANLIB = @RANLIB@
+SET_MAKE = @SET_MAKE@
+SHELL = @SHELL@
+STRIP = @STRIP@
+TBL = @TBL@
+VERSION = @VERSION@
+YACC = @YACC@
+ac_ct_CC = @ac_ct_CC@
+ac_ct_CXX = @ac_ct_CXX@
+ac_ct_F77 = @ac_ct_F77@
+ac_ct_RANLIB = @ac_ct_RANLIB@
+ac_ct_STRIP = @ac_ct_STRIP@
+am__fastdepCC_FALSE = @am__fastdepCC_FALSE@
+am__fastdepCC_TRUE = @am__fastdepCC_TRUE@
+am__fastdepCXX_FALSE = @am__fastdepCXX_FALSE@
+am__fastdepCXX_TRUE = @am__fastdepCXX_TRUE@
+am__include = @am__include@
+am__leading_dot = @am__leading_dot@
+am__quote = @am__quote@
+bindir = @bindir@
+build = @build@
+build_alias = @build_alias@
+build_cpu = @build_cpu@
+build_os = @build_os@
+build_vendor = @build_vendor@
+datadir = @datadir@
+exec_prefix = @exec_prefix@
+host = @host@
+host_alias = @host_alias@
+host_cpu = @host_cpu@
+host_os = @host_os@
+host_vendor = @host_vendor@
+includedir = @includedir@
+infodir = @infodir@
+install_sh = @install_sh@
+libdir = @libdir@
+libexecdir = @libexecdir@
+localstatedir = @localstatedir@
+mandir = @mandir@
+oldincludedir = @oldincludedir@
+prefix = @prefix@
+program_transform_name = @program_transform_name@
+sbindir = @sbindir@
+sharedstatedir = @sharedstatedir@
+sysconfdir = @sysconfdir@
+target_alias = @target_alias@
 
-INSTALL = ${TOP_SRCDIR}/install-sh -c
-INSTALL_PROGRAM = $(INSTALL)
-INSTALL_DATA = $(INSTALL) -m 644
+AM_CPPFLAGS = -I$(top_srcdir)/hdf/src
 
-# /usr/local/bin/m4 (GNU version?)
-M4   = /usr/local/bin/m4
-# /usr/local/bin/perl (GNU version?)
-PERL = /usr/local/bin/perl
 
-# Name of achive randomizer, usually ranlib (use 'touch' if non-existant)
-RANLIB = ranlib
+#############################################################################
+#############################################################################
+bin_PROGRAMS = gif2hdf hdf2gif hdf2jpeg hdf24to8 hdf8to24 hdfcomp hdfed     \
+               hdfls hdfpack hdftopal hdftor8 hdfunpac jpeg2hdf paltohdf    \
+               r8tohdf ristosds vmake vshow 
 
-# Name of library archiver and flags to send, default 'AR=ar', 'ARFLAGS=r'
-AR = ar
-ARFLAGS = r
 
-# Name of remove utility, default 'RM=/bin/rm', 'RMFLAGS=-f'
-RM = /bin/rm
-RMFLAGS = -f
+ at HDF_BUILD_FORTRAN_TRUE@bin_SCRIPTS = h4redeploy h4cc h4fc
+ at HDF_BUILD_FORTRAN_FALSE@bin_SCRIPTS = h4redeploy h4cc
 
-#Compilier defaults overriden by top level make
-AS = as
-CC = gcc
-CFLAGS = -ansi
-FC = f77
-FFLAGS=
+gif2hdf_SOURCES = gif2hdf.c gif2mem.c gifread.c decompress.c writehdf.c
+gif2hdf_LDADD = ../src/libdf.a
+gif2hdf_DEPENDENCIES = ../src/libdf.a
 
-# Set for document generation
-MAKEINFO = makeinfo
-TEXI2DVI = texi2dvi
+hdf2gif_SOURCES = hdf2gif.c hdfgifwr.c
+hdf2gif_LDADD = ../src/libdf.a
+hdf2gif_DEPENDENCIES = ../src/libdf.a
 
-# The echo command.
-ECHO = echo
+hdf2jpeg_SOURCES = hdf2jpeg.c
+hdf2jpeg_LDADD = ../src/libdf.a
+hdf2jpeg_DEPENDENCIES = ../src/libdf.a
 
-# Directory in which to install scripts.
-bindir = $(exec_prefix)/bin
+hdf24to8_SOURCES = hdf24to8.c
+hdf24to8_LDADD = ../src/libdf.a
+hdf24to8_DEPENDENCIES = ../src/libdf.a
 
-# Directory in which to install library files.
-libdir = $(prefix)/lib
+hdf8to24_SOURCES = hdf8to24.c
+hdf8to24_LDADD = ../src/libdf.a
+hdf8to24_DEPENDENCIES = ../src/libdf.a
 
-# Directory in which to install include files.
-includedir = $(prefix)/include
+hdfcomp_SOURCES = hdfcomp.c
+hdfcomp_LDADD = ../src/libdf.a
+hdfcomp_DEPENDENCIES = ../src/libdf.a
 
-# Directory in which to install documentation info files.
-infodir = $(prefix)/info
+hdfed_SOURCES = he_cntrl.c he_disp.c he_file.c he_main.c
+hdfed_LDADD = ../src/libdf.a
+hdfed_DEPENDENCIES = ../src/libdf.a
 
-#### ----- host and target specific makefile fragments come in here.-------
-### ------------------- end of makefile fragments -------------------------
+hdfls_SOURCES = hdfls.c
+hdfls_LDADD = ../src/libdf.a
+hdfls_DEPENDENCIES = ../src/libdf.a
 
-# ############# End of system configuration section. ###############
-HDF_FLAGS       = \
-        CC="$(CC)" \
-        CFLAGS="$(CFLAGS)" \
-        FC="$(FC)" \
-        FFLAGS="$(FFLAGS)" \
-        RANLIB="$(RANLIB)" \
-        AR="$(AR)" \
-        ARFLAGS="$(ARFLAGS)" \
-        RM="$(RM)" \
-        RMFLAGS="$(RMFLAGS)" \
-        MACHINE="$(MACHINE)" 
+hdfpack_SOURCES = hdfpack.c
+hdfpack_LDADD = ../src/libdf.a
+hdfpack_DEPENDENCIES = ../src/libdf.a
 
-LOCAL_MACROS  = CC="$(CC)" \
-	CFLAGS="$(CFLAGS)" \
-	CPP="$(CPP)" \
-	CPPFLAGS="$(CPPFLAGS)" \
-	exec_prefix="$(exec_prefix)" \
-	FC="$(FC)" \
-	prefix="$(prefix)"
+hdftopal_SOURCES = hdftopal.c
+hdftopal_LDADD = ../src/libdf.a
+hdftopal_DEPENDENCIES = ../src/libdf.a
 
-# ==> where is your HDF library (libdf.a) located?
-# ==> where are your hdf.h, hdfi.h and vg.h files located?
-HDFINC=$(srcdir)/../src
-HDFLIB=$(srcdir)/../src
-HDFSRC=$(srcdir)/../src
-HDFBIN=$(srcdir)/../bin
+hdftor8_SOURCES = hdftor8.c
+hdftor8_LDADD = ../src/libdf.a
+hdftor8_DEPENDENCIES = ../src/libdf.a
 
-# ==> where is your JPEG library (libjpeg.a) located?
-JPEGLIB=$(srcdir)/../jpeg
-JPEGINC=$(srcdir)/../jpeg
+hdfunpac_SOURCES = hdfunpac.c
+hdfunpac_LDADD = ../src/libdf.a
+hdfunpac_DEPENDENCIES = ../src/libdf.a
 
-# ==> where is your PABLO include files
-PABLO_HINC= $(srcdir)/../pablo
+jpeg2hdf_SOURCES = jpeg2hdf.c
+jpeg2hdf_LDADD = ../src/libdf.a
+jpeg2hdf_DEPENDENCIES = ../src/libdf.a
 
-# ==> specify where to find the FMPOOL include and source files 
-FMPOOL_INC=$(srcdir)/../fmpool
-FMPOOL_SRC=$(srcdir)/../fmpool
+paltohdf_SOURCES = paltohdf.c
+paltohdf_LDADD = ../src/libdf.a
+paltohdf_DEPENDENCIES = ../src/libdf.a
 
-# ==> where is your zlib library (libz.a) located?
-ZLIBLIB=$(srcdir)/../zlib
-ZLIBINC=$(srcdir)/../zlib
+r8tohdf_SOURCES = r8tohdf.c
+r8tohdf_LDADD = ../src/libdf.a
+r8tohdf_DEPENDENCIES = ../src/libdf.a
 
-#Where are the utility includes
-UTILINC=$(srcdir)
+ristosds_SOURCES = ristosds.c
+ristosds_LDADD = ../src/libdf.a
+ristosds_DEPENDENCIES = ../src/libdf.a
 
-ALL_CFLAGS = $(CFLAGS) $(FMPOOL_FLAGS) -I$(HDFINC) -I$(JPEGINC) -I$(ZLIBINC) -I$(UTILINC)
+vmake_SOURCES = vmake.c
+vmake_LDADD = ../src/libdf.a
+vmake_DEPENDENCIES = ../src/libdf.a
 
-OTHERDIRS = fixatr testfiles
+vshow_SOURCES = vshow.c
+vshow_LDADD = ../src/libdf.a
+vshow_DEPENDENCIES = ../src/libdf.a
 
-MANIFEST = $(DISTFILES)
-DISTFILES = Makefile.in README.TST $(UTILSRCS) $(UTILHDRS) $(FIXATRS) $(TESTFILES)
 
-# Utilities
-UTILSRCS = hdf24to8.c hdfcomp.c hdfls.c hdfpack.c hdftopal.c hdftor8.c paltohdf.c \
-        r8tohdf.c ristosds.c vmake.c vshow.c hdf8to24.c hdf2jpeg.c jpeg2hdf.c fp2hdf.c \
-	hdfunpac.c he_main.c he_cntrl.c he_disp.c he_file.c fptest.c gif2hdf.c \
-	writehdf.c gif2mem.c gifread.c decompress.c hdf2gif.c hdfgifwr.c
+#############################################################################
+#############################################################################
+DISTCLEANFILES = gif_hdf_temp/bttrfly.hdf gif_hdf_temp/skull.gif    \
+                 gif_hdf_temp/SunWheel.hdf
 
-UTILHDRS = he.h he_proto.h gif.h
+subdir = hdf/util
+ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
+mkinstalldirs = $(SHELL) $(top_srcdir)/bin/mkinstalldirs
+CONFIG_HEADER = $(top_builddir)/hdf/src/h4config.h
+CONFIG_CLEAN_FILES = h4cc h4fc h4redeploy testutil.sh
+bin_PROGRAMS = gif2hdf$(EXEEXT) hdf2gif$(EXEEXT) hdf2jpeg$(EXEEXT) \
+	hdf24to8$(EXEEXT) hdf8to24$(EXEEXT) hdfcomp$(EXEEXT) \
+	hdfed$(EXEEXT) hdfls$(EXEEXT) hdfpack$(EXEEXT) \
+	hdftopal$(EXEEXT) hdftor8$(EXEEXT) hdfunpac$(EXEEXT) \
+	jpeg2hdf$(EXEEXT) paltohdf$(EXEEXT) r8tohdf$(EXEEXT) \
+	ristosds$(EXEEXT) vmake$(EXEEXT) vshow$(EXEEXT)
+PROGRAMS = $(bin_PROGRAMS)
 
-FIXATRS = fixatr/README fixatr/command.for fixatr/common.for fixatr/fixatr.cld \
-	fixatr/fixatr.hlp fixatr/makefix.com fixatr/parse.mar fixatr/rformat.for
+am_gif2hdf_OBJECTS = gif2hdf.$(OBJEXT) gif2mem.$(OBJEXT) \
+	gifread.$(OBJEXT) decompress.$(OBJEXT) writehdf.$(OBJEXT)
+gif2hdf_OBJECTS = $(am_gif2hdf_OBJECTS)
+gif2hdf_LDFLAGS =
+am_hdf24to8_OBJECTS = hdf24to8.$(OBJEXT)
+hdf24to8_OBJECTS = $(am_hdf24to8_OBJECTS)
+hdf24to8_LDFLAGS =
+am_hdf2gif_OBJECTS = hdf2gif.$(OBJEXT) hdfgifwr.$(OBJEXT)
+hdf2gif_OBJECTS = $(am_hdf2gif_OBJECTS)
+hdf2gif_LDFLAGS =
+am_hdf2jpeg_OBJECTS = hdf2jpeg.$(OBJEXT)
+hdf2jpeg_OBJECTS = $(am_hdf2jpeg_OBJECTS)
+hdf2jpeg_LDFLAGS =
+am_hdf8to24_OBJECTS = hdf8to24.$(OBJEXT)
+hdf8to24_OBJECTS = $(am_hdf8to24_OBJECTS)
+hdf8to24_LDFLAGS =
+am_hdfcomp_OBJECTS = hdfcomp.$(OBJEXT)
+hdfcomp_OBJECTS = $(am_hdfcomp_OBJECTS)
+hdfcomp_LDFLAGS =
+am_hdfed_OBJECTS = he_cntrl.$(OBJEXT) he_disp.$(OBJEXT) \
+	he_file.$(OBJEXT) he_main.$(OBJEXT)
+hdfed_OBJECTS = $(am_hdfed_OBJECTS)
+hdfed_LDFLAGS =
+am_hdfls_OBJECTS = hdfls.$(OBJEXT)
+hdfls_OBJECTS = $(am_hdfls_OBJECTS)
+hdfls_LDFLAGS =
+am_hdfpack_OBJECTS = hdfpack.$(OBJEXT)
+hdfpack_OBJECTS = $(am_hdfpack_OBJECTS)
+hdfpack_LDFLAGS =
+am_hdftopal_OBJECTS = hdftopal.$(OBJEXT)
+hdftopal_OBJECTS = $(am_hdftopal_OBJECTS)
+hdftopal_LDFLAGS =
+am_hdftor8_OBJECTS = hdftor8.$(OBJEXT)
+hdftor8_OBJECTS = $(am_hdftor8_OBJECTS)
+hdftor8_LDFLAGS =
+am_hdfunpac_OBJECTS = hdfunpac.$(OBJEXT)
+hdfunpac_OBJECTS = $(am_hdfunpac_OBJECTS)
+hdfunpac_LDFLAGS =
+am_jpeg2hdf_OBJECTS = jpeg2hdf.$(OBJEXT)
+jpeg2hdf_OBJECTS = $(am_jpeg2hdf_OBJECTS)
+jpeg2hdf_LDFLAGS =
+am_paltohdf_OBJECTS = paltohdf.$(OBJEXT)
+paltohdf_OBJECTS = $(am_paltohdf_OBJECTS)
+paltohdf_LDFLAGS =
+am_r8tohdf_OBJECTS = r8tohdf.$(OBJEXT)
+r8tohdf_OBJECTS = $(am_r8tohdf_OBJECTS)
+r8tohdf_LDFLAGS =
+am_ristosds_OBJECTS = ristosds.$(OBJEXT)
+ristosds_OBJECTS = $(am_ristosds_OBJECTS)
+ristosds_LDFLAGS =
+am_vmake_OBJECTS = vmake.$(OBJEXT)
+vmake_OBJECTS = $(am_vmake_OBJECTS)
+vmake_LDFLAGS =
+am_vshow_OBJECTS = vshow.$(OBJEXT)
+vshow_OBJECTS = $(am_vshow_OBJECTS)
+vshow_LDFLAGS =
+SCRIPTS = $(bin_SCRIPTS)
 
 
-TESTFILES = testfiles/README testfiles/head.r24.Z testfiles/jpeg_img.jpg \
-	testfiles/ntcheck.hdf testfiles/palette.raw testfiles/storm110.hdf \
-	testfiles/storm110.raw testfiles/storm120.hdf testfiles/storm120.raw \
-	testfiles/storm130.hdf testfiles/storm130.raw testfiles/storm140.raw \
-	testfiles/test.cdf testfiles/test.hdf
+DEFAULT_INCLUDES =  -I. -I$(srcdir) -I$(top_builddir)/hdf/src
+depcomp = $(SHELL) $(top_srcdir)/bin/depcomp
+am__depfiles_maybe = depfiles
+ at AMDEP_TRUE@DEP_FILES = ./$(DEPDIR)/decompress.Po ./$(DEPDIR)/gif2hdf.Po \
+ at AMDEP_TRUE@	./$(DEPDIR)/gif2mem.Po ./$(DEPDIR)/gifread.Po \
+ at AMDEP_TRUE@	./$(DEPDIR)/hdf24to8.Po ./$(DEPDIR)/hdf2gif.Po \
+ at AMDEP_TRUE@	./$(DEPDIR)/hdf2jpeg.Po ./$(DEPDIR)/hdf8to24.Po \
+ at AMDEP_TRUE@	./$(DEPDIR)/hdfcomp.Po ./$(DEPDIR)/hdfgifwr.Po \
+ at AMDEP_TRUE@	./$(DEPDIR)/hdfls.Po ./$(DEPDIR)/hdfpack.Po \
+ at AMDEP_TRUE@	./$(DEPDIR)/hdftopal.Po ./$(DEPDIR)/hdftor8.Po \
+ at AMDEP_TRUE@	./$(DEPDIR)/hdfunpac.Po ./$(DEPDIR)/he_cntrl.Po \
+ at AMDEP_TRUE@	./$(DEPDIR)/he_disp.Po ./$(DEPDIR)/he_file.Po \
+ at AMDEP_TRUE@	./$(DEPDIR)/he_main.Po ./$(DEPDIR)/jpeg2hdf.Po \
+ at AMDEP_TRUE@	./$(DEPDIR)/paltohdf.Po ./$(DEPDIR)/r8tohdf.Po \
+ at AMDEP_TRUE@	./$(DEPDIR)/ristosds.Po ./$(DEPDIR)/vmake.Po \
+ at AMDEP_TRUE@	./$(DEPDIR)/vshow.Po ./$(DEPDIR)/writehdf.Po
+COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \
+	$(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
+CCLD = $(CC)
+LINK = $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@
+DIST_SOURCES = $(gif2hdf_SOURCES) $(hdf24to8_SOURCES) $(hdf2gif_SOURCES) \
+	$(hdf2jpeg_SOURCES) $(hdf8to24_SOURCES) $(hdfcomp_SOURCES) \
+	$(hdfed_SOURCES) $(hdfls_SOURCES) $(hdfpack_SOURCES) \
+	$(hdftopal_SOURCES) $(hdftor8_SOURCES) $(hdfunpac_SOURCES) \
+	$(jpeg2hdf_SOURCES) $(paltohdf_SOURCES) $(r8tohdf_SOURCES) \
+	$(ristosds_SOURCES) $(vmake_SOURCES) $(vshow_SOURCES)
+DIST_COMMON = README $(srcdir)/Makefile.in Makefile.am h4cc.in h4fc.in \
+	h4redeploy.in testutil.sh.in
+SOURCES = $(gif2hdf_SOURCES) $(hdf24to8_SOURCES) $(hdf2gif_SOURCES) $(hdf2jpeg_SOURCES) $(hdf8to24_SOURCES) $(hdfcomp_SOURCES) $(hdfed_SOURCES) $(hdfls_SOURCES) $(hdfpack_SOURCES) $(hdftopal_SOURCES) $(hdftor8_SOURCES) $(hdfunpac_SOURCES) $(jpeg2hdf_SOURCES) $(paltohdf_SOURCES) $(r8tohdf_SOURCES) $(ristosds_SOURCES) $(vmake_SOURCES) $(vshow_SOURCES)
 
-UTILS = hdf24to8 hdfcomp hdfls hdfpack hdftopal hdftor8 paltohdf \
-        r8tohdf ristosds  vmake vshow hdf8to24 hdf2jpeg jpeg2hdf fp2hdf \
-	hdfunpac gif2hdf hdf2gif
+all: all-am
 
-GHOBJ = gif2hdf.o writehdf.o gif2mem.o gifread.o decompress.o
+.SUFFIXES:
+.SUFFIXES: .c .o .obj
+$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ Makefile.am  $(top_srcdir)/configure.ac $(ACLOCAL_M4)
+	cd $(top_srcdir) && \
+	  $(AUTOMAKE) --foreign  hdf/util/Makefile
+Makefile: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.in  $(top_builddir)/config.status
+	cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)
+h4cc: $(top_builddir)/config.status h4cc.in
+	cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@
+h4fc: $(top_builddir)/config.status h4fc.in
+	cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@
+h4redeploy: $(top_builddir)/config.status h4redeploy.in
+	cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@
+testutil.sh: $(top_builddir)/config.status testutil.sh.in
+	cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@
+binPROGRAMS_INSTALL = $(INSTALL_PROGRAM)
+install-binPROGRAMS: $(bin_PROGRAMS)
+	@$(NORMAL_INSTALL)
+	$(mkinstalldirs) $(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
 
-HGOBJ = hdf2gif.o hdfgifwr.o
+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
 
-HEOBJ = he_main.o he_cntrl.o he_disp.o he_file.o
+clean-binPROGRAMS:
+	-test -z "$(bin_PROGRAMS)" || rm -f $(bin_PROGRAMS)
+gif2hdf$(EXEEXT): $(gif2hdf_OBJECTS) $(gif2hdf_DEPENDENCIES) 
+	@rm -f gif2hdf$(EXEEXT)
+	$(LINK) $(gif2hdf_LDFLAGS) $(gif2hdf_OBJECTS) $(gif2hdf_LDADD) $(LIBS)
+hdf24to8$(EXEEXT): $(hdf24to8_OBJECTS) $(hdf24to8_DEPENDENCIES) 
+	@rm -f hdf24to8$(EXEEXT)
+	$(LINK) $(hdf24to8_LDFLAGS) $(hdf24to8_OBJECTS) $(hdf24to8_LDADD) $(LIBS)
+hdf2gif$(EXEEXT): $(hdf2gif_OBJECTS) $(hdf2gif_DEPENDENCIES) 
+	@rm -f hdf2gif$(EXEEXT)
+	$(LINK) $(hdf2gif_LDFLAGS) $(hdf2gif_OBJECTS) $(hdf2gif_LDADD) $(LIBS)
+hdf2jpeg$(EXEEXT): $(hdf2jpeg_OBJECTS) $(hdf2jpeg_DEPENDENCIES) 
+	@rm -f hdf2jpeg$(EXEEXT)
+	$(LINK) $(hdf2jpeg_LDFLAGS) $(hdf2jpeg_OBJECTS) $(hdf2jpeg_LDADD) $(LIBS)
+hdf8to24$(EXEEXT): $(hdf8to24_OBJECTS) $(hdf8to24_DEPENDENCIES) 
+	@rm -f hdf8to24$(EXEEXT)
+	$(LINK) $(hdf8to24_LDFLAGS) $(hdf8to24_OBJECTS) $(hdf8to24_LDADD) $(LIBS)
+hdfcomp$(EXEEXT): $(hdfcomp_OBJECTS) $(hdfcomp_DEPENDENCIES) 
+	@rm -f hdfcomp$(EXEEXT)
+	$(LINK) $(hdfcomp_LDFLAGS) $(hdfcomp_OBJECTS) $(hdfcomp_LDADD) $(LIBS)
+hdfed$(EXEEXT): $(hdfed_OBJECTS) $(hdfed_DEPENDENCIES) 
+	@rm -f hdfed$(EXEEXT)
+	$(LINK) $(hdfed_LDFLAGS) $(hdfed_OBJECTS) $(hdfed_LDADD) $(LIBS)
+hdfls$(EXEEXT): $(hdfls_OBJECTS) $(hdfls_DEPENDENCIES) 
+	@rm -f hdfls$(EXEEXT)
+	$(LINK) $(hdfls_LDFLAGS) $(hdfls_OBJECTS) $(hdfls_LDADD) $(LIBS)
+hdfpack$(EXEEXT): $(hdfpack_OBJECTS) $(hdfpack_DEPENDENCIES) 
+	@rm -f hdfpack$(EXEEXT)
+	$(LINK) $(hdfpack_LDFLAGS) $(hdfpack_OBJECTS) $(hdfpack_LDADD) $(LIBS)
+hdftopal$(EXEEXT): $(hdftopal_OBJECTS) $(hdftopal_DEPENDENCIES) 
+	@rm -f hdftopal$(EXEEXT)
+	$(LINK) $(hdftopal_LDFLAGS) $(hdftopal_OBJECTS) $(hdftopal_LDADD) $(LIBS)
+hdftor8$(EXEEXT): $(hdftor8_OBJECTS) $(hdftor8_DEPENDENCIES) 
+	@rm -f hdftor8$(EXEEXT)
+	$(LINK) $(hdftor8_LDFLAGS) $(hdftor8_OBJECTS) $(hdftor8_LDADD) $(LIBS)
+hdfunpac$(EXEEXT): $(hdfunpac_OBJECTS) $(hdfunpac_DEPENDENCIES) 
+	@rm -f hdfunpac$(EXEEXT)
+	$(LINK) $(hdfunpac_LDFLAGS) $(hdfunpac_OBJECTS) $(hdfunpac_LDADD) $(LIBS)
+jpeg2hdf$(EXEEXT): $(jpeg2hdf_OBJECTS) $(jpeg2hdf_DEPENDENCIES) 
+	@rm -f jpeg2hdf$(EXEEXT)
+	$(LINK) $(jpeg2hdf_LDFLAGS) $(jpeg2hdf_OBJECTS) $(jpeg2hdf_LDADD) $(LIBS)
+paltohdf$(EXEEXT): $(paltohdf_OBJECTS) $(paltohdf_DEPENDENCIES) 
+	@rm -f paltohdf$(EXEEXT)
+	$(LINK) $(paltohdf_LDFLAGS) $(paltohdf_OBJECTS) $(paltohdf_LDADD) $(LIBS)
+r8tohdf$(EXEEXT): $(r8tohdf_OBJECTS) $(r8tohdf_DEPENDENCIES) 
+	@rm -f r8tohdf$(EXEEXT)
+	$(LINK) $(r8tohdf_LDFLAGS) $(r8tohdf_OBJECTS) $(r8tohdf_LDADD) $(LIBS)
+ristosds$(EXEEXT): $(ristosds_OBJECTS) $(ristosds_DEPENDENCIES) 
+	@rm -f ristosds$(EXEEXT)
+	$(LINK) $(ristosds_LDFLAGS) $(ristosds_OBJECTS) $(ristosds_LDADD) $(LIBS)
+vmake$(EXEEXT): $(vmake_OBJECTS) $(vmake_DEPENDENCIES) 
+	@rm -f vmake$(EXEEXT)
+	$(LINK) $(vmake_LDFLAGS) $(vmake_OBJECTS) $(vmake_LDADD) $(LIBS)
+vshow$(EXEEXT): $(vshow_OBJECTS) $(vshow_DEPENDENCIES) 
+	@rm -f vshow$(EXEEXT)
+	$(LINK) $(vshow_LDFLAGS) $(vshow_OBJECTS) $(vshow_LDADD) $(LIBS)
+binSCRIPT_INSTALL = $(INSTALL_SCRIPT)
+install-binSCRIPTS: $(bin_SCRIPTS)
+	@$(NORMAL_INSTALL)
+	$(mkinstalldirs) $(DESTDIR)$(bindir)
+	@list='$(bin_SCRIPTS)'; for p in $$list; do \
+	  if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
+	  if test -f $$d$$p; then \
+	    f=`echo "$$p" | sed 's|^.*/||;$(transform)'`; \
+	    echo " $(binSCRIPT_INSTALL) $$d$$p $(DESTDIR)$(bindir)/$$f"; \
+	    $(binSCRIPT_INSTALL) $$d$$p $(DESTDIR)$(bindir)/$$f; \
+	  else :; fi; \
+	done
 
-PROGS = $(UTILS) hdfed
+uninstall-binSCRIPTS:
+	@$(NORMAL_UNINSTALL)
+	@list='$(bin_SCRIPTS)'; for p in $$list; do \
+	  f=`echo "$$p" | sed 's|^.*/||;$(transform)'`; \
+	  echo " rm -f $(DESTDIR)$(bindir)/$$f"; \
+	  rm -f $(DESTDIR)$(bindir)/$$f; \
+	done
 
-#all: hdfed utils fp2hdf fptest
-all::         FORCE
-	@if test -z "$(FMPOOL_FLAGS)"; then \
-	  $(MAKE) $(MFLAGS) $(HDF_FLAGS) hdfed utils fp2hdf fptest ; \
-	else		 \
-	  $(MAKE) $(MFLAGS) $(HDF_FLAGS) FMPOOL_FLAGS="$(FMPOOL_FLAGS) -I$(FMPOOL_INC)" hdfed utils fp2hdf fptest ; \
-	fi
+mostlyclean-compile:
+	-rm -f *.$(OBJEXT) core *.core
 
-#nofortran: hdfed utils fp2hdf fptest
-nofortran::         FORCE
-	@if test -z "$(FMPOOL_FLAGS)"; then \
-	  $(MAKE) $(MFLAGS) $(HDF_FLAGS) hdfed utils fp2hdf fptest ; \
-	else		 \
-	  $(MAKE) $(MFLAGS) $(HDF_FLAGS) FMPOOL_FLAGS="$(FMPOOL_FLAGS) -I$(FMPOOL_INC)" hdfed utils fp2hdf fptest ; \
-	fi
+distclean-compile:
+	-rm -f *.tab.c
 
-rebuild:
-	@$(MAKE) all $(HDF_FLAGS) FRC=force_rebuild
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/decompress.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/gif2hdf.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/gif2mem.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/gifread.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/hdf24to8.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/hdf2gif.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/hdf2jpeg.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/hdf8to24.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/hdfcomp.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/hdfgifwr.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/hdfls.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/hdfpack.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/hdftopal.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/hdftor8.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/hdfunpac.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/he_cntrl.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/he_disp.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/he_file.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/he_main.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/jpeg2hdf.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/paltohdf.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/r8tohdf.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/ristosds.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/vmake.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/vshow.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/writehdf.Po at am__quote@
 
-rebuildnofortran:
-	@$(MAKE) nofortran $(MFLAGS) $(HDF_FLAGS) FRC=force_rebuild
+.c.o:
+ at am__fastdepCC_TRUE@	if $(COMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" \
+ at am__fastdepCC_TRUE@	  -c -o $@ `test -f '$<' || echo '$(srcdir)/'`$<; \
+ at am__fastdepCC_TRUE@	then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; \
+ at am__fastdepCC_TRUE@	else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; \
+ at am__fastdepCC_TRUE@	fi
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	depfile='$(DEPDIR)/$*.Po' tmpdepfile='$(DEPDIR)/$*.TPo' @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	$(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCC_FALSE@	$(COMPILE) -c `test -f '$<' || echo '$(srcdir)/'`$<
 
-# Leave this target blank with no actions, the rebuild macros above depend on it
-force_rebuild:
+.c.obj:
+ at am__fastdepCC_TRUE@	if $(COMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" \
+ at am__fastdepCC_TRUE@	  -c -o $@ `if test -f '$<'; then $(CYGPATH_W) '$<'; else $(CYGPATH_W) '$(srcdir)/$<'; fi`; \
+ at am__fastdepCC_TRUE@	then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; \
+ at am__fastdepCC_TRUE@	else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; \
+ at am__fastdepCC_TRUE@	fi
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	depfile='$(DEPDIR)/$*.Po' tmpdepfile='$(DEPDIR)/$*.TPo' @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	$(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCC_FALSE@	$(COMPILE) -c `if test -f '$<'; then $(CYGPATH_W) '$<'; else $(CYGPATH_W) '$(srcdir)/$<'; fi`
+uninstall-info-am:
 
-install: install-prog
+ETAGS = etags
+ETAGSFLAGS =
 
-install-prog: all
-	for p in $(PROGS); do \
-	    $(INSTALL_PROGRAM) \
-		`pwd`/$$p $(bindir)/`$(ECHO) $$p`; \
+CTAGS = ctags
+CTAGSFLAGS =
+
+tags: TAGS
+
+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; } \
+	       END { for (i in files) print i; }'`; \
+	mkid -fID $$unique
+
+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; } \
+	       END { for (i in files) print i; }'`; \
+	test -z "$(ETAGS_ARGS)$$tags$$unique" \
+	  || $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
+	     $$tags $$unique
+
+ctags: CTAGS
+CTAGS:  $(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; } \
+	       END { 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
+DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
+
+top_distdir = ../..
+distdir = $(top_distdir)/$(PACKAGE)-$(VERSION)
+
+distdir: $(DISTFILES)
+	@srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \
+	topsrcdirstrip=`echo "$(top_srcdir)" | sed 's|.|.|g'`; \
+	list='$(DISTFILES)'; for file in $$list; do \
+	  case $$file in \
+	    $(srcdir)/*) file=`echo "$$file" | sed "s|^$$srcdirstrip/||"`;; \
+	    $(top_srcdir)/*) file=`echo "$$file" | sed "s|^$$topsrcdirstrip/|$(top_builddir)/|"`;; \
+	  esac; \
+	  if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
+	  dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \
+	  if test "$$dir" != "$$file" && test "$$dir" != "."; then \
+	    dir="/$$dir"; \
+	    $(mkinstalldirs) "$(distdir)$$dir"; \
+	  else \
+	    dir=''; \
+	  fi; \
+	  if test -d $$d/$$file; then \
+	    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) $(SCRIPTS)
 
-test-utils:
-	./testutil.sh $(target_canonical)
+installdirs:
+	$(mkinstalldirs) $(DESTDIR)$(bindir) $(DESTDIR)$(bindir)
+install: install-am
+install-exec: install-exec-am
+install-data: install-data-am
+uninstall: uninstall-am
 
-#.c.o: 
-#	 $(CC) $(CFLAGS) -c -I$(HDFINC) $*.c 
-#
-#.c.o: 
-#	 $(CC) $(CFLAGS) -c -I$(HDFINC) -I$(UTILINC) -I$(JPEGINC) -I$(ZLIBINC) $*.c 
+install-am: all-am
+	@$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
 
-.c.o: he.h he_proto.h $(HDFLIB)/libdf.a $(FRC)
-	$(CC) $(ALL_CFLAGS) -c $<
+installcheck: installcheck-am
+install-strip:
+	$(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
+	  INSTALL_STRIP_FLAG=-s \
+	  `test -z '$(STRIP)' || \
+	    echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
+mostlyclean-generic:
 
-.c: $(HDFLIB)/libdf.a
-	$(CC) $(ALL_CFLAGS) $< -o $@ $(HDFLIB)/libdf.a $(JPEGLIB)/libjpeg.a $(ZLIBLIB)/libz.a $(LIBSX)
+clean-generic:
 
-.f: $(HDFLIB)/libdf.a 
-	$(FC) $(FFLAGS) $< $(HDFLIB)/libdf.a -o $@ $(JPEGLIB)/libjpeg.a $(ZLIBLIB)/libz.a
+distclean-generic:
+	-rm -f $(CONFIG_CLEAN_FILES)
+	-test -z "$(DISTCLEANFILES)" || rm -f $(DISTCLEANFILES)
 
-hdfed: he.h he_proto.h $(HEOBJ) $(HDFLIB)/libdf.a $(FRC)
-	$(CC) $(ALL_CFLAGS) $(HEOBJ) $(HDFLIB)/libdf.a -o hdfed $(JPEGLIB)/libjpeg.a $(ZLIBLIB)/libz.a
+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
 
-gif2hdf: gif.h $(GHOBJ) $(HDFLIB)/libdf.a $(FRC)
-	$(CC) $(ALL_CFLAGS) $(GHOBJ) $(HDFLIB)/libdf.a -o gif2hdf $(JPEGLIB)/libjpeg.a $(ZLIBLIB)/libz.a
+clean-am: clean-binPROGRAMS clean-generic mostlyclean-am
 
-hdf2gif: gif.h $(HGOBJ) $(HDFLIB)/libdf.a $(FRC)
-	$(CC) $(ALL_CFLAGS) $(HGOBJ) $(HDFLIB)/libdf.a -o hdf2gif $(JPEGLIB)/libjpeg.a $(ZLIBLIB)/libz.a
+distclean: distclean-am
+	-rm -rf ./$(DEPDIR)
+	-rm -f Makefile
 
-utils: $(UTILS) $(HDFLIB)/libdf.a $(FRC)
+distclean-am: clean-am distclean-compile distclean-generic \
+	distclean-tags
 
-$(HEOBJ): $(FRC)
+dvi: dvi-am
 
-$(HDFLIB)/libdf.a:
+dvi-am:
 
-$(JPEGLIB)/libjpeg.a:
+info: info-am
 
-$(ZLIBLIB)/libz.a:
+info-am:
 
-clean:
-	-$(RM) $(RMFLAGS) *.o $(UTILS) hdfed fptest
-	-$(RM) $(RMFLAGS) o* ctx* cb* fptestf 
+install-data-am:
 
-distclean:
-	-$(RM) $(RMFLAGS) *.o $(UTILS) hdfed fptest config.status Makefile
-	-$(RM) $(RMFLAGS) o* ctx* cb* fptestf
-depend: 
-	 makedepend -I$(HDFINC) -I$(UTILINC) *.c
+install-exec-am: install-binPROGRAMS install-binSCRIPTS
 
-saber:	$(SRCS)
-	 #load $(ALL_CFLAGS) -D$(MACHINE) $(SRCS) 
+install-info: install-info-am
 
-# for distribution creation
-distdir = $(TOP_SRCDIR)/$(PACKAGE)-$(VERSION)/$(curdir)
-curdir = hdf/util
-dist: $(DISTFILES)
-	for subdir in $(OTHERDIRS); do \
-	  mkdir $(distdir)/$$subdir || exit 1; \
-	done
-	@for file in $(DISTFILES); do \
-	  ln $(srcdir)/$$file $(distdir)/$$file 2> /dev/null \
-	    || { echo copying $$file instead; \
-	    cp -p $(srcdir)/$$file $(distdir)/$$file;}; \
-	done
+install-man:
 
-# The following dummy target is useful as a dependency to ensure that a
-# rule is always executed.
-#
-FORCE:
+installcheck-am:
 
-help:
-	@echo ""
-	@echo "Make supports the following targets in the 'utilities' directory"
-	@echo "make help    - prints this usage section"
-	@echo "make all     - (DEFAULT) makes utilities"
-	@echo "make hdfed   - makes hdfed utilitiy"
-	@echo "make test-utils  - tests utilities"
-	@echo "make install     - install HDF utilites, "
-	@echo "make clean     - cleans up tests (both C and Fortran)"
-	@echo "make distclean - cleans up HDF tests including"
-	@echo "                 configuration(Makefiles,config.status,..)"
-	@echo ""
+maintainer-clean: maintainer-clean-am
+	-rm -rf ./$(DEPDIR)
+	-rm -f Makefile
 
-# DO NOT DELETE THIS LINE -- make depend depends on it.
+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 uninstall-binSCRIPTS \
+	uninstall-info-am
+
+.PHONY: CTAGS GTAGS all all-am check check-am clean clean-binPROGRAMS \
+	clean-generic ctags distclean distclean-compile \
+	distclean-generic distclean-tags distdir dvi dvi-am info \
+	info-am install install-am install-binPROGRAMS \
+	install-binSCRIPTS install-data install-data-am install-exec \
+	install-exec-am install-info install-info-am install-man \
+	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 \
+	uninstall-binSCRIPTS uninstall-info-am
+
+
+#############################################################################
+#############################################################################
+
+check:  $(bin_PROGRAMS)
+	sh ./testutil.sh $(target_canonical)
+# 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:

Added: packages/libhdf4/branches/upstream/current/hdf/util/README.fp2hdf
===================================================================
--- packages/libhdf4/branches/upstream/current/hdf/util/README.fp2hdf	                        (rev 0)
+++ packages/libhdf4/branches/upstream/current/hdf/util/README.fp2hdf	2007-05-15 09:53:05 UTC (rev 831)
@@ -0,0 +1,19 @@
+
+This revision of fptohdf, which we are calling fp2hdf,  supports native
+mode floating point (both single and double precision), and 3D floating 
+point data sets.
+
+For these additions we owe our thanks to Bob Weaver and colleagues
+at INEL.
+
+You should be able to compile fp2hdf, as well as the two programs
+for generating test data, by executing "make".  Note: you will
+need to change some of the definitions in the makefile to conform
+to your system.
+
+Except for Makefile, fp2hdf.c, and this README file, all of the
+files in this directory are for testing fp2hdf and illustrating
+its use.
+
+Mike Folk
+

Added: packages/libhdf4/branches/upstream/current/hdf/util/README.fp2hdf.test
===================================================================
--- packages/libhdf4/branches/upstream/current/hdf/util/README.fp2hdf.test	                        (rev 0)
+++ packages/libhdf4/branches/upstream/current/hdf/util/README.fp2hdf.test	2007-05-15 09:53:05 UTC (rev 831)
@@ -0,0 +1,63 @@
+
+
+
+There are two sets of input files for testing fp2hdf.  These files
+are used by the script fp2hdf.test.
+
+I. The first set consists of 2-D data sets that produce images that are 
+cross-hatched with 10 vertical and 10 horizontal lines.  These files
+use the following naming conventions:
+
+   't' prefix means it's a text file
+   'h' prefix means it's an hdf file
+   'h' at the end means horizontal scale is not uniform
+   'v' at the end means vertical scale is not uniform
+   'n' at the end means no scales are stored in the file
+   dimensions are given between  prefix and postfix
+
+The names of the files: (which are stored in the testfiles/fp2hdf directory)
+                    t100x100  
+                    h100x100  
+                    h100x100h 
+                    h100x100hv
+                    h60x75    
+                    h60x75v   
+                    h60x75n   
+
+II. The second set are generated by the programs ftest.c and ftest.F. 
+They are small files with 2-D and 3-D data sets that are easily 
+examined by eye.  Those that begin with the letter 'c' are 
+produced with the program ftest.c, and those that begin with 'f'
+were produced with ftest.F.
+
+                   ctxtr2, type 'TEXT', size 3x4
+                   ctxtr3, type 'TEXT', size 3x4x5
+                   cb32r2, type 'FP32', size 3x4
+                   cb32r3, type 'FP32', size 3x4x5
+                   cb64r2, type 'FP64', size 3x4
+                   cb64r3, type 'FP64', size 3x4x5
+     
+                   ftxtr2, type 'TEXT', size 3x4
+                   ftxtr3, type 'TEXT', size 3x4x5
+                   fb32r2, type 'FP32', size 3x4
+                   fb32r3, type 'FP32', size 3x4x5
+                   fb64r2, type 'FP64', size 3x4
+                   fb64r3, type 'FP64', size 3x4x5
+
+Contents of the arrays:
+
+  row    values start at 11 and increment by 1 => 11, 12, 13
+  column values start at 21 and increment by 2 => 21, 23, 25, 27
+  plane  values start at 51 and increment by 5 => 51, 56, 61, 66, 71
+
+  data element value = row value + column value [+ plane value, if rank=3]
+     
+
+Output files can be examined with hdfls to see if basic
+contents are there.  Those with raster images can be displayed
+using NCSA Image, DataScope, etc.  Those with floating point
+data can be examined using hdfed or DataScope.
+
+
+
+

Modified: packages/libhdf4/branches/upstream/current/hdf/util/fp2hdf.c
===================================================================
--- packages/libhdf4/branches/upstream/current/hdf/util/fp2hdf.c	2007-05-15 09:05:29 UTC (rev 830)
+++ packages/libhdf4/branches/upstream/current/hdf/util/fp2hdf.c	2007-05-15 09:53:05 UTC (rev 831)
@@ -160,6 +160,11 @@
 #include <string.h>
 #include <ctype.h>
 
+#ifdef WIN32
+#include <sys/stat.h>
+#include <fcntl.h>
+#endif
+
 /*
  * global macros
  */
@@ -355,11 +360,16 @@
     int         token;
     int         state = 0;
 
+    
     const char *err1 = "Invalid number of arguments:  %d.\n";
     const char *err2 = "Error in state table.\n";
     const char *err3 = "No output file given.\n";
     const char *err4 = "Program aborted.\n";
 
+#ifdef WIN32
+	_fmode = _O_BINARY;
+#endif
+
     /*
      * set 'stdout' and 'stderr' to line-buffering mode
      */
@@ -712,7 +722,8 @@
 
     if (in->is_text == TRUE)
       {
-          if (fscanf(strm, "%e", fp32) != 1)
+
+		if (fscanf(strm, "%e", fp32) != 1)
             {
                 (void) fprintf(stderr, err1, infile);
                 goto err;
@@ -720,6 +731,7 @@
       }
     else if (in->is_fp32 == TRUE)
       {
+		
           if (fread((char *) fp32, sizeof(float32), 1, strm) != 1)
             {
                 (void) fprintf(stderr, err1, infile);
@@ -1100,8 +1112,12 @@
                 (void) fprintf(stderr, err2, infile);
                 goto err;
             }
-          if (!HDmemcmp("TEXT", buf, 4) || !HDmemcmp("text", buf, 4))
+          if (!HDmemcmp("TEXT", buf, 4) || !HDmemcmp("text", buf, 4)) {
+#ifdef WIN32
+			  _fmode = _O_TEXT;
+#endif
               in->is_text = TRUE;
+		  }
           else
             {
                 rewind(*strm);
@@ -1120,6 +1136,7 @@
                       (void) fprintf(stderr, err3, infile);
                       goto err;
                   }
+		
             }
       }
 
@@ -1695,7 +1712,7 @@
     /*
      * extract a palette from an HDF file
      */
-    if (!Hishdf(palfile))
+    if (Hishdf(palfile))
       {
           if (DFPgetpal(palfile, pal))
             {

Added: packages/libhdf4/branches/upstream/current/hdf/util/fp2hdf.test
===================================================================
--- packages/libhdf4/branches/upstream/current/hdf/util/fp2hdf.test	                        (rev 0)
+++ packages/libhdf4/branches/upstream/current/hdf/util/fp2hdf.test	2007-05-15 09:53:05 UTC (rev 831)
@@ -0,0 +1,128 @@
+#! /bin/csh -f 
+#                   Script for testing fp2hdf
+#
+# The input files used in this script for testing fp2hdf are 
+# described in the file README.test.      
+#
+# Output files can be examined with hdfls to see if basic
+# contents are there.  Those with raster images can be displayed
+# using NCSA Image, DataScope, etc.  Those with floating point
+# data can be examined using hdfed or DataScope.
+# 
+# Note: these tests are not exhaustive.  You may want to add some
+# of your own, especially if you are doing something a little
+# different from what we are testing for.  You may also want to 
+# eliminate some of these tests if they are not relevant.
+# 
+set echo
+# text (100x100) => SDS only 
+./fp2hdf testfiles/fp2hdf/t100x100 -o o1 
+#
+# text => image only
+./fp2hdf testfiles/fp2hdf/t100x100 -o o2 -r
+#
+# text => SDS and image
+./fp2hdf testfiles/fp2hdf/t100x100 -o o3 -r -f
+#
+# hdf (100x100) => SDS and image
+./fp2hdf testfiles/fp2hdf/h100x100 -o o4 -r -f
+#
+# hdf => SDS and image w palette
+./fp2hdf testfiles/fp2hdf/h100x100 -o o5 -f -r -p testfiles/fp2hdf/pal.hdf
+#
+# hdf => 200x200 image, pixel replication 
+./fp2hdf testfiles/fp2hdf/h100x100 -o o6 -r -e 200 200
+#
+# hdf => 200x200 image, bilinear interporlation 
+./fp2hdf testfiles/fp2hdf/h100x100 -o o7 -r -i 200 200
+#
+# hdf => 40x120 interpolated image w palette
+./fp2hdf testfiles/fp2hdf/h100x100 -o o8 -r -i 40 120 -p testfiles/fp2hdf/pal.hdf
+#
+# hdf => 40x120 pixel rep image w palette (should generate and error)
+./fp2hdf testfiles/fp2hdf/h100x100 -o o9 -r -e 40 120 -p testfiles/fp2hdf/pal.hdf
+#
+# hdf (60x75) => 120x160 pixel rep image w palette
+./fp2hdf testfiles/fp2hdf/h60x75 -o o10 -r -e 120 160 -p testfiles/fp2hdf/pal.hdf
+#
+# hdf (100x100, horizontal scale is non-uniform) => SDS and image w palette
+./fp2hdf testfiles/fp2hdf/h100x100h -o o11 -f -r -p testfiles/fp2hdf/pal.hdf
+#
+# hdf (100x100, horiz and vert scales are non-uniform) => SDS and image w pal
+./fp2hdf testfiles/fp2hdf/h100x100hv -o o12 -f -r -p testfiles/fp2hdf/pal.hdf
+#
+# hdf (60x75 vert scale is non-uniform) => 120x160 image with palette
+./fp2hdf testfiles/fp2hdf/h60x75v -o o13 -r -e 120 160 -p testfiles/fp2hdf/pal.hdf
+#
+# hdf (60x75 no scales) => 120x150 pixel rep image with palette
+./fp2hdf testfiles/fp2hdf/h60x75n -o o14 -r -e 120 150 -p testfiles/fp2hdf/pal.hdf
+#
+# From several files => a file with 100x100 images for all of them
+./fp2hdf testfiles/fp2hdf/t100x100 testfiles/fp2hdf/h100x100 testfiles/fp2hdf/h100x100h testfiles/fp2hdf/h100x100hv testfiles/fp2hdf/h60x75 testfiles/fp2hdf/h60x75v -o o15 -r -e 100 100
+#
+# Now do test on the other set of input files
+#
+# C: text (3x4) => SDS 
+./fp2hdf ctxtr2 -o o20 
+#
+# C: text (3x4x5) => SDS 
+./fp2hdf ctxtr3 -o o21
+#
+# C: binary 32-bit (3x4) => SDS
+./fp2hdf cb32r2 -o o22 
+#
+# C: binary 32-bit (3x4x5) => SDS 
+./fp2hdf cb32r3 -o o23 
+#
+# C: binary 64-bit (3x4) => SDS 
+./fp2hdf cb64r2 -o o24 
+#
+# C: binary 64-bit (3x4x5) => SDS 
+./fp2hdf cb64r3 -o o25 
+#
+# C: text (3x4) => image
+./fp2hdf ctxtr2 -o o26 -raster -e 50 50 
+#
+# C: binary (3x4) => image and SDS
+./fp2hdf cb64r2 -o o27 -raster -i 50 50 -f
+#
+# 
+# Fortran: text (3x4) => SDS 
+./fp2hdf ftxtr2 -o o30 
+#
+# Fortran: text (3x4x5) => SDS 
+./fp2hdf ftxtr3 -o o31
+#
+# Fortran: binary 32-bit (3x4) => SDS
+./fp2hdf fb32r2 -o o32 
+#
+# Fortran: binary 32-bit (3x4x5) => SDS 
+./fp2hdf fb32r3 -o o33 
+#
+# Fortran: binary 64-bit (3x4) => SDS 
+./fp2hdf fb64r2 -o o34 
+#
+# Fortran: binary 64-bit (3x4x5) => SDS 
+./fp2hdf fb64r3 -o o35 
+#
+# Fortran: text (3x4) => image
+./fp2hdf ftxtr2 -o o36 -raster -e 50 50 
+#
+# Fortran: binary (3x4) => image and SDS
+./fp2hdf fb64r2 -o o37 -raster -i 50 50 -f
+#
+# 
+# Compare files o20-o27 with o30-o37.  They should be the same.
+#
+cmp o20 o30
+cmp o21 o31
+cmp o22 o32
+cmp o23 o33
+cmp o24 o34
+cmp o25 o35
+cmp o26 o36
+cmp o27 o37
+
+unset echo
+
+

Modified: packages/libhdf4/branches/upstream/current/hdf/util/fptest.c
===================================================================
--- packages/libhdf4/branches/upstream/current/hdf/util/fptest.c	2007-05-15 09:05:29 UTC (rev 830)
+++ packages/libhdf4/branches/upstream/current/hdf/util/fptest.c	2007-05-15 09:53:05 UTC (rev 831)
@@ -2,6 +2,11 @@
 #include <stdio.h>
 #include "hdf.h"
 
+#ifdef WIN32
+#include <sys/stat.h>
+#include <fcntl.h>
+#endif
+
 /*
  * Name:
  *      fptest
@@ -122,6 +127,12 @@
      * text file - rank 2 & 3
      */
 
+/* For WINDOWS platform, file mode should be set explicitly. 
+   For text mode, set it to Text; for binary mode, set it to BINARY. */
+
+#ifdef WIN32
+     _fmode = _O_TEXT;
+#endif
     sp = fopen("ctxtr2", "w");
     (void) fprintf(sp, "%s\n", text);
     (void) fprintf(sp, "%10d%10d%10d\n", ione, nrow, ncol);
@@ -165,7 +176,9 @@
     /*
      * binary 32-bit file - rank 2 & 3
      */
-
+#ifdef WIN32                                                                                       
+   _fmode = _O_BINARY;
+#endif 
 #ifndef UNICOS
     sp = fopen("cb32r2", "w");
     (void) fwrite(fp32, sizeof(int), 1, sp);

Modified: packages/libhdf4/branches/upstream/current/hdf/util/gif2mem.c
===================================================================
--- packages/libhdf4/branches/upstream/current/hdf/util/gif2mem.c	2007-05-15 09:05:29 UTC (rev 830)
+++ packages/libhdf4/branches/upstream/current/hdf/util/gif2mem.c	2007-05-15 09:53:05 UTC (rev 831)
@@ -24,7 +24,7 @@
 #include "gif.h"
 #include <hdf.h>
 
-#define VERSION                     "1.00"
+#define GIF_VERSION                     "1.00"
 extern int EndianOrder;
 
 GIFTOMEM

Added: packages/libhdf4/branches/upstream/current/hdf/util/h4cc.in
===================================================================
--- packages/libhdf4/branches/upstream/current/hdf/util/h4cc.in	                        (rev 0)
+++ packages/libhdf4/branches/upstream/current/hdf/util/h4cc.in	2007-05-15 09:53:05 UTC (rev 831)
@@ -0,0 +1,214 @@
+#! /bin/sh
+##
+## Copyright by the Board of Trustees of the University of Illinois.
+## All rights reserved.
+##
+
+############################################################################
+##                                                                        ##
+## Things You May Have to Modify:                                         ##
+##                                                                        ##
+## If the following paths don't point to the place were HDF4 is installed ##
+## on your system (i.e., you received a binary distribution or moved the  ##
+## files from the originally installed directory to another directory)    ##
+## then modify them accordingly to represent the new paths.               ##
+##                                                                        ##
+############################################################################
+prefix="@prefix@"
+exec_prefix="@exec_prefix@"
+libdir="@libdir@"
+includedir="@includedir@"
+
+############################################################################
+##                                                                        ##
+## You shouldn't have to modify anything below this line.                 ##
+##                                                                        ##
+############################################################################
+
+host_os="@host_os@"
+
+prog_name="`basename $0`"
+
+allargs=""
+compile_args=""
+libraries=""
+link_args=""
+link_objs=""
+
+do_link="yes"
+do_compile="no"
+dash_o="no"
+dash_c="no"
+get_output_file="no"
+
+SHOW="eval"
+CCBASE="@CC@"
+CLINKERBASE="@CC@"
+CFLAGS="@CFLAGS@"
+CPPFLAGS="@CPPFLAGS@"
+LDFLAGS="@LDFLAGS@"
+LIBS="@LIBS@"
+
+CC="${HDF4_CC:-$CCBASE}"
+CLINKER="${HDF4_CLINKER:-$CLINKERBASE}"
+
+usage() {
+  # A wonderfully informative "usage" message.
+  echo "usage: $prog_name [OPTIONS] <compile line>"
+  echo "  OPTIONS:"
+  echo "    -help        This help message."
+  echo "    -echo        Show all the shell commands executed"
+  echo "    -prefix=DIR  Prefix directory to find HDF4 lib/ and include/"
+  echo "                   subdirectories [default: $prefix]"
+  echo "    -show        Show the commands without executing them"
+  echo " "
+  echo "  <compile line>  - the normal compile line options for your compiler."
+  echo "                    $prog_name uses the same compiler you used to compile"
+  echo "                    HDF4. Check with your compiler's man pages for more"
+  echo "                    information on which options are needed."
+  echo " "
+  echo " You can override the compiler, linker, and whether or not to use static"
+  echo " or shared libraries to compile your program by setting the following"
+  echo " environment variables accordingly:"
+  echo " "
+  echo "   HDF4_CC                  -  use a different C compiler"
+  echo "   HDF4_CLINKER             -  use a different linker"
+  echo " "
+  exit 1
+}
+
+if test "$#" = "0"; then
+  # No parameters specified, issue usage statement and exit.
+  usage
+fi
+
+for arg in $@ ; do
+  if test "x$get_output_file" = "xyes"; then
+    link_args="$link_args $arg"
+    output_file="$arg"
+    get_output_file="no"
+    continue
+  fi
+
+  case "$arg" in
+    -c)
+      allargs="$allargs $arg"
+      compile_args="$compile_args $arg"
+
+      if test "x$do_link" = "xyes" -a -n "$output_file"; then
+        compile_args="$compile_args -o $outputfile"
+      fi
+
+      do_link="no"
+      dash_c="yes"
+      ;;
+    -o)
+      allargs="$allargs $arg"
+      dash_o="yes"
+
+      if test "x$dash_c" = "xyes"; then
+        compile_args="$compile_args $arg"
+      else
+        link_args="$link_args $arg"
+        do_link="yes"
+        get_output_file="yes"
+      fi
+      ;;
+    -E|-M)
+      allargs="$allargs $arg"
+      compile_args="$compile_args $arg"
+      dash_c="yes"
+      do_link="no"
+      ;;
+    -l*)
+      libraries=" $libraries $arg "
+      allargs="$allargs $arg"
+      ;;
+    -prefix=*)
+      prefix="`expr "$arg" : '-prefix=\(.*\)'`"
+      ;;
+    -echo)
+      set -x
+      ;;
+    -show)
+      SHOW="echo"
+      ;;
+    -help)
+      usage
+      ;;
+    *\"*)
+      qarg="'"$arg"'"
+      allargs="$allargs $qarg"
+      ;;
+    *\'*)
+      qarg='\"'"$arg"'\"'
+      allargs="$allargs $qarg"
+      ;;
+    *)
+      allargs="$allargs $qarg"
+
+      if test -s "$arg"; then
+        ext=`expr "$arg" : '.*\(\..*\)'`
+
+        if test "x$ext" = "x.c"; then
+          do_compile="yes"
+          compile_args="$compile_args $arg"
+          fname=`basename $arg .c`
+          link_objs="$link_objs $fname.o"
+        elif test "x$ext" = "x.o"; then
+          if test "x$dash_c" = "xyes"; then
+            compile_args="$compile_args $arg"
+          else
+            do_link="yes"
+            link_objs="$link_objs $arg"
+          fi
+        elif test "x$ext" = "x.a"; then
+          # This is an archive that we're linking in
+          libraries=" $libraries $arg "
+        else
+          compile_args="$compile_args $arg"
+          link_args="$link_args $arg"
+        fi
+      else
+        compile_args="$compile_args $arg"
+        link_args="$link_args $arg"
+      fi
+      ;;
+  esac
+done
+
+if test "x$do_compile" = "xyes"; then
+  if test "x$dash_c" != "xyes"; then
+    compile_args="-c $compile_args"
+  fi
+
+  $SHOW $CC -I$includedir $CPPFLAGS $CFLAGS $compile_args
+  status=$?
+
+  if test "$status" != "0"; then
+    exit $status
+  fi
+fi
+
+if test "x$do_link" = "xyes"; then
+  libraries=" $libraries -lmfhdf -ldf "
+  link_args="$link_args -L${libdir}"
+
+  for lib in $libraries; do
+    if echo $link_args | grep " $lib " > /dev/null ||
+       echo $link_args | grep " $lib$" > /dev/null; then
+      :
+    else
+      link_args="$link_args $lib "
+    fi
+  done
+
+  # The LIBS are just a bunch of -l* libraries necessary for the HDF4
+  # module. It's okay if they're included twice in the compile line.
+  link_args="$link_args $LIBS"
+
+  $SHOW $CLINKER $CFLAGS $LDFLAGS $link_objs $link_args
+  status=$?
+fi
+
+exit $status


Property changes on: packages/libhdf4/branches/upstream/current/hdf/util/h4cc.in
___________________________________________________________________
Name: svn:executable
   + *

Added: packages/libhdf4/branches/upstream/current/hdf/util/h4fc.in
===================================================================
--- packages/libhdf4/branches/upstream/current/hdf/util/h4fc.in	                        (rev 0)
+++ packages/libhdf4/branches/upstream/current/hdf/util/h4fc.in	2007-05-15 09:53:05 UTC (rev 831)
@@ -0,0 +1,213 @@
+#! /bin/sh
+##
+## Copyright by the Board of Trustees of the University of Illinois.
+## All rights reserved.
+##
+
+############################################################################
+##                                                                        ##
+## Things You May Have to Modify:                                         ##
+##                                                                        ##
+## If the following paths don't point to the place were HDF4 is installed ##
+## on your system (i.e., you received a binary distribution or moved the  ##
+## files from the originally installed directory to another directory)    ##
+## then modify them accordingly to represent the new paths.               ##
+##                                                                        ##
+############################################################################
+prefix="@prefix@"
+exec_prefix="@exec_prefix@"
+libdir="@libdir@"
+includedir="@includedir@"
+
+############################################################################
+##                                                                        ##
+## You shouldn't have to modify anything below this line.                 ##
+##                                                                        ##
+############################################################################
+
+host_os="@host_os@"
+
+prog_name="`basename $0`"
+
+allargs=""
+compile_args=""
+libraries=""
+link_args=""
+link_objs=""
+
+do_link="yes"
+do_compile="no"
+dash_o="no"
+dash_c="no"
+get_output_file="no"
+
+SHOW="eval"
+F77BASE="@F77@"
+F77LINKERBASE="@F77@"
+FFLAGS="@FFLAGS@"
+LDFLAGS="@LDFLAGS@"
+LIBS="@LIBS@"
+
+F77="${HDF4_F77:-$F77BASE}"
+F77LINKER="${HDF4_F77LINKER:-$F77LINKERBASE}"
+
+usage() {
+  # A wonderfully informative "usage" message.
+  echo "usage: $prog_name [OPTIONS] <compile line>"
+  echo "  OPTIONS:"
+  echo "    -help        This help message."
+  echo "    -echo        Show all the shell commands executed"
+  echo "    -prefix=DIR  Prefix directory to find HDF4 lib/ and include/"
+  echo "                   subdirectories [default: $prefix]"
+  echo "    -show        Show the commands without executing them"
+  echo " "
+  echo "  <compile line>  - the normal compile line options for your compiler."
+  echo "                    $prog_name uses the same compiler you used to compile"
+  echo "                    HDF4. Check with your compiler's man pages for more"
+  echo "                    information on which options are needed."
+  echo " "
+  echo " You can override the compiler, linker, and whether or not to use static"
+  echo " or shared libraries to compile your program by setting the following"
+  echo " environment variables accordingly:"
+  echo " "
+  echo "   HDF4_F77                 -  use a different Fortran 77 compiler"
+  echo "   HDF4_F77LINKER           -  use a different linker"
+  echo " "
+  exit 1
+}
+
+if test "$#" = "0"; then
+  # No parameters specified, issue usage statement and exit.
+  usage
+fi
+
+for arg in $@ ; do
+  if test "x$get_output_file" = "xyes"; then
+    link_args="$link_args $arg"
+    output_file="$arg"
+    get_output_file="no"
+    continue
+  fi
+
+  case "$arg" in
+    -c)
+      allargs="$allargs $arg"
+      compile_args="$compile_args $arg"
+
+      if test "x$do_link" = "xyes" -a -n "$output_file"; then
+        compile_args="$compile_args -o $outputfile"
+      fi
+
+      do_link="no"
+      dash_c="yes"
+      ;;
+    -o)
+      allargs="$allargs $arg"
+      dash_o="yes"
+
+      if test "x$dash_c" = "xyes"; then
+        compile_args="$compile_args $arg"
+      else
+        link_args="$link_args $arg"
+        do_link="yes"
+        get_output_file="yes"
+      fi
+      ;;
+    -E|-M)
+      allargs="$allargs $arg"
+      compile_args="$compile_args $arg"
+      dash_c="yes"
+      do_link="no"
+      ;;
+    -l*)
+      libraries=" $libraries $arg "
+      allargs="$allargs $arg"
+      ;;
+    -prefix=*)
+      prefix="`expr "$arg" : '-prefix=\(.*\)'`"
+      ;;
+    -echo)
+      set -x
+      ;;
+    -show)
+      SHOW="echo"
+      ;;
+    -help)
+      usage
+      ;;
+    *\"*)
+      qarg="'"$arg"'"
+      allargs="$allargs $qarg"
+      ;;
+    *\'*)
+      qarg='\"'"$arg"'\"'
+      allargs="$allargs $qarg"
+      ;;
+    *)
+      allargs="$allargs $qarg"
+
+      if test -s "$arg"; then
+        ext=`expr "$arg" : '.*\(\..*\)'`
+        if [ "$ext" = ".f" -o "$ext" = ".F" -o "$ext" = ".f90" -o \
+             "$ext" = ".for" -o "$ext" = ".FOR" -o "$ext" = ".F90" ] ; then       
+          do_compile="yes"
+          compile_args="$compile_args $arg"
+          fname=`basename $arg $ext`
+          link_objs="$link_objs $fname.o"
+        elif test "x$ext" = "x.o"; then
+          if test "x$dash_c" = "xyes"; then
+            compile_args="$compile_args $arg"
+          else
+            do_link="yes"
+            link_objs="$link_objs $arg"
+          fi
+        elif test "x$ext" = "x.a"; then
+          # This is an archive that we're linking in
+          libraries=" $libraries $arg "
+        else
+          compile_args="$compile_args $arg"
+          link_args="$link_args $arg"
+        fi
+      else
+        compile_args="$compile_args $arg"
+        link_args="$link_args $arg"
+      fi
+      ;;
+  esac
+done
+
+if test "x$do_compile" = "xyes"; then
+  if test "x$dash_c" != "xyes"; then
+    compile_args="-c $compile_args"
+  fi
+
+  $SHOW $F77 -I$includedir $FFLAGS $compile_args
+  status=$?
+
+  if test "$status" != "0"; then
+    exit $status
+  fi
+fi
+
+if test "x$do_link" = "xyes"; then
+  libraries=" $libraries -lmfhdf -ldf "
+  link_args="$link_args -L${libdir}"
+
+  for lib in $libraries; do
+    if echo $link_args | grep " $lib " > /dev/null ||
+       echo $link_args | grep " $lib$" > /dev/null; then
+      :
+    else
+      link_args="$link_args $lib "
+    fi
+  done
+
+  # The LIBS are just a bunch of -l* libraries necessary for the HDF4
+  # module. It's okay if they're included twice in the compile line.
+  link_args="$link_args $LIBS"
+
+  $SHOW $F77LINKER $FFLAGS $LDFLAGS $link_objs $link_args
+  status=$?
+fi
+
+exit $status


Property changes on: packages/libhdf4/branches/upstream/current/hdf/util/h4fc.in
___________________________________________________________________
Name: svn:executable
   + *

Added: packages/libhdf4/branches/upstream/current/hdf/util/h4redeploy.in
===================================================================
--- packages/libhdf4/branches/upstream/current/hdf/util/h4redeploy.in	                        (rev 0)
+++ packages/libhdf4/branches/upstream/current/hdf/util/h4redeploy.in	2007-05-15 09:53:05 UTC (rev 831)
@@ -0,0 +1,166 @@
+#! /bin/sh
+##
+## Copyright by the Board of Trustees of the University of Illinois.
+## All rights reserved.
+##
+
+## Update HDF4 compiler tools after the HDF4 software has been installed
+## in a new location.
+## For help page, use "h5redeploy -help"
+
+# Function definitions
+
+# show help page
+usage() {
+  # A wonderfully informative "usage" message.
+  echo "usage: $prog_name [OPTIONS]"
+  echo "  OPTIONS:"
+  echo "    -help|help   This help message"
+  echo "    -echo        Show all the shell commands executed"
+  echo "    -force       No prompt, just do it"
+  echo "    -prefix=DIR  New directory to find HDF4 lib/ and include/"
+  echo "                   subdirectories [default: current directory]"
+  echo "    -tool=TOOL   Tool to update. TOOL must be in the current"
+  echo "                   directory and writable. [default: $h4tools]"
+  echo "    -show        Show the commands without executing them"
+  echo " "
+  exit 1
+}
+
+# display variable values
+dump_vars(){
+    echo "====Showing all variable values====="
+    echo prefix=$prefix
+    echo h4tools=$h4tools
+    echo "====End Showing====="
+}
+
+# show actions to be taken
+show_action()
+{
+    echo "Update the following tools because they are now installed at a new directory"
+    for t in $foundtools; do
+	echo "${t}:"
+	echo "   current setting=`sed -e '/^prefix=/s/prefix=//p' -e d $t`"
+	echo "   new     setting="\""$prefix"\"
+    done
+}
+
+
+# Report Error message
+ERROR()
+{
+    echo "***ERROR***"
+    echo "$1"
+}
+
+# Main
+#
+# Initialization
+h4tools="h4cc h4fc"	# possible hdf4 tools
+foundtools=		# tools found and will be modified
+fmode=			# force mode, default is off
+prefix=`(cd ..;pwd)`
+
+# Parse options
+for arg in $@ ; do
+  case "$arg" in
+    -prefix=*)
+      prefix="`expr "$arg" : '-prefix=\(.*\)'`"
+      ;;
+    -echo)
+      set -x
+      ;;
+    -show)
+      SHOW="echo"
+      ;;
+    -tool=*)
+      h4tools="`expr "$arg" : '-tool=\(.*\)'`"
+      ;;
+    -help|help)
+      usage
+      ;;
+    -force)
+      fmode=yes
+      ;;
+    *)
+      ERROR "Unknown Option($arg)"
+      usage
+      exit 1
+      ;;
+  esac
+done
+
+# Sanity checks
+if [ ! -d $prefix ]; then
+    ERROR "prefix($prefix) is not an existing directory"
+    exit 1
+fi
+
+for x in $h4tools; do
+    if [ -f $x ]; then
+	foundtools="$foundtools $x"
+	if [ ! -w $x ]; then
+	    ERROR "h5tool($x) is not writable"
+	    exit 1
+	fi
+    fi
+done
+
+if [ -z "$foundtools" ]; then
+    ERROR "found no tools to modify"
+    exit 1
+fi
+
+# Show actions to be taken and get consent
+show_action
+# Ask confirmation unless fmode is on
+if [ x-$fmode = x- ]; then
+    echo "Continue? (yes/no)"
+    read ansx
+    ans=`echo $ansx | tr "[A-Z]" "[a-z]"`
+    if [ x-$ans != x-yes ]; then
+	echo ABORT.  No tools changed.
+	exit 1
+    fi
+fi
+
+
+# Create the update commands
+CMDFILE=/tmp/h5redeploy.$$
+touch $CMDFILE
+chmod 0600 $CMDFILE
+echo "/^prefix/c"                 >> $CMDFILE
+echo prefix=\""$prefix"\"         >> $CMDFILE
+echo .                            >> $CMDFILE
+(echo w; echo q)                  >> $CMDFILE
+
+
+# Update them
+if [ "$SHOW" = "echo" ]; then
+    echo "===Update commands are:===="
+    cat $CMDFILE
+    echo "===End Update commands====="
+fi
+
+for t in $foundtools; do
+    echo Update $t ...
+    COMMAND="ed - $t"
+    if [ "$SHOW" = "echo" ]; then
+	echo $COMMAND
+    else
+	$COMMAND < $CMDFILE
+    fi
+done
+
+
+# Cleanup
+rm -f $CMDFILE
+exit 0
+
+# Some possible future features to add
+# CCBASE - Name of the alternative C compiler
+# CLINKERBASE - Name of the alternative linker
+# LDFLAGS   - Path to different libraries your application will link with
+#     (this path should include the path to the zlib library)
+# LIBS      - Libraries your application will link with


Property changes on: packages/libhdf4/branches/upstream/current/hdf/util/h4redeploy.in
___________________________________________________________________
Name: svn:executable
   + *

Modified: packages/libhdf4/branches/upstream/current/hdf/util/hdf2gif.c
===================================================================
--- packages/libhdf4/branches/upstream/current/hdf/util/hdf2gif.c	2007-05-15 09:05:29 UTC (rev 830)
+++ packages/libhdf4/branches/upstream/current/hdf/util/hdf2gif.c	2007-05-15 09:53:05 UTC (rev 831)
@@ -174,11 +174,23 @@
 		
 		status = GRgetiminfo(ri_id , gr_name , &ncomp , &data_type , &interlace_mode , dim_sizes , &num_attrs);
 		if (!(data_type == DFNT_CHAR || data_type == DFNT_UCHAR || data_type == DFNT_INT8 || data_type == DFNT_UINT8 || data_type == DFNT_NINT8 || data_type == DFNT_NUINT8)) {
-			printf("The GR data type appears not to be 8-bit. Trying next image...\n");
+			printf("The GR data type of image %s in the hdf file appears not to be 8-bit. Trying next image...\n", gr_name);
 			continue;
 		}
-
 		
+		/* BUG FIX 601 - pkamat */
+		if (1 != ncomp) {  /* not an 8-bit image */ 
+		  if (3 == ncomp) { /* 24-bit image */
+		    printf("The GR data type of image %s in the hdf file appears to be a 24-bit image. ", gr_name);
+		    printf("Use hdf2jpeg to convert this image. Trying next image... \n");
+		    continue;
+                  }
+		  printf("The GR data type of image %s in the hdf file does not appear to be a 8-bit image. ", gr_name);
+		  printf("Trying next image... \n");	
+		  continue;
+		}	
+		/* End BUG FIX 601 */ 
+		
 		Image = (BYTE *)malloc(dim_sizes[0] * dim_sizes[1]);
 		status = GRreadimage(ri_id , start , stride , dim_sizes , Image);
 		w = dim_sizes[0];

Modified: packages/libhdf4/branches/upstream/current/hdf/util/hdfcomp.c
===================================================================
--- packages/libhdf4/branches/upstream/current/hdf/util/hdfcomp.c	2007-05-15 09:05:29 UTC (rev 830)
+++ packages/libhdf4/branches/upstream/current/hdf/util/hdfcomp.c	2007-05-15 09:53:05 UTC (rev 831)
@@ -11,10 +11,10 @@
  ****************************************************************************/
 
 #ifdef RCSID
-static char RcsId[] = "$Revision: 1.14 $";
+static char RcsId[] = "$Revision: 1.16 $";
 #endif
 
-/* $Id: hdfcomp.c,v 1.14 1996/11/11 20:40:17 koziol Exp $ */
+/* $Id: hdfcomp.c,v 1.16 2003/12/10 21:13:47 epourmal Exp $ */
 
 /*
 *  hdfcomp.c
@@ -58,7 +58,7 @@
         printf("  appended to outfile, if it exists.\n\n");
         printf("Usage:\n");
         printf(" hdfcomp outfile {[-c],[-r],[-i],[-j<quality>]} imagefile ...\n");
-        printf("                 {[-c],[-r],[-i], [-j<quality>]} imagefile\n");
+        printf("                 {[-c],[-r],[-i],[-j<quality>]} imagefile\n");
         printf("         -r: Store without compression (default)\n");
         printf("         -c: Store using RLE compression\n");
         printf("         -i: Store using IMCOMP compression (requires a");

Modified: packages/libhdf4/branches/upstream/current/hdf/util/hdfpack.c
===================================================================
--- packages/libhdf4/branches/upstream/current/hdf/util/hdfpack.c	2007-05-15 09:05:29 UTC (rev 830)
+++ packages/libhdf4/branches/upstream/current/hdf/util/hdfpack.c	2007-05-15 09:53:05 UTC (rev 831)
@@ -11,10 +11,10 @@
  ****************************************************************************/
 
 #ifdef RCSID
-static char RcsId[] = "@(#)$Revision: 1.26 $";
+static char RcsId[] = "@(#)$Revision: 1.28 $";
 #endif
 
-/* $Id: hdfpack.c,v 1.26 1997/10/25 00:56:30 koziol Exp $ */
+/* $Id: hdfpack.c,v 1.28 2003/12/10 21:13:47 epourmal Exp $ */
 
 /*
    ** FILE
@@ -284,8 +284,8 @@
  */
     qsort((char *) dlist, (size_t)num_desc, sizeof(*dlist), desc_comp);
 
-    oldoff = -1;
-    oldlen = -1;
+    oldoff = -2;
+    oldlen = -2;
     for (i = 0; i < num_desc; i++)
       {
           if (((dlist[i].tag != DFTAG_NULL) && (dlist[i].tag != DFTAG_VERSION))
@@ -531,7 +531,8 @@
           HERROR(DFE_GENAPP);
           hdferror();
       }
-    outaid = Hstartwrite(outfile, BASETAG(dd->tag), dd->ref, dd->length);
+
+    outaid = Hstartaccess(outfile,BASETAG(dd->tag),dd->ref,DFACC_WRITE);
     if (outaid == FAIL)
       {
           HERROR(DFE_GENAPP);

Added: packages/libhdf4/branches/upstream/current/hdf/util/testfiles/fp2hdf/h100x100
===================================================================
(Binary files differ)


Property changes on: packages/libhdf4/branches/upstream/current/hdf/util/testfiles/fp2hdf/h100x100
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: packages/libhdf4/branches/upstream/current/hdf/util/testfiles/fp2hdf/h100x100h
===================================================================
(Binary files differ)


Property changes on: packages/libhdf4/branches/upstream/current/hdf/util/testfiles/fp2hdf/h100x100h
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: packages/libhdf4/branches/upstream/current/hdf/util/testfiles/fp2hdf/h100x100hv
===================================================================
(Binary files differ)


Property changes on: packages/libhdf4/branches/upstream/current/hdf/util/testfiles/fp2hdf/h100x100hv
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: packages/libhdf4/branches/upstream/current/hdf/util/testfiles/fp2hdf/h60x75
===================================================================
(Binary files differ)


Property changes on: packages/libhdf4/branches/upstream/current/hdf/util/testfiles/fp2hdf/h60x75
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: packages/libhdf4/branches/upstream/current/hdf/util/testfiles/fp2hdf/h60x75n
===================================================================
(Binary files differ)


Property changes on: packages/libhdf4/branches/upstream/current/hdf/util/testfiles/fp2hdf/h60x75n
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: packages/libhdf4/branches/upstream/current/hdf/util/testfiles/fp2hdf/h60x75v
===================================================================
(Binary files differ)


Property changes on: packages/libhdf4/branches/upstream/current/hdf/util/testfiles/fp2hdf/h60x75v
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: packages/libhdf4/branches/upstream/current/hdf/util/testfiles/fp2hdf/pal.hdf
===================================================================
(Binary files differ)


Property changes on: packages/libhdf4/branches/upstream/current/hdf/util/testfiles/fp2hdf/pal.hdf
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: packages/libhdf4/branches/upstream/current/hdf/util/testfiles/fp2hdf/t100x100
===================================================================
--- packages/libhdf4/branches/upstream/current/hdf/util/testfiles/fp2hdf/t100x100	                        (rev 0)
+++ packages/libhdf4/branches/upstream/current/hdf/util/testfiles/fp2hdf/t100x100	2007-05-15 09:53:05 UTC (rev 831)
@@ -0,0 +1,6 @@
+TEXT
+1 100 100
+ 100.000000 0.000000
+ 0.000000 1.000000 2.000000 3.000000 4.000000 5.000000 6.000000 7.000000 8.000000 9.000000 10.000000 11.000000 12.000000 13.000000 14.000000 15.000000 16.000000 17.000000 18.000000 19.000000 20.000000 21.000000 22.000000 23.000000 24.000000 25.000000 26.000000 27.000000 28.000000 29.000000 30.000000 31.000000 32.000000 33.000000 34.000000 35.000000 36.000000 37.000000 38.000000 39.000000 40.000000 41.000000 42.000000 43.000000 44.000000 45.000000 46.000000 47.000000 48.000000 49.000000 50.000000 51.000000 52.000000 53.000000 54.000000 55.000000 56.000000 57.000000 58.000000 59.000000 60.000000 61.000000 62.000000 63.000000 64.000000 65.000000 66.000000 67.000000 68.000000 69.000000 70.000000 71.000000 72.000000 73.000000 74.000000 75.000000 76.000000 77.000000 78.000000 79.000000 80.000000 81.000000 82.000000 83.000000 84.000000 85.000000 86.000000 87.000000 88.000000 89.000000 90.000000 91.000000 92.000000 93.000000 94.000000 95.000000 96.000000 97.000000 98.000000 99.000000 
+0.000000 1.000000 2.000000 3.000000 4.000000 5.000000 6.000000 7.000000 8.000000 9.000000 10.000000 11.000000 12.000000 13.000000 14.000000 15.000000 16.000000 17.000000 18.000000 19.000000 20.000000 21.000000 22.000000 23.000000 24.000000 25.000000 26.000000 27.000000 28.000000 29.000000 30.000000 31.000000 32.000000 33.000000 34.000000 35.000000 36.000000 37.000000 38.000000 39.000000 40.000000 41.000000 42.000000 43.000000 44.000000 45.000000 46.000000 47.000000 48.000000 49.000000 50.000000 51.000000 52.000000 53.000000 54.000000 55.000000 56.000000 57.000000 58.000000 59.000000 60.000000 61.000000 62.000000 63.000000 64.000000 65.000000 66.000000 67.000000 68.000000 69.000000 70.000000 71.000000 72.000000 73.000000 74.000000 75.000000 76.000000 77.000000 78.000000 79.000000 80.000000 81.000000 82.000000 83.000000 84.000000 85.000000 86.000000 87.000000 88.000000 89.000000 90.000000 91.000000 92.000000 93.000000 94.000000 95.000000 96.000000 97.000000 98.000000 99.000000 
+   0.0    0.0    0.0    0.0    0.0    0.0    0.0    0.0    0.0    0.0    0.0    0.0    0.0    0.0    0.0    0.0    0.0    0.0    0.0    0.0    0.0    0.0    0.0    0.0    0.0    0.0    0.0    0.0    0.0    0.0    0.0    0.0    0.0    0.0    0.0    0.0    0.0    0.0    0.0    0.0    0.0    0.0    0.0    0.0    0.0    0.0    0.0    0.0    0.0    0.0    0.0    0.0    0.0    0.0    0.0    0.0    0.0    0.0    0.0    0.0    0.0    0.0    0.0    0.0    0.0    0.0    0.0    0.0    0.0    0.0    0.0    0.0    0.0    0.0    0.0    0.0    0.0    0.0    0.0    0.0    0.0    0.0    0.0    0.0    0.0    0.0    0.0    0.0    0.0    0.0    0.0    0.0    0.0    0.0    0.0    0.0    0.0    0.0    0.0    0.0    0.0    2.0    2.0    2.0    2.0    2.0    2.0    2.0    2.0    2.0    0.0    2.0    2.0    2.0    2.0    2.0    2.0    2.0    2.0    2.0    0.0    2.0    2.0    2.0    2.0    2.0    2.0    2.0    2.0    2.0    0.0    2.0    2.0    2.0    2.0    2.0    2.0    2.0    2.0    2.0    0.0    2.0    2.0    2.0    2.0    2.0    2.0    2.0    2.0    2.0    0.0    2.0    2.0    2.0    2.0    2.0    2.0    2.0    2.0    2.0    0.0    2.0    2.0    2.0    2.0    2.0    2.0    2.0    2.0    2.0    0.0    2.0    2.0    2.0    2.0    2.0    2.0    2.0    2.0    2.0    0.0    2.0    2.0    2.0    2.0    2.0    2.0    2.0    2.0    2.0    0.0    2.0    2.0    2.0    2.0    2.0    2.0    2.0    2.0    2.0    0.0    3.0    3.0    3.0    3.0    3.0    3.0    3.0    3.0    3.0    0.0    3.0    3.0    3.0    3.0    3.0    3.0    3.0    3.0    3.0    0.0    3.0    3.0    3.0    3.0    3.0    3.0    3.0    3.0    3.0    0.0    3.0    3.0    3.0    3.0    3.0    3.0    3.0    3.0    3.0    0.0    3.0    3.0    3.0    3.0    3.0    3.0    3.0    3.0    3.0    0.0    3.0    3.0    3.0    3.0    3.0    3.0    3.0    3.0    3.0    0.0    3.0    3.0    3.0    3.0    3.0    3.0    3.0    3.0    3.0    0.0    3.0    3.0    3.0    3.0    3.0    3.0    3.0    3.0    3.0    0.0    3.0    3.0    3.0    3.0    3.0    3.0    3.0    3.0    3.0    0.0    3.0    3.0    3.0    3.0    3.0    3.0    3.0    3.0    3.0    0.0    4.0    4.0    4.0    4.0    4.0    4.0    4.0    4.0    4.0    0.0    4.0    4.0    4.0    4.0    4.0    4.0    4.0    4.0    4.0    0.0    4.0    4.0    4.0    4.0    4.0    4.0    4.0    4.0    4.0    0.0    4.0    4.0    4.0    4.0    4.0    4.0    4.0    4.0    4.0    0.0    4.0    4.0    4.0    4.0    4.0    4.0    4.0    4.0    4.0    0.0    4.0    4.0    4.0    4.0    4.0    4.0    4.0    4.0    4.0    0.0    4.0    4.0    4.0    4.0    4.0    4.0    4.0    4.0    4.0    0.0    4.0    4.0    4.0    4.0    4.0    4.0    4.0    4.0    4.0    0.0    4.0    4.0    4.0    4.0    4.0    4.0    4.0    4.0    4.0    0.0    4.0    4.0    4.0    4.0    4.0    4.0    4.0    4.0    4.0    0.0    5.0    5.0    5.0    5.0    5.0    5.0    5.0    5.0    5.0    0.0    5.0    5.0    5.0    5.0    5.0    5.0    5.0    5.0    5.0    0.0    5.0    5.0    5.0    5.0    5.0    5.0    5.0    5.0    5.0    0.0    5.0    5.0    5.0    5.0    5.0    5.0    5.0    5.0    5.0    0.0    5.0    5.0    5.0    5.0    5.0    5.0    5.0    5.0    5.0    0.0    5.0    5.0    5.0    5.0    5.0    5.0    5.0    5.0    5.0    0.0    5.0    5.0    5.0    5.0    5.0    5.0    5.0    5.0    5.0    0.0    5.0    5.0    5.0    5.0    5.0    5.0    5.0    5.0    5.0    0.0    5.0    5.0    5.0    5.0    5.0    5.0    5.0    5.0    5.0    0.0    5.0    5.0    5.0    5.0    5.0    5.0    5.0    5.0    5.0    0.0    6.0    6.0    6.0    6.0    6.0    6.0    6.0    6.0    6.0    0.0    6.0    6.0    6.0    6.0    6.0    6.0    6.0    6.0    6.0    0.0    6.0    6.0    6.0    6.0    6.0    6.0    6.0    6.0    6.0    0.0    6.0    6.0    6.0    6.0    6.0    6.0    6.0    6.0    6.0    0.0    6.0    6.0    6.0    6.0    6.0    6.0    6.0    6.0    6.0    0.0    6.0    6.0    6.0    6.0    6.0    6.0    6.0    6.0    6.0    0.0    6.0    6.0    6.0    6.0    6.0    6.0    6.0    6.0    6.0    0.0    6.0    6.0    6.0    6.0    6.0    6.0    6.0    6.0    6.0    0.0    6.0    6.0    6.0    6.0    6.0    6.0    6.0    6.0    6.0    0.0    6.0    6.0    6.0    6.0    6.0    6.0    6.0    6.0    6.0    0.0    7.0    7.0    7.0    7.0    7.0    7.0    7.0    7.0    7.0    0.0    7.0    7.0    7.0    7.0    7.0    7.0    7.0    7.0    7.0    0.0    7.0    7.0    7.0    7.0    7.0    7.0    7.0    7.0    7.0    0.0    7.0    7.0    7.0    7.0    7.0    7.0    7.0    7.0    7.0    0.0    7.0    7.0    7.0    7.0    7.0    7.0    7.0    7.0    7.0    0.0    7.0    7.0    7.0    7.0    7.0    7.0    7.0    7.0    7.0    0.0    7.0    7.0    7.0    7.0    7.0    7.0    7.0    7.0    7.0    0.0    7.0    7.0    7.0    7.0    7.0    7.0    7.0    7.0    7.0    0.0    7.0    7.0    7.0    7.0    7.0    7.0    7.0    7.0    7.0    0.0    7.0    7.0    7.0    7.0    7.0    7.0    7.0    7.0    7.0    0.0    8.0    8.0    8.0    8.0    8.0    8.0    8.0    8.0    8.0    0.0    8.0    8.0    8.0    8.0    8.0    8.0    8.0    8.0    8.0    0.0    8.0    8.0    8.0    8.0    8.0    8.0    8.0    8.0    8.0    0.0    8.0    8.0    8.0    8.0    8.0    8.0    8.0    8.0    8.0    0.0    8.0    8.0    8.0    8.0    8.0    8.0    8.0    8.0    8.0    0.0    8.0    8.0    8.0    8.0    8.0    8.0    8.0    8.0    8.0    0.0    8.0    8.0    8.0    8.0    8.0    8.0    8.0    8.0    8.0    0.0    8.0    8.0    8.0    8.0    8.0    8.0    8.0    8.0    8.0    0.0    8.0    8.0    8.0    8.0    8.0    8.0    8.0    8.0    8.0    0.0    8.0    8.0    8.0    8.0    8.0    8.0    8.0    8.0    8.0    0.0    9.0    9.0    9.0    9.0    9.0    9.0    9.0    9.0    9.0    0.0    9.0    9.0    9.0    9.0    9.0    9.0    9.0    9.0    9.0    0.0    9.0    9.0    9.0    9.0    9.0    9.0    9.0    9.0    9.0    0.0    9.0    9.0    9.0    9.0    9.0    9.0    9.0    9.0    9.0    0.0    9.0    9.0    9.0    9.0    9.0    9.0    9.0    9.0    9.0    0.0    9.0    9.0    9.0    9.0    9.0    9.0    9.0    9.0    9.0    0.0    9.0    9.0    9.0    9.0    9.0    9.0    9.0    9.0    9.0    0.0    9.0    9.0    9.0    9.0    9.0    9.0    9.0    9.0    9.0    0.0    9.0    9.0    9.0    9.0    9.0    9.0    9.0    9.0    9.0    0.0    9.0    9.0    9.0    9.0    9.0    9.0    9.0    9.0    9.0    0.0   10.0   10.0   10.0   10.0   10.0   10.0   10.0   10.0   10.0    0.0   10.0   10.0   10.0   10.0   10.0   10.0   10.0   10.0   10.0    0.0   10.0   10.0   10.0   10.0   10.0   10.0   10.0   10.0   10.0    0.0   10.0   10.0   10.0   10.0   10.0   10.0   10.0   10.0   10.0    0.0   10.0   10.0   10.0   10.0   10.0   10.0   10.0   10.0   10.0    0.0   10.0   10.0   10.0   10.0   10.0   10.0   10.0   10.0   10.0    0.0   10.0   10.0   10.0   10.0   10.0   10.0   10.0   10.0   10.0    0.0   10.0   10.0   10.0   10.0   10.0   10.0   10.0   10.0   10.0    0.0   10.0   10.0   10.0   10.0   10.0   10.0   10.0   10.0   10.0    0.0   10.0   10.0   10.0   10.0   10.0   10.0   10.0   10.0   10.0    0.0    0.0    0.0    0.0    0.0    0.0    0.0    0.0    0.0    0.0    0.0    0.0    0.0    0.0    0.0    0.0    0.0    0.0    0.0    0.0    0.0    0.0    0.0    0.0    0.0    0.0    0.0    0.0    0.0    0.0    0.0    0.0    0.0    0.0    0.0    0.0    0.0    0.0    0.0    0.0    0.0    0.0    0.0    0.0    0.0    0.0    0.0    0.0    0.0    0.0    0.0    0.0    0.0    0.0    0.0    0.0    0.0    0.0    0.0    0.0    0.0    0.0    0.0    0.0    0.0    0.0    0.0    0.0    0.0    0.0    0.0    0.0    0.0    0.0    0.0    0.0    0.0    0.0    0.0    0.0    0.0    0.0    0.0    0.0    0.0    0.0    0.0    0.0    0.0    0.0    0.0    0.0    0.0    0.0    0.0    0.0    0.0    0.0    0.0    0.0    0.0   12.0   12.0   12.0   12.0   12.0   12.0   12.0   12.0   12.0    0.0   12.0   12.0   12.0   12.0   12.0   12.0   12.0   12.0   12.0    0.0   12.0   12.0   12.0   12.0   12.0   12.0   12.0   12.0   12.0    0.0   12.0   12.0   12.0   12.0   12.0   12.0   12.0   12.0   12.0    0.0   12.0   12.0   12.0   12.0   12.0   12.0   12.0   12.0   12.0    0.0   12.0   12.0   12.0   12.0   12.0   12.0   12.0   12.0   12.0    0.0   12.0   12.0   12.0   12.0   12.0   12.0   12.0   12.0   12.0    0.0   12.0   12.0   12.0   12.0   12.0   12.0   12.0   12.0   12.0    0.0   12.0   12.0   12.0   12.0   12.0   12.0   12.0   12.0   12.0    0.0   12.0   12.0   12.0   12.0   12.0   12.0   12.0   12.0   12.0    0.0   13.0   13.0   13.0   13.0   13.0   13.0   13.0   13.0   13.0    0.0   13.0   13.0   13.0   13.0   13.0   13.0   13.0   13.0   13.0    0.0   13.0   13.0   13.0   13.0   13.0   13.0   13.0   13.0   13.0    0.0   13.0   13.0   13.0   13.0   13.0   13.0   13.0   13.0   13.0    0.0   13.0   13.0   13.0   13.0   13.0   13.0   13.0   13.0   13.0    0.0   13.0   13.0   13.0   13.0   13.0   13.0   13.0   13.0   13.0    0.0   13.0   13.0   13.0   13.0   13.0   13.0   13.0   13.0   13.0    0.0   13.0   13.0   13.0   13.0   13.0   13.0   13.0   13.0   13.0    0.0   13.0   13.0   13.0   13.0   13.0   13.0   13.0   13.0   13.0    0.0   13.0   13.0   13.0   13.0   13.0   13.0   13.0   13.0   13.0    0.0   14.0   14.0   14.0   14.0   14.0   14.0   14.0   14.0   14.0    0.0   14.0   14.0   14.0   14.0   14.0   14.0   14.0   14.0   14.0    0.0   14.0   14.0   14.0   14.0   14.0   14.0   14.0   14.0   14.0    0.0   14.0   14.0   14.0   14.0   14.0   14.0   14.0   14.0   14.0    0.0   14.0   14.0   14.0   14.0   14.0   14.0   14.0   14.0   14.0    0.0   14.0   14.0   14.0   14.0   14.0   14.0   14.0   14.0   14.0    0.0   14.0   14.0   14.0   14.0   14.0   14.0   14.0   14.0   14.0    0.0   14.0   14.0   14.0   14.0   14.0   14.0   14.0   14.0   14.0    0.0   14.0   14.0   14.0   14.0   14.0   14.0   14.0   14.0   14.0    0.0   14.0   14.0   14.0   14.0   14.0   14.0   14.0   14.0   14.0    0.0   15.0   15.0   15.0   15.0   15.0   15.0   15.0   15.0   15.0    0.0   15.0   15.0   15.0   15.0   15.0   15.0   15.0   15.0   15.0    0.0   15.0   15.0   15.0   15.0   15.0   15.0   15.0   15.0   15.0    0.0   15.0   15.0   15.0   15.0   15.0   15.0   15.0   15.0   15.0    0.0   15.0   15.0   15.0   15.0   15.0   15.0   15.0   15.0   15.0    0.0   15.0   15.0   15.0   15.0   15.0   15.0   15.0   15.0   15.0    0.0   15.0   15.0   15.0   15.0   15.0   15.0   15.0   15.0   15.0    0.0   15.0   15.0   15.0   15.0   15.0   15.0   15.0   15.0   15.0    0.0   15.0   15.0   15.0   15.0   15.0   15.0   15.0   15.0   15.0    0.0   15.0   15.0   15.0   15.0   15.0   15.0   15.0   15.0   15.0    0.0   16.0   16.0   16.0   16.0   16.0   16.0   16.0   16.0   16.0    0.0   16.0   16.0   16.0   16.0   16.0   16.0   16.0   16.0   16.0    0.0   16.0   16.0   16.0   16.0   16.0   16.0   16.0   16.0   16.0    0.0   16.0   16.0   16.0   16.0   16.0   16.0   16.0   16.0   16.0    0.0   16.0   16.0   16.0   16.0   16.0   16.0   16.0   16.0   16.0    0.0   16.0   16.0   16.0   16.0   16.0   16.0   16.0   16.0   16.0    0.0   16.0   16.0   16.0   16.0   16.0   16.0   16.0   16.0   16.0    0.0   16.0   16.0   16.0   16.0   16.0   16.0   16.0   16.0   16.0    0.0   16.0   16.0   16.0   16.0   16.0   16.0   16.0   16.0   16.0    0.0   16.0   16.0   16.0   16.0   16.0   16.0   16.0   16.0   16.0    0.0   17.0   17.0   17.0   17.0   17.0   17.0   17.0   17.0   17.0    0.0   17.0   17.0   17.0   17.0   17.0   17.0   17.0   17.0   17.0    0.0   17.0   17.0   17.0   17.0   17.0   17.0   17.0   17.0   17.0    0.0   17.0   17.0   17.0   17.0   17.0   17.0   17.0   17.0   17.0    0.0   17.0   17.0   17.0   17.0   17.0   17.0   17.0   17.0   17.0    0.0   17.0   17.0   17.0   17.0   17.0   17.0   17.0   17.0   17.0    0.0   17.0   17.0   17.0   17.0   17.0   17.0   17.0   17.0   17.0    0.0   17.0   17.0   17.0   17.0   17.0   17.0   17.0   17.0   17.0    0.0   17.0   17.0   17.0   17.0   17.0   17.0   17.0   17.0   17.0    0.0   17.0   17.0   17.0   17.0   17.0   17.0   17.0   17.0   17.0    0.0   18.0   18.0   18.0   18.0   18.0   18.0   18.0   18.0   18.0    0.0   18.0   18.0   18.0   18.0   18.0   18.0   18.0   18.0   18.0    0.0   18.0   18.0   18.0   18.0   18.0   18.0   18.0   18.0   18.0    0.0   18.0   18.0   18.0   18.0   18.0   18.0   18.0   18.0   18.0    0.0   18.0   18.0   18.0   18.0   18.0   18.0   18.0   18.0   18.0    0.0   18.0   18.0   18.0   18.0   18.0   18.0   18.0   18.0   18.0    0.0   18.0   18.0   18.0   18.0   18.0   18.0   18.0   18.0   18.0    0.0   18.0   18.0   18.0   18.0   18.0   18.0   18.0   18.0   18.0    0.0   18.0   18.0   18.0   18.0   18.0   18.0   18.0   18.0   18.0    0.0   18.0   18.0   18.0   18.0   18.0   18.0   18.0   18.0   18.0    0.0   19.0   19.0   19.0   19.0   19.0   19.0   19.0   19.0   19.0    0.0   19.0   19.0   19.0   19.0   19.0   19.0   19.0   19.0   19.0    0.0   19.0   19.0   19.0   19.0   19.0   19.0   19.0   19.0   19.0    0.0   19.0   19.0   19.0   19.0   19.0   19.0   19.0   19.0   19.0    0.0   19.0   19.0   19.0   19.0   19.0   19.0   19.0   19.0   19.0    0.0   19.0   19.0   19.0   19.0   19.0   19.0   19.0   19.0   19.0    0.0   19.0   19.0   19.0   19.0   19.0   19.0   19.0   19.0   19.0    0.0   19.0   19.0   19.0   19.0   19.0   19.0   19.0   19.0   19.0    0.0   19.0   19.0   19.0   19.0   19.0   19.0   19.0   19.0   19.0    0.0   19.0   19.0   19.0   19.0   19.0   19.0   19.0   19.0   19.0    0.0   20.0   20.0   20.0   20.0   20.0   20.0   20.0   20.0   20.0    0.0   20.0   20.0   20.0   20.0   20.0   20.0   20.0   20.0   20.0    0.0   20.0   20.0   20.0   20.0   20.0   20.0   20.0   20.0   20.0    0.0   20.0   20.0   20.0   20.0   20.0   20.0   20.0   20.0   20.0    0.0   20.0   20.0   20.0   20.0   20.0   20.0   20.0   20.0   20.0    0.0   20.0   20.0   20.0   20.0   20.0   20.0   20.0   20.0   20.0    0.0   20.0   20.0   20.0   20.0   20.0   20.0   20.0   20.0   20.0    0.0   20.0   20.0   20.0   20.0   20.0   20.0   20.0   20.0   20.0    0.0   20.0   20.0   20.0   20.0   20.0   20.0   20.0   20.0   20.0    0.0   20.0   20.0   20.0   20.0   20.0   20.0   20.0   20.0   20.0    0.0    0.0    0.0    0.0    0.0    0.0    0.0    0.0    0.0    0.0    0.0    0.0    0.0    0.0    0.0    0.0    0.0    0.0    0.0    0.0    0.0    0.0    0.0    0.0    0.0    0.0    0.0    0.0    0.0    0.0    0.0    0.0    0.0    0.0    0.0    0.0    0.0    0.0    0.0    0.0    0.0    0.0    0.0    0.0    0.0    0.0    0.0    0.0    0.0    0.0    0.0    0.0    0.0    0.0    0.0    0.0    0.0    0.0    0.0    0.0    0.0    0.0    0.0    0.0    0.0    0.0    0.0    0.0    0.0    0.0    0.0    0.0    0.0    0.0    0.0    0.0    0.0    0.0    0.0    0.0    0.0    0.0    0.0    0.0    0.0    0.0    0.0    0.0    0.0    0.0    0.0    0.0    0.0    0.0    0.0    0.0    0.0    0.0    0.0    0.0    0.0   22.0   22.0   22.0   22.0   22.0   22.0   22.0   22.0   22.0    0.0   22.0   22.0   22.0   22.0   22.0   22.0   22.0   22.0   22.0    0.0   22.0   22.0   22.0   22.0   22.0   22.0   22.0   22.0   22.0    0.0   22.0   22.0   22.0   22.0   22.0   22.0   22.0   22.0   22.0    0.0   22.0   22.0   22.0   22.0   22.0   22.0   22.0   22.0   22.0    0.0   22.0   22.0   22.0   22.0   22.0   22.0   22.0   22.0   22.0    0.0   22.0   22.0   22.0   22.0   22.0   22.0   22.0   22.0   22.0    0.0   22.0   22.0   22.0   22.0   22.0   22.0   22.0   22.0   22.0    0.0   22.0   22.0   22.0   22.0   22.0   22.0   22.0   22.0   22.0    0.0   22.0   22.0   22.0   22.0   22.0   22.0   22.0   22.0   22.0    0.0   23.0   23.0   23.0   23.0   23.0   23.0   23.0   23.0   23.0    0.0   23.0   23.0   23.0   23.0   23.0   23.0   23.0   23.0   23.0    0.0   23.0   23.0   23.0   23.0   23.0   23.0   23.0   23.0   23.0    0.0   23.0   23.0   23.0   23.0   23.0   23.0   23.0   23.0   23.0    0.0   23.0   23.0   23.0   23.0   23.0   23.0   23.0   23.0   23.0    0.0   23.0   23.0   23.0   23.0   23.0   23.0   23.0   23.0   23.0    0.0   23.0   23.0   23.0   23.0   23.0   23.0   23.0   23.0   23.0    0.0   23.0   23.0   23.0   23.0   23.0   23.0   23.0   23.0   23.0    0.0   23.0   23.0   23.0   23.0   23.0   23.0   23.0   23.0   23.0    0.0   23.0   23.0   23.0   23.0   23.0   23.0   23.0   23.0   23.0    0.0   24.0   24.0   24.0   24.0   24.0   24.0   24.0   24.0   24.0    0.0   24.0   24.0   24.0   24.0   24.0   24.0   24.0   24.0   24.0    0.0   24.0   24.0   24.0   24.0   24.0   24.0   24.0   24.0   24.0    0.0   24.0   24.0   24.0   24.0   24.0   24.0   24.0   24.0   24.0    0.0   24.0   24.0   24.0   24.0   24.0   24.0   24.0   24.0   24.0    0.0   24.0   24.0   24.0   24.0   24.0   24.0   24.0   24.0   24.0    0.0   24.0   24.0   24.0   24.0   24.0   24.0   24.0   24.0   24.0    0.0   24.0   24.0   24.0   24.0   24.0   24.0   24.0   24.0   24.0    0.0   24.0   24.0   24.0   24.0   24.0   24.0   24.0   24.0   24.0    0.0   24.0   24.0   24.0   24.0   24.0   24.0   24.0   24.0   24.0    0.0   25.0   25.0   25.0   25.0   25.0   25.0   25.0   25.0   25.0    0.0   25.0   25.0   25.0   25.0   25.0   25.0   25.0   25.0   25.0    0.0   25.0   25.0   25.0   25.0   25.0   25.0   25.0   25.0   25.0    0.0   25.0   25.0   25.0   25.0   25.0   25.0   25.0   25.0   25.0    0.0   25.0   25.0   25.0   25.0   25.0   25.0   25.0   25.0   25.0    0.0   25.0   25.0   25.0   25.0   25.0   25.0   25.0   25.0   25.0    0.0   25.0   25.0   25.0   25.0   25.0   25.0   25.0   25.0   25.0    0.0   25.0   25.0   25.0   25.0   25.0   25.0   25.0   25.0   25.0    0.0   25.0   25.0   25.0   25.0   25.0   25.0   25.0   25.0   25.0    0.0   25.0   25.0   25.0   25.0   25.0   25.0   25.0   25.0   25.0    0.0   26.0   26.0   26.0   26.0   26.0   26.0   26.0   26.0   26.0    0.0   26.0   26.0   26.0   26.0   26.0   26.0   26.0   26.0   26.0    0.0   26.0   26.0   26.0   26.0   26.0   26.0   26.0   26.0   26.0    0.0   26.0   26.0   26.0   26.0   26.0   26.0   26.0   26.0   26.0    0.0   26.0   26.0   26.0   26.0   26.0   26.0   26.0   26.0   26.0    0.0   26.0   26.0   26.0   26.0   26.0   26.0   26.0   26.0   26.0    0.0   26.0   26.0   26.0   26.0   26.0   26.0   26.0   26.0   26.0    0.0   26.0   26.0   26.0   26.0   26.0   26.0   26.0   26.0   26.0    0.0   26.0   26.0   26.0   26.0   26.0   26.0   26.0   26.0   26.0    0.0   26.0   26.0   26.0   26.0   26.0   26.0   26.0   26.0   26.0    0.0   27.0   27.0   27.0   27.0   27.0   27.0   27.0   27.0   27.0    0.0   27.0   27.0   27.0   27.0   27.0   27.0   27.0   27.0   27.0    0.0   27.0   27.0   27.0   27.0   27.0   27.0   27.0   27.0   27.0    0.0   27.0   27.0   27.0   27.0   27.0   27.0   27.0   27.0   27.0    0.0   27.0   27.0   27.0   27.0   27.0   27.0   27.0   27.0   27.0    0.0   27.0   27.0   27.0   27.0   27.0   27.0   27.0   27.0   27.0    0.0   27.0   27.0   27.0   27.0   27.0   27.0   27.0   27.0   27.0    0.0   27.0   27.0   27.0   27.0   27.0   27.0   27.0   27.0   27.0    0.0   27.0   27.0   27.0   27.0   27.0   27.0   27.0   27.0   27.0    0.0   27.0   27.0   27.0   27.0   27.0   27.0   27.0   27.0   27.0    0.0   28.0   28.0   28.0   28.0   28.0   28.0   28.0   28.0   28.0    0.0   28.0   28.0   28.0   28.0   28.0   28.0   28.0   28.0   28.0    0.0   28.0   28.0   28.0   28.0   28.0   28.0   28.0   28.0   28.0    0.0   28.0   28.0   28.0   28.0   28.0   28.0   28.0   28.0   28.0    0.0   28.0   28.0   28.0   28.0   28.0   28.0   28.0   28.0   28.0    0.0   28.0   28.0   28.0   28.0   28.0   28.0   28.0   28.0   28.0    0.0   28.0   28.0   28.0   28.0   28.0   28.0   28.0   28.0   28.0    0.0   28.0   28.0   28.0   28.0   28.0   28.0   28.0   28.0   28.0    0.0   28.0   28.0   28.0   28.0   28.0   28.0   28.0   28.0   28.0    0.0   28.0   28.0   28.0   28.0   28.0   28.0   28.0   28.0   28.0    0.0   29.0   29.0   29.0   29.0   29.0   29.0   29.0   29.0   29.0    0.0   29.0   29.0   29.0   29.0   29.0   29.0   29.0   29.0   29.0    0.0   29.0   29.0   29.0   29.0   29.0   29.0   29.0   29.0   29.0    0.0   29.0   29.0   29.0   29.0   29.0   29.0   29.0   29.0   29.0    0.0   29.0   29.0   29.0   29.0   29.0   29.0   29.0   29.0   29.0    0.0   29.0   29.0   29.0   29.0   29.0   29.0   29.0   29.0   29.0    0.0   29.0   29.0   29.0   29.0   29.0   29.0   29.0   29.0   29.0    0.0   29.0   29.0   29.0   29.0   29.0   29.0   29.0   29.0   29.0    0.0   29.0   29.0   29.0   29.0   29.0   29.0   29.0   29.0   29.0    0.0   29.0   29.0   29.0   29.0   29.0   29.0   29.0   29.0   29.0    0.0   30.0   30.0   30.0   30.0   30.0   30.0   30.0   30.0   30.0    0.0   30.0   30.0   30.0   30.0   30.0   30.0   30.0   30.0   30.0    0.0   30.0   30.0   30.0   30.0   30.0   30.0   30.0   30.0   30.0    0.0   30.0   30.0   30.0   30.0   30.0   30.0   30.0   30.0   30.0    0.0   30.0   30.0   30.0   30.0   30.0   30.0   30.0   30.0   30.0    0.0   30.0   30.0   30.0   30.0   30.0   30.0   30.0   30.0   30.0    0.0   30.0   30.0   30.0   30.0   30.0   30.0   30.0   30.0   30.0    0.0   30.0   30.0   30.0   30.0   30.0   30.0   30.0   30.0   30.0    0.0   30.0   30.0   30.0   30.0   30.0   30.0   30.0   30.0   30.0    0.0   30.0   30.0   30.0   30.0   30.0   30.0   30.0   30.0   30.0    0.0    0.0    0.0    0.0    0.0    0.0    0.0    0.0    0.0    0.0    0.0    0.0    0.0    0.0    0.0    0.0    0.0    0.0    0.0    0.0    0.0    0.0    0.0    0.0    0.0    0.0    0.0    0.0    0.0    0.0    0.0    0.0    0.0    0.0    0.0    0.0    0.0    0.0    0.0    0.0    0.0    0.0    0.0    0.0    0.0    0.0    0.0    0.0    0.0    0.0    0.0    0.0    0.0    0.0    0.0    0.0    0.0    0.0    0.0    0.0    0.0    0.0    0.0    0.0    0.0    0.0    0.0    0.0    0.0    0.0    0.0    0.0    0.0    0.0    0.0    0.0    0.0    0.0    0.0    0.0    0.0    0.0    0.0    0.0    0.0    0.0    0.0    0.0    0.0    0.0    0.0    0.0    0.0    0.0    0.0    0.0    0.0    0.0    0.0    0.0    0.0   32.0   32.0   32.0   32.0   32.0   32.0   32.0   32.0   32.0    0.0   32.0   32.0   32.0   32.0   32.0   32.0   32.0   32.0   32.0    0.0   32.0   32.0   32.0   32.0   32.0   32.0   32.0   32.0   32.0    0.0   32.0   32.0   32.0   32.0   32.0   32.0   32.0   32.0   32.0    0.0   32.0   32.0   32.0   32.0   32.0   32.0   32.0   32.0   32.0    0.0   32.0   32.0   32.0   32.0   32.0   32.0   32.0   32.0   32.0    0.0   32.0   32.0   32.0   32.0   32.0   32.0   32.0   32.0   32.0    0.0   32.0   32.0   32.0   32.0   32.0   32.0   32.0   32.0   32.0    0.0   32.0   32.0   32.0   32.0   32.0   32.0   32.0   32.0   32.0    0.0   32.0   32.0   32.0   32.0   32.0   32.0   32.0   32.0   32.0    0.0   33.0   33.0   33.0   33.0   33.0   33.0   33.0   33.0   33.0    0.0   33.0   33.0   33.0   33.0   33.0   33.0   33.0   33.0   33.0    0.0   33.0   33.0   33.0   33.0   33.0   33.0   33.0   33.0   33.0    0.0   33.0   33.0   33.0   33.0   33.0   33.0   33.0   33.0   33.0    0.0   33.0   33.0   33.0   33.0   33.0   33.0   33.0   33.0   33.0    0.0   33.0   33.0   33.0   33.0   33.0   33.0   33.0   33.0   33.0    0.0   33.0   33.0   33.0   33.0   33.0   33.0   33.0   33.0   33.0    0.0   33.0   33.0   33.0   33.0   33.0   33.0   33.0   33.0   33.0    0.0   33.0   33.0   33.0   33.0   33.0   33.0   33.0   33.0   33.0    0.0   33.0   33.0   33.0   33.0   33.0   33.0   33.0   33.0   33.0    0.0   34.0   34.0   34.0   34.0   34.0   34.0   34.0   34.0   34.0    0.0   34.0   34.0   34.0   34.0   34.0   34.0   34.0   34.0   34.0    0.0   34.0   34.0   34.0   34.0   34.0   34.0   34.0   34.0   34.0    0.0   34.0   34.0   34.0   34.0   34.0   34.0   34.0   34.0   34.0    0.0   34.0   34.0   34.0   34.0   34.0   34.0   34.0   34.0   34.0    0.0   34.0   34.0   34.0   34.0   34.0   34.0   34.0   34.0   34.0    0.0   34.0   34.0   34.0   34.0   34.0   34.0   34.0   34.0   34.0    0.0   34.0   34.0   34.0   34.0   34.0   34.0   34.0   34.0   34.0    0.0   34.0   34.0   34.0   34.0   34.0   34.0   34.0   34.0   34.0    0.0   34.0   34.0   34.0   34.0   34.0   34.0   34.0   34.0   34.0    0.0   35.0   35.0   35.0   35.0   35.0   35.0   35.0   35.0   35.0    0.0   35.0   35.0   35.0   35.0   35.0   35.0   35.0   35.0   35.0    0.0   35.0   35.0   35.0   35.0   35.0   35.0   35.0   35.0   35.0    0.0   35.0   35.0   35.0   35.0   35.0   35.0   35.0   35.0   35.0    0.0   35.0   35.0   35.0   35.0   35.0   35.0   35.0   35.0   35.0    0.0   35.0   35.0   35.0   35.0   35.0   35.0   35.0   35.0   35.0    0.0   35.0   35.0   35.0   35.0   35.0   35.0   35.0   35.0   35.0    0.0   35.0   35.0   35.0   35.0   35.0   35.0   35.0   35.0   35.0    0.0   35.0   35.0   35.0   35.0   35.0   35.0   35.0   35.0   35.0    0.0   35.0   35.0   35.0   35.0   35.0   35.0   35.0   35.0   35.0    0.0   36.0   36.0   36.0   36.0   36.0   36.0   36.0   36.0   36.0    0.0   36.0   36.0   36.0   36.0   36.0   36.0   36.0   36.0   36.0    0.0   36.0   36.0   36.0   36.0   36.0   36.0   36.0   36.0   36.0    0.0   36.0   36.0   36.0   36.0   36.0   36.0   36.0   36.0   36.0    0.0   36.0   36.0   36.0   36.0   36.0   36.0   36.0   36.0   36.0    0.0   36.0   36.0   36.0   36.0   36.0   36.0   36.0   36.0   36.0    0.0   36.0   36.0   36.0   36.0   36.0   36.0   36.0   36.0   36.0    0.0   36.0   36.0   36.0   36.0   36.0   36.0   36.0   36.0   36.0    0.0   36.0   36.0   36.0   36.0   36.0   36.0   36.0   36.0   36.0    0.0   36.0   36.0   36.0   36.0   36.0   36.0   36.0   36.0   36.0    0.0   37.0   37.0   37.0   37.0   37.0   37.0   37.0   37.0   37.0    0.0   37.0   37.0   37.0   37.0   37.0   37.0   37.0   37.0   37.0    0.0   37.0   37.0   37.0   37.0   37.0   37.0   37.0   37.0   37.0    0.0   37.0   37.0   37.0   37.0   37.0   37.0   37.0   37.0   37.0    0.0   37.0   37.0   37.0   37.0   37.0   37.0   37.0   37.0   37.0    0.0   37.0   37.0   37.0   37.0   37.0   37.0   37.0   37.0   37.0    0.0   37.0   37.0   37.0   37.0   37.0   37.0   37.0   37.0   37.0    0.0   37.0   37.0   37.0   37.0   37.0   37.0   37.0   37.0   37.0    0.0   37.0   37.0   37.0   37.0   37.0   37.0   37.0   37.0   37.0    0.0   37.0   37.0   37.0   37.0   37.0   37.0   37.0   37.0   37.0    0.0   38.0   38.0   38.0   38.0   38.0   38.0   38.0   38.0   38.0    0.0   38.0   38.0   38.0   38.0   38.0   38.0   38.0   38.0   38.0    0.0   38.0   38.0   38.0   38.0   38.0   38.0   38.0   38.0   38.0    0.0   38.0   38.0   38.0   38.0   38.0   38.0   38.0   38.0   38.0    0.0   38.0   38.0   38.0   38.0   38.0   38.0   38.0   38.0   38.0    0.0   38.0   38.0   38.0   38.0   38.0   38.0   38.0   38.0   38.0    0.0   38.0   38.0   38.0   38.0   38.0   38.0   38.0   38.0   38.0    0.0   38.0   38.0   38.0   38.0   38.0   38.0   38.0   38.0   38.0    0.0   38.0   38.0   38.0   38.0   38.0   38.0   38.0   38.0   38.0    0.0   38.0   38.0   38.0   38.0   38.0   38.0   38.0   38.0   38.0    0.0   39.0   39.0   39.0   39.0   39.0   39.0   39.0   39.0   39.0    0.0   39.0   39.0   39.0   39.0   39.0   39.0   39.0   39.0   39.0    0.0   39.0   39.0   39.0   39.0   39.0   39.0   39.0   39.0   39.0    0.0   39.0   39.0   39.0   39.0   39.0   39.0   39.0   39.0   39.0    0.0   39.0   39.0   39.0   39.0   39.0   39.0   39.0   39.0   39.0    0.0   39.0   39.0   39.0   39.0   39.0   39.0   39.0   39.0   39.0    0.0   39.0   39.0   39.0   39.0   39.0   39.0   39.0   39.0   39.0    0.0   39.0   39.0   39.0   39.0   39.0   39.0   39.0   39.0   39.0    0.0   39.0   39.0   39.0   39.0   39.0   39.0   39.0   39.0   39.0    0.0   39.0   39.0   39.0   39.0   39.0   39.0   39.0   39.0   39.0    0.0   40.0   40.0   40.0   40.0   40.0   40.0   40.0   40.0   40.0    0.0   40.0   40.0   40.0   40.0   40.0   40.0   40.0   40.0   40.0    0.0   40.0   40.0   40.0   40.0   40.0   40.0   40.0   40.0   40.0    0.0   40.0   40.0   40.0   40.0   40.0   40.0   40.0   40.0   40.0    0.0   40.0   40.0   40.0   40.0   40.0   40.0   40.0   40.0   40.0    0.0   40.0   40.0   40.0   40.0   40.0   40.0   40.0   40.0   40.0    0.0   40.0   40.0   40.0   40.0   40.0   40.0   40.0   40.0   40.0    0.0   40.0   40.0   40.0   40.0   40.0   40.0   40.0   40.0   40.0    0.0   40.0   40.0   40.0   40.0   40.0   40.0   40.0   40.0   40.0    0.0   40.0   40.0   40.0   40.0   40.0   40.0   40.0   40.0   40.0    0.0    0.0    0.0    0.0    0.0    0.0    0.0    0.0    0.0    0.0    0.0    0.0    0.0    0.0    0.0    0.0    0.0    0.0    0.0    0.0    0.0    0.0    0.0    0.0    0.0    0.0    0.0    0.0    0.0    0.0    0.0    0.0    0.0    0.0    0.0    0.0    0.0    0.0    0.0    0.0    0.0    0.0    0.0    0.0    0.0    0.0    0.0    0.0    0.0    0.0    0.0    0.0    0.0    0.0    0.0    0.0    0.0    0.0    0.0    0.0    0.0    0.0    0.0    0.0    0.0    0.0    0.0    0.0    0.0    0.0    0.0    0.0    0.0    0.0    0.0    0.0    0.0    0.0    0.0    0.0    0.0    0.0    0.0    0.0    0.0    0.0    0.0    0.0    0.0    0.0    0.0    0.0    0.0    0.0    0.0    0.0    0.0    0.0    0.0    0.0    0.0   42.0   42.0   42.0   42.0   42.0   42.0   42.0   42.0   42.0    0.0   42.0   42.0   42.0   42.0   42.0   42.0   42.0   42.0   42.0    0.0   42.0   42.0   42.0   42.0   42.0   42.0   42.0   42.0   42.0    0.0   42.0   42.0   42.0   42.0   42.0   42.0   42.0   42.0   42.0    0.0   42.0   42.0   42.0   42.0   42.0   42.0   42.0   42.0   42.0    0.0   42.0   42.0   42.0   42.0   42.0   42.0   42.0   42.0   42.0    0.0   42.0   42.0   42.0   42.0   42.0   42.0   42.0   42.0   42.0    0.0   42.0   42.0   42.0   42.0   42.0   42.0   42.0   42.0   42.0    0.0   42.0   42.0   42.0   42.0   42.0   42.0   42.0   42.0   42.0    0.0   42.0   42.0   42.0   42.0   42.0   42.0   42.0   42.0   42.0    0.0   43.0   43.0   43.0   43.0   43.0   43.0   43.0   43.0   43.0    0.0   43.0   43.0   43.0   43.0   43.0   43.0   43.0   43.0   43.0    0.0   43.0   43.0   43.0   43.0   43.0   43.0   43.0   43.0   43.0    0.0   43.0   43.0   43.0   43.0   43.0   43.0   43.0   43.0   43.0    0.0   43.0   43.0   43.0   43.0   43.0   43.0   43.0   43.0   43.0    0.0   43.0   43.0   43.0   43.0   43.0   43.0   43.0   43.0   43.0    0.0   43.0   43.0   43.0   43.0   43.0   43.0   43.0   43.0   43.0    0.0   43.0   43.0   43.0   43.0   43.0   43.0   43.0   43.0   43.0    0.0   43.0   43.0   43.0   43.0   43.0   43.0   43.0   43.0   43.0    0.0   43.0   43.0   43.0   43.0   43.0   43.0   43.0   43.0   43.0    0.0   44.0   44.0   44.0   44.0   44.0   44.0   44.0   44.0   44.0    0.0   44.0   44.0   44.0   44.0   44.0   44.0   44.0   44.0   44.0    0.0   44.0   44.0   44.0   44.0   44.0   44.0   44.0   44.0   44.0    0.0   44.0   44.0   44.0   44.0   44.0   44.0   44.0   44.0   44.0    0.0   44.0   44.0   44.0   44.0   44.0   44.0   44.0   44.0   44.0    0.0   44.0   44.0   44.0   44.0   44.0   44.0   44.0   44.0   44.0    0.0   44.0   44.0   44.0   44.0   44.0   44.0   44.0   44.0   44.0    0.0   44.0   44.0   44.0   44.0   44.0   44.0   44.0   44.0   44.0    0.0   44.0   44.0   44.0   44.0   44.0   44.0   44.0   44.0   44.0    0.0   44.0   44.0   44.0   44.0   44.0   44.0   44.0   44.0   44.0    0.0   45.0   45.0   45.0   45.0   45.0   45.0   45.0   45.0   45.0    0.0   45.0   45.0   45.0   45.0   45.0   45.0   45.0   45.0   45.0    0.0   45.0   45.0   45.0   45.0   45.0   45.0   45.0   45.0   45.0    0.0   45.0   45.0   45.0   45.0   45.0   45.0   45.0   45.0   45.0    0.0   45.0   45.0   45.0   45.0   45.0   45.0   45.0   45.0   45.0    0.0   45.0   45.0   45.0   45.0   45.0   45.0   45.0   45.0   45.0    0.0   45.0   45.0   45.0   45.0   45.0   45.0   45.0   45.0   45.0    0.0   45.0   45.0   45.0   45.0   45.0   45.0   45.0   45.0   45.0    0.0   45.0   45.0   45.0   45.0   45.0   45.0   45.0   45.0   45.0    0.0   45.0   45.0   45.0   45.0   45.0   45.0   45.0   45.0   45.0    0.0   46.0   46.0   46.0   46.0   46.0   46.0   46.0   46.0   46.0    0.0   46.0   46.0   46.0   46.0   46.0   46.0   46.0   46.0   46.0    0.0   46.0   46.0   46.0   46.0   46.0   46.0   46.0   46.0   46.0    0.0   46.0   46.0   46.0   46.0   46.0   46.0   46.0   46.0   46.0    0.0   46.0   46.0   46.0   46.0   46.0   46.0   46.0   46.0   46.0    0.0   46.0   46.0   46.0   46.0   46.0   46.0   46.0   46.0   46.0    0.0   46.0   46.0   46.0   46.0   46.0   46.0   46.0   46.0   46.0    0.0   46.0   46.0   46.0   46.0   46.0   46.0   46.0   46.0   46.0    0.0   46.0   46.0   46.0   46.0   46.0   46.0   46.0   46.0   46.0    0.0   46.0   46.0   46.0   46.0   46.0   46.0   46.0   46.0   46.0    0.0   47.0   47.0   47.0   47.0   47.0   47.0   47.0   47.0   47.0    0.0   47.0   47.0   47.0   47.0   47.0   47.0   47.0   47.0   47.0    0.0   47.0   47.0   47.0   47.0   47.0   47.0   47.0   47.0   47.0    0.0   47.0   47.0   47.0   47.0   47.0   47.0   47.0   47.0   47.0    0.0   47.0   47.0   47.0   47.0   47.0   47.0   47.0   47.0   47.0    0.0   47.0   47.0   47.0   47.0   47.0   47.0   47.0   47.0   47.0    0.0   47.0   47.0   47.0   47.0   47.0   47.0   47.0   47.0   47.0    0.0   47.0   47.0   47.0   47.0   47.0   47.0   47.0   47.0   47.0    0.0   47.0   47.0   47.0   47.0   47.0   47.0   47.0   47.0   47.0    0.0   47.0   47.0   47.0   47.0   47.0   47.0   47.0   47.0   47.0    0.0   48.0   48.0   48.0   48.0   48.0   48.0   48.0   48.0   48.0    0.0   48.0   48.0   48.0   48.0   48.0   48.0   48.0   48.0   48.0    0.0   48.0   48.0   48.0   48.0   48.0   48.0   48.0   48.0   48.0    0.0   48.0   48.0   48.0   48.0   48.0   48.0   48.0   48.0   48.0    0.0   48.0   48.0   48.0   48.0   48.0   48.0   48.0   48.0   48.0    0.0   48.0   48.0   48.0   48.0   48.0   48.0   48.0   48.0   48.0    0.0   48.0   48.0   48.0   48.0   48.0   48.0   48.0   48.0   48.0    0.0   48.0   48.0   48.0   48.0   48.0   48.0   48.0   48.0   48.0    0.0   48.0   48.0   48.0   48.0   48.0   48.0   48.0   48.0   48.0    0.0   48.0   48.0   48.0   48.0   48.0   48.0   48.0   48.0   48.0    0.0   49.0   49.0   49.0   49.0   49.0   49.0   49.0   49.0   49.0    0.0   49.0   49.0   49.0   49.0   49.0   49.0   49.0   49.0   49.0    0.0   49.0   49.0   49.0   49.0   49.0   49.0   49.0   49.0   49.0    0.0   49.0   49.0   49.0   49.0   49.0   49.0   49.0   49.0   49.0    0.0   49.0   49.0   49.0   49.0   49.0   49.0   49.0   49.0   49.0    0.0   49.0   49.0   49.0   49.0   49.0   49.0   49.0   49.0   49.0    0.0   49.0   49.0   49.0   49.0   49.0   49.0   49.0   49.0   49.0    0.0   49.0   49.0   49.0   49.0   49.0   49.0   49.0   49.0   49.0    0.0   49.0   49.0   49.0   49.0   49.0   49.0   49.0   49.0   49.0    0.0   49.0   49.0   49.0   49.0   49.0   49.0   49.0   49.0   49.0    0.0   50.0   50.0   50.0   50.0   50.0   50.0   50.0   50.0   50.0    0.0   50.0   50.0   50.0   50.0   50.0   50.0   50.0   50.0   50.0    0.0   50.0   50.0   50.0   50.0   50.0   50.0   50.0   50.0   50.0    0.0   50.0   50.0   50.0   50.0   50.0   50.0   50.0   50.0   50.0    0.0   50.0   50.0   50.0   50.0   50.0   50.0   50.0   50.0   50.0    0.0   50.0   50.0   50.0   50.0   50.0   50.0   50.0   50.0   50.0    0.0   50.0   50.0   50.0   50.0   50.0   50.0   50.0   50.0   50.0    0.0   50.0   50.0   50.0   50.0   50.0   50.0   50.0   50.0   50.0    0.0   50.0   50.0   50.0   50.0   50.0   50.0   50.0   50.0   50.0    0.0   50.0   50.0   50.0   50.0   50.0   50.0   50.0   50.0   50.0    0.0    0.0    0.0    0.0    0.0    0.0    0.0    0.0    0.0    0.0    0.0    0.0    0.0    0.0    0.0    0.0    0.0    0.0    0.0    0.0    0.0    0.0    0.0    0.0    0.0    0.0    0.0    0.0    0.0    0.0    0.0    0.0    0.0    0.0    0.0    0.0    0.0    0.0    0.0    0.0    0.0    0.0    0.0    0.0    0.0    0.0    0.0    0.0    0.0    0.0    0.0    0.0    0.0    0.0    0.0    0.0    0.0    0.0    0.0    0.0    0.0    0.0    0.0    0.0    0.0    0.0    0.0    0.0    0.0    0.0    0.0    0.0    0.0    0.0    0.0    0.0    0.0    0.0    0.0    0.0    0.0    0.0    0.0    0.0    0.0    0.0    0.0    0.0    0.0    0.0    0.0    0.0    0.0    0.0    0.0    0.0    0.0    0.0    0.0    0.0    0.0   52.0   52.0   52.0   52.0   52.0   52.0   52.0   52.0   52.0    0.0   52.0   52.0   52.0   52.0   52.0   52.0   52.0   52.0   52.0    0.0   52.0   52.0   52.0   52.0   52.0   52.0   52.0   52.0   52.0    0.0   52.0   52.0   52.0   52.0   52.0   52.0   52.0   52.0   52.0    0.0   52.0   52.0   52.0   52.0   52.0   52.0   52.0   52.0   52.0    0.0   52.0   52.0   52.0   52.0   52.0   52.0   52.0   52.0   52.0    0.0   52.0   52.0   52.0   52.0   52.0   52.0   52.0   52.0   52.0    0.0   52.0   52.0   52.0   52.0   52.0   52.0   52.0   52.0   52.0    0.0   52.0   52.0   52.0   52.0   52.0   52.0   52.0   52.0   52.0    0.0   52.0   52.0   52.0   52.0   52.0   52.0   52.0   52.0   52.0    0.0   53.0   53.0   53.0   53.0   53.0   53.0   53.0   53.0   53.0    0.0   53.0   53.0   53.0   53.0   53.0   53.0   53.0   53.0   53.0    0.0   53.0   53.0   53.0   53.0   53.0   53.0   53.0   53.0   53.0    0.0   53.0   53.0   53.0   53.0   53.0   53.0   53.0   53.0   53.0    0.0   53.0   53.0   53.0   53.0   53.0   53.0   53.0   53.0   53.0    0.0   53.0   53.0   53.0   53.0   53.0   53.0   53.0   53.0   53.0    0.0   53.0   53.0   53.0   53.0   53.0   53.0   53.0   53.0   53.0    0.0   53.0   53.0   53.0   53.0   53.0   53.0   53.0   53.0   53.0    0.0   53.0   53.0   53.0   53.0   53.0   53.0   53.0   53.0   53.0    0.0   53.0   53.0   53.0   53.0   53.0   53.0   53.0   53.0   53.0    0.0   54.0   54.0   54.0   54.0   54.0   54.0   54.0   54.0   54.0    0.0   54.0   54.0   54.0   54.0   54.0   54.0   54.0   54.0   54.0    0.0   54.0   54.0   54.0   54.0   54.0   54.0   54.0   54.0   54.0    0.0   54.0   54.0   54.0   54.0   54.0   54.0   54.0   54.0   54.0    0.0   54.0   54.0   54.0   54.0   54.0   54.0   54.0   54.0   54.0    0.0   54.0   54.0   54.0   54.0   54.0   54.0   54.0   54.0   54.0    0.0   54.0   54.0   54.0   54.0   54.0   54.0   54.0   54.0   54.0    0.0   54.0   54.0   54.0   54.0   54.0   54.0   54.0   54.0   54.0    0.0   54.0   54.0   54.0   54.0   54.0   54.0   54.0   54.0   54.0    0.0   54.0   54.0   54.0   54.0   54.0   54.0   54.0   54.0   54.0    0.0   55.0   55.0   55.0   55.0   55.0   55.0   55.0   55.0   55.0    0.0   55.0   55.0   55.0   55.0   55.0   55.0   55.0   55.0   55.0    0.0   55.0   55.0   55.0   55.0   55.0   55.0   55.0   55.0   55.0    0.0   55.0   55.0   55.0   55.0   55.0   55.0   55.0   55.0   55.0    0.0   55.0   55.0   55.0   55.0   55.0   55.0   55.0   55.0   55.0    0.0   55.0   55.0   55.0   55.0   55.0   55.0   55.0   55.0   55.0    0.0   55.0   55.0   55.0   55.0   55.0   55.0   55.0   55.0   55.0    0.0   55.0   55.0   55.0   55.0   55.0   55.0   55.0   55.0   55.0    0.0   55.0   55.0   55.0   55.0   55.0   55.0   55.0   55.0   55.0    0.0   55.0   55.0   55.0   55.0   55.0   55.0   55.0   55.0   55.0    0.0   56.0   56.0   56.0   56.0   56.0   56.0   56.0   56.0   56.0    0.0   56.0   56.0   56.0   56.0   56.0   56.0   56.0   56.0   56.0    0.0   56.0   56.0   56.0   56.0   56.0   56.0   56.0   56.0   56.0    0.0   56.0   56.0   56.0   56.0   56.0   56.0   56.0   56.0   56.0    0.0   56.0   56.0   56.0   56.0   56.0   56.0   56.0   56.0   56.0    0.0   56.0   56.0   56.0   56.0   56.0   56.0   56.0   56.0   56.0    0.0   56.0   56.0   56.0   56.0   56.0   56.0   56.0   56.0   56.0    0.0   56.0   56.0   56.0   56.0   56.0   56.0   56.0   56.0   56.0    0.0   56.0   56.0   56.0   56.0   56.0   56.0   56.0   56.0   56.0    0.0   56.0   56.0   56.0   56.0   56.0   56.0   56.0   56.0   56.0    0.0   57.0   57.0   57.0   57.0   57.0   57.0   57.0   57.0   57.0    0.0   57.0   57.0   57.0   57.0   57.0   57.0   57.0   57.0   57.0    0.0   57.0   57.0   57.0   57.0   57.0   57.0   57.0   57.0   57.0    0.0   57.0   57.0   57.0   57.0   57.0   57.0   57.0   57.0   57.0    0.0   57.0   57.0   57.0   57.0   57.0   57.0   57.0   57.0   57.0    0.0   57.0   57.0   57.0   57.0   57.0   57.0   57.0   57.0   57.0    0.0   57.0   57.0   57.0   57.0   57.0   57.0   57.0   57.0   57.0    0.0   57.0   57.0   57.0   57.0   57.0   57.0   57.0   57.0   57.0    0.0   57.0   57.0   57.0   57.0   57.0   57.0   57.0   57.0   57.0    0.0   57.0   57.0   57.0   57.0   57.0   57.0   57.0   57.0   57.0    0.0   58.0   58.0   58.0   58.0   58.0   58.0   58.0   58.0   58.0    0.0   58.0   58.0   58.0   58.0   58.0   58.0   58.0   58.0   58.0    0.0   58.0   58.0   58.0   58.0   58.0   58.0   58.0   58.0   58.0    0.0   58.0   58.0   58.0   58.0   58.0   58.0   58.0   58.0   58.0    0.0   58.0   58.0   58.0   58.0   58.0   58.0   58.0   58.0   58.0    0.0   58.0   58.0   58.0   58.0   58.0   58.0   58.0   58.0   58.0    0.0   58.0   58.0   58.0   58.0   58.0   58.0   58.0   58.0   58.0    0.0   58.0   58.0   58.0   58.0   58.0   58.0   58.0   58.0   58.0    0.0   58.0   58.0   58.0   58.0   58.0   58.0   58.0   58.0   58.0    0.0   58.0   58.0   58.0   58.0   58.0   58.0   58.0   58.0   58.0    0.0   59.0   59.0   59.0   59.0   59.0   59.0   59.0   59.0   59.0    0.0   59.0   59.0   59.0   59.0   59.0   59.0   59.0   59.0   59.0    0.0   59.0   59.0   59.0   59.0   59.0   59.0   59.0   59.0   59.0    0.0   59.0   59.0   59.0   59.0   59.0   59.0   59.0   59.0   59.0    0.0   59.0   59.0   59.0   59.0   59.0   59.0   59.0   59.0   59.0    0.0   59.0   59.0   59.0   59.0   59.0   59.0   59.0   59.0   59.0    0.0   59.0   59.0   59.0   59.0   59.0   59.0   59.0   59.0   59.0    0.0   59.0   59.0   59.0   59.0   59.0   59.0   59.0   59.0   59.0    0.0   59.0   59.0   59.0   59.0   59.0   59.0   59.0   59.0   59.0    0.0   59.0   59.0   59.0   59.0   59.0   59.0   59.0   59.0   59.0    0.0   60.0   60.0   60.0   60.0   60.0   60.0   60.0   60.0   60.0    0.0   60.0   60.0   60.0   60.0   60.0   60.0   60.0   60.0   60.0    0.0   60.0   60.0   60.0   60.0   60.0   60.0   60.0   60.0   60.0    0.0   60.0   60.0   60.0   60.0   60.0   60.0   60.0   60.0   60.0    0.0   60.0   60.0   60.0   60.0   60.0   60.0   60.0   60.0   60.0    0.0   60.0   60.0   60.0   60.0   60.0   60.0   60.0   60.0   60.0    0.0   60.0   60.0   60.0   60.0   60.0   60.0   60.0   60.0   60.0    0.0   60.0   60.0   60.0   60.0   60.0   60.0   60.0   60.0   60.0    0.0   60.0   60.0   60.0   60.0   60.0   60.0   60.0   60.0   60.0    0.0   60.0   60.0   60.0   60.0   60.0   60.0   60.0   60.0   60.0    0.0    0.0    0.0    0.0    0.0    0.0    0.0    0.0    0.0    0.0    0.0    0.0    0.0    0.0    0.0    0.0    0.0    0.0    0.0    0.0    0.0    0.0    0.0    0.0    0.0    0.0    0.0    0.0    0.0    0.0    0.0    0.0    0.0    0.0    0.0    0.0    0.0    0.0    0.0    0.0    0.0    0.0    0.0    0.0    0.0    0.0    0.0    0.0    0.0    0.0    0.0    0.0    0.0    0.0    0.0    0.0    0.0    0.0    0.0    0.0    0.0    0.0    0.0    0.0    0.0    0.0    0.0    0.0    0.0    0.0    0.0    0.0    0.0    0.0    0.0    0.0    0.0    0.0    0.0    0.0    0.0    0.0    0.0    0.0    0.0    0.0    0.0    0.0    0.0    0.0    0.0    0.0    0.0    0.0    0.0    0.0    0.0    0.0    0.0    0.0    0.0   62.0   62.0   62.0   62.0   62.0   62.0   62.0   62.0   62.0    0.0   62.0   62.0   62.0   62.0   62.0   62.0   62.0   62.0   62.0    0.0   62.0   62.0   62.0   62.0   62.0   62.0   62.0   62.0   62.0    0.0   62.0   62.0   62.0   62.0   62.0   62.0   62.0   62.0   62.0    0.0   62.0   62.0   62.0   62.0   62.0   62.0   62.0   62.0   62.0    0.0   62.0   62.0   62.0   62.0   62.0   62.0   62.0   62.0   62.0    0.0   62.0   62.0   62.0   62.0   62.0   62.0   62.0   62.0   62.0    0.0   62.0   62.0   62.0   62.0   62.0   62.0   62.0   62.0   62.0    0.0   62.0   62.0   62.0   62.0   62.0   62.0   62.0   62.0   62.0    0.0   62.0   62.0   62.0   62.0   62.0   62.0   62.0   62.0   62.0    0.0   63.0   63.0   63.0   63.0   63.0   63.0   63.0   63.0   63.0    0.0   63.0   63.0   63.0   63.0   63.0   63.0   63.0   63.0   63.0    0.0   63.0   63.0   63.0   63.0   63.0   63.0   63.0   63.0   63.0    0.0   63.0   63.0   63.0   63.0   63.0   63.0   63.0   63.0   63.0    0.0   63.0   63.0   63.0   63.0   63.0   63.0   63.0   63.0   63.0    0.0   63.0   63.0   63.0   63.0   63.0   63.0   63.0   63.0   63.0    0.0   63.0   63.0   63.0   63.0   63.0   63.0   63.0   63.0   63.0    0.0   63.0   63.0   63.0   63.0   63.0   63.0   63.0   63.0   63.0    0.0   63.0   63.0   63.0   63.0   63.0   63.0   63.0   63.0   63.0    0.0   63.0   63.0   63.0   63.0   63.0   63.0   63.0   63.0   63.0    0.0   64.0   64.0   64.0   64.0   64.0   64.0   64.0   64.0   64.0    0.0   64.0   64.0   64.0   64.0   64.0   64.0   64.0   64.0   64.0    0.0   64.0   64.0   64.0   64.0   64.0   64.0   64.0   64.0   64.0    0.0   64.0   64.0   64.0   64.0   64.0   64.0   64.0   64.0   64.0    0.0   64.0   64.0   64.0   64.0   64.0   64.0   64.0   64.0   64.0    0.0   64.0   64.0   64.0   64.0   64.0   64.0   64.0   64.0   64.0    0.0   64.0   64.0   64.0   64.0   64.0   64.0   64.0   64.0   64.0    0.0   64.0   64.0   64.0   64.0   64.0   64.0   64.0   64.0   64.0    0.0   64.0   64.0   64.0   64.0   64.0   64.0   64.0   64.0   64.0    0.0   64.0   64.0   64.0   64.0   64.0   64.0   64.0   64.0   64.0    0.0   65.0   65.0   65.0   65.0   65.0   65.0   65.0   65.0   65.0    0.0   65.0   65.0   65.0   65.0   65.0   65.0   65.0   65.0   65.0    0.0   65.0   65.0   65.0   65.0   65.0   65.0   65.0   65.0   65.0    0.0   65.0   65.0   65.0   65.0   65.0   65.0   65.0   65.0   65.0    0.0   65.0   65.0   65.0   65.0   65.0   65.0   65.0   65.0   65.0    0.0   65.0   65.0   65.0   65.0   65.0   65.0   65.0   65.0   65.0    0.0   65.0   65.0   65.0   65.0   65.0   65.0   65.0   65.0   65.0    0.0   65.0   65.0   65.0   65.0   65.0   65.0   65.0   65.0   65.0    0.0   65.0   65.0   65.0   65.0   65.0   65.0   65.0   65.0   65.0    0.0   65.0   65.0   65.0   65.0   65.0   65.0   65.0   65.0   65.0    0.0   66.0   66.0   66.0   66.0   66.0   66.0   66.0   66.0   66.0    0.0   66.0   66.0   66.0   66.0   66.0   66.0   66.0   66.0   66.0    0.0   66.0   66.0   66.0   66.0   66.0   66.0   66.0   66.0   66.0    0.0   66.0   66.0   66.0   66.0   66.0   66.0   66.0   66.0   66.0    0.0   66.0   66.0   66.0   66.0   66.0   66.0   66.0   66.0   66.0    0.0   66.0   66.0   66.0   66.0   66.0   66.0   66.0   66.0   66.0    0.0   66.0   66.0   66.0   66.0   66.0   66.0   66.0   66.0   66.0    0.0   66.0   66.0   66.0   66.0   66.0   66.0   66.0   66.0   66.0    0.0   66.0   66.0   66.0   66.0   66.0   66.0   66.0   66.0   66.0    0.0   66.0   66.0   66.0   66.0   66.0   66.0   66.0   66.0   66.0    0.0   67.0   67.0   67.0   67.0   67.0   67.0   67.0   67.0   67.0    0.0   67.0   67.0   67.0   67.0   67.0   67.0   67.0   67.0   67.0    0.0   67.0   67.0   67.0   67.0   67.0   67.0   67.0   67.0   67.0    0.0   67.0   67.0   67.0   67.0   67.0   67.0   67.0   67.0   67.0    0.0   67.0   67.0   67.0   67.0   67.0   67.0   67.0   67.0   67.0    0.0   67.0   67.0   67.0   67.0   67.0   67.0   67.0   67.0   67.0    0.0   67.0   67.0   67.0   67.0   67.0   67.0   67.0   67.0   67.0    0.0   67.0   67.0   67.0   67.0   67.0   67.0   67.0   67.0   67.0    0.0   67.0   67.0   67.0   67.0   67.0   67.0   67.0   67.0   67.0    0.0   67.0   67.0   67.0   67.0   67.0   67.0   67.0   67.0   67.0    0.0   68.0   68.0   68.0   68.0   68.0   68.0   68.0   68.0   68.0    0.0   68.0   68.0   68.0   68.0   68.0   68.0   68.0   68.0   68.0    0.0   68.0   68.0   68.0   68.0   68.0   68.0   68.0   68.0   68.0    0.0   68.0   68.0   68.0   68.0   68.0   68.0   68.0   68.0   68.0    0.0   68.0   68.0   68.0   68.0   68.0   68.0   68.0   68.0   68.0    0.0   68.0   68.0   68.0   68.0   68.0   68.0   68.0   68.0   68.0    0.0   68.0   68.0   68.0   68.0   68.0   68.0   68.0   68.0   68.0    0.0   68.0   68.0   68.0   68.0   68.0   68.0   68.0   68.0   68.0    0.0   68.0   68.0   68.0   68.0   68.0   68.0   68.0   68.0   68.0    0.0   68.0   68.0   68.0   68.0   68.0   68.0   68.0   68.0   68.0    0.0   69.0   69.0   69.0   69.0   69.0   69.0   69.0   69.0   69.0    0.0   69.0   69.0   69.0   69.0   69.0   69.0   69.0   69.0   69.0    0.0   69.0   69.0   69.0   69.0   69.0   69.0   69.0   69.0   69.0    0.0   69.0   69.0   69.0   69.0   69.0   69.0   69.0   69.0   69.0    0.0   69.0   69.0   69.0   69.0   69.0   69.0   69.0   69.0   69.0    0.0   69.0   69.0   69.0   69.0   69.0   69.0   69.0   69.0   69.0    0.0   69.0   69.0   69.0   69.0   69.0   69.0   69.0   69.0   69.0    0.0   69.0   69.0   69.0   69.0   69.0   69.0   69.0   69.0   69.0    0.0   69.0   69.0   69.0   69.0   69.0   69.0   69.0   69.0   69.0    0.0   69.0   69.0   69.0   69.0   69.0   69.0   69.0   69.0   69.0    0.0   70.0   70.0   70.0   70.0   70.0   70.0   70.0   70.0   70.0    0.0   70.0   70.0   70.0   70.0   70.0   70.0   70.0   70.0   70.0    0.0   70.0   70.0   70.0   70.0   70.0   70.0   70.0   70.0   70.0    0.0   70.0   70.0   70.0   70.0   70.0   70.0   70.0   70.0   70.0    0.0   70.0   70.0   70.0   70.0   70.0   70.0   70.0   70.0   70.0    0.0   70.0   70.0   70.0   70.0   70.0   70.0   70.0   70.0   70.0    0.0   70.0   70.0   70.0   70.0   70.0   70.0   70.0   70.0   70.0    0.0   70.0   70.0   70.0   70.0   70.0   70.0   70.0   70.0   70.0    0.0   70.0   70.0   70.0   70.0   70.0   70.0   70.0   70.0   70.0    0.0   70.0   70.0   70.0   70.0   70.0   70.0   70.0   70.0   70.0    0.0    0.0    0.0    0.0    0.0    0.0    0.0    0.0    0.0    0.0    0.0    0.0    0.0    0.0    0.0    0.0    0.0    0.0    0.0    0.0    0.0    0.0    0.0    0.0    0.0    0.0    0.0    0.0    0.0    0.0    0.0    0.0    0.0    0.0    0.0    0.0    0.0    0.0    0.0    0.0    0.0    0.0    0.0    0.0    0.0    0.0    0.0    0.0    0.0    0.0    0.0    0.0    0.0    0.0    0.0    0.0    0.0    0.0    0.0    0.0    0.0    0.0    0.0    0.0    0.0    0.0    0.0    0.0    0.0    0.0    0.0    0.0    0.0    0.0    0.0    0.0    0.0    0.0    0.0    0.0    0.0    0.0    0.0    0.0    0.0    0.0    0.0    0.0    0.0    0.0    0.0    0.0    0.0    0.0    0.0    0.0    0.0    0.0    0.0    0.0    0.0   72.0   72.0   72.0   72.0   72.0   72.0   72.0   72.0   72.0    0.0   72.0   72.0   72.0   72.0   72.0   72.0   72.0   72.0   72.0    0.0   72.0   72.0   72.0   72.0   72.0   72.0   72.0   72.0   72.0    0.0   72.0   72.0   72.0   72.0   72.0   72.0   72.0   72.0   72.0    0.0   72.0   72.0   72.0   72.0   72.0   72.0   72.0   72.0   72.0    0.0   72.0   72.0   72.0   72.0   72.0   72.0   72.0   72.0   72.0    0.0   72.0   72.0   72.0   72.0   72.0   72.0   72.0   72.0   72.0    0.0   72.0   72.0   72.0   72.0   72.0   72.0   72.0   72.0   72.0    0.0   72.0   72.0   72.0   72.0   72.0   72.0   72.0   72.0   72.0    0.0   72.0   72.0   72.0   72.0   72.0   72.0   72.0   72.0   72.0    0.0   73.0   73.0   73.0   73.0   73.0   73.0   73.0   73.0   73.0    0.0   73.0   73.0   73.0   73.0   73.0   73.0   73.0   73.0   73.0    0.0   73.0   73.0   73.0   73.0   73.0   73.0   73.0   73.0   73.0    0.0   73.0   73.0   73.0   73.0   73.0   73.0   73.0   73.0   73.0    0.0   73.0   73.0   73.0   73.0   73.0   73.0   73.0   73.0   73.0    0.0   73.0   73.0   73.0   73.0   73.0   73.0   73.0   73.0   73.0    0.0   73.0   73.0   73.0   73.0   73.0   73.0   73.0   73.0   73.0    0.0   73.0   73.0   73.0   73.0   73.0   73.0   73.0   73.0   73.0    0.0   73.0   73.0   73.0   73.0   73.0   73.0   73.0   73.0   73.0    0.0   73.0   73.0   73.0   73.0   73.0   73.0   73.0   73.0   73.0    0.0   74.0   74.0   74.0   74.0   74.0   74.0   74.0   74.0   74.0    0.0   74.0   74.0   74.0   74.0   74.0   74.0   74.0   74.0   74.0    0.0   74.0   74.0   74.0   74.0   74.0   74.0   74.0   74.0   74.0    0.0   74.0   74.0   74.0   74.0   74.0   74.0   74.0   74.0   74.0    0.0   74.0   74.0   74.0   74.0   74.0   74.0   74.0   74.0   74.0    0.0   74.0   74.0   74.0   74.0   74.0   74.0   74.0   74.0   74.0    0.0   74.0   74.0   74.0   74.0   74.0   74.0   74.0   74.0   74.0    0.0   74.0   74.0   74.0   74.0   74.0   74.0   74.0   74.0   74.0    0.0   74.0   74.0   74.0   74.0   74.0   74.0   74.0   74.0   74.0    0.0   74.0   74.0   74.0   74.0   74.0   74.0   74.0   74.0   74.0    0.0   75.0   75.0   75.0   75.0   75.0   75.0   75.0   75.0   75.0    0.0   75.0   75.0   75.0   75.0   75.0   75.0   75.0   75.0   75.0    0.0   75.0   75.0   75.0   75.0   75.0   75.0   75.0   75.0   75.0    0.0   75.0   75.0   75.0   75.0   75.0   75.0   75.0   75.0   75.0    0.0   75.0   75.0   75.0   75.0   75.0   75.0   75.0   75.0   75.0    0.0   75.0   75.0   75.0   75.0   75.0   75.0   75.0   75.0   75.0    0.0   75.0   75.0   75.0   75.0   75.0   75.0   75.0   75.0   75.0    0.0   75.0   75.0   75.0   75.0   75.0   75.0   75.0   75.0   75.0    0.0   75.0   75.0   75.0   75.0   75.0   75.0   75.0   75.0   75.0    0.0   75.0   75.0   75.0   75.0   75.0   75.0   75.0   75.0   75.0    0.0   76.0   76.0   76.0   76.0   76.0   76.0   76.0   76.0   76.0    0.0   76.0   76.0   76.0   76.0   76.0   76.0   76.0   76.0   76.0    0.0   76.0   76.0   76.0   76.0   76.0   76.0   76.0   76.0   76.0    0.0   76.0   76.0   76.0   76.0   76.0   76.0   76.0   76.0   76.0    0.0   76.0   76.0   76.0   76.0   76.0   76.0   76.0   76.0   76.0    0.0   76.0   76.0   76.0   76.0   76.0   76.0   76.0   76.0   76.0    0.0   76.0   76.0   76.0   76.0   76.0   76.0   76.0   76.0   76.0    0.0   76.0   76.0   76.0   76.0   76.0   76.0   76.0   76.0   76.0    0.0   76.0   76.0   76.0   76.0   76.0   76.0   76.0   76.0   76.0    0.0   76.0   76.0   76.0   76.0   76.0   76.0   76.0   76.0   76.0    0.0   77.0   77.0   77.0   77.0   77.0   77.0   77.0   77.0   77.0    0.0   77.0   77.0   77.0   77.0   77.0   77.0   77.0   77.0   77.0    0.0   77.0   77.0   77.0   77.0   77.0   77.0   77.0   77.0   77.0    0.0   77.0   77.0   77.0   77.0   77.0   77.0   77.0   77.0   77.0    0.0   77.0   77.0   77.0   77.0   77.0   77.0   77.0   77.0   77.0    0.0   77.0   77.0   77.0   77.0   77.0   77.0   77.0   77.0   77.0    0.0   77.0   77.0   77.0   77.0   77.0   77.0   77.0   77.0   77.0    0.0   77.0   77.0   77.0   77.0   77.0   77.0   77.0   77.0   77.0    0.0   77.0   77.0   77.0   77.0   77.0   77.0   77.0   77.0   77.0    0.0   77.0   77.0   77.0   77.0   77.0   77.0   77.0   77.0   77.0    0.0   78.0   78.0   78.0   78.0   78.0   78.0   78.0   78.0   78.0    0.0   78.0   78.0   78.0   78.0   78.0   78.0   78.0   78.0   78.0    0.0   78.0   78.0   78.0   78.0   78.0   78.0   78.0   78.0   78.0    0.0   78.0   78.0   78.0   78.0   78.0   78.0   78.0   78.0   78.0    0.0   78.0   78.0   78.0   78.0   78.0   78.0   78.0   78.0   78.0    0.0   78.0   78.0   78.0   78.0   78.0   78.0   78.0   78.0   78.0    0.0   78.0   78.0   78.0   78.0   78.0   78.0   78.0   78.0   78.0    0.0   78.0   78.0   78.0   78.0   78.0   78.0   78.0   78.0   78.0    0.0   78.0   78.0   78.0   78.0   78.0   78.0   78.0   78.0   78.0    0.0   78.0   78.0   78.0   78.0   78.0   78.0   78.0   78.0   78.0    0.0   79.0   79.0   79.0   79.0   79.0   79.0   79.0   79.0   79.0    0.0   79.0   79.0   79.0   79.0   79.0   79.0   79.0   79.0   79.0    0.0   79.0   79.0   79.0   79.0   79.0   79.0   79.0   79.0   79.0    0.0   79.0   79.0   79.0   79.0   79.0   79.0   79.0   79.0   79.0    0.0   79.0   79.0   79.0   79.0   79.0   79.0   79.0   79.0   79.0    0.0   79.0   79.0   79.0   79.0   79.0   79.0   79.0   79.0   79.0    0.0   79.0   79.0   79.0   79.0   79.0   79.0   79.0   79.0   79.0    0.0   79.0   79.0   79.0   79.0   79.0   79.0   79.0   79.0   79.0    0.0   79.0   79.0   79.0   79.0   79.0   79.0   79.0   79.0   79.0    0.0   79.0   79.0   79.0   79.0   79.0   79.0   79.0   79.0   79.0    0.0   80.0   80.0   80.0   80.0   80.0   80.0   80.0   80.0   80.0    0.0   80.0   80.0   80.0   80.0   80.0   80.0   80.0   80.0   80.0    0.0   80.0   80.0   80.0   80.0   80.0   80.0   80.0   80.0   80.0    0.0   80.0   80.0   80.0   80.0   80.0   80.0   80.0   80.0   80.0    0.0   80.0   80.0   80.0   80.0   80.0   80.0   80.0   80.0   80.0    0.0   80.0   80.0   80.0   80.0   80.0   80.0   80.0   80.0   80.0    0.0   80.0   80.0   80.0   80.0   80.0   80.0   80.0   80.0   80.0    0.0   80.0   80.0   80.0   80.0   80.0   80.0   80.0   80.0   80.0    0.0   80.0   80.0   80.0   80.0   80.0   80.0   80.0   80.0   80.0    0.0   80.0   80.0   80.0   80.0   80.0   80.0   80.0   80.0   80.0    0.0    0.0    0.0    0.0    0.0    0.0    0.0    0.0    0.0    0.0    0.0    0.0    0.0    0.0    0.0    0.0    0.0    0.0    0.0    0.0    0.0    0.0    0.0    0.0    0.0    0.0    0.0    0.0    0.0    0.0    0.0    0.0    0.0    0.0    0.0    0.0    0.0    0.0    0.0    0.0    0.0    0.0    0.0    0.0    0.0    0.0    0.0    0.0    0.0    0.0    0.0    0.0    0.0    0.0    0.0    0.0    0.0    0.0    0.0    0.0    0.0    0.0    0.0    0.0    0.0    0.0    0.0    0.0    0.0    0.0    0.0    0.0    0.0    0.0    0.0    0.0    0.0    0.0    0.0    0.0    0.0    0.0    0.0    0.0    0.0    0.0    0.0    0.0    0.0    0.0    0.0    0.0    0.0    0.0    0.0    0.0    0.0    0.0    0.0    0.0    0.0   82.0   82.0   82.0   82.0   82.0   82.0   82.0   82.0   82.0    0.0   82.0   82.0   82.0   82.0   82.0   82.0   82.0   82.0   82.0    0.0   82.0   82.0   82.0   82.0   82.0   82.0   82.0   82.0   82.0    0.0   82.0   82.0   82.0   82.0   82.0   82.0   82.0   82.0   82.0    0.0   82.0   82.0   82.0   82.0   82.0   82.0   82.0   82.0   82.0    0.0   82.0   82.0   82.0   82.0   82.0   82.0   82.0   82.0   82.0    0.0   82.0   82.0   82.0   82.0   82.0   82.0   82.0   82.0   82.0    0.0   82.0   82.0   82.0   82.0   82.0   82.0   82.0   82.0   82.0    0.0   82.0   82.0   82.0   82.0   82.0   82.0   82.0   82.0   82.0    0.0   82.0   82.0   82.0   82.0   82.0   82.0   82.0   82.0   82.0    0.0   83.0   83.0   83.0   83.0   83.0   83.0   83.0   83.0   83.0    0.0   83.0   83.0   83.0   83.0   83.0   83.0   83.0   83.0   83.0    0.0   83.0   83.0   83.0   83.0   83.0   83.0   83.0   83.0   83.0    0.0   83.0   83.0   83.0   83.0   83.0   83.0   83.0   83.0   83.0    0.0   83.0   83.0   83.0   83.0   83.0   83.0   83.0   83.0   83.0    0.0   83.0   83.0   83.0   83.0   83.0   83.0   83.0   83.0   83.0    0.0   83.0   83.0   83.0   83.0   83.0   83.0   83.0   83.0   83.0    0.0   83.0   83.0   83.0   83.0   83.0   83.0   83.0   83.0   83.0    0.0   83.0   83.0   83.0   83.0   83.0   83.0   83.0   83.0   83.0    0.0   83.0   83.0   83.0   83.0   83.0   83.0   83.0   83.0   83.0    0.0   84.0   84.0   84.0   84.0   84.0   84.0   84.0   84.0   84.0    0.0   84.0   84.0   84.0   84.0   84.0   84.0   84.0   84.0   84.0    0.0   84.0   84.0   84.0   84.0   84.0   84.0   84.0   84.0   84.0    0.0   84.0   84.0   84.0   84.0   84.0   84.0   84.0   84.0   84.0    0.0   84.0   84.0   84.0   84.0   84.0   84.0   84.0   84.0   84.0    0.0   84.0   84.0   84.0   84.0   84.0   84.0   84.0   84.0   84.0    0.0   84.0   84.0   84.0   84.0   84.0   84.0   84.0   84.0   84.0    0.0   84.0   84.0   84.0   84.0   84.0   84.0   84.0   84.0   84.0    0.0   84.0   84.0   84.0   84.0   84.0   84.0   84.0   84.0   84.0    0.0   84.0   84.0   84.0   84.0   84.0   84.0   84.0   84.0   84.0    0.0   85.0   85.0   85.0   85.0   85.0   85.0   85.0   85.0   85.0    0.0   85.0   85.0   85.0   85.0   85.0   85.0   85.0   85.0   85.0    0.0   85.0   85.0   85.0   85.0   85.0   85.0   85.0   85.0   85.0    0.0   85.0   85.0   85.0   85.0   85.0   85.0   85.0   85.0   85.0    0.0   85.0   85.0   85.0   85.0   85.0   85.0   85.0   85.0   85.0    0.0   85.0   85.0   85.0   85.0   85.0   85.0   85.0   85.0   85.0    0.0   85.0   85.0   85.0   85.0   85.0   85.0   85.0   85.0   85.0    0.0   85.0   85.0   85.0   85.0   85.0   85.0   85.0   85.0   85.0    0.0   85.0   85.0   85.0   85.0   85.0   85.0   85.0   85.0   85.0    0.0   85.0   85.0   85.0   85.0   85.0   85.0   85.0   85.0   85.0    0.0   86.0   86.0   86.0   86.0   86.0   86.0   86.0   86.0   86.0    0.0   86.0   86.0   86.0   86.0   86.0   86.0   86.0   86.0   86.0    0.0   86.0   86.0   86.0   86.0   86.0   86.0   86.0   86.0   86.0    0.0   86.0   86.0   86.0   86.0   86.0   86.0   86.0   86.0   86.0    0.0   86.0   86.0   86.0   86.0   86.0   86.0   86.0   86.0   86.0    0.0   86.0   86.0   86.0   86.0   86.0   86.0   86.0   86.0   86.0    0.0   86.0   86.0   86.0   86.0   86.0   86.0   86.0   86.0   86.0    0.0   86.0   86.0   86.0   86.0   86.0   86.0   86.0   86.0   86.0    0.0   86.0   86.0   86.0   86.0   86.0   86.0   86.0   86.0   86.0    0.0   86.0   86.0   86.0   86.0   86.0   86.0   86.0   86.0   86.0    0.0   87.0   87.0   87.0   87.0   87.0   87.0   87.0   87.0   87.0    0.0   87.0   87.0   87.0   87.0   87.0   87.0   87.0   87.0   87.0    0.0   87.0   87.0   87.0   87.0   87.0   87.0   87.0   87.0   87.0    0.0   87.0   87.0   87.0   87.0   87.0   87.0   87.0   87.0   87.0    0.0   87.0   87.0   87.0   87.0   87.0   87.0   87.0   87.0   87.0    0.0   87.0   87.0   87.0   87.0   87.0   87.0   87.0   87.0   87.0    0.0   87.0   87.0   87.0   87.0   87.0   87.0   87.0   87.0   87.0    0.0   87.0   87.0   87.0   87.0   87.0   87.0   87.0   87.0   87.0    0.0   87.0   87.0   87.0   87.0   87.0   87.0   87.0   87.0   87.0    0.0   87.0   87.0   87.0   87.0   87.0   87.0   87.0   87.0   87.0    0.0   88.0   88.0   88.0   88.0   88.0   88.0   88.0   88.0   88.0    0.0   88.0   88.0   88.0   88.0   88.0   88.0   88.0   88.0   88.0    0.0   88.0   88.0   88.0   88.0   88.0   88.0   88.0   88.0   88.0    0.0   88.0   88.0   88.0   88.0   88.0   88.0   88.0   88.0   88.0    0.0   88.0   88.0   88.0   88.0   88.0   88.0   88.0   88.0   88.0    0.0   88.0   88.0   88.0   88.0   88.0   88.0   88.0   88.0   88.0    0.0   88.0   88.0   88.0   88.0   88.0   88.0   88.0   88.0   88.0    0.0   88.0   88.0   88.0   88.0   88.0   88.0   88.0   88.0   88.0    0.0   88.0   88.0   88.0   88.0   88.0   88.0   88.0   88.0   88.0    0.0   88.0   88.0   88.0   88.0   88.0   88.0   88.0   88.0   88.0    0.0   89.0   89.0   89.0   89.0   89.0   89.0   89.0   89.0   89.0    0.0   89.0   89.0   89.0   89.0   89.0   89.0   89.0   89.0   89.0    0.0   89.0   89.0   89.0   89.0   89.0   89.0   89.0   89.0   89.0    0.0   89.0   89.0   89.0   89.0   89.0   89.0   89.0   89.0   89.0    0.0   89.0   89.0   89.0   89.0   89.0   89.0   89.0   89.0   89.0    0.0   89.0   89.0   89.0   89.0   89.0   89.0   89.0   89.0   89.0    0.0   89.0   89.0   89.0   89.0   89.0   89.0   89.0   89.0   89.0    0.0   89.0   89.0   89.0   89.0   89.0   89.0   89.0   89.0   89.0    0.0   89.0   89.0   89.0   89.0   89.0   89.0   89.0   89.0   89.0    0.0   89.0   89.0   89.0   89.0   89.0   89.0   89.0   89.0   89.0    0.0   90.0   90.0   90.0   90.0   90.0   90.0   90.0   90.0   90.0    0.0   90.0   90.0   90.0   90.0   90.0   90.0   90.0   90.0   90.0    0.0   90.0   90.0   90.0   90.0   90.0   90.0   90.0   90.0   90.0    0.0   90.0   90.0   90.0   90.0   90.0   90.0   90.0   90.0   90.0    0.0   90.0   90.0   90.0   90.0   90.0   90.0   90.0   90.0   90.0    0.0   90.0   90.0   90.0   90.0   90.0   90.0   90.0   90.0   90.0    0.0   90.0   90.0   90.0   90.0   90.0   90.0   90.0   90.0   90.0    0.0   90.0   90.0   90.0   90.0   90.0   90.0   90.0   90.0   90.0    0.0   90.0   90.0   90.0   90.0   90.0   90.0   90.0   90.0   90.0    0.0   90.0   90.0   90.0   90.0   90.0   90.0   90.0   90.0   90.0    0.0    0.0    0.0    0.0    0.0    0.0    0.0    0.0    0.0    0.0    0.0    0.0    0.0    0.0    0.0    0.0    0.0    0.0    0.0    0.0    0.0    0.0    0.0    0.0    0.0    0.0    0.0    0.0    0.0    0.0    0.0    0.0    0.0    0.0    0.0    0.0    0.0    0.0    0.0    0.0    0.0    0.0    0.0    0.0    0.0    0.0    0.0    0.0    0.0    0.0    0.0    0.0    0.0    0.0    0.0    0.0    0.0    0.0    0.0    0.0    0.0    0.0    0.0    0.0    0.0    0.0    0.0    0.0    0.0    0.0    0.0    0.0    0.0    0.0    0.0    0.0    0.0    0.0    0.0    0.0    0.0    0.0    0.0    0.0    0.0    0.0    0.0    0.0    0.0    0.0    0.0    0.0    0.0    0.0    0.0    0.0    0.0    0.0    0.0    0.0    0.0   92.0   92.0   92.0   92.0   92.0   92.0   92.0   92.0   92.0    0.0   92.0   92.0   92.0   92.0   92.0   92.0   92.0   92.0   92.0    0.0   92.0   92.0   92.0   92.0   92.0   92.0   92.0   92.0   92.0    0.0   92.0   92.0   92.0   92.0   92.0   92.0   92.0   92.0   92.0    0.0   92.0   92.0   92.0   92.0   92.0   92.0   92.0   92.0   92.0    0.0   92.0   92.0   92.0   92.0   92.0   92.0   92.0   92.0   92.0    0.0   92.0   92.0   92.0   92.0   92.0   92.0   92.0   92.0   92.0    0.0   92.0   92.0   92.0   92.0   92.0   92.0   92.0   92.0   92.0    0.0   92.0   92.0   92.0   92.0   92.0   92.0   92.0   92.0   92.0    0.0   92.0   92.0   92.0   92.0   92.0   92.0   92.0   92.0   92.0    0.0   93.0   93.0   93.0   93.0   93.0   93.0   93.0   93.0   93.0    0.0   93.0   93.0   93.0   93.0   93.0   93.0   93.0   93.0   93.0    0.0   93.0   93.0   93.0   93.0   93.0   93.0   93.0   93.0   93.0    0.0   93.0   93.0   93.0   93.0   93.0   93.0   93.0   93.0   93.0    0.0   93.0   93.0   93.0   93.0   93.0   93.0   93.0   93.0   93.0    0.0   93.0   93.0   93.0   93.0   93.0   93.0   93.0   93.0   93.0    0.0   93.0   93.0   93.0   93.0   93.0   93.0   93.0   93.0   93.0    0.0   93.0   93.0   93.0   93.0   93.0   93.0   93.0   93.0   93.0    0.0   93.0   93.0   93.0   93.0   93.0   93.0   93.0   93.0   93.0    0.0   93.0   93.0   93.0   93.0   93.0   93.0   93.0   93.0   93.0    0.0   94.0   94.0   94.0   94.0   94.0   94.0   94.0   94.0   94.0    0.0   94.0   94.0   94.0   94.0   94.0   94.0   94.0   94.0   94.0    0.0   94.0   94.0   94.0   94.0   94.0   94.0   94.0   94.0   94.0    0.0   94.0   94.0   94.0   94.0   94.0   94.0   94.0   94.0   94.0    0.0   94.0   94.0   94.0   94.0   94.0   94.0   94.0   94.0   94.0    0.0   94.0   94.0   94.0   94.0   94.0   94.0   94.0   94.0   94.0    0.0   94.0   94.0   94.0   94.0   94.0   94.0   94.0   94.0   94.0    0.0   94.0   94.0   94.0   94.0   94.0   94.0   94.0   94.0   94.0    0.0   94.0   94.0   94.0   94.0   94.0   94.0   94.0   94.0   94.0    0.0   94.0   94.0   94.0   94.0   94.0   94.0   94.0   94.0   94.0    0.0   95.0   95.0   95.0   95.0   95.0   95.0   95.0   95.0   95.0    0.0   95.0   95.0   95.0   95.0   95.0   95.0   95.0   95.0   95.0    0.0   95.0   95.0   95.0   95.0   95.0   95.0   95.0   95.0   95.0    0.0   95.0   95.0   95.0   95.0   95.0   95.0   95.0   95.0   95.0    0.0   95.0   95.0   95.0   95.0   95.0   95.0   95.0   95.0   95.0    0.0   95.0   95.0   95.0   95.0   95.0   95.0   95.0   95.0   95.0    0.0   95.0   95.0   95.0   95.0   95.0   95.0   95.0   95.0   95.0    0.0   95.0   95.0   95.0   95.0   95.0   95.0   95.0   95.0   95.0    0.0   95.0   95.0   95.0   95.0   95.0   95.0   95.0   95.0   95.0    0.0   95.0   95.0   95.0   95.0   95.0   95.0   95.0   95.0   95.0    0.0   96.0   96.0   96.0   96.0   96.0   96.0   96.0   96.0   96.0    0.0   96.0   96.0   96.0   96.0   96.0   96.0   96.0   96.0   96.0    0.0   96.0   96.0   96.0   96.0   96.0   96.0   96.0   96.0   96.0    0.0   96.0   96.0   96.0   96.0   96.0   96.0   96.0   96.0   96.0    0.0   96.0   96.0   96.0   96.0   96.0   96.0   96.0   96.0   96.0    0.0   96.0   96.0   96.0   96.0   96.0   96.0   96.0   96.0   96.0    0.0   96.0   96.0   96.0   96.0   96.0   96.0   96.0   96.0   96.0    0.0   96.0   96.0   96.0   96.0   96.0   96.0   96.0   96.0   96.0    0.0   96.0   96.0   96.0   96.0   96.0   96.0   96.0   96.0   96.0    0.0   96.0   96.0   96.0   96.0   96.0   96.0   96.0   96.0   96.0    0.0   97.0   97.0   97.0   97.0   97.0   97.0   97.0   97.0   97.0    0.0   97.0   97.0   97.0   97.0   97.0   97.0   97.0   97.0   97.0    0.0   97.0   97.0   97.0   97.0   97.0   97.0   97.0   97.0   97.0    0.0   97.0   97.0   97.0   97.0   97.0   97.0   97.0   97.0   97.0    0.0   97.0   97.0   97.0   97.0   97.0   97.0   97.0   97.0   97.0    0.0   97.0   97.0   97.0   97.0   97.0   97.0   97.0   97.0   97.0    0.0   97.0   97.0   97.0   97.0   97.0   97.0   97.0   97.0   97.0    0.0   97.0   97.0   97.0   97.0   97.0   97.0   97.0   97.0   97.0    0.0   97.0   97.0   97.0   97.0   97.0   97.0   97.0   97.0   97.0    0.0   97.0   97.0   97.0   97.0   97.0   97.0   97.0   97.0   97.0    0.0   98.0   98.0   98.0   98.0   98.0   98.0   98.0   98.0   98.0    0.0   98.0   98.0   98.0   98.0   98.0   98.0   98.0   98.0   98.0    0.0   98.0   98.0   98.0   98.0   98.0   98.0   98.0   98.0   98.0    0.0   98.0   98.0   98.0   98.0   98.0   98.0   98.0   98.0   98.0    0.0   98.0   98.0   98.0   98.0   98.0   98.0   98.0   98.0   98.0    0.0   98.0   98.0   98.0   98.0   98.0   98.0   98.0   98.0   98.0    0.0   98.0   98.0   98.0   98.0   98.0   98.0   98.0   98.0   98.0    0.0   98.0   98.0   98.0   98.0   98.0   98.0   98.0   98.0   98.0    0.0   98.0   98.0   98.0   98.0   98.0   98.0   98.0   98.0   98.0    0.0   98.0   98.0   98.0   98.0   98.0   98.0   98.0   98.0   98.0    0.0   99.0   99.0   99.0   99.0   99.0   99.0   99.0   99.0   99.0    0.0   99.0   99.0   99.0   99.0   99.0   99.0   99.0   99.0   99.0    0.0   99.0   99.0   99.0   99.0   99.0   99.0   99.0   99.0   99.0    0.0   99.0   99.0   99.0   99.0   99.0   99.0   99.0   99.0   99.0    0.0   99.0   99.0   99.0   99.0   99.0   99.0   99.0   99.0   99.0    0.0   99.0   99.0   99.0   99.0   99.0   99.0   99.0   99.0   99.0    0.0   99.0   99.0   99.0   99.0   99.0   99.0   99.0   99.0   99.0    0.0   99.0   99.0   99.0   99.0   99.0   99.0   99.0   99.0   99.0    0.0   99.0   99.0   99.0   99.0   99.0   99.0   99.0   99.0   99.0    0.0   99.0   99.0   99.0   99.0   99.0   99.0   99.0   99.0   99.0    0.0  100.0  100.0  100.0  100.0  100.0  100.0  100.0  100.0  100.0    0.0  100.0  100.0  100.0  100.0  100.0  100.0  100.0  100.0  100.0    0.0  100.0  100.0  100.0  100.0  100.0  100.0  100.0  100.0  100.0    0.0  100.0  100.0  100.0  100.0  100.0  100.0  100.0  100.0  100.0    0.0  100.0  100.0  100.0  100.0  100.0  100.0  100.0  100.0  100.0    0.0  100.0  100.0  100.0  100.0  100.0  100.0  100.0  100.0  100.0    0.0  100.0  100.0  100.0  100.0  100.0  100.0  100.0  100.0  100.0    0.0  100.0  100.0  100.0  100.0  100.0  100.0  100.0  100.0  100.0    0.0  100.0  100.0  100.0  100.0  100.0  100.0  100.0  100.0  100.0    0.0  100.0  100.0  100.0  100.0  100.0  100.0  100.0  100.0  100.0 

Deleted: packages/libhdf4/branches/upstream/current/hdf/util/testfiles/head.r24.Z
===================================================================
(Binary files differ)

Added: packages/libhdf4/branches/upstream/current/hdf/util/testfiles/head.r24.gz
===================================================================
(Binary files differ)


Property changes on: packages/libhdf4/branches/upstream/current/hdf/util/testfiles/head.r24.gz
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Deleted: packages/libhdf4/branches/upstream/current/hdf/util/testfiles/head.r8.Z
===================================================================
--- packages/libhdf4/branches/upstream/current/hdf/util/testfiles/head.r8.Z	2007-05-15 09:05:29 UTC (rev 830)
+++ packages/libhdf4/branches/upstream/current/hdf/util/testfiles/head.r8.Z	2007-05-15 09:53:05 UTC (rev 831)
@@ -1,134 +0,0 @@
-
-H° Áƒ*\È°¡Ã‡#JœH±¢Å‹3jÜȱ£Ç CŠI²¤É“(Sª\ɲ¥Ë—0cÊœI³¦Í›8sêÜɳ§ÏŸ@ƒ
-J´¨Ñ£H“*]Ê´©Ó§P£JJµªÒX³æ˜±UÀ«`j‹u+®Y³†]»³¬Ö[Õpõ²µ.¸i¿²Ý3/ÞtÉÜ<C0Ö³wëªåËø¤ßˆ!K\¸°`¸wé’ÕÛ¸³G·usPÎJøò`ȆͪފճkŒnÑžE‹V²àÓ·gV=[1ç×ÀÆF}÷°êÀ˜¹â
-¹0\ºfk·N!hͲ•‹>üvóå©)÷^\½<Ùºš¹Îí<qÕ²¿ÃíZž:W¼†‹K6®<ûõ﵇žh•ýVccA§bšÖ`sžæbÎզ؁&§œs^D¶ {¨… nìU†s&r…![´•F~–]F?8˜ÛŒ’Ù tšmWÖŠU¹usŠÉ#Žjü'b{J¶W…ɝ¤TñEÆàw%9˜–¨Õ˜›–jˆ¨£ò1§ }S2Uå„K’&f‚…çIæ §›sâišmbö˜”i^Åœ•Ñí‰åmZÖ˜ä¢7Ž¸žž$ò9dbͨP¾ÈdžÄ)šå—#‚‰§¨^ÚÙèe~WYbÓ]
-Ô“òEê&Ž£Î©£¸ÖªëŒqê"›»uxŸ«?mèá`©²W'¤ÌBš«–ˆêY'´
-®·jŽËS||vG"ˆx¢Æ¨©¶Æyë®Ô. Ÿ™š8›¶7U)ž¤ÑBV#dÔ’‹o­Œæi®­ûRëè„ln/MsIÚ¦¡Ì.Ûoº
-ã
--Ä_’+ëd¿Âup_¸qXÚ˜³2ìo˜·>ûð¨¢Nlª¸¢æŠùYº1J÷ÑÕf¼âË2¿s§F%)ót®XúŠr
-7óJÆîG¡¡¼nº/ʈ.J4˜D‡<*¹gJ/ŠKÓ<¨Ñ.úlª§W;»h%n>ò³Ð<Ç
-5¸×BGXØ%-ë„6>ڤз²ý¬›oŸ+±®ŸBª0Ð¥‡&Þ5°bŠj*ÉpcívÛ%o®†Û‚K·œQˆ1wÍA¹{Fí–þŠ¾6¿C[MFè'O,X©Ln·ø~ªsô!Á߆¸l憃)x’@
-úÏг}{Ö¢&~™ºs#»wðñ
-lÙ6rùz³¶—Ïoó%[íyá#7ëè’"¾Ì½Ezûži>;úÎGÏ(Û@»áª&:ÓL«MF[]æ7‘
-åG{Œ;Õõt5¸èqî\ü3™›€–2ó
-NâÛؤÄÀ‡àÌ~~£Õ¢¸v>æApÐ\	—Áéá)€ç* æì´®’IB%Îï—š÷°ŒeÏZÞç~@ ö‰oÃaónHEÃ鉅dq,“ƒ *„ryÔ˜Ò…¯«½Ð…4D×CÞ°d0ô¥³¶®8¦)Œ¢dÉJYŽ*gçÂ5fp‰Ul£È<ÂÉñdáŠ$ô¸=…zÜ88½å±± „CéIPÂp‘rDœÅºö>1‘!Y–Èw4™³ð	R¡Cý7=ÿÕP†‚{žíFײ;JP7h‰%›X­Ü”
-kÌ%!—L‰=}LÔeqµ¼9^NjÕq,	2WÚÑ^¼•Û„ÉÉE®ñvŠ„"6ŸÌ&Ê3‘øóN¿"t?…í‘r?™>¥gµèM1p6lž(ýçË%BÏm
-shÅêIæxš´VƒèºŽ6ªT8t!DÙI~˜ç<KfOÁ °‘ºsÙúišŽPŒ½[ÖÜJ2²p£Ü QÉR•ÆðØdhAÏØñåtSc 8º3‡åi'Ífó6QƒbUž«O׉Á‡Bq`â'NÅ4?>õŠ¡âf4ÕC¬rµ\u¡A÷º×•fs›häŸ
-+
-»^õÍŽëáÞ[;¥Ó×ɵ
-j'±ºR£þì« Œ§A3ÏM|u’%ÚÊ~ØC—‘!xj“—²7@%2T›=m¨Vå	ÙÌŠò®µ¦gAéÙ„²/Ÿyò’S‹)³ƒÑ
-ª¼ÒßšÙÍŽ”\n%jÙ“öt”˜
-Ü]C:À©Ñ\[¢×` ·°#Šoµ¹â­1˜˜]£Úõ“”õ*^çëWôµ7}»mb|Ù×/ÅÅÔo¦Ã›éD–Ü|^hyµn6·K_Ü^W
-¸¥¬(9;ÊÍð¶Û”âÉv6Ú;¡SŒa‹QÏÇ3‹mb½xEé_3á_×®¾T(o£ÛÕ­2ø¾±Må>y¨¨Îlqb%Ö<ËÕåÎvºPü*{
-éK×óÀóuò<=ËoÅkí¸Às/;.
-Àê2ælÚ º)»DæŸ;çEf0#Í”}ïn!lÝ
-3ÈvÍïnï
-Oªý—|ŒÛ˜+É…^P!ôaQÖ*ÐŒÁŒèíÁUVC•aìâ(_w”†VAÙKù²û…c´@k›;a/ÐðòÛp
-Ø>‚¶É%ã´£9}×÷Æ–·—…0÷,g6»ø²oÖµ"ÓL†øþò6¯&1§U\ ™sFÂà “Ôhéaõv˜=q­i=ì<¿–¾™­µ•Å}ß<ƒÒÍx5­k=C«0ٯ餭ïKܬ63P\lÐJ7Ñx}3šu‰à^ëÎŽïg%e¼zögn†8§þâÍI´ØzâÝ´À{b=ûFIâÝmB!˜~0ú̯7‘ÕMeZsÚ¡x0Åç<g‡¿w×â%£7áæ7Wbâ•p3V÷gÍN{˜ã3Ô©]%â{×±Ófú!
-JÌá/÷ìÄíêr"3£½Ž²¶9»g¾²tßnî:•Á~â*ÓW
-ƈmœØ¶Þ­M𸧹”9Ù£qii	w7zºc^tö>Zë>/{”¹-l[§y†iºÏé
-FÇÆæ³–6‘¶ÍH`wòÛ¥Tm/HFKykžÐÇnî\Sœ·áV¹Í‹niaÏøí—x¯+/p%?XÓ6à{°×Å4̧—ÝŸKøˆÛ<î³qæ&Ê	÷ÚܶNq§½4°3ZÒ<ïGÀï!Jãu®7³œú+íFÿ°ç¡ «÷Ü£ëX…ƒ¶/îÄ7œÆ3w{Òu[ÓgŒ¶h<·^=lÌp¿v~É£~^ù)SFë±Zβ)I´dÚ¶T6v™‡xcwibGiŽ{*—€Õvb•Çh>—$WpD8_•| ·3‰ålÀ%FiUAWp™·s½·o0Wp[gxöo—æzÔåSêõfëÅp¡€ZwgqO@%×–V·!răþ±BÕcds’A[÷rÇi=7t&ƒ'hi—p(Ö`®çhVØuë–ur¦d½d¡¥ƒ¸â]¨$ †Q|';Bå{—Ekmèp÷0t÷@u÷ 
-éÖvrx}ÑW}–†}m§uèrR8gš–cîF®†²w!³Bå":7¨H½—u?‡bù{K¨„87]²×`xb3&Šq¶u?cÔ[uÇg¡£ˆv-’±ŠrãczîVfÔw‚\Çk»¥èg…ׇ3Hs3y(t¶sbg_—&TôgLЖ‚|œÒŽýuŽˆ—Š+Çkçhãø|;÷Yéø<·€vu˜„lY…3;]òŠx¢ƒq/âS†º³6!•y³×vRHtø'¦H±weVH3¦0øˆ<‡0—xmxI;:ôtÑ8‘åQ:¹~Ä´(\…TwÅrAŽ·¨g÷`yö^p v¹jZ—{êEŠê¶o æf4aÅÖS±ã…úWWMIá…?åÃKl@Ó€‰‡u¸Ö}“v€¹xxÙTyx{‹g—à[.} ¦DEQ‘ S´25	h,õ6½µn‘ÈkëæuÙpa‡}Ñwsžˆg,g…éæv¾7lŒtfˆdQ[†V8Y¸Qh7Z¸`)t—HtÜg¸”6׉qçzïu„:WŽÇm¡Ð‚W$Uƒ\‚‘A b»2GüÒ^\Ň;'—Úf„´¹”)g†çzØèk³7qæ×\ ÷IäFÁgzŸR|ÔñÌòMÊ'*¯¦–{sl(tõɏùt
-É”oÙ^…Ÿ¼˜j']ºiJ¼THè/Çz§…š òaSí”$ê6sè†x;'~X7iù5‚®v™“)€üÈxl8›¿¸U/4Enô/˜5íQ¥VXŠ(˜¥rà×K	s-i‰û(‚â9nàök¹¶—’Ék«·u¼Hg•WUƒG–¦Ã%¨¹0í	Iƒ„¢)6‚’‡ŽÙ¶™¡äpý q&OüXi8’ú4.¹‚Ææ`s5í8GÎxëY/Zã)”;Ïå?÷‰—8xŒgsý ~Ii#h›…‚û˜›æè‹N¦…VÇ•1%˜Ö#:§ùA*Ñ¢~†ÆHV¦ŸiÇ{lGdÞ盲g›Edžs	’x9•Rçpvkõ‡A uKsoˆ¨ž®á3_èw,š6ž6Œ³¸	ý ›'6¨ x„䖏r†v/—uöI—k	ƒm„ªÍ••ÊM®È~¦á%Á1b3˜]‰~µ&™
-ˆ¬•0¨çö‹ X›†‹˜eii7—'I›y{OØI+4=x9á–¯Á«Îr¬YP.¶}k—yýPl–g­Û‘hc7‹Y'—/w[ŸX®µ˜.E=Ö$;pµq³Â¯ô×dFz””EÒÀv'›})gPÖ\/DUxd§„m8¦êu›VGY†2Ãt‘4#"0šJ€È¯hƒ‡Ø’>qd0‰&7t!XÊˆêu+w¹]v—÷9›Ò¥„(8…	:£þ¥5y‡©Ì9AaÊŒ£:°'›_7~§BGt*9Š¾(
-_g‰ü7_FnKx¡Q¹†Ùµ/vmÌxV¯8§t°%Û«¢ÕŠb_ZÊpTÖs—Ȇ.És›VK˜–C×€‡×™x8qœ¶¦¿YŽ£¸ºÒ°nœÅTrãŠùtD"Ëc·!uÎi+ŸÄ¡ûÆ{‘˜„íZª‘ù‰ÒybD˜‹Žˆ’†·¹z• Htn6¼ÛXœ¡GôÀ±½‰q¦V.vâ“jÈJ¬RÈ{¯;ŸÉª ¸‡]«uv™‹»¡£³Õépz›h.%§Ó–t×c*Gk©qR«¾ú?ÚÕ™_véZµ9½Xœ»5¯šÈ¼‡×¾ï«‡Ù•ˆƒ:¨û»¿+›C2:½2o/º«t4˜Î˜;?‡vVùÁn6ªú™¦Ï§müf yºÊzß©¼ò;ÁJ‰lùÁÅÊ–áƒ	˜<†6>ŸgX ÛIz4âÂjpÄXU¬·ÂŠÃÞ§®0éÅÓ{¿…{¼‘©‡7›¸À[¬2œ_—·_Ç3…64P%’+.*°ŒZèJmUöu¨Ã‘x®Ç*~K“¸z[±$wzØ‘›y¸kl¾
-Hµ‡lÄ3¼°=ž
-35Þ5f|¶gk«ˆJaZ«œûÁ„Wllù’Á¿j8ªJŒ}%zÃY±ü¬›ÌÁƒëfÒÐÁáÂF<¨Piž
-3² Û ž1|Ñ¢ƒ´AO¨É3¬ŸnBµ-[¬–ŠÇÁëVµI‚!éÈQ™çŠ¬ynÌLs©·gffv·“§!¥®QXîé¿jVlÅüuF»RWÌ2ü¾ŒvRˆ¬Ï
-‚^×ΩÐÒ9Ã'æ·?3¨÷
-™v¯Wº»µ°,ŠDaÖ7…¨Â
-ºcÔš¸Å_›pÁÅ•x¾µœÄßü¾¼‡¼–'…jrzɷź	Të}¢úÁ÷ªòÜyE&7ˆ®ÞqÏ¡ÒÄH÷œuˆ¾‚\mfVĬ†Ž¸z
-ÍÍîŠz8¨%Ú€ÖÀ‚»3íÆÆ<”kCîtEÒˆ«ÞҝáÑ sfãÊDhwÁ ,ysv¾üu «ÄDè”@ŠÍió»v
-ýY ;¨Ù|ÄâG¬nLµèwñi+e8®>Å|¡V·J°Ð“¡¬„Œ½É(ÇÑÛs›	¿šIÐ\¢
-
-ƒ™“ØÓ÷ amÚašnÜš˜e)®ÌÌ´OVõ]S³–~+È\\•E|”\ÈhÚ,½›iÓ„­Úw=Éĺwiªz‘¸Ó06uºÁŽ}Ä1ˆƒ™ê•¥v©›½ÌNú%\KÑŽÍ	ÐqLÌ2ÈÓm(/XË“üÐÕ
-Ä.Ýv¶8› ¼gnÂiÓÓs½À
-ˆÅYb‡Â~ºÊc)®bVŒÜàÕùuŽiÄ€hRÝ6ÆX­cüך	ÎYÌlקÄ:¼²Öo„Sej¨¼
-ÞÁÉI‡xÂZs|¿½ÞÕŠWÉiF\ƦíÜš¬FÕ*ŒÑ:›]ç’²¬ÃÆÅK‰•P…‚à\ÁŽX¢&§®5;¾PÜX&žÁj2x.u$TŸ;ä]vÐãË[VÑäY}¼„ÕÔÉ‚6Ôæw.q–Û\{yû&Ãýܲþ¼ŒN·$ÒÌLÒ_â²6m¨ÉøÇ/GgèãƯÕ3¼…Úô)ØÔ­qÉsQv;Ÿ^8—gÛJkýf&gèÅŒWâWmmÍjÙ£%e^@«$´’ÇÁÎìŒÚ'&-U«
-w—º€‡t»¹=zy¨¿@wPø²‘e.ÌÓÏ †e¾*mª9á{±$–*¼µÓ\\ãŠ}ƒT	ÓN™À¶u°Igõi±kЪ«™Ál+ép«y 04X¨ÌÅU;iìçè!ëR¬ÇÍ‚6•ÀÎÃKÑÇ}¾tç‡ÇY+¨Ñ¡é•¢È–Q=i¾8¨oÄIyöâ‡6X5çYìÕÉi[6Ü3^ð-ì»W¼Àïlr¹ÙI®6‰þü¸xÒ¡»ˆ‹WéGŒ¢t~zÝÔ¡mx'_÷—2LŸD1ò'NRH¡WÌ×Õ+
-ÄŽjšÍ£#ÍŠAm€}Åœ”Ñ£ÅêžlßïÞqPÆfêÆæålú’Exüòbþ•QÄ‚rù€QŸ|s7u)gfpâi:½JÜÀí?Zœ¦$.ÒÀÄ9«68_­¤ÉìŠS#U¿ã‰³6!˜v|…¢7b'Ó[‡ãYŒ8tÈúˆuۏ¨ì&ª/˜¥vœ„µ(‡1wæÕRÌ¥3&q­S•ä:Ç{‹YH¦'o™eÄêõg*ä_<ˈ]«ãþ,Þcr7Ò¹:¬ÚÆ&ƒ}Ž`l='Šb6=ÎŽ…EPI½˜%;pZ¾¿pTœeg]HОvnvØ›ÆãÅ’CøBÄ ê0è‡Ñ§üTñhO^Ifµdœð=ÆMŽe#)›'$±%Þ`1@™ºk.JŒíì´yҤŽ	¬;0+@lw‚<™=Ê¥¤:=ÜÎjR[,£ê}®ÑN¨Ì¾²:nB ,®,ÖsÜJ-™Ìc¡ôœ†Wµ\N¢5(GݘŠE“ÛàÀá˜"4$ í&È6TDÝ;!:¹§€ˆã'£”¶jFó¸v•]`¦¢Rsâäù59ö˜†ÒY{U5ë,¼“•åˆ]­"S°ÎËÁ¸=e¨¼‰$ùUhíHó6„
-$bb¤êŝLÕ\ÔÉ3J°ig
-:
-Uf¸Ò] 2§pä ƒ. •1b\Èr>Ú¾E’ ƒO
-¡À! áSZ“¥å¤ó³»<Ñè2Ìo‘¨qçåêξh4é"#	€M0à
-ëzYBŽõ"kÝ`b+!Þ@Ð2…	BÀˆÈœ’¡£'ØF£	Z‰v¨;.TÛŒ«ZmyÔh‰jó¿êË‘JÝH—L;~Tª3j¡ÇÛ…oîÛ‰k)ÒØœ:à
-ÊœGžÕ
-¶ñÁ2߁«Æ¿"Ó[lÈ)Û5‹$yD=<üú
-J6ô¨V¹Žl¸/À‘IͳˆH¨¸PQ+8}JàÜŽ¥§jÎE±êyâí¹åÄÖó
-Ô„'\§!EªÂuLÃS…[†8ÈÏ6­žßÁ&Ç‹mL¢ffØ—]ÙJ„„é«Ðu¾Œ”W+2EÖ!›­±ônžù}Ÿñí.Þ“GëCN¥°˜¬¿°pw’aÐy!oæ.¨—¥u£RŽë‰&BÔ–’ó¶zª£lÇn׉ŸµMNE¾¬¹›-Ñ<æߣ“4¦Kò¢¢61ÀÄÂBa¶Ž1Ds+¾9Ü-K¯2‘G'bУ`ñ¤&&«T¡~ÞAÜ$©¶DóU¬bÎgã*B°µh	$xç!}T¬¨Mxs²á§h…ã4žŸ b|D)$á‡ÚÌ¥4Z30Žx‰Ïh*ÐÈ°óPwk²U>Ÿ’CðŸóy3Rõè8‘×[B4Χi
-.¢à‹1ƒ;ÇîÃá‘ñµŒÜâ¾9$ÀF85SÛÏÙ ­ HHÜ[ɹì"³
-?¬ãÄ;§ãtDÏ3!dqL;ñî+*Í´sõ²}[%Ò–0Q	Le¢,5N]y–{àÊ*ËQÑ°F½7IÕò0JTN,Ë°™,g+˜#²Ùdíl:ñBÖ6x—™k3÷GáüA¨ÕTŸƒAf-à,,f·ºtÄAô$•±W%é[¡M¼\a
-ÍŽå2 ðÛ4L£¦4ƒî/åAg®Û|™†¡ „
-¯'¨%Ï9b”¯	5O%jtG„x…Ž:‚™<3R bš:½§‘@Yã6$/ì<;NJʪËò¿t´è=‰˜¯E&½´M
-üpBmƒ3˜‚A$¢q‚¶J&¦>Feþ4ô—è±G,fмÚJÚ
-ž‡€Ü†­¢a¢I¿B‚’F)ñ8'œ›+Uqîø›ŸhœÍ2oÇ#jĪ€Io¹oqb¤pžª¡kTA;dFÎÈñžË 4@l„f'NÕÉóUÕVZ
-5xŸÓóLÅâ…t
-,ñ8Ñ×Âç‘?²ßì›ØŸHÔÑk˜èŠ‰CTGŽj[žH‘…y0Ⱦ¹ìÄ9ìX’
-ŽÀ
-y3kãôSƒk:.¬iwÅÀ±Z‡Aãm¥9—ÇþÜÊš\ÈxmÈ u6˜1X†e¦M|¤kH˜ÏˆSØ…“$Š–*NÑA¹Œ‚¡URÈ*.ã«š8 byÔ6¬ô ­GÑ|+¡Ò¨Q¨8&æD±Z‡ÅfQ¬$f_ˆLH•N¤9¦&[BùU´0 $¾ô™‡±(
-ç?¶2+½šªu'‘N"ßN‡t†e–þ&²Y/ô.b~ªkS¬¬²Y‡J³é\å‚ãE© -Êá_Ü Ãß-B•
-ã(­sà\äüÙc/
-4@üÌã4äb“U‚Úæ}®˜ùš~ns§©*–Å›da1íß̉ûÀ1WØr<óί¥«¯2BÇÏt‹zÂ*
-¸6Éd£˜²öÍQÑË B›h`OT/¬&¿­C`e™›y8çß(˜Î¢CÆbÄÀ®<—ƲB‹…Å»ØÆ«Ù7o…)ÏÁ;¦c¯èˆÒ‚¹ÍPBÏLJbý•PDÓèŽ	Œ#Xcþ]±Ê³6{Λ39ž/Å0ÊQ‘ŒX‰\5)A…©ÿAO™X\ŸRˆt	ã ¹BÝlŒ_‚Ôœž¦V‘x§½¡HëpL°S2°R÷a}§ì’¬­¤F[è²øv(±ßéI#Ã~Æ{¨:»å(©Ì•Ù=³¤;&=cyQj¤Ki4Ç6p’­óBš‡dG&¿b'šGä8óR*XEjÁkU^SwÞ%»ÐѬ³cj 9ñ.¤Èÿ \X‰2e`q_
-;®å2	›àIk~cw’ŒžY·ØLJy:lA®Á'u!#&{¸[ˈ[ê;ðuCh4¼«RAò5¸• TÇ€1®¹“nÓÛ 9{òx0(wT^³0ZHÔ,]³–ø=Ùã	û>¶HlºEoèG+¡®{’–O(#Î×ܹÚ?r
-Ž–5ÊH>™tN-¼Lo‰XI©g§ºÕÜ€‘¯™>‡Ð•q`¦Êa‰$ eÒ kÔi€–E›vô²õûT¹•ÎPžô@ãQ‹¬ˆ²h`³ÂQ6óçOo‘ÔI ÃKà–Ž6`xLG,¤ñêߌpÈ)¥MU¥ðO ÊÉGLó"µA{¼ðD­ËÈG7ÄœyCQ¤š¯îÂ,VË7iB˜4’pÇlYáXJš¹PÝgÄÜ…¬£;ã=%1!"“FIÙ¦Ž4ð,ö&pîÏËÈrÞãw›y„ôäO,*|jhºªx{â‹ÊRcJ4…Gs(˜%æ`Á1•Š¬£aR4¨Ð>’ÑJ>éM2Œ˜y.°“ÌSÒø9f1€{š$faZÔ	¹%8ܱ'ԐŒ[±!L`§ÝeúY>#8´Zsf®nOƒÊ«˜¢¿é-jï2b¹PíX
-{ú;úOƒ	ÊÚqĐoÇéh	‚š’ÀE#9Š B½Mµ!IŒ^Ù9E3ØBœ¹(Ü%VñŒéä"Õ’ÓK¹üŒÙ@D&…ö°†‹Ä÷óŠQœ]RtãE¹(–¡~ö]â,lÜyUøB9ôÈ>–é±*¤W"ï‰×ÐG	dÍ¥+W½ë¹a¿bIe»%N€Ré8V– Õuh=›*H![…&°î=.ÏâÄ«€HEÓÁNEñU/øc{x“y𺩛~£]È*Ý4••îA@Pö"iM¢¿Å§,F;êQ ià`™‹­–Ð1§¶¸P–™!ß"{˜L£Ö+ÛÉ<–ÍM¼-†#pÔ ÛŒEMªVâ{Ö\áep¡!Fìg™Ã‘±¸®\ìZZB‹ÊR3+î%‰¤Æ£ž¶[¹BÚ±¦"&·
-­x¦]F^œê{ ’^Î(D÷\ŠëÅÓ×`•SZÑpßµÙ7q©-Î$a-?í:.êOÐÖœh8Ñ\Õ0Œï¦þ@T”=€lû^B³T»†„
-æ`C0ËÅ…3Ck’„“e§…Èo+¶ù
-
-í;5"]͘„BËÅ÷ᆿ¶ý•å#;Ê‹f›¯k•Ô¬äÁ%(rØæá(NP„\èÄ4’…È.„
-Û@¬4
-º:7°ÃEZ¥Udü߁|ÜŠ`E.«PUîAlµ\UÍ+´“˜cä-nóÔà”.óLA&kÂ8“ÄEÐΞ’&‘ܹo‰‰ñɁåù_¬I㺘r+gÖ9¬÷D’Ú2	UXÞŸ!²dÉ€å\la8†¤
-¥xþSá£h\ÙQ{iAÐÚ0A
-üØÈ–…#ñV†~8ä–éašŸPÌNŒ°* ¼æqUe†Y¢és~N.Ül~)êÓÞ’¯TÁÂŽDZéDš|¦B„癹ˆlç.›ä´J«6I}j¥±l‘Àé&6ácó•+1®C#OõJN-Rí&(Ä”½$ˆð© µµóúF‘ghd–P©»Ë«ªWLa›•gRÏµ„‹^m
-=(áÙ§
-ETS
-d¹’úÞ0‡w¦Žà.gE%þ]N+ÌaÕ©Vx‚ ¶¢ÏAòŠ‹²#ÞŠäÖi´~æã©G÷R6=˜à6x+ِ6f„ÀŸ+GjfI 	'§ó{Ö^:´ôÚ~#8ÞJ¥,ŽS7I>…(Úö9¥x€W+µz÷2Äœ¹áÌþU¤Øë‹zv4C¬!s‚ ‚Êß¡ÊÀRu–DT=&‰#!PÈó<>ŠŠàҁÂ>ÛH%KÕ£â‘Y=¦kSÖ>DTŸÔÙrF–W¤¿ö÷töƒŸ³‰éãôŽòAR(aŽÎOÑ_ÚòœÎá”ÁT´v>JU#)§‹bž×ü+lñy;3H%p"F­IrY°2N%
-[µ%áf¬BNA®÷”d•4+5Dñ0;m*Ý7™1‰Ô"mÆãZ´eúB$EܵOjčÖEñ$'E‰í˜ePêµ&õ6,,ÄžÀ@ŒswÈܘi.®Ë\BäQAa	
-)…Ñ1ɶêâøݾHëØ©\H eãî•š´dÇŠr¨®ø+yCÄë&˜ÁgƒŽ˜VL; JÜ‚:k	V>ñû“á¨@x‚¸÷·jÔSýnÖÁÞbãˆÅ§æyCðXjÄ©(Úì#ä„€ƒ	kc¹\µF¦ WwBy©¤*9Ä83cÕÄüWïk‘DÈ~¯å’?—Ú¢ÆÄöγŠbŽYk|XP[91V“‘îIÆÀyŠÂzŽn	´j‹´g—ø’OÙPTÅÜcº&癚…½©Ø„p&LÈßôTPÝɐ§¸$ìÑGOhBs€X@îTZ6­TPúWHT3—OñòæU?ž@W×5$R*C1é,ØWtÞrB	QN(')5õ¬H¹7=,Ž[åZ*ˆÜʐ–\b Å¬ÉR±Œ™<Ü!÷GYag³ßÉH»ª~¤ÎÒĪf-V8[ÒoÀ'ÜUºÆSuBQú0Ã'ÂüÀ3¤¯FÊè»h–xú_ºC¢ …˜Û€²]+2¹RÅßÕ	™HSÞ…FÑ4=ͤòhe§w-—ÎÍà}G£Ô¥®é%uÆYê„Uýl½L.HBg\éù‡Œœ+îòa¢’e°,XÈk|ȼWÇp:f/ÿgüñå(X€QƒEpƼ4J€¸xSἉ8A&A _\_e!“úK<	ݱٗ§r=*¹å)%š¿²>j˦ƒrª¬îð®ÐC ie
-%`õ6N¼*ý²ö×IaÐcjòøŸóšKéȐ͈L*åËçõžrÁ5^§aa@*9—•mQëP’sòjš¬‰(ت›ɯb•&ÏP…)+ŒMçt,´£X¡Èµw؝Š¦n¯ÙR´›GEߎD¦Å2°}]‹-I“ óIøÒÕª[gNg)Â8ga%±ÅÑ¡9ÝU–“kà	ÆÒk–¬Ð¢Í2ËOqY.ˆž76Ô²\W7,•h¹7­Ž·–8HîüÑEöãÆ…Kdz}.£dÚ#çëÜ%jN5éNI¨Z'æß)4ÒÈML-‰˜M«ÝÍ“&½ªÔF©±cœÊÎÛ¾†â`ÒR 
-8«À½ÉéǍ3ÿâp¶­#}ƒ#ž³Koiß^—‡|”æ‹f}Kk6“䐷lHEE´íÕê…äàK×Ûå\`BNՍb- ÎðÉëƶúJ䐼Cèy£`¤4Û¸!”{œ($6’ó.×”FÛE-—ù@‹ÀàÜÅS¤xÏMû¢yrŒrcSƒUœ!z3¹gØVŽUtعhÎêÞ	$$d¸è“þâP¸f—œÓÓ€c-U˜³ÙXp<µ{›”œÏNU9-U"4¬l“V‘á\Kàà?ŒM!¨€añH!œ¨¿¼˜¬™q¾2—Üc÷1&Õnæ<Óæ^>°`g)2tØ‹èT-ÙÏ‚7v*ZÖ?#Mt¢Å}¢w¼‡Û¸%yL±ŠßÍ)ù“U'°F²Œ‰[.´ŸñW›Ì!u|SÛ|.µ³Jë„Y5«ùñä€{ÐÇóC‚a¢ë$!¡ŸUØùšÛ7GÛñ6‘kfŸÂ°ÝI¥§T'"9¦ÝÿqÒ¥ë(e¨ ³l‡Å´vÀÆãQcþEıXŽè¢•»ŠàBÕÂQýèI·›,}0k·S Ž<ÉË“u6‰JokICç««µC½ð5Gk]cbHâ(ƒ0§¹UZ÷J
-PŸc—.篓ð5ìúsÒÒ#H9SŒ3j%k+ˆÜ[Ðe"TÇ|ÝŠIt³Í]ø¡sÉHâk®A«kž¸Ž£]Æ0e’Imô»UH¬<g•ÒM6ëK>+^ýê;3"i®Ø'c4˜ØMÖ›th˜A6—M‚xš6«¼rtb훩:O*cXžYÝa +Ô³˜ëš`lì^a¢»2,_Œ•ÉŒ÷ÛV!.QKЭaCÉ׸!~ÎސérA6ç†DÓ›Ì;7oÉ1´È~/i4SÂl4ŽX%j7ö² º;©ÆuL€Ë-éƒ4Š‚ƒ ÖÒZ0[92N|”d0QuJ¢VzG#cMâܐP£UúšWg1õ2!髁ÊÃgHPŸ=P,5²:Ù$.U™ÇÆZ'æ’ÀN¼1± 14Oã‹U6 ”„©»ãÑôèá¢qƒó"ššçA#
-=„Ž V®âÜE®IíÔŒ…n'k&ïŠUc+‹Ã«EÇ@ð-:yŒRNñ·:®ux®0·õ]çÑ´´ž†vºO!secÚ¤¶X›&˜!£ ãÚ0O`AÍfyÚ1k³
-²Y·{¸[¡4P“K‹¥åy
-â¾eÏ‚-ÁÛ&·½µQSÅÈA??¿ÇFîú˧¨"±1*ü ÚÓ»nñt«ÁK0ï[󠚇³PM.á<Oi/¹…”Þ¢¯{˜¬fæ½[¬ŒB¡Ç×¼¢-"œ
-´~b¶qqd_Õœ`•¾}0’YÅC^ðÜm¯SŽ¶¢™ƒ¶È“â2ŠN4âNR/{áA©
-¹ñFc¶Î¡ÔŠ)P­ZÇm§èQ ñgÕ“OËsžß¦Wu"¨ÃÉô£Z“¼äVšÄŽA ÃPÑ+Ö_­oæË5N«ë™Îˆ§“€ôŠ‹úieí˜}‰uY,Rb¦óP7´ªi's6J=fÚE*ß¾(ˆáºš
-­ØÙân
-ðCíY4åPáV6\OÔªt:!ÅÝÁ¯
-€f=b6ÿ8ê>AphÑšElñ„3É¡Œ€ËRó*³ÜV$U•ˆF´TÑ.…BV¹v»d́~zöå¹ð˜7éqYÿüÏþÝ&‹ï °¤á$¶§8ìÜ„õ´8Y ÑmK•Ù}¹Mó‘·½¥ÏÜcv”%Ü?G„ÌìŽò’PÛñUZ†7k.•¸?Þ!Œ’w…'Ì€+0¦ÒÑ"c£0q¢ÞîcóyÛ!çÌó´Ü£n’HÑ.€” x0c²¦•fuåIJr>1˜\w™u'|q4EbPµ¨ªí’s‚äÍêb†*å¨pÕ¯ÁežÊJ§Ðë§iN®hÓA˜Þc"f˜×С¶è¥HÜ&á@äÍÕöŽû¢ƒ ™¼‚a"MkyÔW–G…3Oå&2Ç&+)j
-Õá~Ï> & j-²…ª$µzËKA‹µ‘Ñ€SJq˜9™[P¯|m<ñæÙ§†šü9šÌ…DœB«'³ÔÚíV¸ï…î½tšÏ*Hm¹´!(à0v¬ý‚H¢V”o#j0Ü€-@àÒ:
-@‡ú,§ì÷fDUG>Õ—S©ãtæo!½Ô6î‘šoꆽù{ÄÖ-z$*(§G&VÛŽ!uX[
-ѯç³3
-©³¡gê
-gh5:bÝÔ[ÂtõrVF­Âe•±ò%Ø‘Ú=r®Ýœ#h‘²Ë~£óº<pw©ÑôœŽE°Ìüxþ!Õ7¸I‚ãÇœÞâtà–ËsÁÎ9ud³Âƒ˜\@IóÉÓÈÃ$T‡lÐ-9@®ÓYÃ$xº¦Bï y!"w4²Kæƒl(ξÝe„tth^çêÞ7ðTã…©#¦,Y}¦ŒY)‡Ùè
-ñ˜?ÖGEf`<?ÖúÂ\Ú+a!Œvp†!8uE.%ºŠ²Kë€KªBh9k§ÍÊ#¾¸¾ÞÓ¾ysl:,à`8k“u™ahØÑüDÛl §Ü–LÚ¥ŽÐö‰¾X”‰´4t]1·	i:ùh‰º¸1–ÑwU´RÅ´R«j¼”ÇÅ°ÍÍCsoë:F	JÞpî4‰r¶Œœœ¥—â>ÿ›ùó脝s/ØåRª	@LÀIÅí:Öc"¶GìÀ½1Iw=OŽíÚ–ªÔIYIšn—‡ªÒªqâþ•&r€”˜ÓûéI‰«G-H$ñR­úp
-À؁srXy¨d£óØZn¼Dp1V‡ìZ
-ÒR7]G¼Š[§uøÍSÌ€FÊÕÇÕb±»ÓäMU-Œy²ðD"Š‘6cèT~dã‚M$ÆÑbÒlyX±aõ;K” ِf§„epmø\–ÖѲ¬$h‡6£KLF«¨gNˆ
-UÙ´¹çßc3ûà€ƒÊ‡÷±,Üdu{ÚYù–%´T°Ž%s~ñGŸ[Oço88rFK³Æ:äË¢]ÍG=ÉÈrD½€f\W>ü;Íxs¦RÊVÆÔ/ˆ_3t~-Bé"N|x'Ǥ»ÅiFÌV´§¹{_”ÔLðS·NæX‘óDK]N?ÓÓ=VÊÎP7Q ‹&È~EMü„Ù¨ÁÈ4$)/æ¥6#VKëÝ@‚ÃèàdÊׇ£®DCg´ÆÓ:2Ptq„¹Ìþ“üp= ‘õƒ4=Ë›"TÙ”^þƵXÝUÈóÀœ^ØY¤O©á[*Tæ,M
-TÁsä{¢€1Œ†Š#}E¤]S~‰
-ÁLE%%ÙQXL£ãœ}B‡Á„
-âiP ³s	qyfDÙjŽ_¨WÆ5+¿‘® J:G/gº˜I=ÏmVy…„ìCteªM
-u+ ƒ•ð¤¼G
-%W©Ù6gGtÉPPŠðqÏð8žS
-eþœCÓ́Ö-ÃÁ&Ôñ_a˜J·aaLÙˆÛ1Ô@*‡»u;ôYh08-3óE9Å<H[à߃">Ø	ÊÛru0CÊZòÙ|XÄTÓh¤gæÓÊ–FÉQSÇCÆFQûôÎÑpç‚P#Ÿ™lç,ð|.èQ‘“1JÈ	¨Ç´(ä{fF•Q^Í_U÷,6E×ÀÄU
-ê âÿM~ª½ðm%CĆi™A^øÊlp L+“C\|:Ü­Rjð•„uDôíkò”ûHJ.ÈÅG¼)E¶Ðs7°Ñ?S ÛqAU:
-H%   ðÆ*µ
-ö<þ›µ4,Ý<ÒƒÔ’P³™÷ÖPa5˜¨@]!YÚcÉøBt±€ ©Ð4ØZ3 ±áf4J¢€FVÙSqÚS7ý(\éÇó?4cDW²ô­0'¼áÿ
-ZKËê¥Ä4BÞÈEhý]Ö=‡y­.ÒЉÁü±G„À0š¦ãpl-–çÄß1WÝ®²OÒòpÁ•^CÉò@¨q‰dQTGeõÏŒ1ÆÌ6xÆtN†D÷6‚MÁŸ_SÛ<%„dCD]E}€%˜UƒCt‘¶Y?6‘ƒþ…K;;òmmNúŽ¥cmìÇL!Ñ(¹KEzRwÈKñÇ–HˆÂê´é8Oʁ`sÍPÛR8ÕgTDWø"q-hPµ¡	BHÈЗx&(ÑIŤ™C™QcB­Ä<(3Õð7ü[¹ËÕ¸,h@ÑiV½aòÖVB’:R„Š“ü)6SȦÇGn{á?¸A”éÃMÌ$-ìãÀ%?f,'’ANÅEgL}¦šúå+%—24üU1N³6‘p†¢¤Qýx³A´>—Á½´0YRÚ
-ZÙ]†›õisB<RϨ-@.áYkIi6µX"¥Ö±e-­…@µÔ.Íl2ÙnPÐi”R±QÖÈ'ô¤™yá°u˜e®Tøâ)<#b"™¨|ñI¥Ñ»@¨+„Šésݤiˆ˲À$_^
-˜âr`8؉Õü©i/”¤bì9gZq¹
-ZÊG‹r*¬fNÚâÞT‹ˇ¬^‰ÑRiÓPc%ÕDŽ’b“–ÐLÛWAºµ\ԝ1µ|Uµ9涽-| 7W­¥]õ"ä2fØTžš©6mJ
-GºôYÔF»K֔Ŭ;sF?´²I¨Œe8õÅŒ?W7¦	zj½…Ôâ~¡= Y¥ûœ}>¢™sâ	Š<Ù
-UF9hD“´y`
-§‰´çIé˸òiPSµøYy®Ì÷qUL[VE‚eŸ­>ÖVgƒ¨B¯H¬@ÕZüG§DÜ^§̐†áóÙUfK›±i4XÙVQÊ4jI¾€1¶vw‡,´FLÉàË<]ÿŒè™ñ‰p—n5Ô]H/²;çÐUN'³¢ùYÎ]ce'øWEòç,Jb£à€Ø‹…
-’”C`Ði å	ƒ½‡Zm+aj$~<Íï·%@✠ÑTcXZpÃ5L	Ézo|ˆI#d€™X|’îDTü`%VI@À7(HíCqd‰j@ƒ¨@$̈6žÕ	¥Ø-ø|‰…O‡r*t!à4ÿ¸…§Å!äVʍ+ËåxËÜÚ4hWwÁ¬gUÓƒȇ™EåÑ}ƒd™6ä#F˜3–`Ø#P;ŽpvAÐîD!áõ}ÙYõÖ@`94kÆR3€R™4-jQºÂ0ºôˆ€0%ÌIƒ 9 at 0*P4ÅÌtƒgDï²Ñ.¸^`ƒüØ%Qª}Nÿò@Š‘ˆ‚dúéÍ0‘‡Ý{£Âû‘£«Äìi!3ÙEuÕ&à.—_ØjÅçp'ùOï[Að]ô§E‘¬Xn£,Á.•wžÐ¸°#†;ò•aR×$-\cŒ£~p4ó£ý¨žXS …gÄXF†Ö|¶Óœ9VEƒ¨<ÒCA "\ Ýë B‚SåæÄP⁐qypX¾Peu¥×ÂH“Ïm IڐÀÏ¢úèfÆËA8yMðØEDS„±!	Pà1zD\Í¢i”ýK‘'W“E¼)'zäÑ‘­1SiAÛw|
-ÞÎW'1ļ‡¥i-”Û)
-ôÌù£ˆàOÇÒhH§ÅÐÉý“6¤PV°UVÖî£c]K®Òãüt`Ú,ÂzS”í
-Ê› w$'â²Ð¹9zq˜S}h˜@„щ(ÐaP€p¶$öXdT“íd;éB X(¤qÂ}av¤8Öñ"|L_V%Ž·Â¥òmáqƒÝºfäSïKõ(m a@ƒ,!‘ÁoƒWáP!Lî#=cѝŠÁÁöb² ‡½Xº0Ýe•Òö84%>“cÄ8HÎGHƒÇ•BP%±Bd•5H²Áù)–ÏP’4ɵWO¹MŽ$H·6U•}V@÷
-«ÓÓ,”éwÐ}—D‘5|cR)´w½JÏø…W–•æÓ—ü%ZÔáý4(ÄWÀUÁJÁø’±Õ0ÅŒkÔZÕ	ôÐA0JöAÀ6B^AœXUX»£` ªEäèAg%ˆCewZë…E@B)‰SV“õ›+ƒyi?‡¾€ìE)Ì)F¢P‰x÷Š¨?ð(½Çæ°¢yó†Lb‘ÖåfYˆp?ƒú¢¼IxÛR!HÙè–ßåi ^2’uÂ65ÃÜxýÅÁ@ø@@&%ö„RU•k¥")u(’÷e˜8JS+Û\ÉiÞ›ê' xRáѲ-–Q™^"í Ÿõ.i˜Òš@p˜ðåB ÖA^ªÒ"Â	WÈBp@ÎŽ5YAFm,b´"µ `Ž·’cá†[™ÅVò¶p˜aŠ"éíô ¯à ÿÝE^	Dm–£Qmd|}%þßOõbþ£žO©?ðm“ËÏ Fê–MfC`U¡WBGËõ\(ÌŒ÷öeblSs£ÃP<1W9Zú’xWŒ‚”¥_ˆ¸Ça
-
-rQµ8#ˆùT6¬eñÑhš.“´€PÅ’xÒ0dUjâõØÐ’X%=‰E¹`õÛhkŠæE°[Ê”ŠƒFïM˜ÁƒŸy†¸>Õ•ÿW_â$ÆB2šes at fÌŒ¡UAEM¬˜àCFaªC#÷«Lh·ÌqkW@ñ¡kø`Ix;•vNÞ’óCh<æd\Eù/Ì 2.4›Á€YÝ(Aí¦-5(»æ—£L
-/ŽùL— ºI
-5|ùTö™%¡ÙdR+C·g†
-ß_j‚!	æwù_5BÁ›‘D|eEX4q±Äf™]E–—Ægk.³(	Bîç¨Ùi®;E©L¬¡LQ‡ãàUæAöoµ†Ì0pF›¸&¨”I–ÁÂ(TŸÙ…•¿w¹BU(¢Wj‚~N:y=Vœ6¤4&1qUá	HP5ùkVMÁýÃ?¤,§þÈtV“É+´PBu¦e´X†ÉE M~š-¿ùuæšB¤»•U’9'	BÑ/ÁÌùvB›$Bµg¢/zgBàXŠçÞi”^t¦tØ,ž"‹U¹¬M&ã)yNž”gåiy^ž˜gæIŒVšgçéy~ž gè)zŽž¤géizžž¨gê©z®ž9qÅz¾ž°gì){Ξ´gíi{Þž¸gî©{îžC
\ No newline at end of file

Added: packages/libhdf4/branches/upstream/current/hdf/util/testfiles/head.r8.gz
===================================================================
(Binary files differ)


Property changes on: packages/libhdf4/branches/upstream/current/hdf/util/testfiles/head.r8.gz
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Deleted: packages/libhdf4/branches/upstream/current/hdf/util/testutil.sh
===================================================================
--- packages/libhdf4/branches/upstream/current/hdf/util/testutil.sh	2007-05-15 09:05:29 UTC (rev 830)
+++ packages/libhdf4/branches/upstream/current/hdf/util/testutil.sh	2007-05-15 09:53:05 UTC (rev 831)
@@ -1,424 +0,0 @@
-#!/bin/sh 
-# HDF Utilities Test script
-# Usage: testutil.sh [machine-type]
-
-machinetype="$1"
-
-# Check if target machine supports 32 bits datatype.
-# "true" is TRUE; "" means FALSE.
-case $machinetype in
-    *unicos*) has32="";;
-    *) has32="true";;
-esac
-
-# initialize errors variable
-errors=0
-haserr=0
-
-# setup hdfed command which is used often
-HDFED='./hdfed'
-HDFEDCMD="$HDFED -batch"		# use -batch mode for no prompt
-SED="sed -e /library/,/String/d"  # filter out the library version
-
-echo ""
-echo "=============================="
-echo "HDF Utilities tests started"
-echo "=============================="
-
-# gif2hdf and hdf2gif 
-if [ -f gif2hdf -a -f hdf2gif ]; then
-echo "** Testing gif2hdf and hdf2gif  ***"
-/bin/rm -r gif_hdf_temp
-/bin/mkdir gif_hdf_temp
-./hdf2gif testfiles/skull.hdf  gif_hdf_temp/skull.gif
-./gif2hdf testfiles/SunWheel.gif  gif_hdf_temp/SunWheel.hdf
-./gif2hdf testfiles/bttrfly.gif  gif_hdf_temp/bttrfly.hdf
-else
-echo "** hdf2gif or gif2hdf is not available ***"
-fi
-
-  echo " *********************** NOTE ****************************"
-  echo " Use WEB Browser and JHV to compare "
-  echo " testfiles/SunWheel.gif and testfiles/bttrfly.gif "
-  echo " with gif_hdf_temp/SunWheel.hdf and gif_hdf_temp/bttrfly.hdf"
-  echo " "
-  echo " Use JHV  and WEB Browser to compare "
-  echo " testfiles/skull.hdf and gif_hdf_temp/skull.gif"
-  echo " ********************* END NOTE **************************"
-  echo ""
-  errors=0
-
-# hdf24to8
-if [ -f hdf24to8 -a -f hdftor8 ]; then
-echo "** Testing hdf24to8  ***"
-/bin/rm -f head.r24 head.r8 head8.hdf img001-263.328 pal001
-cp testfiles/head.r24.Z testfiles/head.r8.Z .
-uncompress head.r24.Z head.r8.Z
-./hdf24to8 head.r24 head8.hdf
-./hdftor8 head8.hdf
-cmp img001-263.328 head.r8 || errors=1
-/bin/rm -f head.r24 head.r8 head8.hdf img001-263.328 pal001
-else
-echo "** hdf24to8 or hdftor8 is not available ***"
-fi
-
-if [ $errors -eq 1 ]; then
-  haserr=1
-  echo " ********* NOTE ***************"
-  echo " hdf24to8 might have failed ***"
-  echo " The above errors could be formatting "
-  echo " problems which can be ignored "
-  echo " please run the following by hand to verify "
-  echo " "
-  echo " /bin/rm -f head.r24 head.r8 head8.hdf img001-263.328 pal001"
-  echo " cp testfiles/head.r24.Z testfiles/head.r8.Z . "
-  echo " uncompress head.r24.Z head.r8.Z "
-  echo " ./hdf24to8 head.r24 head8.hdf "
-  echo " ./hdftor8 head8.hdf "
-  echo " cmp img001-263.328 head.r8 " 
-  echo " ******* END NOTE *************"
-  echo ""
-  errors=0
-fi
-
-# hdfed
-if [ -f $HDFED ]; then
-echo "** Testing hdfed  ***"
-/bin/rm -f storm110.hdf ntcheck.hdf hdfed.tmp
-cp testfiles/storm110.hdf testfiles/ntcheck.hdf .
-$HDFEDCMD < hdfed.input1 > hdfed.tmp 2>&1
-diff hdfed.tmp hdfed.out1 || errors=1
-/bin/rm -f storm110.hdf ntcheck.hdf hdfed.tmp
-else
-echo "** hdfed not available ***"
-fi
-
-if [ $errors -eq 1 ]; then
-  haserr=1
-   echo " ********* NOTE ***************"
-   echo " hdfed might have failed ***"
-  echo " The above errors could be formatting "
-  echo " problems which can be ignored "
-   echo " please run the following by hand to verify "
-   echo " "
-   echo "/bin/rm -f storm110.hdf ntcheck.hdf hdfed.tmp "
-   echo "cp testfiles/storm110.hdf testfiles/ntcheck.hdf . "
-   echo "$HDFEDCMD < hdfed.input1 >& hdfed.tmp "
-   echo "diff hdfed.tmp hdfed.out1 "
-  echo " ******* END NOTE *************"
-  echo ""
-   errors=0
-fi
-
-# ristosds
-if [ -f ristosds -a -f $HDFED ]; then
-echo "** Testing ristosds  ***"
-/bin/rm -f storm*.hdf hdfed.tmp1
-cp testfiles/storm110.hdf testfiles/storm120.hdf testfiles/storm130.hdf .
-./ristosds storm*.hdf -o storm.hdf > /dev/null 2>&1
-$HDFEDCMD < ristosds.input1 > hdfed.tmp1 2>&1
-diff  hdfed.tmp1 ristosds.out1 || errors=1
-/bin/rm -f storm*.hdf hdfed.tmp1
-else
-echo "** ristosds or hdfed not available ***"
-fi
-
-if [ $errors -eq 1 ]; then
-  haserr=1
-  echo " ********* NOTE ***************"
-  echo " ristosds might have failed ***"
-  echo " The above errors could be formatting "
-  echo " problems which can be ignored "
-  echo " please run the following by hand to verify "
-  echo " "
-  echo " /bin/rm -f storm*.hdf hdfed.tmp1 "
-  echo " cp testfiles/storm110.hdf testfiles/storm120.hdf testfiles/storm130.hdf . "
-  echo "./ristosds storm*.hdf -o storm.hdf "
-  echo "$HDFEDCMD < ristosds.input1 >& hdfed.tmp1 "
-  echo " diff  hdfed.tmp1 ristosds.out1"
-  echo " ******* END NOTE *************"
-  echo ""
-  errors=0
-fi
-
-
-#hdfpack
-if [ -f hdfpack -a -f hdfls ]; then
-echo "** Testing hdfpack  ***"
-/bin/rm -f test.hdf test.blk test.pck hdfls.tmp1
-cp testfiles/test.hdf .
-./hdfpack test.hdf test.pck
-./hdfpack -b test.hdf test.blk
-(./hdfls test.hdf | $SED ) > hdfls.tmp1 2>&1
-(./hdfls test.pck | $SED ) >> hdfls.tmp1 2>&1
-diff  hdfls.tmp1 hdfpack.out1 || errors=1
-/bin/rm -f test.hdf test.blk test.pck hdfls.tmp1
-else
-echo "** hdfpack or hdfls not available ***"
-fi
-
-if [ $errors -eq 1 ]; then
-  haserr=1
-    echo " ********* NOTE ***************"
-    echo " hdfpack might have failed ***"
-  echo " The above errors could be formatting "
-  echo " problems which can be ignored "
-    echo " please run the following by hand to verify "
-    echo " "
-    echo "/bin/rm -f test.hdf test.blk test.pck hdfls.tmp1 "
-    echo " cp testfiles/test.hdf . "
-    echo "./hdfpack test.hdf test.pck "
-    echo "./hdfpack -b test.hdf test.blk "
-    echo "(./hdfls test.hdf | $SED ) >& hdfls.tmp1"
-    echo "(./hdfls test.pck | $SED ) >>& hdfls.tmp1"
-    echo " diff hdfls.tmp1 hdfpack.out1 "
-  echo " ******* END NOTE *************"
-  echo ""
-    errors=0
-fi
-
-#hdftopal/paltohdf
-if [ -f  hdftopal -a -f paltohdf ]; then
-echo "** Testing hdftopal/paltohdf  ***"
-/bin/rm -f palette.* 
-cp testfiles/palette.raw .
-./paltohdf palette.raw palette.hdf
-./hdftopal palette.hdf palette.raw.new
-cmp palette.raw palette.raw.new || errors=1
-/bin/rm -f palette.* 
-else
-echo "** hdftopal or paltohdf not available ***"
-fi
-
-if [ $errors -eq 1 ]; then
-  haserr=1
-  echo " ********* NOTE ***************"
-    echo " hdftopal or paltohdf might have failed ***"
-  echo " The above errors could be formatting "
-  echo " problems which can be ignored "
-    echo " please run the following by hand to verify "
-    echo " "
-    echo " /bin/rm -f palette.* "
-    echo " cp testfiles/palette.raw . "
-    echo "./paltohdf palette.raw palette.hdf "
-    echo "./hdftopal palette.hdf palette.raw.new "
-    echo "cmp palette.raw palette.raw.new "
-  echo " ******* END NOTE *************"
-  echo ""
-   errors=0
-fi
-
-# r8tohdf/hdftor8
-if [ -f r8tohdf -a -f hdftor8 -a -f hdfls ]; then
-echo "** Testing r8tohdf/hdftor8  ***"
-/bin/rm -f storm* img* palette.raw hdfls.tmp2 pal005
-cp testfiles/storm*.raw testfiles/palette.raw .
-./r8tohdf 57 57 storm.hdf storm*.raw
-./r8tohdf 57 57 storm.hdf -p palette.raw -i storm110.raw
-./hdftor8 storm.hdf
-(./hdfls -l storm.hdf | $SED) > hdfls.tmp2 2>&1
-diff  hdfls.tmp2 hdftor8.out1 || errors=1
-cmp img001-057.057  storm110.raw || errors=1
-cmp img002-057.057  storm120.raw || errors=1
-cmp img003-057.057  storm130.raw || errors=1
-cmp img004-057.057  storm140.raw || errors=1
-/bin/rm -f storm* img* palette.raw hdfls.tmp2 pal005
-else
-echo "** r8tohdf, hdftor8 or hdfls not available ***"
-fi
-
-if [ $errors -eq 1 ]; then
-  haserr=1
-  echo " ********* NOTE ***************"
-    echo " r8tohdf or hdftor8 might have failed ***"
-  echo " The above errors could be formatting "
-  echo " problems which can be ignored "
-    echo " please run the following by hand to verify "
-    echo " "
-    echo "/bin/rm -f storm* img* palette.raw hdfls.tmp2 pal005 "
-    echo "cp testfiles/storm*.raw testfiles/palette.raw . "
-    echo "./r8tohdf 57 57 storm.hdf storm*.raw "
-    echo "./r8tohdf 57 57 storm.hdf -p palette.raw -i storm110.raw "
-    echo "./hdftor8 storm.hdf "
-    echo "(./hdfls -l storm.hdf | $SED) >& hdfls.tmp2 "
-    echo " diff hdfls.tmp2 hdftor8.out1 "
-    echo "cmp img001-057.057  storm110.raw "
-    echo "cmp img002-057.057  storm120.raw "
-    echo "cmp img003-057.057  storm130.raw "
-    echo "cmp img004-057.057  storm140.raw "
-  echo " ******* END NOTE *************"
-  echo ""
-   errors=0
-fi
-
-# hdfcomp
-if [ -f  hdfcomp -a -f hdfls ]; then
-echo "** Testing hdfcomp  ***"
-/bin/rm -f storm*.hdf all*.hdf hdfls.tmp3
-cp testfiles/storm*.hdf .
-./hdfcomp allstorms.hdf storm*.hdf
-./hdfcomp allcomp.hdf -c storm*.hdf
-(./hdfls -l allstorms.hdf | $SED) > hdfls.tmp3 2>&1
-(./hdfls -l allcomp.hdf | $SED) >> hdfls.tmp3 2>&1
-diff  hdfls.tmp3 hdfcomp.out1 || errors=1
-/bin/rm -f storm*.hdf all*.hdf hdfls.tmp3
-else
-echo "** hdfcomp or hdfls not available ***"
-fi
-
-if [ $errors -eq 1 ]; then
-  haserr=1
-  echo " ********* NOTE ***************"
-    echo " hdfcomp might have failed ***"
-  echo " The above errors could be formatting "
-  echo " problems which can be ignored "
-    echo " please run the following by hand to verify "
-    echo " "
-    echo "/bin/rm -f storm*.hdf all*.hdf hdfls.tmp3 "
-    echo "cp testfiles/storm*.hdf . "
-    echo "./hdfcomp allstorms.hdf storm*.hdf "
-    echo "./hdfcomp allcomp.hdf -c storm*.hdf "
-    echo "(./hdfls -l allstorms.hdf | $SED) >& hdfls.tmp3 "
-    echo "(./hdfls -l allcomp.hdf | $SED) >>& hdfls.tmp3 "
-    echo "diff hdfls.tmp3 hdfcomp.out1 "
-  echo " ******* END NOTE *************"
-  echo ""
-   errors=0
-fi
-
-#jpeg2hdf/hdf2jpeg
-if [ -f jpeg2hdf -a -f hdf2jpeg -a -f hdfls ]; then
-echo "** Testing jpeg2hdf/hdf2jpeg  ***"
-/bin/rm -f jpeg.hdf jpeg_img.jpg jpeg2.jpg hdfls.tmp4
-cp testfiles/jpeg_img.jpg .
-./jpeg2hdf jpeg_img.jpg jpeg.hdf
-./hdf2jpeg jpeg.hdf jpeg2.jpg
-(./hdfls -l jpeg.hdf | $SED) > hdfls.tmp4 2>&1
-diff  hdfls.tmp4 jpeg2hdf.out1 || errors=1
-cmp jpeg_img.jpg jpeg2.jpg || errors=1
-/bin/rm -f jpeg.hdf jpeg_img.jpg jpeg2.jpg hdfls.tmp4
-else
-echo "** jpeg2hdf, hdf2jpeg or hdfls  not available ***"
-fi
-
-if [ $errors -eq 1 ]; then
-  haserr=1
-  echo " ********* NOTE ***************"
-    echo " jpeg2hdf or hdf2jpeg might have failed ***"
-  echo " The above errors could be formatting "
-  echo " problems which can be ignored "
-    echo " please run the following by hand to verify "
-    echo " "
-    echo "/bin/rm -f jpeg.hdf jpeg_img.jpg jpeg2.jpg hdfls.tmp4 "
-    echo "cp testfiles/jpeg_img.jpg . "
-    echo "./jpeg2hdf jpeg_img.jpg jpeg.hdf "
-    echo "./hdf2jpeg jpeg.hdf jpeg2.jpg "
-    echo "(./hdfls -l jpeg.hdf | $SED) >& hdfls.tmp4 "
-    echo "diff hdfls.tmp4 jpeg2hdf.out1 "
-    echo "cmp jpeg_img.jpg jpeg2.jpg "
-  echo " ******* END NOTE *************"
-  echo ""
-   errors=0
-fi
-
-# fp2hdf
-if [ -f fp2hdf -a -f hdfls -a -f $HDFED ]; then
-echo "** Testing fp2hdf  ***"
-if [ ! "$has32" ]; then
-    echo "    $machinetype does not support float32."
-    echo "    float32 tests skipped."
-fi
-
-/bin/rm -f ctxtr* cb* *.hdf hdfls.tmp5 hdfed.tmp6
-./fptest
-./fp2hdf ctxtr2 -o ctxtr2.hdf
-./fp2hdf ctxtr3 -o ctxtr3.hdf
-if [ "$has32" ]; then
-./fp2hdf cb32r2 -o cb32r2.hdf
-./fp2hdf cb32r3 -o cb32r3.hdf
-fi
-./fp2hdf cb64r2 -o cb64r2.hdf
-./fp2hdf cb64r3 -o cb64r3.hdf
-./fp2hdf ctxtr2 -o ctxtr2_ris.hdf -raster -e 50 50
-./fp2hdf cb64r2 -o cb64r2_ris.hdf -raster -i 50 50 -f
-(./hdfls -l ctxtr2.hdf | $SED) > hdfls.tmp5 2>&1
-(./hdfls -l ctxtr3.hdf | $SED) >> hdfls.tmp5 2>&1
-if [ "$has32" ]; then
-(./hdfls -l cb32r2.hdf | $SED) >> hdfls.tmp5 2>&1
-(./hdfls -l cb32r3.hdf | $SED) >> hdfls.tmp5 2>&1
-fi
-(./hdfls -l cb64r2.hdf | $SED) >> hdfls.tmp5 2>&1
-(./hdfls -l cb64r3.hdf | $SED) >> hdfls.tmp5 2>&1
-(./hdfls -l ctxtr2_ris.hdf | $SED) >> hdfls.tmp5 2>&1
-(./hdfls -l cb64r2_ris.hdf | $SED) >> hdfls.tmp5 2>&1
-if [ "$has32" ]; then
-    diff  hdfls.tmp5 fp2hdf.out1 || errors=1
-    $HDFEDCMD < fp2hdf.input1 > hdfed.tmp6 2>&1
-    diff  hdfed.tmp6 fp2hdf.out2 || errors=1
-else
-    diff  hdfls.tmp5 fp2hdf.out1-32 || errors=1
-    $HDFEDCMD < fp2hdf.input1-32 > hdfed.tmp6 2>&1
-    diff  hdfed.tmp6 fp2hdf.out2-32 || errors=1
-fi
-/bin/rm -f ctxtr* cb* *.hdf hdfls.tmp5 hdfed.tmp6
-else
-echo "** fp2hdf, hdfed or hdfls not available ***"
-fi
-
-if [ $errors -eq 1 ]; then
-  haserr=1
-  echo " ********* NOTE ***************"
-  echo " fp2hdf might have failed ***"
-  echo " The above errors could be formatting "
-  echo " problems which can be ignored "
-  echo " please run the following by hand to verify "
-  echo " "
-  echo "  /bin/rm -f ctxtr* cb* *.hdf hdfls.tmp5 hdfed.tmp6"
-  echo " ./fptest "
-  echo " ./fp2hdf ctxtr2 -o ctxtr2.hdf "
-  echo " ./fp2hdf ctxtr3 -o ctxtr3.hdf "
-  if [ "$has32" ]; then
-  echo " ./fp2hdf cb32r2 -o cb32r2.hdf "
-  echo " ./fp2hdf cb32r3 -o cb32r3.hdf "
-  fi
-  echo " ./fp2hdf cb64r2 -o cb64r2.hdf "
-  echo " ./fp2hdf cb64r3 -o cb64r3.hdf "
-  echo " ./fp2hdf ctxtr2 -o ctxtr2_ris.hdf -raster -e 50 50 "
-  echo " ./fp2hdf cb64r2 -o cb64r2_ris.hdf -raster -i 50 50 -f "
-  echo "( ./hdfls -l ctxtr2.hdf | $SED) >&  hdfls.tmp5 "
-  echo "( ./hdfls -l ctxtr3.hdf | $SED) >>& hdfls.tmp5 "
-  if [ "$has32" ]; then
-  echo "( ./hdfls -l cb32r2.hdf | $SED) >>& hdfls.tmp5 "
-  echo "( ./hdfls -l cb32r3.hdf | $SED) >>& hdfls.tmp5 "
-  fi
-  echo "( ./hdfls -l cb64r2.hdf | $SED) >>& hdfls.tmp5 "
-  echo "( ./hdfls -l cb64r3.hdf | $SED) >>& hdfls.tmp5 "
-  echo "( ./hdfls -l ctxtr2_ris.hdf | $SED) >>& hdfls.tmp5 "
-  echo "( ./hdfls -l cb64r2_ris.hdf | $SED) >>& hdfls.tmp5 "
-  if [ "$has32" ]; then
-  echo " diff hdfls.tmp5 fp2hdf.out1 "
-  echo " $HDFEDCMD < fp2hdf.input1 >& hdfed.tmp6 "
-  echo " diff hdfed.tmp6 fp2hdf.out2 "
-  else
-  echo " diff hdfls.tmp5 fp2hdf.out1-32 "
-  echo " $HDFEDCMD < fp2hdf.input1-32 >& hdfed.tmp6 "
-  echo " diff hdfed.tmp6 fp2hdf.out2-32 "
-  fi
-  echo " ******* END NOTE *************"
-  echo ""
-  errors=0
-fi
-
-#
-# Check errors result
-if [ $haserr -eq 0 ]; then
-    echo "=============================="
-    echo "HDF Utilities tests passed."
-    echo "=============================="
-else
-    echo "**************************************"
-    echo "HDF Utilities tests encountered errors"
-    echo "**************************************"
-fi
-echo ""
-exit 0

Added: packages/libhdf4/branches/upstream/current/hdf/util/testutil.sh.in
===================================================================
--- packages/libhdf4/branches/upstream/current/hdf/util/testutil.sh.in	                        (rev 0)
+++ packages/libhdf4/branches/upstream/current/hdf/util/testutil.sh.in	2007-05-15 09:53:05 UTC (rev 831)
@@ -0,0 +1,434 @@
+#!/bin/sh 
+# HDF Utilities Test script
+# Usage: testutil.sh [machine-type]
+
+srcdir=@srcdir@
+
+machinetype="$1"
+
+# Check if target machine supports 32 bits datatype.
+# "true" is TRUE; "" means FALSE.
+case $machinetype in
+    *unicos*) has32="";;
+    *) has32="true";;
+esac
+
+# initialize errors variable
+errors=0
+haserr=0
+
+# setup hdfed command which is used often
+HDFED='./hdfed'
+HDFEDCMD="$HDFED -batch"		# use -batch mode for no prompt
+SED="sed -e /library/,/String/d"  # filter out the library version
+
+echo ""
+echo "=============================="
+echo "HDF Utilities tests started"
+echo "=============================="
+
+# gif2hdf and hdf2gif 
+if [ -f gif2hdf -a -f hdf2gif ]; then
+  echo "** Testing gif2hdf and hdf2gif  ***"
+  /bin/rm -rf gif_hdf_temp
+  /bin/mkdir gif_hdf_temp
+  ./hdf2gif $srcdir/testfiles/skull.hdf  gif_hdf_temp/skull.gif
+  ./gif2hdf $srcdir/testfiles/SunWheel.gif  gif_hdf_temp/SunWheel.hdf
+  ./gif2hdf $srcdir/testfiles/bttrfly.gif  gif_hdf_temp/bttrfly.hdf
+else
+  echo "** hdf2gif or gif2hdf is not available ***";
+fi
+
+echo " *********************** NOTE ****************************"
+echo " Use WEB Browser and JHV to compare "
+echo " $srcdir/testfiles/SunWheel.gif and $srcdir/testfiles/bttrfly.gif "
+echo " with gif_hdf_temp/SunWheel.hdf and gif_hdf_temp/bttrfly.hdf"
+echo " "
+echo " Use JHV  and WEB Browser to compare "
+echo " $srcdir/testfiles/skull.hdf and gif_hdf_temp/skull.gif"
+echo " ********************* END NOTE **************************"
+echo ""
+
+errors=0
+
+# hdf24to8
+# "uncompress" utiltiy became obsolete; replaced with gunzip EIP 2004/12/01
+if [ -f hdf24to8 -a -f hdftor8 ]; then
+  echo "** Testing hdf24to8  ***"
+  /bin/rm -f head.r24 head.r8 head8.hdf img001-263.328 pal001
+  #cp $srcdir/testfiles/head.r24.Z $srcdir/testfiles/head.r8.Z .
+  cp $srcdir/testfiles/head.r24.gz $srcdir/testfiles/head.r8.gz .
+  #uncompress head.r24.Z head.r8.Z
+  gunzip head.r24.gz head.r8.gz
+  ./hdf24to8 head.r24 head8.hdf
+  ./hdftor8 head8.hdf
+  cmp img001-263.328 head.r8 || errors=1
+  /bin/rm -f head.r24 head.r8 head8.hdf img001-263.328 pal001
+else
+  echo "** hdf24to8 or hdftor8 is not available ***"
+fi
+
+if [ $errors -eq 1 ]; then
+  haserr=1
+  echo " ********* NOTE ***************"
+  echo " hdf24to8 might have failed ***"
+  echo " The above errors could be formatting "
+  echo " problems which can be ignored "
+  echo " please run the following by hand to verify "
+  echo " "
+  echo " /bin/rm -f head.r24 head.r8 head8.hdf img001-263.328 pal001"
+  echo " cp $srcdir/testfiles/head.r24.gz $srcdir/testfiles/head.r8.gz . "
+  echo " gunzip head.r24.gz head.r8.gz "
+  echo " ./hdf24to8 head.r24 head8.hdf "
+  echo " ./hdftor8 head8.hdf "
+  echo " cmp img001-263.328 head.r8 " 
+  echo " ******* END NOTE *************"
+  echo ""
+  errors=0
+fi
+
+# hdfed
+if [ -f $HDFED ]; then
+  echo "** Testing hdfed  ***"
+  /bin/rm -f storm110.hdf ntcheck.hdf hdfed.tmp
+  cp $srcdir/testfiles/storm110.hdf $srcdir/testfiles/ntcheck.hdf .
+  $HDFEDCMD < $srcdir/hdfed.input1 > hdfed.tmp 2>&1
+  diff hdfed.tmp $srcdir/hdfed.out1 || errors=1
+  /bin/rm -f storm110.hdf ntcheck.hdf hdfed.tmp
+else
+  echo "** hdfed not available ***"
+fi
+
+if [ $errors -eq 1 ]; then
+  haserr=1
+  echo " ********* NOTE ***************"
+  echo " hdfed might have failed ***"
+  echo " The above errors could be formatting "
+  echo " problems which can be ignored "
+  echo " please run the following by hand to verify "
+  echo " "
+  echo "/bin/rm -f storm110.hdf ntcheck.hdf hdfed.tmp "
+  echo "cp $srcdir/testfiles/storm110.hdf $srcdir/testfiles/ntcheck.hdf . "
+  echo "$HDFEDCMD < $srcdir/hdfed.input1 >& hdfed.tmp "
+  echo "diff hdfed.tmp $srcdir/hdfed.out1 "
+  echo " ******* END NOTE *************"
+  echo ""
+  errors=0
+fi
+
+# ristosds
+if [ -f ristosds -a -f $HDFED ]; then
+  echo "** Testing ristosds  ***"
+  /bin/rm -f storm*.hdf hdfed.tmp1
+  cp $srcdir/testfiles/storm110.hdf $srcdir/testfiles/storm120.hdf $srcdir/testfiles/storm130.hdf .
+  ./ristosds storm*.hdf -o storm.hdf > /dev/null 2>&1
+  $HDFEDCMD < $srcdir/ristosds.input1 > hdfed.tmp1 2>&1
+  diff  hdfed.tmp1 $srcdir/ristosds.out1 || errors=1
+  /bin/rm -f storm*.hdf hdfed.tmp1
+else
+  echo "** ristosds or hdfed not available ***"
+fi
+
+if [ $errors -eq 1 ]; then
+  haserr=1
+  echo " ********* NOTE ***************"
+  echo " ristosds might have failed ***"
+  echo " The above errors could be formatting "
+  echo " problems which can be ignored "
+  echo " please run the following by hand to verify "
+  echo " "
+  echo " /bin/rm -f storm*.hdf hdfed.tmp1 "
+  echo " cp $srcdir/testfiles/storm110.hdf $srcdir/testfiles/storm120.hdf $srcdir/testfiles/storm130.hdf . "
+  echo "./ristosds storm*.hdf -o storm.hdf "
+  echo "$HDFEDCMD < $srcdir/ristosds.input1 >& hdfed.tmp1 "
+  echo " diff  hdfed.tmp1 $srcdir/ristosds.out1"
+  echo " ******* END NOTE *************"
+  echo ""
+  errors=0
+fi
+
+
+#hdfpack
+if [ -f hdfpack -a -f hdfls ]; then
+  echo "** Testing hdfpack  ***"
+  /bin/rm -f test.hdf test.blk test.pck hdfls.tmp1
+  cp $srcdir/testfiles/test.hdf .
+  ./hdfpack test.hdf test.pck
+  ./hdfpack -b test.hdf test.blk
+  (./hdfls test.hdf | $SED ) > hdfls.tmp1 2>&1
+  (./hdfls test.pck | $SED ) >> hdfls.tmp1 2>&1
+  diff  hdfls.tmp1 $srcdir/hdfpack.out1 || errors=1
+  /bin/rm -f test.hdf test.blk test.pck hdfls.tmp1
+else
+  echo "** hdfpack or hdfls not available ***"
+fi
+
+if [ $errors -eq 1 ]; then
+  haserr=1
+  echo " ********* NOTE ***************"
+  echo " hdfpack might have failed ***"
+  echo " The above errors could be formatting "
+  echo " problems which can be ignored "
+  echo " please run the following by hand to verify "
+  echo " "
+  echo "/bin/rm -f test.hdf test.blk test.pck hdfls.tmp1 "
+  echo " cp $srcdir/testfiles/test.hdf . "
+  echo "./hdfpack test.hdf test.pck "
+  echo "./hdfpack -b test.hdf test.blk "
+  echo "(./hdfls test.hdf | $SED ) >& hdfls.tmp1"
+  echo "(./hdfls test.pck | $SED ) >>& hdfls.tmp1"
+  echo " diff hdfls.tmp1 $srcdir/hdfpack.out1 "
+  echo " ******* END NOTE *************"
+  echo ""
+  errors=0
+fi
+
+#hdftopal/paltohdf
+if [ -f  hdftopal -a -f paltohdf ]; then
+  echo "** Testing hdftopal/paltohdf  ***"
+  /bin/rm -f palette.* 
+  cp $srcdir/testfiles/palette.raw .
+  ./paltohdf palette.raw palette.hdf
+  ./hdftopal palette.hdf palette.raw.new
+  cmp palette.raw palette.raw.new || errors=1
+  /bin/rm -f palette.* 
+else
+  echo "** hdftopal or paltohdf not available ***"
+fi
+
+if [ $errors -eq 1 ]; then
+  haserr=1
+  echo " ********* NOTE ***************"
+  echo " hdftopal or paltohdf might have failed ***"
+  echo " The above errors could be formatting "
+  echo " problems which can be ignored "
+  echo " please run the following by hand to verify "
+  echo " "
+  echo " /bin/rm -f palette.* "
+  echo " cp $srcdir/testfiles/palette.raw . "
+  echo "./paltohdf palette.raw palette.hdf "
+  echo "./hdftopal palette.hdf palette.raw.new "
+  echo "cmp palette.raw palette.raw.new "
+  echo " ******* END NOTE *************"
+  echo ""
+  errors=0
+fi
+
+# r8tohdf/hdftor8
+if [ -f r8tohdf -a -f hdftor8 -a -f hdfls ]; then
+  echo "** Testing r8tohdf/hdftor8  ***"
+  /bin/rm -f storm* img* palette.raw hdfls.tmp2 pal005
+  cp $srcdir/testfiles/storm*.raw $srcdir/testfiles/palette.raw .
+  ./r8tohdf 57 57 storm.hdf storm*.raw
+  ./r8tohdf 57 57 storm.hdf -p palette.raw -i storm110.raw
+  ./hdftor8 storm.hdf
+  (./hdfls -l storm.hdf | $SED) > hdfls.tmp2 2>&1
+  diff  hdfls.tmp2 $srcdir/hdftor8.out1 || errors=1
+  cmp img001-057.057  storm110.raw || errors=1
+  cmp img002-057.057  storm120.raw || errors=1
+  cmp img003-057.057  storm130.raw || errors=1
+  cmp img004-057.057  storm140.raw || errors=1
+  /bin/rm -f storm* img* palette.raw hdfls.tmp2 pal005
+else
+  echo "** r8tohdf, hdftor8 or hdfls not available ***"
+fi
+
+if [ $errors -eq 1 ]; then
+  haserr=1
+  echo " ********* NOTE ***************"
+  echo " r8tohdf or hdftor8 might have failed ***"
+  echo " The above errors could be formatting "
+  echo " problems which can be ignored "
+  echo " please run the following by hand to verify "
+  echo " "
+  echo "/bin/rm -f storm* img* palette.raw hdfls.tmp2 pal005 "
+  echo "cp $srcdir/testfiles/storm*.raw $srcdir/testfiles/palette.raw . "
+  echo "./r8tohdf 57 57 storm.hdf storm*.raw "
+  echo "./r8tohdf 57 57 storm.hdf -p palette.raw -i storm110.raw "
+  echo "./hdftor8 storm.hdf "
+  echo "(./hdfls -l storm.hdf | $SED) >& hdfls.tmp2 "
+  echo " diff hdfls.tmp2 $srcdir/hdftor8.out1 "
+  echo "cmp img001-057.057  storm110.raw "
+  echo "cmp img002-057.057  storm120.raw "
+  echo "cmp img003-057.057  storm130.raw "
+  echo "cmp img004-057.057  storm140.raw "
+  echo " ******* END NOTE *************"
+  echo ""
+ errors=0
+fi
+
+# hdfcomp
+if [ -f  hdfcomp -a -f hdfls ]; then
+  echo "** Testing hdfcomp  ***"
+  /bin/rm -f storm*.hdf all*.hdf hdfls.tmp3
+  cp $srcdir/testfiles/storm*.hdf .
+  ./hdfcomp allstorms.hdf storm*.hdf
+  ./hdfcomp allcomp.hdf -c storm*.hdf
+  (./hdfls -l allstorms.hdf | $SED) > hdfls.tmp3 2>&1
+  (./hdfls -l allcomp.hdf | $SED) >> hdfls.tmp3 2>&1
+  diff  hdfls.tmp3 $srcdir/hdfcomp.out1 || errors=1
+  /bin/rm -f storm*.hdf all*.hdf hdfls.tmp3
+else
+  echo "** hdfcomp or hdfls not available ***"
+fi
+
+if [ $errors -eq 1 ]; then
+  haserr=1
+  echo " ********* NOTE ***************"
+  echo " hdfcomp might have failed ***"
+  echo " The above errors could be formatting "
+  echo " problems which can be ignored "
+  echo " please run the following by hand to verify "
+  echo " "
+  echo "/bin/rm -f storm*.hdf all*.hdf hdfls.tmp3 "
+  echo "cp $srcdir/testfiles/storm*.hdf . "
+  echo "./hdfcomp allstorms.hdf storm*.hdf "
+  echo "./hdfcomp allcomp.hdf -c storm*.hdf "
+  echo "(./hdfls -l allstorms.hdf | $SED) >& hdfls.tmp3 "
+  echo "(./hdfls -l allcomp.hdf | $SED) >>& hdfls.tmp3 "
+  echo "diff hdfls.tmp3 $srcdir/hdfcomp.out1 "
+  echo " ******* END NOTE *************"
+  echo ""
+  errors=0
+fi
+
+#jpeg2hdf/hdf2jpeg
+if [ -f jpeg2hdf -a -f hdf2jpeg -a -f hdfls ]; then
+  echo "** Testing jpeg2hdf/hdf2jpeg  ***"
+  /bin/rm -f jpeg.hdf jpeg_img.jpg jpeg2.jpg hdfls.tmp4
+  cp $srcdir/testfiles/jpeg_img.jpg .
+  ./jpeg2hdf jpeg_img.jpg jpeg.hdf
+  ./hdf2jpeg jpeg.hdf jpeg2.jpg
+  (./hdfls -l jpeg.hdf | $SED) > hdfls.tmp4 2>&1
+  diff  hdfls.tmp4 $srcdir/jpeg2hdf.out1 || errors=1
+  cmp jpeg_img.jpg jpeg2.jpg || errors=1
+  /bin/rm -f jpeg.hdf jpeg_img.jpg jpeg2.jpg hdfls.tmp4
+else
+  echo "** jpeg2hdf, hdf2jpeg or hdfls  not available ***"
+fi
+
+if [ $errors -eq 1 ]; then
+  haserr=1
+  echo " ********* NOTE ***************"
+  echo " jpeg2hdf or hdf2jpeg might have failed ***"
+  echo " The above errors could be formatting "
+  echo " problems which can be ignored "
+  echo " please run the following by hand to verify "
+  echo " "
+  echo "/bin/rm -f jpeg.hdf jpeg_img.jpg jpeg2.jpg hdfls.tmp4 "
+  echo "cp $srcdir/testfiles/jpeg_img.jpg . "
+  echo "./jpeg2hdf jpeg_img.jpg jpeg.hdf "
+  echo "./hdf2jpeg jpeg.hdf jpeg2.jpg "
+  echo "(./hdfls -l jpeg.hdf | $SED) >& hdfls.tmp4 "
+  echo "diff hdfls.tmp4 $srcdir/jpeg2hdf.out1 "
+  echo "cmp jpeg_img.jpg jpeg2.jpg "
+  echo " ******* END NOTE *************"
+  echo ""
+  errors=0
+fi
+
+##
+##  fp2hdf is now called hdfimport, and is in mfhdf/hdfimport
+##
+ # # fp2hdf
+ # if [ -f fp2hdf -a -f hdfls -a -f $HDFED ]; then
+ # echo "** Testing fp2hdf  ***"
+ # if [ ! "$has32" ]; then
+ #     echo "    $machinetype does not support float32."
+ #     echo "    float32 tests skipped."
+ # fi
+ # 
+ # /bin/rm -f ctxtr* cb* *.hdf hdfls.tmp5 hdfed.tmp6
+ # ./fptest
+ # ./fp2hdf ctxtr2 -o ctxtr2.hdf
+ # ./fp2hdf ctxtr3 -o ctxtr3.hdf
+ # if [ "$has32" ]; then
+ # ./fp2hdf cb32r2 -o cb32r2.hdf
+ # ./fp2hdf cb32r3 -o cb32r3.hdf
+ # fi
+ # ./fp2hdf cb64r2 -o cb64r2.hdf
+ # ./fp2hdf cb64r3 -o cb64r3.hdf
+ # ./fp2hdf ctxtr2 -o ctxtr2_ris.hdf -raster -e 50 50
+ # ./fp2hdf cb64r2 -o cb64r2_ris.hdf -raster -i 50 50 -f
+ # (./hdfls -l ctxtr2.hdf | $SED) > hdfls.tmp5 2>&1
+ # (./hdfls -l ctxtr3.hdf | $SED) >> hdfls.tmp5 2>&1
+ # if [ "$has32" ]; then
+ # (./hdfls -l cb32r2.hdf | $SED) >> hdfls.tmp5 2>&1
+ # (./hdfls -l cb32r3.hdf | $SED) >> hdfls.tmp5 2>&1
+ # fi
+ # (./hdfls -l cb64r2.hdf | $SED) >> hdfls.tmp5 2>&1
+ # (./hdfls -l cb64r3.hdf | $SED) >> hdfls.tmp5 2>&1
+ # (./hdfls -l ctxtr2_ris.hdf | $SED) >> hdfls.tmp5 2>&1
+ # (./hdfls -l cb64r2_ris.hdf | $SED) >> hdfls.tmp5 2>&1
+ # if [ "$has32" ]; then
+ #     diff  hdfls.tmp5 $srcdir/fp2hdf.out1 || errors=1
+ #     $HDFEDCMD < $srcdir/fp2hdf.input1 > hdfed.tmp6 2>&1
+ #     diff  hdfed.tmp6 $srcdir/fp2hdf.out2 || errors=1
+ # else
+ #     diff  hdfls.tmp5 $srcdir/fp2hdf.out1-32 || errors=1
+ #     $HDFEDCMD < $srcdir/fp2hdf.input1-32 > hdfed.tmp6 2>&1
+ #     diff  hdfed.tmp6 $srcdir/fp2hdf.out2-32 || errors=1
+ # fi
+ # /bin/rm -f ctxtr* cb* *.hdf hdfls.tmp5 hdfed.tmp6
+ # else
+ # echo "** fp2hdf, hdfed or hdfls not available ***"
+ # fi
+ # 
+ # if [ $errors -eq 1 ]; then
+ #   haserr=1
+ #   echo " ********* NOTE ***************"
+ #   echo " fp2hdf might have failed ***"
+ #   echo " The above errors could be formatting "
+ #   echo " problems which can be ignored "
+ #   echo " please run the following by hand to verify "
+ #   echo " "
+ #   echo "  /bin/rm -f ctxtr* cb* *.hdf hdfls.tmp5 hdfed.tmp6"
+ #   echo " ./fptest "
+ #   echo " ./fp2hdf ctxtr2 -o ctxtr2.hdf "
+ #   echo " ./fp2hdf ctxtr3 -o ctxtr3.hdf "
+ #   if [ "$has32" ]; then
+ #   echo " ./fp2hdf cb32r2 -o cb32r2.hdf "
+ #   echo " ./fp2hdf cb32r3 -o cb32r3.hdf "
+ #   fi
+ #   echo " ./fp2hdf cb64r2 -o cb64r2.hdf "
+ #   echo " ./fp2hdf cb64r3 -o cb64r3.hdf "
+ #   echo " ./fp2hdf ctxtr2 -o ctxtr2_ris.hdf -raster -e 50 50 "
+ #   echo " ./fp2hdf cb64r2 -o cb64r2_ris.hdf -raster -i 50 50 -f "
+ #   echo "( ./hdfls -l ctxtr2.hdf | $SED) >&  hdfls.tmp5 "
+ #   echo "( ./hdfls -l ctxtr3.hdf | $SED) >>& hdfls.tmp5 "
+ #   if [ "$has32" ]; then
+ #   echo "( ./hdfls -l cb32r2.hdf | $SED) >>& hdfls.tmp5 "
+ #   echo "( ./hdfls -l cb32r3.hdf | $SED) >>& hdfls.tmp5 "
+ #   fi
+ #   echo "( ./hdfls -l cb64r2.hdf | $SED) >>& hdfls.tmp5 "
+ #   echo "( ./hdfls -l cb64r3.hdf | $SED) >>& hdfls.tmp5 "
+ #   echo "( ./hdfls -l ctxtr2_ris.hdf | $SED) >>& hdfls.tmp5 "
+ #   echo "( ./hdfls -l cb64r2_ris.hdf | $SED) >>& hdfls.tmp5 "
+ #   if [ "$has32" ]; then
+ #   echo " diff hdfls.tmp5 $srcdir/fp2hdf.out1 "
+ #   echo " $HDFEDCMD < $srcdir/fp2hdf.input1 >& hdfed.tmp6 "
+ #   echo " diff hdfed.tmp6 $srcdir/fp2hdf.out2 "
+ #   else
+ #   echo " diff hdfls.tmp5 $srcdir/fp2hdf.out1-32 "
+ #   echo " $HDFEDCMD < $srcdir/fp2hdf.input1-32 >& hdfed.tmp6 "
+ #   echo " diff hdfed.tmp6 $srcdir/fp2hdf.out2-32 "
+ #   fi
+ #   echo " ******* END NOTE *************"
+ #   echo ""
+ #   errors=0
+ # fi
+
+#
+# Check errors result
+if [ $haserr -eq 0 ]; then
+  echo "=============================="
+  echo "HDF Utilities tests passed."
+  echo "=============================="
+else
+  echo "**************************************"
+  echo "HDF Utilities tests encountered errors"
+  echo "**************************************"
+fi
+
+echo ""
+exit $haserr


Property changes on: packages/libhdf4/branches/upstream/current/hdf/util/testutil.sh.in
___________________________________________________________________
Name: svn:executable
   + *

Modified: packages/libhdf4/branches/upstream/current/hdf/util/vshow.c
===================================================================
--- packages/libhdf4/branches/upstream/current/hdf/util/vshow.c	2007-05-15 09:05:29 UTC (rev 830)
+++ packages/libhdf4/branches/upstream/current/hdf/util/vshow.c	2007-05-15 09:53:05 UTC (rev 831)
@@ -11,10 +11,10 @@
  ****************************************************************************/
 
 #ifdef RCSID
-static char *RcsId[] = "@(#)$Revision: 1.59 $";
+static char *RcsId[] = "@(#)$Revision: 1.61 $";
 #endif
 
-/* $Id: vshow.c,v 1.59 1999/04/23 22:19:11 smitchel Exp $ */
+/* $Id: vshow.c,v 1.61 2003/12/10 21:13:48 epourmal Exp $ */
 
 /*****************************************************************************
 *
@@ -56,6 +56,9 @@
 static int32 fmtfloat
             (char *x);
 
+static int32 fmtulong
+            (char *x);
+
 static int32 fmtlong
             (char *x);
 
@@ -336,6 +339,15 @@
 }
 
 static int32
+fmtulong(char *x)
+{
+    unsigned    l = 0;
+    HDmemcpy(&l, x, sizeof(int32));
+    cn += printf("%u", l);
+    return (1);
+}
+
+static int32
 fmtlong(char *x)
 {
     long        l = 0;
@@ -453,6 +465,9 @@
                     break;
 
                 case DFNT_UINT32:
+                      fmtfn[i] = fmtulong;
+                      break;
+
                 case DFNT_INT32:
                     fmtfn[i] = fmtlong;
                     break;
@@ -652,6 +667,8 @@
                       fmtfn = fmtshort;
                       break;
                  case DFNT_UINT32:
+                      fmtfn = fmtulong;
+                      break;
                  case DFNT_INT32:
                       fmtfn = fmtlong;
                       break;
@@ -761,6 +778,8 @@
                   fmtfn = fmtshort;
                   break;
              case DFNT_UINT32:
+                  fmtfn = fmtulong;
+                  break;
              case DFNT_INT32:
                   fmtfn = fmtlong;
                   break;

Deleted: packages/libhdf4/branches/upstream/current/install-sh
===================================================================
--- packages/libhdf4/branches/upstream/current/install-sh	2007-05-15 09:05:29 UTC (rev 830)
+++ packages/libhdf4/branches/upstream/current/install-sh	2007-05-15 09:53:05 UTC (rev 831)
@@ -1,243 +0,0 @@
-#!/bin/sh
-# $Id: install-sh,v 1.2 1996/12/11 21:50:49 acheng Exp $
-#
-# install - install a program, script, or datafile
-# This comes from X11R5.
-#
-# Calling this script install-sh is preferred over install.sh, to prevent
-# `make' implicit rules from creating a file called install from it
-# when there is no Makefile.
-#
-# This script is compatible with the BSD install script, but was written
-# from scratch.
-#
-
-
-# set DOITPROG to echo to test this script
-
-# Don't use :- since 4.3BSD and earlier shells don't like it.
-doit="${DOITPROG-}"
-
-
-# put in absolute paths if you don't have them in your path; or use env. vars.
-
-mvprog="${MVPROG-mv}"
-cpprog="${CPPROG-cp}"
-chmodprog="${CHMODPROG-chmod}"
-chownprog="${CHOWNPROG-chown}"
-chgrpprog="${CHGRPPROG-chgrp}"
-stripprog="${STRIPPROG-strip}"
-rmprog="${RMPROG-rm}"
-mkdirprog="${MKDIRPROG-mkdir}"
-
-tranformbasename=""
-transform_arg=""
-instcmd="$mvprog"
-chmodcmd="$chmodprog 0755"
-chowncmd=""
-chgrpcmd=""
-stripcmd=""
-rmcmd="$rmprog -f"
-mvcmd="$mvprog"
-src=""
-dst=""
-dir_arg=""
-
-# HDF specific change to set umask so that files are created others
-# accessible.
-umask 022
-
-while [ x"$1" != x ]; do
-    case $1 in
-	-c) instcmd="$cpprog"
-	    shift
-	    continue;;
-
-	-d) dir_arg=true
-	    shift
-	    continue;;
-
-	-m) chmodcmd="$chmodprog $2"
-	    shift
-	    shift
-	    continue;;
-
-	-o) chowncmd="$chownprog $2"
-	    shift
-	    shift
-	    continue;;
-
-	-g) chgrpcmd="$chgrpprog $2"
-	    shift
-	    shift
-	    continue;;
-
-	-s) stripcmd="$stripprog"
-	    shift
-	    continue;;
-
-	-t=*) transformarg=`echo $1 | sed 's/-t=//'`
-	    shift
-	    continue;;
-
-	-b=*) transformbasename=`echo $1 | sed 's/-b=//'`
-	    shift
-	    continue;;
-
-	*)  if [ x"$src" = x ]
-	    then
-		src=$1
-	    else
-		# this colon is to work around a 386BSD /bin/sh bug
-		:
-		dst=$1
-	    fi
-	    shift
-	    continue;;
-    esac
-done
-
-if [ x"$src" = x ]
-then
-	echo "install:	no input file specified"
-	exit 1
-else
-	true
-fi
-
-if [ x"$dir_arg" != x ]; then
-	dst=$src
-	src=""
-	
-	if [ -d $dst ]; then
-		instcmd=:
-	else
-		instcmd=mkdir
-	fi
-else
-
-# Waiting for this to be detected by the "$instcmd $src $dsttmp" command
-# might cause directories to be created, which would be especially bad 
-# if $src (and thus $dsttmp) contains '*'.
-
-	if [ -f $src -o -d $src ]
-	then
-		true
-	else
-		echo "install:  $src does not exist"
-		exit 1
-	fi
-	
-	if [ x"$dst" = x ]
-	then
-		echo "install:	no destination specified"
-		exit 1
-	else
-		true
-	fi
-
-# If destination is a directory, append the input filename; if your system
-# does not like double slashes in filenames, you may need to add some logic
-
-	if [ -d $dst ]
-	then
-		dst="$dst"/`basename $src`
-	else
-		true
-	fi
-fi
-
-## this sed command emulates the dirname command
-dstdir=`echo $dst | sed -e 's,[^/]*$,,;s,/$,,;s,^$,.,'`
-
-# Make sure that the destination directory exists.
-#  this part is taken from Noah Friedman's mkinstalldirs script
-
-# Skip lots of stat calls in the usual case.
-if [ ! -d "$dstdir" ]; then
-defaultIFS='	
-'
-IFS="${IFS-${defaultIFS}}"
-
-oIFS="${IFS}"
-# Some sh's can't handle IFS=/ for some reason.
-IFS='%'
-set - `echo ${dstdir} | sed -e 's@/@%@g' -e 's@^%@/@'`
-IFS="${oIFS}"
-
-pathcomp=''
-
-while [ $# -ne 0 ] ; do
-	pathcomp="${pathcomp}${1}"
-	shift
-
-	if [ ! -d "${pathcomp}" ] ;
-        then
-		$mkdirprog "${pathcomp}"
-	else
-		true
-	fi
-
-	pathcomp="${pathcomp}/"
-done
-fi
-
-if [ x"$dir_arg" != x ]
-then
-	$doit $instcmd $dst &&
-
-	if [ x"$chowncmd" != x ]; then $doit $chowncmd $dst; else true ; fi &&
-	if [ x"$chgrpcmd" != x ]; then $doit $chgrpcmd $dst; else true ; fi &&
-	if [ x"$stripcmd" != x ]; then $doit $stripcmd $dst; else true ; fi &&
-	if [ x"$chmodcmd" != x ]; then $doit $chmodcmd $dst; else true ; fi
-else
-
-# If we're going to rename the final executable, determine the name now.
-
-	if [ x"$transformarg" = x ] 
-	then
-		dstfile=`basename $dst`
-	else
-		dstfile=`basename $dst $transformbasename | 
-			sed $transformarg`$transformbasename
-	fi
-
-# don't allow the sed command to completely eliminate the filename
-
-	if [ x"$dstfile" = x ] 
-	then
-		dstfile=`basename $dst`
-	else
-		true
-	fi
-
-# Make a temp file name in the proper directory.
-
-	dsttmp=$dstdir/#inst.$$#
-
-# Move or copy the file name to the temp name
-
-	$doit $instcmd $src $dsttmp &&
-
-	trap "rm -f ${dsttmp}" 0 &&
-
-# and set any options; do chmod last to preserve setuid bits
-
-# If any of these fail, we abort the whole thing.  If we want to
-# ignore errors from any of these, just make sure not to ignore
-# errors from the above "$doit $instcmd $src $dsttmp" command.
-
-	if [ x"$chowncmd" != x ]; then $doit $chowncmd $dsttmp; else true;fi &&
-	if [ x"$chgrpcmd" != x ]; then $doit $chgrpcmd $dsttmp; else true;fi &&
-	if [ x"$stripcmd" != x ]; then $doit $stripcmd $dsttmp; else true;fi &&
-	if [ x"$chmodcmd" != x ]; then $doit $chmodcmd $dsttmp; else true;fi &&
-
-# Now rename the file to the real destination.
-
-	$doit $rmcmd -f $dstdir/$dstfile &&
-	$doit $mvcmd $dsttmp $dstdir/$dstfile 
-
-fi &&
-
-
-exit 0

Added: packages/libhdf4/branches/upstream/current/man/Makefile.am
===================================================================
--- packages/libhdf4/branches/upstream/current/man/Makefile.am	                        (rev 0)
+++ packages/libhdf4/branches/upstream/current/man/Makefile.am	2007-05-15 09:53:05 UTC (rev 831)
@@ -0,0 +1 @@
+man1_MANS = hdf.1 hdfunpac.1

Modified: packages/libhdf4/branches/upstream/current/man/Makefile.in
===================================================================
--- packages/libhdf4/branches/upstream/current/man/Makefile.in	2007-05-15 09:05:29 UTC (rev 830)
+++ packages/libhdf4/branches/upstream/current/man/Makefile.in	2007-05-15 09:53:05 UTC (rev 831)
@@ -1,177 +1,337 @@
-# ****************************************************************************
-# * NCSA HDF                                                                 *
-# * Software Development Group                                               *
-# * National Center for Supercomputing Applications                          *
-# * University of Illinois at Urbana-Champaign                               *
-# * 605 E. Springfield, Champaign IL 61820                                   *
-# *                                                                          *
-# * For conditions of distribution and use, see the accompanying             *
-# * hdf/COPYING file.                                                        *
-# *                                                                          *
-# ****************************************************************************
-#
-# $Id: Makefile.in,v 1.11 1998/03/06 14:08:54 bljones Exp $
-#
-# ##################################################################
-#
+# Makefile.in generated by automake 1.7.7 from Makefile.am.
+# @configure_input@
 
-### Start of system configuration section. ####
-# Set shell so we know what it is
-SHELL = /bin/sh
+# Copyright 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003
+# 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.
 
-# 'srcdir' Gets set to directory this Makefile is found in
-srcdir = .
-TOP_SRCDIR = ..
+# 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.
 
-prefix = $(TOP_SRCDIR)/NewHDF
+ at SET_MAKE@
 
-exec_prefix = $(prefix)
-tooldir = $(exec_prefix)/$(target)
+srcdir = @srcdir@
+top_srcdir = @top_srcdir@
+VPATH = @srcdir@
+pkgdatadir = $(datadir)/@PACKAGE@
+pkglibdir = $(libdir)/@PACKAGE@
+pkgincludedir = $(includedir)/@PACKAGE@
+top_builddir = ..
 
-program_transform_name =
+am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
+INSTALL = @INSTALL@
+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 = :
+host_triplet = @host@
+ACLOCAL = @ACLOCAL@
+AMDEP_FALSE = @AMDEP_FALSE@
+AMDEP_TRUE = @AMDEP_TRUE@
+AMTAR = @AMTAR@
+AR = @AR@
+AUTOCONF = @AUTOCONF@
+AUTOHEADER = @AUTOHEADER@
+AUTOMAKE = @AUTOMAKE@
+AWK = @AWK@
+CC = @CC@
+CCDEPMODE = @CCDEPMODE@
+CFLAGS = @CFLAGS@
+CPP = @CPP@
+CPPFLAGS = @CPPFLAGS@
+CXX = @CXX@
+CXXCPP = @CXXCPP@
+CXXDEPMODE = @CXXDEPMODE@
+CXXFLAGS = @CXXFLAGS@
+CYGPATH_W = @CYGPATH_W@
+DEFS = @DEFS@
+DEPDIR = @DEPDIR@
+DIFF = @DIFF@
+ECHO_C = @ECHO_C@
+ECHO_N = @ECHO_N@
+ECHO_T = @ECHO_T@
+EGREP = @EGREP@
+EXEEXT = @EXEEXT@
+F77 = @F77@
+FFLAGS = @FFLAGS@
+HDF_BUILD_FORTRAN_FALSE = @HDF_BUILD_FORTRAN_FALSE@
+HDF_BUILD_FORTRAN_TRUE = @HDF_BUILD_FORTRAN_TRUE@
+HDF_BUILD_XDR_FALSE = @HDF_BUILD_XDR_FALSE@
+HDF_BUILD_XDR_TRUE = @HDF_BUILD_XDR_TRUE@
+INSTALL_DATA = @INSTALL_DATA@
+INSTALL_PROGRAM = @INSTALL_PROGRAM@
+INSTALL_SCRIPT = @INSTALL_SCRIPT@
+INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
+LDFLAGS = @LDFLAGS@
+LEX = @LEX@
+LEXLIB = @LEXLIB@
+LEX_OUTPUT_ROOT = @LEX_OUTPUT_ROOT@
+LIBOBJS = @LIBOBJS@
+LIBS = @LIBS@
+LN_S = @LN_S@
+LTLIBOBJS = @LTLIBOBJS@
+MAINT = @MAINT@
+MAINTAINER_MODE_FALSE = @MAINTAINER_MODE_FALSE@
+MAINTAINER_MODE_TRUE = @MAINTAINER_MODE_TRUE@
+MAKEINFO = @MAKEINFO@
+NEQN = @NEQN@
+OBJEXT = @OBJEXT@
+PACKAGE = @PACKAGE@
+PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
+PACKAGE_NAME = @PACKAGE_NAME@
+PACKAGE_STRING = @PACKAGE_STRING@
+PACKAGE_TARNAME = @PACKAGE_TARNAME@
+PACKAGE_VERSION = @PACKAGE_VERSION@
+PATH_SEPARATOR = @PATH_SEPARATOR@
+RANLIB = @RANLIB@
+SET_MAKE = @SET_MAKE@
+SHELL = @SHELL@
+STRIP = @STRIP@
+TBL = @TBL@
+VERSION = @VERSION@
+YACC = @YACC@
+ac_ct_CC = @ac_ct_CC@
+ac_ct_CXX = @ac_ct_CXX@
+ac_ct_F77 = @ac_ct_F77@
+ac_ct_RANLIB = @ac_ct_RANLIB@
+ac_ct_STRIP = @ac_ct_STRIP@
+am__fastdepCC_FALSE = @am__fastdepCC_FALSE@
+am__fastdepCC_TRUE = @am__fastdepCC_TRUE@
+am__fastdepCXX_FALSE = @am__fastdepCXX_FALSE@
+am__fastdepCXX_TRUE = @am__fastdepCXX_TRUE@
+am__include = @am__include@
+am__leading_dot = @am__leading_dot@
+am__quote = @am__quote@
+bindir = @bindir@
+build = @build@
+build_alias = @build_alias@
+build_cpu = @build_cpu@
+build_os = @build_os@
+build_vendor = @build_vendor@
+datadir = @datadir@
+exec_prefix = @exec_prefix@
+host = @host@
+host_alias = @host_alias@
+host_cpu = @host_cpu@
+host_os = @host_os@
+host_vendor = @host_vendor@
+includedir = @includedir@
+infodir = @infodir@
+install_sh = @install_sh@
+libdir = @libdir@
+libexecdir = @libexecdir@
+localstatedir = @localstatedir@
+mandir = @mandir@
+oldincludedir = @oldincludedir@
+prefix = @prefix@
+program_transform_name = @program_transform_name@
+sbindir = @sbindir@
+sharedstatedir = @sharedstatedir@
+sysconfdir = @sysconfdir@
+target_alias = @target_alias@
+man1_MANS = hdf.1 hdfunpac.1
+subdir = man
+ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
+mkinstalldirs = $(SHELL) $(top_srcdir)/bin/mkinstalldirs
+CONFIG_HEADER = $(top_builddir)/hdf/src/h4config.h
+CONFIG_CLEAN_FILES =
+DIST_SOURCES =
 
-datadir = $(prefix)/lib
-mandir = $(prefix)/man
+NROFF = nroff
+MANS = $(man1_MANS)
+DIST_COMMON = $(srcdir)/Makefile.in Makefile.am
+all: all-am
+
+.SUFFIXES:
+$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ Makefile.am  $(top_srcdir)/configure.ac $(ACLOCAL_M4)
+	cd $(top_srcdir) && \
+	  $(AUTOMAKE) --foreign  man/Makefile
+Makefile: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.in  $(top_builddir)/config.status
+	cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)
+uninstall-info-am:
+
 man1dir = $(mandir)/man1
-man2dir = $(mandir)/man2
-man3dir = $(mandir)/man3
-man4dir = $(mandir)/man4
-man5dir = $(mandir)/man5
-man6dir = $(mandir)/man6
-man7dir = $(mandir)/man7
-man8dir = $(mandir)/man8
-man9dir = $(mandir)/man9
-docdir = $(datadir)/doc
+install-man1: $(man1_MANS) $(man_MANS)
+	@$(NORMAL_INSTALL)
+	$(mkinstalldirs) $(DESTDIR)$(man1dir)
+	@list='$(man1_MANS) $(dist_man1_MANS) $(nodist_man1_MANS)'; \
+	l2='$(man_MANS) $(dist_man_MANS) $(nodist_man_MANS)'; \
+	for i in $$l2; do \
+	  case "$$i" in \
+	    *.1*) list="$$list $$i" ;; \
+	  esac; \
+	done; \
+	for i in $$list; do \
+	  if test -f $(srcdir)/$$i; then file=$(srcdir)/$$i; \
+	  else file=$$i; fi; \
+	  ext=`echo $$i | sed -e 's/^.*\\.//'`; \
+	  case "$$ext" in \
+	    1*) ;; \
+	    *) ext='1' ;; \
+	  esac; \
+	  inst=`echo $$i | sed -e 's/\\.[0-9a-z]*$$//'`; \
+	  inst=`echo $$inst | sed -e 's/^.*\///'`; \
+	  inst=`echo $$inst | sed '$(transform)'`.$$ext; \
+	  echo " $(INSTALL_DATA) $$file $(DESTDIR)$(man1dir)/$$inst"; \
+	  $(INSTALL_DATA) $$file $(DESTDIR)$(man1dir)/$$inst; \
+	done
+uninstall-man1:
+	@$(NORMAL_UNINSTALL)
+	@list='$(man1_MANS) $(dist_man1_MANS) $(nodist_man1_MANS)'; \
+	l2='$(man_MANS) $(dist_man_MANS) $(nodist_man_MANS)'; \
+	for i in $$l2; do \
+	  case "$$i" in \
+	    *.1*) list="$$list $$i" ;; \
+	  esac; \
+	done; \
+	for i in $$list; do \
+	  ext=`echo $$i | sed -e 's/^.*\\.//'`; \
+	  case "$$ext" in \
+	    1*) ;; \
+	    *) ext='1' ;; \
+	  esac; \
+	  inst=`echo $$i | sed -e 's/\\.[0-9a-z]*$$//'`; \
+	  inst=`echo $$inst | sed -e 's/^.*\///'`; \
+	  inst=`echo $$inst | sed '$(transform)'`.$$ext; \
+	  echo " rm -f $(DESTDIR)$(man1dir)/$$inst"; \
+	  rm -f $(DESTDIR)$(man1dir)/$$inst; \
+	done
+tags: TAGS
+TAGS:
 
-INSTALL = ${TOP_SRCDIR}/install-sh -c
-INSTALL_PROGRAM = $(INSTALL)
-INSTALL_DATA = $(INSTALL) -m 644
+ctags: CTAGS
+CTAGS:
 
-# /usr/local/bin/m4 (GNU version?)
-M4   = /usr/local/bin/m4
-# /usr/local/bin/perl (GNU version?)
-PERL = /usr/local/bin/perl
+DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
 
-# Name of achive randomizer, usually ranlib (use 'touch' if non-existant)
-RANLIB = ranlib
+top_distdir = ..
+distdir = $(top_distdir)/$(PACKAGE)-$(VERSION)
 
-# Name of library archiver and flags to send, default 'AR=ar', 'ARFLAGS=r'
-AR = ar
-ARFLAGS = r
+distdir: $(DISTFILES)
+	@srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \
+	topsrcdirstrip=`echo "$(top_srcdir)" | sed 's|.|.|g'`; \
+	list='$(DISTFILES)'; for file in $$list; do \
+	  case $$file in \
+	    $(srcdir)/*) file=`echo "$$file" | sed "s|^$$srcdirstrip/||"`;; \
+	    $(top_srcdir)/*) file=`echo "$$file" | sed "s|^$$topsrcdirstrip/|$(top_builddir)/|"`;; \
+	  esac; \
+	  if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
+	  dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \
+	  if test "$$dir" != "$$file" && test "$$dir" != "."; then \
+	    dir="/$$dir"; \
+	    $(mkinstalldirs) "$(distdir)$$dir"; \
+	  else \
+	    dir=''; \
+	  fi; \
+	  if test -d $$d/$$file; then \
+	    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 $(MANS)
 
-# Name of remove utility, default 'RM=/bin/rm', 'RMFLAGS=-f'
-RM = /bin/rm
-RMFLAGS = -f
+installdirs:
+	$(mkinstalldirs) $(DESTDIR)$(man1dir)
+install: install-am
+install-exec: install-exec-am
+install-data: install-data-am
+uninstall: uninstall-am
 
-#Compilier defaults overriden by top level make
-AS = as
-CC = gcc
-CFLAGS = -ansi
-FC = f77
-FFLAGS=
+install-am: all-am
+	@$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
 
-# Set for document generation
-MAKEINFO = makeinfo
-TEXI2DVI = texi2dvi
+installcheck: installcheck-am
+install-strip:
+	$(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
+	  INSTALL_STRIP_FLAG=-s \
+	  `test -z '$(STRIP)' || \
+	    echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
+mostlyclean-generic:
 
-# The echo command.
-ECHO = echo
+clean-generic:
 
-# Directory in which to install scripts.
-bindir = $(exec_prefix)/bin
+distclean-generic:
+	-rm -f $(CONFIG_CLEAN_FILES)
 
-# Directory in which to install library files.
-libdir = $(prefix)/lib
+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
 
-# Directory in which to install include files.
-includedir = $(prefix)/include
+clean-am: clean-generic mostlyclean-am
 
-# Directory in which to install documentation info files.
-infodir = $(prefix)/info
+distclean: distclean-am
+	-rm -f Makefile
 
-#### ----- host and target specific makefile fragments come in here.-------
-### ------------------- end of makefile fragments -------------------------
+distclean-am: clean-am distclean-generic
 
-# ############# End of system configuration section. ###############
+dvi: dvi-am
 
-# ==> where is your HDF library (libdf.a) located?
-# ==> where are your hdf.h, hdfi.h and vg.h files located?
-HDFINC=$(srcdir)/../src
-HDFLIB=$(srcdir)/../src
-HDFSRC=$(srcdir)/../src
-HDFBIN=$(srcdir)/../bin
+dvi-am:
 
-# ==> where is your JPEG library (libjpeg.a) located?
-JPEGLIB=$(srcdir)/../jpeg
-JPEGINC=$(srcdir)/../jpeg
+info: info-am
 
-DISTFILES = $(MAN_NROFF_1) 
+info-am:
 
-# Man pages
-MAN_NROFF_1 = hdf.1 hdfunpac.1
-MAN_NROFF_3 =
+install-data-am: install-man
 
-all: docs
+install-exec-am:
 
-nofortran: all
+install-info: install-info-am
 
-rebuild:
-	true
+install-man: install-man1
 
-rebuildnofortran:
-	true
+installcheck-am:
 
-# Leave this target blank with no actions, the rebuild macros above depend on it
-force_rebuild:
+maintainer-clean: maintainer-clean-am
+	-rm -f Makefile
 
-install: install-man1 
+maintainer-clean-am: distclean-am maintainer-clean-generic
 
-install-man1: 
-	for p in $(MAN_NROFF_1); do \
-	    $(INSTALL_DATA) \
-		`pwd`/$$p $(man1dir)/`$(ECHO) $$p`; \
-	done
+mostlyclean: mostlyclean-am
 
-install-man3: 
-	for p in $(MAN_NROFF_3); do \
-	    $(INSTALL_DATA) \
-		`pwd`/$$p $(man3dir)/`$(ECHO) $$p`; \
-	done
+mostlyclean-am: mostlyclean-generic
 
-docs:
-	true
+pdf: pdf-am
 
-clean:
-	true
+pdf-am:
 
-distclean:
-	-$(RM) $(RMFLAGS) config.status Makefile
+ps: ps-am
 
-depend: 
-	 true
+ps-am:
 
-saber:	
-	true
+uninstall-am: uninstall-info-am uninstall-man
 
-# for distribution creation
-distdir = $(TOP_SRCDIR)/$(PACKAGE)-$(VERSION)/$(curdir)
-curdir = man
-dist: $(DISTFILES)
-	@for file in $(DISTFILES); do \
-	  ln $(srcdir)/$$file $(distdir)/$$file 2> /dev/null \
-	    || { echo copying $$file instead; \
-	    cp -p $(srcdir)/$$file $(distdir)/$$file;}; \
-	done
+uninstall-man: uninstall-man1
 
-help:
-	@echo ""
-	@echo "Make supports the following targets in the 'utilities' directory"
-	@echo "make help    - prints this usage section"
-	@echo "make all     - (DEFAULT) makes man pages"
-	@echo "make install - install HDF man pages "
-	@echo "make clean     - cleans up "
-	@echo "make distclean - cleans up including"
-	@echo "                 configuration(Makefiles,config.status,..)"
-	@echo ""
+.PHONY: all all-am check check-am clean clean-generic distclean \
+	distclean-generic distdir dvi dvi-am info info-am install \
+	install-am install-data install-data-am install-exec \
+	install-exec-am install-info install-info-am install-man \
+	install-man1 install-strip installcheck installcheck-am \
+	installdirs maintainer-clean maintainer-clean-generic \
+	mostlyclean mostlyclean-generic pdf pdf-am ps ps-am uninstall \
+	uninstall-am uninstall-info-am uninstall-man uninstall-man1
 
-# DO NOT DELETE THIS LINE -- make depend depends on it.
+# 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:

Added: packages/libhdf4/branches/upstream/current/mfhdf/Makefile.am
===================================================================
--- packages/libhdf4/branches/upstream/current/mfhdf/Makefile.am	                        (rev 0)
+++ packages/libhdf4/branches/upstream/current/mfhdf/Makefile.am	2007-05-15 09:53:05 UTC (rev 831)
@@ -0,0 +1,5 @@
+if HDF_BUILD_FORTRAN
+SUBDIRS=port fortran libsrc ncdump ncgen dumper hdfimport hdiff hrepack nctest
+else
+SUBDIRS=port libsrc ncdump ncgen dumper hdfimport hdiff hrepack nctest
+endif

Modified: packages/libhdf4/branches/upstream/current/mfhdf/Makefile.in
===================================================================
--- packages/libhdf4/branches/upstream/current/mfhdf/Makefile.in	2007-05-15 09:05:29 UTC (rev 830)
+++ packages/libhdf4/branches/upstream/current/mfhdf/Makefile.in	2007-05-15 09:53:05 UTC (rev 831)
@@ -1,732 +1,431 @@
-# $Id: Makefile.in,v 1.24 2000/08/30 00:11:10 wendling Exp $
-#
-#          Makefile to build netcdf library and utilities
-# NOTE: This Makefile.in is used by the Cygnus 'configure' script to
-#       generate the top level Makefile.
+# Makefile.in generated by automake 1.7.7 from Makefile.am.
+# @configure_input@
 
-# ############# Start of system configuration section. #############
+# Copyright 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003
+# 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.
 
-# 'srcdir' Gets set to directory this Makefile is found in
-srcdir = .
-TOP_SRCDIR = ..
+# 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.
 
-prefix = $(TOP_SRCDIR)/NewHDF
+ at SET_MAKE@
 
-exec_prefix = $(prefix)
-tooldir = $(exec_prefix)/$(target)
+srcdir = @srcdir@
+top_srcdir = @top_srcdir@
+VPATH = @srcdir@
+pkgdatadir = $(datadir)/@PACKAGE@
+pkglibdir = $(libdir)/@PACKAGE@
+pkgincludedir = $(includedir)/@PACKAGE@
+top_builddir = ..
 
-program_transform_name =
+am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
+INSTALL = @INSTALL@
+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 = :
+host_triplet = @host@
+ACLOCAL = @ACLOCAL@
+AMDEP_FALSE = @AMDEP_FALSE@
+AMDEP_TRUE = @AMDEP_TRUE@
+AMTAR = @AMTAR@
+AR = @AR@
+AUTOCONF = @AUTOCONF@
+AUTOHEADER = @AUTOHEADER@
+AUTOMAKE = @AUTOMAKE@
+AWK = @AWK@
+CC = @CC@
+CCDEPMODE = @CCDEPMODE@
+CFLAGS = @CFLAGS@
+CPP = @CPP@
+CPPFLAGS = @CPPFLAGS@
+CXX = @CXX@
+CXXCPP = @CXXCPP@
+CXXDEPMODE = @CXXDEPMODE@
+CXXFLAGS = @CXXFLAGS@
+CYGPATH_W = @CYGPATH_W@
+DEFS = @DEFS@
+DEPDIR = @DEPDIR@
+DIFF = @DIFF@
+ECHO_C = @ECHO_C@
+ECHO_N = @ECHO_N@
+ECHO_T = @ECHO_T@
+EGREP = @EGREP@
+EXEEXT = @EXEEXT@
+F77 = @F77@
+FFLAGS = @FFLAGS@
+HDF_BUILD_FORTRAN_FALSE = @HDF_BUILD_FORTRAN_FALSE@
+HDF_BUILD_FORTRAN_TRUE = @HDF_BUILD_FORTRAN_TRUE@
+HDF_BUILD_XDR_FALSE = @HDF_BUILD_XDR_FALSE@
+HDF_BUILD_XDR_TRUE = @HDF_BUILD_XDR_TRUE@
+INSTALL_DATA = @INSTALL_DATA@
+INSTALL_PROGRAM = @INSTALL_PROGRAM@
+INSTALL_SCRIPT = @INSTALL_SCRIPT@
+INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
+LDFLAGS = @LDFLAGS@
+LEX = @LEX@
+LEXLIB = @LEXLIB@
+LEX_OUTPUT_ROOT = @LEX_OUTPUT_ROOT@
+LIBOBJS = @LIBOBJS@
+LIBS = @LIBS@
+LN_S = @LN_S@
+LTLIBOBJS = @LTLIBOBJS@
+MAINT = @MAINT@
+MAINTAINER_MODE_FALSE = @MAINTAINER_MODE_FALSE@
+MAINTAINER_MODE_TRUE = @MAINTAINER_MODE_TRUE@
+MAKEINFO = @MAKEINFO@
+NEQN = @NEQN@
+OBJEXT = @OBJEXT@
+PACKAGE = @PACKAGE@
+PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
+PACKAGE_NAME = @PACKAGE_NAME@
+PACKAGE_STRING = @PACKAGE_STRING@
+PACKAGE_TARNAME = @PACKAGE_TARNAME@
+PACKAGE_VERSION = @PACKAGE_VERSION@
+PATH_SEPARATOR = @PATH_SEPARATOR@
+RANLIB = @RANLIB@
+SET_MAKE = @SET_MAKE@
+SHELL = @SHELL@
+STRIP = @STRIP@
+TBL = @TBL@
+VERSION = @VERSION@
+YACC = @YACC@
+ac_ct_CC = @ac_ct_CC@
+ac_ct_CXX = @ac_ct_CXX@
+ac_ct_F77 = @ac_ct_F77@
+ac_ct_RANLIB = @ac_ct_RANLIB@
+ac_ct_STRIP = @ac_ct_STRIP@
+am__fastdepCC_FALSE = @am__fastdepCC_FALSE@
+am__fastdepCC_TRUE = @am__fastdepCC_TRUE@
+am__fastdepCXX_FALSE = @am__fastdepCXX_FALSE@
+am__fastdepCXX_TRUE = @am__fastdepCXX_TRUE@
+am__include = @am__include@
+am__leading_dot = @am__leading_dot@
+am__quote = @am__quote@
+bindir = @bindir@
+build = @build@
+build_alias = @build_alias@
+build_cpu = @build_cpu@
+build_os = @build_os@
+build_vendor = @build_vendor@
+datadir = @datadir@
+exec_prefix = @exec_prefix@
+host = @host@
+host_alias = @host_alias@
+host_cpu = @host_cpu@
+host_os = @host_os@
+host_vendor = @host_vendor@
+includedir = @includedir@
+infodir = @infodir@
+install_sh = @install_sh@
+libdir = @libdir@
+libexecdir = @libexecdir@
+localstatedir = @localstatedir@
+mandir = @mandir@
+oldincludedir = @oldincludedir@
+prefix = @prefix@
+program_transform_name = @program_transform_name@
+sbindir = @sbindir@
+sharedstatedir = @sharedstatedir@
+sysconfdir = @sysconfdir@
+target_alias = @target_alias@
+ at HDF_BUILD_FORTRAN_TRUE@SUBDIRS = port fortran libsrc ncdump ncgen dumper hdfimport hdiff hrepack nctest
+ at HDF_BUILD_FORTRAN_FALSE@SUBDIRS = port libsrc ncdump ncgen dumper hdfimport hdiff hrepack nctest
+subdir = mfhdf
+ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
+mkinstalldirs = $(SHELL) $(top_srcdir)/bin/mkinstalldirs
+CONFIG_HEADER = $(top_builddir)/hdf/src/h4config.h
+CONFIG_CLEAN_FILES =
+DIST_SOURCES =
 
-datadir = $(prefix)/lib
-mandir = $(prefix)/man
-man1dir = $(mandir)/man1
-man2dir = $(mandir)/man2
-man3dir = $(mandir)/man3
-man4dir = $(mandir)/man4
-man5dir = $(mandir)/man5
-man6dir = $(mandir)/man6
-man7dir = $(mandir)/man7
-man8dir = $(mandir)/man8
-man9dir = $(mandir)/man9
-docdir = $(datadir)/doc
+RECURSIVE_TARGETS = info-recursive dvi-recursive pdf-recursive \
+	ps-recursive install-info-recursive uninstall-info-recursive \
+	all-recursive install-data-recursive install-exec-recursive \
+	installdirs-recursive install-recursive uninstall-recursive \
+	check-recursive installcheck-recursive
+DIST_COMMON = README $(srcdir)/Makefile.in INSTALL Makefile.am THANKS
+DIST_SUBDIRS = port fortran libsrc ncdump ncgen dumper hdfimport hdiff \
+	hrepack nctest
+all: all-recursive
 
-SHELL = /bin/sh
-
-INSTALL = ${TOP_SRCDIR}/install-sh -c
-INSTALL_PROGRAM = $(INSTALL)
-INSTALL_DATA = $(INSTALL) -m 644
-
-# /usr/local/bin/m4 (GNU version?)
-M4   = /usr/local/bin/m4
-# /usr/local/bin/perl (GNU version?)
-PERL = /usr/local/bin/perl
-
-# Name of achive randomizer, usually ranlib (use 'touch' if non-existant)
-RANLIB = ranlib
-
-# Name of library archiver and flags to send, default 'AR=ar', 'ARFLAGS=r'
-AR = ar
-ARFLAGS = rc
-
-# Name of remove utility, default 'RM=/bin/rm', 'RMFLAGS=-f'
-RM = /bin/rm
-RMFLAGS = -f
-
-AS = as
-CC = gcc
-CFLAGS = -ansi
-FC = f77
-FFLAGS=
-
-# Set for document generation
-MAKEINFO = makeinfo
-TEXI2DVI = texi2dvi
-
-# Directory in which to install binaries
-bindir = $(exec_prefix)/bin
-
-# Directory in which to install header files.
-includedir = $(prefix)/include
-
-# Directory in which to install library files.
-libdir = $(prefix)/lib
-
-# Directory in which to install documentation info files.
-infodir = $(prefix)/info
-
-# ------------ General Default Macros for NETCDF --------------------
-INCDIR	 = $(prefix)/include
-HDF_LIB  = $(TOP_SRCDIR)/hdf/src/libdf.a
-HDF_INC  = $(TOP_SRCDIR)/hdf/src/
-PABLO_HINC = $(TOP_SRCDIR)/hdf/pablo
-FMPOOL_INC = $(TOP_SRCDIR)/hdf/fmpool
-JPEG_LIB = $(TOP_SRCDIR)/hdf/jpeg/libjpeg.a
-NETCDF_INC = $(TOP_SRCDIR)/mfhdf/libsrc
-PORT_INC   = $(TOP_SRCDIR)/mfhdf/port
-CPP	   = $(CC) -E
-CFLAGS_NETCDF = 
-CPPFLAGS_HDF  = -DNDEBUG -DHDF $(FMPOOL_FLAGS)
-CPP_NETCDF    = -I. -I$(HDF_INC) -I$(FMPOOL_INC) -I$(NETCDF_INC) -I$(PORT_INC)
-CPPFLAGS_LIB	= $(SWAP) $(NETLONG) 
-CPPFLAGS_XDR	= $(CPP_XDR) 
-CPPFLAGS_NETCDF =  $(CPPFLAGS_XDR) $(CPP_NETCDF) $(CPPFLAGS_LIB) $(CPPFLAGS_HDF) 
-FFLAGS  =
-NCDUMP	= 
-NCGEN	= 
-NEQN	= neqn
-OS	= 
-TBL	= tbl
-WHICH	= which
-FTPDIR	= 
-VERSION	= 2.3.2
-LEX	= lex
-YACC	= yacc
-DIFF    = diff
-DIFF_FLAGS = -w
-
-#### ----- host and target specific makefile fragments come in here.-------
-### ------------------- end of makefile fragments -------------------------
-# ############# End of system configuration section. ###############
-
-#PACKAGE		= netcdf
-MANIFEST = $(DISTFILES)
-DISTFILES	= CHANGES COPYRIGHT CUSTOMIZE FAQ INSTALL  \
-		  Makefile.in ORIGIN README THANKS VERSION configure \
-		  configure.in aclocal.m4 msoft.mk
-SUBDIRS		= port doc fortran ncdump ncgen nctest libsrc xdr c++ dumper \
-		  pablo
-SUBDIR_TARGETS	= \
-    port/all	                             port/clean   port/distclean \
-    doc/all                  doc/install     doc/clean     doc/distclean \
-    fortran/all fortran/test fortran/install fortran/clean fortran/distclean \
-    ncdump/all  ncdump/test  ncdump/install  ncdump/clean  ncdump/distclean \
-    ncgen/all   ncgen/test   ncgen/install   ncgen/clean   ncgen/distclean \
-    nctest/all  nctest/test                  nctest/clean  nctest/distclean \
-    libsrc/all  libsrc/test  libsrc/install  libsrc/clean  libsrc/distclean \
-    xdr/all     xdr/test     xdr/install     xdr/clean     xdr/distclean \
-    c++/all                                  c++/clean    c++/distclean \
-    pablo/all                pablo/install   pablo/clean  pablo/distclean \
-    dumper/all  dumper/test  dumper/install  dumper/clean dumper/distclean \
-    ncdump/install-utils  ncgen/install-utils dumper/install-utils \
-    ncdump/install-man    ncgen/install-man   \
-    xdr/install-includes fortran/install-includes libsrc/install-includes
-
-all::		port/all xdr/all libsrc/all fortran/all ncdump/all \
-		ncgen/all nctest/all doc/all dumper/all pablo/all
-libmfhdf::	port/all xdr/all libsrc/all fortran/all 
-libmfhdf-inst::	port/all xdr/all libsrc/all fortran/all pablo/all
-test::		xdr/test libsrc/test nctest/test fortran/test ncdump/test \
-		ncgen/test dumper/test
-install::	xdr/install fortran/install libsrc/install ncdump/install \
-		ncgen/install doc/install dumper/install pablo/install
-install-libs::	xdr/install fortran/install libsrc/install  pablo/install
-install-includes::	xdr/install-includes fortran/install-includes libsrc/install-includes 
-install-utils:: ncdump/install-utils ncgen/install-utils dumper/install-utils
-install-man::   doc/install ncdump/install-man ncgen/install-man
-clean::		port/clean xdr/clean libsrc/clean fortran/clean ncdump/clean \
-		ncgen/clean nctest/clean doc/clean dumper/clean pablo/clean
-	rm -f netcdf*.tar.Z
-
-# This is the master.mk.in makefile.  It contains general rules.
-#
-
 .SUFFIXES:
-.SUFFIXES:	.so .o .i .c .fc .f .F .l .y
+$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ Makefile.am  $(top_srcdir)/configure.ac $(ACLOCAL_M4)
+	cd $(top_srcdir) && \
+	  $(AUTOMAKE) --foreign  mfhdf/Makefile
+Makefile: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.in  $(top_builddir)/config.status
+	cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)
+uninstall-info-am:
 
-# ###########################################################################
-# General Macros: (moved to make file fragment )
-# ###########################################################################
-#CPP		= @CPP@
-#NCDUMP		= @NCDUMP@
-#NCGEN		= @NCGEN@
-#NEQN		= @NEQN@
-#OS		= @OS@
-#TBL		= @TBL@
-#WHICH		= @WHICH@
+# 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):
+	@set fnord $$MAKEFLAGS; amf=$$2; \
+	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) \
+	   || case "$$amf" in *=*) exit 1;; *k*) fail=yes;; *) exit 1;; esac; \
+	done; \
+	if test "$$dot_seen" = "no"; then \
+	  $(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \
+	fi; test -z "$$fail"
 
-# ###########################################################################
-# Recursive Macros (command-line changes to others aren't supported):
-# ###########################################################################
-SUBDIR_MACROS = CC="$(CC)" \
-	CFLAGS="$(CFLAGS)" \
-	CPP="$(CPP)" \
-	FC="$(FC)" \
-    FFLAGS="$(FFLAGS)" 
+mostlyclean-recursive clean-recursive distclean-recursive \
+maintainer-clean-recursive:
+	@set fnord $$MAKEFLAGS; amf=$$2; \
+	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) \
+	   || case "$$amf" in *=*) exit 1;; *k*) fail=yes;; *) exit 1;; esac; \
+	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
 
-LOCAL_MACROS  = CC="$(CC)" \
-	CFLAGS="$(CFLAGS)" \
-	CPP="$(CPP)" \
-	CPPFLAGS="$(CPPFLAGS)" \
-	FC="$(FC)" \
-    FFLAGS="$(FFLAGS)" 
+ETAGS = etags
+ETAGSFLAGS =
 
-# ###########################################################################
-# Recursive make(1)s in Subdirectories:
-# ###########################################################################
+CTAGS = ctags
+CTAGSFLAGS =
 
-subdir_dummy_target $(SUBDIR_TARGETS):
-	@echo ""
-	@dir=`echo $@ | sed 's,/.*,,'`; \
-	    target=`echo $@ | sed "s,$$dir/,,"`; \
-	    cd $$dir && \
-	    echo "making \`$$target' in directory `pwd`" && \
-	    echo "" && \
-	    $(MAKE) $(MFLAGS) $(SUBDIR_MACROS) \
-		$$target || exit 1
-	@echo ""
-	@echo "returning to directory `pwd`"
-	@echo ""
+tags: TAGS
 
+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; } \
+	       END { for (i in files) print i; }'`; \
+	mkid -fID $$unique
 
-# ###########################################################################
-# Compilation:
-# ###########################################################################
-#FORTC		= @FORTC@
-
-# Compile FORTRAN code.
-#
-.f.o:
-	$(FC) -c $(FFLAGS) $<
-.F.o:
-	ln -s $< $$$$.c \
-	&& $(CPP) -DUD_FORTRAN_SOURCE $(CPPFLAGS) $(CPPFLAGS_NETCDF) $$$$.c \
-	    | sed '/^# *[0-9]/d' > $*.f \
-	|| (rm -f $*.f $$$$.c; exit 1) \
-	&& rm $$$$.c
-	$(FC) -c $(FFLAGS) $*.f
-.F.f:
-	ln -s $< $$$$.c \
-	&& $(CPP) -DUD_FORTRAN_SOURCE $(CPPFLAGS) $(CPPFLAGS_NETCDF) $$$$.c \
-	    | sed '/^# *[0-9]/d' > $@ \
-	|| (rm -f $@ $$$$.c; exit 1) \
-	&& rm $$$$.c
-
-# Generate FORTRAN-callable C code.
-#
-.fc.o:
-	$(FORTC) -O $(OS) $< > $*.c \
-	    || ( rm -f $*.c; exit 1)
-	$(CC) -c $(CFLAGS) $(CFLAGS_NETCDF) $(CPPFLAGS) $(CPPFLAGS_NETCDF) $*.c
-.fc.c:
-	$(FORTC) -O $(OS) $< > $@ \
-	    || (rm -f $*.c; exit 1)
-
-# Compile C code.
-#
-.c.o:
-	$(CC) -c $(CPPFLAGS) $(CPPFLAGS_NETCDF) $(CFLAGS) $(CFLAGS_NETCDF) $<
-
-# Compile lex(1) code.  This rule is here to ensure the use of CPPFLAGS.
-# 
-.l.o:
-	rm -f $*.c
-	$(LEX) -t $< > $*.c
-	$(CC) -c $(CPPFLAGS) $(CPPFLAGS_NETCDF) $(CFLAGS) $(CFLAGS_NETCDF) $*.c
-	rm $*.c
-
-# C preprocess.  
-#   NB: 
-#	1. The output `file' is not created but appears on standard output;
-#	2. Line numbering information is kept.
-#
-.c.i:
-	$(CPP) $(CPPFLAGS) $(CPPFLAGS_NETCDF) $<
-
-
-# ###########################################################################
-# Libraries:
-# ###########################################################################
-# RANLIB		= @RANLIB@
-LIBDIR		= $(prefix)/lib
-LIB_A		= lib$(LIBRARY).a
-
-library::		$(LIB_A)
-
-# The following rule is forced because the library can be created by a
-# makefile in another directory prior to the execution of the following rule.
-#
-$(LIB_A):		$(LIBOBJS) FORCE
-	$(AR) rcuv $@ $(LIBOBJS)
-	$(RANLIB) $@
-
-# The following rule is for those makefiles needing to install object
-# modules in a library in another directory.  They need only define 
-# REMOTE_LIBRARY and LIBOBJS.  The rule is forced for the same reason as the
-# $(LIB_A) rule.
-#
-lib_dummy $(REMOTE_LIBRARY):	$(LIBOBJS) FORCE
-	$(AR) rcuv $@ $(LIBOBJS)
-	$(RANLIB) $@
-
-installed_libfiles:	FORCE
-	@if [ -n "$(LIBFILES)" ]; then \
-	    libfiles="$(LIBFILES)"; \
-	    for libfile in $$libfiles; do \
-		$(MAKE) $(MFLAGS) $(LOCAL_MACROS) \
-		    LIBDIR=$(LIBDIR) LIBFILE=$$libfile \
-		    installed_libfile || exit 1; \
-	    done; \
+TAGS: tags-recursive $(HEADERS) $(SOURCES)  $(TAGS_DEPENDENCIES) \
+		$(TAGS_FILES) $(LISP)
+	tags=; \
+	here=`pwd`; \
+	if (etags --etags-include --version) >/dev/null 2>&1; then \
+	  include_option=--etags-include; \
 	else \
-	    :; \
-	fi
+	  include_option=--include; \
+	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)  $(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; } \
+	       END { for (i in files) print i; }'`; \
+	test -z "$(ETAGS_ARGS)$$tags$$unique" \
+	  || $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
+	     $$tags $$unique
 
-installed_library::	FORCE
-	@$(MAKE) $(MFLAGS) $(LOCAL_MACROS) \
-	    LIBDIR=$(LIBDIR) LIBFILE=$(LIB_A) \
-	    installed_libfile
+ctags: CTAGS
+CTAGS: ctags-recursive $(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; } \
+	       END { for (i in files) print i; }'`; \
+	test -z "$(CTAGS_ARGS)$$tags$$unique" \
+	  || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
+	     $$tags $$unique
 
-# The following target decouples the previous targets from the actual rule;
-# thus, eliminating extraneous make(1) messages.
-#
-installed_libfile:	$(LIBDIR)/$(LIBFILE)
+GTAGS:
+	here=`$(am__cd) $(top_builddir) && pwd` \
+	  && cd $(top_srcdir) \
+	  && gtags -i $(GTAGS_ARGS) $$here
 
-$(LIBDIR)/$(LIBFILE):	$(LIBDIR) $(LIBFILE)
-	$(INSTALL_DATA) $(LIBFILE) $@
+distclean-tags:
+	-rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
+DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
 
-dummy_libdir $(LIBDIR):
-	mkdir -p $@
-	chmod u+rwx,g+rws,o=rx $@
+top_distdir = ..
+distdir = $(top_distdir)/$(PACKAGE)-$(VERSION)
 
-LIB_SO		= lib$(LIBRARY).so.$(MAJOR_NO).$(MINOR_NO)
-LIB_SA		= lib$(LIBRARY).sa.$(MAJOR_NO).$(MINOR_NO)
-
-#library::		FORCE
-#	@so_objs=`echo $(LIBOBJS) | sed 's/\.o/.so/g'`; \
-#	if [ -z "$$so_objs" ]; then \
-#	    :; \
-#	else \
-#	    $(MAKE) $(MFLAGS) $(LIB_SO) \
-#		SO_OBJS="$$so_objs"; \
-#	fi
-#	@if [ -z "$(SA_OBJS)" ]; then \
-#	    :; \
-#	else \
-#	    $(MAKE) $(MFLAGS) $(LIB_SA); \
-#	fi
-
-$(LIB_SO):	$(SO_OBJS)
-	ld -assert pure-text $(SO_OBJS) -o $@
-$(LIB_SA):	$(SA_OBJS) FORCE
-	$(AR) rcuv $@ $(SA_OBJS)
-
-.fc.so:
-	$(FORTC) -O $(OS) $< > $*.c \
-	    || (rm -f $*.c; exit 1)
-	$(CC) -c -pic $(CFLAGS) $(CFLAGS_NETCDF) $(CPPFLAGS) $(CPPFLAGS_NETCDF) $*.c -o $$$$.o \
-	    || (rm -f $$$$.o; exit 1)
-	mv $$$$.o $@
-.c.so:
-	$(CC) -c -pic $(CFLAGS) $(CFLAGS_NETCDF) $(CPPFLAGS) $(CPPFLAGS_NETCDF) $< -o $$$$.o \
-	    || (rm -f $$$$.o; exit 1)
-	mv $$$$.o $@
-
-#installed_library::	$(LIBDIR)/$(LIB_SO)
-#	@if [ -z "$(SA_OBJS)" ]; then \
-#	    :; \
-#	else \
-#	    $(MAKE) $(MFLAGS) $(LIBDIR)/$(LIB_SA); \
-#	fi
-
-$(LIBDIR)/$(LIB_SO):	$(LIBDIR) $(LIB_SO)
-	$(INSTALL_DATA) $(LIB_SO) $(LIBDIR)/$(LIB_SO)
-$(LIBDIR)/$(LIB_SA):	$(LIBDIR) $(LIB_SA)
-	$(INSTALL_DATA) $(LIB_SA) $(LIBDIR)/$(LIB_SA)
-
-
-# ###########################################################################
-# Programs:
-# ###########################################################################
-BINDIR		= $(exec_prefix)/bin
-
-programs:	$(PROGRAMS)
-program:
-	@if [ -z "$(PROGRAM)" ]; then \
-	    : true; \
-	else \
-	    if [ -z "$(LIBRARY)" ]; then \
-		: true; \
-	    else \
-		$(MAKE) $(MFLAGS) $(LOCAL_MACROS) library; \
+distdir: $(DISTFILES)
+	@srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \
+	topsrcdirstrip=`echo "$(top_srcdir)" | sed 's|.|.|g'`; \
+	list='$(DISTFILES)'; for file in $$list; do \
+	  case $$file in \
+	    $(srcdir)/*) file=`echo "$$file" | sed "s|^$$srcdirstrip/||"`;; \
+	    $(top_srcdir)/*) file=`echo "$$file" | sed "s|^$$topsrcdirstrip/|$(top_builddir)/|"`;; \
+	  esac; \
+	  if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
+	  dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \
+	  if test "$$dir" != "$$file" && test "$$dir" != "."; then \
+	    dir="/$$dir"; \
+	    $(mkinstalldirs) "$(distdir)$$dir"; \
+	  else \
+	    dir=''; \
+	  fi; \
+	  if test -d $$d/$$file; then \
+	    if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
+	      cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \
 	    fi; \
-	    $(MAKE) $(MFLAGS) $(LOCAL_MACROS) $(PROGRAM); \
-	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 $(distdir)/$$subdir \
+	    || exit 1; \
+	    (cd $$subdir && \
+	      $(MAKE) $(AM_MAKEFLAGS) \
+	        top_distdir="$(top_distdir)" \
+	        distdir=../$(distdir)/$$subdir \
+	        distdir) \
+	      || exit 1; \
+	  fi; \
+	done
+check-am: all-am
+check: check-recursive
+all-am: Makefile
+installdirs: installdirs-recursive
+installdirs-am:
 
-dummy_prog $(PROGRAM):	$(OBJS)
-	@if [ -r $@.f -o -r $@.F ]; then \
-	    ld='$(FC) $(FFLAGS)'; \
-	else \
-	    ld='$(CC) $(CFLAGS) $(CFLAGS_NETCDF)'; \
-	fi; \
-	cmd="$$ld $(OBJS) $(LIBS) -o $@"; \
-	echo $$cmd; \
-	$$cmd \
-	    || (rm -f $@; exit 1)
+install: install-recursive
+install-exec: install-exec-recursive
+install-data: install-data-recursive
+uninstall: uninstall-recursive
 
-installed_programs:	FORCE
-	@$(MAKE) $(MFLAGS) $(LOCAL_MACROS) installed_binfiles \
-	    BINDIR=$(BINDIR) BINFILES="$(PROGRAMS)"
+install-am: all-am
+	@$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
 
-installed_binfiles:	FORCE
-	@if [ -n "$(BINFILES)" ]; then \
-	    binfiles="$(BINFILES)"; \
-	    for binfile in $$binfiles; do \
-		$(MAKE) $(MFLAGS) $(LOCAL_MACROS) \
-		    BINDIR=$(BINDIR) BINFILE=$$binfile \
-		    installed_binfile || exit 1; \
-	    done; \
-	else \
-	    :; \
-	fi
+installcheck: installcheck-recursive
+install-strip:
+	$(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
+	  INSTALL_STRIP_FLAG=-s \
+	  `test -z '$(STRIP)' || \
+	    echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
+mostlyclean-generic:
 
-installed_program:	FORCE
-	@$(MAKE) $(MFLAGS) $(LOCAL_MACROS) BINDIR=$(BINDIR) BINFILE=$(PROGRAM) \
-	    installed_binfile
+clean-generic:
 
-# The following target decouples the previous targets from the actual rule;
-# thus, eliminating extraneous make(1) messages.
-#
-installed_binfile:	$(BINDIR)/$(BINFILE)
+distclean-generic:
+	-rm -f $(CONFIG_CLEAN_FILES)
 
-$(BINDIR)/$(BINFILE):	$(BINDIR) $(BINFILE)
-	$(INSTALL_PROGRAM) $(BINFILE) $@
+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
 
-dummy_bindir $(BINDIR):
-	mkdir -p $@
-	chmod u+rwx,g+rws,o=rx $@
+clean-am: clean-generic mostlyclean-am
 
+distclean: distclean-recursive
+	-rm -f Makefile
+distclean-am: clean-am distclean-generic distclean-tags
 
-# ###########################################################################
-# Header files:
-# ###########################################################################
-installed_headers:	FORCE
-	@if [ -n "$(HEADERS)" ]; then \
-	    headers="$(HEADERS)"; \
-	    for header in $$headers; do \
-		$(MAKE) $(MFLAGS) $(LOCAL_MACROS) INCDIR=$(INCDIR) HEADER=$$header \
-		    installed_header || exit 1; \
-	    done; \
-	else \
-	    :; \
-	fi
+dvi: dvi-recursive
 
-# The following target decouples the previous targets from the actual rule;
-# thus, eliminating extraneous make(1) messages.
-#
-installed_header:	$(INCDIR)/$(HEADER)
+dvi-am:
 
-$(INCDIR)/$(HEADER):	$(INCDIR) $(HEADER)
-	$(INSTALL_DATA) $(HEADER) $@
+info: info-recursive
 
-dummy_incdir $(INCDIR):
-	mkdir -p $@
-	chmod u+rwx,g+rws,o=rx $@
+info-am:
 
+install-data-am:
 
-# ###########################################################################
-# `etc/' files:
-# ###########################################################################
-ETCDIR	= $(prefix)/etc
+install-exec-am:
 
-installed_etcfiles:
-	@if [ -n "$(ETCFILES)" ]; then \
-	    etcfiles="$(ETCFILES)"; \
-	    for etcfile in $$etcfiles; do \
-		$(MAKE) $(MFLAGS) $(LOCAL_MACROS) ETCDIR=$(ETCDIR) ETCFILE=$$etcfile \
-		    installed_etcfile || exit 1; \
-	    done; \
-	else \
-	    :; \
-	fi
+install-info: install-info-recursive
 
-# The following target decouples the previous targets from the actual rule;
-# thus, eliminating extraneous make(1) messages.
-#
-installed_etcfile:	$(ETCDIR)/$(ETCFILE)
+install-man:
 
-$(ETCDIR)/$(ETCFILE):	$(ETCDIR) $(ETCFILE)
-	-mkdir -p $(ETCDIR)
-	-chmod u+rwx,g+rws,o=rx $(ETCDIR)
-	$(INSTALL_DATA) $(ETCFILE) $@
+installcheck-am:
 
+maintainer-clean: maintainer-clean-recursive
+	-rm -f Makefile
+maintainer-clean-am: distclean-am maintainer-clean-generic
 
-# ###########################################################################
-# Manual Pages:
-# ###########################################################################
-MANDIR	= $(prefix)/man
+mostlyclean: mostlyclean-recursive
 
-installed_manuals:	FORCE
-	@if [ -n "$(MANUALS)" ]; then \
-	    manuals="$(MANUALS)"; \
-	    for manual in $$manuals; do \
-		mandir=$(MANDIR)/man`echo $$manual | sed 's/.*\.\(.\).*/\1/'`; \
-		$(MAKE) $(MFLAGS) $(LOCAL_MACROS) MANDIR=$$mandir MANUAL=$$manual \
-		    installed_manual || exit 1; \
-	    done; \
-	else \
-	    :; \
-	fi
+mostlyclean-am: mostlyclean-generic
 
-# The following target decouples the previous targets from the actual rule;
-# thus, eliminating extraneous make(1) messages.
-#
-installed_manual:	$(MANDIR)/$(MANUAL)
+pdf: pdf-recursive
 
-# The first sed(1) editing command in the following replaces the expanded
-# RCS keyword `$Date ...' in the `.TH' macro line with something more 
-# appropriate to a manual page.
-#
-$(MANDIR)/$(MANUAL):	$(MANDIR) $(MANUAL)
-	sed \
-	 -e '/^\.TH/s/$$D\ate: \([0-9]*\)\/\([0-9]*\)\/\([0-9]*\).*\$$/\1-\2-\3/'\
-	 $(MANUAL) | $(TBL) | $(NEQN) > $@
+pdf-am:
 
-dummy_mandir $(MANDIR):
-	mkdir -p $@
-	chmod u+rwx,g+rws,o=rx $@
+ps: ps-recursive
 
-# ###########################################################################
-# TeX-Info Pages:
-# ###########################################################################
-INFODIR       = $(prefix)/info
+ps-am:
 
-installed_infos:      FORCE
-	if [ -z "$(MAKEINFO)" ]; then \
-		echo 1>&2 "Can't install info(1) pages because no makeinfo(1)"; \
-	else \
-	  if [ -n "$(INFOS)" ]; then \
-	      infos="$(INFOS)"; \
-	      for info in $$infos; do \
-		$(MAKE) $(MFLAGS) $(LOCAL_MACROS) INFODIR=$(INFODIR) INFO=$$info \
-		installed_info || exit 1; \
-	      done; \
-	   else \
-	      :; \
-	   fi; \
-	fi;
-# The following target decouples the previous targets from the actual rule;
-# thus, eliminating extraneous make(1) messages.
-#
-installed_info:       $(INFODIR)/$(INFO)
+uninstall-am: uninstall-info-am
 
-$(INFODIR)/$(INFO):   $(INFODIR) $(INFO)
-	-mkdir -p $(INFODIR)
-	-chmod u+rwx,g+rws,o=rx $(INFODIR)
-	$(INSTALL_DATA) $(INFO) $@
+uninstall-info: uninstall-info-recursive
 
-# Rules for generating info pages:
-#
-.SUFFIXES:    .info .texi .texinfo .txn
-.texi.info:
-	@if [ -z "$(MAKEINFO)" ]; then \
-	  echo 1>&2 "Can't create $@ because no makeinfo(1)"; \
-	else \
-	  $(MAKEINFO) $< --no-split --output=$@; \
-	fi
-.texinfo.info:
-	@if [ -z "$(MAKEINFO)" ]; then \
-	  echo 1>&2 "Can't create $@ because no makeinfo(1)"; \
-	else \
-	  $(MAKEINFO) $< --no-split --output=$@; \
-	fi
-.txn.info:
-	@if [ -z "$(MAKEINFO)" ]; then \
-	  echo 1>&2 "Can't create $@ because no makeinfo(1)"; \
-	else \
-	  $(MAKEINFO) $< --no-split --output=$@; \
-	fi
+.PHONY: $(RECURSIVE_TARGETS) CTAGS GTAGS all all-am check check-am clean \
+	clean-generic clean-recursive ctags ctags-recursive distclean \
+	distclean-generic distclean-recursive distclean-tags distdir \
+	dvi dvi-am dvi-recursive info info-am info-recursive install \
+	install-am install-data install-data-am install-data-recursive \
+	install-exec install-exec-am install-exec-recursive \
+	install-info install-info-am install-info-recursive install-man \
+	install-recursive install-strip installcheck installcheck-am \
+	installdirs installdirs-am installdirs-recursive \
+	maintainer-clean maintainer-clean-generic \
+	maintainer-clean-recursive mostlyclean mostlyclean-generic \
+	mostlyclean-recursive pdf pdf-am pdf-recursive ps ps-am \
+	ps-recursive tags tags-recursive uninstall uninstall-am \
+	uninstall-info-am uninstall-info-recursive uninstall-recursive
 
-# Ensure that info page depends on canonical TeX-Info macros.
-#
-dummy_info $(INFO):   texinfo.tex
-
-# ###########################################################################
-# Cleanup:
-# ###########################################################################
-clean::
-	rm -f $(GARBAGE) $(PROGRAM) a.out core *.o *.a *.so.* *.sa.* *.so \
-	    *.log
-
-realclean::	distclean
-distclean::
-	rm -f $(GARBAGE) $(PROGRAM) a.out core *.o *.a *.so.* *.sa.* *.so \
-	    *.log Makefile config.status cc_id tags
-
-
-# ###########################################################################
-# Configuration:
-# ###########################################################################
-
-# The following target is touched because config.status won't update it if
-# it hasn't changed.
-#
-# The following is commented-out because the HPUX make(1) goes into a loop.
-#
-#Makefile:	config.status
-#	./config.status
-#	touch $@
-
-config.status:	cc_id configure
-	./configure --no-create
-
-cc_id:		FORCE
-	if test -r $@ && test "`cat $@`" = "$(CC)"; then \
-	    :; \
-	else \
-	    echo "$(CC)" > $@; \
-	fi
-
-configure:		configure.in
-	autoconf
-
-
-# ###########################################################################
-# Dependency maintenance:
-# ###########################################################################
-.PRECIOUS:	depend
-#
-# Note: The following rule will only work if the C compiler behaves correctly
-# when given the `-M' option.  AIX's cc(1) and SunOS's acc(1) behave
-# incorrectly.  --Steve Emmerson 1992-09-24
-#
-# Furthermore, we do not attempt to maintain dependencies on installed
-# header files (e.g. those in $(INCDIR)) for two reasons: 1) the dependency
-# list generated at Unidata mightn't correspond to the situation at a client
-# site; and 2) clients using broken compilers (c.f. previous note) can't
-# regenerate the dependency list.
-#
-disabled_depend:		FORCE
-	-incdir=`echo $(INCDIR) | sed s',/,\\\/,g'`; \
-	cc -M $(CPPFLAGS) $(CPPFLAGS_NETCDF) *.c 2> /dev/null | \
-	    awk '{ \
-		if ($$0 ~ /:/) { \
-		    target	= $$1; \
-		    if (target ~ /:/) { \
-			target	= substr(target,1,length(target)-1); \
-			start	= 2; \
-		    } else { \
-			start	= 3; \
-		    } \
-		} else { \
-		    start	= 1; \
-		} \
-		for (i = start; i <= NF; ++i) { \
-		    if ($$i !~ /^\\/ && \
-			$$i !~ /port\// && \
-			$$i !~ /^\//) \
-			print target ": " $$i \
-		} \
-	    }' > $@
-	tag='### DO NOT DELETE THIS LINE.  make depend DEPENDS ON IT ###'; \
-	    sed -e "/^$$tag$$/r depend" \
-		-e "/^$$tag$$/q" Makefile > Makefile.new
-	mv Makefile.new Makefile
-
-
-# ###########################################################################
-# Distributions:
-# ###########################################################################
-#FTPDIR		= @FTPDIR@
-#VERSION		= @VERSION@
-
-ftp:		$(FTPDIR)/$(PACKAGE)-$(VERSION).tar.Z
-	test ! -h $(FTPDIR)/$(PACKAGE).tar.Z && exit 0; \
-	cd $(FTPDIR) || exit 1; \
-	rm $(PACKAGE).tar.Z || exit 1; \
-	ln -s $(PACKAGE)-$(VERSION).tar.Z $(PACKAGE).tar.Z;
-
-$(FTPDIR)/$(PACKAGE)-$(VERSION).tar.Z:	$(PACKAGE)-$(VERSION).tar.Z
-	cp $(PACKAGE)-$(VERSION).tar.Z $@ 
-	chmod u+rw,g+rw,o=r $@
-
-tar.Z:		$(PACKAGE)-$(VERSION).tar.Z
-
-$(PACKAGE)-$(VERSION).tar.Z:	MANIFEST
-	dir=`basename \`pwd\`` \
-	&& id=$(PACKAGE)-$(VERSION) \
-	&& cd .. \
-	&& ln -s $$dir $$id \
-	&& tar -chof - `sed "s|^|$$id/|" $$id/MANIFEST` \
-	    | compress > $$id/$@ \
-	&& rm $$id
-
-MANIFEST:	FORCE
-	@echo 1>&2 Creating MANIFEST
-	@$(MAKE) -s $(MFLAGS) $(LOCAL_MACROS) MANIFEST.echo > $@
-
-MANIFEST.echo:	FORCE
-	@$(MAKE) -s $(MFLAGS) $(LOCAL_MACROS) \
-	    MANIFEST=`echo $(MANIFEST) | sed 's/MANIFEST//'` \
-	    ensure_manifest > /dev/null
-	@echo $(MANIFEST) | fmt -1
-	@if [ -n "$(SUBDIRS)" ]; then \
-	    subdirs="$(SUBDIRS)"; \
-	    for subdir in $$subdirs; do \
-		(cd $$subdir && \
-	        echo 1>&2 Creating $@ in `pwd` && \
-		$(MAKE) $(MFLAGS) $(LOCAL_MACROS) MANIFEST.echo | \
-		    sed "s|^|$$subdir/|") || exit 1; \
-	    done; \
-	else \
-	    :; \
-	fi
-
-ensure_manifest:	$(MANIFEST)
-
-# for distribution creation
-distdir = $(TOP_SRCDIR)/$(PACKAGE)-$(VERSION)/$(curdir)
-curdir = mfhdf
-dist: $(DISTFILES)
-	@for file in $(DISTFILES); do \
-	  ln $(srcdir)/$$file $(distdir)/$$file 2> /dev/null \
-	    || { echo copying $$file instead; \
-	    cp -p $(srcdir)/$$file $(distdir)/$$file;}; \
-	done
-	for subdir in $(SUBDIRS); do \
-	  echo making $@ in $$subdir; \
-	  mkdir $(distdir)/$$subdir || exit 1; \
-	  (cd $$subdir && $(MAKE) $@) || exit 1; \
-	done
-
-# ###########################################################################
-# Miscellaneous:
-# ###########################################################################
-
-# The following dummy target is useful as a dependency to ensure that a
-# rule is always executed.
-#
-FORCE:
-
-
-# The `distclean' target appears after the master makefile to prevent
-# making `distclean' in the subdirectories before making `clean'.
-#
-distclean::	port/distclean  \
-		doc/distclean \
-		fortran/distclean \
-		ncdump/distclean \
-		dumper/distclean \
-		ncgen/distclean \
-		nctest/distclean \
-		libsrc/distclean \
-		xdr/distclean \
-		c++/distclean
+# 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:

Deleted: packages/libhdf4/branches/upstream/current/mfhdf/Makefile.in_orig
===================================================================
--- packages/libhdf4/branches/upstream/current/mfhdf/Makefile.in_orig	2007-05-15 09:05:29 UTC (rev 830)
+++ packages/libhdf4/branches/upstream/current/mfhdf/Makefile.in_orig	2007-05-15 09:53:05 UTC (rev 831)
@@ -1,47 +0,0 @@
-# $Id: Makefile.in_orig,v 1.1 1996/03/28 20:57:16 georgev Exp $
-#
-#          Makefile to build netcdf library and utilities
-
-
-PACKAGE		= netcdf
-MANIFEST	= CHANGES COPYRIGHT CUSTOMIZE FAQ INSTALL MANIFEST \
-		  Makefile.in ORIGIN README THANKS VERSION configure \
-		  configure.in aclocal.m4 msoft.mk
-SUBDIRS		= port doc fortran ncdump ncgen nctest libsrc xdr c++ dumper
-SUBDIR_TARGETS	= \
-    port/all	                             port/clean   port/distclean \
-    doc/all                  doc/install     doc/clean     doc/distclean \
-    fortran/all fortran/test fortran/install fortran/clean fortran/distclean \
-    ncdump/all  ncdump/test  ncdump/install  ncdump/clean  ncdump/distclean \
-    ncgen/all   ncgen/test   ncgen/install   ncgen/clean   ncgen/distclean \
-    nctest/all  nctest/test                  nctest/clean  nctest/distclean \
-    libsrc/all  libsrc/test  libsrc/install  libsrc/clean  libsrc/distclean \
-    xdr/all     xdr/test     xdr/install     xdr/clean     xdr/distclean \
-    c++/all                                  c++/clean    c++/distclean \
-    dumper/all	             dumper/install  dumper/clean dumper/distclean
-
-all::		port/all xdr/all libsrc/all fortran/all ncdump/all \
-		ncgen/all nctest/all doc/all dumper/all
-test::		xdr/test libsrc/test nctest/test fortran/test ncdump/test \
-		ncgen/test
-install::	xdr/install fortran/install libsrc/install ncdump/install \
-		ncgen/install doc/install dumper/install
-clean::		port/clean xdr/clean libsrc/clean fortran/clean ncdump/clean \
-		ncgen/clean nctest/clean doc/clean dumper/clean
-	rm -f netcdf*.tar.Z
-
-include port/master.mk
-
-# The `distclean' target appears after the master makefile to prevent
-# making `distclean' in the subdirectories before making `clean'.
-#
-distclean::	port/distclean  \
-		doc/distclean \
-		fortran/distclean \
-		ncdump/distclean \
-		dumper/distclean \
-		ncgen/distclean \
-		nctest/distclean \
-		libsrc/distclean \
-		xdr/distclean \
-		c++/distclean

Added: packages/libhdf4/branches/upstream/current/mfhdf/README.HDF.33
===================================================================
--- packages/libhdf4/branches/upstream/current/mfhdf/README.HDF.33	                        (rev 0)
+++ packages/libhdf4/branches/upstream/current/mfhdf/README.HDF.33	2007-05-15 09:53:05 UTC (rev 831)
@@ -0,0 +1,41 @@
+This directory contains the HDF/netCDF part of HDF3.3r3
+and Unidata netCDF v2.3.2. The hdf-related programs are
+in libsrc/ and fortran/.
+
+To install HDF/netCDF, you need to edit the file CUSTOMIZE 
+to point at the correct locations for the HDF include files 
+and the base HDF library (i.e. by setting the variables
+HDF_INC and HDF_LIB).
+
+Then all you should have to do is run the script file configure
+(just type: ./configure) and it should set up all the Makefiles
+correctly. A 'make' followed by a 'make test' should build
+the libraries and run the tests.  This works for all 'UNIX'
+platforms including the HP and Cray.
+
+For some older CONVEX systems where the command "uname" is missing,
+you need to setenv for MACHINE (just type: setenv MACHINE C3 )
+before running ./configure.
+
+For SGI R8000 running IRIX_6.0, currently we support 32-bit mode only.
+You need to add -32 option in CFLAGS and FFLAGS in CUSTOMIZE file.
+
+Change:
+
+    CFLAGS=-O 
+    FFLAGS=-O
+
+to:
+
+    CFLAGS="-O -32"
+    FFLAGS="-O -32"
+
+For SOLARIS 2.3 (SunOS 5.2), you need to run ./configure and then edit
+the Makefile in the fortran/ subdirectory so that FFLAG = -xl.
+
+The INSTALL file in this directory and the README files in
+this and subdirectories are good references for netCDF and
+XDR related issues. 
+
+Make.com files are provided in each subdirectory for VMS 
+platforms. 

Deleted: packages/libhdf4/branches/upstream/current/mfhdf/aclocal.m4
===================================================================
--- packages/libhdf4/branches/upstream/current/mfhdf/aclocal.m4	2007-05-15 09:05:29 UTC (rev 830)
+++ packages/libhdf4/branches/upstream/current/mfhdf/aclocal.m4	2007-05-15 09:53:05 UTC (rev 831)
@@ -1,270 +0,0 @@
-define(diversion_number, divnum)dnl
-divert(-1)
-
-
-# Check for fill value usage.
-#
-define(UL_FILLVALUES, [dnl
-echo checking for fill value usage
-if test "${OLD_FILLVALUES-}" = yes; then
-    OLD_FILLVALUES=1
-    AC_DEFINE(OLD_FILLVALUES)
-else
-    OLD_FILLVALUES=0
-fi
-AC_SUBST(OLD_FILLVALUES)dnl
-UC_CREATE(libsrc/netcdf.h)dnl
-])
-
-
-# Check endianness.
-#
-define(UL_SWAP, [dnl
-echo checking endianess
-SWAP=
-AC_TEST_PROGRAM([main() {
-    long i = 0;
-    char *ip = (char*)&i;
-    *ip       = 'a';
-    exit(i != 'a'); /* false if little endian or sizeof(long) == sizeof(char) */
-}], [SWAP=-DSWAP])dnl
-AC_SUBST(SWAP)dnl
-])
-
-
-# Check type of 32-bit `network long' integer.
-#
-define([UL_NETLONG], [dnl
-AC_REQUIRE([UC_OS])dnl
-if test "$OS" = unicos; then
-NETLONG=
-else
-echo checking type of netlong
-AC_TEST_PROGRAM([main() {exit(sizeof(long) == 4);}],
-[NETLONG='-DNETLONG=int'], [NETLONG=])
-fi
-AC_SUBST(NETLONG)dnl
-])
-
-
-# Check for XDR header-file directory.
-#
-define(UL_CPP_XDR, [dnl
-echo checking for XDR header-file
-AC_REQUIRE([UC_PREFIX])dnl
-AC_PROVIDE([$0])dnl
-UC_TEST_DIR(CPP_XDR, /usr/[[include]]/rpc /usr/local/[[include]]/rpc \
-    $prefix/[[include]] UC_ABSPATH(xdr), xdr.h,
-    XDR [[[include]]]-directory, -I/usr/[[[include]]]/rpc)dnl
-if test -n "${CPP_XDR-}"; then
-  CPP_XDR=-I${CPP_XDR}
-fi
-])
-
-
-# Ensure a valid XDR library.
-#
-define(UL_LIB_XDR, [dnl
-echo checking XDR library
-AC_REQUIRE([UC_OS])dnl
-AC_PROVIDE([$0])dnl
-case "${OS}" in
-  irix*)	LD_XDR=-lsun
-#                UC_ENSURE(HDF_INC, -DIRIS4)
-                UC_ENSURE(HDF_INC, -cckr);;
-  ultrix*)	LD_XDR=
-#                UC_ENSURE(HDF_INC, -DMIPSEL);;
-  unicos*)	LD_XDR=
-		UC_ENSURE(CPPFLAGS, -DBIG_SHORTS -DBIG_LONGS)
-#                UC_ENSURE(HDF_INC, -DUNICOS);;
-  aix*)         
-#               UC_ENSURE(HDF_INC, -DIBM6000)
-                LD_XDR=;;
-  sunos*)       
-#               UC_ENSURE(HDF_INC, -DSUN)
-                LD_XDR=;;
-  hpux*)        
-#               UC_ENSURE(HDF_INC, -DHP9000)
-                if test -z "$GCC"; then
-                        UC_ENSURE(CPPFLAGS, -Aa)
-                fi
-                LD_XDR=;;
-  osf*)         
-#               UC_ENSURE(HDF_INC, -DDEC_ALPHA)
-		UC_ENSURE(CPPFLAGS, -DBIG_LONGS)
-		UC_ENSURE(CPPFLAGS, -std1)
-                LD_XDR=;;
-  convex*)      
-#               UC_ENSURE(HDF_INC, -DCONVEX)
-                LD_XDR=;;
-  *)		LD_XDR=;;
-esac
-UC_ENSURE(DEFS, ${CPP_XDR-})dnl
-UC_ENSURE(DEFS, ${CPPFLAGS-})dnl
-UC_ENSURE(LIBS, ${LD_XDR-})dnl
-AC_TEST_PROGRAM(dnl
-[
-#undef NDEBUG
-
-#ifdef _AIX
-#   ifndef _ALL_SOURCE
-#     define _ALL_SOURCE
-#   endif
-#endif
-
-#include <assert.h>
-#include <stdio.h>
-#include <types.h>
-#include <xdr.h>
-
-#define TESTFILE	"conftest.xdr"
-#define EPSILON		.0005
-#ifndef FLT_MIN
-#   define    FLT_MIN 1e-37           /* Standard C maximum */
-#endif
-#ifndef FLT_EPSILON
-#   define FLT_EPSILON        1e-5            /* Standard C maximum */
-#endif
-
-main(ac,av)
-    int			ac ;
-    char		*av[] ;
-{
-    int			ii, jj	= 0 ;
-    char		*fname	= ac > 1 ? av[1] : TESTFILE;
-    FILE		*F	= fopen(fname,"w");
-    XDR			xdrs[1] ;
-    unsigned int	count ;
-    unsigned int	szof ;
-
-    /*
-     * The last value below should be a subnormal number on a DECstation,
-     * RS6000, and SPARCstation.  Hopefully, it will catch bad xdr(3)
-     * implementations (such as a VAXstation's) which don't correctly handle
-     * such values.  Such a value should be the last one in the list.
-     */
-    static float	floats[]	= { 100.125, 100.25, 100.375, 
-					    100.5, 100.625, FLT_MIN/32 } ;
-    float *fp , got_af[sizeof(floats)/sizeof(floats[0])] ;
-
-/* create */
-
-    if( F == NULL)
-    {
-	    perror("fopen failed") ;
-	    exit(-1) ;
-    }
-    xdrstdio_create(xdrs, F, XDR_ENCODE) ;
-
-/* populate */
-
-    szof = sizeof(float) ;
-    count = sizeof(floats)/sizeof(float) ;
-    assert( xdr_vector(xdrs, (char *)floats, count, szof, xdr_float)) ;
-
-/* flush, rewind  and reopen */
-
-    assert(fflush((FILE *)xdrs->x_private) != EOF) ; /* xdr_destroy(xdrs) */
-
-    assert(fclose(F) != EOF) ;
-    F = fopen(fname,"r") ;
-    if( F == NULL)
-    {
-	    perror("fopen failed") ;
-	    exit(-1) ;
-    }
-    xdrstdio_create(xdrs, F, XDR_DECODE) ;
-
-/* check */
-
-    szof = sizeof(float) ;
-    count = sizeof(floats)/sizeof(float) ;
-    assert( xdr_vector(xdrs, (char *)got_af, count, szof, xdr_float)) ;
-    for(ii = 0, fp = got_af;
-	ii < count - 1;
-	ii++, fp++) 
-    {
-	assert(*fp <= floats[ii]*(1+FLT_EPSILON) && *fp >= floats[ii]*(1-FLT_EPSILON)) ;
-    }
-    assert(*fp == 0 || (*fp <= floats[ii]*(1+FLT_EPSILON) && *fp >= floats[ii]*(1-FLT_EPSILON))) ;
-
-    exit(0) ;
-}
-],dnl
-XDR_LIBOBJS=
-XDR_INSTALL_DEPS=,dnl
-XDR_LIBOBJS="xdr.o xdrfloat.o xdrstdio.o xdrarray.o"
-XDR_INSTALL_DEPS=installed_headers
-LD_XDR=)dnl
-AC_SUBST(XDR_LIBOBJS)dnl
-AC_SUBST(XDR_INSTALL_DEPS)dnl
-AC_SUBST(LD_XDR)dnl
-])
-
-
-# Check for XDR implementation (header file and library).
-#
-define(UL_XDR, [dnl
-AC_REQUIRE([UL_CPP_XDR])dnl
-AC_REQUIRE([UL_LIB_XDR])dnl
-])
-
-
-# Define C macros for function prototyping
-#
-define([UL_PROTOTYPES],
-[AC_COMPILE_CHECK([function prototypes], ,
-extern int foo(int bar);
-, dnl
-, dnl
-[UC_ENSURE(CPPFLAGS, -DNO_HAVE_PROTOTYPES)])])
-
-
-# Check for functioning `const' keyword
-#
-define(UL_CONST,
-[AC_COMPILE_CHECK([working const], , [/* Ultrix mips cc rejects this.  */
-typedef int charset[2]; const charset x;
-], dnl
-, dnl
-[UC_ENSURE(CPPFLAGS, -Dconst=)])])
-
-
-# Define macros for variadic function support
-#
-define(UL_VARIADIC_FUNCTIONS,[dnl
-AC_PROVIDE([$0])dnl
-AC_REQUIRE([UC_PROG_CPP])dnl
-AC_COMPILE_CHECK([variadic function support], , [} 
-#include <stdarg.h>
-int foo(int bar, ...) {
-    va_list     alist;
-    va_start(alist, bar);
-    bar = (int)va_arg(alist, int);
-    va_end(alist);
-    return bar;
-], dnl
-, dnl
-[UC_ENSURE(CPPFLAGS, -DNO_STDARG)])])
-
-
-# Check for strerror().
-#
-define(UL_STRERROR, [dnl
-AC_REQUIRE([UC_PROG_FC])dnl
-if test `$WHICH "${FC-}" | wc -w` != 1; then
-AC_FUNC_CHECK(strerror, , [[UC_ENSURE(CPPFLAGS, -DNO_STRERROR)]])dnl
-else
-  echo checking for strerror
-  echo '       CALL STRERROR' > conftest.f
-  if eval "$FC conftest.f > /dev/null 2>&1"; then
-    : true
-  else
-    UC_ENSURE(CPPFLAGS, -DNO_STRERROR)dnl
-  fi
-  rm -rf a.out conftest.f
-fi
-])
-
-
-divert(diversion_number)dnl

Modified: packages/libhdf4/branches/upstream/current/mfhdf/c++/ncvalues.cc
===================================================================
--- packages/libhdf4/branches/upstream/current/mfhdf/c++/ncvalues.cc	2007-05-15 09:05:29 UTC (rev 830)
+++ packages/libhdf4/branches/upstream/current/mfhdf/c++/ncvalues.cc	2007-05-15 09:53:05 UTC (rev 831)
@@ -4,7 +4,7 @@
  *
  *   Purpose:	implementation of classes of typed arrays for netCDF
  *
- *   $Header: /afs/ncsa/projects/hdf/cvs/dist/mfhdf/c++/ncvalues.cc,v 1.2 1993/04/30 20:29:40 koziol Exp $
+ *   $Header: /afs/ncsa/projects/hdf/cvs/hdf4/mfhdf/c++/ncvalues.cc,v 1.2 1993/04/30 20:29:40 koziol Exp $
  *********************************************************************/
 
 #include <iostream.h>		// for debugging

Modified: packages/libhdf4/branches/upstream/current/mfhdf/c++/ncvalues.hh
===================================================================
--- packages/libhdf4/branches/upstream/current/mfhdf/c++/ncvalues.hh	2007-05-15 09:05:29 UTC (rev 830)
+++ packages/libhdf4/branches/upstream/current/mfhdf/c++/ncvalues.hh	2007-05-15 09:53:05 UTC (rev 831)
@@ -4,7 +4,7 @@
  *
  *   Purpose:	interface for classes of typed arrays for netCDF
  *
- *   $Header: /afs/ncsa/projects/hdf/cvs/dist/mfhdf/c++/ncvalues.hh,v 1.2 1993/04/30 20:29:42 koziol Exp $
+ *   $Header: /afs/ncsa/projects/hdf/cvs/hdf4/mfhdf/c++/ncvalues.hh,v 1.2 1993/04/30 20:29:42 koziol Exp $
  *********************************************************************/
 
 #ifndef Ncvalues_def

Modified: packages/libhdf4/branches/upstream/current/mfhdf/c++/netcdf.cc
===================================================================
--- packages/libhdf4/branches/upstream/current/mfhdf/c++/netcdf.cc	2007-05-15 09:05:29 UTC (rev 830)
+++ packages/libhdf4/branches/upstream/current/mfhdf/c++/netcdf.cc	2007-05-15 09:53:05 UTC (rev 831)
@@ -4,7 +4,7 @@
  *
  *   Purpose:	Implements class interface for netCDF over C interface
  *
- *   $Header: /afs/ncsa/projects/hdf/cvs/dist/mfhdf/c++/netcdf.cc,v 1.2 1993/04/30 20:29:45 koziol Exp $
+ *   $Header: /afs/ncsa/projects/hdf/cvs/hdf4/mfhdf/c++/netcdf.cc,v 1.2 1993/04/30 20:29:45 koziol Exp $
  *********************************************************************/
 
 #include <string.h>

Modified: packages/libhdf4/branches/upstream/current/mfhdf/c++/netcdf.hh
===================================================================
--- packages/libhdf4/branches/upstream/current/mfhdf/c++/netcdf.hh	2007-05-15 09:05:29 UTC (rev 830)
+++ packages/libhdf4/branches/upstream/current/mfhdf/c++/netcdf.hh	2007-05-15 09:53:05 UTC (rev 831)
@@ -4,7 +4,7 @@
  *
  *   Purpose:   C++ class interface for netCDF
  *
- *   $Header: /afs/ncsa/projects/hdf/cvs/dist/mfhdf/c++/netcdf.hh,v 1.2 1993/04/30 20:29:48 koziol Exp $
+ *   $Header: /afs/ncsa/projects/hdf/cvs/hdf4/mfhdf/c++/netcdf.hh,v 1.2 1993/04/30 20:29:48 koziol Exp $
  *********************************************************************/
 
 #ifndef NETCDF_HH

Deleted: packages/libhdf4/branches/upstream/current/mfhdf/configure
===================================================================
--- packages/libhdf4/branches/upstream/current/mfhdf/configure	2007-05-15 09:05:29 UTC (rev 830)
+++ packages/libhdf4/branches/upstream/current/mfhdf/configure	2007-05-15 09:53:05 UTC (rev 831)
@@ -1,1326 +0,0 @@
-#!/bin/sh
-# Guess values for system-dependent variables and create Makefiles.
-# Generated automatically using autoconf.
-# Copyright (C) 1991, 1992, 1993 Free Software Foundation, Inc.
-
-# This program is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 2, or (at your option)
-# any later version.
-
-# 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 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.
-
-# Usage: configure [--srcdir=DIR] [--host=HOST] [--gas] [--nfp] [--no-create]
-#        [--prefix=PREFIX] [--exec-prefix=PREFIX] [--with-PACKAGE] [TARGET]
-# Ignores all args except --srcdir, --prefix, --exec-prefix, --no-create, and
-# --with-PACKAGE unless this script has special code to handle it.
-
-
-for arg
-do
-  # Handle --exec-prefix with a space before the argument.
-  if test x$next_exec_prefix = xyes; then exec_prefix=$arg; next_exec_prefix=
-  # Handle --host with a space before the argument.
-  elif test x$next_host = xyes; then next_host=
-  # Handle --prefix with a space before the argument.
-  elif test x$next_prefix = xyes; then prefix=$arg; next_prefix=
-  # Handle --srcdir with a space before the argument.
-  elif test x$next_srcdir = xyes; then srcdir=$arg; next_srcdir=
-  else
-    case $arg in
-     # For backward compatibility, also recognize exact --exec_prefix.
-     -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* | --exec=* | --exe=* | --ex=* | --e=*)
-	exec_prefix=`echo $arg | sed 's/[-a-z_]*=//'` ;;
-     -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- | --exec | --exe | --ex | --e)
-	next_exec_prefix=yes ;;
-
-     -gas | --gas | --ga | --g) ;;
-
-     -host=* | --host=* | --hos=* | --ho=* | --h=*) ;;
-     -host | --host | --hos | --ho | --h)
-	next_host=yes ;;
-
-     -nfp | --nfp | --nf) ;;
-
-     -no-create | --no-create | --no-creat | --no-crea | --no-cre | --no-cr | --no-c | --no- | --no)
-        no_create=1 ;;
-
-     -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
-	prefix=`echo $arg | sed 's/[-a-z_]*=//'` ;;
-     -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
-	next_prefix=yes ;;
-
-     -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=* | --s=*)
-	srcdir=`echo $arg | sed 's/[-a-z_]*=//'` ;;
-     -srcdir | --srcdir | --srcdi | --srcd | --src | --sr | --s)
-	next_srcdir=yes ;;
-
-     -with-* | --with-*)
-       package=`echo $arg|sed 's/-*with-//'`
-       # Delete all the valid chars; see if any are left.
-       if test -n "`echo $package|sed 's/[-a-zA-Z0-9_]*//g'`"; then
-         echo "configure: $package: invalid package name" >&2; exit 1
-       fi
-       eval "with_`echo $package|sed s/-/_/g`=1" ;;
-
-     *) ;;
-    esac
-  fi
-done
-
-trap 'rm -f conftest* core; exit 1' 1 3 15
-
-rm -f conftest*
-compile='${CC-cc} $DEFS conftest.c -o conftest $LIBS >/dev/null 2>&1'
-
-# A filename unique to this package, relative to the directory that
-# configure is in, which we can look for to find out if srcdir is correct.
-unique_file=nctest
-
-# Find the source files, if location was not specified.
-if test -z "$srcdir"; then
-  srcdirdefaulted=yes
-  # Try the directory containing this script, then `..'.
-  prog=$0
-  confdir=`echo $prog|sed 's%/[^/][^/]*$%%'`
-  test "X$confdir" = "X$prog" && confdir=.
-  srcdir=$confdir
-  if test ! -r $srcdir/$unique_file; then
-    srcdir=..
-  fi
-fi
-if test ! -r $srcdir/$unique_file; then
-  if test x$srcdirdefaulted = xyes; then
-    echo "configure: Can not find sources in \`${confdir}' or \`..'." 1>&2
-  else
-    echo "configure: Can not find sources in \`${srcdir}'." 1>&2
-  fi
-  exit 1
-fi
-# Preserve a srcdir of `.' to avoid automounter screwups with pwd.
-# But we can't avoid them for `..', to make subdirectories work.
-case $srcdir in
-  .|/*|~*) ;;
-  *) srcdir=`cd $srcdir; pwd` ;; # Make relative path absolute.
-esac
- if [ -r CUSTOMIZE ]; then
-  echo reading configuration customizations
-  . ./CUSTOMIZE
-fi
- TRANSFORMEES='port/Makefile port/master.mk'
-POST_PROCESSEES='port/Makefile'
-CPPFLAGS=${CPPFLAGS-"-DNDEBUG"}
-
- CFLAGS=${CFLAGS-"-O"}
-
- 
-if test -z "$OS"; then
-echo checking for type of operating system
-cat << \CAT_EOF > conftest.c
-#ifdef __osf__
-OS_osf
-#endif
-#ifdef _AIX
-OS_aix
-#endif
-#ifdef __DGUX__
-OS_dgux
-#endif
-#ifdef hpux
-OS_hpux
-#endif
-#ifdef NeXT
-OS_nextos
-#endif
-#ifdef sgi
-OS_irix
-#endif
-#ifdef sun
-OS_sunos
-#endif
-#ifdef __FreeBSD__
-OS_freebsd
-#endif
-#ifdef ultrix
-OS_ultrix
-#endif
-#ifdef _UNICOS
-OS_unicos
-#endif
-#ifdef __convex__
-OS_convex
-#endif
-#ifdef masscomp
-OS_rtu
-#endif
-CAT_EOF
-OS=`cc -E conftest.c | sed -n '/^OS_/ {
-  s///p
-  q
-}'`
-rm conftest.c
-if test -z "$OS"; then
-  echo "OS:operating system:sunos" >> conf.missing
-fi
-fi
- case "${OS}" in
-  aix*)    for arg in -D_ALL_SOURCE; do
-    case "$CPPFLAGS" in
-      *$arg*) ;;
-      *)      CPPFLAGS="${CPPFLAGS-} $arg";;
-    esac
-  done
-;;
-  hpux*)   for arg in -D_HPUX_SOURCE; do
-    case "$CPPFLAGS" in
-      *$arg*) ;;
-      *)      CPPFLAGS="${CPPFLAGS-} $arg";;
-    esac
-  done
-;;
-esac
-LIBOBJS=${LIBOBJS-""}
-
- PORT_HEADERS=${PORT_HEADERS-""}
-
- PORT_MANIFEST=${PORT_MANIFEST-""}
-
-
-PORT_SUBDIRS=${PORT_SUBDIRS-""}
-
-
-
-if test -z "$CC"; then
-  echo checking for cc
-  saveifs="$IFS"; IFS="${IFS}:"
-  for dir in $PATH; do
-    test -z "$dir" && dir=.
-    if test -f $dir/cc; then
-      CC="cc"
-      break
-    fi
-  done
-  IFS="$saveifs"
-fi
-test -z "$CC" && CC=""
-if test -z "$CC"; then
-  echo "CC:C compiler:/bin/cc" >> conf.missing
-fi
-# Find out if we are using GNU C, under whatever name.
-cat <<EOF > conftest.c
-#ifdef __GNUC__
-  yes
-#endif
-EOF
-${CC-cc} -E conftest.c > conftest.out 2>&1
-if egrep yes conftest.out >/dev/null 2>&1; then
-  GCC=1 # For later tests.
-  CC="$CC -O"
-fi
-rm -f conftest*
- if test -z "$AR"; then
-  echo checking for ar
-  saveifs="$IFS"; IFS="${IFS}:"
-  for dir in $PATH; do
-    test -z "$dir" && dir=.
-    if test -f $dir/ar; then
-      AR="ar"
-      break
-    fi
-  done
-  IFS="$saveifs"
-fi
-test -z "$AR" && AR=""
-if test -z "$AR"; then
-  echo "AR:library utility:/bin/ar" >> conf.missing
-fi
- if test -z "$RANLIB"; then
-  echo checking for ranlib
-  saveifs="$IFS"; IFS="${IFS}:"
-  for dir in $PATH; do
-    test -z "$dir" && dir=.
-    if test -f $dir/ranlib; then
-      RANLIB="ranlib"
-      break
-    fi
-  done
-  IFS="$saveifs"
-fi
-test -z "$RANLIB" && RANLIB="@:"
-  
-
-echo checking for fill value usage
-if test "${OLD_FILLVALUES-}" = yes; then
-    OLD_FILLVALUES=1
-    DEFS="$DEFS -DOLD_FILLVALUES=1"
-else
-    OLD_FILLVALUES=0
-fi
-  for arg in libsrc/netcdf.h; do
-    case "$TRANSFORMEES" in
-      *$arg*) ;;
-      *)      TRANSFORMEES="${TRANSFORMEES-} $arg";;
-    esac
-  done
-
-
-CFLAGS=${CFLAGS-"-O"}
-
-
-CPPFLAGS=${CPPFLAGS-"-DNDEBUG"}
-
-
-  for arg in -DHDF; do
-    case "$CPPFLAGS" in
-      *$arg*) ;;
-      *)      CPPFLAGS="${CPPFLAGS-} $arg";;
-    esac
-  done
-
-HDF_INC=${HDF_INC-"-I/hdf/home/chouck/hdf/33/include"}
-
-
-HDF_LIB=${HDF_LIB-"/hdf/home/chouck/hdf/33/lib/libdf.a"}
-
-JPEG_LIB=${JPEG_LIB-"/hdf/home/chouck/hdf/33/jpeg/libjpeg.a"}
-
-
-FFLAGS=${FFLAGS-""}
-
-
-LEX=${LEX-"lex"}
-
-
-YACC=${YACC-"yacc"}
-
-
-XDRFILE=${XDRFILE-"xdrposix"}
-
-
-echo setting the installation prefix
-prefix=`case "${prefix-..}" in 
-  /*) echo ${prefix-..}; exit;;
-   *) echo '/usr/local';
-#
-# Made the default prefix '/usr/local/' - GV
-#   *) path=\`pwd\`/${prefix-..}
-#        tail=
-#        while test -n "$path"; do
-#          (cd $path && echo \`pwd\`$rest) 2> /dev/null && exit
-#          base=/\`basename "$path"\`
-#          tail=/$base$tail
-#          path=\`echo "$path" | sed "s/\/$base//"\`
-#        done;;
-esac
-`
-test -z "$exec_prefix" && exec_prefix=$prefix/bin
-
-
-
-
-if test -z "$MACHINE"; then
-echo checking for type of machine
-MACHINE=`uname -m | tr A-Z a-z`
-if test -z "$MACHINE"; then
-  echo "MACHINE:machine hardware type:sun4c" >> conf.missing
-fi
-fi
-
-
-  for arg in which; do
-    case "$PORT_MANIFEST" in
-      *$arg*) ;;
-      *)      PORT_MANIFEST="${PORT_MANIFEST-} $arg";;
-    esac
-  done
-if test -z "$WHICH"; then
-  echo checking for which
-  saveifs="$IFS"; IFS="${IFS}:"
-  for dir in $PATH; do
-    test -z "$dir" && dir=.
-    if test -f $dir/which; then
-      WHICH="which"
-      break
-    fi
-  done
-  IFS="$saveifs"
-fi
-test -z "$WHICH" && WHICH="`case "port" in 
-  /*) echo port; exit;;
-   *) path=\`pwd\`/port
-        tail=
-        while test -n "$path"; do
-          (cd $path && echo \`pwd\`$rest) 2> /dev/null && exit
-          base=/\`basename "$path"\`
-          tail=/$base$tail
-          path=\`echo "$path" | sed "s/\/$base//"\`
-        done;;
-esac
-`/which"
-
-if test "$OS" = ultrix && test "$MACHINE" = vax \
-    && test `$WHICH "$CC"` = /bin/cc; then
-  echo "changing C compiler to \`vcc' because \`cc' floating-point is broken"
-  CC=vcc
-fi
-
-echo checking how to run the C preprocessor
-if test -z "$CPP"; then
-  CPP='${CC-cc} -E'
-  cat > conftest.c <<EOF
-#include <stdio.h>
-EOF
-err=`eval "$CPP $DEFS conftest.c 2>&1 >/dev/null"`
-if test -z "$err"; then
-  :
-else
-  CPP=/lib/cpp
-fi
-rm -f conftest*
-fi
-CPP=`eval echo $CPP`
-echo "#include <stdlib.h>" > conftest.c
-if test `$CPP conftest.c 2> /dev/null | wc -l` = 0; then
-  if test "$CPP" = cpp; then
-    echo 1>&2 "$0: C preprocessor, \`$CPP', doesn't work"
-    echo "CPP:C preprocessor:/lib/cpp" >> conf.missing
-  else
-    echo 1>&2 "$0: C preprocessor, \`$CPP', doesn't work; setting to \`cpp'"
-    CPP=cpp
-    if test `${WHICH} ${CPP} 2>&1 | wc -w` != 1; then
-      echo 1>&2 "$0: C preprocessor, \`$CPP', doesn't work; setting to \`cpp'"
-      CPP=/usr/ccs/lib/cpp
-      if test `${WHICH} ${CPP} 2>&1 | wc -w` != 1; then
-        echo 1>&2 "$0: C preprocessor, \`$CPP', doesn't exist"
-        echo "CPP:C preprocessor:/lib/cpp" >> conf.missing
-      fi
-    fi
-  fi
-fi
-rm -f conftest.c
-
- case "$OS" in
-  hpux*) for p in fort77 fortc f77
-do
-if test -z "$FC"; then
-  echo checking for $p
-  saveifs="$IFS"; IFS="${IFS}:"
-  for dir in $PATH; do
-    test -z "$dir" && dir=.
-    if test -f $dir/$p; then
-      FC="$p"
-      break
-    fi
-  done
-  IFS="$saveifs"
-fi
-test -z "$FC" && FC=""
-
-test -n "$FC" && break
-done
-;;
-  dgux*) for p in ghf77 f77
-do
-if test -z "$FC"; then
-  echo checking for $p
-  saveifs="$IFS"; IFS="${IFS}:"
-  for dir in $PATH; do
-    test -z "$dir" && dir=.
-    if test -f $dir/$p; then
-      FC="$p"
-      break
-    fi
-  done
-  IFS="$saveifs"
-fi
-test -z "$FC" && FC=""
-
-test -n "$FC" && break
-done
-;;
-  convex*) for p in f77 fc
-do
-if test -z "$FC"; then
-  echo checking for $p
-  saveifs="$IFS"; IFS="${IFS}:"
-  for dir in $PATH; do
-    test -z "$dir" && dir=.
-    if test -f $dir/$p; then
-      FC="$p"
-      break
-    fi
-  done
-  IFS="$saveifs"
-fi
-test -z "$FC" && FC=""
-
-test -n "$FC" && break
-done
-;;
-  *)     for p in f77 cf77 #fc
-do
-if test -z "$FC"; then
-  echo checking for $p
-  saveifs="$IFS"; IFS="${IFS}:"
-  for dir in $PATH; do
-    test -z "$dir" && dir=.
-    if test -f $dir/$p; then
-      FC="$p"
-      break
-    fi
-  done
-  IFS="$saveifs"
-fi
-test -z "$FC" && FC=""
-
-test -n "$FC" && break
-done
-;;
-esac
-if test -z "$FC"; then
-    for arg in NONE; do
-    case "$FC" in
-      *$arg*) ;;
-      *)      FC="${FC-} $arg";;
-    esac
-  done
-
-  echo "Was unable to find a Fortran compiler on this machine."
-fi
-
-if test -z "$NEQN"; then
-  echo checking for neqn
-  saveifs="$IFS"; IFS="${IFS}:"
-  for dir in $PATH; do
-    test -z "$dir" && dir=.
-    if test -f $dir/neqn; then
-      NEQN="neqn"
-      break
-    fi
-  done
-  IFS="$saveifs"
-fi
-test -z "$NEQN" && NEQN="cat"
-test "$NEQN" = cat && 
-  echo 1>&2 "$0: Can't find program \`neqn'; setting to \`cat'"
-
-if test -z "$TBL"; then
-  echo checking for tbl
-  saveifs="$IFS"; IFS="${IFS}:"
-  for dir in $PATH; do
-    test -z "$dir" && dir=.
-    if test -f $dir/tbl; then
-      TBL="tbl"
-      break
-    fi
-  done
-  IFS="$saveifs"
-fi
-test -z "$TBL" && TBL="cat"
-test "$TBL" = cat && 
-  echo 1>&2 "$0: Can't find program \`tbl'; setting to \`cat'"
-
-# Make sure to not get the incompatible SysV /etc/install and
-# /usr/sbin/install, which might be in PATH before a BSD-like install,
-# or the SunOS /usr/etc/install directory, or the AIX /bin/install,
-# or the AFS install, which mishandles nonexistent args.  (Sigh.)
-if test -z "$INSTALL"; then
-  echo checking for install
-  saveifs="$IFS"; IFS="${IFS}:"
-  for dir in $PATH; do
-    test -z "$dir" && dir=.
-    case $dir in
-    /etc|/usr/sbin|/usr/etc|/usr/afsws/bin) ;;
-    *)
-      if test -f $dir/install; then
-	if grep dspmsg $dir/install >/dev/null 2>&1; then
-	  : # AIX
-	else
-	  INSTALL="$dir/install -c"
-	  INSTALL_PROGRAM='$(INSTALL)'
-	  INSTALL_DATA='$(INSTALL) -m 644'
-	  break
-	fi
-      fi
-      ;;
-    esac
-  done
-  IFS="$saveifs"
-fi
-INSTALL=${INSTALL-cp}
-INSTALL_PROGRAM=${INSTALL_PROGRAM-'$(INSTALL)'}
-INSTALL_DATA=${INSTALL_DATA-'$(INSTALL)'}
-INSTALL_DATA="`echo "${INSTALL_DATA}" | sed 's/644/664/'`"
-
-if test -z "$AR"; then
-  echo checking for ar
-  saveifs="$IFS"; IFS="${IFS}:"
-  for dir in $PATH; do
-    test -z "$dir" && dir=.
-    if test -f $dir/ar; then
-      AR="ar"
-      break
-    fi
-  done
-  IFS="$saveifs"
-fi
-test -z "$AR" && AR=""
-if test -z "$AR"; then
-  echo "AR:library utility:/bin/ar" >> conf.missing
-fi
-
-if test -z "$MAKEINFO"; then
-  echo checking for makeinfo
-  saveifs="$IFS"; IFS="${IFS}:"
-  for dir in $PATH; do
-    test -z "$dir" && dir=.
-    if test -f $dir/makeinfo; then
-      MAKEINFO="makeinfo"
-      break
-    fi
-  done
-  IFS="$saveifs"
-fi
-test -z "$MAKEINFO" && MAKEINFO=""
-
-
-echo checking endianess
-SWAP=
-cat > conftest.c <<EOF
-main() {
-    long i = 0;
-    char *ip = (char*)&i;
-    *ip       = 'a';
-    exit(i != 'a'); /* false if little endian or sizeof(long) == sizeof(char) */
-}
-EOF
-eval $compile
-if test -s conftest && (./conftest; exit) 2>/dev/null; then
-  SWAP=-DSWAP
-fi
-rm -f conftest*
-if test "$OS" = unicos; then
-NETLONG=
-else
-echo checking type of netlong
-cat > conftest.c <<EOF
-main() {exit(sizeof(long) == 4);}
-EOF
-eval $compile
-if test -s conftest && (./conftest; exit) 2>/dev/null; then
-  NETLONG='-DNETLONG=int'
-else
-  NETLONG=
-fi
-rm -f conftest*
-fi
-
-echo checking for XDR header-file
-  if test -z "$CPP_XDR"; then
-    for dir in /usr/include/rpc /usr/local/include/rpc \
-    $prefix/include `case "xdr" in 
-  /*) echo xdr; exit;;
-   *) path=\`pwd\`/xdr
-        tail=
-        while test -n "$path"; do
-          (cd $path && echo \`pwd\`$rest) 2> /dev/null && exit
-          base=/\`basename "$path"\`
-          tail=/$base$tail
-          path=\`echo "$path" | sed "s/\/$base//"\`
-        done;;
-esac
-`; do
-      if test -r $dir/xdr.h; then
-        CPP_XDR=$dir
-        break;
-      fi
-    done
-    if test -z "$CPP_XDR"; then
-      echo "CPP_XDR:XDR include-directory:-I/usr/include/rpc" >> conf.missing
-    fi
-  fi
-if test -n "${CPP_XDR-}"; then
-  CPP_XDR=-I${CPP_XDR}
-fi
-
-echo checking XDR library
-case "${OS}" in
-  irix*)	LD_XDR=
-#                 for arg in -DIRIS4; do
-#   case "$HDF_INC" in
-#     *$arg*) ;;
-#     *)      HDF_INC="${HDF_INC-} $arg";;
-#   esac
-# done
-
-#                 for arg in -cckr; do
-#   case "$HDF_INC" in
-#     *$arg*) ;;
-#     *)      HDF_INC="${HDF_INC-} $arg";;
-#   esac
-# done
-;;
-  ultrix*)	LD_XDR=
-#                 for arg in -DMIPSEL; do
-#   case "$HDF_INC" in
-#     *$arg*) ;;
-#     *)      HDF_INC="${HDF_INC-} $arg";;
-#   esac
-# done
-;;
-  unicos*)	LD_XDR=
-		  for arg in -DBIG_SHORTS -DBIG_LONGS; do
-    case "$CPPFLAGS" in
-      *$arg*) ;;
-      *)      CPPFLAGS="${CPPFLAGS-} $arg";;
-    esac
-  done
-
-#                 for arg in -DUNICOS; do
-#   case "$HDF_INC" in
-#     *$arg*) ;;
-#     *)      HDF_INC="${HDF_INC-} $arg";;
-#   esac
-# done
-;;
-  aix*)           
-#                   for arg in -DIBM6000; do
-#   case "$HDF_INC" in
-#     *$arg*) ;;
-#     *)      HDF_INC="${HDF_INC-} $arg";;
-#   esac
-# done
-
-                LD_XDR=;;
-  sunos*)         
-#                   for arg in -DSUN; do
-#   case "$HDF_INC" in
-#     *$arg*) ;;
-#     *)      HDF_INC="${HDF_INC-} $arg";;
-#   esac
-# done
-
-                LD_XDR=;;
-  freebsd*)         
-#                   for arg in -DUNIX386; do
-#   case "$HDF_INC" in
-#     *$arg*) ;;
-#     *)      HDF_INC="${HDF_INC-} $arg";;
-#   esac
-# done
-
-                # QAK: If FreeBSD has float support (xdr_float & xdr_double)
-                # in it's libc.a someday, change the following line to LD_XDR=;;
-                LD_XDR=../xdr/xdrfloat.o;;
-  hpux*)          
-#               for arg in -DHP9000; do
-#   case "$HDF_INC" in
-#     *$arg*) ;;
-#     *)      HDF_INC="${HDF_INC-} $arg";;
-#   esac
-# done
-
-                if test -z "$GCC"; then
-                          for arg in -Aa; do
-    case "$CPPFLAGS" in
-      *$arg*) ;;
-      *)      CPPFLAGS="${CPPFLAGS-} $arg";;
-    esac
-  done
-
-                fi
-                LD_XDR=;;
-  osf*)           
-#               for arg in -DDEC_ALPHA; do
-#   case "$HDF_INC" in
-#     *$arg*) ;;
-#     *)      HDF_INC="${HDF_INC-} $arg";;
-#   esac
-# done
-
-		  for arg in -DBIG_LONGS; do
-    case "$CPPFLAGS" in
-      *$arg*) ;;
-      *)      CPPFLAGS="${CPPFLAGS-} $arg";;
-    esac
-  done
-
-		  for arg in -std1; do
-    case "$CPPFLAGS" in
-      *$arg*) ;;
-      *)      CPPFLAGS="${CPPFLAGS-} $arg";;
-    esac
-  done
-
-                LD_XDR=;;
-  convex*)        
-#               for arg in -DCONVEX; do
-#   case "$HDF_INC" in
-#     *$arg*) ;;
-#     *)      HDF_INC="${HDF_INC-} $arg";;
-#   esac
-# done
-
-                LD_XDR=;;
-  *)		LD_XDR=;;
-esac
-  for arg in ${CPP_XDR-}; do
-    case "$DEFS" in
-      *$arg*) ;;
-      *)      DEFS="${DEFS-} $arg";;
-    esac
-  done
-  for arg in ${CPPFLAGS-}; do
-    case "$DEFS" in
-      *$arg*) ;;
-      *)      DEFS="${DEFS-} $arg";;
-    esac
-  done
-  for arg in ${LD_XDR-}; do
-    case "$LIBS" in
-      *$arg*) ;;
-      *)      LIBS="${LIBS-} $arg";;
-    esac
-  done
-cat > conftest.c <<EOF
-
-#undef NDEBUG
-
-#ifdef _AIX
-#   ifndef _ALL_SOURCE
-#     define _ALL_SOURCE
-#   endif
-#endif
-
-#include <assert.h>
-#include <stdio.h>
-#include <types.h>
-#include <xdr.h>
-
-#define TESTFILE	"conftest.xdr"
-#define EPSILON		.0005
-#ifndef FLT_MIN
-#   define    FLT_MIN 1e-37           /* Standard C maximum */
-#endif
-#ifndef FLT_EPSILON
-#   define FLT_EPSILON        1e-5            /* Standard C maximum */
-#endif
-
-main(ac,av)
-    int			ac ;
-    char		*av[] ;
-{
-    int			ii, jj	= 0 ;
-    char		*fname	= ac > 1 ? av[1] : TESTFILE;
-    FILE		*F	= fopen(fname,"w");
-    XDR			xdrs[1] ;
-    unsigned int	count ;
-    unsigned int	szof ;
-
-    /*
-     * The last value below should be a subnormal number on a DECstation,
-     * RS6000, and SPARCstation.  Hopefully, it will catch bad xdr(3)
-     * implementations (such as a VAXstation's) which don't correctly handle
-     * such values.  Such a value should be the last one in the list.
-     */
-    static float	floats[]	= { 100.125, 100.25, 100.375, 
-					    100.5, 100.625, FLT_MIN/32 } ;
-    float *fp , got_af[sizeof(floats)/sizeof(floats[0])] ;
-
-/* create */
-
-    if( F == NULL)
-    {
-	    perror("fopen failed") ;
-	    exit(-1) ;
-    }
-    xdrstdio_create(xdrs, F, XDR_ENCODE) ;
-
-/* populate */
-
-    szof = sizeof(float) ;
-    count = sizeof(floats)/sizeof(float) ;
-    assert( xdr_vector(xdrs, (char *)floats, count, szof, xdr_float)) ;
-
-/* flush, rewind  and reopen */
-
-    assert(fflush((FILE *)xdrs->x_private) != EOF) ; /* xdr_destroy(xdrs) */
-
-    assert(fclose(F) != EOF) ;
-    F = fopen(fname,"r") ;
-    if( F == NULL)
-    {
-	    perror("fopen failed") ;
-	    exit(-1) ;
-    }
-    xdrstdio_create(xdrs, F, XDR_DECODE) ;
-
-/* check */
-
-    szof = sizeof(float) ;
-    count = sizeof(floats)/sizeof(float) ;
-    assert( xdr_vector(xdrs, (char *)got_af, count, szof, xdr_float)) ;
-    for(ii = 0, fp = got_af;
-	ii < count - 1;
-	ii++, fp++) 
-    {
-	assert(*fp <= floats[ii]*(1+FLT_EPSILON) && *fp >= floats[ii]*(1-FLT_EPSILON)) ;
-    }
-    assert(*fp == 0 || (*fp <= floats[ii]*(1+FLT_EPSILON) && *fp >= floats[ii]*(1-FLT_EPSILON))) ;
-
-    exit(0) ;
-}
-
-EOF
-eval $compile
-if test -s conftest && (./conftest; exit) 2>/dev/null; then
-  XDR_LIBOBJS=
-XDR_INSTALL_DEPS=
-else
-  XDR_LIBOBJS="xdr.o xdrfloat.o xdrstdio.o xdrarray.o"
-XDR_INSTALL_DEPS=installed_headers
-LD_XDR=
-fi
-rm -f conftest*
-
-echo checking for function prototypes
-# If you can get the FreeBSD stuff working, more power to you -QAK
-if test "$OS" = freebsd; then   # for some reason this is not working on FreeBSD
-    :
-else
-cat > conftest.c <<EOF
-
-main() { exit(0); } 
-t() { extern int foo(int bar);
- }
-EOF
-if eval $compile; then
-  :
-else
-    for arg in -DNO_HAVE_PROTOTYPES; do
-    case "$CPPFLAGS" in
-      *$arg*) ;;
-      *)      CPPFLAGS="${CPPFLAGS-} $arg";;
-    esac
-  done
-
-fi
-rm -f conftest*
-fi
-
-echo checking for working const
-# If you can get the FreeBSD stuff working, more power to you -QAK
-if test "$OS" = freebsd; then   # for some reason this is not working on FreeBSD
-    :
-else
-cat > conftest.c <<EOF
-
-main() { exit(0); } 
-t() { /* Ultrix mips cc rejects this.  */
-typedef int charset[2]; const charset x;
- }
-EOF
-if eval $compile; then
-  :
-else
-    for arg in -Dconst=; do
-    case "$CPPFLAGS" in
-      *$arg*) ;;
-      *)      CPPFLAGS="${CPPFLAGS-} $arg";;
-    esac
-  done
-
-fi
-rm -f conftest*
-fi
-
-echo checking for variadic function support
-# If you can get the FreeBSD stuff working, more power to you -QAK
-if test "$OS" = freebsd; then   # for some reason this is not working on FreeBSD
-    :
-else
-cat > conftest.c <<EOF
-
-main() { exit(0); } 
-t() { } 
-#include <stdarg.h>
-int foo(int bar, ...) {
-    va_list     alist;
-    va_start(alist, bar);
-    bar = (int)va_arg(alist, int);
-    va_end(alist);
-    return bar;
- }
-EOF
-if eval $compile; then
-  :
-else
-    for arg in -DNO_STDARG; do
-    case "$CPPFLAGS" in
-      *$arg*) ;;
-      *)      CPPFLAGS="${CPPFLAGS-} $arg";;
-    esac
-  done
-
-fi
-rm -f conftest*
-fi
-
-# If you can get the Convex or Solaris stuff working, more power to you -QAK
-if test "$OS" = solaris || test "$OS" = convex; then   # for some reason this is not working on Convex and Solaris
-    :
-else
-if test `$WHICH "${FC-}" | wc -w` != 1; then
-echo checking for strerror
-cat > conftest.c <<EOF
-#include <stdio.h>
-#include <string.h>
-main() { exit(0); } 
-t() { 
-#ifdef __stub_strerror
-choke me
-#else
-/* Override any gcc2 internal prototype to avoid an error.  */
-extern char strerror(); strerror();
-#endif
- }
-EOF
-if eval $compile; then
-  :
-else
-    for arg in -DNO_STRERROR; do
-    case "$CPPFLAGS" in
-      *$arg*) ;;
-      *)      CPPFLAGS="${CPPFLAGS-} $arg";;
-    esac
-  done
-
-fi
-rm -f conftest*
-#endif
-else
-  echo checking for strerror
-  echo '       CALL STRERROR' > conftest.f
-  if eval "$FC conftest.f > /dev/null 2>&1"; then
-    : true
-  else
-      for arg in -DNO_STRERROR; do
-    case "$CPPFLAGS" in
-      *$arg*) ;;
-      *)      CPPFLAGS="${CPPFLAGS-} $arg";;
-    esac
-  done
-  fi
-  rm -rf a.out conftest.f
-fi
-fi	# end Convex/Solaris hack
-
-
-FTPDIR=${FTPDIR-/home/ftp}/pub/sdm
-
-echo checking for package version
-if test -z "$VERSION"; then
-  if test -r VERSION; then \
-    VERSION="`cat VERSION`"
-  else
-    VERSION=
-  fi
-fi
-if test -z "$MAJOR_NO"; then
-  if test -n "$VERSION"; then \
-    MAJOR_NO=`echo $VERSION |
-      sed -n '/^\([0-9][0-9]*\)\.[0-9][0-9]*.*/s//\1/p;q'`
-  else
-    MAJOR_NO=
-  fi
-fi
-if test -z "$MINOR_NO"; then
-  if test -n "$VERSION"; then \
-    MINOR_NO=`echo $VERSION |
-      sed -n '/^[0-9][0-9]*\.\([0-9][0-9]*\).*/s//\1/p;q'`
-  else
-    MINOR_NO=
-  fi
-fi
-
-
-if test -s conf.missing; then
-  cat << CAT_EOF
-
-$0: The following variables need values.  They may be set in
-the environment or in the file CUSTOMIZE.  Variables referring to
-executable programs needn't be set if the relevant directory is added to
-PATH.  In any case, ./configure should probably be rerun.  See file INSTALL
-for details.
-
-CAT_EOF
-  awk -F: 'BEGIN {printf "%-13s%-27s%s\n", "VARIABLE", "MEANING", "EXAMPLE";
-	          printf "%-13s%-27s%s\n", "--------", "-------", "-------"}
-	         {printf "%-13s%-27s%s\n", $1, $2, $3}' conf.missing
-  rm conf.missing
-  exit 1
-fi
-rm -f conf.missing
-
-
-if test -n "$prefix"; then
-  test -z "$exec_prefix" && exec_prefix='${prefix}'
-  prsub="s%^prefix\\([ 	]*\\)=\\([ 	]*\\).*$%prefix\\1=\\2$prefix%"
-fi
-if test -n "$exec_prefix"; then
-  prsub="$prsub
-s%^exec_prefix\\([ 	]*\\)=\\([ 	]*\\).*$%\
-exec_prefix\\1=\\2$exec_prefix%"
-fi
-
-trap 'rm -f config.status; exit 1' 1 3 15
-echo creating config.status
-rm -f config.status
-cat > config.status <<EOF
-#!/bin/sh
-# Generated automatically by configure.
-# Run this file to recreate the current configuration.
-# This directory was configured as follows,
-# on host `(hostname || uname -n) 2>/dev/null`:
-#
-# $0 $*
-
-for arg
-do
-  case "\$arg" in
-    -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
-    exec /bin/sh $0 $* ;;
-    *) echo "Usage: config.status --recheck" 2>&1; exit 1 ;;
-  esac
-done
-
-trap 'rm -f \
-    Makefile \
-    xdr/Makefile \
-    libsrc/Makefile \
-    fortran/Makefile \
-    ncgen/Makefile \
-    ncdump/Makefile \
-    dumper/Makefile \
-    nctest/Makefile \
-    doc/Makefile \
-     ${TRANSFORMEES-}; exit 1' 1 3 15
-CPPFLAGS='$CPPFLAGS'
-CFLAGS='$CFLAGS'
-OS='$OS'
-LIBOBJS='$LIBOBJS'
-PORT_HEADERS='$PORT_HEADERS'
-PORT_MANIFEST='$PORT_MANIFEST'
-PORT_SUBDIRS='$PORT_SUBDIRS'
-CC='$CC'
-AR='$AR'
-RANLIB='$RANLIB'
-OLD_FILLVALUES='$OLD_FILLVALUES'
-TRANSFORMEES='$TRANSFORMEES'
-HDF_INC='$HDF_INC'
-HDF_LIB='$HDF_LIB'
-JPEG_LIB='$JPEG_LIB'
-FFLAGS='$FFLAGS'
-LEX='$LEX'
-YACC='$YACC'
-XDRFILE='$XDRFILE'
-MACHINE='$MACHINE'
-WHICH='$WHICH'
-CPP='$CPP'
-FC='$FC'
-NEQN='$NEQN'
-TBL='$TBL'
-INSTALL='$INSTALL'
-INSTALL_PROGRAM='$INSTALL_PROGRAM'
-INSTALL_DATA='$INSTALL_DATA'
-MAKEINFO='$MAKEINFO'
-SWAP='$SWAP'
-NETLONG='$NETLONG'
-CPP_XDR='$CPP_XDR'
-DEFS='$DEFS'
-LIBS='$LIBS'
-XDR_LIBOBJS='$XDR_LIBOBJS'
-XDR_INSTALL_DEPS='$XDR_INSTALL_DEPS'
-LD_XDR='$LD_XDR'
-FTPDIR='$FTPDIR'
-VERSION='$VERSION'
-MAJOR_NO='$MAJOR_NO'
-MINOR_NO='$MINOR_NO'
-srcdir='$srcdir'
-DEFS='$DEFS'
-prefix='$prefix'
-exec_prefix='$exec_prefix'
-prsub='$prsub'
-EOF
-cat >> config.status <<\EOF
-
-top_srcdir=$srcdir
-for file in .. \
-    Makefile \
-    xdr/Makefile \
-    libsrc/Makefile \
-    fortran/Makefile \
-    ncgen/Makefile \
-    ncdump/Makefile \
-    dumper/Makefile \
-    nctest/Makefile \
-    doc/Makefile \
-     ${TRANSFORMEES-}; do if [ "x$file" != "x.." ]; then
-  srcdir=$top_srcdir
-  # Remove last slash and all that follows it.  Not all systems have dirname.
-  dir=`echo $file|sed 's%/[^/][^/]*$%%'`
-  if test "$dir" != "$file"; then
-    test "$top_srcdir" != . && srcdir=$top_srcdir/$dir
-    test ! -d $dir && mkdir $dir
-  fi
-  echo creating $file
-  rm -f $file
-  case $file in
-    *.c|*.h) echo "/* Generated automatically from `echo $file|sed 's|.*/||'`.in by configure. */" > $file;;
-    *) echo "# Generated automatically from `echo $file|sed 's|.*/||'`.in by configure." > $file;;
-  esac
-  sed -e "
-$prsub
-s%@CPPFLAGS@%$CPPFLAGS%g
-s%@CFLAGS@%$CFLAGS%g
-s%@OS@%$OS%g
-s%@LIBOBJS@%$LIBOBJS%g
-s%@PORT_HEADERS@%$PORT_HEADERS%g
-s%@PORT_MANIFEST@%$PORT_MANIFEST%g
-s%@PORT_SUBDIRS@%$PORT_SUBDIRS%g
-s%@CC@%$CC%g
-s%@AR@%$AR%g
-s%@RANLIB@%$RANLIB%g
-s%@OLD_FILLVALUES@%$OLD_FILLVALUES%g
-s%@TRANSFORMEES@%$TRANSFORMEES%g
-s%@HDF_INC@%$HDF_INC%g
-s%@HDF_LIB@%$HDF_LIB%g
-s%@JPEG_LIB@%$JPEG_LIB%g
-s%@FFLAGS@%$FFLAGS%g
-s%@LEX@%$LEX%g
-s%@YACC@%$YACC%g
-s%@XDRFILE@%$XDRFILE%g
-s%@MACHINE@%$MACHINE%g
-s%@WHICH@%$WHICH%g
-s%@CPP@%$CPP%g
-s%@FC@%$FC%g
-s%@NEQN@%$NEQN%g
-s%@TBL@%$TBL%g
-s%@INSTALL@%$INSTALL%g
-s%@INSTALL_PROGRAM@%$INSTALL_PROGRAM%g
-s%@INSTALL_DATA@%$INSTALL_DATA%g
-s%@MAKEINFO@%$MAKEINFO%g
-s%@SWAP@%$SWAP%g
-s%@NETLONG@%$NETLONG%g
-s%@CPP_XDR@%$CPP_XDR%g
-s%@DEFS@%$DEFS%g
-s%@LIBS@%$LIBS%g
-s%@XDR_LIBOBJS@%$XDR_LIBOBJS%g
-s%@XDR_INSTALL_DEPS@%$XDR_INSTALL_DEPS%g
-s%@LD_XDR@%$LD_XDR%g
-s%@FTPDIR@%$FTPDIR%g
-s%@VERSION@%$VERSION%g
-s%@MAJOR_NO@%$MAJOR_NO%g
-s%@MINOR_NO@%$MINOR_NO%g
-s%@srcdir@%$srcdir%g
-s%@DEFS@%$DEFS%
-" $top_srcdir/${file}.in >> $file
-fi; done
-
-EOF
-chmod +x config.status
-test -n "$no_create" || ./config.status
-if test -s conf.missing; then
-  cat << CAT_EOF
-
-$0: The following variables need values.  They may be set in
-the environment or in the file CUSTOMIZE.  Variables referring to
-executable programs needn't be set if the relevant directory is added to
-PATH.  In any case, ./configure should probably be rerun.  See file INSTALL
-for details.
-
-CAT_EOF
-  awk -F: 'BEGIN {printf "%-13s%-27s%s\n", "VARIABLE", "MEANING", "EXAMPLE";
-	          printf "%-13s%-27s%s\n", "--------", "-------", "-------"}
-	         {printf "%-13s%-27s%s\n", $1, $2, $3}' conf.missing
-  rm conf.missing
-  exit 1
-fi
-rm -f conf.missing
- # Post process any makefiles.
-#
-# Create a script to accomplish the post processing.
-#
-cat << EOF_CONFTEST_SH > conftest.sh
-cat << EOF_CONFTEST_C > conftest.c
-#include <stdio.h>
-main()
-{
-    return readsub((char*)NULL) ? 0 : 1;
-}
-readsub(inpath)
-    char	*inpath;
-{
-    char	buf[2048], path[1024];
-    FILE	*fp	= inpath == NULL
-				? stdin
-				: fopen(inpath, "r");
-    if (fp == NULL) {
-	(void) perror(inpath);
-	return 0;
-    }
-    buf[sizeof(buf)-1]	= 0;
-    while (fgets(buf, sizeof(buf), fp) != NULL) {
-      if (sscanf(buf, "include%*[] \\t[]%s", path) == 1) {
-          if (!readsub(path))
-		return 0;
-	} else {
-	    (void) fputs(buf, stdout);
-	}
-    }
-    return 1;
-}
-EOF_CONFTEST_C
-if $CC -o conftest conftest.c; then
-    conftest=\`pwd\`/conftest
-    set \
-    Makefile \
-    xdr/Makefile \
-    libsrc/Makefile \
-    fortran/Makefile \
-    ncgen/Makefile \
-    ncdump/Makefile \
-    dumper/Makefile \
-    nctest/Makefile \
-    doc/Makefile \
-     ${POST_PROCESSEES-}
-    for file do
-      echo post processing makefile \\\`\$file\\'
-      sd=\`pwd\`/\`echo \$file | sed 's,[^/]*\$,,'\`
-      base=\`basename \$file\`
-      (cd \$sd; \$conftest < \$base > conftest.mk && mv conftest.mk \$base)
-    done
-fi
-rm conftest conftest.c
-EOF_CONFTEST_SH
-#
-# Append the above script to the output-script file, config.status, so that 
-# invoking that file will also do the post processing.  Note that the 
-# output-script file will be invoked by ./configure before the post-
-# processing code is appended.
-#
-cat conftest.sh >> config.status
-#
-# If appropriate, do the postprocessing now because the previous step 
-# couldn't.
-#
-test -n "$no_create" || sh conftest.sh
-rm conftest.sh
- 

Deleted: packages/libhdf4/branches/upstream/current/mfhdf/configure.in
===================================================================
--- packages/libhdf4/branches/upstream/current/mfhdf/configure.in	2007-05-15 09:05:29 UTC (rev 830)
+++ packages/libhdf4/branches/upstream/current/mfhdf/configure.in	2007-05-15 09:53:05 UTC (rev 831)
@@ -1,63 +0,0 @@
-dnl $Id: configure.in,v 1.6 1998/09/02 21:09:59 acheng Exp $
-dnl
-dnl Process this file with GNU autoconf(1) to produce a configure script.
-dnl
-UC_INIT(nctest)
-
-UL_FILLVALUES
-
-UC_DEFAULT(CFLAGS, -O)
-UC_DEFAULT(CPPFLAGS, -DNDEBUG)
-UC_ENSURE(CPPFLAGS, -DHDF)
-UC_DEFAULT(HDF_INC, -I/hdf/home/chouck/hdf/33/include)
-UC_DEFAULT(HDF_LIB, /hdf/home/chouck/hdf/33/lib/libdf.a)
-UC_DEFAULT(JPEG_LIB, /hdf/home/chouck/hdf/33/jpeg/libjpeg.a)
-UC_DEFAULT(FFLAGS,)
-UC_DEFAULT(LEX, lex)
-UC_DEFAULT(YACC, yacc)
-UC_DEFAULT(XDRFILE, xdrposix)
-UC_PREFIX(..)
-
-UC_OS
-UC_MACHINE
-UC_PROG_CC
-UC_PROG_WHICH
-if test "$OS" = ultrix && test "$MACHINE" = vax \
-    && test `$WHICH "$CC"` = /bin/cc; then
-  echo "changing C compiler to \`vcc' because \`cc' floating-point is broken"
-  CC=vcc
-fi
-
-UC_PROG_CPP
-UC_PROG_FC
-UC_PROG_NEQN
-UC_PROG_TBL
-UC_PROG_INSTALL
-UC_PROG_AR
-UC_PROG_MAKEINFO
-
-UL_SWAP
-UL_NETLONG
-UL_XDR
-UL_PROTOTYPES
-UL_CONST
-UL_VARIADIC_FUNCTIONS
-UL_STRERROR
-
-UC_FTPDIR(pub/sdm)
-UC_VERSION
-
-UC_CHECK_MISSING
-
-UC_FINISH( \
-    Makefile \
-    xdr/Makefile \
-    libsrc/Makefile \
-    fortran/Makefile \
-    ncgen/Makefile \
-    ncdump/Makefile \
-    dumper/Makefile \
-    nctest/Makefile \
-    doc/Makefile \
-    pablo/Makefile \
-    )

Deleted: packages/libhdf4/branches/upstream/current/mfhdf/dumper/Example6.hdf
===================================================================
(Binary files differ)

Deleted: packages/libhdf4/branches/upstream/current/mfhdf/dumper/Image_with_Palette.hdf
===================================================================
(Binary files differ)

Deleted: packages/libhdf4/branches/upstream/current/mfhdf/dumper/LongDataset.hdf
===================================================================
(Binary files differ)

Added: packages/libhdf4/branches/upstream/current/mfhdf/dumper/Makefile.am
===================================================================
--- packages/libhdf4/branches/upstream/current/mfhdf/dumper/Makefile.am	                        (rev 0)
+++ packages/libhdf4/branches/upstream/current/mfhdf/dumper/Makefile.am	2007-05-15 09:53:05 UTC (rev 831)
@@ -0,0 +1,31 @@
+#############################################################################
+##                      Setup for building programs                        ##
+#############################################################################
+
+INCLUDES=-I$(top_srcdir)/hdf/src        \
+         -I$(top_srcdir)/mfhdf/libsrc   \
+         -I$(top_srcdir)/mfhdf/port     \
+         -I../libsrc
+DEFINES=-DNDEBUG -DHDF
+AM_CPPFLAGS=$(INCLUDES) $(DEFINES)
+
+#############################################################################
+##                          Programs to build                              ##
+#############################################################################
+
+bin_PROGRAMS = hdp
+
+## Information for building the "hdp" program
+hdp_SOURCES = hdp.c hdp_dump.c hdp_gr.c hdp_list.c hdp_rig.c hdp_sds.c      \
+              hdp_util.c hdp_vd.c hdp_vg.c show.c
+hdp_LDADD = ../libsrc/libmfhdf.a $(top_builddir)/hdf/src/libdf.a @LIBS@
+hdp_DEPENDENCIES = $(top_builddir)/hdf/src/libdf.a ../libsrc/libmfhdf.a
+
+#############################################################################
+##                   Testing -- Here there be dragons.                     ##
+#############################################################################
+
+check_SCRIPTS = testhdp.sh
+
+check:
+	@$(SHELL) ./testhdp.sh

Modified: packages/libhdf4/branches/upstream/current/mfhdf/dumper/Makefile.in
===================================================================
--- packages/libhdf4/branches/upstream/current/mfhdf/dumper/Makefile.in	2007-05-15 09:05:29 UTC (rev 830)
+++ packages/libhdf4/branches/upstream/current/mfhdf/dumper/Makefile.in	2007-05-15 09:53:05 UTC (rev 831)
@@ -1,724 +1,461 @@
-# Makefile for HDF dumper(1).
-#
-# Makefile.in,v 1.2 1994/05/19 20:18:53 sxu Exp
-# NOTE: This Makefile.in is used by the Cygnus 'configure' script to
-#       generate the top level Makefile.
+# Makefile.in generated by automake 1.7.7 from Makefile.am.
+# @configure_input@
 
-# ############# Start of system configuration section. #############
+# Copyright 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003
+# 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.
 
-# 'srcdir' Gets set to directory this Makefile is found in
-srcdir = .
-TOP_SRCDIR = ../..
+# 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.
 
-prefix = $(TOP_SRCDIR)/NewHDF
+ at SET_MAKE@
 
-exec_prefix = $(prefix)
-tooldir = $(exec_prefix)/$(target)
+#############################################################################
+#############################################################################
 
-program_transform_name =
+srcdir = @srcdir@
+top_srcdir = @top_srcdir@
+VPATH = @srcdir@
+pkgdatadir = $(datadir)/@PACKAGE@
+pkglibdir = $(libdir)/@PACKAGE@
+pkgincludedir = $(includedir)/@PACKAGE@
+top_builddir = ../..
 
-datadir = $(prefix)/lib
-mandir = $(prefix)/man
-man1dir = $(mandir)/man1
-man2dir = $(mandir)/man2
-man3dir = $(mandir)/man3
-man4dir = $(mandir)/man4
-man5dir = $(mandir)/man5
-man6dir = $(mandir)/man6
-man7dir = $(mandir)/man7
-man8dir = $(mandir)/man8
-man9dir = $(mandir)/man9
-docdir = $(datadir)/doc
+am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
+INSTALL = @INSTALL@
+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 = :
+host_triplet = @host@
+ACLOCAL = @ACLOCAL@
+AMDEP_FALSE = @AMDEP_FALSE@
+AMDEP_TRUE = @AMDEP_TRUE@
+AMTAR = @AMTAR@
+AR = @AR@
+AUTOCONF = @AUTOCONF@
+AUTOHEADER = @AUTOHEADER@
+AUTOMAKE = @AUTOMAKE@
+AWK = @AWK@
+CC = @CC@
+CCDEPMODE = @CCDEPMODE@
+CFLAGS = @CFLAGS@
+CPP = @CPP@
+CPPFLAGS = @CPPFLAGS@
+CXX = @CXX@
+CXXCPP = @CXXCPP@
+CXXDEPMODE = @CXXDEPMODE@
+CXXFLAGS = @CXXFLAGS@
+CYGPATH_W = @CYGPATH_W@
+DEFS = @DEFS@
+DEPDIR = @DEPDIR@
+DIFF = @DIFF@
+ECHO_C = @ECHO_C@
+ECHO_N = @ECHO_N@
+ECHO_T = @ECHO_T@
+EGREP = @EGREP@
+EXEEXT = @EXEEXT@
+F77 = @F77@
+FFLAGS = @FFLAGS@
+HDF_BUILD_FORTRAN_FALSE = @HDF_BUILD_FORTRAN_FALSE@
+HDF_BUILD_FORTRAN_TRUE = @HDF_BUILD_FORTRAN_TRUE@
+HDF_BUILD_XDR_FALSE = @HDF_BUILD_XDR_FALSE@
+HDF_BUILD_XDR_TRUE = @HDF_BUILD_XDR_TRUE@
+INSTALL_DATA = @INSTALL_DATA@
+INSTALL_PROGRAM = @INSTALL_PROGRAM@
+INSTALL_SCRIPT = @INSTALL_SCRIPT@
+INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
+LDFLAGS = @LDFLAGS@
+LEX = @LEX@
+LEXLIB = @LEXLIB@
+LEX_OUTPUT_ROOT = @LEX_OUTPUT_ROOT@
+LIBOBJS = @LIBOBJS@
+LIBS = @LIBS@
+LN_S = @LN_S@
+LTLIBOBJS = @LTLIBOBJS@
+MAINT = @MAINT@
+MAINTAINER_MODE_FALSE = @MAINTAINER_MODE_FALSE@
+MAINTAINER_MODE_TRUE = @MAINTAINER_MODE_TRUE@
+MAKEINFO = @MAKEINFO@
+NEQN = @NEQN@
+OBJEXT = @OBJEXT@
+PACKAGE = @PACKAGE@
+PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
+PACKAGE_NAME = @PACKAGE_NAME@
+PACKAGE_STRING = @PACKAGE_STRING@
+PACKAGE_TARNAME = @PACKAGE_TARNAME@
+PACKAGE_VERSION = @PACKAGE_VERSION@
+PATH_SEPARATOR = @PATH_SEPARATOR@
+RANLIB = @RANLIB@
+SET_MAKE = @SET_MAKE@
+SHELL = @SHELL@
+STRIP = @STRIP@
+TBL = @TBL@
+VERSION = @VERSION@
+YACC = @YACC@
+ac_ct_CC = @ac_ct_CC@
+ac_ct_CXX = @ac_ct_CXX@
+ac_ct_F77 = @ac_ct_F77@
+ac_ct_RANLIB = @ac_ct_RANLIB@
+ac_ct_STRIP = @ac_ct_STRIP@
+am__fastdepCC_FALSE = @am__fastdepCC_FALSE@
+am__fastdepCC_TRUE = @am__fastdepCC_TRUE@
+am__fastdepCXX_FALSE = @am__fastdepCXX_FALSE@
+am__fastdepCXX_TRUE = @am__fastdepCXX_TRUE@
+am__include = @am__include@
+am__leading_dot = @am__leading_dot@
+am__quote = @am__quote@
+bindir = @bindir@
+build = @build@
+build_alias = @build_alias@
+build_cpu = @build_cpu@
+build_os = @build_os@
+build_vendor = @build_vendor@
+datadir = @datadir@
+exec_prefix = @exec_prefix@
+host = @host@
+host_alias = @host_alias@
+host_cpu = @host_cpu@
+host_os = @host_os@
+host_vendor = @host_vendor@
+includedir = @includedir@
+infodir = @infodir@
+install_sh = @install_sh@
+libdir = @libdir@
+libexecdir = @libexecdir@
+localstatedir = @localstatedir@
+mandir = @mandir@
+oldincludedir = @oldincludedir@
+prefix = @prefix@
+program_transform_name = @program_transform_name@
+sbindir = @sbindir@
+sharedstatedir = @sharedstatedir@
+sysconfdir = @sysconfdir@
+target_alias = @target_alias@
 
-SHELL = /bin/sh
+INCLUDES = -I$(top_srcdir)/hdf/src        \
+         -I$(top_srcdir)/mfhdf/libsrc   \
+         -I$(top_srcdir)/mfhdf/port     \
+         -I../libsrc
 
-INSTALL = ${TOP_SRCDIR}/install-sh -c
-INSTALL_PROGRAM = $(INSTALL)
-INSTALL_DATA = $(INSTALL) -m 644
+DEFINES = -DNDEBUG -DHDF
+AM_CPPFLAGS = $(INCLUDES) $(DEFINES)
 
-# /usr/local/bin/m4 (GNU version?)
-M4   = /usr/local/bin/m4
-# /usr/local/bin/perl (GNU version?)
-PERL = /usr/local/bin/perl
 
-# Name of achive randomizer, usually ranlib (use 'touch' if non-existant)
-RANLIB = ranlib
+#############################################################################
+#############################################################################
+bin_PROGRAMS = hdp
 
-# Name of library archiver and flags to send, default 'AR=ar', 'ARFLAGS=r'
-AR = ar
-ARFLAGS = rc
+hdp_SOURCES = hdp.c hdp_dump.c hdp_gr.c hdp_list.c hdp_rig.c hdp_sds.c      \
+              hdp_util.c hdp_vd.c hdp_vg.c show.c
 
-# Name of remove utility, default 'RM=/bin/rm', 'RMFLAGS=-f'
-RM = /bin/rm
-RMFLAGS = -f
+hdp_LDADD = ../libsrc/libmfhdf.a $(top_builddir)/hdf/src/libdf.a @LIBS@
+hdp_DEPENDENCIES = $(top_builddir)/hdf/src/libdf.a ../libsrc/libmfhdf.a
 
-AS = as
-CC = gcc
-CFLAGS = -ansi
-FC = f77
-FFLAGS=
 
-# Set for document generation
-MAKEINFO = makeinfo
-TEXI2DVI = texi2dvi
+#############################################################################
+#############################################################################
+check_SCRIPTS = testhdp.sh
+subdir = mfhdf/dumper
+ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
+mkinstalldirs = $(SHELL) $(top_srcdir)/bin/mkinstalldirs
+CONFIG_HEADER = $(top_builddir)/hdf/src/h4config.h
+CONFIG_CLEAN_FILES = testhdp.sh
+bin_PROGRAMS = hdp$(EXEEXT)
+PROGRAMS = $(bin_PROGRAMS)
 
-# Directory in which to install binaries
-bindir = $(exec_prefix)/bin
+am_hdp_OBJECTS = hdp.$(OBJEXT) hdp_dump.$(OBJEXT) hdp_gr.$(OBJEXT) \
+	hdp_list.$(OBJEXT) hdp_rig.$(OBJEXT) hdp_sds.$(OBJEXT) \
+	hdp_util.$(OBJEXT) hdp_vd.$(OBJEXT) hdp_vg.$(OBJEXT) \
+	show.$(OBJEXT)
+hdp_OBJECTS = $(am_hdp_OBJECTS)
+hdp_LDFLAGS =
 
-# Directory in which to install header files.
-includedir = $(prefex)/include
+DEFAULT_INCLUDES =  -I. -I$(srcdir) -I$(top_builddir)/hdf/src
+depcomp = $(SHELL) $(top_srcdir)/bin/depcomp
+am__depfiles_maybe = depfiles
+ at AMDEP_TRUE@DEP_FILES = ./$(DEPDIR)/hdp.Po ./$(DEPDIR)/hdp_dump.Po \
+ at AMDEP_TRUE@	./$(DEPDIR)/hdp_gr.Po ./$(DEPDIR)/hdp_list.Po \
+ at AMDEP_TRUE@	./$(DEPDIR)/hdp_rig.Po ./$(DEPDIR)/hdp_sds.Po \
+ at AMDEP_TRUE@	./$(DEPDIR)/hdp_util.Po ./$(DEPDIR)/hdp_vd.Po \
+ at AMDEP_TRUE@	./$(DEPDIR)/hdp_vg.Po ./$(DEPDIR)/show.Po
+COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \
+	$(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
+CCLD = $(CC)
+LINK = $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@
+DIST_SOURCES = $(hdp_SOURCES)
+DIST_COMMON = README $(srcdir)/Makefile.in Makefile.am testhdp.sh.in
+SOURCES = $(hdp_SOURCES)
 
-# Directory in which to install library files.
-libdir = $(prefix)/lib
+all: all-am
 
-# Directory in which to install documentation info files.
-infodir = $(prefix)/info
-
-# ------------ General Macros for NETCDF --------------------
-INCDIR	 = $(prefix)/include
-HDF_LIB  = $(TOP_SRCDIR)/hdf/src/libdf.a
-HDF_INC  = $(TOP_SRCDIR)/hdf/src/
-PABLO_HINC = $(TOP_SRCDIR)/hdf/pablo
-FMPOOL_INC = $(TOP_SRCDIR)/hdf/fmpool
-JPEG_LIB = $(TOP_SRCDIR)/hdf/jpeg/libjpeg.a
-ZLIB_LIB = $(TOP_SRCDIR)/hdf/zlib/libz.a
-NETCDF_INC = $(TOP_SRCDIR)/mfhdf/libsrc
-PORT_INC   = $(TOP_SRCDIR)/mfhdf/port
-CPP	   = $(CC) -E
-CFLAGS_NETCDF = 
-CPPFLAGS_HDF  = -DNDEBUG -DHDF $(FMPOOL_FLAGS)
-CPP_NETCDF    = -I. -I$(HDF_INC) -I$(NETCDF_INC) -I$(PORT_INC)
-CPPFLAGS_LIB	= $(SWAP) $(NETLONG) 
-CPPFLAGS_XDR	= $(CPP_XDR) 
-CPPFLAGS_NETCDF =  $(CPPFLAGS_XDR) $(CPP_NETCDF) $(CPPFLAGS_LIB) $(CPPFLAGS_HDF) 
-FFLAGS  =
-NCDUMP	= 
-NCGEN	= 
-NEQN	= neqn
-OS	= 
-TBL	= tbl
-WHICH	= which
-FTPDIR	= 
-VERSION	= 2.3.2
-LEX	= lex
-YACC	= yacc
-DIFF    = diff
-DIFF_FLAGS = -w
-
-
-#### ----- host and target specific makefile fragments come in here.-------
-### ------------------- end of makefile fragments -------------------------
-# ############# End of system configuration section. ###############
-
-PROGRAM		= hdp
-BINFILES	= $(PROGRAM)
-#HDF_LIB         = @HDF_LIB@
-#HDF_INC         = @HDF_INC@
-#JPEG_LIB        = @JPEG_LIB@
-#CPP_NETCDF	= -I../libsrc -I../port $(HDF_INC)
-#CPPFLAGS	= $(CPPFLAGS_HDP)
-#CFLAGS		= @CFLAGS@
-#FFLAGS		= @FFLAGS@
-MANIFEST = $(DISTFILES)
-DISTFILES	= Makefile.in depend hdp.h hdp.c hdp_list.c hdp_sds.c hdp_util.c hdp_vd.c hdp_vg.c hdp_rig.c show.c hdp_dump.c hdp_gr.c
-MANUALS		= 
-LIBNAME		= mfhdf
-LD_NETCDF	= ../libsrc/libmfhdf.a
-OBJS		=  hdp.o hdp_list.o hdp_sds.o hdp_util.o hdp_vd.o hdp_vg.o hdp_rig.o show.o hdp_dump.o hdp_gr.o
-#LD_XDR		= @LD_XDR@
-LD_NETCDF	= -L../libsrc -lmfhdf
-LIBS		= $(LD_NETCDF) $(LD_XDR) $(HDF_LIB) $(LIBSX) $(JPEG_LIB) $(ZLIB_LIB)
-prefix		= ../../..
-GARBAGE		= $(PROGRAM) *.o
-
-#all::		$(PROGRAM)
-all::         FORCE
-	@if test -z "$(FMPOOL_FLAGS)"; then \
-	  $(MAKE) $(MFLAGS) $(LOCAL_MACROS) $(PROGRAM); \
-	else		 \
-	  $(MAKE) $(MFLAGS) $(LOCAL_MACROS) FMPOOL_FLAGS="$(FMPOOL_FLAGS) -I$(FMPOOL_INC)" $(PROGRAM); \
-	fi
-
-debug:  $(PROGRAM)  ../libsrc/libmfhdf.a
-	purify $(CC) $(CFLAGS) $(CFLAGS_NETCDF) $(OBJS) $(LIBS) -o phdp
-
-
-test: hdp
-	sh testhdp.sh
-
-install::	installed_program installed_manuals
-install-utils::	installed_program
-install-man::	installed_manuals
-
-# This is the master.mk.in makefile.  It contains general rules.
-#
-
 .SUFFIXES:
-.SUFFIXES:	.so .o .i .c .fc .f .F .l .y
+.SUFFIXES: .c .o .obj
+$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ Makefile.am  $(top_srcdir)/configure.ac $(ACLOCAL_M4)
+	cd $(top_srcdir) && \
+	  $(AUTOMAKE) --foreign  mfhdf/dumper/Makefile
+Makefile: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.in  $(top_builddir)/config.status
+	cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)
+testhdp.sh: $(top_builddir)/config.status testhdp.sh.in
+	cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@
+binPROGRAMS_INSTALL = $(INSTALL_PROGRAM)
+install-binPROGRAMS: $(bin_PROGRAMS)
+	@$(NORMAL_INSTALL)
+	$(mkinstalldirs) $(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
 
-# ###########################################################################
-# General Macros: (moved to make file fragment )
-# ###########################################################################
-#CPP		= @CPP@
-#NCDUMP		= @NCDUMP@
-#NCGEN		= @NCGEN@
-#NEQN		= @NEQN@
-#OS		= @OS@
-#TBL		= @TBL@
-#WHICH		= @WHICH@
+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
 
-# ###########################################################################
-# Recursive Macros (command-line changes to others aren't supported):
-# ###########################################################################
-SUBDIR_MACROS = CC="$(CC)" \
-	CFLAGS="$(CFLAGS)" \
-	CPP="$(CPP)" \
-	exec_prefix="$(exec_prefix)" \
-	FC="$(FC)" \
-	prefix="$(prefix)"
+clean-binPROGRAMS:
+	-test -z "$(bin_PROGRAMS)" || rm -f $(bin_PROGRAMS)
+hdp$(EXEEXT): $(hdp_OBJECTS) $(hdp_DEPENDENCIES) 
+	@rm -f hdp$(EXEEXT)
+	$(LINK) $(hdp_LDFLAGS) $(hdp_OBJECTS) $(hdp_LDADD) $(LIBS)
 
-LOCAL_MACROS  = CC="$(CC)" \
-	CFLAGS="$(CFLAGS)" \
-	CPP="$(CPP)" \
-	CPPFLAGS="$(CPPFLAGS)" \
-	exec_prefix="$(exec_prefix)" \
-	FC="$(FC)" \
-	prefix="$(prefix)"
+mostlyclean-compile:
+	-rm -f *.$(OBJEXT) core *.core
 
-# ###########################################################################
-# Recursive make(1)s in Subdirectories:
-# ###########################################################################
+distclean-compile:
+	-rm -f *.tab.c
 
-subdir_dummy_target $(SUBDIR_TARGETS):
-	@echo ""
-	@dir=`echo $@ | sed 's,/.*,,'`; \
-	    target=`echo $@ | sed "s,$$dir/,,"`; \
-	    cd $$dir && \
-	    echo "making \`$$target' in directory `pwd`" && \
-	    echo "" && \
-	    $(MAKE) $(MFLAGS) $(SUBDIR_MACROS) \
-		$$target || exit 1
-	@echo ""
-	@echo "returning to directory `pwd`"
-	@echo ""
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/hdp.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/hdp_dump.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/hdp_gr.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/hdp_list.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/hdp_rig.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/hdp_sds.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/hdp_util.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/hdp_vd.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/hdp_vg.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/show.Po at am__quote@
 
-
-# ###########################################################################
-# Compilation:
-# ###########################################################################
-#FORTC		= @FORTC@
-
-# Compile FORTRAN code.
-#
-.f.o:
-	$(FC) -c $(FFLAGS) $<
-.F.o:
-	ln -s $< $$$$.c \
-	&& $(CPP) -DUD_FORTRAN_SOURCE $(CPPFLAGS) $(CPPFLAGS_NETCDF) $$$$.c \
-	    | sed '/^# *[0-9]/d' > $*.f \
-	|| (rm -f $*.f $$$$.c; exit 1) \
-	&& rm $$$$.c
-	$(FC) -c $(FFLAGS) $*.f
-.F.f:
-	ln -s $< $$$$.c \
-	&& $(CPP) -DUD_FORTRAN_SOURCE $(CPPFLAGS) $(CPPFLAGS_NETCDF) $$$$.c \
-	    | sed '/^# *[0-9]/d' > $@ \
-	|| (rm -f $@ $$$$.c; exit 1) \
-	&& rm $$$$.c
-
-# Generate FORTRAN-callable C code.
-#
-.fc.o:
-	$(FORTC) -O $(OS) $< > $*.c \
-	    || ( rm -f $*.c; exit 1)
-	$(CC) -c $(CFLAGS) $(CFLAGS_NETCDF) $(CPPFLAGS) $(CPPFLAGS_NETCDF) $*.c
-.fc.c:
-	$(FORTC) -O $(OS) $< > $@ \
-	    || (rm -f $*.c; exit 1)
-
-# Compile C code.
-#
 .c.o:
-	$(CC) -c $(CPPFLAGS) $(CPPFLAGS_NETCDF) $(CFLAGS) $(CFLAGS_NETCDF) $<
+ at am__fastdepCC_TRUE@	if $(COMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" \
+ at am__fastdepCC_TRUE@	  -c -o $@ `test -f '$<' || echo '$(srcdir)/'`$<; \
+ at am__fastdepCC_TRUE@	then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; \
+ at am__fastdepCC_TRUE@	else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; \
+ at am__fastdepCC_TRUE@	fi
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	depfile='$(DEPDIR)/$*.Po' tmpdepfile='$(DEPDIR)/$*.TPo' @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	$(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCC_FALSE@	$(COMPILE) -c `test -f '$<' || echo '$(srcdir)/'`$<
 
-# Compile lex(1) code.  This rule is here to ensure the use of CPPFLAGS.
-# 
-.l.o:
-	rm -f $*.c
-	$(LEX) -t $< > $*.c
-	$(CC) -c $(CPPFLAGS) $(CPPFLAGS_NETCDF) $(CFLAGS) $(CFLAGS_NETCDF) $*.c
-	rm $*.c
+.c.obj:
+ at am__fastdepCC_TRUE@	if $(COMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" \
+ at am__fastdepCC_TRUE@	  -c -o $@ `if test -f '$<'; then $(CYGPATH_W) '$<'; else $(CYGPATH_W) '$(srcdir)/$<'; fi`; \
+ at am__fastdepCC_TRUE@	then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; \
+ at am__fastdepCC_TRUE@	else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; \
+ at am__fastdepCC_TRUE@	fi
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	depfile='$(DEPDIR)/$*.Po' tmpdepfile='$(DEPDIR)/$*.TPo' @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	$(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCC_FALSE@	$(COMPILE) -c `if test -f '$<'; then $(CYGPATH_W) '$<'; else $(CYGPATH_W) '$(srcdir)/$<'; fi`
+uninstall-info-am:
 
-# C preprocess.  
-#   NB: 
-#	1. The output `file' is not created but appears on standard output;
-#	2. Line numbering information is kept.
-#
-.c.i:
-	$(CPP) $(CPPFLAGS) $(CPPFLAGS_NETCDF) $<
+ETAGS = etags
+ETAGSFLAGS =
 
+CTAGS = ctags
+CTAGSFLAGS =
 
-# ###########################################################################
-# Libraries:
-# ###########################################################################
-# RANLIB		= @RANLIB@
-LIBDIR		= $(prefix)/lib
-LIB_A		= lib$(LIBRARY).a
+tags: TAGS
 
-library::		$(LIB_A)
+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; } \
+	       END { for (i in files) print i; }'`; \
+	mkid -fID $$unique
 
-# The following rule is forced because the library can be created by a
-# makefile in another directory prior to the execution of the following rule.
-#
-$(LIB_A):		$(LIBOBJS) FORCE
-	$(AR) rcuv $@ $(LIBOBJS)
-	$(RANLIB) $@
+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; } \
+	       END { for (i in files) print i; }'`; \
+	test -z "$(ETAGS_ARGS)$$tags$$unique" \
+	  || $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
+	     $$tags $$unique
 
-# The following rule is for those makefiles needing to install object
-# modules in a library in another directory.  They need only define 
-# REMOTE_LIBRARY and LIBOBJS.  The rule is forced for the same reason as the
-# $(LIB_A) rule.
-#
-lib_dummy $(REMOTE_LIBRARY):	$(LIBOBJS) FORCE
-	$(AR) rcuv $@ $(LIBOBJS)
-	$(RANLIB) $@
+ctags: CTAGS
+CTAGS:  $(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; } \
+	       END { for (i in files) print i; }'`; \
+	test -z "$(CTAGS_ARGS)$$tags$$unique" \
+	  || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
+	     $$tags $$unique
 
-installed_libfiles:	FORCE
-	@if [ -n "$(LIBFILES)" ]; then \
-	    libfiles="$(LIBFILES)"; \
-	    for libfile in $$libfiles; do \
-		$(MAKE) $(MFLAGS) $(LOCAL_MACROS) \
-		    LIBDIR=$(LIBDIR) LIBFILE=$$libfile \
-		    installed_libfile || exit 1; \
-	    done; \
-	else \
-	    :; \
-	fi
+GTAGS:
+	here=`$(am__cd) $(top_builddir) && pwd` \
+	  && cd $(top_srcdir) \
+	  && gtags -i $(GTAGS_ARGS) $$here
 
-installed_library::	FORCE
-	@$(MAKE) $(MFLAGS) $(LOCAL_MACROS) \
-	    LIBDIR=$(LIBDIR) LIBFILE=$(LIB_A) \
-	    installed_libfile
+distclean-tags:
+	-rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
+DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
 
-# The following target decouples the previous targets from the actual rule;
-# thus, eliminating extraneous make(1) messages.
-#
-installed_libfile:	$(LIBDIR)/$(LIBFILE)
+top_distdir = ../..
+distdir = $(top_distdir)/$(PACKAGE)-$(VERSION)
 
-$(LIBDIR)/$(LIBFILE):	$(LIBDIR) $(LIBFILE)
-	$(INSTALL_DATA) $(LIBFILE) $@
-
-dummy_libdir $(LIBDIR):
-	mkdir -p $@
-	chmod u+rwx,g+rws,o=rx $@
-
-LIB_SO		= lib$(LIBRARY).so.$(MAJOR_NO).$(MINOR_NO)
-LIB_SA		= lib$(LIBRARY).sa.$(MAJOR_NO).$(MINOR_NO)
-
-#library::		FORCE
-#	@so_objs=`echo $(LIBOBJS) | sed 's/\.o/.so/g'`; \
-#	if [ -z "$$so_objs" ]; then \
-#	    :; \
-#	else \
-#	    $(MAKE) $(MFLAGS) $(LIB_SO) \
-#		SO_OBJS="$$so_objs"; \
-#	fi
-#	@if [ -z "$(SA_OBJS)" ]; then \
-#	    :; \
-#	else \
-#	    $(MAKE) $(MFLAGS) $(LIB_SA); \
-#	fi
-
-$(LIB_SO):	$(SO_OBJS)
-	ld -assert pure-text $(SO_OBJS) -o $@
-$(LIB_SA):	$(SA_OBJS) FORCE
-	$(AR) rcuv $@ $(SA_OBJS)
-
-.fc.so:
-	$(FORTC) -O $(OS) $< > $*.c \
-	    || (rm -f $*.c; exit 1)
-	$(CC) -c -pic $(CFLAGS) $(CFLAGS_NETCDF) $(CPPFLAGS) $(CPPFLAGS_NETCDF) $*.c -o $$$$.o \
-	    || (rm -f $$$$.o; exit 1)
-	mv $$$$.o $@
-.c.so:
-	$(CC) -c -pic $(CFLAGS) $(CFLAGS_NETCDF) $(CPPFLAGS) $(CPPFLAGS_NETCDF) $< -o $$$$.o \
-	    || (rm -f $$$$.o; exit 1)
-	mv $$$$.o $@
-
-#installed_library::	$(LIBDIR)/$(LIB_SO)
-#	@if [ -z "$(SA_OBJS)" ]; then \
-#	    :; \
-#	else \
-#	    $(MAKE) $(MFLAGS) $(LIBDIR)/$(LIB_SA); \
-#	fi
-
-$(LIBDIR)/$(LIB_SO):	$(LIBDIR) $(LIB_SO)
-	$(INSTALL_DATA) $(LIB_SO) $(LIBDIR)/$(LIB_SO)
-$(LIBDIR)/$(LIB_SA):	$(LIBDIR) $(LIB_SA)
-	$(INSTALL_DATA) $(LIB_SA) $(LIBDIR)/$(LIB_SA)
-
-
-# ###########################################################################
-# Programs:
-# ###########################################################################
-BINDIR		= $(exec_prefix)/bin
-
-programs:	$(PROGRAMS)
-program:
-	@if [ -z "$(PROGRAM)" ]; then \
-	    : true; \
-	else \
-	    if [ -z "$(LIBRARY)" ]; then \
-		: true; \
-	    else \
-		$(MAKE) $(MFLAGS) $(LOCAL_MACROS) library; \
+distdir: $(DISTFILES)
+	@srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \
+	topsrcdirstrip=`echo "$(top_srcdir)" | sed 's|.|.|g'`; \
+	list='$(DISTFILES)'; for file in $$list; do \
+	  case $$file in \
+	    $(srcdir)/*) file=`echo "$$file" | sed "s|^$$srcdirstrip/||"`;; \
+	    $(top_srcdir)/*) file=`echo "$$file" | sed "s|^$$topsrcdirstrip/|$(top_builddir)/|"`;; \
+	  esac; \
+	  if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
+	  dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \
+	  if test "$$dir" != "$$file" && test "$$dir" != "."; then \
+	    dir="/$$dir"; \
+	    $(mkinstalldirs) "$(distdir)$$dir"; \
+	  else \
+	    dir=''; \
+	  fi; \
+	  if test -d $$d/$$file; then \
+	    if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
+	      cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \
 	    fi; \
-	    $(MAKE) $(MFLAGS) $(LOCAL_MACROS) $(PROGRAM); \
-	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
+	$(MAKE) $(AM_MAKEFLAGS) $(check_SCRIPTS)
+check: check-am
+all-am: Makefile $(PROGRAMS)
 
-dummy_prog $(PROGRAM):	$(OBJS)
-	@if [ -r $@.f -o -r $@.F ]; then \
-	    ld='$(FC) $(FFLAGS)'; \
-	else \
-	    ld='$(CC) $(CFLAGS) $(CFLAGS_NETCDF) '; \
-	fi; \
-	cmd="$$ld $(OBJS) $(LIBS) -o $@"; \
-	echo $$cmd; \
-	$$cmd \
-	    || (rm -f $@; exit 1)
+installdirs:
+	$(mkinstalldirs) $(DESTDIR)$(bindir)
+install: install-am
+install-exec: install-exec-am
+install-data: install-data-am
+uninstall: uninstall-am
 
-installed_programs:	FORCE
-	@$(MAKE) $(MFLAGS) $(LOCAL_MACROS) installed_binfiles \
-	    BINDIR=$(BINDIR) BINFILES="$(PROGRAMS)"
+install-am: all-am
+	@$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
 
-installed_binfiles:	FORCE
-	@if [ -n "$(BINFILES)" ]; then \
-	    binfiles="$(BINFILES)"; \
-	    for binfile in $$binfiles; do \
-		$(MAKE) $(MFLAGS) $(LOCAL_MACROS) \
-		    BINDIR=$(BINDIR) BINFILE=$$binfile \
-		    installed_binfile || exit 1; \
-	    done; \
-	else \
-	    :; \
-	fi
+installcheck: installcheck-am
+install-strip:
+	$(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
+	  INSTALL_STRIP_FLAG=-s \
+	  `test -z '$(STRIP)' || \
+	    echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
+mostlyclean-generic:
 
-installed_program:	FORCE
-	@$(MAKE) $(MFLAGS) $(LOCAL_MACROS) BINDIR=$(BINDIR) BINFILE=$(PROGRAM) \
-	    installed_binfile
+clean-generic:
 
-# The following target decouples the previous targets from the actual rule;
-# thus, eliminating extraneous make(1) messages.
-#
-installed_binfile:	$(BINDIR)/$(BINFILE)
+distclean-generic:
+	-rm -f $(CONFIG_CLEAN_FILES)
 
-$(BINDIR)/$(BINFILE):	$(BINDIR) $(BINFILE)
-	$(INSTALL_PROGRAM) $(BINFILE) $@
+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
 
-dummy_bindir $(BINDIR):
-	mkdir -p $@
-	chmod u+rwx,g+rws,o=rx $@
+clean-am: clean-binPROGRAMS clean-generic mostlyclean-am
 
+distclean: distclean-am
+	-rm -rf ./$(DEPDIR)
+	-rm -f Makefile
 
-# ###########################################################################
-# Header files:
-# ###########################################################################
-installed_headers:	FORCE
-	@if [ -n "$(HEADERS)" ]; then \
-	    headers="$(HEADERS)"; \
-	    for header in $$headers; do \
-		$(MAKE) $(MFLAGS) $(LOCAL_MACROS) INCDIR=$(INCDIR) HEADER=$$header \
-		    installed_header || exit 1; \
-	    done; \
-	else \
-	    :; \
-	fi
+distclean-am: clean-am distclean-compile distclean-generic \
+	distclean-tags
 
-# The following target decouples the previous targets from the actual rule;
-# thus, eliminating extraneous make(1) messages.
-#
-installed_header:	$(INCDIR)/$(HEADER)
+dvi: dvi-am
 
-$(INCDIR)/$(HEADER):	$(INCDIR) $(HEADER)
-	$(INSTALL_DATA) $(HEADER) $@
+dvi-am:
 
-dummy_incdir $(INCDIR):
-	mkdir -p $@
-	chmod u+rwx,g+rws,o=rx $@
+info: info-am
 
+info-am:
 
-# ###########################################################################
-# `etc/' files:
-# ###########################################################################
-ETCDIR	= $(prefix)/etc
+install-data-am:
 
-installed_etcfiles:
-	@if [ -n "$(ETCFILES)" ]; then \
-	    etcfiles="$(ETCFILES)"; \
-	    for etcfile in $$etcfiles; do \
-		$(MAKE) $(MFLAGS) $(LOCAL_MACROS) ETCDIR=$(ETCDIR) ETCFILE=$$etcfile \
-		    installed_etcfile || exit 1; \
-	    done; \
-	else \
-	    :; \
-	fi
+install-exec-am: install-binPROGRAMS
 
-# The following target decouples the previous targets from the actual rule;
-# thus, eliminating extraneous make(1) messages.
-#
-installed_etcfile:	$(ETCDIR)/$(ETCFILE)
+install-info: install-info-am
 
-$(ETCDIR)/$(ETCFILE):	$(ETCDIR) $(ETCFILE)
-	-mkdir -p $(ETCDIR)
-	-chmod u+rwx,g+rws,o=rx $(ETCDIR)
-	$(INSTALL_DATA) $(ETCFILE) $@
+install-man:
 
-# ###########################################################################
-# Manual Pages:
-# ###########################################################################
-MANDIR	= $(prefix)/man
+installcheck-am:
 
-installed_manuals:	FORCE
-	@if [ -n "$(MANUALS)" ]; then \
-	    manuals="$(MANUALS)"; \
-	    for manual in $$manuals; do \
-		mandir=$(MANDIR)/man`echo $$manual | sed 's/.*\.\(.\).*/\1/'`; \
-		$(MAKE) $(MFLAGS) $(LOCAL_MACROS) MANDIR=$$mandir MANUAL=$$manual \
-		    installed_manual || exit 1; \
-	    done; \
-	else \
-	    :; \
-	fi
+maintainer-clean: maintainer-clean-am
+	-rm -rf ./$(DEPDIR)
+	-rm -f Makefile
 
-# The following target decouples the previous targets from the actual rule;
-# thus, eliminating extraneous make(1) messages.
-#
-installed_manual:	$(MANDIR)/$(MANUAL)
+maintainer-clean-am: distclean-am maintainer-clean-generic
 
-# The first sed(1) editing command in the following replaces the expanded
-# RCS keyword `$Date ...' in the `.TH' macro line with something more 
-# appropriate to a manual page.
-#
-$(MANDIR)/$(MANUAL):	$(MANDIR) $(MANUAL)
-	sed \
-	 -e '/^\.TH/s/$$D\ate: \([0-9]*\)\/\([0-9]*\)\/\([0-9]*\).*\$$/\1-\2-\3/'\
-	 $(MANUAL) | $(TBL) | $(NEQN) > $@
+mostlyclean: mostlyclean-am
 
-dummy_mandir $(MANDIR):
-	mkdir -p $@
-	chmod u+rwx,g+rws,o=rx $@
+mostlyclean-am: mostlyclean-compile mostlyclean-generic
 
-# ###########################################################################
-# TeX-Info Pages:
-# ###########################################################################
-INFODIR       = $(prefix)/info
+pdf: pdf-am
 
-installed_infos:      FORCE
-	if [ -z "$(MAKEINFO)" ]; then \
-		echo 1>&2 "Can't install info(1) pages because no makeinfo(1)"; \
-	else \
-	  if [ -n "$(INFOS)" ]; then \
-	      infos="$(INFOS)"; \
-	      for info in $$infos; do \
-		$(MAKE) $(MFLAGS) $(LOCAL_MACROS) INFODIR=$(INFODIR) INFO=$$info \
-		installed_info || exit 1; \
-	      done; \
-	   else \
-	      :; \
-	   fi; \
-	fi;
-# The following target decouples the previous targets from the actual rule;
-# thus, eliminating extraneous make(1) messages.
-#
-installed_info:       $(INFODIR)/$(INFO)
+pdf-am:
 
-$(INFODIR)/$(INFO):   $(INFODIR) $(INFO)
-	-mkdir -p $(INFODIR)
-	-chmod u+rwx,g+rws,o=rx $(INFODIR)
-	$(INSTALL_DATA) $(INFO) $@
+ps: ps-am
 
-# Rules for generating info pages:
-#
-.SUFFIXES:    .info .texi .texinfo .txn
-.texi.info:
-	@if [ -z "$(MAKEINFO)" ]; then \
-	  echo 1>&2 "Can't create $@ because no makeinfo(1)"; \
-	else \
-	  $(MAKEINFO) $< --no-split --output=$@; \
-	fi
-.texinfo.info:
-	@if [ -z "$(MAKEINFO)" ]; then \
-	  echo 1>&2 "Can't create $@ because no makeinfo(1)"; \
-	else \
-	  $(MAKEINFO) $< --no-split --output=$@; \
-	fi
-.txn.info:
-	@if [ -z "$(MAKEINFO)" ]; then \
-	  echo 1>&2 "Can't create $@ because no makeinfo(1)"; \
-	else \
-	  $(MAKEINFO) $< --no-split --output=$@; \
-	fi
+ps-am:
 
-# Ensure that info page depends on canonical TeX-Info macros.
-#
-dummy_info $(INFO):   texinfo.tex
+uninstall-am: uninstall-binPROGRAMS uninstall-info-am
 
-# ###########################################################################
-# Cleanup:
-# ###########################################################################
-clean::
-	rm -f $(GARBAGE) $(PROGRAM) a.out core *.o *.a *.so.* *.sa.* *.so \
-	    *.log
+.PHONY: CTAGS GTAGS all all-am check check-am clean clean-binPROGRAMS \
+	clean-generic ctags distclean distclean-compile \
+	distclean-generic distclean-tags distdir dvi dvi-am info \
+	info-am install install-am install-binPROGRAMS install-data \
+	install-data-am install-exec install-exec-am install-info \
+	install-info-am install-man 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 uninstall-info-am
 
-realclean::	distclean
-distclean::
-	rm -f $(GARBAGE) $(PROGRAM) a.out core *.o *.a *.so.* *.sa.* *.so \
-	    *.log Makefile config.status cc_id tags
 
-
-# ###########################################################################
-# Configuration:
-# ###########################################################################
-
-# The following target is touched because config.status won't update it if
-# it hasn't changed.
-#
-# The following is commented-out because the HPUX make(1) goes into a loop.
-#
-#Makefile:	config.status
-#	./config.status
-#	touch $@
-
-config.status:	cc_id configure
-	./configure --no-create
-
-cc_id:		FORCE
-	if test -r $@ && test "`cat $@`" = "$(CC)"; then \
-	    :; \
-	else \
-	    echo "$(CC)" > $@; \
-	fi
-
-configure:		configure.in
-	autoconf
-
-
-# ###########################################################################
-# Dependency maintenance:
-# ###########################################################################
-.PRECIOUS:	depend
-#
-# Note: The following rule will only work if the C compiler behaves correctly
-# when given the `-M' option.  AIX's cc(1) and SunOS's acc(1) behave
-# incorrectly.  --Steve Emmerson 1992-09-24
-#
-# Furthermore, we do not attempt to maintain dependencies on installed
-# header files (e.g. those in $(INCDIR)) for two reasons: 1) the dependency
-# list generated at Unidata mightn't correspond to the situation at a client
-# site; and 2) clients using broken compilers (c.f. previous note) can't
-# regenerate the dependency list.
-#
-disabled_depend:		FORCE
-	-incdir=`echo $(INCDIR) | sed s',/,\\\/,g'`; \
-	cc -M $(CPPFLAGS) $(CPPFLAGS_NETCDF) *.c 2> /dev/null | \
-	    awk '{ \
-		if ($$0 ~ /:/) { \
-		    target	= $$1; \
-		    if (target ~ /:/) { \
-			target	= substr(target,1,length(target)-1); \
-			start	= 2; \
-		    } else { \
-			start	= 3; \
-		    } \
-		} else { \
-		    start	= 1; \
-		} \
-		for (i = start; i <= NF; ++i) { \
-		    if ($$i !~ /^\\/ && \
-			$$i !~ /port\// && \
-			$$i !~ /^\//) \
-			print target ": " $$i \
-		} \
-	    }' > $@
-	tag='### DO NOT DELETE THIS LINE.  make depend DEPENDS ON IT ###'; \
-	    sed -e "/^$$tag$$/r depend" \
-		-e "/^$$tag$$/q" Makefile > Makefile.new
-	mv Makefile.new Makefile
-
-
-# ###########################################################################
-# Distributions:
-# ###########################################################################
-#FTPDIR		= @FTPDIR@
-#VERSION		= @VERSION@
-
-ftp:		$(FTPDIR)/$(PACKAGE)-$(VERSION).tar.Z
-	test ! -h $(FTPDIR)/$(PACKAGE).tar.Z && exit 0; \
-	cd $(FTPDIR) || exit 1; \
-	rm $(PACKAGE).tar.Z || exit 1; \
-	ln -s $(PACKAGE)-$(VERSION).tar.Z $(PACKAGE).tar.Z;
-
-$(FTPDIR)/$(PACKAGE)-$(VERSION).tar.Z:	$(PACKAGE)-$(VERSION).tar.Z
-	cp $(PACKAGE)-$(VERSION).tar.Z $@ 
-	chmod u+rw,g+rw,o=r $@
-
-tar.Z:		$(PACKAGE)-$(VERSION).tar.Z
-
-$(PACKAGE)-$(VERSION).tar.Z:	MANIFEST
-	dir=`basename \`pwd\`` \
-	&& id=$(PACKAGE)-$(VERSION) \
-	&& cd .. \
-	&& ln -s $$dir $$id \
-	&& tar -chof - `sed "s|^|$$id/|" $$id/MANIFEST` \
-	    | compress > $$id/$@ \
-	&& rm $$id
-
-MANIFEST:	FORCE
-	@echo 1>&2 Creating MANIFEST
-	@$(MAKE) -s $(MFLAGS) $(LOCAL_MACROS) MANIFEST.echo > $@
-
-MANIFEST.echo:	FORCE
-	@$(MAKE) -s $(MFLAGS) $(LOCAL_MACROS) \
-	    MANIFEST=`echo $(MANIFEST) | sed 's/MANIFEST//'` \
-	    ensure_manifest > /dev/null
-	@echo $(MANIFEST) | fmt -1
-	@if [ -n "$(SUBDIRS)" ]; then \
-	    subdirs="$(SUBDIRS)"; \
-	    for subdir in $$subdirs; do \
-		(cd $$subdir && \
-	        echo 1>&2 Creating $@ in `pwd` && \
-		$(MAKE) $(MFLAGS) $(LOCAL_MACROS) MANIFEST.echo | \
-		    sed "s|^|$$subdir/|") || exit 1; \
-	    done; \
-	else \
-	    :; \
-	fi
-
-ensure_manifest:	$(MANIFEST)
-
-# for distribution creation
-distdir = $(TOP_SRCDIR)/$(PACKAGE)-$(VERSION)/$(curdir)
-curdir = mfhdf/dumper
-dist: $(DISTFILES)
-	@for file in $(DISTFILES); do \
-	  ln $(srcdir)/$$file $(distdir)/$$file 2> /dev/null \
-	    || { echo copying $$file instead; \
-	    cp -p $(srcdir)/$$file $(distdir)/$$file;}; \
-	done
-
-# ###########################################################################
-# Miscellaneous:
-# ###########################################################################
-
-# The following dummy target is useful as a dependency to ensure that a
-# rule is always executed.
-#
-FORCE:
-
-# Override the default definition for ncgen(1) in the master makefile.
-#
-NCGEN		= ../ncgen/ncgen
-
-### Everything after the following line might be overwritten ###
-### DO NOT DELETE THIS LINE.  make depend DEPENDS ON IT ###
-include depend
+check:
+	@$(SHELL) ./testhdp.sh
+# 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:

Deleted: packages/libhdf4/branches/upstream/current/mfhdf/dumper/Makefile.in_orig
===================================================================
--- packages/libhdf4/branches/upstream/current/mfhdf/dumper/Makefile.in_orig	2007-05-15 09:05:29 UTC (rev 830)
+++ packages/libhdf4/branches/upstream/current/mfhdf/dumper/Makefile.in_orig	2007-05-15 09:53:05 UTC (rev 831)
@@ -1,40 +0,0 @@
-# Makefile for HDF dumper(1).
-#
-# Makefile.in,v 1.2 1994/05/19 20:18:53 sxu Exp
-
-PROGRAM		= hdp
-BINFILES	= $(PROGRAM)
-HDF_LIB         = @HDF_LIB@
-HDF_INC         = @HDF_INC@
-JPEG_LIB        = @JPEG_LIB@
-CPP_NETCDF	= -I../libsrc -I../port $(HDF_INC)
-CPPFLAGS	= $(CPP_NETCDF) @CPPFLAGS@
-CFLAGS		= @CFLAGS@
-FFLAGS		= @FFLAGS@
-MANIFEST	= Makefile.in depend hdp.h hdp.c hdp_list.c hdp_sds.c hdp_util.c hdp_vd.c hdp_vg.c hdp_rig.c show.c hdp_dump.c
-MANUALS		= 
-LIBNAME		= netcdf
-LD_NETCDF	= ../libsrc/libnetcdf.a
-OBJS		=  hdp.o hdp_list.o hdp_sds.o hdp_util.o hdp_vd.o hdp_vg.o hdp_rig.o show.o hdp_dump.o
-LD_XDR		= @LD_XDR@
-LD_NETCDF	= -L../libsrc -lnetcdf
-LIBS		= $(LD_NETCDF) $(LD_XDR) $(HDF_LIB) $(LIBSX) $(JPEG_LIB)
-prefix		= ../../..
-GARBAGE		= $(PROGRAM) *.o
-
-all::		$(PROGRAM)
-
-
-test:	echo "*** there is no testing for $(PROGRAM) ***" ; 
-
-install::	installed_program installed_manuals
-
-include ../port/master.mk
-
-# Override the default definition for ncgen(1) in the master makefile.
-#
-NCGEN		= ../ncgen/ncgen
-
-### Everything after the following line might be overwritten ###
-### DO NOT DELETE THIS LINE.  make depend DEPENDS ON IT ###
-include depend

Modified: packages/libhdf4/branches/upstream/current/mfhdf/dumper/TEST.COM
===================================================================
--- packages/libhdf4/branches/upstream/current/mfhdf/dumper/TEST.COM	2007-05-15 09:05:29 UTC (rev 830)
+++ packages/libhdf4/branches/upstream/current/mfhdf/dumper/TEST.COM	2007-05-15 09:53:05 UTC (rev 831)
@@ -60,6 +60,9 @@
 $ hdp dumpgr grtdfui162.hdf
 $ hdp dumpgr grtdfi322.hdf
 $ hdp dumpgr -p image_with_palette.hdf
-$ hdp dumpgr -p -h image_with_palette.hdf
-$ hdp dumpgr -r 2,4 -p -d image_with_palette.hdf
+$ hdp dumpgr -h image_with_palette.hdf
+$ hdp dumpgr -r 2,4 -pd image_with_palette.hdf
+$ hdp dumpgr -r 6 -d -s grtdfui82.hdf
+$ hdp dumpgr -r 6 -m 1 grtdfui82.hdf
+$ hdp dumpgr -c grtdfi322.hdf
 $ exit

Deleted: packages/libhdf4/branches/upstream/current/mfhdf/dumper/ctxtr2r.hdf
===================================================================
(Binary files differ)

Deleted: packages/libhdf4/branches/upstream/current/mfhdf/dumper/depend
===================================================================
--- packages/libhdf4/branches/upstream/current/mfhdf/dumper/depend	2007-05-15 09:05:29 UTC (rev 830)
+++ packages/libhdf4/branches/upstream/current/mfhdf/dumper/depend	2007-05-15 09:53:05 UTC (rev 831)
@@ -1,132 +0,0 @@
-hdp.o: hdp.c
-hdp.o: hdp.h
-hdp.o: ../../hdf/src//hdf.h
-hdp.o: ../../hdf/src//hdfi.h
-hdp.o: ../../hdf/src//hlimits.h
-hdp.o: ../../hdf/src//hntdefs.h
-hdp.o: ../../hdf/src//htags.h
-hdp.o: ../../hdf/src//hbitio.h
-hdp.o: ../../hdf/src//hcomp.h
-hdp.o: ../../hdf/src//herr.h
-hdp.o: ../../hdf/src//hproto.h
-hdp.o: ../../hdf/src//hfile.h
-hdp_dump.o: hdp_dump.c
-hdp_dump.o: ../../mfhdf/libsrc/mfhdf.h
-hdp_dump.o: ../../mfhdf/libsrc/local_nc.h
-hdp_dump.o: ../../mfhdf/libsrc/netcdf.h
-hdp_dump.o: ../../hdf/src//hlimits.h
-hdp_dump.o: ../../hdf/src//hdf.h
-hdp_dump.o: ../../hdf/src//hdfi.h
-hdp_dump.o: ../../hdf/src//hntdefs.h
-hdp_dump.o: ../../hdf/src//htags.h
-hdp_dump.o: ../../hdf/src//hbitio.h
-hdp_dump.o: ../../hdf/src//hcomp.h
-hdp_dump.o: ../../hdf/src//herr.h
-hdp_dump.o: ../../hdf/src//hproto.h
-hdp_dump.o: ../../hdf/src//vg.h
-hdp_dump.o: ../../hdf/src//hfile.h
-hdp_dump.o: ../../hdf/src//tbbt.h
-hdp_dump.o: hdp.h
-hdp_list.o: hdp_list.c
-hdp_list.o: ../../mfhdf/libsrc/mfhdf.h
-hdp_list.o: ../../mfhdf/libsrc/local_nc.h
-hdp_list.o: ../../mfhdf/libsrc/netcdf.h
-hdp_list.o: ../../hdf/src//hlimits.h
-hdp_list.o: ../../hdf/src//hdf.h
-hdp_list.o: ../../hdf/src//hdfi.h
-hdp_list.o: ../../hdf/src//hntdefs.h
-hdp_list.o: ../../hdf/src//htags.h
-hdp_list.o: ../../hdf/src//hbitio.h
-hdp_list.o: ../../hdf/src//hcomp.h
-hdp_list.o: ../../hdf/src//herr.h
-hdp_list.o: ../../hdf/src//hproto.h
-hdp_list.o: ../../hdf/src//vg.h
-hdp_list.o: ../../hdf/src//hfile.h
-hdp_list.o: ../../hdf/src//tbbt.h
-hdp_list.o: hdp.h
-hdp_rig.o: hdp_rig.c
-hdp_rig.o: ../../mfhdf/libsrc/mfhdf.h
-hdp_rig.o: ../../mfhdf/libsrc/local_nc.h
-hdp_rig.o: ../../mfhdf/libsrc/netcdf.h
-hdp_rig.o: ../../hdf/src//hlimits.h
-hdp_rig.o: ../../hdf/src//hdf.h
-hdp_rig.o: ../../hdf/src//hdfi.h
-hdp_rig.o: ../../hdf/src//hntdefs.h
-hdp_rig.o: ../../hdf/src//htags.h
-hdp_rig.o: ../../hdf/src//hbitio.h
-hdp_rig.o: ../../hdf/src//hcomp.h
-hdp_rig.o: ../../hdf/src//herr.h
-hdp_rig.o: ../../hdf/src//hproto.h
-hdp_rig.o: ../../hdf/src//vg.h
-hdp_rig.o: ../../hdf/src//hfile.h
-hdp_rig.o: ../../hdf/src//tbbt.h
-hdp_rig.o: hdp.h
-hdp_sds.o: hdp_sds.c
-hdp_sds.o: ../../mfhdf/libsrc/mfhdf.h
-hdp_sds.o: ../../mfhdf/libsrc/local_nc.h
-hdp_sds.o: ../../mfhdf/libsrc/netcdf.h
-hdp_sds.o: ../../hdf/src//hlimits.h
-hdp_sds.o: ../../hdf/src//hdf.h
-hdp_sds.o: ../../hdf/src//hdfi.h
-hdp_sds.o: ../../hdf/src//hntdefs.h
-hdp_sds.o: ../../hdf/src//htags.h
-hdp_sds.o: ../../hdf/src//hbitio.h
-hdp_sds.o: ../../hdf/src//hcomp.h
-hdp_sds.o: ../../hdf/src//herr.h
-hdp_sds.o: ../../hdf/src//hproto.h
-hdp_sds.o: ../../hdf/src//vg.h
-hdp_sds.o: ../../hdf/src//hfile.h
-hdp_sds.o: ../../hdf/src//tbbt.h
-hdp_sds.o: hdp.h
-hdp_util.o: hdp_util.c
-hdp_util.o: hdp.h
-hdp_util.o: ../../hdf/src//hdf.h
-hdp_util.o: ../../hdf/src//hdfi.h
-hdp_util.o: ../../hdf/src//hlimits.h
-hdp_util.o: ../../hdf/src//hntdefs.h
-hdp_util.o: ../../hdf/src//htags.h
-hdp_util.o: ../../hdf/src//hbitio.h
-hdp_util.o: ../../hdf/src//hcomp.h
-hdp_util.o: ../../hdf/src//herr.h
-hdp_util.o: ../../hdf/src//hproto.h
-hdp_util.o: ../../hdf/src//hfile.h
-hdp_vd.o: hdp_vd.c
-hdp_vd.o: hdp.h
-hdp_vd.o: ../../hdf/src//hdf.h
-hdp_vd.o: ../../hdf/src//hdfi.h
-hdp_vd.o: ../../hdf/src//hlimits.h
-hdp_vd.o: ../../hdf/src//hntdefs.h
-hdp_vd.o: ../../hdf/src//htags.h
-hdp_vd.o: ../../hdf/src//hbitio.h
-hdp_vd.o: ../../hdf/src//hcomp.h
-hdp_vd.o: ../../hdf/src//herr.h
-hdp_vd.o: ../../hdf/src//hproto.h
-hdp_vd.o: ../../hdf/src//hfile.h
-hdp_vg.o: hdp_vg.c
-hdp_vg.o: hdp.h
-hdp_vg.o: ../../hdf/src//hdf.h
-hdp_vg.o: ../../hdf/src//hdfi.h
-hdp_vg.o: ../../hdf/src//hlimits.h
-hdp_vg.o: ../../hdf/src//hntdefs.h
-hdp_vg.o: ../../hdf/src//htags.h
-hdp_vg.o: ../../hdf/src//hbitio.h
-hdp_vg.o: ../../hdf/src//hcomp.h
-hdp_vg.o: ../../hdf/src//herr.h
-hdp_vg.o: ../../hdf/src//hproto.h
-hdp_vg.o: ../../hdf/src//hfile.h
-hdp_vg.o: ../../hdf/src//vg.h
-hdp_vg.o: ../../hdf/src//tbbt.h
-show.o: show.c
-show.o: hdp.h
-show.o: ../../hdf/src//hdf.h
-show.o: ../../hdf/src//hdfi.h
-show.o: ../../hdf/src//hlimits.h
-show.o: ../../hdf/src//hntdefs.h
-show.o: ../../hdf/src//htags.h
-show.o: ../../hdf/src//hbitio.h
-show.o: ../../hdf/src//hcomp.h
-show.o: ../../hdf/src//herr.h
-show.o: ../../hdf/src//hproto.h
-show.o: ../../hdf/src//hfile.h
-show.o: ../../hdf/src//vg.h
-show.o: ../../hdf/src//tbbt.h

Deleted: packages/libhdf4/branches/upstream/current/mfhdf/dumper/grtdfi322.hdf
===================================================================
(Binary files differ)

Deleted: packages/libhdf4/branches/upstream/current/mfhdf/dumper/grtdfui162.hdf
===================================================================
(Binary files differ)

Deleted: packages/libhdf4/branches/upstream/current/mfhdf/dumper/grtdfui82.hdf
===================================================================
(Binary files differ)

Deleted: packages/libhdf4/branches/upstream/current/mfhdf/dumper/grtdfui83.hdf
===================================================================
(Binary files differ)

Deleted: packages/libhdf4/branches/upstream/current/mfhdf/dumper/grtdfui84.hdf
===================================================================
(Binary files differ)

Modified: packages/libhdf4/branches/upstream/current/mfhdf/dumper/hdp.c
===================================================================
--- packages/libhdf4/branches/upstream/current/mfhdf/dumper/hdp.c	2007-05-15 09:05:29 UTC (rev 830)
+++ packages/libhdf4/branches/upstream/current/mfhdf/dumper/hdp.c	2007-05-15 09:53:05 UTC (rev 831)
@@ -11,10 +11,10 @@
  ****************************************************************************/
 
 #ifdef RCSID
-static char RcsId[] = "@(#)$Revision: 1.23 $";
+static char RcsId[] = "@(#)$Revision: 1.25 $";
 #endif
 
-/* $Id: hdp.c,v 1.23 2000/09/05 14:28:10 bmribler Exp $ */
+/* $Id: hdp.c,v 1.25 2005/01/09 20:54:34 mcgrath Exp $ */
 #if defined __MWERKS__
 #include <console.h>
 #endif
@@ -221,12 +221,6 @@
     int32        ret_value = SUCCEED;
     CONSTR(FUNC, "VShdfsize");
 
-#ifdef HAVE_PABLO
-/*
-  TRACE_ON(VS_mask, ID_VShdfsize);
-*/
-#endif /* HAVE_PABLO */
-
     /* check key is valid vdata */
     if (HAatom_group(vkey)!=VSIDGROUP)
         HGOTO_ERROR(DFE_ARGS, FAIL);
@@ -246,7 +240,7 @@
         for (j = 0; j < vs->wlist.n; j++)	
             totalsize += vs->wlist.isize[j];
       }		
-    else
+    else if (fields[0] != '\0')  /* implies: return 0 for empty 'fields' */
       {  /* parse field string */
         if ((scanattrs(fields, &ac, &av) < 0) || (ac < 1))
             HGOTO_ERROR(DFE_ARGS, FAIL);
@@ -276,12 +270,6 @@
     } /* end if */
 
   /* Normal function cleanup */
-#ifdef HAVE_PABLO
-/*
-  TRACE_OFF(VS_mask, ID_VShdfsize);
-*/
-#endif /* HAVE_PABLO */
-
   return ret_value;
 }   /* VShdfsize */
 
@@ -313,12 +301,6 @@
      intn i, nattrs, a_index, found;
      DYN_VWRITELIST *w;
 
-#ifdef HAVE_PABLO
-/*
-     TRACE_ON(V_mask, ID_VSattrhdfsize);
-*/
-#endif /* HAVE_PABLO */
-
      HEclear();
      if (HAatom_group(vsid) != VSIDGROUP)
         HGOTO_ERROR(DFE_ARGS, FAIL);
@@ -373,11 +355,6 @@
     } /* end if */
 
   /* Normal function cleanup */
-#ifdef HAVE_PABLO
-/*
-      TRACE_OFF(V_mask, ID_VSattrhdfsize);
-*/
-#endif /* HAVE_PABLO */
 
   return ret_value;
 }  /* VSattrhdfsize */
@@ -408,12 +385,6 @@
     int32 fid, vsid;
     int32 ret_value = SUCCEED;
 
-#ifdef HAVE_PABLO
-/*
-    TRACE_ON(V_mask, ID_Vattrhdfsize);
-*/
-#endif /* HAVE_PABLO */
-
     HEclear();
     if (HAatom_group(vgid) != VGIDGROUP)
        HGOTO_ERROR(DFE_ARGS, FAIL);
@@ -455,11 +426,5 @@
     } /* end if */
 
   /* Normal function cleanup */
-#ifdef HAVE_PABLO
-/*
-      TRACE_OFF(V_mask, ID_Vattrhdfsize);
-*/
-#endif /* HAVE_PABLO */
-
   return ret_value;
 }  /* Vattrhdfsize */

Modified: packages/libhdf4/branches/upstream/current/mfhdf/dumper/hdp.h
===================================================================
--- packages/libhdf4/branches/upstream/current/mfhdf/dumper/hdp.h	2007-05-15 09:05:29 UTC (rev 830)
+++ packages/libhdf4/branches/upstream/current/mfhdf/dumper/hdp.h	2007-05-15 09:53:05 UTC (rev 831)
@@ -11,10 +11,10 @@
  ****************************************************************************/
 
 #ifdef RCSID
-static char RcsId[] = "@(#)$Revision: 1.23 $";
+static char RcsId[] = "@(#)$Revision: 1.24 $";
 #endif
 
-/* $Id: hdp.h,v 1.23 2000/09/05 14:28:10 bmribler Exp $ */
+/* $Id: hdp.h,v 1.24 2002/03/08 05:58:25 bmribler Exp $ */
 
 #ifndef __HDP_H
 #define __HDP_H
@@ -478,8 +478,8 @@
 
 /* hdp_vg.c */
 extern intn do_dumpvg(intn curr_arg, intn argc, char *argv[], intn help);
-extern intn print_data_annots(int32 file_id, char *file_name, int32 tag, int32 ref);
-extern intn print_file_annotations( int32 file_id, char *file_name );
+extern intn print_data_annots(int32 file_id, const char *file_name, int32 tag, int32 ref);
+extern intn print_file_annotations( int32 file_id, const char *file_name );
 void print_fields( char *fields, char *field_title, FILE *fp );
 
 /* hdp_vd.c */

Modified: packages/libhdf4/branches/upstream/current/mfhdf/dumper/hdp_dump.c
===================================================================
--- packages/libhdf4/branches/upstream/current/mfhdf/dumper/hdp_dump.c	2007-05-15 09:05:29 UTC (rev 830)
+++ packages/libhdf4/branches/upstream/current/mfhdf/dumper/hdp_dump.c	2007-05-15 09:53:05 UTC (rev 831)
@@ -11,10 +11,10 @@
  ****************************************************************************/
 
 #ifdef RCSID
-static char RcsId[] = "$Revision: 1.18 $";
+static char RcsId[] = "$Revision: 1.19 $";
 #endif
 
-/* $Id: hdp_dump.c,v 1.18 2000/10/06 04:04:01 bmribler Exp $ */
+/* $Id: hdp_dump.c,v 1.19 2000/12/19 20:57:12 koziol Exp $ */
 
 #include <stdio.h>
 #include "mfhdf.h"
@@ -481,7 +481,7 @@
    }  /* space char. criteria */
 
    /* for each character in the buffer, print it accordingly */
-   for (i = 0; i < cnt && bufptr != NULL; i++)
+   for (i = 0; i < cnt; i++)
    {
       /* if number of characters printed on the current line reaches
          the max defined and the data buffer doesn't contain any LF or
@@ -557,6 +557,9 @@
       /* advance the buffer pointer */
       bufptr = (char *) bufptr + off;
 
+       /* Move here to avoid internal compiler error on Cray J90 -QAK */
+       if(bufptr==NULL)
+           break;
    }	/* end for every item in buffer */
 
    putc('\n', ofp); /* newline */

Modified: packages/libhdf4/branches/upstream/current/mfhdf/dumper/hdp_gr.c
===================================================================
--- packages/libhdf4/branches/upstream/current/mfhdf/dumper/hdp_gr.c	2007-05-15 09:05:29 UTC (rev 830)
+++ packages/libhdf4/branches/upstream/current/mfhdf/dumper/hdp_gr.c	2007-05-15 09:53:05 UTC (rev 831)
@@ -1,3 +1,4 @@
+
 /**********************************************************************
  * NCSA HDF                                                                 *
  * Software Development Group                                               *
@@ -14,7 +15,7 @@
 static char RcsId[] = "@(#)Revision";
 #endif
 
-/* $Id: hdp_gr.c,v 1.14 2000/09/05 14:28:10 bmribler Exp $ */
+/* $Id: hdp_gr.c,v 1.21 2003/12/10 21:14:01 epourmal Exp $ */
 
 #include <stdio.h>
 #include "mfhdf.h"
@@ -31,18 +32,21 @@
              char *argv[])
 {
     printf("Usage:\n");
-    printf("%s dumpgr [-a|-i <indices>|-r <refs>|-n <names>] [-m <interlace>] [-p] [-cdhvs] [-o <filename>] [-bx] <filelist>\n", argv[0]);
+    printf("%s dumpgr [-a|-i <indices>|-r <refs>|-n <names>] [-m <interlace>] [-dhvcs] [-p|-pd] [-o <filename>] [-bx] <filelist>\n", argv[0]);
     printf("\t-a\tDump all RIs in the file (default)\n");
     printf("\t-i <indices>\tDump the <indices>th RIs in the file \n");
     printf("\t-r <refs>\tDump the RIs with reference number <refs>\n");
     printf("\t-n <names>\tDump the RIs with name <names>\n");
     printf("\t-m <interlace>\tDump data in interlace mode <interlace= 0, 1, or 2>\n");
-    printf("\t-c\tPrint space characters as they are, not \\digit\n");
     printf("\t-d\tDump data only, no tag/ref, formatted to input to hp2hdf\n");
-    printf("\t-h\tDump header only, no annotation for elements nor data\n");
+    printf("\t-h\tDump header only, no data - exclusive with -p and -pd\n");
     printf("\t-v\tDump everything including all annotations (default)\n");
-    printf("\t-s\tDump data as a stream, i.e. do not add carriage returns\n");
-    printf("\t-p\tDump palette data\n");
+    printf("\t-c\tPrint space characters as they are, not \\digit\n");
+    printf("\t-g\tDo not print data of file (global) attributes\n"); 
+    printf("\t-l\tDo not print data of local attributes\n"); 
+    printf("\t-s\tDo not add carriage return to a long line - dump it as a stream\n");
+    printf("\t-p\tDump palette's information and data - exclusive with -h\n");
+    printf("\t-pd\tDump palette's data only - exclusive with -h\n");
     printf("\t-o <filename>\tOutput to file <filename>\n");
     printf("\t-b\tBinary format of output\n");
     printf("\t-x\tAscii text format of output (default)\n");
@@ -125,7 +129,7 @@
          case 'h':	/* no annotations nor data */
 	     /* make sure -p is not also given */
 	     if( dumpgr_opts->print_pal )
-		ERROR_GOTO_0( "Option -h and -p must not be used together" );
+		ERROR_GOTO_0( "Option -h must not be used together with either -p or -pd" );
 
              dumpgr_opts->contents = DHEADER;
              (*curr_arg)++;
@@ -146,6 +150,16 @@
              (*curr_arg)++;
              break; 
 
+         case 'g':      /* suppress file (global) attr data, print its header */
+                dumpgr_opts->no_gattr_data = TRUE;
+                (*curr_arg)++;
+                break;
+
+         case 'l':      /* suppress local attr data, only print its header */
+                dumpgr_opts->no_lattr_data = TRUE;
+                (*curr_arg)++;
+                break;
+
          case 'o':   /* specify output file */
              dumpgr_opts->dump_to_file = TRUE;
 
@@ -166,12 +180,19 @@
              break;
 
          case 'p':   /* dump palette data */
-	     /* make sure -p is not also given */
+	     /* make sure -h is not also given */
 	     if( dumpgr_opts->contents == DHEADER )
-		ERROR_GOTO_0( "Option -h and -p must not be used together" );
+		ERROR_GOTO_0( "Option -h must not be used together with either -p or -pd" );
 
              dumpgr_opts->print_pal = TRUE;
+
+	     /* if the current option is -pd, then pal data only is requested */
+	     if( argv[*curr_arg][2] == 'd' ) /* \0 if only -p */
+	     {
+		dumpgr_opts->contents = DDATA;
+	     }
              (*curr_arg)++;
+
              break;
 
          default:	/* invalid dumpgr option */
@@ -409,32 +430,11 @@
    for (attr_index = 0; attr_index < n_file_attrs; attr_index++)
    {
       /* get the current attr's name, number type, and number of values */
-      ret_value = GRattrinfo(gr_id, attr_index, attr_name, &attr_nt, &attr_count);
-      if (FAIL == ret_value ) /* to the next attribute */
+      status = GRattrinfo(gr_id, attr_index, attr_name, &attr_nt, &attr_count);
+      if (FAIL == status ) /* to the next attribute */
          ERROR_CONT_2( "in %s: GRattrinfo failed for %d'th attribute", 
 			"print_GRattrs", (int)attr_index );
 
-      /* to be sure that attr_buf is free before reuse since sometimes we
-         have to break the current loop and continue to the next item */
-      resetBuff( &attr_buf );
-
-      /* calculate the buffer size of the attribute using the number of
-         values in the attribute and its value size */
-      attr_buf_size = DFKNTsize(attr_nt) * attr_count;
-
-      /* make sure we are not allocating 0 elements */
-      CHECK_POS( attr_buf_size, "attr_buf_size", "print_GRattrs" );
-
-      /* allocate space for the attribute's values */
-      attr_buf = (VOIDP) HDmalloc(attr_buf_size);
-      CHECK_ALLOC( attr_buf, "attr_buf", "print_GRattrs" );
-
-      /* read the values of the attribute into the buffer */
-      status = GRgetattr( gr_id, attr_index, attr_buf );
-      if (status == FAIL)
-         ERROR_CONT_2( "in %s: GRgetattr failed for %d'th attribute", 
-		"print_GRattr", (int)attr_index );
-
       /* get number type description of the attribute */
       attr_nt_desc = HDgetNTdesc(attr_nt);
       if (NULL == attr_nt_desc)
@@ -455,30 +455,54 @@
 			attr_nt_desc, (int) attr_count);
       resetBuff(( VOIDP *) &attr_nt_desc ); 
 
-      /* display the attribute's values */
-      fprintf(fp, "\t\t Value = ");
-
-      /* if the user wishes to have clean output, i.e. option -c is selected */
-      /* Note that this option is only applicable to DFNT_CHAR type, the
-         option will be ignored for other types */
-      if( dumpgr_opts->clean_output && attr_nt == DFNT_CHAR )
+      /* display the attribute's values unless user chose to suppress them */
+      if( dumpgr_opts->no_gattr_data == FALSE )
       {
-         status = dumpclean(attr_nt, dumpgr_opts, attr_count, attr_buf, fp);
-         if( status == FAIL )
-            ERROR_CONT_2( "in %s: dumpclean failed for %d'th attribute",
-                "print_GRattr", (int)attr_index );
+         /* to be sure that attr_buf is free before reuse since sometimes we
+            have to break the current loop and continue to the next item */
+         resetBuff( &attr_buf );
 
-      }
-      else  /* show tab, lf, null char... in octal as \011, \012, \000... */
-      {
-         status = dumpfull(attr_nt, dumpgr_opts, attr_count, attr_buf, fp,
+         /* calculate the buffer size of the attribute using the number of
+            values in the attribute and its value size */
+         attr_buf_size = DFKNTsize(attr_nt) * attr_count;
+
+         /* make sure we are not allocating 0 elements */
+         CHECK_POS( attr_buf_size, "attr_buf_size", "print_GRattrs" );
+
+         /* allocate space for the attribute's values */
+         attr_buf = (VOIDP) HDmalloc(attr_buf_size);
+         CHECK_ALLOC( attr_buf, "attr_buf", "print_GRattrs" );
+
+         /* read the values of the attribute into the buffer */
+         status = GRgetattr( gr_id, attr_index, attr_buf );
+         if (status == FAIL)
+            ERROR_CONT_2( "in %s: GRgetattr failed for %d'th attribute", 
+		"print_GRattr", (int)attr_index );
+
+         /* display the attribute's values */
+         fprintf(fp, "\t\t Value = ");
+
+         /* if the user wishes to have clean output, i.e. option -c is
+            selected - Note that this option is only applicable to DFNT_CHAR
+            type, the option will be ignored for other types */
+         if( dumpgr_opts->clean_output && attr_nt == DFNT_CHAR )
+         {
+            status = dumpclean(attr_nt, dumpgr_opts, attr_count, attr_buf, fp);
+            if( status == FAIL )
+               ERROR_CONT_2( "in %s: dumpclean failed for %d'th attribute",
+                   "print_GRattr", (int)attr_index );
+
+         }
+         else  /* show tab, lf, null char... in octal as \011, \012, \000... */
+         {
+            status = dumpfull(attr_nt, dumpgr_opts, attr_count, attr_buf, fp,
 			ATTR_INDENT, ATTR_CONT_INDENT );
-         if( status == FAIL )
-            ERROR_CONT_2( "in %s: dumpfull failed for %d'th attribute",
-                "print_GRattr", (int)attr_index );
-      }
-      /* free buffer and reset it to NULL */
-      resetBuff( &attr_buf );
+            if( status == FAIL )
+               ERROR_CONT_2( "in %s: dumpfull failed for %d'th attribute",
+                   "print_GRattr", (int)attr_index );
+         }
+         /* free buffer and reset it to NULL */
+      }  /* end of if no file attributes */
    } /* for all attributes of GR */
 
    return ret_value;
@@ -511,27 +535,6 @@
          ERROR_CONT_3( "in %s: GRattrinfo failed for %d'th attribute of %d'th RI", 
 			"print_RIattrs", (int)attr_index, (int)ri_index );
 
-      /* to be sure that attr_buf is free before reuse since sometimes we
-         have to break the current loop and continue to the next item */
-      resetBuff( &attr_buf );
-
-      /* calculate the buffer size of the attribute using the number of 
-         values in the attribute and its value size */
-      attr_buf_size = DFKNTsize(attr_nt) * attr_count;
-
-      /* make sure we are not allocating 0 elements */
-      CHECK_POS( attr_buf_size, "attr_buf_size", "print_RIattrs" );
-
-      /* allocate space for attribute's values */
-      attr_buf = (VOIDP) HDmalloc(attr_buf_size);
-      CHECK_ALLOC( attr_buf, "attr_buf", "print_RIattrs" );
-
-      /* read the values of the attribute into buffer attr_buf */
-      status = GRgetattr( ri_id, attr_index, attr_buf );
-      if (status == FAIL)  /* go to the next attribute */
-         ERROR_CONT_3( "in %s: GRgetattr failed for %d'th attribute of %d'th RI", 
-			"print_RIattrs", (int)attr_index, (int)ri_index );
-
       /* get number type description of the attribute */
       attr_nt_desc = HDgetNTdesc(attr_nt);
       if (NULL == attr_nt_desc)  /* go to the next attribute */
@@ -545,30 +548,52 @@
       /* free buffer and reset it to NULL */
       resetBuff((VOIDP *) &attr_nt_desc );
 
-      /* display the attribute's values then free buffer */
-      fprintf(fp, "\t\t Value = ");
+      /* display the attribute's values unless user chose to suppress them */
+      if( dumpgr_opts->no_lattr_data == FALSE )
+      {
+         /* to be sure that attr_buf is free before reuse since sometimes we
+            have to break the current loop and continue to the next item */
+         resetBuff( &attr_buf );
 
-      /* if the user wishes to have clean output, i.e. option -c is selected */
-      /* Note that this option is only applicable to DFNT_CHAR type, the
-         option will be ignored for other types */
-      if( dumpgr_opts->clean_output && attr_nt == DFNT_CHAR )
-      {
-         status = dumpclean(attr_nt, dumpgr_opts, attr_count, attr_buf, fp);
-         if( status == FAIL )
-            ERROR_CONT_3( "in %s: dumpclean failed for %d'th attribute of %d'th RI", 
+         /* calculate the buffer size of the attribute using the number of 
+            values in the attribute and its value size */
+         attr_buf_size = DFKNTsize(attr_nt) * attr_count;
+
+         /* make sure we are not allocating 0 elements */
+         CHECK_POS( attr_buf_size, "attr_buf_size", "print_RIattrs" );
+
+         /* allocate space for attribute's values */
+         attr_buf = (VOIDP) HDmalloc(attr_buf_size);
+         CHECK_ALLOC( attr_buf, "attr_buf", "print_RIattrs" );
+
+         /* read the values of the attribute into buffer attr_buf */
+         status = GRgetattr( ri_id, attr_index, attr_buf );
+         if (status == FAIL)  /* go to the next attribute */
+            ERROR_CONT_3( "in %s: GRgetattr failed for %d'th attribute of %d'th RI", 
 			"print_RIattrs", (int)attr_index, (int)ri_index );
-      }
-      else  /* show tab, lf, null char... in octal as \011, \012, \000... */
-      {
-         status = dumpfull(attr_nt, dumpgr_opts, attr_count, attr_buf, fp,
+
+         /* display the attribute's values then free buffer */
+         fprintf(fp, "\t\t Value = ");
+
+         /* if the user wishes to have clean output, i.e. option -c is selected */
+         /* Note that this option is only applicable to DFNT_CHAR type, the
+            option will be ignored for other types */
+         if( dumpgr_opts->clean_output && attr_nt == DFNT_CHAR )
+         {
+            status = dumpclean(attr_nt, dumpgr_opts, attr_count, attr_buf, fp);
+            if( status == FAIL )
+               ERROR_CONT_3( "in %s: dumpclean failed for %d'th attribute of %d'th RI", 
+			"print_RIattrs", (int)attr_index, (int)ri_index );
+         }
+         else  /* show tab, lf, null char... in octal as \011, \012, \000... */
+         {
+            status = dumpfull(attr_nt, dumpgr_opts, attr_count, attr_buf, fp,
 			ATTR_INDENT, ATTR_CONT_INDENT );
-         if( status == FAIL )
-            ERROR_CONT_3( "in %s: dumpfull failed for %d'th attribute of %d'th RI", 
+            if( status == FAIL )
+               ERROR_CONT_3( "in %s: dumpfull failed for %d'th attribute of %d'th RI", 
 			"print_RIattrs", (int)attr_index, (int)ri_index );
-      }
-
-      /* free buffer and reset it to NULL */
-      resetBuff( &attr_buf );
+         }
+      }  /* end of if no local attributes */
    } /* for all attributes of an RI */
 
    return ret_value;
@@ -594,34 +619,44 @@
          interlace_mode;
    intn  status, ret_value = SUCCEED;
 
-   /* display each palette of an RI */
-   for( pal_index = 0; pal_index < num_pals; pal_index++ )
-   {
-      /* Get the identifier of the palette attached to the image. */
-      pal_id = GRgetlutid (ri_id, pal_index);
-      if( pal_id == FAIL ) /* continue to the next palette */
-         ERROR_CONT_2( "in %s: GRgetlutid failed for palette #%d",
-                        "print_PaletteInfo", (int)pal_index);
+   /* Check the number of palettes */
+   if((num_pals=GRgetnluts(ri_id))<0)
+         ERROR_GOTO_2( "in %s: GRgetnluts failed for raster image ID #%d",
+                        "print_PaletteInfo", (int)ri_id);
 
-      /* Obtain and display information about the palette. */
-      status = GRgetlutinfo (pal_id, &n_comps, &data_type, &interlace_mode,
-                            &n_entries);
-      if( status == FAIL ) /* continue to the next palette */
-         ERROR_CONT_2( "in %s: GRgetlutinfo failed for palette #%d",
-                        "print_PaletteInfo", (int)pal_index);
+   /* if there are no palette data, print message for both cases:
+      header-only and verbose (data+header) */
+   if(num_pals==0) {
+        fprintf( fp, "\t No palette\n");
+   } /* end if */
+   else {
+      /* display each palette of an RI */
+      for( pal_index = 0; pal_index < num_pals; pal_index++ )
+      {
+          /* Get the identifier of the palette attached to the image. */
+         pal_id = GRgetlutid (ri_id, pal_index);
+         if( pal_id == FAIL ) /* continue to the next palette */
+             ERROR_CONT_2( "in %s: GRgetlutid failed for palette #%d",
+                            "print_PaletteInfo", (int)pal_index);
 
-      /* if there are no palette data, print message for both cases:
-         header-only and verbose (data+header) */
-      if( n_entries <= 0 )
-         fprintf( fp, "\t No palette\n");
+         /* Obtain and display information about the palette. */
+         status = GRgetlutinfo (pal_id, &n_comps, &data_type, &interlace_mode,
+                                &n_entries);
+         if( status == FAIL ) /* continue to the next palette */
+             ERROR_CONT_2( "in %s: GRgetlutinfo failed for palette #%d",
+                            "print_PaletteInfo", (int)pal_index);
 
-      /* else, if there are palette data, print header info */
-      else /* have palette data */
+         /* if there are palette data, print header info */
          fprintf (fp, "\t Palette: %d components; %d entries\n",
                         (int)n_comps, (int)n_entries);
 
-   } /* end of for each palette */
+      } /* end of for each palette */
+   } /* end else */
 
+done:
+   if (ret_value == FAIL)
+   { /* Failure cleanup */
+   }
    return( ret_value );
 }  /* end of print_PaletteInfo */
 
@@ -645,67 +680,82 @@
          n_entries,
          interlace_mode;
    uint8 palette_data[N_ENTRIES][3];  /* static because of fixed size */
+   uint16 ri_ref;
    intn  status, ret_value = SUCCEED;
 
-   /* display each palette of an RI */
-   for( pal_index = 0; pal_index < num_pals; pal_index++ )
-   {
-      /* Get the identifier of the palette attached to the image. */
-      pal_id = GRgetlutid (ri_id, pal_index);
-      if( pal_id == FAIL ) /* continue to the next palette */
-         ERROR_CONT_2( "in %s: GRgetlutid failed for palette #%d", 
-			"print_Palette", (int)pal_index);
+   /* Get the ref# of the image, for displaying output */
+   ri_ref = GRidtoref(ri_id);
 
-      /* Obtain and display information about the palette. */
-      status = GRgetlutinfo (pal_id, &n_comps, &data_type, &interlace_mode,
-                            &n_entries);
-      if( status == FAIL ) /* continue to the next palette */
-         ERROR_CONT_2( "in %s: GRgetlutinfo failed for palette #%d", 
-			"print_Palette", (int)pal_index);
-   
-      /* if there are no palette data, print message for both cases:   
-         header-only and verbose (data+header) */
-      if( n_entries <= 0 )
+   /* Check the number of palettes */
+   if((num_pals=GRgetnluts(ri_id))<0)
+         ERROR_GOTO_2( "in %s: GRgetnluts failed for raster image with ref#=%d",
+                        "print_Palette", (int)ri_ref);
+
+   /* if there are no palette data, print message for both cases:
+      header-only and verbose (data+header) */
+   if(num_pals==0) {
+      if( dumpgr_opts->contents != DDATA )
+         fprintf( fp, "\n\t Raster Image Ref. = %d\n\t No palette data\n", 
+			  (int)ri_ref);
+   } /* end if */
+   else {
+      /* display each palette of an RI */
+      for( pal_index = 0; pal_index < num_pals; pal_index++ )
       {
-         if( dumpgr_opts->contents != DDATA )
-            fprintf( fp, "\t No palette data\n");
-      }
-      /* else, if there are palette data, print header info when not 
-         data-only and print palette data when not header-only */
-      else /* have palette data */
-      {
-         if( dumpgr_opts->contents != DDATA )
-            fprintf (fp, "\t Palette: %d components; %d entries\n", 
-			(int)n_comps, (int)n_entries);
+         /* Get the identifier of the palette attached to the image. */
+         pal_id = GRgetlutid (ri_id, pal_index);
+         if( pal_id == FAIL ) /* continue to the next palette */
+             ERROR_CONT_2( "in %s: GRgetlutid failed for palette #%d",
+                            "print_Palette", (int)pal_index);
 
-         if( dumpgr_opts->contents != DHEADER )
-         {  /* not header only */
-            /* Read the palette data. */
-            status = GRreadlut (pal_id, (VOIDP)palette_data);
-            if( status == FAIL ) /* continue to the next palette */
-            {
-               ERROR_CONT_2( "in %s: GRreadlut failed for palette #%d", 
-			"print_Palette", (int)pal_index);
-            }
+         /* Read the palette data. */
+         status = GRreadlut (pal_id, (VOIDP)palette_data);
+         if( status == FAIL ) { /* continue to the next palette */
+             ERROR_CONT_2( "in %s: GRreadlut failed for palette #%d",
+                            "print_Palette", (int)pal_index); }
 
-	    /* if printing data only, print palette data with no indentation */
-	    if( dumpgr_opts->contents == DDATA )
-               status = dumpfull(data_type, dumpgr_opts, n_entries*n_comps, 
-			palette_data, fp, 0, 0 );
+         /* Obtain and display information about the palette. */
+         status = GRgetlutinfo (pal_id, &n_comps, &data_type, 
+				&interlace_mode, &n_entries);
+         if( status == FAIL ) /* continue to the next palette */
+             ERROR_CONT_2( "in %s: GRgetlutinfo failed for palette #%d",
+                           "print_Palette", (int)pal_index);
 
-            /* display the palette data with the title line and indentation */
-	    else
-	    {
-               fprintf (fp, "\t Palette Data: \n");
-               status = dumpfull(data_type, dumpgr_opts, n_entries*n_comps, 
-			palette_data, fp, DATA_INDENT, DATA_CONT_INDENT );
-	    }
-            if( status == FAIL )
-               ERROR_GOTO_2( "in %s: dumpfull failed for palette #%d",
-			"print_Palette", (int)ri_id );
-         }  /* not header only */
-      } /* have palette data */
-   } /* end of for each palette */
+         /* if there are palette data, print header info when not 
+             data-only and print palette data when not header-only */
+	 switch (dumpgr_opts->contents)
+	 {
+	    /* Note that case DHEADER is not presented because option -h
+	       is not allowed with -p or -pd */
+	    case DVERBOSE:
+		 fprintf (fp, "\n\t Raster Image Ref. = %d\n", (int)ri_ref);
+		 fprintf (fp, "\t Palette: %d components; %d entries\n", 
+                         (int)n_comps, (int)n_entries);
+
+		 /* display the palette data with the title line and 
+		    indent the data with DATA_INDENT and DATA_CONT_INDENT */
+		 fprintf (fp, "\t Palette Data: \n");
+		 status = dumpfull(data_type, dumpgr_opts, n_entries*n_comps,
+		    	  palette_data, fp, DATA_INDENT, DATA_CONT_INDENT );
+                 if( status == FAIL )
+                    ERROR_GOTO_2( "in %s: dumpfull failed for palette #%d", 
+			     "print_Palette", (int)pal_index);
+		 break;
+
+	    case DDATA:
+		 /* print palette data with no title and indentation */
+		 status = dumpfull(data_type, dumpgr_opts, 
+			  n_entries*n_comps, palette_data, fp, 0, 0 );
+                 if( status == FAIL )
+                    ERROR_GOTO_2( "in %s: dumpfull failed for palette #%d",
+                         "print_Palette", (int)pal_index );
+		 break;
+	    default:
+		 printf("Unknown output type option \n" );
+	  } /* end switch */
+      } /* end for each palette */
+   } /* end else */
+
 done:
    if (ret_value == FAIL)
    { /* Failure cleanup */
@@ -801,7 +851,6 @@
 			"printGR_ASCII", (int)ri_index );
 
          /* end access to the current image before going on to the next */
-	 /* BMR: can this check be skipped */
          if (FAIL == GRendaccess(ri_id))
             fprintf( stderr,"in %s: GRendaccess failed for %d'th RI",
 			"printGR_ASCII", (int)ri_index );
@@ -810,79 +859,85 @@
          continue; /* to the next image */
       }
 
-      /* print the current image as specified by user's options */
-      switch (dumpgr_opts->contents)
+      /* print image palette's info and data or data only depending on
+         the content's option (-pd or -p, taken care by print_Palette) */
+      if( dumpgr_opts->print_pal )  /* set when -p or -pd is given */
       {
-         case DVERBOSE:
-         case DHEADER:
-            nt_desc = HDgetNTdesc(nt);
-            if (NULL == nt_desc)
-               ERROR_BREAK_2( "in %s: HDgetNTdesc failed for %d'th RI",
+         /* Note: currently only 1 pal assigned to an image, 2nd arg. */
+         status = print_Palette( ri_id, 1, fp, dumpgr_opts );
+	 if( status == FAIL )
+	    ERROR_BREAK_2("in %s: Printing image's palette failed for RI #%d",
+			"printGR_ASCII", (int)ri_index, FAIL );
+      }
+      else /* only happen when neither -p nor -pd were given */
+      {
+
+         /* print the current image as specified by user's options */
+         switch (dumpgr_opts->contents)
+         {
+            case DVERBOSE:
+            case DHEADER:
+               nt_desc = HDgetNTdesc(nt);
+               if (NULL == nt_desc)
+                  ERROR_BREAK_2( "in %s: HDgetNTdesc failed for %d'th RI",
       			"printGR_ASCII", (int)ri_index, FAIL );
 
-            /* display image's info then free the buffer no longer needed */
-            fprintf(fp, "\n\t Image  Name = %s\n\t Index = ", name);
-            fprintf(fp, "%d\n\t Type= %s\n", (int)ri_index, nt_desc);
+               /* display image's info then free the buffer no longer needed */
+               fprintf(fp, "\n\t Image  Name = %s\n\t Index = ", name);
+               fprintf(fp, "%d\n\t Type= %s\n", (int)ri_index, nt_desc);
 
-            resetBuff(( VOIDP *) &nt_desc ); 
+               resetBuff(( VOIDP *) &nt_desc ); 
 
-            /* get the image's ref# from its id */
-            if ((ri_ref = GRidtoref(ri_id)) == FAIL)
-               ERROR_BREAK_2( "in %s: GRidtoref failed for %d'th RI",
+               /* get the image's ref# from its id */
+               if ((ri_ref = GRidtoref(ri_id)) == FAIL)
+                  ERROR_BREAK_2( "in %s: GRidtoref failed for %d'th RI",
 			"printGR_ASCII", (int)ri_index, FAIL );
 
-            /* print more image's info */
-            fprintf(fp, "\t width=%d; height=%d\n", (int) dimsizes[0], (int) dimsizes[1]);
-            fprintf(fp, "\t Ref. = %d\n", (int) ri_ref);
-            fprintf(fp, "\t ncomps = %d\n\t Interlace mode= %s\n",
+               /* print more image's info */
+               fprintf(fp, "\t width=%d; height=%d\n", (int) dimsizes[0], (int) dimsizes[1]);
+               fprintf(fp, "\t Ref. = %d\n", (int) ri_ref);
+               fprintf(fp, "\t ncomps = %d\n\t Interlace mode= %s\n",
 				(int) ncomps, Il_mode_text(il) );
 
-	    /* if palette data is not to be printed, print the palette
-	       info now so it won't be lost after the image data; currently,
-	       only 1 palette per image (second arg.) */
-            if( !dumpgr_opts->print_pal )
-		print_PaletteInfo( ri_id, 1, fp );
+	       /* print the palette info now so it won't be lost after the 
+	          image data; currently, only 1 palette per image (2nd arg.) */
+	       status = print_PaletteInfo( ri_id, 1, fp );
+               if( status == FAIL )
+		   ERROR_BREAK_2( "in %s: Printing image's palette information failed for %d'th RI",
+			"printGR_ASCII", (int)ri_index, FAIL );
 
-            /* Print image attributes */
-            fprintf(fp, "\t Number of attributes = %d\n", (int) nattrs );
-            status = print_RIattrs(ri_id, ri_index, nattrs, fp, dumpgr_opts );
-            if( status == FAIL )
-		ERROR_BREAK_2( "in %s: Printing image's attributes failed for %d'th RI",
+               /* Print image attributes */
+               fprintf(fp, "\t Number of attributes = %d\n", (int) nattrs );
+               status = print_RIattrs(ri_id, ri_index, nattrs, fp, dumpgr_opts );
+               if( status == FAIL )
+		   ERROR_BREAK_2( "in %s: Printing image's attributes failed for %d'th RI",
 			"printGR_ASCII", (int)ri_index, FAIL );
 
-            if (dumpgr_opts->contents == DHEADER)
-               break; /* break out for header only */
+               if (dumpgr_opts->contents == DHEADER)
+                  break; /* break out for header only */
 
-         case DDATA:
-            if (dumpgr_opts->contents != DDATA)
-               fprintf(fp, "\t Data : \n");
+            case DDATA:
+               if (dumpgr_opts->contents != DDATA)
+                  fprintf(fp, "\t Data : \n");
 
-            if (ncomps > 0 && dimsizes[0] != 0)
-            {
-               /* print the current image's data */
-               status = grdumpfull( ri_id, dumpgr_opts, ncomps, dimsizes, nt, fp);
-               if ( status == FAIL )
-		  ERROR_BREAK_2( "in %s: Printing image's data failed for %d'th RI",
+               if (ncomps > 0 && dimsizes[0] != 0)
+               {
+                  /* print the current image's data */
+                  status = grdumpfull( ri_id, dumpgr_opts, ncomps, dimsizes, nt, fp);
+                  if ( status == FAIL )
+		     ERROR_BREAK_2( "in %s: Printing image's data failed for %d'th RI",
 			"printGR_ASCII", (int)ri_index, FAIL );
-            }
-            else
-            {
-               fprintf(fp, "\t\t No data written.\n");
-            }
-            break; /* data section */
-         default:
-            printf("Unknown output type option \n" );
-      } /* switch  on contents */
+               }
+               else
+               {
+                  fprintf(fp, "\t\t No data written.\n");
+               }
+               break; /* data section */
+            default:
+               printf("Unknown output type option \n" );
+         } /* switch  on contents */
+      } /* end if when neither -p nor -pd given */
 
-      /* print image palette's info with/without data depending on the
-         content's option (-h, -d, or none, taken care by print_Palette) */
-      if( dumpgr_opts->print_pal )
-         /* Note: currently only 1 pal assigned to an image, 2nd arg. */
-         status = print_Palette( ri_id, 1, fp, dumpgr_opts );
-	 if( status == FAIL )
-	    ERROR_BREAK_2( "in %s: Printing image's palette failed for %d'th RI",
-			"printGR_ASCII", (int)ri_index, FAIL );
-
       /* end access to the current image */
       if (FAIL == GRendaccess(ri_id))    
          fprintf(stderr,"in %s: GRendaccess failed for %d'th RI",
@@ -970,22 +1025,26 @@
          continue; /* to the next image */
       }
 
-      /* output data in binary format   */
-      if (ncomps > 0 && dimsizes[0] != 0)
-         /* print the current image's data */
-         status = grdumpfull(ri_id, dumpgr_opts, ncomps, dimsizes, nt, fp);
-         if ( status == FAIL )
-            ERROR_BREAK_2( "in %s: Printing image's data failed for %d'th RI",
-			"printGR_BINARY", (int)ri_index, FAIL );
-
-      /* print image palette's data print_Palette) */
+      /* print image palette's data */
       if( dumpgr_opts->print_pal )
+      {
          /* Note: currently only 1 pal assigned to an image, 2nd arg. */
          status = print_Palette( ri_id, 1, fp, dumpgr_opts );
          if ( status == FAIL )
             ERROR_BREAK_2( "in %s: Printing image's palette failed for %d'th RI",
 			"printGR_BINARY", (int)ri_index, FAIL );
+      }
 
+      /* output data in binary format if palette printing is not requested  */
+      else if (ncomps > 0 && dimsizes[0] != 0)
+      {
+         /* print the current image's data */
+         status = grdumpfull(ri_id, dumpgr_opts, ncomps, dimsizes, nt, fp);
+         if ( status == FAIL )
+            ERROR_BREAK_2( "in %s: Printing image's data failed for %d'th RI",
+			"printGR_BINARY", (int)ri_index, FAIL );
+      }
+
       /* end access to the current image */
       if (FAIL == GRendaccess(ri_id))
          fprintf(stderr,"in %s: GRendaccess failed for %d'th RI",
@@ -1049,13 +1108,15 @@
 
    /* check for missing input file name */
    if( curr_arg >= argc )
-      ERROR_GOTO_0( "Missing input file name.  Please try again.\n" );
+      ERROR_GOTO_0( "Missing input file name.  Please try again" );
 
    /* going through each input file, open the file, try to compose the list
       of indices of the images in the file that are requested, then read and
       display information and data of each image in the specified manner */
    while (curr_arg < argc)
    {
+      intn isHDF = TRUE;  /* FALSE, if current file is not HDF file */
+
       HDstrcpy(file_name, argv[curr_arg]);   /* get file name */
       HDstrcpy( dumpgr_opts->ifile_name, file_name ); /* record file name */
       curr_arg++;   /* forward the pointer to the current argument */
@@ -1065,19 +1126,37 @@
          help avoiding the chore at every one of those instances */ 
       closeGR( &file_id, &gr_id, &gr_chosen ); 
 
+      /* Print an informative message and skip this file if it is not 
+         an HDF file */
+      isHDF = Hishdf(file_name);
+      if (isHDF == FALSE)
+      {
+         /* if there are no more files to be processed, print error
+            message, then returns with FAIL */
+         if( curr_arg == argc )
+            {ERROR_GOTO_1( "in dgr: %s is not an HDF file", file_name);}
+         else /* print message, then continue processing the next file */
+            {ERROR_CONT_1( "in dgr: %s is not an HDF file", file_name);}
+      }
+
       /* open current hdf file for processing */
       file_id = Hopen(file_name, DFACC_RDONLY, 0);
       if (file_id == FAIL)
-         ERROR_CONT_1( "in dgr: Hopen failed for file %s\n", file_name);
-
-      /* initiate the GR interface */
-      gr_id = GRstart(file_id);
-      if (FAIL == gr_id) /* to the next file */
       {
-HEprint( stderr, 0 );  /* what is this??? BMR - 7/14/00 */
-         ERROR_CONT_1( "in dgr: GRstart failed for file %s\n", file_name);
+         /* if there are no more files to be processed, print error
+            message, then returns with FAIL */
+         if( curr_arg == argc )
+            {ERROR_GOTO_1( "in dgr: Failure in opening file %s", file_name);}
+         else /* print message, then continue processing the next file */
+            ERROR_CONT_1( "in dgr: Failure in opening file %s", file_name );
       }
 
+      /* initiate GR interface, if fail, probably something fatal, returns
+         with FAIL */
+      gr_id = GRstart(file_id);
+      if (FAIL == gr_id)
+         ERROR_GOTO_1( "in dgr: GRstart failed for file %s", file_name);
+
       /* BMR: compose the list of indices of RIs to be processed in the current
          file: gr_chosen is the list and return the number of items in it */
       num_ri_chosen = get_RIindex_list(gr_id, dumpgr_opts, &gr_chosen, &index_error);
@@ -1093,7 +1172,7 @@
          used to print file attributes */
       status = GRfileinfo(gr_id, &ndsets, &nglb_attrs);
       if (status == FAIL) /* to the next file */
-         ERROR_CONT_1( "in dgr: GRfileinfo failed for file %s\n", file_name);
+         ERROR_CONT_1( "in dgr: GRfileinfo failed for file %s", file_name);
 
       fp = stdout;  /* assume that output option is not given */
 
@@ -1133,7 +1212,7 @@
                status = printGR_ASCII( gr_id, dumpgr_opts, ndsets, 
                                        gr_chosen, num_ri_chosen, fp );
                if( status == FAIL ) /* to the next file */
-                  ERROR_BREAK_1( "in dgr: printGR_ASCII failed for file %s\n", 
+                  ERROR_BREAK_1( "in dgr: printGR_ASCII failed for file %s", 
                                     file_name, FAIL );
             }
             else
@@ -1158,7 +1237,7 @@
             status = printGR_BINARY( gr_id, dumpgr_opts, num_ri_chosen, ndsets, 
                                gr_chosen, fp );
             if( status == FAIL )
-               ERROR_BREAK_1( "in dgr: printGR_BINARY failed for file %s\n", 
+               ERROR_BREAK_1( "in dgr: printGR_BINARY failed for file %s", 
                                  file_name, FAIL );
             break; /* BINARY */
 
@@ -1191,7 +1270,7 @@
           intn        help)
 {
    dump_info_t dumpgr_opts;	/* dumpgr options */
-   intn ret_value = SUCCEED;
+   intn status, ret_value = SUCCEED;
 
    /* initialize the structure that holds user's options and inputs */
    init_dump_opts(&dumpgr_opts);
@@ -1207,22 +1286,21 @@
    if( curr_arg >= argc )
    {
       dumpgr_usage(argc, argv);
-      ret_value = FAIL; /* return status to caller */
-      goto done;
+      ERROR_GOTO_0( "in do_dumpgr: command is incomplete");
    }		/* end if */
 
    /* parse the user's command and store the inputs in dumpgr_opts */
-   ret_value = parse_dumpgr_opts( &dumpgr_opts, &curr_arg, argc, argv );
-   if( ret_value == FAIL )
+   status = parse_dumpgr_opts( &dumpgr_opts, &curr_arg, argc, argv );
+   if( status == FAIL )
    {
       dumpgr_usage(argc, argv);
-      goto done;  /* skip dgr */
+      ERROR_GOTO_0( "in do_dumpgr: parse_dumpgr_opts is unable to parse command");
    }
 
    /* display data and information as specified in dumpgr_opts */
-   ret_value = dgr( &dumpgr_opts, curr_arg, argc, argv );
-   if( ret_value == FAIL )
-      ERROR_GOTO_0( "in do_dumpgr\n" );
+   status = dgr( &dumpgr_opts, curr_arg, argc, argv );
+   if( status == FAIL )
+      ERROR_GOTO_0( "in do_dumpgr: dgr failed" );
 
 done:
    if (ret_value == FAIL)

Modified: packages/libhdf4/branches/upstream/current/mfhdf/dumper/hdp_list.c
===================================================================
--- packages/libhdf4/branches/upstream/current/mfhdf/dumper/hdp_list.c	2007-05-15 09:05:29 UTC (rev 830)
+++ packages/libhdf4/branches/upstream/current/mfhdf/dumper/hdp_list.c	2007-05-15 09:53:05 UTC (rev 831)
@@ -11,10 +11,10 @@
  ****************************************************************************/
 
 #ifdef RCSID
-static char RcsId[] = "@(#)$Revision: 1.29 $";
+static char RcsId[] = "@(#)$Revision: 1.30 $";
 #endif
 
-/* $Id: hdp_list.c,v 1.29 2000/09/05 14:28:11 bmribler Exp $ */
+/* $Id: hdp_list.c,v 1.30 2002/03/08 05:58:23 bmribler Exp $ */
 
 #include "mfhdf.h"
 #include "hdp.h"
@@ -243,7 +243,7 @@
    int32 *ann_list = NULL;
    char *annot_type_text = "invalid";	/* "label" or "description" */
    char *func_name = "print_annots_by_object"; /* used to print error msg */
-   char error_item[80];	/* holds tag, ref, and fname for error msg */
+   char error_item[256];	/* holds tag, ref, and fname for error msg */
    intn   ret_value = SUCCEED;
 
    /* stores the current values tag, ref, and file name in error_item,

Modified: packages/libhdf4/branches/upstream/current/mfhdf/dumper/hdp_sds.c
===================================================================
--- packages/libhdf4/branches/upstream/current/mfhdf/dumper/hdp_sds.c	2007-05-15 09:05:29 UTC (rev 830)
+++ packages/libhdf4/branches/upstream/current/mfhdf/dumper/hdp_sds.c	2007-05-15 09:53:05 UTC (rev 831)
@@ -14,7 +14,7 @@
 static char RcsId[] = "@(#)Revision";
 #endif
 
-/* $Id: hdp_sds.c,v 1.39 2000/10/05 14:14:20 ymuqun Exp $ */
+/* $Id: hdp_sds.c,v 1.42 2003/12/10 21:14:01 epourmal Exp $ */
 
 #include <stdio.h>
 #include "mfhdf.h"
@@ -33,11 +33,13 @@
     printf("\t-i <indices>\tDump the SDSs at positions listed in <indices>\n");
     printf("\t-r <refs>\tDump the SDSs with reference number listed in <refs>\n");
     printf("\t-n <names>\tDump the SDSs with name listed in <names>\n");
-    printf("\t-c\tPrint space characters as they are, not \\digit\n");
     printf("\t-d\tDump data only, no tag/ref, formatted to input to hp2hdf\n");
     printf("\t-h\tDump header only, no annotation for elements nor data\n");
     printf("\t-v\tDump everything including all annotations (default)\n");
-    printf("\t-s\tDo not add a carriage return to a long data line\n");
+    printf("\t-c\tPrint space characters as they are, not \\digit\n");
+    printf("\t-g\tDo not print data of file (global) attributes\n");
+    printf("\t-l\tDo not print data of local attributes\n");
+    printf("\t-s\tDo not add carriage return to a long line - dump it as a stream\n");
     printf("\t-o <filename>\tOutput to file <filename>\n");
     printf("\t-b\tBinary format of output\n");
     printf("\t-x\tAscii text format of output (default)\n");
@@ -122,6 +124,16 @@
                 (*curr_arg)++;
                 break;
 
+         case 'g':	/* suppress file (global) attr data, print its header */
+                dumpsds_opts->no_gattr_data = TRUE;
+                (*curr_arg)++;
+                break;
+
+         case 'l':	/* suppress local attr data, only print its header */
+                dumpsds_opts->no_lattr_data = TRUE;
+                (*curr_arg)++;
+                break;
+
          case 'o':   /* specify output file */
                 dumpsds_opts->dump_to_file = TRUE;
 
@@ -442,11 +454,7 @@
     return ret_value;
 } /* end of get_SDSindex_list */
 
-/* Displays all SD file attributes 
-   Note: the reason for dumpsds_opts is not passed for ft and no_cret
-   is print_SDattrs is also called by a function of hdp list, which has 
-   a different option structure than all the dump commands, 
-   list_info_t vs. dump_info_t */
+/* Displays all SD file attributes */
 intn
 print_SDattrs( int32 sd_id,
                FILE *fp,
@@ -473,29 +481,6 @@
          ERROR_CONT_2( "in %s: SDattrinfo failed for %d'th attribute", 
 			"print_SDattrs", (int)attr_index );
      
-      /* to be sure that attr_buf is free before reuse since sometimes we
-         have to break the current loop and continue to the next item */
-      resetBuff( &attr_buf );
-
-      /* calculate the buffer size of the attribute using the number of
-         values in the attribute and its value size */
-      attr_buf_size = DFKNTsize(attr_nt) * attr_count;
-
-      /* make sure we are not allocating 0 elements */
-      CHECK_POS( attr_buf_size, "attr_buf_size", "print_SDattrs" );
-
-      /* allocate space for the attribute's values */
-      attr_buf = (VOIDP) HDmalloc(attr_buf_size);
-
-      /* if allocation fails, handle the failure */
-      CHECK_ALLOC( attr_buf, "attr_buf", "print_SDattrs" );
-
-      /* read the values of the attribute into the buffer attr_buf */
-      status = SDreadattr(sd_id, attr_index, attr_buf);
-      if( status == FAIL )
-         ERROR_CONT_2( "in %s: SDreadattr failed for %d'th attribute", 
-			"print_SDattrs", (int)attr_index );
-
       /* get number type description of the attribute */
       attr_nt_desc = HDgetNTdesc(attr_nt);
       if (attr_nt_desc == NULL)
@@ -510,38 +495,60 @@
          printed = TRUE;
       }
 
-      /* display the attribute's information then free buffer */
+      /* display the attribute's information */
       fprintf(fp,"\t Attr%i: Name = %s\n", (int) attr_index, attr_name);
       fprintf(fp,"\t\t Type = %s \n\t\t Count= %i\n", attr_nt_desc, (int) attr_count);
       resetBuff(( VOIDP *) &attr_nt_desc );
 
-      /* display the attribute's values */
-      /* Note that filetype is DASCII since binary format does not contain
-         these information - it's data only */
-      fprintf(fp,"\t\t Value = ");
+      /* display the attribute's values unless user chose to suppress them */
+      if( dumpsds_opts->no_gattr_data == FALSE )
+      {
+         /* to be sure that attr_buf is free before reuse since sometimes we
+            have to break the current loop and continue to the next item */
+         resetBuff( &attr_buf );
 
-      /* if the user wishes to have clean output, i.e. option -c is selected */
-      /* Note that this option is only applicable to DFNT_CHAR type, the
-	 option will be ignored for other types */
-      if( dumpsds_opts->clean_output && attr_nt == DFNT_CHAR )
-      {
-         status = dumpclean(attr_nt, dumpsds_opts, attr_count, attr_buf, fp);
-         if( status == FAIL )
-            ERROR_CONT_2( "in %s: dumpclean failed for %d'th attribute", 
+	 /* calculate the buffer size of the attribute using the number of
+	    values in the attribute and its value size */
+	 attr_buf_size = DFKNTsize(attr_nt) * attr_count;
+
+	 /* make sure we are not allocating 0 elements */
+	 CHECK_POS( attr_buf_size, "attr_buf_size", "print_SDattrs" );
+
+	 /* allocate space for the attribute's values */
+	 attr_buf = (VOIDP) HDmalloc(attr_buf_size);
+
+	 /* if allocation fails, handle the failure */
+	 CHECK_ALLOC( attr_buf, "attr_buf", "print_SDattrs" );
+
+	 /* read the values of the attribute into the buffer attr_buf */
+	 status = SDreadattr(sd_id, attr_index, attr_buf);
+	 if( status == FAIL )
+	    ERROR_CONT_2( "in %s: SDreadattr failed for %d'th attribute", 
 			"print_SDattrs", (int)attr_index );
-      }
-      else  /* show tab, lf, null char... in octal as \011, \012, \000... */
-      {
-         status = dumpfull(attr_nt, dumpsds_opts, attr_count, attr_buf, fp,
+
+	 fprintf( fp,"\t\t Value = ");
+
+	 /* if the user wishes to have clean output, i.e. option -c is 
+	    selected - Note that this option is only applicable to DFNT_CHAR 
+	    type, the option will be ignored for other types */
+	 if( dumpsds_opts->clean_output && attr_nt == DFNT_CHAR )
+	 {
+	    status = dumpclean(attr_nt, dumpsds_opts, attr_count, attr_buf, fp);
+	    if( status == FAIL )
+		ERROR_CONT_2( "in %s: dumpclean failed for %d'th attribute", 
+			"print_SDattrs", (int)attr_index );
+	 }
+	 else  /* show tab, lf, null char... in octal as \011, \012, \000... */
+	 {
+	    status = dumpfull(attr_nt, dumpsds_opts, attr_count, attr_buf, fp,
 				ATTR_INDENT, ATTR_CONT_INDENT );
-         if( status == FAIL )
-            ERROR_CONT_2( "in %s: dumpfull failed for %d'th attribute", 
+	    if( status == FAIL )
+		ERROR_CONT_2( "in %s: dumpfull failed for %d'th attribute", 
 			"print_SDattrs", (int)attr_index );
-      }
+	 }
+      }  /* end of if no file attributes */
+   }  /* for each file attribute */
 
-      resetBuff( &attr_buf );  /* free buffer and reset it to NULL */
-   }/* for each file attribute */
-
    return( ret_value );
 }   /* end of print_SDattrs */
 
@@ -570,10 +577,6 @@
          ERROR_CONT_2( "in %s: SDattrinfo failed for %d'th attribute", 
 			"print_SDSattrs", (int)attr_index );
 
-      /* to be sure that attr_buf is free before reuse since sometimes we
-         have to break the current loop and continue to the next item */
-      resetBuff( &attr_buf );
-
       /* calculate the buffer size of the attribute using the number of
          values in the attribute and its value size */
       attr_buf_size = DFKNTsize(attr_nt|DFNT_NATIVE) * attr_count;
@@ -581,53 +584,58 @@
       /* make sure we are not allocating 0 elements */
       CHECK_POS( attr_buf_size, "attr_buf_size", "print_SDSattrs" );
 
-      /* allocate space for attribute's values */
-      attr_buf = (VOIDP) HDmalloc(attr_buf_size);
-      CHECK_ALLOC( attr_buf, "attr_buf", "print_SDSattrs" );
-
-      /* read the values of the attribute into buffer attr_buf */
-      status = SDreadattr(sds_id, attr_index, attr_buf);
-      if (status == FAIL)
-         ERROR_CONT_2( "in %s: SDreadattr failed for %d'th attribute", 
-			"print_SDSattrs", (int)attr_index );
-
       /* get number type description of the attribute */
       attr_nt_desc = HDgetNTdesc(attr_nt);
       if (attr_nt_desc == NULL)
          ERROR_CONT_2( "in %s: HDgetNTdesc failed for %d'th attribute", 
 			"print_SDSattrs", (int)attr_index );
 
-      /* display the attribute's information then free the buffer */
+      /* display the attribute's information */
       fprintf(fp, "\t Attr%d: Name = %s\n", (int) attr_index, attr_name);
       fprintf(fp, "\t\t Type = %s \n\t\t Count= %d\n", 
 			attr_nt_desc, (int) attr_count);
+
+      /* free buffer and reset it to NULL */
       resetBuff((VOIDP *) &attr_nt_desc );
 
-      /* display the attribute's values then free buffer */
-      /* Note that filetype is DASCII since binary format does not contain
-         these information - it's data only */
-      fprintf(fp, "\t\t Value = ");
+      /* display the attribute's values unless user chose to suppress them */
+      if( dumpsds_opts->no_lattr_data == FALSE )
+      {
+         /* to be sure that attr_buf is free before reuse since sometimes we
+            have to break the current loop and continue to the next item */
+         resetBuff( &attr_buf );
 
-      /* if the user wishes to have clean output, i.e. option -c is selected */
-      /* Note that this option is only applicable to DFNT_CHAR type, the
-	 option will be ignored in other types */
-      if( dumpsds_opts->clean_output && attr_nt == DFNT_CHAR )
-      {
-         status = dumpclean(attr_nt, dumpsds_opts, attr_count, attr_buf, fp);
-         if( status == FAIL )
-            ERROR_CONT_2( "in %s: dumpclean failed for %d'th attribute", 
+	 /* allocate space for attribute's values */
+	 attr_buf = (VOIDP) HDmalloc(attr_buf_size);
+	 CHECK_ALLOC( attr_buf, "attr_buf", "print_SDSattrs" );
+
+	 /* read the values of the attribute into buffer attr_buf */
+	 status = SDreadattr(sds_id, attr_index, attr_buf);
+	 if (status == FAIL)
+            ERROR_CONT_2( "in %s: SDreadattr failed for %d'th attribute", 
 			"print_SDSattrs", (int)attr_index );
-      }
-      else  /* show tab, lf, null char... in octal as \011, \012, \000... */
-      {
-         status = dumpfull(attr_nt, dumpsds_opts, attr_count, attr_buf, fp,
+
+	 fprintf(fp, "\t\t Value = ");
+
+	 /* if the user wishes to have clean output, i.e. option -c is 
+	    selected - Note that this option is only applicable to DFNT_CHAR 
+	    type, the option will be ignored for other types */
+	 if( dumpsds_opts->clean_output && attr_nt == DFNT_CHAR )
+	 {
+            status = dumpclean(attr_nt, dumpsds_opts, attr_count, attr_buf, fp);
+            if( status == FAIL )
+                ERROR_CONT_2( "in %s: dumpclean failed for %d'th attribute", 
+			"print_SDSattrs", (int)attr_index );
+	 }
+	 else  /* show tab, lf, null char... in octal as \011, \012, \000... */
+	 {
+            status = dumpfull(attr_nt, dumpsds_opts, attr_count, attr_buf, fp,
 				ATTR_INDENT, ATTR_CONT_INDENT );
-         if( status == FAIL )
-            ERROR_CONT_2( "in %s: dumpfull failed for %d'th attribute", 
+            if( status == FAIL )
+                ERROR_CONT_2( "in %s: dumpfull failed for %d'th attribute", 
 			"print_SDSattrs", (int)attr_index );
-      }
-
-      resetBuff( &attr_buf );  /* free buffer and reset it to NULL */
+	 }
+      }  /* end of if no local attributes */
    } /* for each attribute */
 
    return( ret_value );
@@ -974,11 +982,26 @@
       display information and data of each SDS in the specified manner */
    while (curr_arg < argc)
    {
+      intn isHDF = TRUE;  /* FALSE, if current file is not HDF file */
+
       HDstrcpy(file_name, argv[curr_arg]);
       HDstrcpy( dumpsds_opts->ifile_name, file_name ); /* record file name */
       curr_arg++;
 
-      /* if SDstart fails, shoudl ret_value be set to FAIL or SUCCEED? */
+      /* Print an informative message and skip this file if it is not
+         an HDF file */
+      isHDF = Hishdf(file_name);
+      if (isHDF == FALSE)
+      {
+         /* if there are no more files to be processed, print error
+            message, then returns with FAIL */
+	 if( curr_arg == argc )
+	    {ERROR_GOTO_1( "in dsd: %s is not an HDF file", file_name);}
+         else /* print message, then continue processing the next file */
+            {ERROR_CONT_1( "in dsd: %s is not an HDF file", file_name);}
+      }
+
+      /* open current hdf file with error check, if fail, go to next file */
       sd_id = SDstart(file_name, DFACC_RDONLY);
       if (sd_id == FAIL)
       {
@@ -986,8 +1009,7 @@
 	    message, then returns with FAIL */
 	 if( curr_arg == argc )
             {ERROR_GOTO_1( "in dsd: Failure in opening file %s", file_name);}
-	 /* otherwise, print message, then continue processing the next file */
-	 else
+	 else /* print message, then continue processing the next file */
             ERROR_CONT_1( "in dsd: Failure in opening file %s", file_name );
       }
 
@@ -1119,8 +1141,7 @@
    if( curr_arg >= argc )
    {
       dumpsds_usage(argc, argv);
-      ret_value = FAIL; /* so caller can be traced in debugging */
-      goto done;
+      ERROR_GOTO_0( "in do_dumpsds: command is incomplete");
    }            /* end if */
 
    /* parse the user's command and store the inputs in dumpsds_opts */
@@ -1135,7 +1156,7 @@
    /* display data and information as specified in dumpsds_opts */
    status = dsd( &dumpsds_opts, curr_arg, argc, argv );
    if( status == FAIL )
-      ERROR_GOTO_0( "in do_dumpsds" );
+      ERROR_GOTO_0( "in do_dumpsds: dsd failed" );
 
   done:
     if (ret_value == FAIL)

Modified: packages/libhdf4/branches/upstream/current/mfhdf/dumper/hdp_vd.c
===================================================================
--- packages/libhdf4/branches/upstream/current/mfhdf/dumper/hdp_vd.c	2007-05-15 09:05:29 UTC (rev 830)
+++ packages/libhdf4/branches/upstream/current/mfhdf/dumper/hdp_vd.c	2007-05-15 09:53:05 UTC (rev 831)
@@ -11,10 +11,10 @@
  ****************************************************************************/
 
 #ifdef RCSID
-static char RcsId[] = "@(#)$Revision: 1.45 $";
+static char RcsId[] = "@(#)$Revision: 1.51 $";
 #endif
 
-/* $Id: hdp_vd.c,v 1.45 2000/09/05 14:28:12 bmribler Exp $ */
+/* $Id: hdp_vd.c,v 1.51 2003/12/10 21:14:02 epourmal Exp $ */
 
 #include "hdp.h"
 #ifndef MIPSEL
@@ -428,12 +428,6 @@
 		char* fields,
 		vd_info_t* curr_vd )
 { 
-/*   int32 lastItem;
-   int32 count = 0;
-   char  *tempPtr = NULL;
-   char  *ptr = NULL;
-   int32 i;
-*/
    fprintf(fp, "Vdata: %d\n", (int) curr_vd->index );
    if( curr_vd->tag == FAIL )	/* print vdata tag */
       fprintf(fp, "   tag = <Undefined>; ");
@@ -465,14 +459,11 @@
       messy when being displayed if it were to be dumped out at once. 
       print_fields displays a list in a nice way even if the list is 
       long.  The second parameter specifies how the field name list 
-      begins; it's needed because dumpvd also uses this routine and 
-      has different indentation format than dumpvg */
+      begins; it's needed because dumpvg also uses this routine and 
+      has different indentation format than dumpvd */
    print_fields( fields, "   fields = ", fp );
 
-   if( curr_vd->vsize > 0 ) /* print vdata record size */
-      fprintf(fp, "   record size (in bytes) = %d;\n", (int)curr_vd->vsize);
-   else
-      fprintf(fp, "   record size = <Undefined>;\n");
+   fprintf(fp, "   record size (in bytes) = %d;\n", (int)curr_vd->vsize);
 
    if( curr_vd->name[0] == '\0' ) /* print vdata name */
       fprintf(fp, "   name = <Undefined>; ");
@@ -501,7 +492,7 @@
    int32 i;
    intn  flds_match = 0;
    intn  ret_value = SUCCEED;
-#if defined (MAC) || defined (macintosh) || defined (SYMANTEC_C)
+#if defined (MAC) || defined (macintosh) || defined (SYMANTEC_C) || defined(__APPLE__)
 	/* macintosh cannot handle >32K locals */
    char *tempflds = (char *)HDmalloc(VSFIELDMAX*FIELDNAMELENMAX* sizeof(char));
    CHECK_ALLOC( tempflds, "tempflds", "getFieldIndices" );
@@ -553,7 +544,7 @@
    }	/* for (fld_name_idx...) */
 
 /* free dynamic space if on MAC */
-#if defined (MAC) || defined (macintosh) || defined (SYMANTEC_C)
+#if defined (MAC) || defined (macintosh) || defined (SYMANTEC_C) || defined(__APPLE__)
    if(tempflds != NULL)
    {
       HDfree(tempflds);
@@ -570,7 +561,7 @@
 intn
 dumpvd_ascii(dump_info_t * dumpvd_opts, 
              int32 file_id,
-             char  *file_name,
+             const char  *file_name,
 	     FILE* fp,
              int32 num_vd_chosen, 
              char *flds_chosen[MAXCHOICES],
@@ -594,7 +585,7 @@
    int32       vd_id = FAIL;
    int32       an_handle   = FAIL;
    intn        status = SUCCEED, ret_value = SUCCEED;
-#if defined (MAC) || defined (macintosh) || defined (SYMANTEC_C)
+#if defined (MAC) || defined (macintosh) || defined (SYMANTEC_C) || defined(__APPLE__)
 	/* macintosh cannot handle >32K locals */
    char *fields = (char *)HDmalloc(VSFIELDMAX*FIELDNAMELENMAX* sizeof(char));
    CHECK_ALLOC( fields, "fields", "dumpvd_ascii" );
@@ -649,16 +640,20 @@
       /* Note: each of the parameters retuned by a query routine below 
 	 must be checked before being used */
 
-      /* Retrieves general information about the vdata */
-      if (FAIL == VSinquire( vd_id, &nvf, &interlace, fields, &vsize, vdname ))
+      /* Retrieves general information about the vdata.  Note that NULL is
+	 passed in for vdata's record size because it is not needed and 
+	 attempting to retrieve it causes failure when the vdata doesn't
+	 have any fields defined.  (bug #626) - BMR Mar 12, 02 */
+      if (FAIL == VSinquire( vd_id, &nvf, &interlace, fields, NULL, vdname ))
 	 ERROR_CONT_END( "in %s: VSinquire failed for vdata with ref#=%d", 
                         "dumpvd_ascii", (int) vdata_ref, vd_id );
 
-      /* Get the size of the specified fields of the vdata */
-      vsize = VShdfsize( vd_id, fields );
-      if (vsize == FAIL)
-         ERROR_CONT_END( "in %s: VShdfsize failed for vdata with ref#=%d", 
- 			"dumpvd_ascii", (int) vdata_ref, vd_id );
+      /* Get the HDF size of the specified fields of the vdata; VShdfsize 
+	 returns 0 if there are no fields previously defined */
+         vsize = VShdfsize( vd_id, fields );
+         if (vsize == FAIL)
+             ERROR_CONT_END( "in %s: VShdfsize failed for vdata with ref#=%d",
+			 "dumpvd_ascii", (int) vdata_ref, vd_id );
 
       if (FAIL == (vdata_tag = VSQuerytag(vd_id)))
          ERROR_CONT_END( "in %s: VSQuerytag failed for vdata with ref#=%d", 
@@ -717,7 +712,10 @@
                    /* BMR - 6/30/98 to fix bug #236: if no fields are defined or 
 		      no data is written, break out and don't fall through */
                    if ( fields[0] == '\0' || nvf == 0 )
-                      ERROR_BREAK_0( "<No data written>\n\n", SUCCEED );
+                   {
+                      fprintf(fp, "   No data written\n\n");
+                      break;
+                   }
                 }
                 else /* only header, no attributes, annotations or data */
                     break; /* break out and don't fall through */
@@ -767,7 +765,7 @@
               VSdetach(vd_id);
       }
     /* Normal cleanup */
-#if defined (MAC) || defined (macintosh) || defined (SYMANTEC_C)
+#if defined (MAC) || defined (macintosh) || defined (SYMANTEC_C) || defined(__APPLE__)
    if(fields != NULL)
    {
       HDfree(fields);
@@ -782,7 +780,7 @@
 intn
 dumpvd_binary(dump_info_t * dumpvd_opts, 
               int32 file_id,
-              char  *file_name,
+              const char  *file_name,
 	      FILE* fp,
               int32 num_vd_chosen, 
               char *flds_chosen[MAXCHOICES],
@@ -793,7 +791,6 @@
    int32       i, vd_chosen_idx;
    int32       nvf;
    int32       interlace;
-   int32       vsize;
    int32       vdata_ref = -1;
    char        vdname[VSNAMELENMAX];
    intn        dumpall = 0;
@@ -801,7 +798,7 @@
    int32       vd_id = FAIL;
    intn        status;
    intn        ret_value = SUCCEED;
-#if defined (MAC) || defined (macintosh) || defined (SYMANTEC_C)
+#if defined (MAC) || defined (macintosh) || defined (SYMANTEC_C) || defined(__APPLE__)
 	/* macintosh cannot handle >32K locals */
    char *fields = (char *)HDmalloc(VSFIELDMAX*FIELDNAMELENMAX* sizeof(char));
 
@@ -846,7 +843,7 @@
          ERROR_CONT_2( "in %s: VSattach failed for vdata with ref#=%d", 
                         "dumpvd_binary", (int) vdata_ref );
 
-      status = VSinquire(vd_id, &nvf, &interlace, fields, &vsize, vdname);
+      status = VSinquire(vd_id, &nvf, &interlace, fields, NULL, vdname);
       if( FAIL == status ) /* end access to vd_id and cont. to next vdata */
          ERROR_CONT_END( "in %s: VSinquire failed for vdata with ref#=%d", 
                         "dumpvd_binary", (int) vdata_ref, vd_id );
@@ -898,7 +895,7 @@
    }	/* for each vdata */
 
    /* Normal cleanup */
-#if defined (MAC) || defined (macintosh) || defined (SYMANTEC_C)
+#if defined (MAC) || defined (macintosh) || defined (SYMANTEC_C) || defined(__APPLE__)
    if(fields != NULL)
    {
       HDfree(fields);
@@ -919,7 +916,7 @@
 closeVD(
     int32 *file_id,     /* will be returned as a FAIL */
     int32 **vd_chosen,  /* will be returned as a NULL */
-    char  *curr_file_name )
+    const char  *curr_file_name )
 {
    if( *file_id != FAIL )
    {
@@ -963,83 +960,107 @@
       ERROR_GOTO_0( "Missing input file name.  Please try again.\n" );
 
    while (curr_arg < argc)
-   {	/* Loop until all specified files have been 
-           processed */
+   {	/* Loop until all specified files have been processed */
 
-   /* get file name */
-   HDstrcpy(file_name, argv[curr_arg]); 
+      intn isHDF = TRUE;  /* FALSE, if current file is not HDF file */
 
-   /* record for later use */
-   HDstrcpy( dumpvd_opts->ifile_name, file_name );
-   curr_arg++;
+      /* get file name */
+      HDstrcpy(file_name, argv[curr_arg]); 
 
-   closeVD( &file_id, &vd_chosen, file_name );
+      /* record for later use */
+      HDstrcpy( dumpvd_opts->ifile_name, file_name );
+      curr_arg++;
 
-   /* try opening file */
-   file_id = Hopen(file_name, DFACC_READ, 0);
-   if (file_id == FAIL)
-      ERROR_CONT_1( "in dvd: Hopen failed on file %s\n", file_name);
+      closeVD( &file_id, &vd_chosen, file_name );
 
-   if (FAIL == Vstart(file_id))
-      ERROR_CONT_1( "in dvd: Vstart failed for file %s\n", file_name);
+      /* Print an informative message and skip this file if it is not
+         an HDF file */
+      isHDF = Hishdf(file_name);
+      if (isHDF == FALSE)
+      {
+         /* if there are no more files to be processed, print error
+            message, then returns with FAIL */
+         if( curr_arg == argc )
+            {ERROR_GOTO_1( "in dvd: %s is not an HDF file", file_name);}
+         else /* print message, then continue processing the next file */
+            {ERROR_CONT_1( "in dvd: %s is not an HDF file", file_name);}
+      }
 
-   /* Find out which VDs have been chosen. */
-   num_vd_chosen = choose_vd(dumpvd_opts, &vd_chosen, file_id, &index_error);
+      /* open current hdf file with error check, if fail, go to next file */
+      file_id = Hopen(file_name, DFACC_READ, 0);
+      if (file_id == FAIL)
+      {
+         /* if there are no more files to be processed, print error
+            message, then returns with FAIL */
+         if( curr_arg == argc )
+            {ERROR_GOTO_1( "in dvd: Failure in opening file %s", file_name);}
+         /* otherwise, print message, then continue processing the next file */
+         else
+            ERROR_CONT_1( "in dvd: Failure in opening file %s", file_name );
+      }
 
-   /* if there are no valid indices, move on to the next file */
-   if (index_error && num_vd_chosen == 0)
-      continue;   /* to the next file, closeVG before opening next file
-                     takes care of Vend, Hclose, and free vg_chosen */
+      /* initiate VG interface; if fail, probably something fatal, returns
+         with FAIL */
+      if (FAIL == Vstart(file_id))
+         ERROR_GOTO_1( "in dvd: Vstart failed for file %s\n", file_name);
 
-   ft = dumpvd_opts->file_type;
-   fp = stdout;	/* default file pointer to the standard output */
-   switch(ft)
-   {
-       case DASCII:  /*    ASCII file   */
+      /* Find out which VDs have been chosen. */
+      num_vd_chosen = choose_vd(dumpvd_opts, &vd_chosen, file_id, &index_error);
 
-	  /* set output file */
-	  if (dumpvd_opts->dump_to_file)
-	     fp = fopen(dumpvd_opts->file_name, "w");
+      /* if there are no valid indices, move on to the next file */
+      if (index_error && num_vd_chosen == 0)
+         continue;   /* to the next file, closeVG before opening next file
+                        takes care of Vend, Hclose, and free vg_chosen */
 
-          status = dumpvd_ascii(dumpvd_opts, file_id, file_name, fp,
-                   num_vd_chosen, flds_chosen, vd_chosen, dumpallfields);
-          if( FAIL == status )
-             ERROR_BREAK_0( "in dvd", FAIL );
-          break;
-       case DBINARY:   /*  binary file, not fully tested yet  */
+      ft = dumpvd_opts->file_type;
+      fp = stdout;	/* default file pointer to the standard output */
+      switch(ft)
+      {
+          case DASCII:  /*    ASCII file   */
 
-    	  /* Get output file name.  */
-    	  if (dumpvd_opts->dump_to_file)
-             fp = fopen(dumpvd_opts->file_name, "wb");
+	     /* set output file */
+	     if (dumpvd_opts->dump_to_file)
+	        fp = fopen(dumpvd_opts->file_name, "w");
 
-          status = dumpvd_binary(dumpvd_opts, file_id, file_name, fp,
-                   num_vd_chosen, flds_chosen, vd_chosen, dumpallfields);
-          if( FAIL == status )
-             ERROR_BREAK_0( "in dvd", FAIL );
+             status = dumpvd_ascii(dumpvd_opts, file_id, file_name, fp,
+                      num_vd_chosen, flds_chosen, vd_chosen, dumpallfields);
+             if( FAIL == status )
+                ERROR_BREAK_0( "in dvd: dumpvd_ascii returned failure", FAIL );
+             break;
+          case DBINARY:   /*  binary file, not fully tested yet  */
 
-          break;
-       default:
-          printf("dumping vdata, unknown ouput file option \n");
-          ret_value = FAIL;
-   }    /* switch for output file   */
+    	     /* Get output file name.  */
+    	     if (dumpvd_opts->dump_to_file)
+                fp = fopen(dumpvd_opts->file_name, "wb");
 
-   if(vd_chosen != NULL)
-   {
-      HDfree(vd_chosen);
-      vd_chosen = NULL;
-   } 
+             status = dumpvd_binary(dumpvd_opts, file_id, file_name, fp,
+                      num_vd_chosen, flds_chosen, vd_chosen, dumpallfields);
+             if( FAIL == status )
+                ERROR_BREAK_0( "in dvd: dumpvd_binary returned failure", FAIL );
 
-   if (dumpvd_opts->dump_to_file)
-      fclose(fp);
+             break;
+          default:
+             printf("dumping vdata, unknown ouput file option \n");
+             ret_value = FAIL;
+      }    /* switch for output file   */
 
-   if (FAIL == Vend(file_id))
-      ERROR_CONT_1( "in dvd: Vend failed on file %s\n", file_name);
+      if(vd_chosen != NULL)
+      {
+         HDfree(vd_chosen);
+         vd_chosen = NULL;
+      } 
 
-   if (FAIL == Hclose(file_id))
-      ERROR_CONT_1( "in dvd: Hclose failed on file %s\n", file_name);
+      if (dumpvd_opts->dump_to_file)
+         fclose(fp);
 
-   file_id = FAIL; /* reset */
+      if (FAIL == Vend(file_id))
+         ERROR_CONT_1( "in dvd: Vend failed on file %s\n", file_name);
 
+      if (FAIL == Hclose(file_id))
+         ERROR_CONT_1( "in dvd: Hclose failed on file %s\n", file_name);
+
+      file_id = FAIL; /* reset */
+
    }	/* while processing files  */
 
 done:
@@ -1090,7 +1111,7 @@
    if( curr_arg >= argc )
    {
       dumpvd_usage(argc, argv);
-      goto done;
+      ERROR_GOTO_0( "in do_dumpvd: command is incomplete");
    }            /* end if */
 
    /* parse the user's command and store the inputs in dumpvd_opts */
@@ -1104,9 +1125,9 @@
 
    /* display data and information as specified in dumpvd_opts */
    status = dvd(&dumpvd_opts, curr_arg, argc, argv, flds_chosen, dumpallfields);
+   if( status == FAIL )
+      ERROR_GOTO_0( "in do_dumpvd: dvd failed" );
 
-   ret_value = status; /* return status to caller */
-
   done:
     if (ret_value == FAIL)
       { /* Failure cleanup */

Modified: packages/libhdf4/branches/upstream/current/mfhdf/dumper/hdp_vg.c
===================================================================
--- packages/libhdf4/branches/upstream/current/mfhdf/dumper/hdp_vg.c	2007-05-15 09:05:29 UTC (rev 830)
+++ packages/libhdf4/branches/upstream/current/mfhdf/dumper/hdp_vg.c	2007-05-15 09:53:05 UTC (rev 831)
@@ -11,10 +11,10 @@
  ****************************************************************************/
 
 #ifdef RCSID
-static char RcsId[] = "@(#)$Revision: 1.37 $";
+static char RcsId[] = "@(#)$Revision: 1.41 $";
 #endif
 
-/* $Id: hdp_vg.c,v 1.37 2000/09/05 14:28:13 bmribler Exp $ */
+/* $Id: hdp_vg.c,v 1.41 2003/12/10 21:14:03 epourmal Exp $ */
 
 #include "hdp.h"
 #ifndef MIPSEL
@@ -256,7 +256,7 @@
    print an error message in the stderr to help debugging */
 void
 resetVG( int32 *vg_id,
-         char  *curr_file_name )
+         const char  *curr_file_name )
 {
    if( *vg_id != FAIL )
    {
@@ -392,7 +392,7 @@
 get_VGandInfo( int32 *vg_id,
                int32  file_id,
                int32  vg_ref,
-               char  *file_name,
+               const  char *file_name,
                int32 *n_entries,
                char  *vgname,
                char  *vgclass )
@@ -444,7 +444,7 @@
 
 intn 
 print_data_annots( int32 file_id,
-                char *file_name,
+                const char *file_name,
                 int32 tag,
                 int32 ref )
 {
@@ -531,7 +531,7 @@
           count = 0;
    char  *ptr, *tempPtr,
           fldname[MAXNAMELEN],
-#if defined (MAC) || defined (macintosh) || defined (SYMANTEC_C)
+#if defined (MAC) || defined (macintosh) || defined (SYMANTEC_C) || defined(__APPLE__) 
 
    /* Lets allocate space for tmpflds */
    *tempflds = (char *)HDmalloc(VSFIELDMAX * FIELDNAMELENMAX * sizeof(char *));
@@ -548,31 +548,38 @@
    else
    { /* there are fields to print */
       fprintf(fp, "%s[", field_title );
-      HDstrcpy(tempflds, fields);
-      ptr = tempflds;
+      HDstrcpy(tempflds, fields);	/* tempflds can be manipulated */
+      ptr = tempflds;			/* traverse tempflds with ptr */
+
+      /* traverse the temporary fieldname list to obtain and print each
+       * field name; use ',' to locate individual field names, and each 
+       * line should not exceed 50 characters beside the alignment */
       for (i = 0; !lastItem; i++)
       {
-         tempPtr = HDstrchr(ptr, ',');
+         tempPtr = HDstrchr(ptr, ',');  /* locate next separator */
          if (tempPtr == NULL)
-            lastItem = 1;
+            lastItem = 1;	/* set flag for end of list */
          else
-            *tempPtr = '\0';
-         HDstrcpy(fldname, ptr);
-         count += HDstrlen(fldname);
+            *tempPtr = '\0';	/* change ',' to null to obtain field name */
+         HDstrcpy(fldname, ptr);	/* obtain current field name */
+         count += HDstrlen(fldname);	/* increment current # of chars on line */
          if (count > 50)
          {
-            fprintf(fp, "%s", field_title );
-            count = 0;
+	    /* print alignment for the subsequent lines */
+            fprintf(fp, "\n\t          ");
+
+	    /* include the skipped field from previous line */
+            count = HDstrlen(fldname);  
          }
-         fprintf(fp, "%s", fldname);
+         fprintf(fp, "%s", fldname);  /* print the current field name */
          if (!lastItem)
-            fprintf(fp, ", ");
-         ptr = tempPtr + 1;
-      }  /* end of if skip */
+            fprintf(fp, ", ");	/* print a comma if it's not the last field name */
+         ptr = tempPtr + 1;	/* move ptr beyond last field name */
+      }  /* end of for loop */
       fprintf(fp, "];\n");
    }  /* there are fields to print */
    
-#if defined (MAC) || defined (macintosh) || defined (SYMANTEC_C)
+#if defined (MAC) || defined (macintosh) || defined (SYMANTEC_C) || defined(__APPLE__)
    if(tempflds != NULL)
    {
       HDfree(tempflds);
@@ -732,7 +739,7 @@
    two routines print_all_file_labels and print_file_descs defined in
    hdp_list.c to display the file annotations of the current file */
 intn
-print_file_annotations( int32 file_id, char* file_name )
+print_file_annotations( int32 file_id, const char* file_name )
 {
    int32 an_id = FAIL;
    intn  status = SUCCEED, ret_value = SUCCEED;
@@ -778,7 +785,7 @@
 closeVG(
     int32 *file_id,     /* will be returned as a FAIL */
     int32 **vg_chosen,  /* will be returned as a NULL */
-    char  *curr_file_name )
+    const char  *curr_file_name )
 {
    if( *file_id != FAIL )
    {
@@ -803,7 +810,7 @@
 vgBuildGraph(int32        vg_id, 
            int32        file_id, 
            int32        num_entries, 
-	   char* file_name,
+	   const char* file_name,
            vg_info_t *aNode,
            intn         *skipfile)
 {
@@ -979,7 +986,7 @@
     char  *file_name = dumpvg_opts->ifile_name;
     intn   status, ret_value = SUCCEED;
 
-#if defined (MAC) || defined (macintosh) || defined (SYMANTEC_C)
+#if defined (MAC) || defined (macintosh) || defined (SYMANTEC_C) || defined(__APPLE__)
 	/* macintosh cannot handle >32K locals */
    char *fields = (char *)HDmalloc(VSFIELDMAX*FIELDNAMELENMAX* sizeof(char));
    CHECK_ALLOC( fields, "*fields", "vgdumpfull" );
@@ -1170,7 +1177,7 @@
             }
       }
     /* Normal cleanup */
-#if defined (MAC) || defined (macintosh) || defined (SYMANTEC_C)
+#if defined (MAC) || defined (macintosh) || defined (SYMANTEC_C) || defined(__APPLE__)
    if(fields != NULL)
    {
       HDfree(fields);
@@ -1221,6 +1228,7 @@
       and display them */
    while (curr_arg < argc)
    {
+      intn isHDF = TRUE;  /* FALSE, if current file is not HDF file */
       intn skipfile = FALSE;  /* skip the current file when some severe */
            /* failure occurs; otherwise, the list of nodes is not */
            /* completely prepared and will cause a crash in display */
@@ -1233,6 +1241,19 @@
          cleanup, so closeVG ensures of that */
       closeVG( &file_id, &vg_chosen, file_name );
 
+      /* Print an informative message and skip this file if it is not
+         an HDF file */
+      isHDF = Hishdf(file_name);
+      if (isHDF == FALSE)
+      {
+         /* if there are no more files to be processed, print error
+            message, then returns with FAIL */
+         if( curr_arg == argc )
+            {ERROR_GOTO_1( "in dvg: %s is not an HDF file", file_name);}
+         else /* print message, then continue processing the next file */
+            {ERROR_CONT_1( "in dvg: %s is not an HDF file", file_name);}
+      }
+
       /* open current hdf file with error check, if fail, go to next file */
       file_id = Hopen(file_name, DFACC_READ, 0);
       if (file_id == FAIL)
@@ -1246,9 +1267,10 @@
             ERROR_CONT_1( "in dvg: Failure in opening file %s", file_name );
       }
 
-      /* initiate VG interface; if fail, close hdf file & go to next file */
+      /* initiate VG interface; if fail, probably something fatal, returns 
+	 with FAIL */
       if (FAIL == Vstart(file_id))
-         ERROR_CONT_1( "in dvg: Vstart failed for file %s\n", file_name);
+         ERROR_GOTO_1( "in dvg: Vstart failed for file %s\n", file_name);
 
       /* compose the list of indices of vgroups to be processed in the current
       file and return the number of items in the list */

Modified: packages/libhdf4/branches/upstream/current/mfhdf/dumper/show.c
===================================================================
--- packages/libhdf4/branches/upstream/current/mfhdf/dumper/show.c	2007-05-15 09:05:29 UTC (rev 830)
+++ packages/libhdf4/branches/upstream/current/mfhdf/dumper/show.c	2007-05-15 09:53:05 UTC (rev 831)
@@ -13,7 +13,7 @@
 /* Modified from vshow.c by Eric Tsui, 12/25/1994. */
 
 #ifdef RCSID
-static char *RcsId[] = "@(#)$Revision: 1.22 $";
+static char *RcsId[] = "@(#)$Revision: 1.25 $";
 #endif
 
 #define VSET_INTERFACE
@@ -57,7 +57,7 @@
     int32       cn = 0;
     int32       ret_value = SUCCEED;
 
-#if defined (MAC) || defined (macintosh) || defined (SYMANTEC_C)
+#if defined (MAC) || defined (macintosh) || defined (SYMANTEC_C) || defined(__APPLE__)
 	/* macintosh cannot handle >32K locals */
     char *fields = (char *)HDmalloc(VSFIELDMAX*FIELDNAMELENMAX* sizeof(char));
     char *flds = (char *)HDmalloc(VSFIELDMAX*FIELDNAMELENMAX* sizeof(char));
@@ -148,9 +148,10 @@
 
           /* Choose a function for displaying a piece of data of a 
              particular type. */
-          switch (w->type[i])
+          switch (w->type[i] & 0xff)
             {
             case DFNT_CHAR:
+	    case DFNT_UCHAR:
                 vfmtfn[i] = fmtchar;
                 break;
 
@@ -456,7 +457,7 @@
               HDfree((VOIDP)bb);
       }
     /* Normal cleanup */
-#if defined (MAC) || defined (macintosh) || defined (SYMANTEC_C)
+#if defined (MAC) || defined (macintosh) || defined (SYMANTEC_C) || defined(__APPLE__)
    if(fields != NULL)
    {
       HDfree(fields);
@@ -497,7 +498,7 @@
     intn          status;
     intn          ret_value = SUCCEED;
 
-#if defined (MAC) || defined (macintosh) || defined (SYMANTEC_C)
+#if defined (MAC) || defined (macintosh) || defined (SYMANTEC_C) || defined(__APPLE__)
 	/* macintosh cannot handle >32K locals */
     char *name = (char *)HDmalloc((FIELDNAMELENMAX+1) * sizeof(char));
     uint8 *attrbuf = (uint8 *)HDmalloc((BUFFER) * sizeof(uint8));
@@ -600,7 +601,7 @@
             }
 
           /* format output */
-          switch (i_type)  
+          switch (i_type & 0xff)  
             {
             case DFNT_CHAR:
             case DFNT_UCHAR:
@@ -679,7 +680,7 @@
               HDfree(buf);
       }
     /* Normal cleanup */
-#if defined (MAC) || defined (macintosh) || defined (SYMANTEC_C)
+#if defined (MAC) || defined (macintosh) || defined (SYMANTEC_C) || defined(__APPLE__)
    if(name != NULL)
    {
       HDfree(name);

Deleted: packages/libhdf4/branches/upstream/current/mfhdf/dumper/star.hdf
===================================================================
(Binary files differ)

Deleted: packages/libhdf4/branches/upstream/current/mfhdf/dumper/swf32.hdf
===================================================================
(Binary files differ)

Deleted: packages/libhdf4/branches/upstream/current/mfhdf/dumper/swf32_fileattr.hdf
===================================================================
(Binary files differ)

Deleted: packages/libhdf4/branches/upstream/current/mfhdf/dumper/swi16.hdf
===================================================================
(Binary files differ)

Deleted: packages/libhdf4/branches/upstream/current/mfhdf/dumper/swi8.hdf
===================================================================
(Binary files differ)

Deleted: packages/libhdf4/branches/upstream/current/mfhdf/dumper/tdata.hdf
===================================================================
(Binary files differ)

Deleted: packages/libhdf4/branches/upstream/current/mfhdf/dumper/tdf24.hdf
===================================================================
(Binary files differ)

Deleted: packages/libhdf4/branches/upstream/current/mfhdf/dumper/tdfr8f.hdf
===================================================================
(Binary files differ)

Deleted: packages/libhdf4/branches/upstream/current/mfhdf/dumper/test.hdf
===================================================================
(Binary files differ)

Added: packages/libhdf4/branches/upstream/current/mfhdf/dumper/testfiles/Example6.hdf
===================================================================
(Binary files differ)


Property changes on: packages/libhdf4/branches/upstream/current/mfhdf/dumper/testfiles/Example6.hdf
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: packages/libhdf4/branches/upstream/current/mfhdf/dumper/testfiles/Image_with_Palette.hdf
===================================================================
(Binary files differ)


Property changes on: packages/libhdf4/branches/upstream/current/mfhdf/dumper/testfiles/Image_with_Palette.hdf
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: packages/libhdf4/branches/upstream/current/mfhdf/dumper/testfiles/LongDataset.hdf
===================================================================
(Binary files differ)


Property changes on: packages/libhdf4/branches/upstream/current/mfhdf/dumper/testfiles/LongDataset.hdf
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: packages/libhdf4/branches/upstream/current/mfhdf/dumper/testfiles/ctxtr2r.hdf
===================================================================
(Binary files differ)


Property changes on: packages/libhdf4/branches/upstream/current/mfhdf/dumper/testfiles/ctxtr2r.hdf
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Modified: packages/libhdf4/branches/upstream/current/mfhdf/dumper/testfiles/dumpgr-13.out
===================================================================
--- packages/libhdf4/branches/upstream/current/mfhdf/dumper/testfiles/dumpgr-13.out	2007-05-15 09:05:29 UTC (rev 830)
+++ packages/libhdf4/branches/upstream/current/mfhdf/dumper/testfiles/dumpgr-13.out	2007-05-15 09:53:05 UTC (rev 831)
@@ -3,17 +3,7 @@
 #############################
 File name: Image_with_Palette.hdf 
 
-	 Image  Name = Image with Palette
-	 Index = 0
-	 Type= 8-bit unsigned integer
-	 width=5; height=5
-	 Ref. = 2
-	 ncomps = 2
-	 Interlace mode= PIXEL
-	 Number of attributes = 0
-	 Data : 
-                1 2 2 3 3 4 4 5 5 6 2 3 3 4 4 5 5 6 6 7 3 4 4 5 5 
-                6 6 7 7 8 4 5 5 6 6 7 7 8 8 9 5 6 6 7 7 8 8 9 9 10 
+	 Raster Image Ref. = 2
 	 Palette: 3 components; 256 entries
 	 Palette Data: 
                 0 0 8 1 0 8 2 0 8 3 0 8 4 0 8 5 0 8 6 0 8 7 0 8 8 
@@ -56,17 +46,7 @@
                 249 0 8 250 0 8 251 0 8 252 0 8 253 0 8 254 0 8 255 
                 0 8 
 
-	 Image  Name = Second Image w/pal
-	 Index = 1
-	 Type= 8-bit unsigned integer
-	 width=5; height=5
-	 Ref. = 3
-	 ncomps = 2
-	 Interlace mode= PIXEL
-	 Number of attributes = 0
-	 Data : 
-                1 2 2 3 3 4 4 5 5 6 2 3 3 4 4 5 5 6 6 7 3 4 4 5 5 
-                6 6 7 7 8 4 5 5 6 6 7 7 8 8 9 5 6 6 7 7 8 8 9 9 10 
+	 Raster Image Ref. = 3
 	 Palette: 3 components; 256 entries
 	 Palette Data: 
                 2 4 8 2 4 8 2 4 8 2 4 8 2 4 8 2 4 8 2 4 8 2 4 8 2 
@@ -101,15 +81,5 @@
                 8 2 4 8 2 4 8 2 4 8 2 4 8 2 4 8 2 4 8 2 4 8 2 4 8 
                 2 4 8 2 4 8 2 4 8 2 4 8 2 4 8 2 4 8 
 
-	 Image  Name = Last Image: no pal
-	 Index = 2
-	 Type= 8-bit unsigned integer
-	 width=5; height=5
-	 Ref. = 4
-	 ncomps = 2
-	 Interlace mode= PIXEL
-	 Number of attributes = 0
-	 Data : 
-                1 2 2 3 3 4 4 5 5 6 2 3 3 4 4 5 5 6 6 7 3 4 4 5 5 
-                6 6 7 7 8 4 5 5 6 6 7 7 8 8 9 5 6 6 7 7 8 8 9 9 10 
+	 Raster Image Ref. = 4
 	 No palette data

Modified: packages/libhdf4/branches/upstream/current/mfhdf/dumper/testfiles/dumpgr-15.out
===================================================================
--- packages/libhdf4/branches/upstream/current/mfhdf/dumper/testfiles/dumpgr-15.out	2007-05-15 09:05:29 UTC (rev 830)
+++ packages/libhdf4/branches/upstream/current/mfhdf/dumper/testfiles/dumpgr-15.out	2007-05-15 09:53:05 UTC (rev 831)
@@ -1,8 +1,6 @@
 #############################
-Expected output for './hdp dumpgr -r 2,4 -p -d Image_with_Palette.hdf'
+Expected output for './hdp dumpgr -r 2,4 -pd Image_with_Palette.hdf'
 #############################
-1 2 2 3 3 4 4 5 5 6 2 3 3 4 4 5 5 6 6 7 3 4 4 5 5 6 6 7 7 8 4 5 5 
-6 6 7 7 8 8 9 5 6 6 7 7 8 8 9 9 10 
 0 0 8 1 0 8 2 0 8 3 0 8 4 0 8 5 0 8 6 0 8 7 0 8 8 0 8 9 0 8 10 0 8 
 11 0 8 12 0 8 13 0 8 14 0 8 15 0 8 16 0 8 17 0 8 18 0 8 19 0 8 20 
 0 8 21 0 8 22 0 8 23 0 8 24 0 8 25 0 8 26 0 8 27 0 8 28 0 8 29 0 8 
@@ -33,5 +31,3 @@
 8 239 0 8 240 0 8 241 0 8 242 0 8 243 0 8 244 0 8 245 0 8 246 0 8 
 247 0 8 248 0 8 249 0 8 250 0 8 251 0 8 252 0 8 253 0 8 254 0 8 255 
 0 8 
-1 2 2 3 3 4 4 5 5 6 2 3 3 4 4 5 5 6 6 7 3 4 4 5 5 6 6 7 7 8 4 5 5 
-6 6 7 7 8 8 9 5 6 6 7 7 8 8 9 9 10 

Added: packages/libhdf4/branches/upstream/current/mfhdf/dumper/testfiles/dumpgr-19.out
===================================================================
--- packages/libhdf4/branches/upstream/current/mfhdf/dumper/testfiles/dumpgr-19.out	                        (rev 0)
+++ packages/libhdf4/branches/upstream/current/mfhdf/dumper/testfiles/dumpgr-19.out	2007-05-15 09:53:05 UTC (rev 831)
@@ -0,0 +1,93 @@
+#############################
+Expected output for './hdp dumpgr -g -l grtdfi322.hdf'
+#############################
+File name: grtdfi322.hdf 
+
+    File attributes:
+	 Attr0: Name = File contents
+		 Type = 8-bit signed char 
+		 Count= 16
+
+	 Image  Name = Raster Image #0
+	 Index = 0
+	 Type= 8-bit unsigned char
+	 width=5; height=6
+	 Ref. = 7
+	 ncomps = 1
+	 Interlace mode= PIXEL
+	 No palette
+	 Number of attributes = 1
+	 Attr0: Name = Value range
+		 Type = 32-bit signed integer 
+		 Count= 2
+	 Data : 
+                1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 
+                21 22 23 24 25 26 27 28 29 30 
+
+	 Image  Name = Image_array_5
+	 Index = 1
+	 Type= 32-bit signed integer
+	 width=10; height=5
+	 Ref. = 5
+	 ncomps = 2
+	 Interlace mode= PIXEL
+	 No palette
+	 Number of attributes = 0
+	 Data : 
+                0 5 0 5 1 6 1 6 2 7 2 7 3 8 3 8 4 9 4 9 10 15 10 15 
+                11 16 11 16 12 17 12 17 13 18 13 18 14 19 14 19 20 
+                25 20 25 21 26 21 26 22 27 22 27 23 28 23 28 24 29 
+                24 29 30 35 30 35 31 36 31 36 32 37 32 37 33 38 33 
+                38 34 39 34 39 40 45 40 45 41 46 41 46 42 47 42 47 
+                43 48 43 48 44 49 44 49 
+
+	 Image  Name = Raster Image #3
+	 Index = 2
+	 Type= 8-bit unsigned char
+	 width=5; height=6
+	 Ref. = 1
+	 ncomps = 3
+	 Interlace mode= PIXEL
+	 No palette
+	 Number of attributes = 0
+	 Data : 
+                1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 
+                21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 
+                38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 
+                55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 
+                72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 
+                89 90 
+
+	 Image  Name = Raster Image #4
+	 Index = 3
+	 Type= 8-bit unsigned char
+	 width=5; height=6
+	 Ref. = 3
+	 ncomps = 3
+	 Interlace mode= LINE
+	 No palette
+	 Number of attributes = 0
+	 Data : 
+                1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 
+                21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 
+                38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 
+                55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 
+                72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 
+                89 90 
+
+	 Image  Name = Raster Image #5
+	 Index = 4
+	 Type= 8-bit unsigned char
+	 width=5; height=6
+	 Ref. = 4
+	 ncomps = 3
+	 Interlace mode= COMPONENT
+	 No palette
+	 Number of attributes = 0
+	 Data : 
+                1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 
+                21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 
+                38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 
+                55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 
+                72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 
+                89 90 

Added: packages/libhdf4/branches/upstream/current/mfhdf/dumper/testfiles/dumpsds-10.out
===================================================================
--- packages/libhdf4/branches/upstream/current/mfhdf/dumper/testfiles/dumpsds-10.out	                        (rev 0)
+++ packages/libhdf4/branches/upstream/current/mfhdf/dumper/testfiles/dumpsds-10.out	2007-05-15 09:53:05 UTC (rev 831)
@@ -0,0 +1,124 @@
+#############################
+Expected output for './hdp dumpsds -g swf32_fileattr.hdf'
+#############################
+File name: swf32_fileattr.hdf 
+
+File attributes:
+	 Attr0: Name = File purpose
+		 Type = 8-bit signed char 
+		 Count= 37
+	 Attr1: Name = File contents
+		 Type = 8-bit signed char 
+		 Count= 14
+	 Attr2: Name = Test clean format
+		 Type = 8-bit signed char 
+		 Count= 65
+
+Dimension Variable Name = fakeDim0
+	 Index = 0
+	 Scale Type= 32-bit floating point
+	 Ref. = 3
+	 Rank = 1
+	 Number of attributes = 3
+	 Dim0: Name=fakeDim0
+		 Size = 2
+	 Attr0: Name = long_name
+		 Type = 8-bit signed char 
+		 Count= 4
+		 Value = Time
+	 Attr1: Name = units
+		 Type = 8-bit signed char 
+		 Count= 6
+		 Value = Second
+	 Attr2: Name = format
+		 Type = 8-bit signed char 
+		 Count= 5
+		 Value = Int32
+	 Data : 
+                0.000000 100.000000 
+
+
+Dimension Variable Name = fakeDim1
+	 Index = 1
+	 Scale Type= 32-bit floating point
+	 Ref. = 4
+	 Rank = 1
+	 Number of attributes = 3
+	 Dim0: Name=fakeDim1
+		 Size = 3
+	 Attr0: Name = long_name
+		 Type = 8-bit signed char 
+		 Count= 4
+		 Value = Line
+	 Attr1: Name = units
+		 Type = 8-bit signed char 
+		 Count= 4
+		 Value = Inch
+	 Attr2: Name = format
+		 Type = 8-bit signed char 
+		 Count= 5
+		 Value = Int16
+	 Data : 
+                0.000000 10.000000 20.000000 
+
+
+Dimension Variable Name = fakeDim2
+	 Index = 2
+	 Scale Type= 32-bit floating point
+	 Ref. = 5
+	 Rank = 1
+	 Number of attributes = 3
+	 Dim0: Name=fakeDim2
+		 Size = 4
+	 Attr0: Name = long_name
+		 Type = 8-bit signed char 
+		 Count= 6
+		 Value = Column
+	 Attr1: Name = units
+		 Type = 8-bit signed char 
+		 Count= 2
+		 Value = Cm
+	 Attr2: Name = format
+		 Type = 8-bit signed char 
+		 Count= 5
+		 Value = Int32
+	 Data : 
+                0.000000 1.000000 2.000000 3.000000 
+
+
+Variable Name = Data-Set-2
+	 Index = 3
+	 Type= 32-bit floating point
+	 Ref. = 2
+	 Rank = 3
+	 Number of attributes = 2
+	 Dim0: Name=fakeDim0
+		 Size = 2
+		 Scale Type = 32-bit floating point
+		 Number of attributes = 3
+	 Dim1: Name=fakeDim1
+		 Size = 3
+		 Scale Type = 32-bit floating point
+		 Number of attributes = 3
+	 Dim2: Name=fakeDim2
+		 Size = 4
+		 Scale Type = 32-bit floating point
+		 Number of attributes = 3
+	 Attr0: Name = valid_max
+		 Type = 32-bit floating point 
+		 Count= 1
+		 Value = 123.000000 
+	 Attr1: Name = valid_min
+		 Type = 32-bit floating point 
+		 Count= 1
+		 Value = -1.000000 
+	 Data : 
+                0.000000 1.000000 2.000000 3.000000 
+                10.000000 11.000000 12.000000 13.000000 
+                20.000000 21.000000 22.000000 23.000000 
+
+                100.000000 101.000000 102.000000 103.000000 
+                110.000000 111.000000 112.000000 113.000000 
+                120.000000 121.000000 122.000000 123.000000 
+
+

Added: packages/libhdf4/branches/upstream/current/mfhdf/dumper/testfiles/dumpsds-11.out
===================================================================
--- packages/libhdf4/branches/upstream/current/mfhdf/dumper/testfiles/dumpsds-11.out	                        (rev 0)
+++ packages/libhdf4/branches/upstream/current/mfhdf/dumper/testfiles/dumpsds-11.out	2007-05-15 09:53:05 UTC (rev 831)
@@ -0,0 +1,118 @@
+#############################
+Expected output for './hdp dumpsds -l swf32_fileattr.hdf'
+#############################
+File name: swf32_fileattr.hdf 
+
+File attributes:
+	 Attr0: Name = File purpose
+		 Type = 8-bit signed char 
+		 Count= 37
+		 Value = For testing dumpsds SD file attribute
+	 Attr1: Name = File contents
+		 Type = 8-bit signed char 
+		 Count= 14
+		 Value = Some data sets
+	 Attr2: Name = Test clean format
+		 Type = 8-bit signed char 
+		 Count= 65
+		 Value = A tab <\011>, a CR <\012>, several nulls 
+                         <\000\000\000\000\000\000>, and one more 
+                         tab <\011>
+
+Dimension Variable Name = fakeDim0
+	 Index = 0
+	 Scale Type= 32-bit floating point
+	 Ref. = 3
+	 Rank = 1
+	 Number of attributes = 3
+	 Dim0: Name=fakeDim0
+		 Size = 2
+	 Attr0: Name = long_name
+		 Type = 8-bit signed char 
+		 Count= 4
+	 Attr1: Name = units
+		 Type = 8-bit signed char 
+		 Count= 6
+	 Attr2: Name = format
+		 Type = 8-bit signed char 
+		 Count= 5
+	 Data : 
+                0.000000 100.000000 
+
+
+Dimension Variable Name = fakeDim1
+	 Index = 1
+	 Scale Type= 32-bit floating point
+	 Ref. = 4
+	 Rank = 1
+	 Number of attributes = 3
+	 Dim0: Name=fakeDim1
+		 Size = 3
+	 Attr0: Name = long_name
+		 Type = 8-bit signed char 
+		 Count= 4
+	 Attr1: Name = units
+		 Type = 8-bit signed char 
+		 Count= 4
+	 Attr2: Name = format
+		 Type = 8-bit signed char 
+		 Count= 5
+	 Data : 
+                0.000000 10.000000 20.000000 
+
+
+Dimension Variable Name = fakeDim2
+	 Index = 2
+	 Scale Type= 32-bit floating point
+	 Ref. = 5
+	 Rank = 1
+	 Number of attributes = 3
+	 Dim0: Name=fakeDim2
+		 Size = 4
+	 Attr0: Name = long_name
+		 Type = 8-bit signed char 
+		 Count= 6
+	 Attr1: Name = units
+		 Type = 8-bit signed char 
+		 Count= 2
+	 Attr2: Name = format
+		 Type = 8-bit signed char 
+		 Count= 5
+	 Data : 
+                0.000000 1.000000 2.000000 3.000000 
+
+
+Variable Name = Data-Set-2
+	 Index = 3
+	 Type= 32-bit floating point
+	 Ref. = 2
+	 Rank = 3
+	 Number of attributes = 2
+	 Dim0: Name=fakeDim0
+		 Size = 2
+		 Scale Type = 32-bit floating point
+		 Number of attributes = 3
+	 Dim1: Name=fakeDim1
+		 Size = 3
+		 Scale Type = 32-bit floating point
+		 Number of attributes = 3
+	 Dim2: Name=fakeDim2
+		 Size = 4
+		 Scale Type = 32-bit floating point
+		 Number of attributes = 3
+	 Attr0: Name = valid_max
+		 Type = 32-bit floating point 
+		 Count= 1
+	 Attr1: Name = valid_min
+		 Type = 32-bit floating point 
+		 Count= 1
+	 Data : 
+                0.000000 1.000000 2.000000 3.000000 
+                10.000000 11.000000 12.000000 13.000000 
+                20.000000 21.000000 22.000000 23.000000 
+
+                100.000000 101.000000 102.000000 103.000000 
+                110.000000 111.000000 112.000000 113.000000 
+                120.000000 121.000000 122.000000 123.000000 
+
+

Added: packages/libhdf4/branches/upstream/current/mfhdf/dumper/testfiles/grtdfi322.hdf
===================================================================
(Binary files differ)


Property changes on: packages/libhdf4/branches/upstream/current/mfhdf/dumper/testfiles/grtdfi322.hdf
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: packages/libhdf4/branches/upstream/current/mfhdf/dumper/testfiles/grtdfui162.hdf
===================================================================
(Binary files differ)


Property changes on: packages/libhdf4/branches/upstream/current/mfhdf/dumper/testfiles/grtdfui162.hdf
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: packages/libhdf4/branches/upstream/current/mfhdf/dumper/testfiles/grtdfui82.hdf
===================================================================
(Binary files differ)


Property changes on: packages/libhdf4/branches/upstream/current/mfhdf/dumper/testfiles/grtdfui82.hdf
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: packages/libhdf4/branches/upstream/current/mfhdf/dumper/testfiles/grtdfui83.hdf
===================================================================
(Binary files differ)


Property changes on: packages/libhdf4/branches/upstream/current/mfhdf/dumper/testfiles/grtdfui83.hdf
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: packages/libhdf4/branches/upstream/current/mfhdf/dumper/testfiles/grtdfui84.hdf
===================================================================
(Binary files differ)


Property changes on: packages/libhdf4/branches/upstream/current/mfhdf/dumper/testfiles/grtdfui84.hdf
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: packages/libhdf4/branches/upstream/current/mfhdf/dumper/testfiles/star.hdf
===================================================================
(Binary files differ)


Property changes on: packages/libhdf4/branches/upstream/current/mfhdf/dumper/testfiles/star.hdf
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: packages/libhdf4/branches/upstream/current/mfhdf/dumper/testfiles/swf32.hdf
===================================================================
(Binary files differ)


Property changes on: packages/libhdf4/branches/upstream/current/mfhdf/dumper/testfiles/swf32.hdf
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: packages/libhdf4/branches/upstream/current/mfhdf/dumper/testfiles/swf32_fileattr.hdf
===================================================================
(Binary files differ)


Property changes on: packages/libhdf4/branches/upstream/current/mfhdf/dumper/testfiles/swf32_fileattr.hdf
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: packages/libhdf4/branches/upstream/current/mfhdf/dumper/testfiles/swi16.hdf
===================================================================
(Binary files differ)


Property changes on: packages/libhdf4/branches/upstream/current/mfhdf/dumper/testfiles/swi16.hdf
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: packages/libhdf4/branches/upstream/current/mfhdf/dumper/testfiles/swi8.hdf
===================================================================
(Binary files differ)


Property changes on: packages/libhdf4/branches/upstream/current/mfhdf/dumper/testfiles/swi8.hdf
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: packages/libhdf4/branches/upstream/current/mfhdf/dumper/testfiles/tdata.hdf
===================================================================
(Binary files differ)


Property changes on: packages/libhdf4/branches/upstream/current/mfhdf/dumper/testfiles/tdata.hdf
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: packages/libhdf4/branches/upstream/current/mfhdf/dumper/testfiles/tdf24.hdf
===================================================================
(Binary files differ)


Property changes on: packages/libhdf4/branches/upstream/current/mfhdf/dumper/testfiles/tdf24.hdf
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: packages/libhdf4/branches/upstream/current/mfhdf/dumper/testfiles/tdfr8f.hdf
===================================================================
(Binary files differ)


Property changes on: packages/libhdf4/branches/upstream/current/mfhdf/dumper/testfiles/tdfr8f.hdf
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: packages/libhdf4/branches/upstream/current/mfhdf/dumper/testfiles/test.hdf
===================================================================
(Binary files differ)


Property changes on: packages/libhdf4/branches/upstream/current/mfhdf/dumper/testfiles/test.hdf
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: packages/libhdf4/branches/upstream/current/mfhdf/dumper/testfiles/tvattr.hdf
===================================================================
(Binary files differ)


Property changes on: packages/libhdf4/branches/upstream/current/mfhdf/dumper/testfiles/tvattr.hdf
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: packages/libhdf4/branches/upstream/current/mfhdf/dumper/testfiles/tvset.hdf
===================================================================
(Binary files differ)


Property changes on: packages/libhdf4/branches/upstream/current/mfhdf/dumper/testfiles/tvset.hdf
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Deleted: packages/libhdf4/branches/upstream/current/mfhdf/dumper/testhdp.sh
===================================================================
--- packages/libhdf4/branches/upstream/current/mfhdf/dumper/testhdp.sh	2007-05-15 09:05:29 UTC (rev 830)
+++ packages/libhdf4/branches/upstream/current/mfhdf/dumper/testhdp.sh	2007-05-15 09:53:05 UTC (rev 831)
@@ -1,318 +0,0 @@
-#! /bin/sh
-# $Id: testhdp.sh,v 1.15 2000/09/05 15:04:41 bmribler Exp $
-# Test scripts for hdp (dumper).
-# See the USAGE function for command usage.
-
-
-# Definitions of commands and variables
-CMD='./hdp'
-RM='rm -f'
-DIFF=diff
-CMP='cmp -s'
-nerrors=0		# number of errors (0)
-quitonerr=0		# quit on error (not)
-noclean=0		# no cleaning temp. files (yes)
-only=""			# dumper sub-command to test only
-except=""		# dumper sub-command to test not
-
-
-# Definitions of functions/shorthands
-#
-
-# Print Usage of the command
-USAGE()
-{
-    echo "Usage: $0 [-help] [-noclean] [-quit] [-except <command>] [-only <command>]"
-    echo "    -help: display help information"
-    echo "    -noclean: do not clean away temporary files"
-    echo "    -quit: quit immediately if any test fails"
-    echo "    -except: skip one specific command"
-    echo "    -only: test one specific command"
-    echo "<command> can be one of {list, dumpsds, dumprig, dumpvd, dumpvg, dumpgr}"
-}
-
-# Print message with formats according to message level ($1)
-MESG()
-{
-    level=$1
-    shift
-    case $level in
-	0)
-	    echo '============================='
-	    echo $*
-	    echo '============================='
-	    ;;
-	3)
-	    echo '-----------------------------'
-	    echo $*
-	    echo '-----------------------------'
-	    ;;
-	6)
-	    echo "*** $* ***"
-	    ;;
-	*)
-	    echo "MESG(): Unknown level ($level)"
-	    exit 1
-	    ;;
-    esac
-
-}
-
-
-# Run the test to produce an output file which is then
-# compared with the expected ($1) output.
-# Note that this can be used to produce the expected
-# output files by replace "$output" with "$expected"
-# in the run-the-test commands.
-TEST()
-{
-    # parse the arguments
-    output=tmp.out
-    expected=testfiles/$1
-    shift
-    # print a id banner
-    MESG 6 "$@"
-    # run the test
-    ( 
-	echo "#############################"
-	echo "Expected output for '$CMD $@'" 
-	echo "#############################"
-        $CMD "$@"
-    ) > $output
-    $CMP $expected $output
-    if [ $? -ne 0 ]
-    then
-	echo $DIFF $expected $output
-	$DIFF $expected $output
-	echo "   <<< FAILED >>>"
-	nerrors=`expr $nerrors + 1`
-	if [ $quitonerr -gt 0 ]; 
-	then
-	    FINISH
-	fi
-    fi
-    if [ $noclean -eq 0 ]
-    then
-	$RM $output
-    fi
-}
-
-
-# Report the result and exit
-FINISH()
-{
-    if [ $nerrors -eq 0 ]
-    then
-	MESG 0 "All hdp tests passed"
-    else
-	MESG 0 "hdp tests failed: $nerrors"
-    fi
-    exit $nerrors
-}
-
-
-#===============
-# Main Body
-#===============
-
-# parse arguments
-while [ $# -gt 0 ]
-do
-    case "$1" in
-	"-quit")
-	    quitonerr=1
-	    ;;
-	"-noclean")
-	    noclean=1
-	    ;;
-	"-help")
-	    USAGE
-	    exit 0
-	    ;;
-	"-only")
-	    shift
-	    case "$1" in
-    		"list"|"dumpsds"|"dumprig"|"dumpvd"|"dumpvg"|"dumpgr")
-		    only="$1"
-		    ;;
-		*)
-		    echo "Unknown command: $1"
-		    USAGE
-		    exit 1
-		    ;;
-	    esac
-	    ;;
-	"-except")
-	    shift
-	    case "$1" in
-    		"list"|"dumpsds"|"dumprig"|"dumpvd"|"dumpvg"|"dumpgr")
-		    except="$1"
-		    ;;
-		*)
-		    echo "Unknown command: $1"
-		    USAGE
-		    exit 1
-		    ;;
-	    esac
-	    ;;
-	* )
-	    echo "Unknow option: $1"
-	    USAGE
-	    exit 1
-	    ;;
-    esac
-    shift
-done
-
-# Print a beginning banner
-MESG 0 "Running hdp tests"
-
-# Test command list
-TestCmd=list
-TestName="Test command $TestCmd"
-if [ "$except" != $TestCmd -a \( -z "$only" -o "$only" = $TestCmd \) ]
-then
-MESG 3 "$TestName"
-TEST list-1.out list tdata.hdf
-TEST list-2.out list -l tdata.hdf
-TEST list-3.out list -d tdata.hdf
-TEST list-4.out list -e tdata.hdf
-TEST list-5.out list -t 720 tdata.hdf
-TEST list-6.out list -d -t "Numeric Data Group" tdata.hdf
-TEST list-7.out list -g tdata.hdf
-TEST list-8.out list -a tdata.hdf
-TEST list-9.out list -a Example6.hdf
-TEST list-10.out list -n Example6.hdf
-else
-MESG 3 "$TestName <<<SKIPPED>>>"
-fi
-
-# Test command dumpsds
-TestCmd=dumpsds
-TestName="Test command $TestCmd"
-if [ "$except" != $TestCmd -a \( -z "$only" -o "$only" = $TestCmd \) ]
-then
-MESG 3 "$TestName"
-TEST dumpsds-1.out dumpsds swf32.hdf
-TEST dumpsds-2.out dumpsds -i 2 swf32.hdf
-TEST dumpsds-3.out dumpsds -i 1,3 swf32.hdf
-
-# Next command should fail with error message: "SD with name Time: not found"
-TEST dumpsds-4.out dumpsds -n Time swf32.hdf
-TEST dumpsds-5.out dumpsds -n fakeDim0,Data-Set-2 swf32.hdf
-TEST dumpsds-6.out dumpsds -r 3,2 swf32.hdf
-TEST dumpsds-7.out dumpsds -r 3,2 -d swf32.hdf
-TEST dumpsds-8.out dumpsds -h swf32_fileattr.hdf
-TEST dumpsds-9.out dumpsds -c swf32_fileattr.hdf
-else
-MESG 3 "$TestName <<<SKIPPED>>>"
-fi
-
-# Test command dumprig
-TestCmd=dumprig
-TestName="Test command $TestCmd"
-if [ "$except" != $TestCmd -a \( -z "$only" -o "$only" = $TestCmd \) ]
-then
-MESG 3 "$TestName"
-TEST dumprig-1.out dumprig tdf24.hdf
-TEST dumprig-2.out dumprig -i 1,2 tdf24.hdf
-TEST dumprig-3.out dumprig -i 1,3 tdf24.hdf		# '-i 3' is invalid
-TEST dumprig-4.out dumprig -m 24 tdf24.hdf
-TEST dumprig-5.out dumprig -r 3,4 tdf24.hdf
-TEST dumprig-6.out dumprig -r 3,4 -d tdf24.hdf
-else
-MESG 3 "$TestName <<<SKIPPED>>>"
-fi
-
-# Test command dumpvd
-TestCmd=dumpvd
-TestName="Test command $TestCmd"
-if [ "$except" != $TestCmd -a \( -z "$only" -o "$only" = $TestCmd \) ]
-then
-MESG 3 "$TestName"
-TEST dumpvd-1.out dumpvd tvset.hdf
-TEST dumpvd-2.out dumpvd -i 1,3,5 tvset.hdf
-TEST dumpvd-3.out dumpvd -r 1238,1239,1251,1252 tvset.hdf
-TEST dumpvd-4.out dumpvd -n "Multi-Order Vdata" tvset.hdf
-TEST dumpvd-5.out dumpvd -n "Mixed Vdata","Integer Vdata" tvset.hdf
-TEST dumpvd-6.out dumpvd -c "Test object","No class specified" tvset.hdf
-TEST dumpvd-7.out dumpvd -f B tvset.hdf
-TEST dumpvd-8.out dumpvd -f "STATION_NAME","FLOATS" tvset.hdf
-TEST dumpvd-9.out dumpvd -f "STATION_NAME","FLOATS" -d tvset.hdf
-TEST dumpvd-10.out dumpvd tvattr.hdf
-else
-MESG 3 "$TestName <<<SKIPPED>>>"
-fi
-
-# Test command dumpvg
-TestCmd=dumpvg
-TestName="Test command $TestCmd"
-if [ "$except" != $TestCmd -a \( -z "$only" -o "$only" = $TestCmd \) ]
-then
-MESG 3 "$TestName"
-TEST dumpvg-1.out dumpvg tvset.hdf
-TEST dumpvg-2.out dumpvg -i 0,1 tvset.hdf
-TEST dumpvg-3.out dumpvg -r 3 tvset.hdf
-TEST dumpvg-4.out dumpvg -n "Simple Vgroup" tvset.hdf
-TEST dumpvg-5.out dumpvg -c "Test object" tvset.hdf
-TEST dumpvg-6.out dumpvg -i 1,3,5 tdata.hdf
-TEST dumpvg-7.out dumpvg -r 32,39 tdata.hdf
-TEST dumpvg-8.out dumpvg -n nsamp,tdata.hdf tdata.hdf
-TEST dumpvg-9.out dumpvg -c CDF0.0 tdata.hdf
-
-# Added option -h to the following test; this option has always 
-# failed; just fixed it - BMR 8/1/00
-TEST dumpvg-10.out dumpvg -h -c Dim0.0,Var0.0 tdata.hdf
-
-# this following test is removed since option -d is removed
-#TEST dumpvg-11.out dumpvg -c Dim0.0,Var0.0 -d tdata.hdf
-
-# moved test #12 up to #11, consequently - BMR 7/25/00
-TEST dumpvg-11.out dumpvg tvattr.hdf
-else
-MESG 3 "$TestName <<<SKIPPED>>>"
-fi
-
-# Test command dumpgr
-TestCmd=dumpgr
-TestName="Test command $TestCmd"
-if [ "$except" != $TestCmd -a \( -z "$only" -o "$only" = $TestCmd \) ]
-then
-MESG 3 "$TestName"
-TEST dumpgr-1.out dumpgr grtdfui82.hdf
-TEST dumpgr-2.out dumpgr -i 0,1,3 grtdfui82.hdf
-TEST dumpgr-3.out dumpgr -i 0 grtdfui82.hdf
-TEST dumpgr-4.out dumpgr -n Image_array_5 grtdfui82.hdf
-TEST dumpgr-5.out dumpgr -r 6,2,3 grtdfui82.hdf
-TEST dumpgr-6.out dumpgr -r 6 -d  grtdfui82.hdf
-TEST dumpgr-7.out dumpgr -o my.dat grtdfui82.hdf
-$RM my.dat
-TEST dumpgr-8.out dumpgr -o mybin.dat  -b grtdfui82.hdf
-$RM mybin.dat
-TEST dumpgr-9.out dumpgr grtdfui83.hdf
-TEST dumpgr-10.out dumpgr grtdfui84.hdf
-TEST dumpgr-11.out dumpgr grtdfui162.hdf
-
-# Test 12 shows that file attribute is printed
-TEST dumpgr-12.out dumpgr grtdfi322.hdf
-
-# Tests 13, 14, and 15 to test new option -p that prints palette
-TEST dumpgr-13.out dumpgr -p Image_with_Palette.hdf
-TEST dumpgr-14.out dumpgr -h Image_with_Palette.hdf
-TEST dumpgr-15.out dumpgr -r 2,4 -p -d Image_with_Palette.hdf
-
-# Test 16: to test new option -s, printing data as stream
-TEST dumpgr-16.out dumpgr -r 6 -d -s grtdfui82.hdf
-
-# Test 17: to test new option -m (interlace mode = LINE)
-TEST dumpgr-17.out dumpgr -r 6 -m 1 grtdfui82.hdf
-
-# Test 18: to test new option -c (printing attribute data in clean format)
-TEST dumpgr-18.out dumpgr -c grtdfi322.hdf
-
-else
-MESG 3 "$TestName <<<SKIPPED>>>"
-fi
-
-# End of test
-FINISH

Added: packages/libhdf4/branches/upstream/current/mfhdf/dumper/testhdp.sh.in
===================================================================
--- packages/libhdf4/branches/upstream/current/mfhdf/dumper/testhdp.sh.in	                        (rev 0)
+++ packages/libhdf4/branches/upstream/current/mfhdf/dumper/testhdp.sh.in	2007-05-15 09:53:05 UTC (rev 831)
@@ -0,0 +1,345 @@
+#! /bin/sh
+# $Id: testhdp.sh.in,v 1.2 2003/12/10 21:14:06 epourmal Exp $
+# Test scripts for hdp (dumper).
+# See the USAGE function for command usage.
+
+srcdir=@srcdir@
+
+# Definitions of commands and variables
+HDP='./hdp'               # The tool name
+HDP_BIN=`pwd`/$HDP        # The path of the tool binary
+
+RM='rm -f'
+DIFF=diff
+CMP='cmp -s'
+nerrors=0		# number of errors (0)
+quitonerr=0		# quit on error (not)
+noclean=0		# no cleaning temp. files (yes)
+only=""			# dumper sub-command to test only
+except=""		# dumper sub-command to test not
+
+
+# Definitions of functions/shorthands
+#
+
+# Print Usage of the command
+USAGE() {
+    echo "Usage: $0 [-help] [-noclean] [-quit] [-except <command>] [-only <command>]"
+    echo "    -help: display help information"
+    echo "    -noclean: do not clean away temporary files"
+    echo "    -quit: quit immediately if any test fails"
+    echo "    -except: skip one specific command"
+    echo "    -only: test one specific command"
+    echo "<command> can be one of {list, dumpsds, dumprig, dumpvd, dumpvg, dumpgr}"
+}
+
+# Print message with formats according to message level ($1)
+MESG() {
+  level=$1
+  shift
+  case $level in
+    0)
+      echo '============================='
+      echo $*
+      echo '============================='
+      ;;
+    3)
+      echo '-----------------------------'
+      echo $*
+      echo '-----------------------------'
+      ;;
+    6)
+      echo "*** $* ***"
+      ;;
+    *)
+      echo "MESG(): Unknown level ($level)"
+      exit 1
+      ;;
+  esac
+}
+
+
+# Run the test to produce an output file which is then
+# compared with the expected ($1) output.
+# Note that this can be used to produce the expected
+# output files by replace "$output" with "$expected"
+# in the run-the-test commands.
+TEST()
+{
+  # parse the arguments
+  output=tmp.out
+  expected="$srcdir/testfiles/$1"
+  shift
+
+  # print a id banner
+  MESG 6 "$@"
+
+  # run the test
+  ( 
+    echo "#############################"
+    echo "Expected output for '$HDP $@'" 
+    echo "#############################"
+    cd $srcdir/testfiles
+    $HDP_BIN "$@"
+  ) > $output
+  $CMP $expected $output
+
+  if [ $? -ne 0 ]; then
+    echo $DIFF $expected $output
+    $DIFF $expected $output
+    echo "   <<< FAILED >>>"
+    nerrors=`expr $nerrors + 1`
+
+    if [ $quitonerr -gt 0 ]; then
+      FINISH
+    fi
+  fi
+
+  if [ $noclean -eq 0 ]; then
+    $RM -f $output
+  fi
+}
+
+
+# Report the result and exit
+FINISH()
+{
+    if [ $nerrors -eq 0 ]
+    then
+	MESG 0 "All hdp tests passed"
+    else
+	MESG 0 "hdp tests failed: $nerrors"
+    fi
+    exit $nerrors
+}
+
+
+#===============
+# Main Body
+#===============
+
+# parse arguments
+while [ $# -gt 0 ]
+do
+    case "$1" in
+	"-quit")
+	    quitonerr=1
+	    ;;
+	"-noclean")
+	    noclean=1
+	    ;;
+	"-help")
+	    USAGE
+	    exit 0
+	    ;;
+	"-only")
+	    shift
+	    case "$1" in
+    		"list"|"dumpsds"|"dumprig"|"dumpvd"|"dumpvg"|"dumpgr")
+		    only="$1"
+		    ;;
+		*)
+		    echo "Unknown command: $1"
+		    USAGE
+		    exit 1
+		    ;;
+	    esac
+	    ;;
+	"-except")
+	    shift
+	    case "$1" in
+    		"list"|"dumpsds"|"dumprig"|"dumpvd"|"dumpvg"|"dumpgr")
+		    except="$1"
+		    ;;
+		*)
+		    echo "Unknown command: $1"
+		    USAGE
+		    exit 1
+		    ;;
+	    esac
+	    ;;
+	* )
+	    echo "Unknow option: $1"
+	    USAGE
+	    exit 1
+	    ;;
+    esac
+    shift
+done
+
+# Print a beginning banner
+MESG 0 "Running hdp tests"
+
+# Test command list
+TestCmd=list
+TestName="Test command $TestCmd"
+if [ "$except" != $TestCmd -a \( -z "$only" -o "$only" = $TestCmd \) ]
+then
+MESG 3 "$TestName"
+TEST list-1.out list tdata.hdf
+TEST list-2.out list -l tdata.hdf
+TEST list-3.out list -d tdata.hdf
+TEST list-4.out list -e tdata.hdf
+TEST list-5.out list -t 720 tdata.hdf
+TEST list-6.out list -d -t "Numeric Data Group" tdata.hdf
+TEST list-7.out list -g tdata.hdf
+TEST list-8.out list -a tdata.hdf
+TEST list-9.out list -a Example6.hdf
+TEST list-10.out list -n Example6.hdf
+else
+MESG 3 "$TestName <<<SKIPPED>>>"
+fi
+
+# Test command dumpsds
+TestCmd=dumpsds
+TestName="Test command $TestCmd"
+if [ "$except" != $TestCmd -a \( -z "$only" -o "$only" = $TestCmd \) ]
+then
+MESG 3 "$TestName"
+# Test 1 prints all datasets
+TEST dumpsds-1.out dumpsds swf32.hdf
+
+# Tests 2 and 3 print datasets given their indices
+TEST dumpsds-2.out dumpsds -i 2 swf32.hdf
+TEST dumpsds-3.out dumpsds -i 1,3 swf32.hdf
+
+# Test 4 should fail with error message: "SD with name Time: not found"
+TEST dumpsds-4.out dumpsds -n Time swf32.hdf
+
+# Test 5 prints datasets given their names 
+TEST dumpsds-5.out dumpsds -n fakeDim0,Data-Set-2 swf32.hdf
+
+# Test 6 prints datasets given their ref numbers
+TEST dumpsds-6.out dumpsds -r 3,2 swf32.hdf
+
+# Test 7 prints only data of the datasets selected by their ref numbers
+TEST dumpsds-7.out dumpsds -r 3,2 -d swf32.hdf
+
+# Test 8 prints only header information
+TEST dumpsds-8.out dumpsds -h swf32_fileattr.hdf
+
+# Test 9 prints data in clean format, no \digit's
+TEST dumpsds-9.out dumpsds -c swf32_fileattr.hdf
+
+# Test 10 prints contents of file without file attribute's data
+TEST dumpsds-10.out dumpsds -g swf32_fileattr.hdf
+
+# Test 11 prints contents of file without local attribute's data
+TEST dumpsds-11.out dumpsds -l swf32_fileattr.hdf
+else
+MESG 3 "$TestName <<<SKIPPED>>>"
+fi
+
+# Test command dumprig
+TestCmd=dumprig
+TestName="Test command $TestCmd"
+if [ "$except" != $TestCmd -a \( -z "$only" -o "$only" = $TestCmd \) ]
+then
+MESG 3 "$TestName"
+TEST dumprig-1.out dumprig tdf24.hdf
+TEST dumprig-2.out dumprig -i 1,2 tdf24.hdf
+TEST dumprig-3.out dumprig -i 1,3 tdf24.hdf		# '-i 3' is invalid
+TEST dumprig-4.out dumprig -m 24 tdf24.hdf
+TEST dumprig-5.out dumprig -r 3,4 tdf24.hdf
+TEST dumprig-6.out dumprig -r 3,4 -d tdf24.hdf
+else
+MESG 3 "$TestName <<<SKIPPED>>>"
+fi
+
+# Test command dumpvd
+TestCmd=dumpvd
+TestName="Test command $TestCmd"
+if [ "$except" != $TestCmd -a \( -z "$only" -o "$only" = $TestCmd \) ]
+then
+MESG 3 "$TestName"
+TEST dumpvd-1.out dumpvd tvset.hdf
+TEST dumpvd-2.out dumpvd -i 1,3,5 tvset.hdf
+TEST dumpvd-3.out dumpvd -r 1238,1239,1251,1252 tvset.hdf
+TEST dumpvd-4.out dumpvd -n "Multi-Order Vdata" tvset.hdf
+TEST dumpvd-5.out dumpvd -n "Mixed Vdata","Integer Vdata" tvset.hdf
+TEST dumpvd-6.out dumpvd -c "Test object","No class specified" tvset.hdf
+TEST dumpvd-7.out dumpvd -f B tvset.hdf
+TEST dumpvd-8.out dumpvd -f "STATION_NAME","FLOATS" tvset.hdf
+TEST dumpvd-9.out dumpvd -f "STATION_NAME","FLOATS" -d tvset.hdf
+TEST dumpvd-10.out dumpvd tvattr.hdf
+else
+MESG 3 "$TestName <<<SKIPPED>>>"
+fi
+
+# Test command dumpvg
+TestCmd=dumpvg
+TestName="Test command $TestCmd"
+if [ "$except" != $TestCmd -a \( -z "$only" -o "$only" = $TestCmd \) ]
+then
+MESG 3 "$TestName"
+TEST dumpvg-1.out dumpvg tvset.hdf
+TEST dumpvg-2.out dumpvg -i 0,1 tvset.hdf
+TEST dumpvg-3.out dumpvg -r 3 tvset.hdf
+TEST dumpvg-4.out dumpvg -n "Simple Vgroup" tvset.hdf
+TEST dumpvg-5.out dumpvg -c "Test object" tvset.hdf
+TEST dumpvg-6.out dumpvg -i 1,3,5 tdata.hdf
+TEST dumpvg-7.out dumpvg -r 32,39 tdata.hdf
+TEST dumpvg-8.out dumpvg -n nsamp,tdata.hdf tdata.hdf
+TEST dumpvg-9.out dumpvg -c CDF0.0 tdata.hdf
+
+# Added option -h to the following test; this option has always 
+# failed; just fixed it - BMR 8/1/00
+TEST dumpvg-10.out dumpvg -h -c Dim0.0,Var0.0 tdata.hdf
+
+# this following test is removed since option -d is removed
+#TEST dumpvg-11.out dumpvg -c Dim0.0,Var0.0 -d tdata.hdf
+
+# moved test #12 up to #11, consequently - BMR 7/25/00
+TEST dumpvg-11.out dumpvg tvattr.hdf
+else
+MESG 3 "$TestName <<<SKIPPED>>>"
+fi
+
+# Test command dumpgr
+TestCmd=dumpgr
+TestName="Test command $TestCmd"
+if [ "$except" != $TestCmd -a \( -z "$only" -o "$only" = $TestCmd \) ]
+then
+MESG 3 "$TestName"
+TEST dumpgr-1.out dumpgr grtdfui82.hdf
+TEST dumpgr-2.out dumpgr -i 0,1,3 grtdfui82.hdf
+TEST dumpgr-3.out dumpgr -i 0 grtdfui82.hdf
+TEST dumpgr-4.out dumpgr -n Image_array_5 grtdfui82.hdf
+TEST dumpgr-5.out dumpgr -r 6,2,3 grtdfui82.hdf
+TEST dumpgr-6.out dumpgr -r 6 -d  grtdfui82.hdf
+TEST dumpgr-7.out dumpgr -o my.dat grtdfui82.hdf
+$RM my.dat
+TEST dumpgr-8.out dumpgr -o mybin.dat  -b grtdfui82.hdf
+$RM mybin.dat
+TEST dumpgr-9.out dumpgr grtdfui83.hdf
+TEST dumpgr-10.out dumpgr grtdfui84.hdf
+TEST dumpgr-11.out dumpgr grtdfui162.hdf
+
+# Test 12 shows that file attribute is printed
+TEST dumpgr-12.out dumpgr grtdfi322.hdf
+
+# Tests 13, 14, and 15 test option -h, which was not included in any
+# of the previous tests, and the new options -p and -pd, printing palette
+# with or without palette information 
+TEST dumpgr-13.out dumpgr -p Image_with_Palette.hdf
+TEST dumpgr-14.out dumpgr -h Image_with_Palette.hdf
+TEST dumpgr-15.out dumpgr -r 2,4 -pd Image_with_Palette.hdf
+
+# Test 16: to test new option -s, printing data as stream
+TEST dumpgr-16.out dumpgr -r 6 -d -s grtdfui82.hdf
+
+# Test 17: to test new option -m (interlace mode = LINE)
+TEST dumpgr-17.out dumpgr -r 6 -m 1 grtdfui82.hdf
+
+# Test 18: to test new option -c (printing attribute data in clean format)
+TEST dumpgr-18.out dumpgr -c grtdfi322.hdf
+
+# Test 19: to test new options -g and -l (suppress all attribute data)
+TEST dumpgr-19.out dumpgr -g -l grtdfi322.hdf
+
+else
+MESG 3 "$TestName <<<SKIPPED>>>"
+fi
+
+# End of test
+FINISH


Property changes on: packages/libhdf4/branches/upstream/current/mfhdf/dumper/testhdp.sh.in
___________________________________________________________________
Name: svn:executable
   + *

Deleted: packages/libhdf4/branches/upstream/current/mfhdf/dumper/tvattr.hdf
===================================================================
(Binary files differ)

Deleted: packages/libhdf4/branches/upstream/current/mfhdf/dumper/tvset.hdf
===================================================================
(Binary files differ)

Added: packages/libhdf4/branches/upstream/current/mfhdf/fortran/Makefile.am
===================================================================
--- packages/libhdf4/branches/upstream/current/mfhdf/fortran/Makefile.am	                        (rev 0)
+++ packages/libhdf4/branches/upstream/current/mfhdf/fortran/Makefile.am	2007-05-15 09:53:05 UTC (rev 831)
@@ -0,0 +1,50 @@
+#############################################################################
+##                      Setup for building programs                        ##
+#############################################################################
+
+INCLUDES=-I$(top_srcdir)/hdf/src        \
+         -I$(top_srcdir)/hdf/test       \
+         -I$(top_srcdir)/mfhdf/libsrc   \
+         -I$(top_srcdir)/mfhdf/port     \
+         -I../libsrc
+DEFINES=-DNDEBUG -DHDF
+AM_CPPFLAGS=$(INCLUDES) $(DEFINES)
+
+#############################################################################
+##                   Testing -- Here there be dragons.                     ##
+#############################################################################
+
+include_HEADERS = netcdf.inc netcdf.f90
+check_PROGRAMS = ftest hdftest
+
+ftest_SOURCES = ftest.f
+ftest_LDADD = $(top_builddir)/hdf/test/forsupff.o $(top_builddir)/hdf/test/forsupf.o \
+              ../libsrc/libmfhdf.a $(top_builddir)/hdf/src/libdf.a @LIBS@
+ftest_DEPENDENCIES = $(top_builddir)/hdf/test/forsupff.o $(top_builddir)/hdf/test/forsupf.o \
+                     $(top_builddir)/hdf/src/libdf.a ../libsrc/libmfhdf.a
+
+hdftest_SOURCES = hdftest.f
+hdftest_LDADD = ../libsrc/libmfhdf.a $(top_builddir)/hdf/src/libdf.a @LIBS@
+hdftest_DEPENDENCIES = testdir $(top_builddir)/hdf/src/libdf.a ../libsrc/libmfhdf.a
+
+testdir:
+	-mkdir testdir
+
+SUFFIXES = .inc .f90
+.inc.f90:
+	sed -e 's/^[cC]/!/' -e 's/^     [^ ]/     \&/' < $< > $*.f90
+check:
+	@echo "==================================="
+	@echo "HDF-SD Fortran interfaces tests"
+	@echo "==================================="
+	srcdir="$(srcdir)" ./hdftest
+	@echo "==================================="
+	@echo "HDF-NetCDF Fortran interfaces tests"
+	@echo "==================================="
+	srcdir="$(srcdir)" ./ftest
+
+#############################################################################
+##                          And the cleanup                                ##
+#############################################################################
+
+DISTCLEANFILES = ftest.f jackets.c netcdf.inc netcdf.f90 test.nc copy.nc *.hdf testdir/testext.hdf

Modified: packages/libhdf4/branches/upstream/current/mfhdf/fortran/Makefile.in
===================================================================
--- packages/libhdf4/branches/upstream/current/mfhdf/fortran/Makefile.in	2007-05-15 09:05:29 UTC (rev 830)
+++ packages/libhdf4/branches/upstream/current/mfhdf/fortran/Makefile.in	2007-05-15 09:53:05 UTC (rev 831)
@@ -1,832 +1,445 @@
-# Makefile for the FORTRAN interface to the Network CDF library
-#
-# $Id: Makefile.in,v 1.31 2000/08/30 21:55:39 wendling Exp $
-# NOTE: This Makefile.in is used by the Cygnus 'configure' script to
-#       generate the top level Makefile.
+# Makefile.in generated by automake 1.7.7 from Makefile.am.
+# @configure_input@
 
-# ############# Start of system configuration section. #############
+# Copyright 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003
+# 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.
 
-# 'srcdir' Gets set to directory this Makefile is found in
-srcdir = .
-TOP_SRCDIR = ../..
+# 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.
 
-prefix = $(TOP_SRCDIR)/NewHDF
+ at SET_MAKE@
 
-exec_prefix = $(prefix)
-tooldir = $(exec_prefix)/$(target)
+#############################################################################
+#############################################################################
 
-program_transform_name =
+srcdir = @srcdir@
+top_srcdir = @top_srcdir@
+VPATH = @srcdir@
+pkgdatadir = $(datadir)/@PACKAGE@
+pkglibdir = $(libdir)/@PACKAGE@
+pkgincludedir = $(includedir)/@PACKAGE@
+top_builddir = ../..
 
-datadir = $(prefix)/lib
-mandir = $(prefix)/man
-man1dir = $(mandir)/man1
-man2dir = $(mandir)/man2
-man3dir = $(mandir)/man3
-man4dir = $(mandir)/man4
-man5dir = $(mandir)/man5
-man6dir = $(mandir)/man6
-man7dir = $(mandir)/man7
-man8dir = $(mandir)/man8
-man9dir = $(mandir)/man9
-docdir = $(datadir)/doc
+am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
+INSTALL = @INSTALL@
+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 = :
+host_triplet = @host@
+ACLOCAL = @ACLOCAL@
+AMDEP_FALSE = @AMDEP_FALSE@
+AMDEP_TRUE = @AMDEP_TRUE@
+AMTAR = @AMTAR@
+AR = @AR@
+AUTOCONF = @AUTOCONF@
+AUTOHEADER = @AUTOHEADER@
+AUTOMAKE = @AUTOMAKE@
+AWK = @AWK@
+CC = @CC@
+CCDEPMODE = @CCDEPMODE@
+CFLAGS = @CFLAGS@
+CPP = @CPP@
+CPPFLAGS = @CPPFLAGS@
+CXX = @CXX@
+CXXCPP = @CXXCPP@
+CXXDEPMODE = @CXXDEPMODE@
+CXXFLAGS = @CXXFLAGS@
+CYGPATH_W = @CYGPATH_W@
+DEFS = @DEFS@
+DEPDIR = @DEPDIR@
+DIFF = @DIFF@
+ECHO_C = @ECHO_C@
+ECHO_N = @ECHO_N@
+ECHO_T = @ECHO_T@
+EGREP = @EGREP@
+EXEEXT = @EXEEXT@
+F77 = @F77@
+FFLAGS = @FFLAGS@
+HDF_BUILD_FORTRAN_FALSE = @HDF_BUILD_FORTRAN_FALSE@
+HDF_BUILD_FORTRAN_TRUE = @HDF_BUILD_FORTRAN_TRUE@
+HDF_BUILD_XDR_FALSE = @HDF_BUILD_XDR_FALSE@
+HDF_BUILD_XDR_TRUE = @HDF_BUILD_XDR_TRUE@
+INSTALL_DATA = @INSTALL_DATA@
+INSTALL_PROGRAM = @INSTALL_PROGRAM@
+INSTALL_SCRIPT = @INSTALL_SCRIPT@
+INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
+LDFLAGS = @LDFLAGS@
+LEX = @LEX@
+LEXLIB = @LEXLIB@
+LEX_OUTPUT_ROOT = @LEX_OUTPUT_ROOT@
+LIBOBJS = @LIBOBJS@
+LIBS = @LIBS@
+LN_S = @LN_S@
+LTLIBOBJS = @LTLIBOBJS@
+MAINT = @MAINT@
+MAINTAINER_MODE_FALSE = @MAINTAINER_MODE_FALSE@
+MAINTAINER_MODE_TRUE = @MAINTAINER_MODE_TRUE@
+MAKEINFO = @MAKEINFO@
+NEQN = @NEQN@
+OBJEXT = @OBJEXT@
+PACKAGE = @PACKAGE@
+PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
+PACKAGE_NAME = @PACKAGE_NAME@
+PACKAGE_STRING = @PACKAGE_STRING@
+PACKAGE_TARNAME = @PACKAGE_TARNAME@
+PACKAGE_VERSION = @PACKAGE_VERSION@
+PATH_SEPARATOR = @PATH_SEPARATOR@
+RANLIB = @RANLIB@
+SET_MAKE = @SET_MAKE@
+SHELL = @SHELL@
+STRIP = @STRIP@
+TBL = @TBL@
+VERSION = @VERSION@
+YACC = @YACC@
+ac_ct_CC = @ac_ct_CC@
+ac_ct_CXX = @ac_ct_CXX@
+ac_ct_F77 = @ac_ct_F77@
+ac_ct_RANLIB = @ac_ct_RANLIB@
+ac_ct_STRIP = @ac_ct_STRIP@
+am__fastdepCC_FALSE = @am__fastdepCC_FALSE@
+am__fastdepCC_TRUE = @am__fastdepCC_TRUE@
+am__fastdepCXX_FALSE = @am__fastdepCXX_FALSE@
+am__fastdepCXX_TRUE = @am__fastdepCXX_TRUE@
+am__include = @am__include@
+am__leading_dot = @am__leading_dot@
+am__quote = @am__quote@
+bindir = @bindir@
+build = @build@
+build_alias = @build_alias@
+build_cpu = @build_cpu@
+build_os = @build_os@
+build_vendor = @build_vendor@
+datadir = @datadir@
+exec_prefix = @exec_prefix@
+host = @host@
+host_alias = @host_alias@
+host_cpu = @host_cpu@
+host_os = @host_os@
+host_vendor = @host_vendor@
+includedir = @includedir@
+infodir = @infodir@
+install_sh = @install_sh@
+libdir = @libdir@
+libexecdir = @libexecdir@
+localstatedir = @localstatedir@
+mandir = @mandir@
+oldincludedir = @oldincludedir@
+prefix = @prefix@
+program_transform_name = @program_transform_name@
+sbindir = @sbindir@
+sharedstatedir = @sharedstatedir@
+sysconfdir = @sysconfdir@
+target_alias = @target_alias@
 
-SHELL = /bin/sh
+INCLUDES = -I$(top_srcdir)/hdf/src        \
+         -I$(top_srcdir)/hdf/test       \
+         -I$(top_srcdir)/mfhdf/libsrc   \
+         -I$(top_srcdir)/mfhdf/port     \
+         -I../libsrc
 
-INSTALL = ${TOP_SRCDIR}/install-sh -c
-INSTALL_PROGRAM = $(INSTALL)
-INSTALL_DATA = $(INSTALL) -m 644
+DEFINES = -DNDEBUG -DHDF
+AM_CPPFLAGS = $(INCLUDES) $(DEFINES)
 
-# /usr/local/bin/m4 (GNU version?)
-M4   = /usr/local/bin/m4
-# /usr/local/bin/perl (GNU version?)
-PERL = /usr/local/bin/perl
 
-# Name of achive randomizer, usually ranlib (use 'touch' if non-existant)
-RANLIB = ranlib
+#############################################################################
+#############################################################################
+include_HEADERS = netcdf.inc netcdf.f90
+check_PROGRAMS = ftest hdftest
 
-# Name of library archiver and flags to send, default 'AR=ar', 'ARFLAGS=r'
-AR = ar
-ARFLAGS = rc
+ftest_SOURCES = ftest.f
+ftest_LDADD = $(top_builddir)/hdf/test/forsupff.o $(top_builddir)/hdf/test/forsupf.o \
+              ../libsrc/libmfhdf.a $(top_builddir)/hdf/src/libdf.a @LIBS@
 
-# Name of remove utility, default 'RM=/bin/rm', 'RMFLAGS=-f'
-RM = /bin/rm
-RMFLAGS = -f
+ftest_DEPENDENCIES = $(top_builddir)/hdf/test/forsupff.o $(top_builddir)/hdf/test/forsupf.o \
+                     $(top_builddir)/hdf/src/libdf.a ../libsrc/libmfhdf.a
 
-AS = as
-CC = gcc
-CFLAGS = -ansi
-FC = f77
-FFLAGS=
 
-# Set for document generation
-MAKEINFO = makeinfo
-TEXI2DVI = texi2dvi
+hdftest_SOURCES = hdftest.f
+hdftest_LDADD = ../libsrc/libmfhdf.a $(top_builddir)/hdf/src/libdf.a @LIBS@
+hdftest_DEPENDENCIES = testdir $(top_builddir)/hdf/src/libdf.a ../libsrc/libmfhdf.a
 
-# Directory in which to install binaries
-bindir = $(exec_prefix)/bin
+SUFFIXES = .inc .f90
 
-# Directory in which to install header files.
-includedir = $(prefex)/include
 
-# Directory in which to install library files.
-libdir = $(prefix)/lib
+#############################################################################
+#############################################################################
+DISTCLEANFILES = ftest.f jackets.c netcdf.inc netcdf.f90 test.nc copy.nc *.hdf testdir/testext.hdf
+subdir = mfhdf/fortran
+ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
+mkinstalldirs = $(SHELL) $(top_srcdir)/bin/mkinstalldirs
+CONFIG_HEADER = $(top_builddir)/hdf/src/h4config.h
+CONFIG_CLEAN_FILES =
+check_PROGRAMS = ftest$(EXEEXT) hdftest$(EXEEXT)
+am_ftest_OBJECTS = ftest.$(OBJEXT)
+ftest_OBJECTS = $(am_ftest_OBJECTS)
+ftest_LDFLAGS =
+am_hdftest_OBJECTS = hdftest.$(OBJEXT)
+hdftest_OBJECTS = $(am_hdftest_OBJECTS)
+hdftest_LDFLAGS =
 
-# Directory in which to install documentation info files.
-infodir = $(prefix)/info
+DEFAULT_INCLUDES =  -I. -I$(srcdir) -I$(top_builddir)/hdf/src
+F77COMPILE = $(F77) $(AM_FFLAGS) $(FFLAGS)
+F77LD = $(F77)
+F77LINK = $(F77LD) $(AM_FFLAGS) $(FFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@
+DIST_SOURCES = $(ftest_SOURCES) $(hdftest_SOURCES)
+HEADERS = $(include_HEADERS)
 
-# ------------ General Macros for NETCDF --------------------
-INCDIR	 = $(prefix)/include
-HDF_LIB  = $(TOP_SRCDIR)/hdf/src/libdf.a
-HDF_INC  = $(TOP_SRCDIR)/hdf/src/
-PABLO_HINC = $(TOP_SRCDIR)/hdf/pablo
-FMPOOL_INC = $(TOP_SRCDIR)/hdf/fmpool
-JPEG_LIB = $(TOP_SRCDIR)/hdf/jpeg/libjpeg.a
-ZLIB_LIB = $(TOP_SRCDIR)/hdf/zlib/libz.a
-NETCDF_INC = $(TOP_SRCDIR)/mfhdf/libsrc
-PORT_INC   = $(TOP_SRCDIR)/mfhdf/port
-CPP	   = $(CC) -E
-CFLAGS_NETCDF = 
-CPPFLAGS_HDF  = -DNDEBUG -DHDF $(FMPOOL_FLAGS)
-CPP_NETCDF    = -I. -I$(HDF_INC) -I$(NETCDF_INC) -I$(PORT_INC)
-CPPFLAGS_LIB	= $(SWAP) $(NETLONG) 
-CPPFLAGS_XDR	= $(CPP_XDR) 
-CPPFLAGS_NETCDF =  $(CPPFLAGS_XDR) $(CPP_NETCDF) $(CPPFLAGS_LIB) $(CPPFLAGS_HDF) 
-FFLAGS  =
-NCDUMP	= 
-NCGEN	= 
-NEQN	= neqn
-OS	= 
-TBL	= tbl
-WHICH	= which
-FTPDIR	= 
-VERSION	= 2.3.2
-LEX	= lex
-YACC	= yacc
-DIFF    = diff
-DIFF_FLAGS = -w
+DIST_COMMON = README $(include_HEADERS) $(srcdir)/Makefile.in \
+	Makefile.am
+SOURCES = $(ftest_SOURCES) $(hdftest_SOURCES)
 
+all: all-am
 
-#### ----- host and target specific makefile fragments come in here.-------
-### ------------------- end of makefile fragments -------------------------
-# ############# End of system configuration section. ###############
-
-OTHERDIRS = config msoft vms
-
-PROGRAM		= ftest
-#OS		= @OS@
-#FC		= @FC@
-#CPP_NETCDF	= -I../libsrc $(HDF_INC)
-#CPPFLAGS	= $(CPPFLAGS_NF)
-#CFLAGS		= @CFLAGS@
-#FFLAGS		= @FFLAGS@
-#HDF_LIB         = @HDF_LIB@
-#JPEG_LIB        = @JPEG_LIB@
-GARBAGE		= $(PROGRAM) test.nc copy.nc \
-		  c*.hdf \
-		  test*.hdf hdftest hdfout.new \
-		  netcdf.f90
-HEADERS		= netcdf.inc netcdf.f90
-MANIFEST = $(DISTFILES)
-DISTFILES	= $(PROGRAM).src Makefile.in README aix.m4 common.inc \
-		  common.m4 depend descrip.mms fortc fortc1.sed \
-		  fortc2.sed hpux.m4 irix.m4 jackets.src msoft.m4 msoft.mk \
-		  osf.m4 sunos.m4 ultrix.m4 unicos.m4 vax-ultrix.m4 \
-		  vms.m4 convex.m4 freebsd.m4 Linux.m4 \
-		  msoft/NOTES msoft/fslen.asm msoft/ftest.for \
-		  msoft/jackets.c msoft/msoft.int \
-		  msoft/netcdf.inc \
-		  vms/ftest.for \
-		  vms/ftest.m4 \
-		  vms/jackets.c \
-		  vms/make.com \
-		  vms/netcdf.inc \
-		  mfsdf.c mfsdff.f hdftest.f \
-		config/netcdf-hpux.inc config/jackets-hpux.c config/ftest-hpux.f \
-		config/netcdf-irix4.inc config/jackets-irix4.c config/ftest-irix4.f \
-		config/netcdf-irix5.inc config/jackets-irix5.c config/ftest-irix5.f \
-		config/netcdf-irix6.inc config/jackets-irix6.c config/ftest-irix6.f \
-		config/netcdf-irix32.inc config/jackets-irix32.c config/ftest-irix32.f \
-		config/netcdf-sun.inc config/jackets-sun.c config/ftest-sun.f \
-		config/netcdf-linux.inc config/jackets-linux.c config/ftest-linux.f \
-		config/netcdf-fbsd.inc config/jackets-fbsd.c config/ftest-fbsd.f \
-		config/netcdf-alpha.inc config/jackets-alpha.c config/ftest-alpha.f \
-		config/netcdf-dec.inc config/jackets-dec.c config/ftest-dec.f \
-		config/netcdf-aix.inc config/jackets-aix.c config/ftest-aix.f \
-		config/netcdf-solaris.inc config/jackets-solaris.c config/ftest-solaris.f \
-		config/netcdf-solarisx86.inc config/jackets-solarisx86.c  config/ftest-solarisx86.f \
-		config/netcdf-convex.inc config/jackets-convex.c config/ftest-convex.f \
-		config/netcdf-unicos.inc config/jackets-unicos.c config/ftest-unicos.f
-
-LIBOBJS		= jackets.o mfsdf.o mfsdff.o
-LIBNAME		= mfhdf
-#REMOTE_LIBRARY	= ../libsrc/lib$(LIBNAME).a
-REMOTE_LIBRARY	= $(srcdir)/../libsrc/lib$(LIBNAME).a
-#LD_XDR		= @LD_XDR@
-#LD_NETCDF	= -L../libsrc -lmfhdf
-LD_NETCDF	= $(srcdir)/../libsrc/libmfhdf.a
-LIBS		= $(LD_NETCDF) $(LD_XDR) $(HDF_LIB) $(JPEG_LIB) $(ZLIB_LIB) $(LIBSX)
-prefix		= ../../..
-
-# directory used by extelt test.
-TESTDIR = testdir
-
-all::		FORCE
-	@case "$(FC)" in \
-	NONE*|none*) \
-	    echo 1>&2 "\`$@' not made because no FORTRAN compiler";; \
-	*) \
-	    $(MAKE) $(MFLAGS) $(LOCAL_MACROS) nall ; \
-	esac
-
-
-nall::         FORCE
-	@if test -z "$(FMPOOL_FLAGS)"; then \
-	  $(MAKE) $(MFLAGS) $(LOCAL_MACROS) netcdf.inc $(REMOTE_LIBRARY); \
-	else		 \
-	  $(MAKE) $(MFLAGS) $(LOCAL_MACROS) FMPOOL_FLAGS="$(FMPOOL_FLAGS) -I$(FMPOOL_INC)" netcdf.inc $(REMOTE_LIBRARY); \
-	fi
-
-test:		FORCE
-	@case "$(FC)" in \
-	NONE*|none*) \
-	    echo 1>&2 "\`$@' not made because no FORTRAN compiler";; \
-	*) \
-	    $(MAKE) $(MFLAGS) $(LOCAL_MACROS) $(PROGRAM); \
-	    echo "=================================";\
-	    echo "netCDF Fortran interface tests";\
-	    echo "=================================";\
-	    ./$(PROGRAM); \
-	    $(MAKE) $(MFLAGS) $(LOCAL_MACROS) hdftest;; \
-	esac
-
-install-includes:: install
-
-install::	FORCE
-	@case "$(FC)" in \
-	NONE*|none*) \
-	    echo 1>&2 "\`$@' not made because no FORTRAN compiler";; \
-	*) \
-	    $(MAKE) $(LOCAL_MACROS) installed_headers;; \
-	esac
-
-$(PROGRAM):	$(REMOTE_LIBRARY)
-
-# This is the master.mk.in makefile.  It contains general rules.
-#
-
 .SUFFIXES:
-.SUFFIXES:	.so .o .i .c .fc .f .F .l .y
+.SUFFIXES: .inc .f90 .f .o .obj
+$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ Makefile.am  $(top_srcdir)/configure.ac $(ACLOCAL_M4)
+	cd $(top_srcdir) && \
+	  $(AUTOMAKE) --foreign  mfhdf/fortran/Makefile
+Makefile: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.in  $(top_builddir)/config.status
+	cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)
 
-# ###########################################################################
-# General Macros: (moved to make file fragment )
-# ###########################################################################
-#CPP		= @CPP@
-#NCDUMP		= @NCDUMP@
-#NCGEN		= @NCGEN@
-#NEQN		= @NEQN@
-#OS		= @OS@
-#TBL		= @TBL@
-#WHICH		= @WHICH@
+clean-checkPROGRAMS:
+	-test -z "$(check_PROGRAMS)" || rm -f $(check_PROGRAMS)
+ftest$(EXEEXT): $(ftest_OBJECTS) $(ftest_DEPENDENCIES) 
+	@rm -f ftest$(EXEEXT)
+	$(F77LINK) $(ftest_LDFLAGS) $(ftest_OBJECTS) $(ftest_LDADD) $(LIBS)
+hdftest$(EXEEXT): $(hdftest_OBJECTS) $(hdftest_DEPENDENCIES) 
+	@rm -f hdftest$(EXEEXT)
+	$(F77LINK) $(hdftest_LDFLAGS) $(hdftest_OBJECTS) $(hdftest_LDADD) $(LIBS)
 
-# ###########################################################################
-# Recursive Macros (command-line changes to others aren't supported):
-# ###########################################################################
-SUBDIR_MACROS = CC="$(CC)" \
-	CFLAGS="$(CFLAGS)" \
-	CPP="$(CPP)" \
-	exec_prefix="$(exec_prefix)" \
-	FC="$(FC)" \
-	FFLAGS="$(FFLAGS)" \
-	prefix="$(prefix)"
+mostlyclean-compile:
+	-rm -f *.$(OBJEXT) core *.core
 
-LOCAL_MACROS  = CC="$(CC)" \
-	CFLAGS="$(CFLAGS)" \
-	CPP="$(CPP)" \
-	CPPFLAGS="$(CPPFLAGS)" \
-	exec_prefix="$(exec_prefix)" \
-	FC="$(FC)" \
-	FFLAGS="$(FFLAGS)" \
-	prefix="$(prefix)"
+distclean-compile:
+	-rm -f *.tab.c
 
-# ###########################################################################
-# Recursive make(1)s in Subdirectories:
-# ###########################################################################
-
-subdir_dummy_target $(SUBDIR_TARGETS):
-	@echo ""
-	@dir=`echo $@ | sed 's,/.*,,'`; \
-	    target=`echo $@ | sed "s,$$dir/,,"`; \
-	    cd $$dir && \
-	    echo "making \`$$target' in directory `pwd`" && \
-	    echo "" && \
-	    $(MAKE) $(MFLAGS) $(SUBDIR_MACROS) \
-		$$target || exit 1
-	@echo ""
-	@echo "returning to directory `pwd`"
-	@echo ""
-
-
-# ###########################################################################
-# Compilation:
-# ###########################################################################
-#FORTC		= @FORTC@
-
-# Compile FORTRAN code.
-#
 .f.o:
-	$(FC) -c $(FFLAGS) $<
-.F.o:
-	ln -s $< $$$$.c \
-	&& $(CPP) -DUD_FORTRAN_SOURCE $(CPPFLAGS) $(CPPFLAGS_NETCDF) $$$$.c \
-	    | sed '/^# *[0-9]/d' > $*.f \
-	|| (rm -f $*.f $$$$.c; exit 1) \
-	&& rm $$$$.c
-	$(FC) -c $(FFLAGS) $*.f
-.F.f:
-	ln -s $< $$$$.c \
-	&& $(CPP) -DUD_FORTRAN_SOURCE $(CPPFLAGS) $(CPPFLAGS_NETCDF) $$$$.c \
-	    | sed '/^# *[0-9]/d' > $@ \
-	|| (rm -f $@ $$$$.c; exit 1) \
-	&& rm $$$$.c
+	$(F77COMPILE) -c -o $@ `test -f '$<' || echo '$(srcdir)/'`$<
 
-# Generate FORTRAN-callable C code.
-#
-.fc.o:
-	$(FORTC) -O $(OS) $< > $*.c \
-	    || ( rm -f $*.c; exit 1)
-	$(CC) -c $(CFLAGS) $(CFLAGS_NETCDF) $(CPPFLAGS) $(CPPFLAGS_NETCDF) $*.c
-.fc.c:
-	$(FORTC) -O $(OS) $< > $@ \
-	    || (rm -f $*.c; exit 1)
+.f.obj:
+	$(F77COMPILE) -c -o $@ `if test -f '$<'; then $(CYGPATH_W) '$<'; else $(CYGPATH_W) '$(srcdir)/$<'; fi`
+uninstall-info-am:
+includeHEADERS_INSTALL = $(INSTALL_HEADER)
+install-includeHEADERS: $(include_HEADERS)
+	@$(NORMAL_INSTALL)
+	$(mkinstalldirs) $(DESTDIR)$(includedir)
+	@list='$(include_HEADERS)'; for p in $$list; do \
+	  if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
+	  f="`echo $$p | sed -e 's|^.*/||'`"; \
+	  echo " $(includeHEADERS_INSTALL) $$d$$p $(DESTDIR)$(includedir)/$$f"; \
+	  $(includeHEADERS_INSTALL) $$d$$p $(DESTDIR)$(includedir)/$$f; \
+	done
 
-# Compile C code.
-#
-.c.o:
-	$(CC) -c $(CPPFLAGS) $(CPPFLAGS_NETCDF) $(CFLAGS) $(CFLAGS_NETCDF) $<
+uninstall-includeHEADERS:
+	@$(NORMAL_UNINSTALL)
+	@list='$(include_HEADERS)'; for p in $$list; do \
+	  f="`echo $$p | sed -e 's|^.*/||'`"; \
+	  echo " rm -f $(DESTDIR)$(includedir)/$$f"; \
+	  rm -f $(DESTDIR)$(includedir)/$$f; \
+	done
 
-# Compile lex(1) code.  This rule is here to ensure the use of CPPFLAGS.
-# 
-.l.o:
-	rm -f $*.c
-	$(LEX) -t $< > $*.c
-	$(CC) -c $(CPPFLAGS) $(CPPFLAGS_NETCDF) $(CFLAGS) $(CFLAGS_NETCDF) $*.c
-	rm $*.c
+ETAGS = etags
+ETAGSFLAGS =
 
-# C preprocess.  
-#   NB: 
-#	1. The output `file' is not created but appears on standard output;
-#	2. Line numbering information is kept.
-#
-.c.i:
-	$(CPP) $(CPPFLAGS) $(CPPFLAGS_NETCDF) $<
+CTAGS = ctags
+CTAGSFLAGS =
 
+tags: TAGS
 
-# ###########################################################################
-# Libraries:
-# ###########################################################################
-# RANLIB		= @RANLIB@
-LIBDIR		= $(prefix)/lib
-LIB_A		= lib$(LIBRARY).a
+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; } \
+	       END { for (i in files) print i; }'`; \
+	mkid -fID $$unique
 
-library::		$(LIB_A)
+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; } \
+	       END { for (i in files) print i; }'`; \
+	test -z "$(ETAGS_ARGS)$$tags$$unique" \
+	  || $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
+	     $$tags $$unique
 
-# The following rule is forced because the library can be created by a
-# makefile in another directory prior to the execution of the following rule.
-#
-$(LIB_A):		$(LIBOBJS) FORCE
-	$(AR) rcuv $@ $(LIBOBJS)
-	$(RANLIB) $@
-#	$(LD) -b -o libmfhdf.sl $(LIBOBJS)
+ctags: CTAGS
+CTAGS:  $(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; } \
+	       END { for (i in files) print i; }'`; \
+	test -z "$(CTAGS_ARGS)$$tags$$unique" \
+	  || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
+	     $$tags $$unique
 
-# The following rule is for those makefiles needing to install object
-# modules in a library in another directory.  They need only define 
-# REMOTE_LIBRARY and LIBOBJS.  The rule is forced for the same reason as the
-# $(LIB_A) rule.
-#
-lib_dummy $(REMOTE_LIBRARY):	$(LIBOBJS) FORCE
-	$(AR) rcuv $@ $(LIBOBJS)
-	$(RANLIB) $@
-#	$(LD) -b -o ../libsrc/libmfhdf.sl $(LIBOBJS)
+GTAGS:
+	here=`$(am__cd) $(top_builddir) && pwd` \
+	  && cd $(top_srcdir) \
+	  && gtags -i $(GTAGS_ARGS) $$here
 
-installed_libfiles:	FORCE
-	@if [ -n "$(LIBFILES)" ]; then \
-	    libfiles="$(LIBFILES)"; \
-	    for libfile in $$libfiles; do \
-		$(MAKE) $(MFLAGS) $(LOCAL_MACROS) \
-		    LIBDIR=$(LIBDIR) LIBFILE=$$libfile \
-		    installed_libfile || exit 1; \
-	    done; \
-	else \
-	    :; \
-	fi
+distclean-tags:
+	-rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
+DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
 
-installed_library::	FORCE
-	@$(MAKE) $(MFLAGS) $(LOCAL_MACROS) \
-	    LIBDIR=$(LIBDIR) LIBFILE=$(LIB_A) \
-	    installed_libfile
+top_distdir = ../..
+distdir = $(top_distdir)/$(PACKAGE)-$(VERSION)
 
-# The following target decouples the previous targets from the actual rule;
-# thus, eliminating extraneous make(1) messages.
-#
-installed_libfile:	$(LIBDIR)/$(LIBFILE)
+distdir: $(DISTFILES)
+	@srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \
+	topsrcdirstrip=`echo "$(top_srcdir)" | sed 's|.|.|g'`; \
+	list='$(DISTFILES)'; for file in $$list; do \
+	  case $$file in \
+	    $(srcdir)/*) file=`echo "$$file" | sed "s|^$$srcdirstrip/||"`;; \
+	    $(top_srcdir)/*) file=`echo "$$file" | sed "s|^$$topsrcdirstrip/|$(top_builddir)/|"`;; \
+	  esac; \
+	  if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
+	  dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \
+	  if test "$$dir" != "$$file" && test "$$dir" != "."; then \
+	    dir="/$$dir"; \
+	    $(mkinstalldirs) "$(distdir)$$dir"; \
+	  else \
+	    dir=''; \
+	  fi; \
+	  if test -d $$d/$$file; then \
+	    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
+	$(MAKE) $(AM_MAKEFLAGS) $(check_PROGRAMS)
+check: check-am
+all-am: Makefile $(HEADERS)
 
-$(LIBDIR)/$(LIBFILE):	$(LIBDIR) $(LIBFILE)
-	$(INSTALL_DATA) $(LIBFILE) $@
+installdirs:
+	$(mkinstalldirs) $(DESTDIR)$(includedir)
+install: install-am
+install-exec: install-exec-am
+install-data: install-data-am
+uninstall: uninstall-am
 
-dummy_libdir $(LIBDIR):
-	mkdir -p $@
-	chmod u+rwx,g+rws,o=rx $@
+install-am: all-am
+	@$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
 
-LIB_SO		= lib$(LIBRARY).so.$(MAJOR_NO).$(MINOR_NO)
-LIB_SA		= lib$(LIBRARY).sa.$(MAJOR_NO).$(MINOR_NO)
+installcheck: installcheck-am
+install-strip:
+	$(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
+	  INSTALL_STRIP_FLAG=-s \
+	  `test -z '$(STRIP)' || \
+	    echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
+mostlyclean-generic:
 
-#library::		FORCE
-#	@so_objs=`echo $(LIBOBJS) | sed 's/\.o/.so/g'`; \
-#	if [ -z "$$so_objs" ]; then \
-#	    :; \
-#	else \
-#	    $(MAKE) $(MFLAGS) $(LIB_SO) \
-#		SO_OBJS="$$so_objs"; \
-#	fi
-#	@if [ -z "$(SA_OBJS)" ]; then \
-#	    :; \
-#	else \
-#	    $(MAKE) $(MFLAGS) $(LIB_SA); \
-#	fi
+clean-generic:
 
-$(LIB_SO):	$(SO_OBJS)
-	ld -assert pure-text $(SO_OBJS) -o $@
-$(LIB_SA):	$(SA_OBJS) FORCE
-	$(AR) rcuv $@ $(SA_OBJS)
+distclean-generic:
+	-rm -f $(CONFIG_CLEAN_FILES)
+	-test -z "$(DISTCLEANFILES)" || rm -f $(DISTCLEANFILES)
 
-.fc.so:
-	$(FORTC) -O $(OS) $< > $*.c \
-	    || (rm -f $*.c; exit 1)
-	$(CC) -c -pic $(CFLAGS) $(CFLAGS_NETCDF) $(CPPFLAGS) $(CPPFLAGS_NETCDF) $*.c -o $$$$.o \
-	    || (rm -f $$$$.o; exit 1)
-	mv $$$$.o $@
-.c.so:
-	$(CC) -c -pic $(CFLAGS) $(CFLAGS_NETCDF) $(CPPFLAGS) $(CPPFLAGS_NETCDF) $< -o $$$$.o \
-	    || (rm -f $$$$.o; exit 1)
-	mv $$$$.o $@
+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
 
-#installed_library::	$(LIBDIR)/$(LIB_SO)
-#	@if [ -z "$(SA_OBJS)" ]; then \
-#	    :; \
-#	else \
-#	    $(MAKE) $(MFLAGS) $(LIBDIR)/$(LIB_SA); \
-#	fi
+clean-am: clean-checkPROGRAMS clean-generic mostlyclean-am
 
-$(LIBDIR)/$(LIB_SO):	$(LIBDIR) $(LIB_SO)
-	$(INSTALL_DATA) $(LIB_SO) $(LIBDIR)/$(LIB_SO)
-$(LIBDIR)/$(LIB_SA):	$(LIBDIR) $(LIB_SA)
-	$(INSTALL_DATA) $(LIB_SA) $(LIBDIR)/$(LIB_SA)
+distclean: distclean-am
+	-rm -f Makefile
 
+distclean-am: clean-am distclean-compile distclean-generic \
+	distclean-tags
 
-# ###########################################################################
-# Programs:
-# ###########################################################################
-BINDIR		= $(exec_prefix)/bin
+dvi: dvi-am
 
-programs:	$(PROGRAMS)
-program:
-	@if [ -z "$(PROGRAM)" ]; then \
-	    : true; \
-	else \
-	    if [ -z "$(LIBRARY)" ]; then \
-		: true; \
-	    else \
-		$(MAKE) $(MFLAGS) $(LOCAL_MACROS) library; \
-	    fi; \
-	    $(MAKE) $(MFLAGS) $(LOCAL_MACROS) $(PROGRAM); \
-	fi
+dvi-am:
 
-dummy_prog $(PROGRAM):	$(PROGRAM).o FORCE
-	@if [ -r $@.f -o -r $@.F ]; then \
-	    ld='$(FC) $(FFLAGS)'; \
-	else \
-	    ld='$(CC) $(CFLAGS) $(CFLAGS_NETCDF) '; \
-	fi; \
-	cmd="$$ld $(PROGRAM).o $(LIBS) -o $@"; \
-	echo $$cmd; \
-	$$cmd \
-	    || (rm -f $@; exit 1)
+info: info-am
 
-installed_programs:	FORCE
-	@$(MAKE) $(MFLAGS) $(LOCAL_MACROS) installed_binfiles \
-	    BINDIR=$(BINDIR) BINFILES="$(PROGRAMS)"
+info-am:
 
-installed_binfiles:	FORCE
-	@if [ -n "$(BINFILES)" ]; then \
-	    binfiles="$(BINFILES)"; \
-	    for binfile in $$binfiles; do \
-		$(MAKE) $(MFLAGS) $(LOCAL_MACROS) \
-		    BINDIR=$(BINDIR) BINFILE=$$binfile \
-		    installed_binfile || exit 1; \
-	    done; \
-	else \
-	    :; \
-	fi
+install-data-am: install-includeHEADERS
 
-installed_program:	FORCE
-	@$(MAKE) $(MFLAGS) $(LOCAL_MACROS) BINDIR=$(BINDIR) BINFILE=$(PROGRAM) \
-	    installed_binfile
+install-exec-am:
 
-# The following target decouples the previous targets from the actual rule;
-# thus, eliminating extraneous make(1) messages.
-#
-installed_binfile:	$(BINDIR)/$(BINFILE)
+install-info: install-info-am
 
-$(BINDIR)/$(BINFILE):	$(BINDIR) $(BINFILE)
-	$(INSTALL_PROGRAM) $(BINFILE) $@
+install-man:
 
-dummy_bindir $(BINDIR):
-	mkdir -p $@
-	chmod u+rwx,g+rws,o=rx $@
+installcheck-am:
 
+maintainer-clean: maintainer-clean-am
+	-rm -f Makefile
 
-# ###########################################################################
-# Header files:
-# ###########################################################################
-installed_headers:	FORCE
-	@if [ -n "$(HEADERS)" ]; then \
-	    headers="$(HEADERS)"; \
-	    for header in $$headers; do \
-		$(MAKE) $(MFLAGS) $(LOCAL_MACROS) INCDIR=$(INCDIR) HEADER=$$header \
-		    installed_header || exit 1; \
-	    done; \
-	else \
-	    :; \
-	fi
+maintainer-clean-am: distclean-am maintainer-clean-generic
 
-# The following target decouples the previous targets from the actual rule;
-# thus, eliminating extraneous make(1) messages.
-#
-installed_header:	$(INCDIR)/$(HEADER)
+mostlyclean: mostlyclean-am
 
-$(INCDIR)/$(HEADER):	$(INCDIR) $(HEADER)
-	$(INSTALL_DATA) $(HEADER) $@
+mostlyclean-am: mostlyclean-compile mostlyclean-generic
 
-dummy_incdir $(INCDIR):
-	mkdir -p $@
-	chmod u+rwx,g+rws,o=rx $@
+pdf: pdf-am
 
+pdf-am:
 
-# ###########################################################################
-# `etc/' files:
-# ###########################################################################
-ETCDIR	= $(prefix)/etc
+ps: ps-am
 
-installed_etcfiles:
-	@if [ -n "$(ETCFILES)" ]; then \
-	    etcfiles="$(ETCFILES)"; \
-	    for etcfile in $$etcfiles; do \
-		$(MAKE) $(MFLAGS) $(LOCAL_MACROS) ETCDIR=$(ETCDIR) ETCFILE=$$etcfile \
-		    installed_etcfile || exit 1; \
-	    done; \
-	else \
-	    :; \
-	fi
+ps-am:
 
-# The following target decouples the previous targets from the actual rule;
-# thus, eliminating extraneous make(1) messages.
-#
-installed_etcfile:	$(ETCDIR)/$(ETCFILE)
+uninstall-am: uninstall-includeHEADERS uninstall-info-am
 
-$(ETCDIR)/$(ETCFILE):	$(ETCDIR) $(ETCFILE)
-	-mkdir -p $(ETCDIR)
-	-chmod u+rwx,g+rws,o=rx $(ETCDIR)
-	$(INSTALL_DATA) $(ETCFILE) $@
+.PHONY: CTAGS GTAGS all all-am check check-am clean clean-checkPROGRAMS \
+	clean-generic ctags distclean distclean-compile \
+	distclean-generic distclean-tags distdir dvi dvi-am info \
+	info-am install install-am install-data install-data-am \
+	install-exec install-exec-am install-includeHEADERS \
+	install-info install-info-am install-man 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-includeHEADERS uninstall-info-am
 
-# ###########################################################################
-# Manual Pages:
-# ###########################################################################
-MANDIR	= $(prefix)/man
 
-installed_manuals:	FORCE
-	@if [ -n "$(MANUALS)" ]; then \
-	    manuals="$(MANUALS)"; \
-	    for manual in $$manuals; do \
-		mandir=$(MANDIR)/man`echo $$manual | sed 's/.*\.\(.\).*/\1/'`; \
-		$(MAKE) $(MFLAGS) $(LOCAL_MACROS) MANDIR=$$mandir MANUAL=$$manual \
-		    installed_manual || exit 1; \
-	    done; \
-	else \
-	    :; \
-	fi
-
-# The following target decouples the previous targets from the actual rule;
-# thus, eliminating extraneous make(1) messages.
-#
-installed_manual:	$(MANDIR)/$(MANUAL)
-
-# The first sed(1) editing command in the following replaces the expanded
-# RCS keyword `$Date ...' in the `.TH' macro line with something more 
-# appropriate to a manual page.
-#
-$(MANDIR)/$(MANUAL):	$(MANDIR) $(MANUAL)
-	sed \
-	 -e '/^\.TH/s/$$D\ate: \([0-9]*\)\/\([0-9]*\)\/\([0-9]*\).*\$$/\1-\2-\3/'\
-	 $(MANUAL) | $(TBL) | $(NEQN) > $@
-
-dummy_mandir $(MANDIR):
-	mkdir -p $@
-	chmod u+rwx,g+rws,o=rx $@
-
-# ###########################################################################
-# TeX-Info Pages:
-# ###########################################################################
-INFODIR       = $(prefix)/info
-
-installed_infos:      FORCE
-	if [ -z "$(MAKEINFO)" ]; then \
-		echo 1>&2 "Can't install info(1) pages because no makeinfo(1)"; \
-	else \
-	  if [ -n "$(INFOS)" ]; then \
-	      infos="$(INFOS)"; \
-	      for info in $$infos; do \
-		$(MAKE) $(MFLAGS) $(LOCAL_MACROS) INFODIR=$(INFODIR) INFO=$$info \
-		installed_info || exit 1; \
-	      done; \
-	   else \
-	      :; \
-	   fi; \
-	fi;
-# The following target decouples the previous targets from the actual rule;
-# thus, eliminating extraneous make(1) messages.
-#
-installed_info:       $(INFODIR)/$(INFO)
-
-$(INFODIR)/$(INFO):   $(INFODIR) $(INFO)
-	-mkdir -p $(INFODIR)
-	-chmod u+rwx,g+rws,o=rx $(INFODIR)
-	$(INSTALL_DATA) $(INFO) $@
-
-# Rules for generating info pages:
-#
-.SUFFIXES:    .info .texi .texinfo .txn
-.texi.info:
-	@if [ -z "$(MAKEINFO)" ]; then \
-	  echo 1>&2 "Can't create $@ because no makeinfo(1)"; \
-	else \
-	  $(MAKEINFO) $< --no-split --output=$@; \
-	fi
-.texinfo.info:
-	@if [ -z "$(MAKEINFO)" ]; then \
-	  echo 1>&2 "Can't create $@ because no makeinfo(1)"; \
-	else \
-	  $(MAKEINFO) $< --no-split --output=$@; \
-	fi
-.txn.info:
-	@if [ -z "$(MAKEINFO)" ]; then \
-	  echo 1>&2 "Can't create $@ because no makeinfo(1)"; \
-	else \
-	  $(MAKEINFO) $< --no-split --output=$@; \
-	fi
-
-# Rules to make Free format Fortran90 include files from F77 include files
-# 1) change all col. 1 [Cc] to '!'
-# 2) change all col. 6 continuation character to '&'
-#
-.SUFFIXES:	.inc .f90
-
+testdir:
+	-mkdir testdir
 .inc.f90:
 	sed -e 's/^[cC]/!/' -e 's/^     [^ ]/     \&/' < $< > $*.f90
-
-# Ensure that info page depends on canonical TeX-Info macros.
-#
-dummy_info $(INFO):   texinfo.tex
-
-# ###########################################################################
-# Cleanup:
-# ###########################################################################
-clean::
-	rm -f $(GARBAGE) $(PROGRAM) a.out core *.o *.a *.so.* *.sa.* *.so \
-	    *.log $(TESTDIR)/*
-
-realclean::	distclean
-distclean::
-	rm -f $(GARBAGE) $(PROGRAM) a.out core *.o *.a *.so.* *.sa.* *.so \
-	    *.log Makefile config.status cc_id tags ftest.f netcdf.inc jackets.c \
-	    $(TESTDIR)/*
-
-
-# ###########################################################################
-# Configuration:
-# ###########################################################################
-
-# The following target is touched because config.status won't update it if
-# it hasn't changed.
-#
-# The following is commented-out because the HPUX make(1) goes into a loop.
-#
-#Makefile:	config.status
-#	./config.status
-#	touch $@
-
-config.status:	cc_id configure
-	./configure --no-create
-
-cc_id:		FORCE
-	if test -r $@ && test "`cat $@`" = "$(CC)"; then \
-	    :; \
-	else \
-	    echo "$(CC)" > $@; \
-	fi
-
-configure:		configure.in
-	autoconf
-
-
-# ###########################################################################
-# Dependency maintenance:
-# ###########################################################################
-.PRECIOUS:	depend
-#
-# Note: The following rule will only work if the C compiler behaves correctly
-# when given the `-M' option.  AIX's cc(1) and SunOS's acc(1) behave
-# incorrectly.  --Steve Emmerson 1992-09-24
-#
-# Furthermore, we do not attempt to maintain dependencies on installed
-# header files (e.g. those in $(INCDIR)) for two reasons: 1) the dependency
-# list generated at Unidata mightn't correspond to the situation at a client
-# site; and 2) clients using broken compilers (c.f. previous note) can't
-# regenerate the dependency list.
-#
-disabled_depend:		FORCE
-	-incdir=`echo $(INCDIR) | sed s',/,\\\/,g'`; \
-	cc -M $(CPPFLAGS) $(CPPFLAGS_NETCDF) *.c 2> /dev/null | \
-	    awk '{ \
-		if ($$0 ~ /:/) { \
-		    target	= $$1; \
-		    if (target ~ /:/) { \
-			target	= substr(target,1,length(target)-1); \
-			start	= 2; \
-		    } else { \
-			start	= 3; \
-		    } \
-		} else { \
-		    start	= 1; \
-		} \
-		for (i = start; i <= NF; ++i) { \
-		    if ($$i !~ /^\\/ && \
-			$$i !~ /port\// && \
-			$$i !~ /^\//) \
-			print target ": " $$i \
-		} \
-	    }' > $@
-	tag='### DO NOT DELETE THIS LINE.  make depend DEPENDS ON IT ###'; \
-	    sed -e "/^$$tag$$/r depend" \
-		-e "/^$$tag$$/q" Makefile > Makefile.new
-	mv Makefile.new Makefile
-
-
-# ###########################################################################
-# Distributions:
-# ###########################################################################
-#FTPDIR		= @FTPDIR@
-#VERSION		= @VERSION@
-
-ftp:		$(FTPDIR)/$(PACKAGE)-$(VERSION).tar.Z
-	test ! -h $(FTPDIR)/$(PACKAGE).tar.Z && exit 0; \
-	cd $(FTPDIR) || exit 1; \
-	rm $(PACKAGE).tar.Z || exit 1; \
-	ln -s $(PACKAGE)-$(VERSION).tar.Z $(PACKAGE).tar.Z;
-
-$(FTPDIR)/$(PACKAGE)-$(VERSION).tar.Z:	$(PACKAGE)-$(VERSION).tar.Z
-	cp $(PACKAGE)-$(VERSION).tar.Z $@ 
-	chmod u+rw,g+rw,o=r $@
-
-tar.Z:		$(PACKAGE)-$(VERSION).tar.Z
-
-$(PACKAGE)-$(VERSION).tar.Z:	MANIFEST
-	dir=`basename \`pwd\`` \
-	&& id=$(PACKAGE)-$(VERSION) \
-	&& cd .. \
-	&& ln -s $$dir $$id \
-	&& tar -chof - `sed "s|^|$$id/|" $$id/MANIFEST` \
-	    | compress > $$id/$@ \
-	&& rm $$id
-
-MANIFEST:	FORCE
-	@echo 1>&2 Creating MANIFEST
-	@$(MAKE) -s $(MFLAGS) $(LOCAL_MACROS) MANIFEST.echo > $@
-
-MANIFEST.echo:	FORCE
-	@$(MAKE) -s $(MFLAGS) $(LOCAL_MACROS) \
-	    MANIFEST=`echo $(MANIFEST) | sed 's/MANIFEST//'` \
-	    ensure_manifest > /dev/null
-	@echo $(MANIFEST) | fmt -1
-	@if [ -n "$(SUBDIRS)" ]; then \
-	    subdirs="$(SUBDIRS)"; \
-	    for subdir in $$subdirs; do \
-		(cd $$subdir && \
-	        echo 1>&2 Creating $@ in `pwd` && \
-		$(MAKE) $(MFLAGS) $(LOCAL_MACROS) MANIFEST.echo | \
-		    sed "s|^|$$subdir/|") || exit 1; \
-	    done; \
-	else \
-	    :; \
-	fi
-
-ensure_manifest:	$(MANIFEST)
-
-# for distribution creation
-distdir = $(TOP_SRCDIR)/$(PACKAGE)-$(VERSION)/$(curdir)
-curdir = mfhdf/fortran
-dist: $(DISTFILES)
-	for subdir in $(OTHERDIRS); do \
-	  mkdir $(distdir)/$$subdir || exit 1; \
-	done
-	@for file in $(DISTFILES); do \
-	  ln $(srcdir)/$$file $(distdir)/$$file 2> /dev/null \
-	    || { echo copying $$file instead; \
-	    cp -p $(srcdir)/$$file $(distdir)/$$file;}; \
-	done
-
-# ###########################################################################
-# Miscellaneous:
-# ###########################################################################
-
-# The following dummy target is useful as a dependency to ensure that a
-# rule is always executed.
-#
-FORCE:
-
-
-# Disable the following since the three files are created by hand
-# and copied in during configuration.  The following, if ever activiated,
-# would blow away those good files.
-#
-#jackets.c:	fortc1.sed fortc2.sed common.m4 jackets.src $(OS).m4
-#	./fortc -L . -O $(OS) jackets.src > $@
-#
-#netcdf.inc:	common.inc fortc1.sed fortc2.sed common.m4 $(OS).m4
-#	./fortc -L . -O $(OS) common.inc > $@
-#
-#$(PROGRAM).f:	fortc1.sed fortc2.sed common.m4 $(PROGRAM).src $(OS).m4
-#	./fortc -L . -O $(OS) $(PROGRAM).src > $@
-#
-hdftest:        FORCE
-	$(FC) $(FFLAGS) hdftest.f $(LIBS) -o $@
-	@ echo "=======================================";
-	@ echo "HDF-SD Fortran interface tests start";
-	@ echo "=======================================";
-	test -d $(TESTDIR) || mkdir $(TESTDIR)
-	./hdftest > hdfout.new
-	@cmd="$(DIFF) $(DIFF_FLAGS) hdfout.new hdftst.sav"; \
-	    echo $$cmd; \
-	    if $$cmd; then \
-		echo "*** HDF-SD Fortran interface tests passed ***"; \
-	    else \
-		echo "*** HDF-SD Fortran interface tests failed ***"; \
-		echo "The above differences are OK if small"; \
-		exit 0; \
-	    fi
-
-$(PROGRAM).o:	netcdf.inc
-jackets.o:	../libsrc/netcdf.h
-
-### Everything after the following line might be overwritten ###
-### DO NOT DELETE THIS LINE.  make depend DEPENDS ON IT ###
-include depend
+check:
+	@echo "==================================="
+	@echo "HDF-SD Fortran interfaces tests"
+	@echo "==================================="
+	srcdir="$(srcdir)" ./hdftest
+	@echo "==================================="
+	@echo "HDF-NetCDF Fortran interfaces tests"
+	@echo "==================================="
+	srcdir="$(srcdir)" ./ftest
+# 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:

Deleted: packages/libhdf4/branches/upstream/current/mfhdf/fortran/Makefile.in_orig
===================================================================
--- packages/libhdf4/branches/upstream/current/mfhdf/fortran/Makefile.in_orig	2007-05-15 09:05:29 UTC (rev 830)
+++ packages/libhdf4/branches/upstream/current/mfhdf/fortran/Makefile.in_orig	2007-05-15 09:53:05 UTC (rev 831)
@@ -1,98 +0,0 @@
-# Makefile for the FORTRAN interface to the Network CDF library
-#
-# $Id: Makefile.in_orig,v 1.2 2000/08/30 21:55:42 wendling Exp $
-
-PROGRAM		= ftest
-OS		= @OS@
-FC		= @FC@
-CPP_NETCDF	= -I../libsrc @HDF_INC@
-CPPFLAGS	= $(CPP_NETCDF) @CPPFLAGS@
-CFLAGS		= @CFLAGS@
-FFLAGS		= @FFLAGS@
-HDF_LIB         = @HDF_LIB@
-JPEG_LIB        = @JPEG_LIB@
-GARBAGE		= $(PROGRAM) test.nc copy.nc netcdf.inc jackets.c \
-		  $(PROGRAM).f test*.hdf hdftest hdfout.new
-HEADERS		= netcdf.inc
-MANIFEST	= $(PROGRAM).src Makefile.in README aix.m4 common.inc \
-		  common.m4 depend descrip.mms fortc fortc1.sed \
-		  fortc2.sed hpux.m4 irix.m4 jackets.src msoft.m4 msoft.mk \
-		  next.m4 osf.m4 sunos.m4 ultrix.m4 unicos.m4 vax-ultrix.m4 \
-		  vms.m4 \
-		  msoft/NOTES msoft/fslen.asm msoft/ftest.for \
-		  msoft/jackets.c msoft/msoft.int \
-		  msoft/netcdf.inc \
-		  vms/ftest.for \
-		  vms/ftest.m4 \
-		  vms/jackets.c \
-		  vms/make.com \
-		  vms/netcdf.inc \
-		  mfsdf.c mfsdff.f hdftest.f
-
-LIBOBJS		= jackets.o mfsdf.o mfsdff.o
-LIBNAME		= netcdf
-REMOTE_LIBRARY	= ../libsrc/lib$(LIBNAME).a
-OBJS		= $(PROGRAM).o $(LIBOBJS) 
-LD_XDR		= @LD_XDR@
-LD_NETCDF	= -L../libsrc -lnetcdf
-LIBS		= $(LD_NETCDF) $(LD_XDR) $(HDF_LIB) $(JPEG_LIB) $(LIBSX)
-prefix		= ../../..
-
-all::		FORCE
-	@case "$(FC)" in \
-	NONE*|none*) \
-	    echo 1>&2 "\`$@' not made because no FORTRAN compiler";; \
-	*) \
-	    $(MAKE) netcdf.inc $(REMOTE_LIBRARY);; \
-	esac
-
-test:		FORCE
-	@case "$(FC)" in \
-	NONE*|none*) \
-	    echo 1>&2 "\`$@' not made because no FORTRAN compiler";; \
-	*) \
-	    $(MAKE) $(MFLAGS) $(PROGRAM); \
-	    $(MAKE) $(MFLAGS) hdftest; \
-	    ./$(PROGRAM);; \
-	esac
-
-install::	FORCE
-	@case "$(FC)" in \
-	NONE*|none*) \
-	    echo 1>&2 "\`$@' not made because no FORTRAN compiler";; \
-	*) \
-	    $(MAKE) installed_headers;; \
-	esac
-
-$(PROGRAM):	$(REMOTE_LIBRARY)
-
-include ../port/master.mk
-
-jackets.c:	fortc1.sed fortc2.sed common.m4 jackets.src $(OS).m4
-	./fortc -L . -O $(OS) jackets.src > $@
-
-netcdf.inc:	common.inc fortc1.sed fortc2.sed common.m4 $(OS).m4
-	./fortc -L . -O $(OS) common.inc > $@
-
-$(PROGRAM).f:	fortc1.sed fortc2.sed common.m4 $(PROGRAM).src $(OS).m4
-	./fortc -L . -O $(OS) $(PROGRAM).src > $@
-
-hdftest:        hdftest.f $(LIBRARY)
-	$(FC) -g hdftest.f $(LIBS) -o $@
-	./hdftest > hdfout.new
-	@cmd="diff hdfout.new hdftst.sav"; \
-	    echo $$cmd; \
-	    if $$cmd; then \
-		echo "*** HDF passes FORTRAN test ***"; \
-	    else \
-		echo "*** HDF fails FORTRAN test ***"; \
-		echo "The above differences are OK if small"; \
-		exit 0; \
-	    fi
-
-$(PROGRAM).o:	netcdf.inc
-jackets.o:	../libsrc/netcdf.h
-
-### Everything after the following line might be overwritten ###
-### DO NOT DELETE THIS LINE.  make depend DEPENDS ON IT ###
-include depend

Modified: packages/libhdf4/branches/upstream/current/mfhdf/fortran/config/ftest-aix.f
===================================================================
--- packages/libhdf4/branches/upstream/current/mfhdf/fortran/config/ftest-aix.f	2007-05-15 09:05:29 UTC (rev 830)
+++ packages/libhdf4/branches/upstream/current/mfhdf/fortran/config/ftest-aix.f	2007-05-15 09:53:05 UTC (rev 831)
@@ -1,7 +1,7 @@
 c********************************************************************
 c   Copyright 1993, UCAR/Unidata
 c   See netcdf/COPYRIGHT file for copying and redistribution conditions.
-c   $Id: ftest-aix.f,v 1.3 1998/01/17 00:23:27 epourmal Exp $
+c   $Id: ftest-aix.f,v 1.6 2005/02/09 03:04:01 epourmal Exp $
 c********************************************************************/
 
 
@@ -106,6 +106,11 @@
 c     test ncadel
       write(*, 100) 'ncadel'
       call tncadel(name2)
+
+c     test reading from NetCDF file
+      write(*, 100) 'NetCDF read'
+      call tread_netcdf()
+
       end
 c
 c     subroutine to test ncacpy
@@ -479,7 +484,7 @@
       
       bvalidrg(1) = 1
       bvalidrg(2) = 250
-      call ncapt (ncid, bid, 'validrange', NCBYTE, 2,
+      call ncapt (ncid, bid, 'valid range', NCBYTE, 2,
      +bvalidrg, iret)
 
 c
@@ -488,7 +493,7 @@
 
       svalidrg(1) = -100
       svalidrg(2) = 100
-      call ncapt (ncid, sid, 'validrange', NCSHORT, 2, 
+      call ncapt (ncid, sid, 'valid range', NCSHORT, 2, 
      +svalidrg, iret)
 
 c
@@ -497,7 +502,7 @@
 
       lvalidrg(1) = 0
       lvalidrg(2) = 360
-      call ncapt (ncid, lid, 'validrange', NCLONG, 2,
+      call ncapt (ncid, lid, 'valid range', NCLONG, 2,
      +lvalidrg, iret)
       
 c
@@ -506,7 +511,7 @@
 
       rvalidrg(1) = 0.0
       rvalidrg(2) = 5000.0
-      call ncapt (ncid, fid, 'validrange', NCFLOAT, 2,
+      call ncapt (ncid, fid, 'valid range', NCFLOAT, 2,
      +rvalidrg, iret)
 
 c
@@ -515,7 +520,7 @@
 
       dvalidrg(1) = 0D0
       dvalidrg(2) = 500D0
-      call ncapt (ncid, did, 'validrange', NCDOUBLE, 2,
+      call ncapt (ncid, did, 'valid range', NCDOUBLE, 2,
      +dvalidrg, iret)
 
 c
@@ -565,11 +570,12 @@
       data dimnam /'time', 'lat', 'lon', 'level',
      + 'length', 27*'0'/
       data dimsiz /4, 5, 5, 4, 80, 27*0/
-      data varnam/'bytev', 'shortv', 'longv', 'floatv', 'doublev', 
+      data varnam/'bytev', 'short v', 'longv', 'floatv', 'doublev', 
      + 'chv', 'cv'/
       
-      data attname/'validrange', '0', 'validrange', '0', 'validrange',
-     + '0', 'validrange', '0', 'validrange', '0', 'longname', 'id',
+      data attname/'valid range', '0', 'valid range',
+     + '0', 'valid range',
+     + '0', 'valid range', '0', 'valid range', '0', 'longname', 'id',
      + '0', '0'/
       data gattnam/'source','basetime'/
       end
@@ -818,7 +824,7 @@
 c     short
 c
       sdims(1) = timedim
-      sid = ncvdef (ncid, 'shortv', NCSHORT, 1, sdims, iret)
+      sid = ncvdef (ncid, 'short v', NCSHORT, 1, sdims, iret)
 c
 c     long
 c
@@ -1218,3 +1224,196 @@
       call ncclos (ncid, iret)
       return
       end
+
+C        This routine reads varaibales and global attributes from
+C        the REAL NetCDF file test_nc.nc. The file was created by NetCDF v3.5 
+C        from the file test_nc.cdl that can be found in the mfhdf/fortran
+C        directory. Please do not generate test_nc.nc file from the test_nc.cdl
+C        using HDF4 ncgen. HDF4 ncgen generated HDF4 file!
+
+         subroutine tread_netcdf()
+         include 'netcdf.inc'
+
+C        Variables declarations
+
+         character*10 FILENAME
+         character*1024 new_filename
+         integer filename_len
+         integer status, ncid, var_id
+         integer time(12), date(12), start(3), count(3), int_attr(5)
+         real a(3,2), float_attr(3)
+         double precision c(3), double_attr(3)
+         integer*2 b(2,3,12), short_attr(2)
+         integer i, j, k, dlen
+         character*10 description
+
+C        Arrays to read data to.
+
+         integer time_val(12), date_val(12), int_attr_val(5)
+         integer*2 b_val(2,3,12), short_attr_val(2)
+         real a_val(3,2), float_attr_val(3)
+         double precision c_val(3), double_attr_val(3)
+         real epsilon
+         double precision depsilon
+         integer external fixname
+
+C        Arrays initialization
+         DATA time_val /1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12/
+         DATA date_val /840116, 840214, 840316, 840415, 840516, 840615, 
+     +              840716, 840816, 840915, 841016, 841115, 841216/
+         DATA a_val /1.0, 2.0, 3.0, 4.0, 5.0, 6.0/
+         DATA b_val /1, 1, 2, 2, 3, 3,
+     +           4, 4, 5, 5, 6, 6,
+     +           7, 7, 8, 8, 9, 9,
+     +           10, 10, 11, 11, 12, 12,
+     +           13, 13, 14, 14, 15, 15,
+     +           16, 16, 17, 17, 18, 18,
+     +           19, 19, 20, 20, 21, 22,
+     +           23, 23, 24, 24, 25, 25, 
+     +           26, 26, 27, 27, 28, 28,
+     +           29, 29, 30, 30, 31, 31,
+     +           32, 32, 33, 33, 34, 34,
+     +           35, 35, 36, 36, 37, 37/
+         DATA c_val /2.0, 3.0, 100/
+         DATA int_attr_val /-100, 200, -300, 400, -500/
+         DATA float_attr_val /1.0, 2.0, 3.0/
+         DATA short_attr_val /0, 1/
+         DATA double_attr_val /-1.0, 2.0, -7.0/
+         DATA epsilon /1.E-6/
+         DATA depsilon /1.E-12/
+         
+C        Modify filename to accomodate SRCDIR configure option
+
+         FILENAME = 'test_nc.nc'
+         filename_len = len(new_filename)
+         call fixname(FILENAME, new_filename, filename_len)
+
+         dlen = 10
+         ncid = ncopn(new_filename(1:filename_len), NCNOWRIT, status)
+         if (status .ne.0) then
+             write(*,*) 'ncopn failed'
+             goto 1000
+         endif
+
+         var_id = ncvid(ncid, 'time', status)
+         start(1) = 1 
+         count(1) = 12
+         call ncvgt(ncid, var_id, start, count, time, status)
+         if (status .ne. 0) write(*,*) 
+     +      'ncvgt failed for 32-bit integer variable time'
+         do i = 1, 12
+            if( time(i) .ne. time_val(i) ) 
+     +      write(*,*) 'Wrong time value at index  ', i 
+         enddo
+
+         var_id = ncvid(ncid, 'c', status)
+         start(1) = 1 
+         count(1) = 3
+         call ncvgt(ncid, var_id, start, count, c, status)
+         if (status .ne. 0) write(*,*)
+     +      'ncvgt failed for 64-bit float variable c'
+         do i = 1, 3
+            if( abs(c(i) - c_val(i)) .gt. depsilon ) 
+     +      write(*,*) 'Wrong c value at index  ', i 
+         enddo
+
+         var_id = ncvid(ncid, 'date', status)
+         start(1) = 1 
+         count(1) = 12
+         call ncvgt(ncid, var_id, start, count, date, status)
+         if (status .ne. 0) write(*,*) 
+     +      'ncvgt failed for 32-bit integer variable date'
+         do i = 1, 12
+            if( date(i) .ne. date_val(i) ) 
+     +      write(*,*) 'Wrong date value at index  ', i 
+         enddo
+
+
+         var_id = ncvid(ncid, 'a', status)
+         start(1) = 1 
+         start(2) = 1
+         count(1) = 3
+         count(2) = 2
+         call ncvgt(ncid, var_id, start, count, a, status)
+         if (status .ne. 0) write(*,*) 
+     +      'ncvgt failed for 32-bit real variable a'
+         do i = 1, 2
+            do j = 1, 3 
+            if( abs(a(j,i) - a_val(j,i)) .gt. epsilon ) 
+     +      write(*,*) 'Wrong a value at indecies  ', j, ',', i 
+            enddo
+         enddo
+
+
+         var_id = ncvid(ncid, 'b', status)
+         start(1) = 1 
+         start(2) = 1
+         start(3) = 1
+         count(1) = 2 
+         count(2) = 3
+         count(3) = 12
+         call ncvgt(ncid, var_id, start, count, b, status)
+         if (status .ne. 0) write(*,*) 
+     +      'ncvgt failed for 16-bit integer variable b'
+         do i = 1, 12
+            do j = 1, 3 
+               do k = 1, 2
+               if( b(k,j,i) .ne.  b_val(k,j,i)) 
+     +         write(*,*) 
+     +        'Wrong b value at indecies  ', k, ',', j, ',', i 
+               enddo
+            enddo
+         enddo
+
+
+C read global attributes
+
+         call ncagt(ncid, NCGLOBAL, 'int_attr', int_attr, status)
+         if (status .ne. 0) 
+     +   write(*,*) 'ncagt failed for 32-bit integer attribute int_attr'
+         do i = 1, 5
+            if( int_attr(i) .ne. int_attr_val(i) ) 
+     +      write(*,*) 'Wrong int_attr value at index  ', i 
+         enddo
+
+
+         call ncagt(ncid, NCGLOBAL, 'float_attr', float_attr, status)
+         if (status .ne. 0) 
+     +   write(*,*) 'ncagt failed for 32-bit float attribute float_attr'
+         do i = 1, 3 
+            if( abs(float_attr(i) - float_attr_val(i)) .gt. epsilon ) 
+     +      write(*,*) 'Wrong float_attr value at index  ', i 
+         enddo
+
+         call ncagt(ncid, NCGLOBAL, 'double_attr', double_attr, status)
+         if (status .ne. 0) 
+     +   write(*,*) 
+     +   'ncagt failed for 64-bit float attribute double_attr'
+         do i = 1, 3 
+            if( abs(double_attr(i) - double_attr_val(i)) .gt. depsilon ) 
+     +      write(*,*) 'Wrong double_attr value at index  ', i 
+         enddo
+
+
+         call ncagt(ncid, NCGLOBAL, 'short_attr', short_attr, status)
+         if (status .ne. 0) 
+     +   write(*,*) 
+     +   'ncagt failed for 16-bit integer attribute double_attr'
+         do i = 1, 2 
+            if( short_attr(i) .ne. short_attr_val(i) ) 
+     +      write(*,*) 'Wrong short_attr value at index  ', i 
+         enddo
+
+
+         call ncagtc(ncid, NCGLOBAL, 'Description', description, 
+     +               dlen, status)
+         if (status .ne. 0) 
+     +   write(*,*) 
+     +   'ncagt failed for character attribute Description'
+         if (description .ne. 'Attributes') 
+     +   write(*,*) 'Wrong values of the character attribute' 
+
+
+1000     continue
+         return
+         end

Modified: packages/libhdf4/branches/upstream/current/mfhdf/fortran/config/ftest-alpha.f
===================================================================
--- packages/libhdf4/branches/upstream/current/mfhdf/fortran/config/ftest-alpha.f	2007-05-15 09:05:29 UTC (rev 830)
+++ packages/libhdf4/branches/upstream/current/mfhdf/fortran/config/ftest-alpha.f	2007-05-15 09:53:05 UTC (rev 831)
@@ -1,7 +1,7 @@
 c********************************************************************
 c   Copyright 1993, UCAR/Unidata
 c   See netcdf/COPYRIGHT file for copying and redistribution conditions.
-c   $Id: ftest-alpha.f,v 1.3 1998/01/17 00:24:23 epourmal Exp $
+c   $Id: ftest-alpha.f,v 1.6 2005/02/09 03:04:02 epourmal Exp $
 c********************************************************************/
 
 
@@ -106,6 +106,11 @@
 c     test ncadel
       write(*, 100) 'ncadel'
       call tncadel(name2)
+ 
+c     test reading from NetCDF file
+      write(*, 100) 'NetCDF read'
+      call tread_netcdf()
+
       end
 c
 c     subroutine to test ncacpy
@@ -479,7 +484,7 @@
       
       bvalidrg(1) = 1
       bvalidrg(2) = 250
-      call ncapt (ncid, bid, 'validrange', NCBYTE, 2,
+      call ncapt (ncid, bid, 'valid range', NCBYTE, 2,
      +bvalidrg, iret)
 
 c
@@ -488,7 +493,7 @@
 
       svalidrg(1) = -100
       svalidrg(2) = 100
-      call ncapt (ncid, sid, 'validrange', NCSHORT, 2, 
+      call ncapt (ncid, sid, 'valid range', NCSHORT, 2, 
      +svalidrg, iret)
 
 c
@@ -497,7 +502,7 @@
 
       lvalidrg(1) = 0
       lvalidrg(2) = 360
-      call ncapt (ncid, lid, 'validrange', NCLONG, 2,
+      call ncapt (ncid, lid, 'valid range', NCLONG, 2,
      +lvalidrg, iret)
       
 c
@@ -506,7 +511,7 @@
 
       rvalidrg(1) = 0.0
       rvalidrg(2) = 5000.0
-      call ncapt (ncid, fid, 'validrange', NCFLOAT, 2,
+      call ncapt (ncid, fid, 'valid range', NCFLOAT, 2,
      +rvalidrg, iret)
 
 c
@@ -515,7 +520,7 @@
 
       dvalidrg(1) = 0D0
       dvalidrg(2) = 500D0
-      call ncapt (ncid, did, 'validrange', NCDOUBLE, 2,
+      call ncapt (ncid, did, 'valid range', NCDOUBLE, 2,
      +dvalidrg, iret)
 
 c
@@ -565,11 +570,12 @@
       data dimnam /'time', 'lat', 'lon', 'level',
      + 'length', 27*'0'/
       data dimsiz /4, 5, 5, 4, 80, 27*0/
-      data varnam/'bytev', 'shortv', 'longv', 'floatv', 'doublev', 
+      data varnam/'bytev', 'short v', 'longv', 'floatv', 'doublev', 
      + 'chv', 'cv'/
       
-      data attname/'validrange', '0', 'validrange', '0', 'validrange',
-     + '0', 'validrange', '0', 'validrange', '0', 'longname', 'id',
+      data attname/'valid range', '0', 'valid range',
+     + '0', 'valid range',
+     + '0', 'valid range', '0', 'valid range', '0', 'longname', 'id',
      + '0', '0'/
       data gattnam/'source','basetime'/
       end
@@ -818,7 +824,7 @@
 c     short
 c
       sdims(1) = timedim
-      sid = ncvdef (ncid, 'shortv', NCSHORT, 1, sdims, iret)
+      sid = ncvdef (ncid, 'short v', NCSHORT, 1, sdims, iret)
 c
 c     long
 c
@@ -1218,3 +1224,195 @@
       call ncclos (ncid, iret)
       return
       end
+      
+C        This routine reads varaibales and global attributes from
+C        the REAL NetCDF file test_nc.nc. The file was created by NetCDF v3.5 
+C        from the file test_nc.cdl that can be found in the mfhdf/fortran
+C        directory. Please do not generate test_nc.nc file from the test_nc.cdl
+C        using HDF4 ncgen. HDF4 ncgen generated HDF4 file!
+
+         subroutine tread_netcdf()
+         include 'netcdf.inc'
+
+C        Variables declarations
+
+         character*10 FILENAME
+         character*1024 new_filename
+         integer filename_len 
+         integer status, ncid, var_id
+         integer time(12), date(12), start(3), count(3), int_attr(5)
+         real a(3,2), float_attr(3)
+         double precision c(3), double_attr(3)
+         integer*2 b(2,3,12), short_attr(2)
+         integer i, j, k, dlen
+         character*10 description
+
+C        Arrays to read data to.
+
+         integer time_val(12), date_val(12), int_attr_val(5)
+         integer*2 b_val(2,3,12), short_attr_val(2)
+         real a_val(3,2), float_attr_val(3)
+         double precision c_val(3), double_attr_val(3)
+         real epsilon
+         double precision depsilon
+         integer external fixname
+
+C        Arrays initialization
+         DATA time_val /1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12/
+         DATA date_val /840116, 840214, 840316, 840415, 840516, 840615, 
+     +              840716, 840816, 840915, 841016, 841115, 841216/
+         DATA a_val /1.0, 2.0, 3.0, 4.0, 5.0, 6.0/
+         DATA b_val /1, 1, 2, 2, 3, 3,
+     +           4, 4, 5, 5, 6, 6,
+     +           7, 7, 8, 8, 9, 9,
+     +           10, 10, 11, 11, 12, 12,
+     +           13, 13, 14, 14, 15, 15,
+     +           16, 16, 17, 17, 18, 18,
+     +           19, 19, 20, 20, 21, 22,
+     +           23, 23, 24, 24, 25, 25, 
+     +           26, 26, 27, 27, 28, 28,
+     +           29, 29, 30, 30, 31, 31,
+     +           32, 32, 33, 33, 34, 34,
+     +           35, 35, 36, 36, 37, 37/
+         DATA c_val /2.0, 3.0, 100/
+         DATA int_attr_val /-100, 200, -300, 400, -500/
+         DATA float_attr_val /1.0, 2.0, 3.0/
+         DATA short_attr_val /0, 1/
+         DATA double_attr_val /-1.0, 2.0, -7.0/
+         DATA epsilon /1.E-6/
+         DATA depsilon /1.E-12/
+         
+
+         FILENAME = 'test_nc.nc'
+         filename_len = len(new_filename)
+         call fixname(FILENAME, new_filename, filename_len)
+
+         dlen = 10
+         ncid = ncopn(new_filename(1:filename_len), NCNOWRIT, status)
+         if (status .ne.0) then
+             write(*,*) 'ncopn failed'
+             goto 1000
+         endif
+
+         var_id = ncvid(ncid, 'time', status)
+         start(1) = 1 
+         count(1) = 12
+         call ncvgt(ncid, var_id, start, count, time, status)
+         if (status .ne. 0) write(*,*) 
+     +      'ncvgt failed for 32-bit integer variable time'
+         do i = 1, 12
+            if( time(i) .ne. time_val(i) ) 
+     +      write(*,*) 'Wrong time value at index  ', i 
+         enddo
+
+         var_id = ncvid(ncid, 'c', status)
+         start(1) = 1 
+         count(1) = 3
+         call ncvgt(ncid, var_id, start, count, c, status)
+         if (status .ne. 0) write(*,*)
+     +      'ncvgt failed for 64-bit float variable c'
+         do i = 1, 3
+            if( abs(c(i) - c_val(i)) .gt. depsilon ) 
+     +      write(*,*) 'Wrong c value at index  ', i 
+         enddo
+
+         var_id = ncvid(ncid, 'date', status)
+         start(1) = 1 
+         count(1) = 12
+         call ncvgt(ncid, var_id, start, count, date, status)
+         if (status .ne. 0) write(*,*) 
+     +      'ncvgt failed for 32-bit integer variable date'
+         do i = 1, 12
+            if( date(i) .ne. date_val(i) ) 
+     +      write(*,*) 'Wrong date value at index  ', i 
+         enddo
+
+
+         var_id = ncvid(ncid, 'a', status)
+         start(1) = 1 
+         start(2) = 1
+         count(1) = 3
+         count(2) = 2
+         call ncvgt(ncid, var_id, start, count, a, status)
+         if (status .ne. 0) write(*,*) 
+     +      'ncvgt failed for 32-bit real variable a'
+         do i = 1, 2
+            do j = 1, 3 
+            if( abs(a(j,i) - a_val(j,i)) .gt. epsilon ) 
+     +      write(*,*) 'Wrong a value at indecies  ', j, ',', i 
+            enddo
+         enddo
+
+
+         var_id = ncvid(ncid, 'b', status)
+         start(1) = 1 
+         start(2) = 1
+         start(3) = 1
+         count(1) = 2 
+         count(2) = 3
+         count(3) = 12
+         call ncvgt(ncid, var_id, start, count, b, status)
+         if (status .ne. 0) write(*,*) 
+     +      'ncvgt failed for 16-bit integer variable b'
+         do i = 1, 12
+            do j = 1, 3 
+               do k = 1, 2
+               if( b(k,j,i) .ne.  b_val(k,j,i)) 
+     +         write(*,*) 
+     +        'Wrong b value at indecies  ', k, ',', j, ',', i 
+               enddo
+            enddo
+         enddo
+
+
+C read global attributes
+
+         call ncagt(ncid, NCGLOBAL, 'int_attr', int_attr, status)
+         if (status .ne. 0) 
+     +   write(*,*) 'ncagt failed for 32-bit integer attribute int_attr'
+         do i = 1, 5
+            if( int_attr(i) .ne. int_attr_val(i) ) 
+     +      write(*,*) 'Wrong int_attr value at index  ', i 
+         enddo
+
+
+         call ncagt(ncid, NCGLOBAL, 'float_attr', float_attr, status)
+         if (status .ne. 0) 
+     +   write(*,*) 'ncagt failed for 32-bit float attribute float_attr'
+         do i = 1, 3 
+            if( abs(float_attr(i) - float_attr_val(i)) .gt. epsilon ) 
+     +      write(*,*) 'Wrong float_attr value at index  ', i 
+         enddo
+
+         call ncagt(ncid, NCGLOBAL, 'double_attr', double_attr, status)
+         if (status .ne. 0) 
+     +   write(*,*) 
+     +   'ncagt failed for 64-bit float attribute double_attr'
+         do i = 1, 3 
+            if( abs(double_attr(i) - double_attr_val(i)) .gt. depsilon ) 
+     +      write(*,*) 'Wrong double_attr value at index  ', i 
+         enddo
+
+
+         call ncagt(ncid, NCGLOBAL, 'short_attr', short_attr, status)
+         if (status .ne. 0) 
+     +   write(*,*) 
+     +   'ncagt failed for 16-bit integer attribute double_attr'
+         do i = 1, 2 
+            if( short_attr(i) .ne. short_attr_val(i) ) 
+     +      write(*,*) 'Wrong short_attr value at index  ', i 
+         enddo
+
+
+         call ncagtc(ncid, NCGLOBAL, 'Description', description, 
+     +               dlen, status)
+         if (status .ne. 0) 
+     +   write(*,*) 
+     +   'ncagt failed for character attribute Description'
+         if (description .ne. 'Attributes') 
+     +   write(*,*) 'Wrong values of the character attribute' 
+
+
+1000     continue
+         return
+         end

Added: packages/libhdf4/branches/upstream/current/mfhdf/fortran/config/ftest-apple.f
===================================================================
--- packages/libhdf4/branches/upstream/current/mfhdf/fortran/config/ftest-apple.f	                        (rev 0)
+++ packages/libhdf4/branches/upstream/current/mfhdf/fortran/config/ftest-apple.f	2007-05-15 09:53:05 UTC (rev 831)
@@ -0,0 +1,1420 @@
+c********************************************************************
+c   Copyright 1993, UCAR/Unidata
+c   See netcdf/COPYRIGHT file for copying and redistribution conditions.
+c   $Id: ftest-apple.f,v 1.3 2005/02/09 03:04:02 epourmal Exp $
+c********************************************************************/
+
+
+
+c
+c     program to test the FBSD Fortran jacket interface to the netCDF
+c
+      program ftest
+      
+      include 'netcdf.inc'
+
+c     name of first test cdf
+      character*31 name
+c     name of second test cdf
+      character*31 name2
+      
+c     Returned error code.
+      integer iret 
+c     netCDF ID
+      integer ncid
+c     ID of dimension lat
+      integer  latdim
+c     ID of dimension lon
+      integer londim
+c     ID of dimension level
+      integer leveldim
+c     ID of dimension time
+      integer timedim
+c     ID of dimension len
+      integer lendim
+
+c     variable used to control error-handling behavior
+      integer ncopts
+      integer dimsiz(MAXNCDIM)
+C      allowable roundoff 
+      real epsilon
+      common /dims/timedim, latdim, londim, leveldim, lendim,
+     + dimsiz
+      data name/'test.nc'/
+      data name2/'copy.nc'/
+      data epsilon /.000001/
+      
+100   format('*** Testing ', a, ' ...')
+c     set error-handling to verbose and non-fatal
+      ncopts = NCVERBOS
+      call ncpopt(ncopts)
+
+c     create a netCDF named 'test.nc'
+      write(*,100) 'nccre'
+      ncid = nccre(name, NCCLOB, iret)
+
+c     test ncddef
+      write(*,100) 'ncddef'
+      call tncddef(ncid)
+
+c     test ncvdef
+      write(*,100) 'ncvdef'
+      call tncvdef(ncid)
+
+c     test ncapt
+      write(*, 100) 'ncapt, ncaptc'
+      call tncapt(ncid)
+
+c     close 'test.nc'
+      write(*, 100) 'ncclos'
+      call ncclos(ncid, iret)
+
+c     test ncvpt1
+      write(*, 100) 'ncvpt1'
+      call tncvpt1(name)
+
+c     test ncvgt1
+      write(*, 100) 'ncvgt1'
+      call tncvgt1(name)
+
+c     test ncvpt
+      write(*, 100) 'ncvpt'
+      call tncvpt(name)
+
+c     test ncinq
+      write(*, 100) 'ncopn, ncinq, ncdinq, ncvinq, ncanam, ncainq'
+      call tncinq(name)
+
+c     test ncvgt
+      write(*, 100) 'ncvgt, ncvgtc'
+      call tncvgt(name)
+
+c     test ncagt
+      write(*, 100) 'ncagt, ncagtc'
+      call tncagt(name)
+
+c     test ncredf
+      write(*, 100) 'ncredf, ncdren, ncvren, ncaren, ncendf'
+      call tncredf(name)
+
+      call tncinq(name)
+
+c     test ncacpy
+      write(*, 100) 'ncacpy'
+      call tncacpy(name, name2)
+
+c     test ncadel
+      write(*, 100) 'ncadel'
+      call tncadel(name2)
+
+c     test reading from NetCDF file
+      write(*, 100) 'NetCDF read'
+      call tread_netcdf()
+
+
+      end
+c
+c     subroutine to test ncacpy
+c
+      subroutine tncacpy(iname, oname)
+      character*31 iname, oname
+      include 'netcdf.inc'
+      integer ndims, nvars, natts, recdim, iret
+      character*31 vname, attnam
+      integer attype, attlen
+      integer vartyp, nvdims, vdims(MAXVDIMS), nvatts
+      integer lenstr
+c     existing netCDF id
+      integer incdf
+c     netCDF id of the output netCDF file to which the attribute
+c     will be copied
+      integer outcdf
+
+      integer mattlen
+      parameter (mattlen = 80)
+      character*80 charval
+      double precision doubval(2)
+      real flval(2)
+      integer lngval(2)
+      integer*2 shval(2)
+      integer i, j, k
+      character*31 varnam, attname(2,7), gattnam(2)
+      integer*1 bytval(2)
+      common /atts/attname, gattnam
+      integer*2 svalidrg(2)
+      real rvalidrg(2)
+      integer lvalidrg(2)
+      double precision dvalidrg(2)
+      integer*1 bvalidrg(2)
+      character*31 gavalue(2), cavalue(2)
+      real epsilon
+
+      data bvalidrg/1,110/
+      data svalidrg/-100,100/
+      data lvalidrg/0,360/
+      data rvalidrg/0.0, 5000.0/
+      data dvalidrg/0D0,500D0/
+      data gavalue/'NWS', '88/10/25 12:00:00'/
+      data cavalue/'test string', 'a'/
+      data lenstr/80/	
+      data epsilon /.000001/
+
+      incdf = ncopn(iname, NCNOWRIT, iret)
+      outcdf = nccre(oname, NCCLOB, iret)
+      call tncddef(outcdf)
+      call tncvdef(outcdf)
+      call ncinq (incdf, ndims, nvars, natts, recdim, iret)
+      do 5 j = 1, natts
+         call ncanam (incdf, NCGLOBAL, j, attnam, iret)
+         call ncacpy (incdf, NCGLOBAL, attnam, outcdf, NCGLOBAL, iret)
+ 5    continue
+      do 10 i = 1, nvars
+         call ncvinq (incdf, i, vname, vartyp, nvdims,
+     +        vdims, nvatts, iret)
+         do 20 k = 1, nvatts
+            call ncanam (incdf, i, k, attnam, iret)
+            call ncacpy (incdf, i, attnam, outcdf, i, iret)
+ 20      continue
+ 10   continue
+c     
+c     get global attributes first
+c     
+      do 100 i = 1, natts
+         call ncanam (outcdf, NCGLOBAL, i, attnam, iret)
+         call ncainq (outcdf, NCGLOBAL, attnam, attype, attlen,
+     +        iret)
+         if (attlen .gt. mattlen) then
+            write (*,*) 'global attribute too big!', attlen, mattlen
+            stop 'Stopped'
+         else if (attype .eq. NCBYTE) then
+            call ncagt (outcdf, NCBYTE, attnam, bytval, iret)
+         else if (attype .eq. NCCHAR) then
+            call ncagtc (outcdf, NCGLOBAL, attnam, charval, 
+     +           lenstr, iret)
+            if (attnam .ne. gattnam(i)) write(*,*) 'error in ncagt G'
+            if (charval .ne. gavalue(i))
+     + write(*,*) 'error in ncagt G2', lenstr, charval, gavalue(i)
+                  charval = ' '                                   
+         else if (attype .eq. NCSHORT) then
+            call ncagt (outcdf, NCGLOBAL, attnam, shval, iret) 
+         else if (attype .eq. NCLONG) then
+            call ncagt (outcdf, NCGLOBAL, attnam, lngval, iret)            
+         else if (attype .eq. NCFLOAT) then
+            call ncagt (outcdf, NCGLOBAL, attnam, flval, iret)
+         else 
+            call ncagt (outcdf, NCGLOBAL, attnam, doubval,iret)          
+         end if
+ 100   continue
+c
+c     get variable attributes
+c
+      do 200 i = 1, nvars
+         call ncvinq (outcdf, i, varnam, vartyp, nvdims, vdims,
+     +                nvatts, iret)
+         do 250 j = 1, nvatts
+            call ncanam (outcdf, i, j, attnam, iret)
+            call ncainq (outcdf, i, attnam, attype, attlen,
+     +                   iret)
+            if (attlen .gt. mattlen) then
+               write (*,*) 'variable ', i,  'attribute too big !'
+               stop 'Stopped'
+            else 
+               if (attype .eq. NCBYTE) then
+                  call ncagt (outcdf, i, attnam, bytval, 
+     +                 iret)
+                  if (attnam .ne. attname(j,i)) write(*,*)
+     + 'error in ncagt BYTE N'
+                  if (bytval(j) .ne. bvalidrg(j)) write(*,*)
+     + 'ncacpy: byte ', bytval(j), ' .ne. ', bvalidrg(j)
+               else if (attype .eq. NCCHAR) then
+                  call ncagtc (outcdf, i, attnam, charval, 
+     +                 lenstr, iret)
+                  if (attnam .ne. attname(j,i)) write(*,*)
+     + 'error in ncagt CHAR N'
+                  if (charval .ne. cavalue(j)) write(*,*)
+     + 'error in  ncagt'
+                  charval = ' '                                    
+               else if (attype .eq. NCSHORT) then
+                  call ncagt (outcdf, i, attnam, shval, 
+     +                 iret)  
+                  if (attnam .ne. attname(j,i)) write(*,*)
+     + 'error in ncagt SHORT N'
+                  if (shval(j) .ne. svalidrg(j)) then
+                     write(*,*) 'error in ncagt SHORT'
+                  end if
+               else if (attype .eq. NCLONG) then
+                  call ncagt (outcdf, i, attnam, lngval, 
+     +                 iret)
+                  if (attnam .ne. attname(j,i)) write(*,*)
+     + 'error in ncagt LONG N'
+                  if (lngval(j) .ne. lvalidrg(j)) write(*,*)
+     + 'error in ncagt LONG'
+               else if (attype .eq. NCFLOAT) then
+                  call ncagt (outcdf, i, attnam, flval, 
+     +                 iret)            
+                  if (attnam .ne. attname(j,i)) write(*,*)
+     + 'error in ncagt FLOAT N'
+                  if (flval(j) .ne. rvalidrg(j)) write(*,*)
+     + 'error in ncagt FLOAT'
+               else if (attype .eq. NCDOUBLE) then
+                  call ncagt (outcdf, i, attnam, doubval,
+     +                 iret)          
+                  if (attnam .ne. attname(j,i)) write(*,*)
+     + 'error in ncagt DOUBLE N'
+                  if ( abs(doubval(j) - dvalidrg(j)) .gt. epsilon)
+     + write(*,*) 'error in ncagt DOUBLE'
+               end if
+            end if
+ 250     continue
+ 200   continue
+      call ncclos(incdf, iret)
+      call ncclos(outcdf, iret)
+      return
+      end
+
+
+      
+c     
+c     subroutine to test ncadel
+c
+      subroutine tncadel (cdfname)
+      character*31 cdfname
+      include 'netcdf.inc'
+      
+      integer  bid, sid, lid, fid, did, cid, chid
+      common /vars/bid, sid, lid, fid, did, cid, chid
+      integer ncid, iret, i, j
+      integer ndims, nvars, natts, recdim
+      integer vartyp, nvdims, vdims(MAXVDIMS), nvatts
+      character*31 varnam, attnam
+
+      ncid = ncopn(cdfname, NCWRITE, iret)
+c     put cdf in define mode
+      call ncredf (ncid,iret)
+c     get number of global attributes
+      call ncinq (ncid, ndims, nvars, natts, recdim, iret)
+      do 10 i = natts, 1, -1
+c     get name of global attribute
+         call ncanam (ncid, NCGLOBAL, i, attnam, iret)
+c     delete global attribute
+         call ncadel (ncid, NCGLOBAL, attnam, iret)
+ 10   continue
+
+      do 100 i = 1, nvars
+c     get number of variable attributes
+         call ncvinq (ncid, i, varnam, vartyp, nvdims, vdims,
+     +        nvatts, iret)
+         do 200 j = nvatts, 1, -1
+            call ncanam (ncid, i, j, attnam, iret)
+            call ncadel (ncid, i, attnam, iret)
+ 200     continue
+ 100  continue
+      call ncinq (ncid, ndims, nvars, natts, recdim, iret)
+      if (natts .ne. 0) write(*,*) 'error in ncadel'
+c     put netCDF into data mode
+      call ncendf (ncid, iret)
+      call ncclos (ncid, iret)
+      return
+      end
+
+c
+c     subroutine to test ncagt and ncagtc
+
+      subroutine tncagt(cdfname)
+      include 'netcdf.inc'
+      character*31 cdfname
+            
+c     maximum length of an attribute
+      integer mattlen
+      parameter (mattlen = 80)
+      integer ncid, ndims, nvars, natts, recdim
+      integer bid, sid, lid, fid, did, cid, chid
+      common /vars/bid, sid, lid, fid, did, cid, chid
+      integer i, j
+      integer attype, attlen, lenstr, iret
+      character*31 attnam
+      character*80 charval
+      double precision doubval(2)
+      real flval(2)
+      integer lngval(2)
+      integer*2 shval(2)
+      integer*1 bytval(2)
+      integer vartyp, nvdims, vdims(MAXVDIMS), nvatts
+
+      character*31 varnam, attname(2,7), gattnam(2)
+      common /atts/attname, gattnam
+      integer*2 svalidrg(2)
+      real rvalidrg(2)
+      integer lvalidrg(2)
+      double precision dvalidrg(2)
+      integer*1 bvalidrg(2)
+      character*31 gavalue(2), cavalue(2)
+      real epsilon
+
+      data bvalidrg/1,110/
+      data svalidrg/-100,100/
+      data lvalidrg/0,360/
+      data rvalidrg/0.0, 5000.0/
+      data dvalidrg/0D0,500D0/
+      data gavalue/'NWS', '88/10/25 12:00:00'/
+      data cavalue/'test string', 'a'/
+      data lenstr/80/	
+      data epsilon /.000001/
+      
+      ncid = ncopn (cdfname, NCNOWRIT, iret)
+      call ncinq (ncid, ndims, nvars, natts, recdim, iret)
+c     
+c     get global attributes first
+c     
+      do 10 i = 1, natts
+c     get name of attribute
+         call ncanam (ncid, NCGLOBAL, i, attnam, iret)
+c     get attribute type and length
+         call ncainq (ncid, NCGLOBAL, attnam, attype, attlen,
+     +        iret)
+         if (attlen .gt. mattlen) then
+            write (*,*) 'global attribute too big!'
+            stop 'Stopped'
+         else if (attype .eq. NCBYTE) then
+            call ncagt (ncid, NCBYTE, attnam, bytval, iret)
+         else if (attype .eq. NCCHAR) then
+            call ncagtc (ncid, NCGLOBAL, attnam, charval, 
+     +           lenstr, iret)
+            if (attnam .ne. gattnam(i)) write(*,*) 'error in ncagt'
+            if (charval .ne. gavalue(i)) write(*,*) 'error in ncagt'
+            charval = '                                        '
+         else if (attype .eq. NCSHORT) then
+            call ncagt (ncid, NCGLOBAL, attnam, shval, iret) 
+         else if (attype .eq. NCLONG) then
+            call ncagt (ncid, NCGLOBAL, attnam, lngval, iret)            
+         else if (attype .eq. NCFLOAT) then
+            call ncagt (ncid, NCGLOBAL, attnam, flval, iret)
+         else 
+            call ncagt (ncid, NCGLOBAL, attnam, doubval,iret)          
+         end if
+ 10   continue
+
+c
+c     get variable attributes
+c
+      do 20 i = 1, nvars
+         call ncvinq (ncid, i, varnam, vartyp, nvdims, vdims,
+     +                nvatts, iret)
+         do 25 j = 1, nvatts
+            call ncanam (ncid, i, j, attnam, iret)
+            call ncainq (ncid, i, attnam, attype, attlen,
+     +                   iret)
+            if (attlen .gt. mattlen) then
+               write (*,*) 'variable ', i,  'attribute too big !'
+               stop 'Stopped'
+            else 
+               if (attype .eq. NCBYTE) then
+                  call ncagt (ncid, i, attnam, bytval, 
+     +                 iret)
+                  if (attnam .ne. attname(j,i)) write(*,*)
+     + 'error in ncagt BYTE name'
+                  if (bytval(j) .ne. bvalidrg(j)) write(*,*)
+     + 'ncacpy: byte ', bytval(j), ' .ne. ', bvalidrg(j)
+               else if (attype .eq. NCCHAR) then
+                  call ncagtc (ncid, i, attnam, charval, 
+     +                 lenstr, iret)
+                  if (attnam .ne. attname(j,i)) write(*,*)
+     + 'error in ncagt CHAR name'
+                  if (charval .ne. cavalue(j)) write(*,*)
+     + 'error in ncagt CHAR name'
+	         charval = '                                        '
+               else if (attype .eq. NCSHORT) then
+                  call ncagt (ncid, i, attnam, shval, 
+     +                 iret)  
+                  if (attnam .ne. attname(j,i)) write(*,*)
+     + 'error in ncagt SHORT name'
+                  if (shval(j) .ne. svalidrg(j)) then
+                     write(*,*) 'error in ncagt SHORT'
+                  end if
+               else if (attype .eq. NCLONG) then
+                  call ncagt (ncid, i, attnam, lngval, 
+     +                 iret)
+                  if (attnam .ne. attname(j,i)) write(*,*)
+     + 'error in ncagt LONG name'
+                  if (lngval(j) .ne. lvalidrg(j)) write(*,*)
+     + 'error in ncagt LONG'
+               else if (attype .eq. NCFLOAT) then
+                  call ncagt (ncid, i, attnam, flval, 
+     +                 iret)            
+                  if (attnam .ne. attname(j,i)) write(*,*)
+     + 'error in ncagt FLOAT name'
+                  if (flval(j) .ne. rvalidrg(j)) write(*,*)
+     + 'error in ncagt FLOAT'
+               else if (attype .eq. NCDOUBLE) then
+                  call ncagt (ncid, i, attnam, doubval,
+     +                 iret)          
+                  if (attnam .ne. attname(j,i)) write(*,*)
+     + 'error in ncagt DOUBLE name'
+                  if ( abs(doubval(j) - dvalidrg(j)) .gt. epsilon)
+     + write(*,*) 'error in ncagt DOUBLE'
+               end if
+            end if
+ 25      continue
+ 20   continue
+      call ncclos(ncid, iret)
+      return
+      end
+c
+c     subroutine to test ncapt
+c
+      subroutine tncapt (ncid)
+      include 'netcdf.inc'
+      integer ncid, iret
+
+c attribute vectors
+      integer*2 svalidrg(2)
+      real rvalidrg(2)
+      integer lvalidrg(2)
+      double precision dvalidrg(2)
+      integer*1 bvalidrg(2)
+
+c     variable ids
+      integer  bid, sid, lid, fid, did, cid, chid
+      common /vars/bid, sid, lid, fid, did, cid, chid
+
+c assign attributes
+      
+c
+c     byte
+c
+      
+      bvalidrg(1) = 1
+      bvalidrg(2) = 250
+      call ncapt (ncid, bid, 'valid range', NCBYTE, 2,
+     +bvalidrg, iret)
+
+c
+c     short
+c
+
+      svalidrg(1) = -100
+      svalidrg(2) = 100
+      call ncapt (ncid, sid, 'valid range', NCSHORT, 2, 
+     +svalidrg, iret)
+
+c
+c     long
+c
+
+      lvalidrg(1) = 0
+      lvalidrg(2) = 360
+      call ncapt (ncid, lid, 'valid range', NCLONG, 2,
+     +lvalidrg, iret)
+      
+c
+c     float
+c
+
+      rvalidrg(1) = 0.0
+      rvalidrg(2) = 5000.0
+      call ncapt (ncid, fid, 'valid range', NCFLOAT, 2,
+     +rvalidrg, iret)
+
+c
+c     double
+c
+
+      dvalidrg(1) = 0D0
+      dvalidrg(2) = 500D0
+      call ncapt (ncid, did, 'valid range', NCDOUBLE, 2,
+     +dvalidrg, iret)
+
+c
+c     global
+c
+
+      call ncaptc (ncid, NCGLOBAL, 'source', NCCHAR, 3, 
+     +'NWS', iret)
+      call ncaptc (ncid, NCGLOBAL, 'basetime', NCCHAR, 17, 
+     +'88/10/25 12:00:00', iret)
+
+c
+c     char
+c
+
+      call ncaptc (ncid, chid, 'longname', NCCHAR, 11,
+     +'test string', iret)
+
+      call ncaptc (ncid, chid, 'id', NCCHAR, 1,
+     +'a', iret)
+
+      return
+      end
+
+c
+c     initialize variables in labelled common blocks
+c
+      block data
+      common /cdims/ dimnam
+      common /dims/timedim, latdim, londim, leveldim, lendim,
+     + dimsiz
+      common /varn/varnam
+      common /atts/attname, gattnam
+      integer  latdim, londim, leveldim, timedim, lendim
+
+c     should include 'netcdf.inc' for MAXNCDIM, but it has EXTERNAL
+c     declaration, which is not permitted in a BLOCK DATA unit.
+
+c      integer dimsiz(MAXNCDIM)
+      integer dimsiz(32)
+c      character*31 dimnam(MAXNCDIM)
+      character*31 dimnam(32)
+      character*31 varnam(7)
+      character*31 attname(2,7)
+      character*31 gattnam(2)
+
+      data dimnam /'time', 'lat', 'lon', 'level',
+     + 'length', 27*'0'/
+      data dimsiz /4, 5, 5, 4, 80, 27*0/
+      data varnam/'bytev', 'short v', 'longv', 'floatv', 'doublev', 
+     + 'chv', 'cv'/
+      
+      data attname/'valid range', '0', 'valid range',
+     + '0', 'valid range',
+     + '0', 'valid range', '0', 'valid range', '0', 'longname', 'id',
+     + '0', '0'/
+      data gattnam/'source','basetime'/
+      end
+
+
+c
+c     subroutine to test ncddef
+c
+
+      subroutine tncddef(ncid)
+      include 'netcdf.inc'
+      integer ncid
+
+c     sizes of dimensions of 'test.nc' and 'copy.nc'
+      integer  ndims
+      parameter(ndims=5)
+c dimension ids
+      integer  latdim, londim, leveldim, timedim, lendim
+      integer iret
+c     function to define a netCDF dimension
+      integer dimsiz(MAXNCDIM)
+      character*31 dimnam(MAXNCDIM)
+      
+      common /dims/timedim, latdim, londim, leveldim, lendim,
+     + dimsiz
+      common /cdims/ dimnam
+
+c define dimensions
+      timedim = ncddef(ncid, dimnam(1), NCUNLIM, iret)
+      latdim = ncddef(ncid, dimnam(2), dimsiz(2), iret)
+      londim = ncddef(ncid, dimnam(3), dimsiz(3), iret)
+      leveldim = ncddef(ncid, dimnam(4), dimsiz(4), iret)
+      lendim = ncddef(ncid, dimnam(5), dimsiz(5), iret)
+      return
+      end
+c
+c     subroutine to test ncinq, ncdinq, ncdid, ncvinq, ncanam
+c     and ncainq
+c
+      subroutine tncinq(cdfname)
+      include 'netcdf.inc'
+      character*31 cdfname
+
+c     netCDF id
+      integer ncid
+c     returned number of dimensions
+      integer ndims
+c     returned number of variables
+      integer nvars
+c     returned number of global attributes
+      integer natts
+c     returned id of the unlimited dimension
+      integer recdim
+c     returned error code
+      integer iret
+c     returned name of record dimension
+      character*31 recnam
+c     returned size of record dimension
+      integer recsiz
+c     loop control variables
+      integer i, j, k
+c     returned size of dimension
+      integer dsize
+c     returned dimension ID
+      integer dimid
+c     returned dimension name
+      character*31 dname
+c     returned variable name
+      character*31 vname
+c     returned attribute name
+      character*31 attnam
+c     returned netCDF datatype of variable
+      integer vartyp
+c     returned number of variable dimensions
+      integer nvdims
+c     returned number of variable attributes
+      integer nvatts
+c     returned vector of nvdims dimension IDS corresponding to the
+c     variable dimensions
+      integer vdims(MAXNCDIM)
+c     returned attribute length
+      integer attlen
+c     returned attribute type
+      integer attype
+      character*31 dimnam(MAXNCDIM)
+      character*31 varnam(7)
+      character*31 attname(2,7)
+      character*31 gattnam(2)
+      integer vdlist(5,7), vtyp(7), vndims(7), vnatts(7)
+      integer attyp(2,7),atlen(2,7),gattyp(2),gatlen(2)
+      integer timedim,latdim,londim,leveldim,lendim
+      integer dimsiz(MAXNCDIM)
+      common /dims/timedim, latdim, londim, leveldim, lendim,
+     + dimsiz
+      common /varn/varnam
+      common /atts/attname, gattnam
+      common /cdims/ dimnam
+
+      data vdlist/1,0,0,0,0,1,0,0,0,0,2,0,0,0,0,4,3,2,1,0,4,3,2,1,0,
+     + 5,1,0,0,0,1,0,0,0,0/
+      data vtyp/NCBYTE, NCSHORT, NCLONG, NCFLOAT, NCDOUBLE, NCCHAR,
+     + NCCHAR/
+      data vndims/1,1,1,4,4,2,1/
+      data vnatts/1,1,1,1,1,2,0/
+      data attyp/NCBYTE, 0, NCSHORT, 0, NCLONG, 0, NCFLOAT, 0,
+     + NCDOUBLE, 0, NCCHAR, NCCHAR, 0, 0/
+      data atlen/2,0,2,0,2,0,2,0,2,0,11,1, 0, 0/
+      data gattyp/NCCHAR,NCCHAR/
+      data gatlen/3,17/
+
+      ncid = ncopn (cdfname, NCNOWRIT, iret)
+      call ncinq (ncid, ndims, nvars, natts, recdim, iret)
+      if (ndims .ne. 5) write(*,*) 'error in ncinq or ncddef'
+      if (nvars .ne. 7) write(*,*) 'error in ncinq or ncvdef'
+      if (natts .ne. 2) write(*,*) 'error in ncinq or ncapt'
+      call ncdinq (ncid, recdim, recnam, recsiz, iret)
+      if (recnam .ne. 'time') write(*,*) 'error: bad recdim from ncinq'
+c
+c     dimensions
+c
+      do 10 i = 1, ndims
+         call ncdinq (ncid, i, dname, dsize, iret)
+         if (dname .ne. dimnam(i)) write(*,*)
+     + 'error in ncdinq or  ncddef, dname=', dname
+         if (dsize .ne. dimsiz(i)) write(*,*)
+     + 'error in ncdinq or ncddef, dsize=',dsize
+         dimid = ncdid (ncid, dname, iret)
+         if (dimid .ne. i) write(*,*)
+     +      'error in ncdinq or ncddef, dimid=', dimid
+ 10   continue
+c
+c     variables
+c
+      do 30 i = 1, nvars
+         call ncvinq (ncid, i, vname, vartyp, nvdims,
+     +        vdims, nvatts, iret)
+         if (vname .ne. varnam(i)) write(*,*)
+     + 'error: from ncvinq, wrong name returned: ', vname,
+     + ' .ne. ', varnam(i)
+         if (vartyp .ne. vtyp(i)) write(*,*)
+     + 'error: from ncvinq, wrong type returned: ', vartyp,
+     + ' .ne. ', vtyp(i)
+         if (nvdims .ne. vndims(i)) write(*,*)
+     + 'error: from ncvinq, wrong num dims returned: ', vdims,
+     + ' .ne. ', vndims(i)
+         do 35 j = 1, nvdims
+            if (vdims(j) .ne. vdlist(j,i)) write(*,*)
+     + 'error: from ncvinq wrong dimids: ', vdims(j),
+     + ' .ne. ', vdlist(j,i)
+ 35      continue
+         if (nvatts .ne. vnatts(i)) write(*,*)
+     + 'error in ncvinq or ncvdef'
+c
+c     attributes
+c
+         do 45 k = 1, nvatts
+            call ncanam (ncid, i, k, attnam, iret)
+            call ncainq (ncid, i, attnam, attype, attlen, iret)
+            if (attnam .ne. attname(k,i)) write(*,*)
+     + 'error in ncanam or ncapt'
+            if (attype .ne. attyp(k,i)) write(*,*)
+     + 'error in ncainq or ncapt'
+            if (attlen .ne. atlen(k,i)) write(*,*)
+     + 'error in ncainq or ncapt'
+ 45      continue
+ 30   continue
+      do 40 i = 1, natts
+         call ncanam (ncid, NCGLOBAL, i, attnam, iret)
+         call ncainq (ncid, NCGLOBAL, attnam, attype, attlen, iret)
+         if (attnam .ne. gattnam(i)) write(*,*)
+     + 'error in ncanam or ncapt'
+         if (attype .ne. gattyp(i)) write(*,*)
+     + 'error in ncainq or ncapt'
+         if (attlen .ne. gatlen(i)) write(*,*)
+     + 'error in ncainq or ncapt'
+ 40   continue
+      call ncclos(ncid, iret)
+      return
+      end
+      
+      
+      
+c     subroutine to test ncredf, ncdren, ncvren, ncaren, and 
+c     ncendf
+
+      subroutine tncredf(cdfname)
+      include 'netcdf.inc'
+      character*31 cdfname
+      character*31 attname(2,7)
+      character*31 gattnam(2)
+      common /atts/attname, gattnam
+      common /cdims/ dimnam
+      character*31 dimnam(MAXNCDIM)
+      character*31 varnam(7)
+      common /varn/varnam
+      integer ncid, iret, latid, varid
+
+      dimnam(2) = 'latitude'
+      varnam(4) = 'realv'
+      attname(1,6) = 'stringname'
+      gattnam(1) = 'agency'
+      ncid = ncopn(cdfname, NCWRITE, iret)
+      call ncredf(ncid, iret)
+      latid = ncdid(ncid, 'lat', iret)
+      call ncdren(ncid, latid, 'latitude', iret)
+      varid = ncvid(ncid, 'floatv', iret)
+      call ncvren(ncid, varid, 'realv', iret)
+      varid = ncvid(ncid, 'chv', iret)
+      call ncaren(ncid, varid, 'longname', 'stringname', iret)
+      call ncaren(ncid, NCGLOBAL, 'source', 'agency', iret)
+      call ncendf(ncid, iret)
+      call ncclos(ncid, iret)
+      return
+      end
+c     
+c     subroutine to test ncvdef
+c
+
+      subroutine tncvdef(ncid)
+      include 'netcdf.inc'
+      integer ncid
+
+c     function to define a netCDF variable
+      integer dimsiz(MAXNCDIM)
+      integer  latdim, londim, leveldim, timedim, lendim
+      common /dims/timedim, latdim, londim, leveldim, lendim, 
+     + dimsiz
+
+c variable ids
+      integer  bid, sid, lid, fid, did, cid, chid
+      common /vars/bid, sid, lid, fid, did, cid, chid
+
+c variable shapes
+      integer  bdims(1), fdims(4), ddims(4), ldims(1), sdims(1) 
+      integer chdims(2), cdims(1)
+
+      integer iret
+c
+c define variables
+c
+c     byte
+c 
+      bdims(1) = timedim
+      bid = ncvdef(ncid, 'bytev', NCBYTE, 1, bdims, iret)
+c
+c     short
+c
+      sdims(1) = timedim
+      sid = ncvdef (ncid, 'short v', NCSHORT, 1, sdims, iret)
+c
+c     long
+c
+      ldims(1) = latdim
+      lid = ncvdef (ncid, 'longv', NCLONG, 1, ldims, iret)
+c
+c     float
+c
+      fdims(4) = timedim
+      fdims(1) = leveldim
+      fdims(2) = londim
+      fdims(3) = latdim
+      fid = ncvdef (ncid, 'floatv', NCFLOAT, 4, fdims, iret)
+c
+c     double
+c
+      ddims(4) = timedim
+      ddims(1) = leveldim
+      ddims(2) = londim
+      ddims(3) = latdim
+      did = ncvdef (ncid, 'doublev', NCDOUBLE, 4, ddims, iret)
+c
+c     char
+c
+      chdims(2) = timedim
+      chdims(1) = lendim
+      chid = ncvdef (ncid, 'chv', NCCHAR, 2, chdims, iret)
+
+      cdims(1) = timedim
+      cid = ncvdef (ncid, 'cv', NCCHAR, 1, cdims, iret)
+
+
+      return
+      end
+
+
+c    
+c     subroutine to test ncvgt and ncvgtc
+c
+      subroutine tncvgt(cdfname)
+      include 'netcdf.inc'
+      character*31 cdfname
+
+      integer ndims, times, lats, lons, levels, lenstr
+      parameter (times=4, lats=5, lons=5, levels=4)
+
+      integer start(MAXNCDIM), count(MAXNCDIM)
+      integer ncid, iret, i, m
+      integer  latdim, londim, leveldim, timedim, lendim
+      integer dimsiz(MAXNCDIM)
+      common /dims/timedim, latdim, londim, leveldim, lendim,
+     + dimsiz
+
+      integer bid, sid, lid, fid, did, cid, chid
+      common /vars/bid, sid, lid, fid, did, cid, chid
+      integer itime, ilev, ilat, ilon
+
+c     arrays of data values to be read
+      integer*1 barray(times), byval(times)
+      integer*2 sarray(times), shval(times)
+      integer larray(lats)
+      real farray(levels, lats, lons, times)
+      double precision darray(levels, lats, lons, times)
+c     character array of data values to be read
+      character*31 string
+      character*31 varnam
+      integer nvars, natts, recdim
+      integer vartyp, nvdims, vdims(MAXVDIMS), nvatts
+
+      data start/1,1,1,1, 28*0/, count/levels, lats, lons, times, 28*0/
+      data byval /97, 98, 99, 100/
+      data shval /10, 11, 12, 13/
+
+      ncid = ncopn (cdfname, NCWRITE, iret)
+c     get number of variables in netCDF
+      call ncinq (ncid, ndims, nvars, natts, recdim, iret)
+      do 5 m = 1, nvars-1
+c     get variable name, datatype, number of dimensions
+c     vector of dimension ids, and number of variable attributes
+         call ncvinq (ncid, m, varnam, vartyp, nvdims, vdims,
+     +                nvatts, iret)
+         if (vartyp .eq. NCBYTE) then
+c
+c     byte
+c
+            count(1) = times
+            call ncvgt (ncid, m, start, count, barray, iret)
+            do 10 i = 1, times
+               if (barray(i) .ne. byval(i)) then 
+                  write(*,*) 'ncvgt of bytes, got ', barray(i), ' .ne. '
+     +			     , byval(i)
+               end if
+ 10         continue
+         else if (vartyp .eq. NCSHORT) then
+c
+c     short
+c
+            count(1) = times
+            call ncvgt (ncid, m, start, count, sarray, iret)
+            do 20 i = 1, times
+               if (sarray(i) .ne. shval(i)) then 
+                  write(*,*) 'ncvgt of short, got ', sarray(i), ' .ne. '
+     +			     , shval(i)
+               end if
+ 20         continue
+         else if (vartyp .eq. NCLONG) then
+c     
+c     long
+c
+            count(1) = lats
+            call ncvgt (ncid, m, start, count, larray, iret)
+            do 30 i = 1, lats
+               if (larray(i) .ne. 1000) then 
+                  write(*,*) 'long error in ncvgt'
+               end if
+ 30         continue
+         else if (vartyp .eq. NCFLOAT) then
+c     
+c     float
+c
+            count(1) = levels
+            call ncvgt (ncid, m, start, count, farray, iret)
+            i = 0
+            do 40 itime = 1,times
+               do 40 ilon = 1, lons
+                  do 40 ilat = 1, lats
+                     do 40 ilev = 1, levels
+                        i = i + 1
+                        if (farray(ilev, ilat, ilon, itime) .ne.
+     + real(i)) then
+                           write (*,*) 'float error in ncvgt'
+                        end if
+ 40         continue
+         else if (vartyp .eq. NCDOUBLE) then
+c
+c     double
+c
+            count(1) = levels
+            call ncvgt (ncid, m, start, count, darray, iret)
+            i = 0
+            do 50 itime = 1, times
+               do 50 ilon = 1, lons
+                  do 50 ilat = 1, lats
+                     do 50 ilev = 1, levels
+                        i = i + 1
+                        if (darray(ilev, ilat, ilon, itime) .ne.
+     +                       real(i)) then
+                           write(*,*) 'double error in ncvgt:', i,
+     +              darray(ilev, ilat, ilon, itime), '.ne.', real(i)
+                        end if
+ 50         continue
+         else 
+c     
+c     char
+c
+	    count(1) = 3
+	    count(2) = 4
+	    lenstr = 31
+            call ncvgtc (ncid, m, start, count, string, lenstr, iret)
+            if (string .ne. 'testhikin of') then 
+               write(*,*) 'error in ncvgt, returned string =', string
+            end if
+         end if
+ 5    continue
+      call ncclos(ncid, iret)
+      return
+      end
+
+      
+      subroutine tncvgt1(cdfname)
+      include 'netcdf.inc'
+      character*31 cdfname
+
+      integer ncid, iret
+      integer  latdim, londim, leveldim, timedim, lendim
+      integer dimsiz(MAXNCDIM)
+      common /dims/timedim, latdim, londim, leveldim, lendim,
+     + dimsiz
+
+      integer bindx, sindx, lindx, findx(4), dindx(4), cindx
+
+      integer bid, sid, lid, fid, did, cid, chid
+      common /vars/bid, sid, lid, fid, did, cid, chid
+
+      integer*1 bvalue
+      integer*2 svalue
+      integer lvalue
+      real fvalue
+      double precision dvalue
+      character*1 c
+      real epsilon
+      double precision onethird
+
+      data epsilon /.000001/
+      data lindx/1/, bindx/1/, sindx/1/, findx/1,1,1,1/
+     +dindx/1,1,1,1/, cindx/1/
+      data onethird/0.3333333333D0/
+      
+      ncid = ncopn (cdfname, NCNOWRIT, iret)
+c
+c     test ncvgt1 for byte
+c
+      call ncvgt1 (ncid, bid, bindx, bvalue, iret)
+      if (bvalue .ne. ichar('z')) write(*,*) 'error in ncvgt1 byte:',
+     + bvalue, ' .ne.', ichar('z')
+c
+c     test ncvgt1 for short
+c
+      call ncvgt1 (ncid, sid, sindx, svalue, iret)
+      if (svalue .ne. 10) write(*,*) 'error in ncvgt1 short:',
+     + svalue, ' .ne.', 10
+c     
+c     test ncvgt1 for long
+c
+      call ncvgt1 (ncid, lid, lindx, lvalue, iret)
+      if (lvalue .ne. 1000) write(*,*) 'error in ncvgt1 long:',
+     + lvalue,  ' .ne.', 1000
+c
+c     test ncvgt1 for float
+c
+      call ncvgt1 (ncid, fid, findx, fvalue, iret)
+      if (abs(fvalue - 3.14159) .gt. epsilon) write(*,*)
+     + 'error in ncvgt1 float:', fvalue, ' not close to', 3.14159
+c
+c     test ncvgt1 for double
+c
+      call ncvgt1 (ncid, did, dindx, dvalue, iret)
+      if (abs(dvalue - onethird) .gt. epsilon) write(*,*)
+     + 'error in ncvgt1 double:', dvalue, ' not close to',
+     +     onethird
+c
+c     test ncvg1c for char
+c
+      call ncvg1c (ncid, cid, cindx, c, iret)
+      if (c .ne. 'a') write(*,*) 'error in ncvg1c'
+      call ncclos(ncid, iret)
+      return
+      end
+
+      
+      
+c
+c     subroutine to test ncvpt and ncvptc
+c
+      subroutine tncvpt(cdfname)
+      include 'netcdf.inc'
+      character*31 cdfname
+
+c     size of dimensions
+      integer times, lats, lons, levels
+      parameter (times=4, lats=5, lons=5, levels=4)
+
+      integer ncid, iret
+c     loop control variables
+      integer itime, ilev, ilon, ilat, i
+      integer  latdim, londim, leveldim, timedim, lendim
+      integer dimsiz(MAXNCDIM)
+      common /dims/timedim, latdim, londim, leveldim, lendim,
+     + dimsiz
+      integer lenstr
+      integer bid, sid, lid, fid, did, cid, chid
+      common /vars/bid, sid, lid, fid, did, cid, chid
+
+c     vector of integers specifying the corner of the  hypercube
+c     where the first of the data values will be written
+      integer start(MAXNCDIM)
+c     vector of integers specifying the edge lengths from the
+c     corner of the hypercube where the first of the data values
+c     will be written
+      integer count(MAXNCDIM)
+
+c     arrays of data values to be written
+      integer*1 barray(times)
+      integer*2 sarray(times)
+      integer larray(lats)
+      real farray(levels, lats, lons, times)
+      double precision darray(levels, lats, lons, times)
+      character*31 string
+
+      data start/1,1,1,1, 28*0/, count/levels, lats, lons, times, 28*0/
+      data barray /97, 98, 99, 100/
+      data sarray /10, 11, 12, 13/
+
+      ncid = ncopn (cdfname, NCWRITE, iret)
+
+c
+c     byte
+c
+      count(1) = times
+      call ncvpt (ncid, bid, start, count, barray, iret)
+c
+c     short
+c
+      count(1) = times
+      call ncvpt (ncid, sid, start, count, sarray, iret)
+c
+c     long
+c
+      do 30 i = 1,lats
+         larray(i) = 1000
+ 30   continue
+      count(1) = lats
+      call ncvpt (ncid, lid, start, count, larray, iret)
+c
+c     float
+c
+      i = 0
+      do 40 itime = 1,times
+         do 40 ilon = 1, lons
+            do 40 ilat = 1, lats
+               do 40 ilev = 1, levels
+                  i = i + 1
+                  farray(ilev, ilat, ilon, itime) = real(i)
+ 40   continue
+      count(1) = levels
+      call ncvpt (ncid, fid, start, count, farray, iret)
+c
+c     double
+c
+      i = 0
+      do 50 itime = 1, times
+         do 50 ilon = 1, lons
+            do 50 ilat = 1, lats
+               do 50 ilev = 1, levels
+                  i = i + 1
+                  darray(ilev, ilat, ilon, itime) = real(i)
+ 50   continue
+      count(1) = levels
+      call ncvpt (ncid, did, start, count, darray, iret)
+c
+c     char
+c
+      start(1) = 1
+      start(2) = 1
+      count(1) = 4
+      count(2) = 4
+      lenstr = 31	
+      string = 'testthiskind of '
+      call ncvptc (ncid, chid,start, count, string, lenstr, iret)
+      call ncclos(ncid, iret)
+      return
+      end
+
+      
+      subroutine tncvpt1(cdfname)
+      include 'netcdf.inc'
+      character*31 cdfname
+
+
+      integer iret, ncid
+      integer  latdim, londim, leveldim, timedim, lendim
+      integer dimsiz(MAXNCDIM)
+      common /dims/timedim, latdim, londim, leveldim, lendim, 
+     + dimsiz
+
+      integer bindx, sindx, lindx, findx(4), dindx(4), cindx
+
+      integer lvalue
+      integer*2 svalue
+      integer*1 bvalue
+      double precision onethird
+      integer bid, sid, lid, fid, did, cid, chid
+      common /vars/bid, sid, lid, fid, did, cid, chid
+      data lindx/1/, bindx/1/, sindx/1/, findx/1,1,1,1/
+     +dindx/1,1,1,1/, cindx/1/
+      data lvalue /1000/
+      data svalue/10/
+      data onethird/0.3333333333D0/
+
+      bvalue = ichar('z')
+      
+      ncid = ncopn (cdfname, NCWRITE, iret)
+c
+c     test ncvpt1 for byte
+c
+      call ncvpt1 (ncid, bid, bindx, bvalue, iret)
+c
+c     test ncvpt1 for short
+c
+      call ncvpt1 (ncid, sid, sindx, svalue, iret)
+c     
+c     test ncvpt1 for long
+c
+      call ncvpt1 (ncid, lid, lindx, lvalue, iret)
+c
+c     test ncvpt1 for float
+c
+      call ncvpt1 (ncid, fid, findx, 3.14159, iret)
+c
+c     test ncvpt1 for double
+c
+      call ncvpt1 (ncid, did, dindx, onethird, iret)
+c
+c     test ncvp1c for char
+c
+      call ncvp1c (ncid, cid, cindx, 'a', iret)
+      call ncclos (ncid, iret)
+      return
+      end
+
+C        This routine reads varaibales and global attributes from
+C        the REAL NetCDF file test_nc.nc. The file was created by NetCDF v3.5 
+C        from the file test_nc.cdl that can be found in the mfhdf/fortran
+C        directory. Please do not generate test_nc.nc file from the test_nc.cdl
+C        using HDF4 ncgen. HDF4 ncgen generated HDF4 file!
+
+         subroutine tread_netcdf()
+         include 'netcdf.inc'
+
+C        Variables declarations
+
+         character*10 FILENAME
+         character*1024 new_filename
+         integer filename_len
+         integer status, ncid, var_id
+         integer time(12), date(12), start(3), count(3), int_attr(5)
+         real a(3,2), float_attr(3)
+         double precision c(3), double_attr(3)
+         integer*2 b(2,3,12), short_attr(2)
+         integer i, j, k, dlen
+         character*10 description
+
+C        Arrays to read data to.
+
+         integer time_val(12), date_val(12), int_attr_val(5)
+         integer*2 b_val(2,3,12), short_attr_val(2)
+         real a_val(3,2), float_attr_val(3)
+         double precision c_val(3), double_attr_val(3)
+         real epsilon
+         double precision depsilon
+         integer external fixname
+
+C        Arrays initialization
+         DATA time_val /1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12/
+         DATA date_val /840116, 840214, 840316, 840415, 840516, 840615, 
+     +              840716, 840816, 840915, 841016, 841115, 841216/
+         DATA a_val /1.0, 2.0, 3.0, 4.0, 5.0, 6.0/
+         DATA b_val /1, 1, 2, 2, 3, 3,
+     +           4, 4, 5, 5, 6, 6,
+     +           7, 7, 8, 8, 9, 9,
+     +           10, 10, 11, 11, 12, 12,
+     +           13, 13, 14, 14, 15, 15,
+     +           16, 16, 17, 17, 18, 18,
+     +           19, 19, 20, 20, 21, 22,
+     +           23, 23, 24, 24, 25, 25, 
+     +           26, 26, 27, 27, 28, 28,
+     +           29, 29, 30, 30, 31, 31,
+     +           32, 32, 33, 33, 34, 34,
+     +           35, 35, 36, 36, 37, 37/
+         DATA c_val /2.0, 3.0, 100/
+         DATA int_attr_val /-100, 200, -300, 400, -500/
+         DATA float_attr_val /1.0, 2.0, 3.0/
+         DATA short_attr_val /0, 1/
+         DATA double_attr_val /-1.0, 2.0, -7.0/
+         DATA epsilon /1.E-6/
+         DATA depsilon /1.E-12/
+         
+C        Modify filename to accomodate SRCDIR configure option
+
+         FILENAME = 'test_nc.nc'
+         filename_len = len(new_filename)
+         call fixname(FILENAME, new_filename, filename_len)
+
+         dlen = 10
+         ncid = ncopn(new_filename(1:filename_len), NCNOWRIT, status)
+         if (status .ne.0) then
+             write(*,*) 'ncopn failed'
+             goto 1000
+         endif
+
+         var_id = ncvid(ncid, 'time', status)
+         start(1) = 1 
+         count(1) = 12
+         call ncvgt(ncid, var_id, start, count, time, status)
+         if (status .ne. 0) write(*,*) 
+     +      'ncvgt failed for 32-bit integer variable time'
+         do i = 1, 12
+            if( time(i) .ne. time_val(i) ) 
+     +      write(*,*) 'Wrong time value at index  ', i 
+         enddo
+
+         var_id = ncvid(ncid, 'c', status)
+         start(1) = 1 
+         count(1) = 3
+         call ncvgt(ncid, var_id, start, count, c, status)
+         if (status .ne. 0) write(*,*)
+     +      'ncvgt failed for 64-bit float variable c'
+         do i = 1, 3
+            if( abs(c(i) - c_val(i)) .gt. depsilon ) 
+     +      write(*,*) 'Wrong c value at index  ', i 
+         enddo
+
+         var_id = ncvid(ncid, 'date', status)
+         start(1) = 1 
+         count(1) = 12
+         call ncvgt(ncid, var_id, start, count, date, status)
+         if (status .ne. 0) write(*,*) 
+     +      'ncvgt failed for 32-bit integer variable date'
+         do i = 1, 12
+            if( date(i) .ne. date_val(i) ) 
+     +      write(*,*) 'Wrong date value at index  ', i 
+         enddo
+
+
+         var_id = ncvid(ncid, 'a', status)
+         start(1) = 1 
+         start(2) = 1
+         count(1) = 3
+         count(2) = 2
+         call ncvgt(ncid, var_id, start, count, a, status)
+         if (status .ne. 0) write(*,*) 
+     +      'ncvgt failed for 32-bit real variable a'
+         do i = 1, 2
+            do j = 1, 3 
+            if( abs(a(j,i) - a_val(j,i)) .gt. epsilon ) 
+     +      write(*,*) 'Wrong a value at indecies  ', j, ',', i 
+            enddo
+         enddo
+
+
+         var_id = ncvid(ncid, 'b', status)
+         start(1) = 1 
+         start(2) = 1
+         start(3) = 1
+         count(1) = 2 
+         count(2) = 3
+         count(3) = 12
+         call ncvgt(ncid, var_id, start, count, b, status)
+         if (status .ne. 0) write(*,*) 
+     +      'ncvgt failed for 16-bit integer variable b'
+         do i = 1, 12
+            do j = 1, 3 
+               do k = 1, 2
+               if( b(k,j,i) .ne.  b_val(k,j,i)) 
+     +         write(*,*) 
+     +        'Wrong b value at indecies  ', k, ',', j, ',', i 
+               enddo
+            enddo
+         enddo
+
+
+C read global attributes
+
+         call ncagt(ncid, NCGLOBAL, 'int_attr', int_attr, status)
+         if (status .ne. 0) 
+     +   write(*,*) 'ncagt failed for 32-bit integer attribute int_attr'
+         do i = 1, 5
+            if( int_attr(i) .ne. int_attr_val(i) ) 
+     +      write(*,*) 'Wrong int_attr value at index  ', i 
+         enddo
+
+
+         call ncagt(ncid, NCGLOBAL, 'float_attr', float_attr, status)
+         if (status .ne. 0) 
+     +   write(*,*) 'ncagt failed for 32-bit float attribute float_attr'
+         do i = 1, 3 
+            if( abs(float_attr(i) - float_attr_val(i)) .gt. epsilon ) 
+     +      write(*,*) 'Wrong float_attr value at index  ', i 
+         enddo
+
+         call ncagt(ncid, NCGLOBAL, 'double_attr', double_attr, status)
+         if (status .ne. 0) 
+     +   write(*,*) 
+     +   'ncagt failed for 64-bit float attribute double_attr'
+         do i = 1, 3 
+            if( abs(double_attr(i) - double_attr_val(i)) .gt. depsilon ) 
+     +      write(*,*) 'Wrong double_attr value at index  ', i 
+         enddo
+
+
+         call ncagt(ncid, NCGLOBAL, 'short_attr', short_attr, status)
+         if (status .ne. 0) 
+     +   write(*,*) 
+     +   'ncagt failed for 16-bit integer attribute double_attr'
+         do i = 1, 2 
+            if( short_attr(i) .ne. short_attr_val(i) ) 
+     +      write(*,*) 'Wrong short_attr value at index  ', i 
+         enddo
+
+
+         call ncagtc(ncid, NCGLOBAL, 'Description', description, 
+     +               dlen, status)
+         if (status .ne. 0) 
+     +   write(*,*) 
+     +   'ncagt failed for character attribute Description'
+         if (description .ne. 'Attributes') 
+     +   write(*,*) 'Wrong values of the character attribute' 
+
+
+1000     continue
+         return
+         end

Modified: packages/libhdf4/branches/upstream/current/mfhdf/fortran/config/ftest-convex.f
===================================================================
--- packages/libhdf4/branches/upstream/current/mfhdf/fortran/config/ftest-convex.f	2007-05-15 09:05:29 UTC (rev 830)
+++ packages/libhdf4/branches/upstream/current/mfhdf/fortran/config/ftest-convex.f	2007-05-15 09:53:05 UTC (rev 831)
@@ -1,7 +1,7 @@
 c********************************************************************
 c   Copyright 1993, UCAR/Unidata
 c   See netcdf/COPYRIGHT file for copying and redistribution conditions.
-c   $Id: ftest-convex.f,v 1.3 1998/01/17 00:30:50 epourmal Exp $
+c   $Id: ftest-convex.f,v 1.4 2005/02/09 03:04:03 epourmal Exp $
 c********************************************************************/
 
 
@@ -479,7 +479,7 @@
       
       bvalidrg(1) = 1
       bvalidrg(2) = 250
-      call ncapt (ncid, bid, 'validrange', NCBYTE, 2,
+      call ncapt (ncid, bid, 'valid range', NCBYTE, 2,
      +bvalidrg, iret)
 
 c
@@ -488,7 +488,7 @@
 
       svalidrg(1) = -100
       svalidrg(2) = 100
-      call ncapt (ncid, sid, 'validrange', NCSHORT, 2, 
+      call ncapt (ncid, sid, 'valid range', NCSHORT, 2, 
      +svalidrg, iret)
 
 c
@@ -497,7 +497,7 @@
 
       lvalidrg(1) = 0
       lvalidrg(2) = 360
-      call ncapt (ncid, lid, 'validrange', NCLONG, 2,
+      call ncapt (ncid, lid, 'valid range', NCLONG, 2,
      +lvalidrg, iret)
       
 c
@@ -506,7 +506,7 @@
 
       rvalidrg(1) = 0.0
       rvalidrg(2) = 5000.0
-      call ncapt (ncid, fid, 'validrange', NCFLOAT, 2,
+      call ncapt (ncid, fid, 'valid range', NCFLOAT, 2,
      +rvalidrg, iret)
 
 c
@@ -515,7 +515,7 @@
 
       dvalidrg(1) = 0D0
       dvalidrg(2) = 500D0
-      call ncapt (ncid, did, 'validrange', NCDOUBLE, 2,
+      call ncapt (ncid, did, 'valid range', NCDOUBLE, 2,
      +dvalidrg, iret)
 
 c
@@ -565,11 +565,12 @@
       data dimnam /'time', 'lat', 'lon', 'level',
      + 'length', 27*'0'/
       data dimsiz /4, 5, 5, 4, 80, 27*0/
-      data varnam/'bytev', 'shortv', 'longv', 'floatv', 'doublev', 
+      data varnam/'bytev', 'short v', 'longv', 'floatv', 'doublev', 
      + 'chv', 'cv'/
       
-      data attname/'validrange', '0', 'validrange', '0', 'validrange',
-     + '0', 'validrange', '0', 'validrange', '0', 'longname', 'id',
+      data attname/'valid range', '0', 'valid range',
+     + '0', 'valid range',
+     + '0', 'valid range', '0', 'valid range', '0', 'longname', 'id',
      + '0', '0'/
       data gattnam/'source','basetime'/
       end
@@ -818,7 +819,7 @@
 c     short
 c
       sdims(1) = timedim
-      sid = ncvdef (ncid, 'shortv', NCSHORT, 1, sdims, iret)
+      sid = ncvdef (ncid, 'short v', NCSHORT, 1, sdims, iret)
 c
 c     long
 c

Modified: packages/libhdf4/branches/upstream/current/mfhdf/fortran/config/ftest-dec.f
===================================================================
--- packages/libhdf4/branches/upstream/current/mfhdf/fortran/config/ftest-dec.f	2007-05-15 09:05:29 UTC (rev 830)
+++ packages/libhdf4/branches/upstream/current/mfhdf/fortran/config/ftest-dec.f	2007-05-15 09:53:05 UTC (rev 831)
@@ -1,7 +1,7 @@
 c********************************************************************
 c   Copyright 1993, UCAR/Unidata
 c   See netcdf/COPYRIGHT file for copying and redistribution conditions.
-c   $Id: ftest-dec.f,v 1.3 1998/01/17 00:25:00 epourmal Exp $
+c   $Id: ftest-dec.f,v 1.4 2005/02/09 03:04:03 epourmal Exp $
 c********************************************************************/
 
 
@@ -479,7 +479,7 @@
       
       bvalidrg(1) = 1
       bvalidrg(2) = 250
-      call ncapt (ncid, bid, 'validrange', NCBYTE, 2,
+      call ncapt (ncid, bid, 'valid range', NCBYTE, 2,
      +bvalidrg, iret)
 
 c
@@ -488,7 +488,7 @@
 
       svalidrg(1) = -100
       svalidrg(2) = 100
-      call ncapt (ncid, sid, 'validrange', NCSHORT, 2, 
+      call ncapt (ncid, sid, 'valid range', NCSHORT, 2, 
      +svalidrg, iret)
 
 c
@@ -497,7 +497,7 @@
 
       lvalidrg(1) = 0
       lvalidrg(2) = 360
-      call ncapt (ncid, lid, 'validrange', NCLONG, 2,
+      call ncapt (ncid, lid, 'valid range', NCLONG, 2,
      +lvalidrg, iret)
       
 c
@@ -506,7 +506,7 @@
 
       rvalidrg(1) = 0.0
       rvalidrg(2) = 5000.0
-      call ncapt (ncid, fid, 'validrange', NCFLOAT, 2,
+      call ncapt (ncid, fid, 'valid range', NCFLOAT, 2,
      +rvalidrg, iret)
 
 c
@@ -515,7 +515,7 @@
 
       dvalidrg(1) = 0D0
       dvalidrg(2) = 500D0
-      call ncapt (ncid, did, 'validrange', NCDOUBLE, 2,
+      call ncapt (ncid, did, 'valid range', NCDOUBLE, 2,
      +dvalidrg, iret)
 
 c
@@ -565,11 +565,12 @@
       data dimnam /'time', 'lat', 'lon', 'level',
      + 'length', 27*'0'/
       data dimsiz /4, 5, 5, 4, 80, 27*0/
-      data varnam/'bytev', 'shortv', 'longv', 'floatv', 'doublev', 
+      data varnam/'bytev', 'short v', 'longv', 'floatv', 'doublev', 
      + 'chv', 'cv'/
       
-      data attname/'validrange', '0', 'validrange', '0', 'validrange',
-     + '0', 'validrange', '0', 'validrange', '0', 'longname', 'id',
+      data attname/'valid range', '0', 'valid range',
+     + '0', 'valid range',
+     + '0', 'valid range', '0', 'valid range', '0', 'longname', 'id',
      + '0', '0'/
       data gattnam/'source','basetime'/
       end
@@ -818,7 +819,7 @@
 c     short
 c
       sdims(1) = timedim
-      sid = ncvdef (ncid, 'shortv', NCSHORT, 1, sdims, iret)
+      sid = ncvdef (ncid, 'short v', NCSHORT, 1, sdims, iret)
 c
 c     long
 c

Modified: packages/libhdf4/branches/upstream/current/mfhdf/fortran/config/ftest-fbsd.f
===================================================================
--- packages/libhdf4/branches/upstream/current/mfhdf/fortran/config/ftest-fbsd.f	2007-05-15 09:05:29 UTC (rev 830)
+++ packages/libhdf4/branches/upstream/current/mfhdf/fortran/config/ftest-fbsd.f	2007-05-15 09:53:05 UTC (rev 831)
@@ -1,7 +1,7 @@
 c********************************************************************
 c   Copyright 1993, UCAR/Unidata
 c   See netcdf/COPYRIGHT file for copying and redistribution conditions.
-c   $Id: ftest-fbsd.f,v 1.3 1998/01/17 00:31:39 epourmal Exp $
+c   $Id: ftest-fbsd.f,v 1.6 2005/02/09 03:04:04 epourmal Exp $
 c********************************************************************/
 
 
@@ -106,6 +106,11 @@
 c     test ncadel
       write(*, 100) 'ncadel'
       call tncadel(name2)
+
+c     test reading from NetCDF file
+      write(*, 100) 'NetCDF read'
+      call tread_netcdf()
+
       end
 c
 c     subroutine to test ncacpy
@@ -479,7 +484,7 @@
       
       bvalidrg(1) = 1
       bvalidrg(2) = 250
-      call ncapt (ncid, bid, 'validrange', NCBYTE, 2,
+      call ncapt (ncid, bid, 'valid range', NCBYTE, 2,
      +bvalidrg, iret)
 
 c
@@ -488,7 +493,7 @@
 
       svalidrg(1) = -100
       svalidrg(2) = 100
-      call ncapt (ncid, sid, 'validrange', NCSHORT, 2, 
+      call ncapt (ncid, sid, 'valid range', NCSHORT, 2, 
      +svalidrg, iret)
 
 c
@@ -497,7 +502,7 @@
 
       lvalidrg(1) = 0
       lvalidrg(2) = 360
-      call ncapt (ncid, lid, 'validrange', NCLONG, 2,
+      call ncapt (ncid, lid, 'valid range', NCLONG, 2,
      +lvalidrg, iret)
       
 c
@@ -506,7 +511,7 @@
 
       rvalidrg(1) = 0.0
       rvalidrg(2) = 5000.0
-      call ncapt (ncid, fid, 'validrange', NCFLOAT, 2,
+      call ncapt (ncid, fid, 'valid range', NCFLOAT, 2,
      +rvalidrg, iret)
 
 c
@@ -515,7 +520,7 @@
 
       dvalidrg(1) = 0D0
       dvalidrg(2) = 500D0
-      call ncapt (ncid, did, 'validrange', NCDOUBLE, 2,
+      call ncapt (ncid, did, 'valid range', NCDOUBLE, 2,
      +dvalidrg, iret)
 
 c
@@ -565,11 +570,12 @@
       data dimnam /'time', 'lat', 'lon', 'level',
      + 'length', 27*'0'/
       data dimsiz /4, 5, 5, 4, 80, 27*0/
-      data varnam/'bytev', 'shortv', 'longv', 'floatv', 'doublev', 
+      data varnam/'bytev', 'short v', 'longv', 'floatv', 'doublev', 
      + 'chv', 'cv'/
       
-      data attname/'validrange', '0', 'validrange', '0', 'validrange',
-     + '0', 'validrange', '0', 'validrange', '0', 'longname', 'id',
+      data attname/'valid range', '0', 'valid range',
+     + '0', 'valid range',
+     + '0', 'valid range', '0', 'valid range', '0', 'longname', 'id',
      + '0', '0'/
       data gattnam/'source','basetime'/
       end
@@ -818,7 +824,7 @@
 c     short
 c
       sdims(1) = timedim
-      sid = ncvdef (ncid, 'shortv', NCSHORT, 1, sdims, iret)
+      sid = ncvdef (ncid, 'short v', NCSHORT, 1, sdims, iret)
 c
 c     long
 c
@@ -1218,3 +1224,196 @@
       call ncclos (ncid, iret)
       return
       end
+
+C        This routine reads varaibales and global attributes from
+C        the REAL NetCDF file test_nc.nc. The file was created by NetCDF v3.5 
+C        from the file test_nc.cdl that can be found in the mfhdf/fortran
+C        directory. Please do not generate test_nc.nc file from the test_nc.cdl
+C        using HDF4 ncgen. HDF4 ncgen generated HDF4 file!
+
+         subroutine tread_netcdf()
+         include 'netcdf.inc'
+
+C        Variables declarations
+
+         character*10 FILENAME
+         character*1024 new_filename
+         integer filename_len
+         integer status, ncid, var_id
+         integer time(12), date(12), start(3), count(3), int_attr(5)
+         real a(3,2), float_attr(3)
+         double precision c(3), double_attr(3)
+         integer*2 b(2,3,12), short_attr(2)
+         integer i, j, k, dlen
+         character*10 description
+
+C        Arrays to read data to.
+
+         integer time_val(12), date_val(12), int_attr_val(5)
+         integer*2 b_val(2,3,12), short_attr_val(2)
+         real a_val(3,2), float_attr_val(3)
+         double precision c_val(3), double_attr_val(3)
+         real epsilon
+         double precision depsilon
+         integer external fixname
+
+C        Arrays initialization
+         DATA time_val /1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12/
+         DATA date_val /840116, 840214, 840316, 840415, 840516, 840615, 
+     +              840716, 840816, 840915, 841016, 841115, 841216/
+         DATA a_val /1.0, 2.0, 3.0, 4.0, 5.0, 6.0/
+         DATA b_val /1, 1, 2, 2, 3, 3,
+     +           4, 4, 5, 5, 6, 6,
+     +           7, 7, 8, 8, 9, 9,
+     +           10, 10, 11, 11, 12, 12,
+     +           13, 13, 14, 14, 15, 15,
+     +           16, 16, 17, 17, 18, 18,
+     +           19, 19, 20, 20, 21, 22,
+     +           23, 23, 24, 24, 25, 25, 
+     +           26, 26, 27, 27, 28, 28,
+     +           29, 29, 30, 30, 31, 31,
+     +           32, 32, 33, 33, 34, 34,
+     +           35, 35, 36, 36, 37, 37/
+         DATA c_val /2.0, 3.0, 100/
+         DATA int_attr_val /-100, 200, -300, 400, -500/
+         DATA float_attr_val /1.0, 2.0, 3.0/
+         DATA short_attr_val /0, 1/
+         DATA double_attr_val /-1.0, 2.0, -7.0/
+         DATA epsilon /1.E-6/
+         DATA depsilon /1.E-12/
+         
+C        Modify filename to accomodate SRCDIR configure option
+
+         FILENAME = 'test_nc.nc'
+         filename_len = len(new_filename)
+         call fixname(FILENAME, new_filename, filename_len)
+
+         dlen = 10
+         ncid = ncopn(new_filename(1:filename_len), NCNOWRIT, status)
+         if (status .ne.0) then
+             write(*,*) 'ncopn failed'
+             goto 1000
+         endif
+
+         var_id = ncvid(ncid, 'time', status)
+         start(1) = 1 
+         count(1) = 12
+         call ncvgt(ncid, var_id, start, count, time, status)
+         if (status .ne. 0) write(*,*) 
+     +      'ncvgt failed for 32-bit integer variable time'
+         do i = 1, 12
+            if( time(i) .ne. time_val(i) ) 
+     +      write(*,*) 'Wrong time value at index  ', i 
+         enddo
+
+         var_id = ncvid(ncid, 'c', status)
+         start(1) = 1 
+         count(1) = 3
+         call ncvgt(ncid, var_id, start, count, c, status)
+         if (status .ne. 0) write(*,*)
+     +      'ncvgt failed for 64-bit float variable c'
+         do i = 1, 3
+            if( abs(c(i) - c_val(i)) .gt. depsilon ) 
+     +      write(*,*) 'Wrong c value at index  ', i 
+         enddo
+
+         var_id = ncvid(ncid, 'date', status)
+         start(1) = 1 
+         count(1) = 12
+         call ncvgt(ncid, var_id, start, count, date, status)
+         if (status .ne. 0) write(*,*) 
+     +      'ncvgt failed for 32-bit integer variable date'
+         do i = 1, 12
+            if( date(i) .ne. date_val(i) ) 
+     +      write(*,*) 'Wrong date value at index  ', i 
+         enddo
+
+
+         var_id = ncvid(ncid, 'a', status)
+         start(1) = 1 
+         start(2) = 1
+         count(1) = 3
+         count(2) = 2
+         call ncvgt(ncid, var_id, start, count, a, status)
+         if (status .ne. 0) write(*,*) 
+     +      'ncvgt failed for 32-bit real variable a'
+         do i = 1, 2
+            do j = 1, 3 
+            if( abs(a(j,i) - a_val(j,i)) .gt. epsilon ) 
+     +      write(*,*) 'Wrong a value at indecies  ', j, ',', i 
+            enddo
+         enddo
+
+
+         var_id = ncvid(ncid, 'b', status)
+         start(1) = 1 
+         start(2) = 1
+         start(3) = 1
+         count(1) = 2 
+         count(2) = 3
+         count(3) = 12
+         call ncvgt(ncid, var_id, start, count, b, status)
+         if (status .ne. 0) write(*,*) 
+     +      'ncvgt failed for 16-bit integer variable b'
+         do i = 1, 12
+            do j = 1, 3 
+               do k = 1, 2
+               if( b(k,j,i) .ne.  b_val(k,j,i)) 
+     +         write(*,*) 
+     +        'Wrong b value at indecies  ', k, ',', j, ',', i 
+               enddo
+            enddo
+         enddo
+
+
+C read global attributes
+
+         call ncagt(ncid, NCGLOBAL, 'int_attr', int_attr, status)
+         if (status .ne. 0) 
+     +   write(*,*) 'ncagt failed for 32-bit integer attribute int_attr'
+         do i = 1, 5
+            if( int_attr(i) .ne. int_attr_val(i) ) 
+     +      write(*,*) 'Wrong int_attr value at index  ', i 
+         enddo
+
+
+         call ncagt(ncid, NCGLOBAL, 'float_attr', float_attr, status)
+         if (status .ne. 0) 
+     +   write(*,*) 'ncagt failed for 32-bit float attribute float_attr'
+         do i = 1, 3 
+            if( abs(float_attr(i) - float_attr_val(i)) .gt. epsilon ) 
+     +      write(*,*) 'Wrong float_attr value at index  ', i 
+         enddo
+
+         call ncagt(ncid, NCGLOBAL, 'double_attr', double_attr, status)
+         if (status .ne. 0) 
+     +   write(*,*) 
+     +   'ncagt failed for 64-bit float attribute double_attr'
+         do i = 1, 3 
+            if( abs(double_attr(i) - double_attr_val(i)) .gt. depsilon ) 
+     +      write(*,*) 'Wrong double_attr value at index  ', i 
+         enddo
+
+
+         call ncagt(ncid, NCGLOBAL, 'short_attr', short_attr, status)
+         if (status .ne. 0) 
+     +   write(*,*) 
+     +   'ncagt failed for 16-bit integer attribute double_attr'
+         do i = 1, 2 
+            if( short_attr(i) .ne. short_attr_val(i) ) 
+     +      write(*,*) 'Wrong short_attr value at index  ', i 
+         enddo
+
+
+         call ncagtc(ncid, NCGLOBAL, 'Description', description, 
+     +               dlen, status)
+         if (status .ne. 0) 
+     +   write(*,*) 
+     +   'ncagt failed for character attribute Description'
+         if (description .ne. 'Attributes') 
+     +   write(*,*) 'Wrong values of the character attribute' 
+
+
+1000     continue
+         return
+         end

Modified: packages/libhdf4/branches/upstream/current/mfhdf/fortran/config/ftest-fujivp.f
===================================================================
--- packages/libhdf4/branches/upstream/current/mfhdf/fortran/config/ftest-fujivp.f	2007-05-15 09:05:29 UTC (rev 830)
+++ packages/libhdf4/branches/upstream/current/mfhdf/fortran/config/ftest-fujivp.f	2007-05-15 09:53:05 UTC (rev 831)
@@ -1,7 +1,7 @@
 c********************************************************************
 c   Copyright 1993, UCAR/Unidata
 c   See netcdf/COPYRIGHT file for copying and redistribution conditions.
-c   $Id: ftest-fujivp.f,v 1.2 1998/01/17 00:32:25 epourmal Exp $
+c   $Id: ftest-fujivp.f,v 1.3 2005/02/09 03:04:04 epourmal Exp $
 c********************************************************************/
 
 
@@ -479,7 +479,7 @@
       
       bvalidrg(1) = 1
       bvalidrg(2) = 250
-      call ncapt (ncid, bid, 'validrange', NCBYTE, 2,
+      call ncapt (ncid, bid, 'valid range', NCBYTE, 2,
      +bvalidrg, iret)
 
 c
@@ -488,7 +488,7 @@
 
       svalidrg(1) = -100
       svalidrg(2) = 100
-      call ncapt (ncid, sid, 'validrange', NCSHORT, 2, 
+      call ncapt (ncid, sid, 'valid range', NCSHORT, 2, 
      +svalidrg, iret)
 
 c
@@ -497,7 +497,7 @@
 
       lvalidrg(1) = 0
       lvalidrg(2) = 360
-      call ncapt (ncid, lid, 'validrange', NCLONG, 2,
+      call ncapt (ncid, lid, 'valid range', NCLONG, 2,
      +lvalidrg, iret)
       
 c
@@ -506,7 +506,7 @@
 
       rvalidrg(1) = 0.0
       rvalidrg(2) = 5000.0
-      call ncapt (ncid, fid, 'validrange', NCFLOAT, 2,
+      call ncapt (ncid, fid, 'valid range', NCFLOAT, 2,
      +rvalidrg, iret)
 
 c
@@ -515,7 +515,7 @@
 
       dvalidrg(1) = 0D0
       dvalidrg(2) = 500D0
-      call ncapt (ncid, did, 'validrange', NCDOUBLE, 2,
+      call ncapt (ncid, did, 'valid range', NCDOUBLE, 2,
      +dvalidrg, iret)
 
 c
@@ -565,11 +565,12 @@
       data dimnam /'time', 'lat', 'lon', 'level',
      + 'length', 27*'0'/
       data dimsiz /4, 5, 5, 4, 80, 27*0/
-      data varnam/'bytev', 'shortv', 'longv', 'floatv', 'doublev', 
+      data varnam/'bytev', 'short v', 'longv', 'floatv', 'doublev', 
      + 'chv', 'cv'/
       
-      data attname/'validrange', '0', 'validrange', '0', 'validrange',
-     + '0', 'validrange', '0', 'validrange', '0', 'longname', 'id',
+      data attname/'valid range', '0', 'valid range',
+     + '0', 'valid range',
+     + '0', 'valid range', '0', 'valid range', '0', 'longname', 'id',
      + '0', '0'/
       data gattnam/'source','basetime'/
       end
@@ -818,7 +819,7 @@
 c     short
 c
       sdims(1) = timedim
-      sid = ncvdef (ncid, 'shortv', NCSHORT, 1, sdims, iret)
+      sid = ncvdef (ncid, 'short v', NCSHORT, 1, sdims, iret)
 c
 c     long
 c

Modified: packages/libhdf4/branches/upstream/current/mfhdf/fortran/config/ftest-hpux.f
===================================================================
--- packages/libhdf4/branches/upstream/current/mfhdf/fortran/config/ftest-hpux.f	2007-05-15 09:05:29 UTC (rev 830)
+++ packages/libhdf4/branches/upstream/current/mfhdf/fortran/config/ftest-hpux.f	2007-05-15 09:53:05 UTC (rev 831)
@@ -1,7 +1,7 @@
 c********************************************************************
 c   Copyright 1993, UCAR/Unidata
 c   See netcdf/COPYRIGHT file for copying and redistribution conditions.
-c   $Id: ftest-hpux.f,v 1.3 1998/01/17 00:26:11 epourmal Exp $
+c   $Id: ftest-hpux.f,v 1.6 2005/02/09 03:04:04 epourmal Exp $
 c********************************************************************/
 
 
@@ -106,6 +106,11 @@
 c     test ncadel
       write(*, 100) 'ncadel'
       call tncadel(name2)
+
+c     test reading from NetCDF file
+      write(*, 100) 'NetCDF read'
+      call tread_netcdf()
+
       end
 c
 c     subroutine to test ncacpy
@@ -479,7 +484,7 @@
       
       bvalidrg(1) = 1
       bvalidrg(2) = 250
-      call ncapt (ncid, bid, 'validrange', NCBYTE, 2,
+      call ncapt (ncid, bid, 'valid range', NCBYTE, 2,
      +bvalidrg, iret)
 
 c
@@ -488,7 +493,7 @@
 
       svalidrg(1) = -100
       svalidrg(2) = 100
-      call ncapt (ncid, sid, 'validrange', NCSHORT, 2, 
+      call ncapt (ncid, sid, 'valid range', NCSHORT, 2, 
      +svalidrg, iret)
 
 c
@@ -497,7 +502,7 @@
 
       lvalidrg(1) = 0
       lvalidrg(2) = 360
-      call ncapt (ncid, lid, 'validrange', NCLONG, 2,
+      call ncapt (ncid, lid, 'valid range', NCLONG, 2,
      +lvalidrg, iret)
       
 c
@@ -506,7 +511,7 @@
 
       rvalidrg(1) = 0.0
       rvalidrg(2) = 5000.0
-      call ncapt (ncid, fid, 'validrange', NCFLOAT, 2,
+      call ncapt (ncid, fid, 'valid range', NCFLOAT, 2,
      +rvalidrg, iret)
 
 c
@@ -515,7 +520,7 @@
 
       dvalidrg(1) = 0D0
       dvalidrg(2) = 500D0
-      call ncapt (ncid, did, 'validrange', NCDOUBLE, 2,
+      call ncapt (ncid, did, 'valid range', NCDOUBLE, 2,
      +dvalidrg, iret)
 
 c
@@ -565,11 +570,12 @@
       data dimnam /'time', 'lat', 'lon', 'level',
      + 'length', 27*'0'/
       data dimsiz /4, 5, 5, 4, 80, 27*0/
-      data varnam/'bytev', 'shortv', 'longv', 'floatv', 'doublev', 
+      data varnam/'bytev', 'short v', 'longv', 'floatv', 'doublev', 
      + 'chv', 'cv'/
       
-      data attname/'validrange', '0', 'validrange', '0', 'validrange',
-     + '0', 'validrange', '0', 'validrange', '0', 'longname', 'id',
+      data attname/'valid range', '0', 'valid range',
+     + '0', 'valid range',
+     + '0', 'valid range', '0', 'valid range', '0', 'longname', 'id',
      + '0', '0'/
       data gattnam/'source','basetime'/
       end
@@ -818,7 +824,7 @@
 c     short
 c
       sdims(1) = timedim
-      sid = ncvdef (ncid, 'shortv', NCSHORT, 1, sdims, iret)
+      sid = ncvdef (ncid, 'short v', NCSHORT, 1, sdims, iret)
 c
 c     long
 c
@@ -1218,3 +1224,196 @@
       call ncclos (ncid, iret)
       return
       end
+
+C        This routine reads varaibales and global attributes from
+C        the REAL NetCDF file test_nc.nc. The file was created by NetCDF v3.5 
+C        from the file test_nc.cdl that can be found in the mfhdf/fortran
+C        directory. Please do not generate test_nc.nc file from the test_nc.cdl
+C        using HDF4 ncgen. HDF4 ncgen generated HDF4 file!
+
+         subroutine tread_netcdf()
+         include 'netcdf.inc'
+
+C        Variables declarations
+
+         character*10 FILENAME
+         character*1024 new_filename
+         integer filename_len
+         integer status, ncid, var_id
+         integer time(12), date(12), start(3), count(3), int_attr(5)
+         real a(3,2), float_attr(3)
+         double precision c(3), double_attr(3)
+         integer*2 b(2,3,12), short_attr(2)
+         integer i, j, k, dlen
+         character*10 description
+
+C        Arrays to read data to.
+
+         integer time_val(12), date_val(12), int_attr_val(5)
+         integer*2 b_val(2,3,12), short_attr_val(2)
+         real a_val(3,2), float_attr_val(3)
+         double precision c_val(3), double_attr_val(3)
+         real epsilon
+         double precision depsilon
+         integer external fixname
+
+C        Arrays initialization
+         DATA time_val /1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12/
+         DATA date_val /840116, 840214, 840316, 840415, 840516, 840615, 
+     +              840716, 840816, 840915, 841016, 841115, 841216/
+         DATA a_val /1.0, 2.0, 3.0, 4.0, 5.0, 6.0/
+         DATA b_val /1, 1, 2, 2, 3, 3,
+     +           4, 4, 5, 5, 6, 6,
+     +           7, 7, 8, 8, 9, 9,
+     +           10, 10, 11, 11, 12, 12,
+     +           13, 13, 14, 14, 15, 15,
+     +           16, 16, 17, 17, 18, 18,
+     +           19, 19, 20, 20, 21, 22,
+     +           23, 23, 24, 24, 25, 25, 
+     +           26, 26, 27, 27, 28, 28,
+     +           29, 29, 30, 30, 31, 31,
+     +           32, 32, 33, 33, 34, 34,
+     +           35, 35, 36, 36, 37, 37/
+         DATA c_val /2.0, 3.0, 100/
+         DATA int_attr_val /-100, 200, -300, 400, -500/
+         DATA float_attr_val /1.0, 2.0, 3.0/
+         DATA short_attr_val /0, 1/
+         DATA double_attr_val /-1.0, 2.0, -7.0/
+         DATA epsilon /1.E-6/
+         DATA depsilon /1.E-12/
+         
+C        Modify filename to accomodate SRCDIR configure option
+
+         FILENAME = 'test_nc.nc'
+         filename_len = len(new_filename)
+         call fixname(FILENAME, new_filename, filename_len)
+
+         dlen = 10
+         ncid = ncopn(new_filename(1:filename_len), NCNOWRIT, status)
+         if (status .ne.0) then
+             write(*,*) 'ncopn failed'
+             goto 1000
+         endif
+
+         var_id = ncvid(ncid, 'time', status)
+         start(1) = 1 
+         count(1) = 12
+         call ncvgt(ncid, var_id, start, count, time, status)
+         if (status .ne. 0) write(*,*) 
+     +      'ncvgt failed for 32-bit integer variable time'
+         do i = 1, 12
+            if( time(i) .ne. time_val(i) ) 
+     +      write(*,*) 'Wrong time value at index  ', i 
+         enddo
+
+         var_id = ncvid(ncid, 'c', status)
+         start(1) = 1 
+         count(1) = 3
+         call ncvgt(ncid, var_id, start, count, c, status)
+         if (status .ne. 0) write(*,*)
+     +      'ncvgt failed for 64-bit float variable c'
+         do i = 1, 3
+            if( abs(c(i) - c_val(i)) .gt. depsilon ) 
+     +      write(*,*) 'Wrong c value at index  ', i 
+         enddo
+
+         var_id = ncvid(ncid, 'date', status)
+         start(1) = 1 
+         count(1) = 12
+         call ncvgt(ncid, var_id, start, count, date, status)
+         if (status .ne. 0) write(*,*) 
+     +      'ncvgt failed for 32-bit integer variable date'
+         do i = 1, 12
+            if( date(i) .ne. date_val(i) ) 
+     +      write(*,*) 'Wrong date value at index  ', i 
+         enddo
+
+
+         var_id = ncvid(ncid, 'a', status)
+         start(1) = 1 
+         start(2) = 1
+         count(1) = 3
+         count(2) = 2
+         call ncvgt(ncid, var_id, start, count, a, status)
+         if (status .ne. 0) write(*,*) 
+     +      'ncvgt failed for 32-bit real variable a'
+         do i = 1, 2
+            do j = 1, 3 
+            if( abs(a(j,i) - a_val(j,i)) .gt. epsilon ) 
+     +      write(*,*) 'Wrong a value at indecies  ', j, ',', i 
+            enddo
+         enddo
+
+
+         var_id = ncvid(ncid, 'b', status)
+         start(1) = 1 
+         start(2) = 1
+         start(3) = 1
+         count(1) = 2 
+         count(2) = 3
+         count(3) = 12
+         call ncvgt(ncid, var_id, start, count, b, status)
+         if (status .ne. 0) write(*,*) 
+     +      'ncvgt failed for 16-bit integer variable b'
+         do i = 1, 12
+            do j = 1, 3 
+               do k = 1, 2
+               if( b(k,j,i) .ne.  b_val(k,j,i)) 
+     +         write(*,*) 
+     +        'Wrong b value at indecies  ', k, ',', j, ',', i 
+               enddo
+            enddo
+         enddo
+
+
+C read global attributes
+
+         call ncagt(ncid, NCGLOBAL, 'int_attr', int_attr, status)
+         if (status .ne. 0) 
+     +   write(*,*) 'ncagt failed for 32-bit integer attribute int_attr'
+         do i = 1, 5
+            if( int_attr(i) .ne. int_attr_val(i) ) 
+     +      write(*,*) 'Wrong int_attr value at index  ', i 
+         enddo
+
+
+         call ncagt(ncid, NCGLOBAL, 'float_attr', float_attr, status)
+         if (status .ne. 0) 
+     +   write(*,*) 'ncagt failed for 32-bit float attribute float_attr'
+         do i = 1, 3 
+            if( abs(float_attr(i) - float_attr_val(i)) .gt. epsilon ) 
+     +      write(*,*) 'Wrong float_attr value at index  ', i 
+         enddo
+
+         call ncagt(ncid, NCGLOBAL, 'double_attr', double_attr, status)
+         if (status .ne. 0) 
+     +   write(*,*) 
+     +   'ncagt failed for 64-bit float attribute double_attr'
+         do i = 1, 3 
+            if( abs(double_attr(i) - double_attr_val(i)) .gt. depsilon ) 
+     +      write(*,*) 'Wrong double_attr value at index  ', i 
+         enddo
+
+
+         call ncagt(ncid, NCGLOBAL, 'short_attr', short_attr, status)
+         if (status .ne. 0) 
+     +   write(*,*) 
+     +   'ncagt failed for 16-bit integer attribute double_attr'
+         do i = 1, 2 
+            if( short_attr(i) .ne. short_attr_val(i) ) 
+     +      write(*,*) 'Wrong short_attr value at index  ', i 
+         enddo
+
+
+         call ncagtc(ncid, NCGLOBAL, 'Description', description, 
+     +               dlen, status)
+         if (status .ne. 0) 
+     +   write(*,*) 
+     +   'ncagt failed for character attribute Description'
+         if (description .ne. 'Attributes') 
+     +   write(*,*) 'Wrong values of the character attribute' 
+
+
+1000     continue
+         return
+         end

Modified: packages/libhdf4/branches/upstream/current/mfhdf/fortran/config/ftest-ia64.f
===================================================================
--- packages/libhdf4/branches/upstream/current/mfhdf/fortran/config/ftest-ia64.f	2007-05-15 09:05:29 UTC (rev 830)
+++ packages/libhdf4/branches/upstream/current/mfhdf/fortran/config/ftest-ia64.f	2007-05-15 09:53:05 UTC (rev 831)
@@ -1,7 +1,7 @@
 c********************************************************************
 c   Copyright 1993, UCAR/Unidata
 c   See netcdf/COPYRIGHT file for copying and redistribution conditions.
-c   $Id: ftest-ia64.f,v 1.1 2000/05/23 18:07:07 acheng Exp $
+c   $Id: ftest-ia64.f,v 1.4 2005/02/09 03:04:05 epourmal Exp $
 c********************************************************************/
 
 
@@ -479,7 +479,7 @@
       
       bvalidrg(1) = 1
       bvalidrg(2) = 250
-      call ncapt (ncid, bid, 'validrange', NCBYTE, 2,
+      call ncapt (ncid, bid, 'valid range', NCBYTE, 2,
      +bvalidrg, iret)
 
 c
@@ -488,7 +488,7 @@
 
       svalidrg(1) = -100
       svalidrg(2) = 100
-      call ncapt (ncid, sid, 'validrange', NCSHORT, 2, 
+      call ncapt (ncid, sid, 'valid range', NCSHORT, 2, 
      +svalidrg, iret)
 
 c
@@ -497,7 +497,7 @@
 
       lvalidrg(1) = 0
       lvalidrg(2) = 360
-      call ncapt (ncid, lid, 'validrange', NCLONG, 2,
+      call ncapt (ncid, lid, 'valid range', NCLONG, 2,
      +lvalidrg, iret)
       
 c
@@ -506,7 +506,7 @@
 
       rvalidrg(1) = 0.0
       rvalidrg(2) = 5000.0
-      call ncapt (ncid, fid, 'validrange', NCFLOAT, 2,
+      call ncapt (ncid, fid, 'valid range', NCFLOAT, 2,
      +rvalidrg, iret)
 
 c
@@ -515,7 +515,7 @@
 
       dvalidrg(1) = 0D0
       dvalidrg(2) = 500D0
-      call ncapt (ncid, did, 'validrange', NCDOUBLE, 2,
+      call ncapt (ncid, did, 'valid range', NCDOUBLE, 2,
      +dvalidrg, iret)
 
 c
@@ -565,11 +565,12 @@
       data dimnam /'time', 'lat', 'lon', 'level',
      + 'length', 27*'0'/
       data dimsiz /4, 5, 5, 4, 80, 27*0/
-      data varnam/'bytev', 'shortv', 'longv', 'floatv', 'doublev', 
+      data varnam/'bytev', 'short v', 'longv', 'floatv', 'doublev', 
      + 'chv', 'cv'/
       
-      data attname/'validrange', '0', 'validrange', '0', 'validrange',
-     + '0', 'validrange', '0', 'validrange', '0', 'longname', 'id',
+      data attname/'valid range', '0', 'valid range',
+     + '0', 'valid range',
+     + '0', 'valid range', '0', 'valid range', '0', 'longname', 'id',
      + '0', '0'/
       data gattnam/'source','basetime'/
       end
@@ -818,7 +819,7 @@
 c     short
 c
       sdims(1) = timedim
-      sid = ncvdef (ncid, 'shortv', NCSHORT, 1, sdims, iret)
+      sid = ncvdef (ncid, 'short v', NCSHORT, 1, sdims, iret)
 c
 c     long
 c

Modified: packages/libhdf4/branches/upstream/current/mfhdf/fortran/config/ftest-irix32.f
===================================================================
--- packages/libhdf4/branches/upstream/current/mfhdf/fortran/config/ftest-irix32.f	2007-05-15 09:05:29 UTC (rev 830)
+++ packages/libhdf4/branches/upstream/current/mfhdf/fortran/config/ftest-irix32.f	2007-05-15 09:53:05 UTC (rev 831)
@@ -1,7 +1,7 @@
 c********************************************************************
 c   Copyright 1993, UCAR/Unidata
 c   See netcdf/COPYRIGHT file for copying and redistribution conditions.
-c   $Id: ftest-irix32.f,v 1.3 1998/01/17 00:33:06 epourmal Exp $
+c   $Id: ftest-irix32.f,v 1.4 2005/02/09 03:04:05 epourmal Exp $
 c********************************************************************/
 
 
@@ -479,7 +479,7 @@
       
       bvalidrg(1) = 1
       bvalidrg(2) = 250
-      call ncapt (ncid, bid, 'validrange', NCBYTE, 2,
+      call ncapt (ncid, bid, 'valid range', NCBYTE, 2,
      +bvalidrg, iret)
 
 c
@@ -488,7 +488,7 @@
 
       svalidrg(1) = -100
       svalidrg(2) = 100
-      call ncapt (ncid, sid, 'validrange', NCSHORT, 2, 
+      call ncapt (ncid, sid, 'valid range', NCSHORT, 2, 
      +svalidrg, iret)
 
 c
@@ -497,7 +497,7 @@
 
       lvalidrg(1) = 0
       lvalidrg(2) = 360
-      call ncapt (ncid, lid, 'validrange', NCLONG, 2,
+      call ncapt (ncid, lid, 'valid range', NCLONG, 2,
      +lvalidrg, iret)
       
 c
@@ -506,7 +506,7 @@
 
       rvalidrg(1) = 0.0
       rvalidrg(2) = 5000.0
-      call ncapt (ncid, fid, 'validrange', NCFLOAT, 2,
+      call ncapt (ncid, fid, 'valid range', NCFLOAT, 2,
      +rvalidrg, iret)
 
 c
@@ -515,7 +515,7 @@
 
       dvalidrg(1) = 0D0
       dvalidrg(2) = 500D0
-      call ncapt (ncid, did, 'validrange', NCDOUBLE, 2,
+      call ncapt (ncid, did, 'valid range', NCDOUBLE, 2,
      +dvalidrg, iret)
 
 c
@@ -565,11 +565,12 @@
       data dimnam /'time', 'lat', 'lon', 'level',
      + 'length', 27*'0'/
       data dimsiz /4, 5, 5, 4, 80, 27*0/
-      data varnam/'bytev', 'shortv', 'longv', 'floatv', 'doublev', 
+      data varnam/'bytev', 'short v', 'longv', 'floatv', 'doublev', 
      + 'chv', 'cv'/
       
-      data attname/'validrange', '0', 'validrange', '0', 'validrange',
-     + '0', 'validrange', '0', 'validrange', '0', 'longname', 'id',
+      data attname/'valid range', '0', 'valid range',
+     + '0', 'valid range',
+     + '0', 'valid range', '0', 'valid range', '0', 'longname', 'id',
      + '0', '0'/
       data gattnam/'source','basetime'/
       end
@@ -818,7 +819,7 @@
 c     short
 c
       sdims(1) = timedim
-      sid = ncvdef (ncid, 'shortv', NCSHORT, 1, sdims, iret)
+      sid = ncvdef (ncid, 'short v', NCSHORT, 1, sdims, iret)
 c
 c     long
 c

Modified: packages/libhdf4/branches/upstream/current/mfhdf/fortran/config/ftest-irix4.f
===================================================================
--- packages/libhdf4/branches/upstream/current/mfhdf/fortran/config/ftest-irix4.f	2007-05-15 09:05:29 UTC (rev 830)
+++ packages/libhdf4/branches/upstream/current/mfhdf/fortran/config/ftest-irix4.f	2007-05-15 09:53:05 UTC (rev 831)
@@ -1,7 +1,7 @@
 c********************************************************************
 c   Copyright 1993, UCAR/Unidata
 c   See netcdf/COPYRIGHT file for copying and redistribution conditions.
-c   $Id: ftest-irix4.f,v 1.3 1998/01/17 00:33:48 epourmal Exp $
+c   $Id: ftest-irix4.f,v 1.4 2005/02/09 03:04:06 epourmal Exp $
 c********************************************************************/
 
 
@@ -479,7 +479,7 @@
       
       bvalidrg(1) = 1
       bvalidrg(2) = 250
-      call ncapt (ncid, bid, 'validrange', NCBYTE, 2,
+      call ncapt (ncid, bid, 'valid range', NCBYTE, 2,
      +bvalidrg, iret)
 
 c
@@ -488,7 +488,7 @@
 
       svalidrg(1) = -100
       svalidrg(2) = 100
-      call ncapt (ncid, sid, 'validrange', NCSHORT, 2, 
+      call ncapt (ncid, sid, 'valid range', NCSHORT, 2, 
      +svalidrg, iret)
 
 c
@@ -497,7 +497,7 @@
 
       lvalidrg(1) = 0
       lvalidrg(2) = 360
-      call ncapt (ncid, lid, 'validrange', NCLONG, 2,
+      call ncapt (ncid, lid, 'valid range', NCLONG, 2,
      +lvalidrg, iret)
       
 c
@@ -506,7 +506,7 @@
 
       rvalidrg(1) = 0.0
       rvalidrg(2) = 5000.0
-      call ncapt (ncid, fid, 'validrange', NCFLOAT, 2,
+      call ncapt (ncid, fid, 'valid range', NCFLOAT, 2,
      +rvalidrg, iret)
 
 c
@@ -515,7 +515,7 @@
 
       dvalidrg(1) = 0D0
       dvalidrg(2) = 500D0
-      call ncapt (ncid, did, 'validrange', NCDOUBLE, 2,
+      call ncapt (ncid, did, 'valid range', NCDOUBLE, 2,
      +dvalidrg, iret)
 
 c
@@ -565,11 +565,12 @@
       data dimnam /'time', 'lat', 'lon', 'level',
      + 'length', 27*'0'/
       data dimsiz /4, 5, 5, 4, 80, 27*0/
-      data varnam/'bytev', 'shortv', 'longv', 'floatv', 'doublev', 
+      data varnam/'bytev', 'short v', 'longv', 'floatv', 'doublev', 
      + 'chv', 'cv'/
       
-      data attname/'validrange', '0', 'validrange', '0', 'validrange',
-     + '0', 'validrange', '0', 'validrange', '0', 'longname', 'id',
+      data attname/'valid range', '0', 'valid range',
+     + '0', 'valid range',
+     + '0', 'valid range', '0', 'valid range', '0', 'longname', 'id',
      + '0', '0'/
       data gattnam/'source','basetime'/
       end
@@ -818,7 +819,7 @@
 c     short
 c
       sdims(1) = timedim
-      sid = ncvdef (ncid, 'shortv', NCSHORT, 1, sdims, iret)
+      sid = ncvdef (ncid, 'short v', NCSHORT, 1, sdims, iret)
 c
 c     long
 c

Modified: packages/libhdf4/branches/upstream/current/mfhdf/fortran/config/ftest-irix5.f
===================================================================
--- packages/libhdf4/branches/upstream/current/mfhdf/fortran/config/ftest-irix5.f	2007-05-15 09:05:29 UTC (rev 830)
+++ packages/libhdf4/branches/upstream/current/mfhdf/fortran/config/ftest-irix5.f	2007-05-15 09:53:05 UTC (rev 831)
@@ -1,7 +1,7 @@
 c********************************************************************
 c   Copyright 1993, UCAR/Unidata
 c   See netcdf/COPYRIGHT file for copying and redistribution conditions.
-c   $Id: ftest-irix5.f,v 1.3 1998/01/17 00:34:31 epourmal Exp $
+c   $Id: ftest-irix5.f,v 1.4 2005/02/09 03:04:06 epourmal Exp $
 c********************************************************************/
 
 
@@ -479,7 +479,7 @@
       
       bvalidrg(1) = 1
       bvalidrg(2) = 250
-      call ncapt (ncid, bid, 'validrange', NCBYTE, 2,
+      call ncapt (ncid, bid, 'valid range', NCBYTE, 2,
      +bvalidrg, iret)
 
 c
@@ -488,7 +488,7 @@
 
       svalidrg(1) = -100
       svalidrg(2) = 100
-      call ncapt (ncid, sid, 'validrange', NCSHORT, 2, 
+      call ncapt (ncid, sid, 'valid range', NCSHORT, 2, 
      +svalidrg, iret)
 
 c
@@ -497,7 +497,7 @@
 
       lvalidrg(1) = 0
       lvalidrg(2) = 360
-      call ncapt (ncid, lid, 'validrange', NCLONG, 2,
+      call ncapt (ncid, lid, 'valid range', NCLONG, 2,
      +lvalidrg, iret)
       
 c
@@ -506,7 +506,7 @@
 
       rvalidrg(1) = 0.0
       rvalidrg(2) = 5000.0
-      call ncapt (ncid, fid, 'validrange', NCFLOAT, 2,
+      call ncapt (ncid, fid, 'valid range', NCFLOAT, 2,
      +rvalidrg, iret)
 
 c
@@ -515,7 +515,7 @@
 
       dvalidrg(1) = 0D0
       dvalidrg(2) = 500D0
-      call ncapt (ncid, did, 'validrange', NCDOUBLE, 2,
+      call ncapt (ncid, did, 'valid range', NCDOUBLE, 2,
      +dvalidrg, iret)
 
 c
@@ -565,11 +565,12 @@
       data dimnam /'time', 'lat', 'lon', 'level',
      + 'length', 27*'0'/
       data dimsiz /4, 5, 5, 4, 80, 27*0/
-      data varnam/'bytev', 'shortv', 'longv', 'floatv', 'doublev', 
+      data varnam/'bytev', 'short v', 'longv', 'floatv', 'doublev', 
      + 'chv', 'cv'/
       
-      data attname/'validrange', '0', 'validrange', '0', 'validrange',
-     + '0', 'validrange', '0', 'validrange', '0', 'longname', 'id',
+      data attname/'valid range', '0', 'valid range',
+     + '0', 'valid range',
+     + '0', 'valid range', '0', 'valid range', '0', 'longname', 'id',
      + '0', '0'/
       data gattnam/'source','basetime'/
       end
@@ -818,7 +819,7 @@
 c     short
 c
       sdims(1) = timedim
-      sid = ncvdef (ncid, 'shortv', NCSHORT, 1, sdims, iret)
+      sid = ncvdef (ncid, 'short v', NCSHORT, 1, sdims, iret)
 c
 c     long
 c

Modified: packages/libhdf4/branches/upstream/current/mfhdf/fortran/config/ftest-irix6.f
===================================================================
--- packages/libhdf4/branches/upstream/current/mfhdf/fortran/config/ftest-irix6.f	2007-05-15 09:05:29 UTC (rev 830)
+++ packages/libhdf4/branches/upstream/current/mfhdf/fortran/config/ftest-irix6.f	2007-05-15 09:53:05 UTC (rev 831)
@@ -1,7 +1,7 @@
 c********************************************************************
 c   Copyright 1993, UCAR/Unidata
 c   See netcdf/COPYRIGHT file for copying and redistribution conditions.
-c   $Id: ftest-irix6.f,v 1.3 1998/01/17 00:35:09 epourmal Exp $
+c   $Id: ftest-irix6.f,v 1.6 2005/02/09 03:04:07 epourmal Exp $
 c********************************************************************/
 
 
@@ -106,6 +106,11 @@
 c     test ncadel
       write(*, 100) 'ncadel'
       call tncadel(name2)
+
+c     test reading from NetCDF file
+      write(*, 100) 'NetCDF read'
+      call tread_netcdf()
+
       end
 c
 c     subroutine to test ncacpy
@@ -479,7 +484,7 @@
       
       bvalidrg(1) = 1
       bvalidrg(2) = 250
-      call ncapt (ncid, bid, 'validrange', NCBYTE, 2,
+      call ncapt (ncid, bid, 'valid range', NCBYTE, 2,
      +bvalidrg, iret)
 
 c
@@ -488,7 +493,7 @@
 
       svalidrg(1) = -100
       svalidrg(2) = 100
-      call ncapt (ncid, sid, 'validrange', NCSHORT, 2, 
+      call ncapt (ncid, sid, 'valid range', NCSHORT, 2, 
      +svalidrg, iret)
 
 c
@@ -497,7 +502,7 @@
 
       lvalidrg(1) = 0
       lvalidrg(2) = 360
-      call ncapt (ncid, lid, 'validrange', NCLONG, 2,
+      call ncapt (ncid, lid, 'valid range', NCLONG, 2,
      +lvalidrg, iret)
       
 c
@@ -506,7 +511,7 @@
 
       rvalidrg(1) = 0.0
       rvalidrg(2) = 5000.0
-      call ncapt (ncid, fid, 'validrange', NCFLOAT, 2,
+      call ncapt (ncid, fid, 'valid range', NCFLOAT, 2,
      +rvalidrg, iret)
 
 c
@@ -515,7 +520,7 @@
 
       dvalidrg(1) = 0D0
       dvalidrg(2) = 500D0
-      call ncapt (ncid, did, 'validrange', NCDOUBLE, 2,
+      call ncapt (ncid, did, 'valid range', NCDOUBLE, 2,
      +dvalidrg, iret)
 
 c
@@ -565,11 +570,12 @@
       data dimnam /'time', 'lat', 'lon', 'level',
      + 'length', 27*'0'/
       data dimsiz /4, 5, 5, 4, 80, 27*0/
-      data varnam/'bytev', 'shortv', 'longv', 'floatv', 'doublev', 
+      data varnam/'bytev', 'short v', 'longv', 'floatv', 'doublev', 
      + 'chv', 'cv'/
       
-      data attname/'validrange', '0', 'validrange', '0', 'validrange',
-     + '0', 'validrange', '0', 'validrange', '0', 'longname', 'id',
+      data attname/'valid range', '0', 'valid range',
+     + '0', 'valid range',
+     + '0', 'valid range', '0', 'valid range', '0', 'longname', 'id',
      + '0', '0'/
       data gattnam/'source','basetime'/
       end
@@ -818,7 +824,7 @@
 c     short
 c
       sdims(1) = timedim
-      sid = ncvdef (ncid, 'shortv', NCSHORT, 1, sdims, iret)
+      sid = ncvdef (ncid, 'short v', NCSHORT, 1, sdims, iret)
 c
 c     long
 c
@@ -1218,3 +1224,196 @@
       call ncclos (ncid, iret)
       return
       end
+
+C        This routine reads varaibales and global attributes from
+C        the REAL NetCDF file test_nc.nc. The file was created by NetCDF v3.5 
+C        from the file test_nc.cdl that can be found in the mfhdf/fortran
+C        directory. Please do not generate test_nc.nc file from the test_nc.cdl
+C        using HDF4 ncgen. HDF4 ncgen generated HDF4 file!
+
+         subroutine tread_netcdf()
+         include 'netcdf.inc'
+
+C        Variables declarations
+
+         character*10 FILENAME
+         character*1024 new_filename
+         integer filename_len
+         integer status, ncid, var_id
+         integer time(12), date(12), start(3), count(3), int_attr(5)
+         real a(3,2), float_attr(3)
+         double precision c(3), double_attr(3)
+         integer*2 b(2,3,12), short_attr(2)
+         integer i, j, k, dlen
+         character*10 description
+
+C        Arrays to read data to.
+
+         integer time_val(12), date_val(12), int_attr_val(5)
+         integer*2 b_val(2,3,12), short_attr_val(2)
+         real a_val(3,2), float_attr_val(3)
+         double precision c_val(3), double_attr_val(3)
+         real epsilon
+         double precision depsilon
+         integer external fixname
+
+C        Arrays initialization
+         DATA time_val /1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12/
+         DATA date_val /840116, 840214, 840316, 840415, 840516, 840615, 
+     +              840716, 840816, 840915, 841016, 841115, 841216/
+         DATA a_val /1.0, 2.0, 3.0, 4.0, 5.0, 6.0/
+         DATA b_val /1, 1, 2, 2, 3, 3,
+     +           4, 4, 5, 5, 6, 6,
+     +           7, 7, 8, 8, 9, 9,
+     +           10, 10, 11, 11, 12, 12,
+     +           13, 13, 14, 14, 15, 15,
+     +           16, 16, 17, 17, 18, 18,
+     +           19, 19, 20, 20, 21, 22,
+     +           23, 23, 24, 24, 25, 25, 
+     +           26, 26, 27, 27, 28, 28,
+     +           29, 29, 30, 30, 31, 31,
+     +           32, 32, 33, 33, 34, 34,
+     +           35, 35, 36, 36, 37, 37/
+         DATA c_val /2.0, 3.0, 100/
+         DATA int_attr_val /-100, 200, -300, 400, -500/
+         DATA float_attr_val /1.0, 2.0, 3.0/
+         DATA short_attr_val /0, 1/
+         DATA double_attr_val /-1.0, 2.0, -7.0/
+         DATA epsilon /1.E-6/
+         DATA depsilon /1.E-12/
+         
+C        Modify filename to accomodate SRCDIR configure option
+
+         FILENAME = 'test_nc.nc'
+         filename_len = len(new_filename)
+         call fixname(FILENAME, new_filename, filename_len)
+
+         dlen = 10
+         ncid = ncopn(new_filename(1:filename_len), NCNOWRIT, status)
+         if (status .ne.0) then
+             write(*,*) 'ncopn failed'
+             goto 1000
+         endif
+
+         var_id = ncvid(ncid, 'time', status)
+         start(1) = 1 
+         count(1) = 12
+         call ncvgt(ncid, var_id, start, count, time, status)
+         if (status .ne. 0) write(*,*) 
+     +      'ncvgt failed for 32-bit integer variable time'
+         do i = 1, 12
+            if( time(i) .ne. time_val(i) ) 
+     +      write(*,*) 'Wrong time value at index  ', i 
+         enddo
+
+         var_id = ncvid(ncid, 'c', status)
+         start(1) = 1 
+         count(1) = 3
+         call ncvgt(ncid, var_id, start, count, c, status)
+         if (status .ne. 0) write(*,*)
+     +      'ncvgt failed for 64-bit float variable c'
+         do i = 1, 3
+            if( abs(c(i) - c_val(i)) .gt. depsilon ) 
+     +      write(*,*) 'Wrong c value at index  ', i 
+         enddo
+
+         var_id = ncvid(ncid, 'date', status)
+         start(1) = 1 
+         count(1) = 12
+         call ncvgt(ncid, var_id, start, count, date, status)
+         if (status .ne. 0) write(*,*) 
+     +      'ncvgt failed for 32-bit integer variable date'
+         do i = 1, 12
+            if( date(i) .ne. date_val(i) ) 
+     +      write(*,*) 'Wrong date value at index  ', i 
+         enddo
+
+
+         var_id = ncvid(ncid, 'a', status)
+         start(1) = 1 
+         start(2) = 1
+         count(1) = 3
+         count(2) = 2
+         call ncvgt(ncid, var_id, start, count, a, status)
+         if (status .ne. 0) write(*,*) 
+     +      'ncvgt failed for 32-bit real variable a'
+         do i = 1, 2
+            do j = 1, 3 
+            if( abs(a(j,i) - a_val(j,i)) .gt. epsilon ) 
+     +      write(*,*) 'Wrong a value at indecies  ', j, ',', i 
+            enddo
+         enddo
+
+
+         var_id = ncvid(ncid, 'b', status)
+         start(1) = 1 
+         start(2) = 1
+         start(3) = 1
+         count(1) = 2 
+         count(2) = 3
+         count(3) = 12
+         call ncvgt(ncid, var_id, start, count, b, status)
+         if (status .ne. 0) write(*,*) 
+     +      'ncvgt failed for 16-bit integer variable b'
+         do i = 1, 12
+            do j = 1, 3 
+               do k = 1, 2
+               if( b(k,j,i) .ne.  b_val(k,j,i)) 
+     +         write(*,*) 
+     +        'Wrong b value at indecies  ', k, ',', j, ',', i 
+               enddo
+            enddo
+         enddo
+
+
+C read global attributes
+
+         call ncagt(ncid, NCGLOBAL, 'int_attr', int_attr, status)
+         if (status .ne. 0) 
+     +   write(*,*) 'ncagt failed for 32-bit integer attribute int_attr'
+         do i = 1, 5
+            if( int_attr(i) .ne. int_attr_val(i) ) 
+     +      write(*,*) 'Wrong int_attr value at index  ', i 
+         enddo
+
+
+         call ncagt(ncid, NCGLOBAL, 'float_attr', float_attr, status)
+         if (status .ne. 0) 
+     +   write(*,*) 'ncagt failed for 32-bit float attribute float_attr'
+         do i = 1, 3 
+            if( abs(float_attr(i) - float_attr_val(i)) .gt. epsilon ) 
+     +      write(*,*) 'Wrong float_attr value at index  ', i 
+         enddo
+
+         call ncagt(ncid, NCGLOBAL, 'double_attr', double_attr, status)
+         if (status .ne. 0) 
+     +   write(*,*) 
+     +   'ncagt failed for 64-bit float attribute double_attr'
+         do i = 1, 3 
+            if( abs(double_attr(i) - double_attr_val(i)) .gt. depsilon ) 
+     +      write(*,*) 'Wrong double_attr value at index  ', i 
+         enddo
+
+
+         call ncagt(ncid, NCGLOBAL, 'short_attr', short_attr, status)
+         if (status .ne. 0) 
+     +   write(*,*) 
+     +   'ncagt failed for 16-bit integer attribute double_attr'
+         do i = 1, 2 
+            if( short_attr(i) .ne. short_attr_val(i) ) 
+     +      write(*,*) 'Wrong short_attr value at index  ', i 
+         enddo
+
+
+         call ncagtc(ncid, NCGLOBAL, 'Description', description, 
+     +               dlen, status)
+         if (status .ne. 0) 
+     +   write(*,*) 
+     +   'ncagt failed for character attribute Description'
+         if (description .ne. 'Attributes') 
+     +   write(*,*) 'Wrong values of the character attribute' 
+
+
+1000     continue
+         return
+         end

Modified: packages/libhdf4/branches/upstream/current/mfhdf/fortran/config/ftest-linux.f
===================================================================
--- packages/libhdf4/branches/upstream/current/mfhdf/fortran/config/ftest-linux.f	2007-05-15 09:05:29 UTC (rev 830)
+++ packages/libhdf4/branches/upstream/current/mfhdf/fortran/config/ftest-linux.f	2007-05-15 09:53:05 UTC (rev 831)
@@ -1,7 +1,7 @@
 c********************************************************************
 c   Copyright 1993, UCAR/Unidata
 c   See netcdf/COPYRIGHT file for copying and redistribution conditions.
-c   $Id: ftest-linux.f,v 1.3 1998/01/17 00:26:57 epourmal Exp $
+c   $Id: ftest-linux.f,v 1.6 2005/02/09 03:04:07 epourmal Exp $
 c********************************************************************/
 
 
@@ -106,6 +106,11 @@
 c     test ncadel
       write(*, 100) 'ncadel'
       call tncadel(name2)
+
+c     test reading from NetCDF file
+      write(*, 100) 'NetCDF read'
+      call tread_netcdf()
+
       end
 c
 c     subroutine to test ncacpy
@@ -479,7 +484,7 @@
       
       bvalidrg(1) = 1
       bvalidrg(2) = 250
-      call ncapt (ncid, bid, 'validrange', NCBYTE, 2,
+      call ncapt (ncid, bid, 'valid range', NCBYTE, 2,
      +bvalidrg, iret)
 
 c
@@ -488,7 +493,7 @@
 
       svalidrg(1) = -100
       svalidrg(2) = 100
-      call ncapt (ncid, sid, 'validrange', NCSHORT, 2, 
+      call ncapt (ncid, sid, 'valid range', NCSHORT, 2, 
      +svalidrg, iret)
 
 c
@@ -497,7 +502,7 @@
 
       lvalidrg(1) = 0
       lvalidrg(2) = 360
-      call ncapt (ncid, lid, 'validrange', NCLONG, 2,
+      call ncapt (ncid, lid, 'valid range', NCLONG, 2,
      +lvalidrg, iret)
       
 c
@@ -506,7 +511,7 @@
 
       rvalidrg(1) = 0.0
       rvalidrg(2) = 5000.0
-      call ncapt (ncid, fid, 'validrange', NCFLOAT, 2,
+      call ncapt (ncid, fid, 'valid range', NCFLOAT, 2,
      +rvalidrg, iret)
 
 c
@@ -515,7 +520,7 @@
 
       dvalidrg(1) = 0D0
       dvalidrg(2) = 500D0
-      call ncapt (ncid, did, 'validrange', NCDOUBLE, 2,
+      call ncapt (ncid, did, 'valid range', NCDOUBLE, 2,
      +dvalidrg, iret)
 
 c
@@ -565,11 +570,12 @@
       data dimnam /'time', 'lat', 'lon', 'level',
      + 'length', 27*'0'/
       data dimsiz /4, 5, 5, 4, 80, 27*0/
-      data varnam/'bytev', 'shortv', 'longv', 'floatv', 'doublev', 
+      data varnam/'bytev', 'short v', 'longv', 'floatv', 'doublev', 
      + 'chv', 'cv'/
       
-      data attname/'validrange', '0', 'validrange', '0', 'validrange',
-     + '0', 'validrange', '0', 'validrange', '0', 'longname', 'id',
+      data attname/'valid range', '0', 'valid range',
+     + '0', 'valid range',
+     + '0', 'valid range', '0', 'valid range', '0', 'longname', 'id',
      + '0', '0'/
       data gattnam/'source','basetime'/
       end
@@ -818,7 +824,7 @@
 c     short
 c
       sdims(1) = timedim
-      sid = ncvdef (ncid, 'shortv', NCSHORT, 1, sdims, iret)
+      sid = ncvdef (ncid, 'short v', NCSHORT, 1, sdims, iret)
 c
 c     long
 c
@@ -1218,3 +1224,196 @@
       call ncclos (ncid, iret)
       return
       end
+
+C        This routine reads varaibales and global attributes from
+C        the REAL NetCDF file test_nc.nc. The file was created by NetCDF v3.5 
+C        from the file test_nc.cdl that can be found in the mfhdf/fortran
+C        directory. Please do not generate test_nc.nc file from the test_nc.cdl
+C        using HDF4 ncgen. HDF4 ncgen generated HDF4 file!
+
+         subroutine tread_netcdf()
+         include 'netcdf.inc'
+
+C        Variables declarations
+
+         character*10 FILENAME
+         character*1024 new_filename
+         integer filename_len
+         integer status, ncid, var_id
+         integer time(12), date(12), start(3), count(3), int_attr(5)
+         real a(3,2), float_attr(3)
+         double precision c(3), double_attr(3)
+         integer*2 b(2,3,12), short_attr(2)
+         integer i, j, k, dlen
+         character*10 description
+
+C        Arrays to read data to.
+
+         integer time_val(12), date_val(12), int_attr_val(5)
+         integer*2 b_val(2,3,12), short_attr_val(2)
+         real a_val(3,2), float_attr_val(3)
+         double precision c_val(3), double_attr_val(3)
+         real epsilon
+         double precision depsilon
+         integer external fixname
+
+C        Arrays initialization
+         DATA time_val /1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12/
+         DATA date_val /840116, 840214, 840316, 840415, 840516, 840615, 
+     +              840716, 840816, 840915, 841016, 841115, 841216/
+         DATA a_val /1.0, 2.0, 3.0, 4.0, 5.0, 6.0/
+         DATA b_val /1, 1, 2, 2, 3, 3,
+     +           4, 4, 5, 5, 6, 6,
+     +           7, 7, 8, 8, 9, 9,
+     +           10, 10, 11, 11, 12, 12,
+     +           13, 13, 14, 14, 15, 15,
+     +           16, 16, 17, 17, 18, 18,
+     +           19, 19, 20, 20, 21, 22,
+     +           23, 23, 24, 24, 25, 25, 
+     +           26, 26, 27, 27, 28, 28,
+     +           29, 29, 30, 30, 31, 31,
+     +           32, 32, 33, 33, 34, 34,
+     +           35, 35, 36, 36, 37, 37/
+         DATA c_val /2.0, 3.0, 100/
+         DATA int_attr_val /-100, 200, -300, 400, -500/
+         DATA float_attr_val /1.0, 2.0, 3.0/
+         DATA short_attr_val /0, 1/
+         DATA double_attr_val /-1.0, 2.0, -7.0/
+         DATA epsilon /1.E-6/
+         DATA depsilon /1.E-12/
+         
+C        Modify filename to accomodate SRCDIR configure option
+
+         FILENAME = 'test_nc.nc'
+         filename_len = len(new_filename)
+         call fixname(FILENAME, new_filename, filename_len)
+
+         dlen = 10
+         ncid = ncopn(new_filename(1:filename_len), NCNOWRIT, status)
+         if (status .ne.0) then
+             write(*,*) 'ncopn failed'
+             goto 1000
+         endif
+
+         var_id = ncvid(ncid, 'time', status)
+         start(1) = 1 
+         count(1) = 12
+         call ncvgt(ncid, var_id, start, count, time, status)
+         if (status .ne. 0) write(*,*) 
+     +      'ncvgt failed for 32-bit integer variable time'
+         do i = 1, 12
+            if( time(i) .ne. time_val(i) ) 
+     +      write(*,*) 'Wrong time value at index  ', i 
+         enddo
+
+         var_id = ncvid(ncid, 'c', status)
+         start(1) = 1 
+         count(1) = 3
+         call ncvgt(ncid, var_id, start, count, c, status)
+         if (status .ne. 0) write(*,*)
+     +      'ncvgt failed for 64-bit float variable c'
+         do i = 1, 3
+            if( abs(c(i) - c_val(i)) .gt. depsilon ) 
+     +      write(*,*) 'Wrong c value at index  ', i 
+         enddo
+
+         var_id = ncvid(ncid, 'date', status)
+         start(1) = 1 
+         count(1) = 12
+         call ncvgt(ncid, var_id, start, count, date, status)
+         if (status .ne. 0) write(*,*) 
+     +      'ncvgt failed for 32-bit integer variable date'
+         do i = 1, 12
+            if( date(i) .ne. date_val(i) ) 
+     +      write(*,*) 'Wrong date value at index  ', i 
+         enddo
+
+
+         var_id = ncvid(ncid, 'a', status)
+         start(1) = 1 
+         start(2) = 1
+         count(1) = 3
+         count(2) = 2
+         call ncvgt(ncid, var_id, start, count, a, status)
+         if (status .ne. 0) write(*,*) 
+     +      'ncvgt failed for 32-bit real variable a'
+         do i = 1, 2
+            do j = 1, 3 
+            if( abs(a(j,i) - a_val(j,i)) .gt. epsilon ) 
+     +      write(*,*) 'Wrong a value at indecies  ', j, ',', i 
+            enddo
+         enddo
+
+
+         var_id = ncvid(ncid, 'b', status)
+         start(1) = 1 
+         start(2) = 1
+         start(3) = 1
+         count(1) = 2 
+         count(2) = 3
+         count(3) = 12
+         call ncvgt(ncid, var_id, start, count, b, status)
+         if (status .ne. 0) write(*,*) 
+     +      'ncvgt failed for 16-bit integer variable b'
+         do i = 1, 12
+            do j = 1, 3 
+               do k = 1, 2
+               if( b(k,j,i) .ne.  b_val(k,j,i)) 
+     +         write(*,*) 
+     +        'Wrong b value at indecies  ', k, ',', j, ',', i 
+               enddo
+            enddo
+         enddo
+
+
+C read global attributes
+
+         call ncagt(ncid, NCGLOBAL, 'int_attr', int_attr, status)
+         if (status .ne. 0) 
+     +   write(*,*) 'ncagt failed for 32-bit integer attribute int_attr'
+         do i = 1, 5
+            if( int_attr(i) .ne. int_attr_val(i) ) 
+     +      write(*,*) 'Wrong int_attr value at index  ', i 
+         enddo
+
+
+         call ncagt(ncid, NCGLOBAL, 'float_attr', float_attr, status)
+         if (status .ne. 0) 
+     +   write(*,*) 'ncagt failed for 32-bit float attribute float_attr'
+         do i = 1, 3 
+            if( abs(float_attr(i) - float_attr_val(i)) .gt. epsilon ) 
+     +      write(*,*) 'Wrong float_attr value at index  ', i 
+         enddo
+
+         call ncagt(ncid, NCGLOBAL, 'double_attr', double_attr, status)
+         if (status .ne. 0) 
+     +   write(*,*) 
+     +   'ncagt failed for 64-bit float attribute double_attr'
+         do i = 1, 3 
+            if( abs(double_attr(i) - double_attr_val(i)) .gt. depsilon ) 
+     +      write(*,*) 'Wrong double_attr value at index  ', i 
+         enddo
+
+
+         call ncagt(ncid, NCGLOBAL, 'short_attr', short_attr, status)
+         if (status .ne. 0) 
+     +   write(*,*) 
+     +   'ncagt failed for 16-bit integer attribute double_attr'
+         do i = 1, 2 
+            if( short_attr(i) .ne. short_attr_val(i) ) 
+     +      write(*,*) 'Wrong short_attr value at index  ', i 
+         enddo
+
+
+         call ncagtc(ncid, NCGLOBAL, 'Description', description, 
+     +               dlen, status)
+         if (status .ne. 0) 
+     +   write(*,*) 
+     +   'ncagt failed for character attribute Description'
+         if (description .ne. 'Attributes') 
+     +   write(*,*) 'Wrong values of the character attribute' 
+
+
+1000     continue
+         return
+         end

Modified: packages/libhdf4/branches/upstream/current/mfhdf/fortran/config/ftest-mac.f
===================================================================
--- packages/libhdf4/branches/upstream/current/mfhdf/fortran/config/ftest-mac.f	2007-05-15 09:05:29 UTC (rev 830)
+++ packages/libhdf4/branches/upstream/current/mfhdf/fortran/config/ftest-mac.f	2007-05-15 09:53:05 UTC (rev 831)
@@ -1,7 +1,7 @@
 c********************************************************************
 c   Copyright 1993, UCAR/Unidata
 c   See netcdf/COPYRIGHT file for copying and redistribution conditions.
-c   $Id: ftest-mac.f,v 1.3 1998/01/17 00:27:53 epourmal Exp $
+c   $Id: ftest-mac.f,v 1.4 2005/02/09 03:04:07 epourmal Exp $
 c********************************************************************/
 
 
@@ -479,7 +479,7 @@
       
       bvalidrg(1) = 1
       bvalidrg(2) = 250
-      call ncapt (ncid, bid, 'validrange', NCBYTE, 2,
+      call ncapt (ncid, bid, 'valid range', NCBYTE, 2,
      +bvalidrg, iret)
 
 c
@@ -488,7 +488,7 @@
 
       svalidrg(1) = -100
       svalidrg(2) = 100
-      call ncapt (ncid, sid, 'validrange', NCSHORT, 2, 
+      call ncapt (ncid, sid, 'valid range', NCSHORT, 2, 
      +svalidrg, iret)
 
 c
@@ -497,7 +497,7 @@
 
       lvalidrg(1) = 0
       lvalidrg(2) = 360
-      call ncapt (ncid, lid, 'validrange', NCLONG, 2,
+      call ncapt (ncid, lid, 'valid range', NCLONG, 2,
      +lvalidrg, iret)
       
 c
@@ -506,7 +506,7 @@
 
       rvalidrg(1) = 0.0
       rvalidrg(2) = 5000.0
-      call ncapt (ncid, fid, 'validrange', NCFLOAT, 2,
+      call ncapt (ncid, fid, 'valid range', NCFLOAT, 2,
      +rvalidrg, iret)
 
 c
@@ -515,7 +515,7 @@
 
       dvalidrg(1) = 0D0
       dvalidrg(2) = 500D0
-      call ncapt (ncid, did, 'validrange', NCDOUBLE, 2,
+      call ncapt (ncid, did, 'valid range', NCDOUBLE, 2,
      +dvalidrg, iret)
 
 c
@@ -565,11 +565,12 @@
       data dimnam /'time', 'lat', 'lon', 'level',
      + 'length', 27*'0'/
       data dimsiz /4, 5, 5, 4, 80, 27*0/
-      data varnam/'bytev', 'shortv', 'longv', 'floatv', 'doublev', 
+      data varnam/'bytev', 'short v', 'longv', 'floatv', 'doublev', 
      + 'chv', 'cv'/
       
-      data attname/'validrange', '0', 'validrange', '0', 'validrange',
-     + '0', 'validrange', '0', 'validrange', '0', 'longname', 'id',
+      data attname/'valid range', '0', 'valid range',
+     + '0', 'valid range',
+     + '0', 'valid range', '0', 'valid range', '0', 'longname', 'id',
      + '0', '0'/
       data gattnam/'source','basetime'/
       end
@@ -818,7 +819,7 @@
 c     short
 c
       sdims(1) = timedim
-      sid = ncvdef (ncid, 'shortv', NCSHORT, 1, sdims, iret)
+      sid = ncvdef (ncid, 'short v', NCSHORT, 1, sdims, iret)
 c
 c     long
 c

Modified: packages/libhdf4/branches/upstream/current/mfhdf/fortran/config/ftest-solaris.f
===================================================================
--- packages/libhdf4/branches/upstream/current/mfhdf/fortran/config/ftest-solaris.f	2007-05-15 09:05:29 UTC (rev 830)
+++ packages/libhdf4/branches/upstream/current/mfhdf/fortran/config/ftest-solaris.f	2007-05-15 09:53:05 UTC (rev 831)
@@ -1,7 +1,7 @@
 c********************************************************************
 c   Copyright 1993, UCAR/Unidata
 c   See netcdf/COPYRIGHT file for copying and redistribution conditions.
-c   $Id: ftest-solaris.f,v 1.3 1998/01/17 00:28:29 epourmal Exp $
+c   $Id: ftest-solaris.f,v 1.6 2005/02/09 03:04:08 epourmal Exp $
 c********************************************************************/
 
 
@@ -106,6 +106,11 @@
 c     test ncadel
       write(*, 100) 'ncadel'
       call tncadel(name2)
+
+c     test reading from NetCDF file
+      write(*, 100) 'NetCDF read'
+      call tread_netcdf()
+
       end
 c
 c     subroutine to test ncacpy
@@ -479,7 +484,7 @@
       
       bvalidrg(1) = 1
       bvalidrg(2) = 250
-      call ncapt (ncid, bid, 'validrange', NCBYTE, 2,
+      call ncapt (ncid, bid, 'valid range', NCBYTE, 2,
      +bvalidrg, iret)
 
 c
@@ -488,7 +493,7 @@
 
       svalidrg(1) = -100
       svalidrg(2) = 100
-      call ncapt (ncid, sid, 'validrange', NCSHORT, 2, 
+      call ncapt (ncid, sid, 'valid range', NCSHORT, 2, 
      +svalidrg, iret)
 
 c
@@ -497,7 +502,7 @@
 
       lvalidrg(1) = 0
       lvalidrg(2) = 360
-      call ncapt (ncid, lid, 'validrange', NCLONG, 2,
+      call ncapt (ncid, lid, 'valid range', NCLONG, 2,
      +lvalidrg, iret)
       
 c
@@ -506,7 +511,7 @@
 
       rvalidrg(1) = 0.0
       rvalidrg(2) = 5000.0
-      call ncapt (ncid, fid, 'validrange', NCFLOAT, 2,
+      call ncapt (ncid, fid, 'valid range', NCFLOAT, 2,
      +rvalidrg, iret)
 
 c
@@ -515,7 +520,7 @@
 
       dvalidrg(1) = 0D0
       dvalidrg(2) = 500D0
-      call ncapt (ncid, did, 'validrange', NCDOUBLE, 2,
+      call ncapt (ncid, did, 'valid range', NCDOUBLE, 2,
      +dvalidrg, iret)
 
 c
@@ -565,11 +570,12 @@
       data dimnam /'time', 'lat', 'lon', 'level',
      + 'length', 27*'0'/
       data dimsiz /4, 5, 5, 4, 80, 27*0/
-      data varnam/'bytev', 'shortv', 'longv', 'floatv', 'doublev', 
+      data varnam/'bytev', 'short v', 'longv', 'floatv', 'doublev', 
      + 'chv', 'cv'/
       
-      data attname/'validrange', '0', 'validrange', '0', 'validrange',
-     + '0', 'validrange', '0', 'validrange', '0', 'longname', 'id',
+      data attname/'valid range', '0', 'valid range',
+     + '0', 'valid range',
+     + '0', 'valid range', '0', 'valid range', '0', 'longname', 'id',
      + '0', '0'/
       data gattnam/'source','basetime'/
       end
@@ -818,7 +824,7 @@
 c     short
 c
       sdims(1) = timedim
-      sid = ncvdef (ncid, 'shortv', NCSHORT, 1, sdims, iret)
+      sid = ncvdef (ncid, 'short v', NCSHORT, 1, sdims, iret)
 c
 c     long
 c
@@ -1218,3 +1224,197 @@
       call ncclos (ncid, iret)
       return
       end
+
+C        This routine reads varaibales and global attributes from
+C        the REAL NetCDF file test_nc.nc. The file was created by NetCDF v3.5 
+C        from the file test_nc.cdl that can be found in the mfhdf/fortran
+C        directory. Please do not generate test_nc.nc file from the test_nc.cdl
+C        using HDF4 ncgen. HDF4 ncgen generated HDF4 file!
+
+         subroutine tread_netcdf()
+         include 'netcdf.inc'
+
+C        Variables declarations
+
+         character*10 FILENAME
+         character*1024 new_filename
+         integer filename_len
+         integer status, ncid, var_id
+         integer time(12), date(12), start(3), count(3), int_attr(5)
+         real a(3,2), float_attr(3)
+         double precision c(3), double_attr(3)
+         integer*2 b(2,3,12), short_attr(2)
+         integer i, j, k, dlen
+         character*10 description
+
+C        Arrays to read data to.
+
+         integer time_val(12), date_val(12), int_attr_val(5)
+         integer*2 b_val(2,3,12), short_attr_val(2)
+         real a_val(3,2), float_attr_val(3)
+         double precision c_val(3), double_attr_val(3)
+         real epsilon
+         double precision depsilon
+         integer external fixname
+
+C        Arrays initialization
+         DATA time_val /1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12/
+         DATA date_val /840116, 840214, 840316, 840415, 840516, 840615, 
+     +              840716, 840816, 840915, 841016, 841115, 841216/
+         DATA a_val /1.0, 2.0, 3.0, 4.0, 5.0, 6.0/
+         DATA b_val /1, 1, 2, 2, 3, 3,
+     +           4, 4, 5, 5, 6, 6,
+     +           7, 7, 8, 8, 9, 9,
+     +           10, 10, 11, 11, 12, 12,
+     +           13, 13, 14, 14, 15, 15,
+     +           16, 16, 17, 17, 18, 18,
+     +           19, 19, 20, 20, 21, 22,
+     +           23, 23, 24, 24, 25, 25, 
+     +           26, 26, 27, 27, 28, 28,
+     +           29, 29, 30, 30, 31, 31,
+     +           32, 32, 33, 33, 34, 34,
+     +           35, 35, 36, 36, 37, 37/
+         DATA c_val /2.0, 3.0, 100/
+         DATA int_attr_val /-100, 200, -300, 400, -500/
+         DATA float_attr_val /1.0, 2.0, 3.0/
+         DATA short_attr_val /0, 1/
+         DATA double_attr_val /-1.0, 2.0, -7.0/
+         DATA epsilon /1.E-6/
+         DATA depsilon /1.E-12/
+         
+
+C        Modify filename to accomodate SRCDIR configure option
+
+         FILENAME = 'test_nc.nc'
+         filename_len = len(new_filename)
+         call fixname(FILENAME, new_filename, filename_len)
+
+         dlen = 10
+         ncid = ncopn(new_filename(1:filename_len), NCNOWRIT, status)
+         if (status .ne.0) then
+             write(*,*) 'ncopn failed'
+             goto 1000
+         endif
+
+         var_id = ncvid(ncid, 'time', status)
+         start(1) = 1 
+         count(1) = 12
+         call ncvgt(ncid, var_id, start, count, time, status)
+         if (status .ne. 0) write(*,*) 
+     +      'ncvgt failed for 32-bit integer variable time'
+         do i = 1, 12
+            if( time(i) .ne. time_val(i) ) 
+     +      write(*,*) 'Wrong time value at index  ', i 
+         enddo
+
+         var_id = ncvid(ncid, 'c', status)
+         start(1) = 1 
+         count(1) = 3
+         call ncvgt(ncid, var_id, start, count, c, status)
+         if (status .ne. 0) write(*,*)
+     +      'ncvgt failed for 64-bit float variable c'
+         do i = 1, 3
+            if( abs(c(i) - c_val(i)) .gt. depsilon ) 
+     +      write(*,*) 'Wrong c value at index  ', i 
+         enddo
+
+         var_id = ncvid(ncid, 'date', status)
+         start(1) = 1 
+         count(1) = 12
+         call ncvgt(ncid, var_id, start, count, date, status)
+         if (status .ne. 0) write(*,*) 
+     +      'ncvgt failed for 32-bit integer variable date'
+         do i = 1, 12
+            if( date(i) .ne. date_val(i) ) 
+     +      write(*,*) 'Wrong date value at index  ', i 
+         enddo
+
+
+         var_id = ncvid(ncid, 'a', status)
+         start(1) = 1 
+         start(2) = 1
+         count(1) = 3
+         count(2) = 2
+         call ncvgt(ncid, var_id, start, count, a, status)
+         if (status .ne. 0) write(*,*) 
+     +      'ncvgt failed for 32-bit real variable a'
+         do i = 1, 2
+            do j = 1, 3 
+            if( abs(a(j,i) - a_val(j,i)) .gt. epsilon ) 
+     +      write(*,*) 'Wrong a value at indecies  ', j, ',', i 
+            enddo
+         enddo
+
+
+         var_id = ncvid(ncid, 'b', status)
+         start(1) = 1 
+         start(2) = 1
+         start(3) = 1
+         count(1) = 2 
+         count(2) = 3
+         count(3) = 12
+         call ncvgt(ncid, var_id, start, count, b, status)
+         if (status .ne. 0) write(*,*) 
+     +      'ncvgt failed for 16-bit integer variable b'
+         do i = 1, 12
+            do j = 1, 3 
+               do k = 1, 2
+               if( b(k,j,i) .ne.  b_val(k,j,i)) 
+     +         write(*,*) 
+     +        'Wrong b value at indecies  ', k, ',', j, ',', i 
+               enddo
+            enddo
+         enddo
+
+
+C read global attributes
+
+         call ncagt(ncid, NCGLOBAL, 'int_attr', int_attr, status)
+         if (status .ne. 0) 
+     +   write(*,*) 'ncagt failed for 32-bit integer attribute int_attr'
+         do i = 1, 5
+            if( int_attr(i) .ne. int_attr_val(i) ) 
+     +      write(*,*) 'Wrong int_attr value at index  ', i 
+         enddo
+
+
+         call ncagt(ncid, NCGLOBAL, 'float_attr', float_attr, status)
+         if (status .ne. 0) 
+     +   write(*,*) 'ncagt failed for 32-bit float attribute float_attr'
+         do i = 1, 3 
+            if( abs(float_attr(i) - float_attr_val(i)) .gt. epsilon ) 
+     +      write(*,*) 'Wrong float_attr value at index  ', i 
+         enddo
+
+         call ncagt(ncid, NCGLOBAL, 'double_attr', double_attr, status)
+         if (status .ne. 0) 
+     +   write(*,*) 
+     +   'ncagt failed for 64-bit float attribute double_attr'
+         do i = 1, 3 
+            if( abs(double_attr(i) - double_attr_val(i)) .gt. depsilon ) 
+     +      write(*,*) 'Wrong double_attr value at index  ', i 
+         enddo
+
+
+         call ncagt(ncid, NCGLOBAL, 'short_attr', short_attr, status)
+         if (status .ne. 0) 
+     +   write(*,*) 
+     +   'ncagt failed for 16-bit integer attribute double_attr'
+         do i = 1, 2 
+            if( short_attr(i) .ne. short_attr_val(i) ) 
+     +      write(*,*) 'Wrong short_attr value at index  ', i 
+         enddo
+
+
+         call ncagtc(ncid, NCGLOBAL, 'Description', description, 
+     +               dlen, status)
+         if (status .ne. 0) 
+     +   write(*,*) 
+     +   'ncagt failed for character attribute Description'
+         if (description .ne. 'Attributes') 
+     +   write(*,*) 'Wrong values of the character attribute' 
+
+
+1000     continue
+         return
+         end

Added: packages/libhdf4/branches/upstream/current/mfhdf/fortran/config/ftest-solaris64.f
===================================================================
--- packages/libhdf4/branches/upstream/current/mfhdf/fortran/config/ftest-solaris64.f	                        (rev 0)
+++ packages/libhdf4/branches/upstream/current/mfhdf/fortran/config/ftest-solaris64.f	2007-05-15 09:53:05 UTC (rev 831)
@@ -0,0 +1,1221 @@
+c********************************************************************
+c   Copyright 1993, UCAR/Unidata
+c   See netcdf/COPYRIGHT file for copying and redistribution conditions.
+c   $Id: ftest-solaris64.f,v 1.4 2005/02/09 03:04:08 epourmal Exp $
+c********************************************************************/
+
+
+
+c
+c     program to test the Sun Fortran jacket interface to the netCDF
+c
+      program ftest
+      
+      include 'netcdf.inc'
+
+c     name of first test cdf
+      character*31 name
+c     name of second test cdf
+      character*31 name2
+      
+c     Returned error code.
+      integer iret 
+c     netCDF ID
+      integer ncid
+c     ID of dimension lat
+      integer  latdim
+c     ID of dimension lon
+      integer londim
+c     ID of dimension level
+      integer leveldim
+c     ID of dimension time
+      integer timedim
+c     ID of dimension len
+      integer lendim
+
+c     variable used to control error-handling behavior
+      integer ncopts
+      integer dimsiz(MAXNCDIM)
+C      allowable roundoff 
+      real epsilon
+      common /dims/timedim, latdim, londim, leveldim, lendim,
+     + dimsiz
+      data name/'test.nc'/
+      data name2/'copy.nc'/
+      data epsilon /.000001/
+      
+100   format('*** Testing ', a, ' ...')
+c     set error-handling to verbose and non-fatal
+      ncopts = NCVERBOS
+      call ncpopt(ncopts)
+
+c     create a netCDF named 'test.nc'
+      write(*,100) 'nccre'
+      ncid = nccre(name, NCCLOB, iret)
+
+c     test ncddef
+      write(*,100) 'ncddef'
+      call tncddef(ncid)
+
+c     test ncvdef
+      write(*,100) 'ncvdef'
+      call tncvdef(ncid)
+
+c     test ncapt
+      write(*, 100) 'ncapt, ncaptc'
+      call tncapt(ncid)
+
+c     close 'test.nc'
+      write(*, 100) 'ncclos'
+      call ncclos(ncid, iret)
+
+c     test ncvpt1
+      write(*, 100) 'ncvpt1'
+      call tncvpt1(name)
+
+c     test ncvgt1
+      write(*, 100) 'ncvgt1'
+      call tncvgt1(name)
+
+c     test ncvpt
+      write(*, 100) 'ncvpt'
+      call tncvpt(name)
+
+c     test ncinq
+      write(*, 100) 'ncopn, ncinq, ncdinq, ncvinq, ncanam, ncainq'
+      call tncinq(name)
+
+c     test ncvgt
+      write(*, 100) 'ncvgt, ncvgtc'
+      call tncvgt(name)
+
+c     test ncagt
+      write(*, 100) 'ncagt, ncagtc'
+      call tncagt(name)
+
+c     test ncredf
+      write(*, 100) 'ncredf, ncdren, ncvren, ncaren, ncendf'
+      call tncredf(name)
+
+      call tncinq(name)
+
+c     test ncacpy
+      write(*, 100) 'ncacpy'
+      call tncacpy(name, name2)
+
+c     test ncadel
+      write(*, 100) 'ncadel'
+      call tncadel(name2)
+      end
+c
+c     subroutine to test ncacpy
+c
+      subroutine tncacpy(iname, oname)
+      character*31 iname, oname
+      include 'netcdf.inc'
+      integer ndims, nvars, natts, recdim, iret
+      character*31 vname, attnam
+      integer attype, attlen
+      integer vartyp, nvdims, vdims(MAXVDIMS), nvatts
+      integer lenstr
+c     existing netCDF id
+      integer incdf
+c     netCDF id of the output netCDF file to which the attribute
+c     will be copied
+      integer outcdf
+
+      integer mattlen
+      parameter (mattlen = 80)
+      character*80 charval
+      double precision doubval(2)
+      real flval(2)
+      integer lngval(2)
+      integer*2 shval(2)
+      integer i, j, k
+      character*31 varnam, attname(2,7), gattnam(2)
+      byte bytval(2)
+      common /atts/attname, gattnam
+      integer*2 svalidrg(2)
+      real rvalidrg(2)
+      integer lvalidrg(2)
+      double precision dvalidrg(2)
+      byte bvalidrg(2)
+      character*31 gavalue(2), cavalue(2)
+      real epsilon
+
+      data bvalidrg/1,110/
+      data svalidrg/-100,100/
+      data lvalidrg/0,360/
+      data rvalidrg/0.0, 5000.0/
+      data dvalidrg/0D0,500D0/
+      data gavalue/'NWS', '88/10/25 12:00:00'/
+      data cavalue/'test string', 'a'/
+      data lenstr/80/	
+      data epsilon /.000001/
+
+      incdf = ncopn(iname, NCNOWRIT, iret)
+      outcdf = nccre(oname, NCCLOB, iret)
+      call tncddef(outcdf)
+      call tncvdef(outcdf)
+      call ncinq (incdf, ndims, nvars, natts, recdim, iret)
+      do 5 j = 1, natts
+         call ncanam (incdf, NCGLOBAL, j, attnam, iret)
+         call ncacpy (incdf, NCGLOBAL, attnam, outcdf, NCGLOBAL, iret)
+ 5    continue
+      do 10 i = 1, nvars
+         call ncvinq (incdf, i, vname, vartyp, nvdims,
+     +        vdims, nvatts, iret)
+         do 20 k = 1, nvatts
+            call ncanam (incdf, i, k, attnam, iret)
+            call ncacpy (incdf, i, attnam, outcdf, i, iret)
+ 20      continue
+ 10   continue
+c     
+c     get global attributes first
+c     
+      do 100 i = 1, natts
+         call ncanam (outcdf, NCGLOBAL, i, attnam, iret)
+         call ncainq (outcdf, NCGLOBAL, attnam, attype, attlen,
+     +        iret)
+         if (attlen .gt. mattlen) then
+            write (*,*) 'global attribute too big!', attlen, mattlen
+            stop 'Stopped'
+         else if (attype .eq. NCBYTE) then
+            call ncagt (outcdf, NCBYTE, attnam, bytval, iret)
+         else if (attype .eq. NCCHAR) then
+            call ncagtc (outcdf, NCGLOBAL, attnam, charval, 
+     +           lenstr, iret)
+            if (attnam .ne. gattnam(i)) write(*,*) 'error in ncagt G'
+            if (charval .ne. gavalue(i))
+     + write(*,*) 'error in ncagt G2', lenstr, charval, gavalue(i)
+                  charval = ' '                                    
+         else if (attype .eq. NCSHORT) then
+            call ncagt (outcdf, NCGLOBAL, attnam, shval, iret) 
+         else if (attype .eq. NCLONG) then
+            call ncagt (outcdf, NCGLOBAL, attnam, lngval, iret)            
+         else if (attype .eq. NCFLOAT) then
+            call ncagt (outcdf, NCGLOBAL, attnam, flval, iret)
+         else 
+            call ncagt (outcdf, NCGLOBAL, attnam, doubval,iret)          
+         end if
+ 100   continue
+c
+c     get variable attributes
+c
+      do 200 i = 1, nvars
+         call ncvinq (outcdf, i, varnam, vartyp, nvdims, vdims,
+     +                nvatts, iret)
+         do 250 j = 1, nvatts
+            call ncanam (outcdf, i, j, attnam, iret)
+            call ncainq (outcdf, i, attnam, attype, attlen,
+     +                   iret)
+            if (attlen .gt. mattlen) then
+               write (*,*) 'variable ', i,  'attribute too big !'
+               stop 'Stopped'
+            else 
+               if (attype .eq. NCBYTE) then
+                  call ncagt (outcdf, i, attnam, bytval, 
+     +                 iret)
+                  if (attnam .ne. attname(j,i))
+     +       write(*,*) 'error in ncagt BYTE N'
+                  if (bytval(j) .ne. bvalidrg(j)) write(*,*)
+     + 'ncacpy: byte ', bytval(j), ' .ne. ', bvalidrg(j)
+               else if (attype .eq. NCCHAR) then
+                  call ncagtc (outcdf, i, attnam, charval, 
+     +                 lenstr, iret)
+                  if (attnam .ne. attname(j,i)) write(*,*)
+     +  'error in ncagt CHAR N'
+                  if (charval .ne. cavalue(j)) write(*,*)
+     +  'error in ncagt'
+                  charval = ' '                                   
+               else if (attype .eq. NCSHORT) then
+                  call ncagt (outcdf, i, attnam, shval, 
+     +                 iret)  
+                  if (attnam .ne. attname(j,i)) write(*,*)
+     + 'error in ncagt SHORT N'
+                  if (shval(j) .ne. svalidrg(j)) then
+                     write(*,*) 'error in ncagt SHORT'
+                  end if
+               else if (attype .eq. NCLONG) then
+                  call ncagt (outcdf, i, attnam, lngval, 
+     +                 iret)
+                  if (attnam .ne. attname(j,i)) write(*,*)
+     + 'error in ncagt LONG N'
+                  if (lngval(j) .ne. lvalidrg(j)) write(*,*)
+     + 'error in ncagt LONG'
+               else if (attype .eq. NCFLOAT) then
+                  call ncagt (outcdf, i, attnam, flval, 
+     +                 iret)            
+                  if (attnam .ne. attname(j,i)) write(*,*)
+     + 'error in ncagt FLOAT N'
+                  if (flval(j) .ne. rvalidrg(j)) write(*,*)
+     + 'error in ncagt FLOAT'
+               else if (attype .eq. NCDOUBLE) then
+                  call ncagt (outcdf, i, attnam, doubval,
+     +                 iret)          
+                  if (attnam .ne. attname(j,i)) write(*,*)
+     + 'error in ncagt DOUBLE N'
+                  if ( abs(doubval(j) - dvalidrg(j)) .gt. epsilon)
+     + write(*,*) 'error in ncagt DOUBLE'
+               end if
+            end if
+ 250     continue
+ 200   continue
+      call ncclos(incdf, iret)
+      call ncclos(outcdf, iret)
+      return
+      end
+
+
+      
+c     
+c     subroutine to test ncadel
+c
+      subroutine tncadel (cdfname)
+      character*31 cdfname
+      include 'netcdf.inc'
+      
+      integer  bid, sid, lid, fid, did, cid, chid
+      common /vars/bid, sid, lid, fid, did, cid, chid
+      integer ncid, iret, i, j
+      integer ndims, nvars, natts, recdim
+      integer vartyp, nvdims, vdims(MAXVDIMS), nvatts
+      character*31 varnam, attnam
+
+      ncid = ncopn(cdfname, NCWRITE, iret)
+c     put cdf in define mode
+      call ncredf (ncid,iret)
+c     get number of global attributes
+      call ncinq (ncid, ndims, nvars, natts, recdim, iret)
+      do 10 i = natts, 1, -1
+c     get name of global attribute
+         call ncanam (ncid, NCGLOBAL, i, attnam, iret)
+c     delete global attribute
+         call ncadel (ncid, NCGLOBAL, attnam, iret)
+ 10   continue
+
+      do 100 i = 1, nvars
+c     get number of variable attributes
+         call ncvinq (ncid, i, varnam, vartyp, nvdims, vdims,
+     +        nvatts, iret)
+         do 200 j = nvatts, 1, -1
+            call ncanam (ncid, i, j, attnam, iret)
+            call ncadel (ncid, i, attnam, iret)
+ 200     continue
+ 100  continue
+      call ncinq (ncid, ndims, nvars, natts, recdim, iret)
+      if (natts .ne. 0) write(*,*) 'error in ncadel'
+c     put netCDF into data mode
+      call ncendf (ncid, iret)
+      call ncclos (ncid, iret)
+      return
+      end
+
+c
+c     subroutine to test ncagt and ncagtc
+
+      subroutine tncagt(cdfname)
+      include 'netcdf.inc'
+      character*31 cdfname
+            
+c     maximum length of an attribute
+      integer mattlen
+      parameter (mattlen = 80)
+      integer ncid, ndims, nvars, natts, recdim
+      integer bid, sid, lid, fid, did, cid, chid
+      common /vars/bid, sid, lid, fid, did, cid, chid
+      integer i, j
+      integer attype, attlen, lenstr, iret
+      character*31 attnam
+      character*80 charval
+      double precision doubval(2)
+      real flval(2)
+      integer lngval(2)
+      integer*2 shval(2)
+      byte bytval(2)
+      integer vartyp, nvdims, vdims(MAXVDIMS), nvatts
+
+      character*31 varnam, attname(2,7), gattnam(2)
+      common /atts/attname, gattnam
+      integer*2 svalidrg(2)
+      real rvalidrg(2)
+      integer lvalidrg(2)
+      double precision dvalidrg(2)
+      byte bvalidrg(2)
+      character*31 gavalue(2), cavalue(2)
+      real epsilon
+
+      data bvalidrg/1,110/
+      data svalidrg/-100,100/
+      data lvalidrg/0,360/
+      data rvalidrg/0.0, 5000.0/
+      data dvalidrg/0D0,500D0/
+      data gavalue/'NWS', '88/10/25 12:00:00'/
+      data cavalue/'test string', 'a'/
+      data lenstr/80/	
+      data epsilon /.000001/
+      
+      ncid = ncopn (cdfname, NCNOWRIT, iret)
+      call ncinq (ncid, ndims, nvars, natts, recdim, iret)
+c     
+c     get global attributes first
+c     
+      do 10 i = 1, natts
+c     get name of attribute
+         call ncanam (ncid, NCGLOBAL, i, attnam, iret)
+c     get attribute type and length
+         call ncainq (ncid, NCGLOBAL, attnam, attype, attlen,
+     +        iret)
+         if (attlen .gt. mattlen) then
+            write (*,*) 'global attribute too big!'
+            stop 'Stopped'
+         else if (attype .eq. NCBYTE) then
+            call ncagt (ncid, NCBYTE, attnam, bytval, iret)
+         else if (attype .eq. NCCHAR) then
+            call ncagtc (ncid, NCGLOBAL, attnam, charval, 
+     +           lenstr, iret)
+            if (attnam .ne. gattnam(i)) write(*,*) 'error in ncagt'
+            if (charval .ne. gavalue(i)) write(*,*) 'error in ncagt'
+            charval = '                                        '
+         else if (attype .eq. NCSHORT) then
+            call ncagt (ncid, NCGLOBAL, attnam, shval, iret) 
+         else if (attype .eq. NCLONG) then
+            call ncagt (ncid, NCGLOBAL, attnam, lngval, iret)            
+         else if (attype .eq. NCFLOAT) then
+            call ncagt (ncid, NCGLOBAL, attnam, flval, iret)
+         else 
+            call ncagt (ncid, NCGLOBAL, attnam, doubval,iret)          
+         end if
+ 10   continue
+
+c
+c     get variable attributes
+c
+      do 20 i = 1, nvars
+         call ncvinq (ncid, i, varnam, vartyp, nvdims, vdims,
+     +                nvatts, iret)
+         do 25 j = 1, nvatts
+            call ncanam (ncid, i, j, attnam, iret)
+            call ncainq (ncid, i, attnam, attype, attlen,
+     +                   iret)
+            if (attlen .gt. mattlen) then
+               write (*,*) 'variable ', i,  'attribute too big !'
+               stop 'Stopped'
+            else 
+               if (attype .eq. NCBYTE) then
+                  call ncagt (ncid, i, attnam, bytval, 
+     +                 iret)
+                  if (attnam .ne. attname(j,i)) write(*,*)
+     + 'error in ncagt BYTE name'
+                  if (bytval(j) .ne. bvalidrg(j)) write(*,*)
+     + 'ncacpy: byte ', bytval(j), ' .ne. ', bvalidrg(j)
+               else if (attype .eq. NCCHAR) then
+                  call ncagtc (ncid, i, attnam, charval, 
+     +                 lenstr, iret)
+                  if (attnam .ne. attname(j,i)) write(*,*)
+     + 'error in ncagt CHAR name'
+                  if (charval .ne. cavalue(j)) write(*,*)
+     + 'error in ncagt CHAR name'
+	         charval = '                                        '
+               else if (attype .eq. NCSHORT) then
+                  call ncagt (ncid, i, attnam, shval, 
+     +                 iret)  
+                  if (attnam .ne. attname(j,i)) write(*,*)
+     + 'error in ncagt SHORT name'
+                  if (shval(j) .ne. svalidrg(j)) then
+                     write(*,*) 'error in ncagt SHORT'
+                  end if
+               else if (attype .eq. NCLONG) then
+                  call ncagt (ncid, i, attnam, lngval, 
+     +                 iret)
+                  if (attnam .ne. attname(j,i)) write(*,*)
+     + 'error in ncagt LONG name'
+                  if (lngval(j) .ne. lvalidrg(j)) write(*,*)
+     + 'error in ncagt LONG'
+               else if (attype .eq. NCFLOAT) then
+                  call ncagt (ncid, i, attnam, flval, 
+     +                 iret)            
+                  if (attnam .ne. attname(j,i)) write(*,*)
+     + 'error in ncagt FLOAT name'
+                  if (flval(j) .ne. rvalidrg(j)) write(*,*)
+     + 'error in ncagt FLOAT'
+               else if (attype .eq. NCDOUBLE) then
+                  call ncagt (ncid, i, attnam, doubval,
+     +                 iret)          
+                  if (attnam .ne. attname(j,i)) write(*,*)
+     + 'error in ncagt DOUBLE name'
+                  if ( abs(doubval(j) - dvalidrg(j)) .gt. epsilon)
+     + write(*,*) 'error in ncagt DOUBLE'
+               end if
+            end if
+ 25      continue
+ 20   continue
+      call ncclos(ncid, iret)
+      return
+      end
+c
+c     subroutine to test ncapt
+c
+      subroutine tncapt (ncid)
+      include 'netcdf.inc'
+      integer ncid, iret
+
+c attribute vectors
+      integer*2 svalidrg(2)
+      real rvalidrg(2)
+      integer lvalidrg(2)
+      double precision dvalidrg(2)
+      byte bvalidrg(2)
+
+c     variable ids
+      integer  bid, sid, lid, fid, did, cid, chid
+      common /vars/bid, sid, lid, fid, did, cid, chid
+
+c assign attributes
+      
+c
+c     byte
+c
+      
+      bvalidrg(1) = 1
+      bvalidrg(2) = 250
+      call ncapt (ncid, bid, 'valid range', NCBYTE, 2,
+     +bvalidrg, iret)
+
+c
+c     short
+c
+
+      svalidrg(1) = -100
+      svalidrg(2) = 100
+      call ncapt (ncid, sid, 'valid range', NCSHORT, 2, 
+     +svalidrg, iret)
+
+c
+c     long
+c
+
+      lvalidrg(1) = 0
+      lvalidrg(2) = 360
+      call ncapt (ncid, lid, 'valid range', NCLONG, 2,
+     +lvalidrg, iret)
+      
+c
+c     float
+c
+
+      rvalidrg(1) = 0.0
+      rvalidrg(2) = 5000.0
+      call ncapt (ncid, fid, 'valid range', NCFLOAT, 2,
+     +rvalidrg, iret)
+
+c
+c     double
+c
+
+      dvalidrg(1) = 0D0
+      dvalidrg(2) = 500D0
+      call ncapt (ncid, did, 'valid range', NCDOUBLE, 2,
+     +dvalidrg, iret)
+
+c
+c     global
+c
+
+      call ncaptc (ncid, NCGLOBAL, 'source', NCCHAR, 3, 
+     +'NWS', iret)
+      call ncaptc (ncid, NCGLOBAL, 'basetime', NCCHAR, 17, 
+     +'88/10/25 12:00:00', iret)
+
+c
+c     char
+c
+
+      call ncaptc (ncid, chid, 'longname', NCCHAR, 11,
+     +'test string', iret)
+
+      call ncaptc (ncid, chid, 'id', NCCHAR, 1,
+     +'a', iret)
+
+      return
+      end
+
+c
+c     initialize variables in labelled common blocks
+c
+      block data
+      common /cdims/ dimnam
+      common /dims/timedim, latdim, londim, leveldim, lendim,
+     + dimsiz
+      common /varn/varnam
+      common /atts/attname, gattnam
+      integer  latdim, londim, leveldim, timedim, lendim
+
+c     should include 'netcdf.inc' for MAXNCDIM, but it has EXTERNAL
+c     declaration, which is not permitted in a BLOCK DATA unit.
+
+c      integer dimsiz(MAXNCDIM)
+      integer dimsiz(32)
+c      character*31 dimnam(MAXNCDIM)
+      character*31 dimnam(32)
+      character*31 varnam(7)
+      character*31 attname(2,7)
+      character*31 gattnam(2)
+
+      data dimnam /'time', 'lat', 'lon', 'level',
+     + 'length', 27*'0'/
+      data dimsiz /4, 5, 5, 4, 80, 27*0/
+      data varnam/'bytev', 'short v', 'longv', 'floatv', 'doublev', 
+     + 'chv', 'cv'/
+      
+      data attname/'valid range', '0', 'valid range',
+     + '0', 'valid range',
+     + '0', 'valid range', '0', 'valid range', '0', 'longname', 'id',
+     + '0', '0'/
+      data gattnam/'source','basetime'/
+      end
+
+
+c
+c     subroutine to test ncddef
+c
+
+      subroutine tncddef(ncid)
+      include 'netcdf.inc'
+      integer ncid
+
+c     sizes of dimensions of 'test.nc' and 'copy.nc'
+      integer  ndims
+      parameter(ndims=5)
+c dimension ids
+      integer  latdim, londim, leveldim, timedim, lendim
+      integer iret
+c     function to define a netCDF dimension
+      integer dimsiz(MAXNCDIM)
+      character*31 dimnam(MAXNCDIM)
+      
+      common /dims/timedim, latdim, londim, leveldim, lendim,
+     + dimsiz
+      common /cdims/ dimnam
+
+c define dimensions
+      timedim = ncddef(ncid, dimnam(1), NCUNLIM, iret)
+      latdim = ncddef(ncid, dimnam(2), dimsiz(2), iret)
+      londim = ncddef(ncid, dimnam(3), dimsiz(3), iret)
+      leveldim = ncddef(ncid, dimnam(4), dimsiz(4), iret)
+      lendim = ncddef(ncid, dimnam(5), dimsiz(5), iret)
+      return
+      end
+c
+c     subroutine to test ncinq, ncdinq, ncdid, ncvinq, ncanam
+c     and ncainq
+c
+      subroutine tncinq(cdfname)
+      include 'netcdf.inc'
+      character*31 cdfname
+
+c     netCDF id
+      integer ncid
+c     returned number of dimensions
+      integer ndims
+c     returned number of variables
+      integer nvars
+c     returned number of global attributes
+      integer natts
+c     returned id of the unlimited dimension
+      integer recdim
+c     returned error code
+      integer iret
+c     returned name of record dimension
+      character*31 recnam
+c     returned size of record dimension
+      integer recsiz
+c     loop control variables
+      integer i, j, k
+c     returned size of dimension
+      integer dsize
+c     returned dimension ID
+      integer dimid
+c     returned dimension name
+      character*31 dname
+c     returned variable name
+      character*31 vname
+c     returned attribute name
+      character*31 attnam
+c     returned netCDF datatype of variable
+      integer vartyp
+c     returned number of variable dimensions
+      integer nvdims
+c     returned number of variable attributes
+      integer nvatts
+c     returned vector of nvdims dimension IDS corresponding to the
+c     variable dimensions
+      integer vdims(MAXNCDIM)
+c     returned attribute length
+      integer attlen
+c     returned attribute type
+      integer attype
+      character*31 dimnam(MAXNCDIM)
+      character*31 varnam(7)
+      character*31 attname(2,7)
+      character*31 gattnam(2)
+      integer vdlist(5,7), vtyp(7), vndims(7), vnatts(7)
+      integer attyp(2,7),atlen(2,7),gattyp(2),gatlen(2)
+      integer timedim,latdim,londim,leveldim,lendim
+      integer dimsiz(MAXNCDIM)
+      common /dims/timedim, latdim, londim, leveldim, lendim,
+     + dimsiz
+      common /varn/varnam
+      common /atts/attname, gattnam
+      common /cdims/ dimnam
+
+      data vdlist/1,0,0,0,0,1,0,0,0,0,2,0,0,0,0,4,3,2,1,0,4,3,2,1,0,
+     + 5,1,0,0,0,1,0,0,0,0/
+      data vtyp/NCBYTE, NCSHORT, NCLONG, NCFLOAT, NCDOUBLE, NCCHAR,
+     + NCCHAR/
+      data vndims/1,1,1,4,4,2,1/
+      data vnatts/1,1,1,1,1,2,0/
+      data attyp/NCBYTE, 0, NCSHORT, 0, NCLONG, 0, NCFLOAT, 0,
+     + NCDOUBLE, 0, NCCHAR, NCCHAR, 0, 0/
+      data atlen/2,0,2,0,2,0,2,0,2,0,11,1, 0, 0/
+      data gattyp/NCCHAR,NCCHAR/
+      data gatlen/3,17/
+
+      ncid = ncopn (cdfname, NCNOWRIT, iret)
+      call ncinq (ncid, ndims, nvars, natts, recdim, iret)
+      if (ndims .ne. 5) write(*,*) 'error in ncinq or ncddef'
+      if (nvars .ne. 7) write(*,*) 'error in ncinq or ncvdef'
+      if (natts .ne. 2) write(*,*) 'error in ncinq or ncapt'
+      call ncdinq (ncid, recdim, recnam, recsiz, iret)
+      if (recnam .ne. 'time') write(*,*) 'error: bad recdim from ncinq'
+c
+c     dimensions
+c
+      do 10 i = 1, ndims
+         call ncdinq (ncid, i, dname, dsize, iret)
+         if (dname .ne. dimnam(i)) write(*,*)
+     + 'error in ncdinq or ncddef, dname=', dname
+         if (dsize .ne. dimsiz(i)) write(*,*)
+     + 'error in ncdinq or ncddef, dsize=',dsize
+         dimid = ncdid (ncid, dname, iret)
+         if (dimid .ne. i) write(*,*)
+     +      'error in ncdinq or ncddef, dimid=', dimid
+ 10   continue
+c
+c     variables
+c
+      do 30 i = 1, nvars
+         call ncvinq (ncid, i, vname, vartyp, nvdims,
+     +        vdims, nvatts, iret)
+         if (vname .ne. varnam(i)) write(*,*)
+     +  'error: from ncvinq, wrong  name returned: ', vname,
+     +  ' .ne. ', varnam(i)
+         if (vartyp .ne. vtyp(i)) write(*,*)
+     + 'error: from ncvinq, wrong type returned: ', vartyp,
+     + ' .ne. ', vtyp(i)
+         if (nvdims .ne. vndims(i)) write(*,*)
+     + 'error: from ncvinq, wrong num dims returned: ', vdims,
+     + ' .ne. ', vndims(i)
+         do 35 j = 1, nvdims
+            if (vdims(j) .ne. vdlist(j,i)) write(*,*)
+     + 'error: from ncvinq wrong dimids: ', vdims(j),
+     + ' .ne. ', vdlist(j,i)
+ 35      continue
+         if (nvatts .ne. vnatts(i)) write(*,*)
+     + 'error in ncvinq or ncvdef'
+c
+c     attributes
+c
+         do 45 k = 1, nvatts
+            call ncanam (ncid, i, k, attnam, iret)
+            call ncainq (ncid, i, attnam, attype, attlen, iret)
+            if (attnam .ne. attname(k,i)) write(*,*)
+     + 'error in ncanam or ncapt'
+            if (attype .ne. attyp(k,i)) write(*,*)
+     + 'error in ncainq or ncapt'
+            if (attlen .ne. atlen(k,i)) write(*,*)
+     + 'error in ncainq or ncapt'
+ 45      continue
+ 30   continue
+      do 40 i = 1, natts
+         call ncanam (ncid, NCGLOBAL, i, attnam, iret)
+         call ncainq (ncid, NCGLOBAL, attnam, attype, attlen, iret)
+         if (attnam .ne. gattnam(i)) write(*,*)
+     + 'error in ncanam or ncapt'
+         if (attype .ne. gattyp(i)) write(*,*)
+     + 'error in ncainq or ncapt'
+         if (attlen .ne. gatlen(i)) write(*,*)
+     + 'error in ncainq or ncapt'
+ 40   continue
+      call ncclos(ncid, iret)
+      return
+      end
+      
+      
+      
+c     subroutine to test ncredf, ncdren, ncvren, ncaren, and 
+c     ncendf
+
+      subroutine tncredf(cdfname)
+      include 'netcdf.inc'
+      character*31 cdfname
+      character*31 attname(2,7)
+      character*31 gattnam(2)
+      common /atts/attname, gattnam
+      common /cdims/ dimnam
+      character*31 dimnam(MAXNCDIM)
+      character*31 varnam(7)
+      common /varn/varnam
+      integer ncid, iret, latid, varid
+
+      dimnam(2) = 'latitude'
+      varnam(4) = 'realv'
+      attname(1,6) = 'stringname'
+      gattnam(1) = 'agency'
+      ncid = ncopn(cdfname, NCWRITE, iret)
+      call ncredf(ncid, iret)
+      latid = ncdid(ncid, 'lat', iret)
+      call ncdren(ncid, latid, 'latitude', iret)
+      varid = ncvid(ncid, 'floatv', iret)
+      call ncvren(ncid, varid, 'realv', iret)
+      varid = ncvid(ncid, 'chv', iret)
+      call ncaren(ncid, varid, 'longname', 'stringname', iret)
+      call ncaren(ncid, NCGLOBAL, 'source', 'agency', iret)
+      call ncendf(ncid, iret)
+      call ncclos(ncid, iret)
+      return
+      end
+c     
+c     subroutine to test ncvdef
+c
+
+      subroutine tncvdef(ncid)
+      include 'netcdf.inc'
+      integer ncid
+
+c     function to define a netCDF variable
+      integer dimsiz(MAXNCDIM)
+      integer  latdim, londim, leveldim, timedim, lendim
+      common /dims/timedim, latdim, londim, leveldim, lendim, 
+     + dimsiz
+
+c variable ids
+      integer  bid, sid, lid, fid, did, cid, chid
+      common /vars/bid, sid, lid, fid, did, cid, chid
+
+c variable shapes
+      integer  bdims(1), fdims(4), ddims(4), ldims(1), sdims(1) 
+      integer chdims(2), cdims(1)
+
+      integer iret
+c
+c define variables
+c
+c     byte
+c 
+      bdims(1) = timedim
+      bid = ncvdef(ncid, 'bytev', NCBYTE, 1, bdims, iret)
+c
+c     short
+c
+      sdims(1) = timedim
+      sid = ncvdef (ncid, 'short v', NCSHORT, 1, sdims, iret)
+c
+c     long
+c
+      ldims(1) = latdim
+      lid = ncvdef (ncid, 'longv', NCLONG, 1, ldims, iret)
+c
+c     float
+c
+      fdims(4) = timedim
+      fdims(1) = leveldim
+      fdims(2) = londim
+      fdims(3) = latdim
+      fid = ncvdef (ncid, 'floatv', NCFLOAT, 4, fdims, iret)
+c
+c     double
+c
+      ddims(4) = timedim
+      ddims(1) = leveldim
+      ddims(2) = londim
+      ddims(3) = latdim
+      did = ncvdef (ncid, 'doublev', NCDOUBLE, 4, ddims, iret)
+c
+c     char
+c
+      chdims(2) = timedim
+      chdims(1) = lendim
+      chid = ncvdef (ncid, 'chv', NCCHAR, 2, chdims, iret)
+
+      cdims(1) = timedim
+      cid = ncvdef (ncid, 'cv', NCCHAR, 1, cdims, iret)
+
+
+      return
+      end
+
+
+c    
+c     subroutine to test ncvgt and ncvgtc
+c
+      subroutine tncvgt(cdfname)
+      include 'netcdf.inc'
+      character*31 cdfname
+
+      integer ndims, times, lats, lons, levels, lenstr
+      parameter (times=4, lats=5, lons=5, levels=4)
+
+      integer start(MAXNCDIM), count(MAXNCDIM)
+      integer ncid, iret, i, m
+      integer  latdim, londim, leveldim, timedim, lendim
+      integer dimsiz(MAXNCDIM)
+      common /dims/timedim, latdim, londim, leveldim, lendim,
+     + dimsiz
+
+      integer bid, sid, lid, fid, did, cid, chid
+      common /vars/bid, sid, lid, fid, did, cid, chid
+      integer itime, ilev, ilat, ilon
+
+c     arrays of data values to be read
+      byte barray(times), byval(times)
+      integer*2 sarray(times), shval(times)
+      integer larray(lats)
+      real farray(levels, lats, lons, times)
+      double precision darray(levels, lats, lons, times)
+c     character array of data values to be read
+      character*31 string
+      character*31 varnam
+      integer nvars, natts, recdim
+      integer vartyp, nvdims, vdims(MAXVDIMS), nvatts
+
+      data start/1,1,1,1, 28*0/, count/levels, lats, lons, times, 28*0/
+      data byval /97, 98, 99, 100/
+      data shval /10, 11, 12, 13/
+
+      ncid = ncopn (cdfname, NCWRITE, iret)
+c     get number of variables in netCDF
+      call ncinq (ncid, ndims, nvars, natts, recdim, iret)
+      do 5 m = 1, nvars-1
+c     get variable name, datatype, number of dimensions
+c     vector of dimension ids, and number of variable attributes
+         call ncvinq (ncid, m, varnam, vartyp, nvdims, vdims,
+     +                nvatts, iret)
+         if (vartyp .eq. NCBYTE) then
+c
+c     byte
+c
+            count(1) = times
+            call ncvgt (ncid, m, start, count, barray, iret)
+            do 10 i = 1, times
+               if (barray(i) .ne. byval(i)) then 
+                  write(*,*) 'ncvgt of bytes, got ', barray(i), ' .ne. '
+     +			     , byval(i)
+               end if
+ 10         continue
+         else if (vartyp .eq. NCSHORT) then
+c
+c     short
+c
+            count(1) = times
+            call ncvgt (ncid, m, start, count, sarray, iret)
+            do 20 i = 1, times
+               if (sarray(i) .ne. shval(i)) then 
+                  write(*,*) 'ncvgt of short, got ', sarray(i), ' .ne. '
+     +			     , shval(i)
+               end if
+ 20         continue
+         else if (vartyp .eq. NCLONG) then
+c     
+c     long
+c
+            count(1) = lats
+            call ncvgt (ncid, m, start, count, larray, iret)
+            do 30 i = 1, lats
+               if (larray(i) .ne. 1000) then 
+                  write(*,*) 'long error in ncvgt'
+               end if
+ 30         continue
+         else if (vartyp .eq. NCFLOAT) then
+c     
+c     float
+c
+            count(1) = levels
+            call ncvgt (ncid, m, start, count, farray, iret)
+            i = 0
+            do 40 itime = 1,times
+               do 40 ilon = 1, lons
+                  do 40 ilat = 1, lats
+                     do 40 ilev = 1, levels
+                        i = i + 1
+                        if (farray(ilev, ilat, ilon, itime) .ne.
+     + real(i)) then
+                           write (*,*) 'float error in ncvgt'
+                        end if
+ 40         continue
+         else if (vartyp .eq. NCDOUBLE) then
+c
+c     double
+c
+            count(1) = levels
+            call ncvgt (ncid, m, start, count, darray, iret)
+            i = 0
+            do 50 itime = 1, times
+               do 50 ilon = 1, lons
+                  do 50 ilat = 1, lats
+                     do 50 ilev = 1, levels
+                        i = i + 1
+                        if (darray(ilev, ilat, ilon, itime) .ne.
+     +                       real(i)) then
+                           write(*,*) 'double error in ncvgt:', i,
+     +              darray(ilev, ilat, ilon, itime), '.ne.', real(i)
+                        end if
+ 50         continue
+         else 
+c     
+c     char
+c
+	    count(1) = 3
+	    count(2) = 4
+	    lenstr = 31
+            call ncvgtc (ncid, m, start, count, string, lenstr, iret)
+            if (string .ne. 'testhikin of') then 
+               write(*,*) 'error in ncvgt, returned string =', string
+            end if
+         end if
+ 5    continue
+      call ncclos(ncid, iret)
+      return
+      end
+
+      
+      subroutine tncvgt1(cdfname)
+      include 'netcdf.inc'
+      character*31 cdfname
+
+      integer ncid, iret
+      integer  latdim, londim, leveldim, timedim, lendim
+      integer dimsiz(MAXNCDIM)
+      common /dims/timedim, latdim, londim, leveldim, lendim,
+     + dimsiz
+
+      integer bindx, sindx, lindx, findx(4), dindx(4), cindx
+
+      integer bid, sid, lid, fid, did, cid, chid
+      common /vars/bid, sid, lid, fid, did, cid, chid
+
+      byte bvalue
+      integer*2 svalue
+      integer lvalue
+      real fvalue
+      double precision dvalue
+      character*1 c
+      real epsilon
+      double precision onethird
+
+      data epsilon /.000001/
+      data lindx/1/, bindx/1/, sindx/1/, findx/1,1,1,1/
+     +dindx/1,1,1,1/, cindx/1/
+      data onethird/0.3333333333D0/
+      
+      ncid = ncopn (cdfname, NCNOWRIT, iret)
+c
+c     test ncvgt1 for byte
+c
+      call ncvgt1 (ncid, bid, bindx, bvalue, iret)
+      if (bvalue .ne. ichar('z')) write(*,*) 'error in ncvgt1 byte:',
+     + bvalue, ' .ne.', ichar('z')
+c
+c     test ncvgt1 for short
+c
+      call ncvgt1 (ncid, sid, sindx, svalue, iret)
+      if (svalue .ne. 10) write(*,*) 'error in ncvgt1 short:',
+     + svalue, ' .ne.', 10
+c     
+c     test ncvgt1 for long
+c
+      call ncvgt1 (ncid, lid, lindx, lvalue, iret)
+      if (lvalue .ne. 1000) write(*,*) 'error in ncvgt1 long:',
+     + lvalue,  ' .ne.', 1000
+c
+c     test ncvgt1 for float
+c
+      call ncvgt1 (ncid, fid, findx, fvalue, iret)
+      if (abs(fvalue - 3.14159) .gt. epsilon) write(*,*)
+     + 'error in ncvgt1 float:', fvalue, ' not close to', 3.14159
+c
+c     test ncvgt1 for double
+c
+      call ncvgt1 (ncid, did, dindx, dvalue, iret)
+      if (abs(dvalue - onethird) .gt. epsilon) write(*,*)
+     + 'error in ncvgt1 double:', dvalue, ' not close to',
+     +     onethird
+c
+c     test ncvg1c for char
+c
+      call ncvg1c (ncid, cid, cindx, c, iret)
+      if (c .ne. 'a') write(*,*) 'error in ncvg1c'
+      call ncclos(ncid, iret)
+      return
+      end
+
+      
+      
+c
+c     subroutine to test ncvpt and ncvptc
+c
+      subroutine tncvpt(cdfname)
+      include 'netcdf.inc'
+      character*31 cdfname
+
+c     size of dimensions
+      integer times, lats, lons, levels
+      parameter (times=4, lats=5, lons=5, levels=4)
+
+      integer ncid, iret
+c     loop control variables
+      integer itime, ilev, ilon, ilat, i
+      integer  latdim, londim, leveldim, timedim, lendim
+      integer dimsiz(MAXNCDIM)
+      common /dims/timedim, latdim, londim, leveldim, lendim,
+     + dimsiz
+      integer lenstr
+      integer bid, sid, lid, fid, did, cid, chid
+      common /vars/bid, sid, lid, fid, did, cid, chid
+
+c     vector of integers specifying the corner of the  hypercube
+c     where the first of the data values will be written
+      integer start(MAXNCDIM)
+c     vector of integers specifying the edge lengths from the
+c     corner of the hypercube where the first of the data values
+c     will be written
+      integer count(MAXNCDIM)
+
+c     arrays of data values to be written
+      byte barray(times)
+      integer*2 sarray(times)
+      integer larray(lats)
+      real farray(levels, lats, lons, times)
+      double precision darray(levels, lats, lons, times)
+      character*31 string
+
+      data start/1,1,1,1, 28*0/, count/levels, lats, lons, times, 28*0/
+      data barray /97, 98, 99, 100/
+      data sarray /10, 11, 12, 13/
+
+      ncid = ncopn (cdfname, NCWRITE, iret)
+
+c
+c     byte
+c
+      count(1) = times
+      call ncvpt (ncid, bid, start, count, barray, iret)
+c
+c     short
+c
+      count(1) = times
+      call ncvpt (ncid, sid, start, count, sarray, iret)
+c
+c     long
+c
+      do 30 i = 1,lats
+         larray(i) = 1000
+ 30   continue
+      count(1) = lats
+      call ncvpt (ncid, lid, start, count, larray, iret)
+c
+c     float
+c
+      i = 0
+      do 40 itime = 1,times
+         do 40 ilon = 1, lons
+            do 40 ilat = 1, lats
+               do 40 ilev = 1, levels
+                  i = i + 1
+                  farray(ilev, ilat, ilon, itime) = real(i)
+ 40   continue
+      count(1) = levels
+      call ncvpt (ncid, fid, start, count, farray, iret)
+c
+c     double
+c
+      i = 0
+      do 50 itime = 1, times
+         do 50 ilon = 1, lons
+            do 50 ilat = 1, lats
+               do 50 ilev = 1, levels
+                  i = i + 1
+                  darray(ilev, ilat, ilon, itime) = real(i)
+ 50   continue
+      count(1) = levels
+      call ncvpt (ncid, did, start, count, darray, iret)
+c
+c     char
+c
+      start(1) = 1
+      start(2) = 1
+      count(1) = 4
+      count(2) = 4
+      lenstr = 31	
+      string = 'testthiskind of '
+      call ncvptc (ncid, chid,start, count, string, lenstr, iret)
+      call ncclos(ncid, iret)
+      return
+      end
+
+      
+      subroutine tncvpt1(cdfname)
+      include 'netcdf.inc'
+      character*31 cdfname
+
+
+      integer iret, ncid
+      integer  latdim, londim, leveldim, timedim, lendim
+      integer dimsiz(MAXNCDIM)
+      common /dims/timedim, latdim, londim, leveldim, lendim, 
+     + dimsiz
+
+      integer bindx, sindx, lindx, findx(4), dindx(4), cindx
+
+      integer lvalue
+      integer*2 svalue
+      byte bvalue
+      double precision onethird
+      integer bid, sid, lid, fid, did, cid, chid
+      common /vars/bid, sid, lid, fid, did, cid, chid
+      data lindx/1/, bindx/1/, sindx/1/, findx/1,1,1,1/
+     +dindx/1,1,1,1/, cindx/1/
+      data lvalue /1000/
+      data svalue/10/
+      data onethird/0.3333333333D0/
+
+      bvalue = ichar('z')
+      
+      ncid = ncopn (cdfname, NCWRITE, iret)
+c
+c     test ncvpt1 for byte
+c
+      call ncvpt1 (ncid, bid, bindx, bvalue, iret)
+c
+c     test ncvpt1 for short
+c
+      call ncvpt1 (ncid, sid, sindx, svalue, iret)
+c     
+c     test ncvpt1 for long
+c
+      call ncvpt1 (ncid, lid, lindx, lvalue, iret)
+c
+c     test ncvpt1 for float
+c
+      call ncvpt1 (ncid, fid, findx, 3.14159, iret)
+c
+c     test ncvpt1 for double
+c
+      call ncvpt1 (ncid, did, dindx, onethird, iret)
+c
+c     test ncvp1c for char
+c
+      call ncvp1c (ncid, cid, cindx, 'a', iret)
+      call ncclos (ncid, iret)
+      return
+      end

Modified: packages/libhdf4/branches/upstream/current/mfhdf/fortran/config/ftest-solarisx86.f
===================================================================
--- packages/libhdf4/branches/upstream/current/mfhdf/fortran/config/ftest-solarisx86.f	2007-05-15 09:05:29 UTC (rev 830)
+++ packages/libhdf4/branches/upstream/current/mfhdf/fortran/config/ftest-solarisx86.f	2007-05-15 09:53:05 UTC (rev 831)
@@ -1,7 +1,7 @@
 c********************************************************************
 c   Copyright 1993, UCAR/Unidata
 c   See netcdf/COPYRIGHT file for copying and redistribution conditions.
-c   $Id: ftest-solarisx86.f,v 1.3 1998/01/17 00:29:28 epourmal Exp $
+c   $Id: ftest-solarisx86.f,v 1.4 2005/02/09 03:04:08 epourmal Exp $
 c********************************************************************/
 
 
@@ -479,7 +479,7 @@
       
       bvalidrg(1) = 1
       bvalidrg(2) = 250
-      call ncapt (ncid, bid, 'validrange', NCBYTE, 2,
+      call ncapt (ncid, bid, 'valid range', NCBYTE, 2,
      +bvalidrg, iret)
 
 c
@@ -488,7 +488,7 @@
 
       svalidrg(1) = -100
       svalidrg(2) = 100
-      call ncapt (ncid, sid, 'validrange', NCSHORT, 2, 
+      call ncapt (ncid, sid, 'valid range', NCSHORT, 2, 
      +svalidrg, iret)
 
 c
@@ -497,7 +497,7 @@
 
       lvalidrg(1) = 0
       lvalidrg(2) = 360
-      call ncapt (ncid, lid, 'validrange', NCLONG, 2,
+      call ncapt (ncid, lid, 'valid range', NCLONG, 2,
      +lvalidrg, iret)
       
 c
@@ -506,7 +506,7 @@
 
       rvalidrg(1) = 0.0
       rvalidrg(2) = 5000.0
-      call ncapt (ncid, fid, 'validrange', NCFLOAT, 2,
+      call ncapt (ncid, fid, 'valid range', NCFLOAT, 2,
      +rvalidrg, iret)
 
 c
@@ -515,7 +515,7 @@
 
       dvalidrg(1) = 0D0
       dvalidrg(2) = 500D0
-      call ncapt (ncid, did, 'validrange', NCDOUBLE, 2,
+      call ncapt (ncid, did, 'valid range', NCDOUBLE, 2,
      +dvalidrg, iret)
 
 c
@@ -565,11 +565,12 @@
       data dimnam /'time', 'lat', 'lon', 'level',
      + 'length', 27*'0'/
       data dimsiz /4, 5, 5, 4, 80, 27*0/
-      data varnam/'bytev', 'shortv', 'longv', 'floatv', 'doublev', 
+      data varnam/'bytev', 'short v', 'longv', 'floatv', 'doublev', 
      + 'chv', 'cv'/
       
-      data attname/'validrange', '0', 'validrange', '0', 'validrange',
-     + '0', 'validrange', '0', 'validrange', '0', 'longname', 'id',
+      data attname/'valid range', '0', 'valid range', 
+     + '0', 'valid range',
+     + '0', 'valid range', '0', 'valid range', '0', 'longname', 'id',
      + '0', '0'/
       data gattnam/'source','basetime'/
       end
@@ -818,7 +819,7 @@
 c     short
 c
       sdims(1) = timedim
-      sid = ncvdef (ncid, 'shortv', NCSHORT, 1, sdims, iret)
+      sid = ncvdef (ncid, 'short v', NCSHORT, 1, sdims, iret)
 c
 c     long
 c

Modified: packages/libhdf4/branches/upstream/current/mfhdf/fortran/config/ftest-sun.f
===================================================================
--- packages/libhdf4/branches/upstream/current/mfhdf/fortran/config/ftest-sun.f	2007-05-15 09:05:29 UTC (rev 830)
+++ packages/libhdf4/branches/upstream/current/mfhdf/fortran/config/ftest-sun.f	2007-05-15 09:53:05 UTC (rev 831)
@@ -1,7 +1,7 @@
 c********************************************************************
 c   Copyright 1993, UCAR/Unidata
 c   See netcdf/COPYRIGHT file for copying and redistribution conditions.
-c   $Id: ftest-sun.f,v 1.3 1998/01/17 00:30:10 epourmal Exp $
+c   $Id: ftest-sun.f,v 1.4 2005/02/09 03:04:09 epourmal Exp $
 c********************************************************************/
 
 
@@ -479,7 +479,7 @@
       
       bvalidrg(1) = 1
       bvalidrg(2) = 250
-      call ncapt (ncid, bid, 'validrange', NCBYTE, 2,
+      call ncapt (ncid, bid, 'valid range', NCBYTE, 2,
      +bvalidrg, iret)
 
 c
@@ -488,7 +488,7 @@
 
       svalidrg(1) = -100
       svalidrg(2) = 100
-      call ncapt (ncid, sid, 'validrange', NCSHORT, 2, 
+      call ncapt (ncid, sid, 'valid range', NCSHORT, 2, 
      +svalidrg, iret)
 
 c
@@ -497,7 +497,7 @@
 
       lvalidrg(1) = 0
       lvalidrg(2) = 360
-      call ncapt (ncid, lid, 'validrange', NCLONG, 2,
+      call ncapt (ncid, lid, 'valid range', NCLONG, 2,
      +lvalidrg, iret)
       
 c
@@ -506,7 +506,7 @@
 
       rvalidrg(1) = 0.0
       rvalidrg(2) = 5000.0
-      call ncapt (ncid, fid, 'validrange', NCFLOAT, 2,
+      call ncapt (ncid, fid, 'valid range', NCFLOAT, 2,
      +rvalidrg, iret)
 
 c
@@ -515,7 +515,7 @@
 
       dvalidrg(1) = 0D0
       dvalidrg(2) = 500D0
-      call ncapt (ncid, did, 'validrange', NCDOUBLE, 2,
+      call ncapt (ncid, did, 'valid range', NCDOUBLE, 2,
      +dvalidrg, iret)
 
 c
@@ -568,8 +568,9 @@
       data varnam/'bytev', 'shortv', 'longv', 'floatv', 'doublev', 
      + 'chv', 'cv'/
       
-      data attname/'validrange', '0', 'validrange', '0', 'validrange',
-     + '0', 'validrange', '0', 'validrange', '0', 'longname', 'id',
+      data attname/'valid range', '0', 'valid range',
+     + '0', 'valid range',
+     + '0', 'valid range', '0', 'valid range', '0', 'longname', 'id',
      + '0', '0'/
       data gattnam/'source','basetime'/
       end
@@ -818,7 +819,7 @@
 c     short
 c
       sdims(1) = timedim
-      sid = ncvdef (ncid, 'shortv', NCSHORT, 1, sdims, iret)
+      sid = ncvdef (ncid, 'short v', NCSHORT, 1, sdims, iret)
 c
 c     long
 c

Modified: packages/libhdf4/branches/upstream/current/mfhdf/fortran/config/ftest-t3e.f
===================================================================
--- packages/libhdf4/branches/upstream/current/mfhdf/fortran/config/ftest-t3e.f	2007-05-15 09:05:29 UTC (rev 830)
+++ packages/libhdf4/branches/upstream/current/mfhdf/fortran/config/ftest-t3e.f	2007-05-15 09:53:05 UTC (rev 831)
@@ -1,7 +1,7 @@
 c********************************************************************
 c   Copyright 1993, UCAR/Unidata
 c   See netcdf/COPYRIGHT file for copying and redistribution conditions.
-c   $Id: ftest-t3e.f,v 1.4 1998/03/03 23:38:55 acheng Exp $
+c   $Id: ftest-t3e.f,v 1.7 2005/02/09 03:04:09 epourmal Exp $
 c********************************************************************/
 
 
@@ -106,6 +106,11 @@
 c     test ncadel
       write(*, 100) 'ncadel'
       call tncadel(name2)
+
+c     test reading from NetCDF file
+      write(*, 100) 'NetCDF read'
+      call tread_netcdf()
+
       end
 c
 c     subroutine to test ncacpy
@@ -479,7 +484,7 @@
       
       bvalidrg(1) = 1
       bvalidrg(2) = 250
-      call ncapt (ncid, bid, 'validrange', NCBYTE, 2,
+      call ncapt (ncid, bid, 'valid range', NCBYTE, 2,
      +bvalidrg, iret)
 
 c
@@ -488,7 +493,7 @@
 
       svalidrg(1) = -100
       svalidrg(2) = 100
-      call ncapt (ncid, sid, 'validrange', NCSHORT, 2, 
+      call ncapt (ncid, sid, 'valid range', NCSHORT, 2, 
      +svalidrg, iret)
 
 c
@@ -497,7 +502,7 @@
 
       lvalidrg(1) = 0
       lvalidrg(2) = 360
-      call ncapt (ncid, lid, 'validrange', NCLONG, 2,
+      call ncapt (ncid, lid, 'valid range', NCLONG, 2,
      +lvalidrg, iret)
       
 c
@@ -506,7 +511,7 @@
 
       rvalidrg(1) = 0.0
       rvalidrg(2) = 5000.0
-      call ncapt (ncid, fid, 'validrange', NCFLOAT, 2,
+      call ncapt (ncid, fid, 'valid range', NCFLOAT, 2,
      +rvalidrg, iret)
 
 c
@@ -515,7 +520,7 @@
 
       dvalidrg(1) = 0D0
       dvalidrg(2) = 500D0
-      call ncapt (ncid, did, 'validrange', NCDOUBLE, 2,
+      call ncapt (ncid, did, 'valid range', NCDOUBLE, 2,
      +dvalidrg, iret)
 
 c
@@ -565,11 +570,12 @@
       data dimnam /'time', 'lat', 'lon', 'level',
      + 'length', 27*'0'/
       data dimsiz /4, 5, 5, 4, 80, 27*0/
-      data varnam/'bytev', 'shortv', 'longv', 'floatv', 'doublev', 
+      data varnam/'bytev', 'short v', 'longv', 'floatv', 'doublev', 
      + 'chv', 'cv'/
       
-      data attname/'validrange', '0', 'validrange', '0', 'validrange',
-     + '0', 'validrange', '0', 'validrange', '0', 'longname', 'id',
+      data attname/'valid range', '0', 'valid range',
+     + '0', 'valid range',
+     + '0', 'valid range', '0', 'valid range', '0', 'longname', 'id',
      + '0', '0'/
       data gattnam/'source','basetime'/
       end
@@ -818,7 +824,7 @@
 c     short
 c
       sdims(1) = timedim
-      sid = ncvdef (ncid, 'shortv', NCSHORT, 1, sdims, iret)
+      sid = ncvdef (ncid, 'short v', NCSHORT, 1, sdims, iret)
 c
 c     long
 c
@@ -1220,3 +1226,196 @@
       call ncclos (ncid, iret)
       return
       end
+
+C        This routine reads varaibales and global attributes from
+C        the REAL NetCDF file test_nc.nc. The file was created by NetCDF v3.5 
+C        from the file test_nc.cdl that can be found in the mfhdf/fortran
+C        directory. Please do not generate test_nc.nc file from the test_nc.cdl
+C        using HDF4 ncgen. HDF4 ncgen generated HDF4 file!
+
+         subroutine tread_netcdf()
+         include 'netcdf.inc'
+
+C        Variables declarations
+
+         character*10 FILENAME
+         character*1024 new_filename
+         integer filename_len
+         integer status, ncid, var_id
+         integer time(12), date(12), start(3), count(3), int_attr(5)
+         real a(3,2), float_attr(3)
+         double precision c(3), double_attr(3)
+         integer*2 b(2,3,12), short_attr(2)
+         integer i, j, k, dlen
+         character*10 description
+
+C        Arrays to read data to.
+
+         integer time_val(12), date_val(12), int_attr_val(5)
+         integer*2 b_val(2,3,12), short_attr_val(2)
+         real a_val(3,2), float_attr_val(3)
+         double precision c_val(3), double_attr_val(3)
+         real epsilon
+         double precision depsilon
+         integer external fixname
+
+C        Arrays initialization
+         DATA time_val /1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12/
+         DATA date_val /840116, 840214, 840316, 840415, 840516, 840615, 
+     +              840716, 840816, 840915, 841016, 841115, 841216/
+         DATA a_val /1.0, 2.0, 3.0, 4.0, 5.0, 6.0/
+         DATA b_val /1, 1, 2, 2, 3, 3,
+     +           4, 4, 5, 5, 6, 6,
+     +           7, 7, 8, 8, 9, 9,
+     +           10, 10, 11, 11, 12, 12,
+     +           13, 13, 14, 14, 15, 15,
+     +           16, 16, 17, 17, 18, 18,
+     +           19, 19, 20, 20, 21, 22,
+     +           23, 23, 24, 24, 25, 25, 
+     +           26, 26, 27, 27, 28, 28,
+     +           29, 29, 30, 30, 31, 31,
+     +           32, 32, 33, 33, 34, 34,
+     +           35, 35, 36, 36, 37, 37/
+         DATA c_val /2.0, 3.0, 100/
+         DATA int_attr_val /-100, 200, -300, 400, -500/
+         DATA float_attr_val /1.0, 2.0, 3.0/
+         DATA short_attr_val /0, 1/
+         DATA double_attr_val /-1.0, 2.0, -7.0/
+         DATA epsilon /1.E-6/
+         DATA depsilon /1.E-12/
+         
+C        Modify filename to accomodate SRCDIR configure option
+
+         FILENAME = 'test_nc.nc'
+         filename_len = len(new_filename)
+         call fixname(FILENAME, new_filename, filename_len)
+
+         dlen = 10
+         ncid = ncopn(new_filename(1:filename_len), NCNOWRIT, status)
+         if (status .ne.0) then
+             write(*,*) 'ncopn failed'
+             goto 1000
+         endif
+
+         var_id = ncvid(ncid, 'time', status)
+         start(1) = 1 
+         count(1) = 12
+         call ncvgt(ncid, var_id, start, count, time, status)
+         if (status .ne. 0) write(*,*) 
+     +      'ncvgt failed for 32-bit integer variable time'
+         do i = 1, 12
+            if( time(i) .ne. time_val(i) ) 
+     +      write(*,*) 'Wrong time value at index  ', i 
+         enddo
+
+         var_id = ncvid(ncid, 'c', status)
+         start(1) = 1 
+         count(1) = 3
+         call ncvgt(ncid, var_id, start, count, c, status)
+         if (status .ne. 0) write(*,*)
+     +      'ncvgt failed for 64-bit float variable c'
+         do i = 1, 3
+            if( abs(c(i) - c_val(i)) .gt. depsilon ) 
+     +      write(*,*) 'Wrong c value at index  ', i 
+         enddo
+
+         var_id = ncvid(ncid, 'date', status)
+         start(1) = 1 
+         count(1) = 12
+         call ncvgt(ncid, var_id, start, count, date, status)
+         if (status .ne. 0) write(*,*) 
+     +      'ncvgt failed for 32-bit integer variable date'
+         do i = 1, 12
+            if( date(i) .ne. date_val(i) ) 
+     +      write(*,*) 'Wrong date value at index  ', i 
+         enddo
+
+
+         var_id = ncvid(ncid, 'a', status)
+         start(1) = 1 
+         start(2) = 1
+         count(1) = 3
+         count(2) = 2
+         call ncvgt(ncid, var_id, start, count, a, status)
+         if (status .ne. 0) write(*,*) 
+     +      'ncvgt failed for 32-bit real variable a'
+         do i = 1, 2
+            do j = 1, 3 
+            if( abs(a(j,i) - a_val(j,i)) .gt. epsilon ) 
+     +      write(*,*) 'Wrong a value at indecies  ', j, ',', i 
+            enddo
+         enddo
+
+
+         var_id = ncvid(ncid, 'b', status)
+         start(1) = 1 
+         start(2) = 1
+         start(3) = 1
+         count(1) = 2 
+         count(2) = 3
+         count(3) = 12
+         call ncvgt(ncid, var_id, start, count, b, status)
+         if (status .ne. 0) write(*,*) 
+     +      'ncvgt failed for 16-bit integer variable b'
+         do i = 1, 12
+            do j = 1, 3 
+               do k = 1, 2
+               if( b(k,j,i) .ne.  b_val(k,j,i)) 
+     +         write(*,*) 
+     +        'Wrong b value at indecies  ', k, ',', j, ',', i 
+               enddo
+            enddo
+         enddo
+
+
+C read global attributes
+
+         call ncagt(ncid, NCGLOBAL, 'int_attr', int_attr, status)
+         if (status .ne. 0) 
+     +   write(*,*) 'ncagt failed for 32-bit integer attribute int_attr'
+         do i = 1, 5
+            if( int_attr(i) .ne. int_attr_val(i) ) 
+     +      write(*,*) 'Wrong int_attr value at index  ', i 
+         enddo
+
+
+         call ncagt(ncid, NCGLOBAL, 'float_attr', float_attr, status)
+         if (status .ne. 0) 
+     +   write(*,*) 'ncagt failed for 32-bit float attribute float_attr'
+         do i = 1, 3 
+            if( abs(float_attr(i) - float_attr_val(i)) .gt. epsilon ) 
+     +      write(*,*) 'Wrong float_attr value at index  ', i 
+         enddo
+
+         call ncagt(ncid, NCGLOBAL, 'double_attr', double_attr, status)
+         if (status .ne. 0) 
+     +   write(*,*) 
+     +   'ncagt failed for 64-bit float attribute double_attr'
+         do i = 1, 3 
+            if( abs(double_attr(i) - double_attr_val(i)) .gt. depsilon ) 
+     +      write(*,*) 'Wrong double_attr value at index  ', i 
+         enddo
+
+
+         call ncagt(ncid, NCGLOBAL, 'short_attr', short_attr, status)
+         if (status .ne. 0) 
+     +   write(*,*) 
+     +   'ncagt failed for 16-bit integer attribute double_attr'
+         do i = 1, 2 
+            if( short_attr(i) .ne. short_attr_val(i) ) 
+     +      write(*,*) 'Wrong short_attr value at index  ', i 
+         enddo
+
+
+         call ncagtc(ncid, NCGLOBAL, 'Description', description, 
+     +               dlen, status)
+         if (status .ne. 0) 
+     +   write(*,*) 
+     +   'ncagt failed for character attribute Description'
+         if (description .ne. 'Attributes') 
+     +   write(*,*) 'Wrong values of the character attribute' 
+
+
+1000     continue
+         return
+         end

Modified: packages/libhdf4/branches/upstream/current/mfhdf/fortran/config/ftest-unicos.f
===================================================================
--- packages/libhdf4/branches/upstream/current/mfhdf/fortran/config/ftest-unicos.f	2007-05-15 09:05:29 UTC (rev 830)
+++ packages/libhdf4/branches/upstream/current/mfhdf/fortran/config/ftest-unicos.f	2007-05-15 09:53:05 UTC (rev 831)
@@ -1,7 +1,7 @@
 c********************************************************************
 c   Copyright 1993, UCAR/Unidata
 c   See netcdf/COPYRIGHT file for copying and redistribution conditions.
-c   $Id: ftest-unicos.f,v 1.3 1998/01/17 00:36:22 epourmal Exp $
+c   $Id: ftest-unicos.f,v 1.7 2005/02/09 03:04:09 epourmal Exp $
 c********************************************************************/
 
 
@@ -106,6 +106,11 @@
 c     test ncadel
       write(*, 100) 'ncadel'
       call tncadel(name2)
+
+c     test reading from NetCDF file
+      write(*, 100) 'NetCDF read'
+      call tread_netcdf()
+
       end
 c
 c     subroutine to test ncacpy
@@ -479,7 +484,7 @@
       
       bvalidrg(1) = 1
       bvalidrg(2) = 250
-      call ncapt (ncid, bid, 'validrange', NCBYTE, 2,
+      call ncapt (ncid, bid, 'valid range', NCBYTE, 2,
      +bvalidrg, iret)
 
 c
@@ -488,7 +493,7 @@
 
       svalidrg(1) = -100
       svalidrg(2) = 100
-      call ncapt (ncid, sid, 'validrange', NCSHORT, 2, 
+      call ncapt (ncid, sid, 'valid range', NCSHORT, 2, 
      +svalidrg, iret)
 
 c
@@ -497,7 +502,7 @@
 
       lvalidrg(1) = 0
       lvalidrg(2) = 360
-      call ncapt (ncid, lid, 'validrange', NCLONG, 2,
+      call ncapt (ncid, lid, 'valid range', NCLONG, 2,
      +lvalidrg, iret)
       
 c
@@ -506,7 +511,7 @@
 
       rvalidrg(1) = 0.0
       rvalidrg(2) = 5000.0
-      call ncapt (ncid, fid, 'validrange', NCFLOAT, 2,
+      call ncapt (ncid, fid, 'valid range', NCFLOAT, 2,
      +rvalidrg, iret)
 
 c
@@ -515,7 +520,7 @@
 
       dvalidrg(1) = 0D0
       dvalidrg(2) = 500D0
-      call ncapt (ncid, did, 'validrange', NCDOUBLE, 2,
+      call ncapt (ncid, did, 'valid range', NCDOUBLE, 2,
      +dvalidrg, iret)
 
 c
@@ -565,11 +570,12 @@
       data dimnam /'time', 'lat', 'lon', 'level',
      + 'length', 27*'0'/
       data dimsiz /4, 5, 5, 4, 80, 27*0/
-      data varnam/'bytev', 'shortv', 'longv', 'floatv', 'doublev', 
+      data varnam/'bytev', 'short v', 'longv', 'floatv', 'doublev', 
      + 'chv', 'cv'/
       
-      data attname/'validrange', '0', 'validrange', '0', 'validrange',
-     + '0', 'validrange', '0', 'validrange', '0', 'longname', 'id',
+      data attname/'valid range', '0', 'valid range',
+     + '0', 'valid range',
+     + '0', 'valid range', '0', 'valid range', '0', 'longname', 'id',
      + '0', '0'/
       data gattnam/'source','basetime'/
       end
@@ -818,7 +824,7 @@
 c     short
 c
       sdims(1) = timedim
-      sid = ncvdef (ncid, 'shortv', NCSHORT, 1, sdims, iret)
+      sid = ncvdef (ncid, 'short v', NCSHORT, 1, sdims, iret)
 c
 c     long
 c
@@ -1218,3 +1224,200 @@
       call ncclos (ncid, iret)
       return
       end
+
+C        This routine reads varaibales and global attributes from
+C        the REAL NetCDF file test_nc.nc. The file was created by NetCDF v3.5 
+C        from the file test_nc.cdl that can be found in the mfhdf/fortran
+C        directory. Please do not generate test_nc.nc file from the test_nc.cdl
+C        using HDF4 ncgen. HDF4 ncgen generated HDF4 file!
+
+         subroutine tread_netcdf()
+         include 'netcdf.inc'
+
+C        Variables declarations
+
+         character*10 FILENAME
+         character*1024 new_filename
+         integer filename_len
+         integer status, ncid, var_id
+         integer time(12), date(12), start(3), count(3), int_attr(5)
+         real a(3,2), float_attr(3)
+C         double precision c(3), double_attr(3)
+C        On Cray double precision in Fortran is 16 bytes, use real instead
+         real c(3), double_attr(3)
+         integer*2 b(2,3,12), short_attr(2)
+         integer i, j, k, dlen
+         character*10 description
+
+C        Arrays to read data to.
+
+         integer time_val(12), date_val(12), int_attr_val(5)
+         integer*2 b_val(2,3,12), short_attr_val(2)
+         real a_val(3,2), float_attr_val(3)
+C         double precision c_val(3), double_attr_val(3)
+C        On Cray double precision in Fortran is 16 bytes, use real instead
+         real c_val(3), double_attr_val(3)
+         real epsilon
+         double precision depsilon
+         integer external fixname
+
+C        Arrays initialization
+         DATA time_val /1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12/
+         DATA date_val /840116, 840214, 840316, 840415, 840516, 840615, 
+     +              840716, 840816, 840915, 841016, 841115, 841216/
+         DATA a_val /1.0, 2.0, 3.0, 4.0, 5.0, 6.0/
+         DATA b_val /1, 1, 2, 2, 3, 3,
+     +           4, 4, 5, 5, 6, 6,
+     +           7, 7, 8, 8, 9, 9,
+     +           10, 10, 11, 11, 12, 12,
+     +           13, 13, 14, 14, 15, 15,
+     +           16, 16, 17, 17, 18, 18,
+     +           19, 19, 20, 20, 21, 22,
+     +           23, 23, 24, 24, 25, 25, 
+     +           26, 26, 27, 27, 28, 28,
+     +           29, 29, 30, 30, 31, 31,
+     +           32, 32, 33, 33, 34, 34,
+     +           35, 35, 36, 36, 37, 37/
+         DATA c_val /2.0, 3.0, 100/
+         DATA int_attr_val /-100, 200, -300, 400, -500/
+         DATA float_attr_val /1.0, 2.0, 3.0/
+         DATA short_attr_val /0, 1/
+         DATA double_attr_val /-1.0, 2.0, -7.0/
+         DATA epsilon /1.E-6/
+         DATA depsilon /1.E-12/
+         
+C        Modify filename to accomodate SRCDIR configure option
+
+         FILENAME = 'test_nc.nc'
+         filename_len = len(new_filename)
+         call fixname(FILENAME, new_filename, filename_len)
+
+         dlen = 10
+         ncid = ncopn(new_filename(1:filename_len), NCNOWRIT, status)
+         if (status .ne.0) then
+             write(*,*) 'ncopn failed'
+             goto 1000
+         endif
+
+         var_id = ncvid(ncid, 'time', status)
+         start(1) = 1 
+         count(1) = 12
+         call ncvgt(ncid, var_id, start, count, time, status)
+         if (status .ne. 0) write(*,*) 
+     +      'ncvgt failed for 32-bit integer variable time'
+         do i = 1, 12
+            if( time(i) .ne. time_val(i) ) 
+     +      write(*,*) 'Wrong time value at index  ', i 
+         enddo
+
+         var_id = ncvid(ncid, 'c', status)
+         start(1) = 1 
+         count(1) = 3
+         call ncvgt(ncid, var_id, start, count, c, status)
+         if (status .ne. 0) write(*,*)
+     +      'ncvgt failed for 64-bit float variable c'
+         do i = 1, 3
+            if( abs(c(i) - c_val(i)) .gt. depsilon ) 
+     +      write(*,*) 'Wrong c value at index  ', i 
+         enddo
+
+         var_id = ncvid(ncid, 'date', status)
+         start(1) = 1 
+         count(1) = 12
+         call ncvgt(ncid, var_id, start, count, date, status)
+         if (status .ne. 0) write(*,*) 
+     +      'ncvgt failed for 32-bit integer variable date'
+         do i = 1, 12
+            if( date(i) .ne. date_val(i) ) 
+     +      write(*,*) 'Wrong date value at index  ', i 
+         enddo
+
+
+         var_id = ncvid(ncid, 'a', status)
+         start(1) = 1 
+         start(2) = 1
+         count(1) = 3
+         count(2) = 2
+         call ncvgt(ncid, var_id, start, count, a, status)
+         if (status .ne. 0) write(*,*) 
+     +      'ncvgt failed for 32-bit real variable a'
+         do i = 1, 2
+            do j = 1, 3 
+            if( abs(a(j,i) - a_val(j,i)) .gt. epsilon ) 
+     +      write(*,*) 'Wrong a value at indecies  ', j, ',', i 
+            enddo
+         enddo
+
+
+         var_id = ncvid(ncid, 'b', status)
+         start(1) = 1 
+         start(2) = 1
+         start(3) = 1
+         count(1) = 2 
+         count(2) = 3
+         count(3) = 12
+         call ncvgt(ncid, var_id, start, count, b, status)
+         if (status .ne. 0) write(*,*) 
+     +      'ncvgt failed for 16-bit integer variable b'
+         do i = 1, 12
+            do j = 1, 3 
+               do k = 1, 2
+               if( b(k,j,i) .ne.  b_val(k,j,i)) 
+     +         write(*,*) 
+     +        'Wrong b value at indecies  ', k, ',', j, ',', i 
+               enddo
+            enddo
+         enddo
+
+
+C read global attributes
+
+         call ncagt(ncid, NCGLOBAL, 'int_attr', int_attr, status)
+         if (status .ne. 0) 
+     +   write(*,*) 'ncagt failed for 32-bit integer attribute int_attr'
+         do i = 1, 5
+            if( int_attr(i) .ne. int_attr_val(i) ) 
+     +      write(*,*) 'Wrong int_attr value at index  ', i 
+         enddo
+
+
+         call ncagt(ncid, NCGLOBAL, 'float_attr', float_attr, status)
+         if (status .ne. 0) 
+     +   write(*,*) 'ncagt failed for 32-bit float attribute float_attr'
+         do i = 1, 3 
+            if( abs(float_attr(i) - float_attr_val(i)) .gt. epsilon ) 
+     +      write(*,*) 'Wrong float_attr value at index  ', i 
+         enddo
+
+         call ncagt(ncid, NCGLOBAL, 'double_attr', double_attr, status)
+         if (status .ne. 0) 
+     +   write(*,*) 
+     +   'ncagt failed for 64-bit float attribute double_attr'
+         do i = 1, 3 
+            if( abs(double_attr(i) - double_attr_val(i)) .gt. depsilon ) 
+     +      write(*,*) 'Wrong double_attr value at index  ', i 
+         enddo
+
+
+         call ncagt(ncid, NCGLOBAL, 'short_attr', short_attr, status)
+         if (status .ne. 0) 
+     +   write(*,*) 
+     +   'ncagt failed for 16-bit integer attribute double_attr'
+         do i = 1, 2 
+            if( short_attr(i) .ne. short_attr_val(i) ) 
+     +      write(*,*) 'Wrong short_attr value at index  ', i 
+         enddo
+
+
+         call ncagtc(ncid, NCGLOBAL, 'Description', description, 
+     +               dlen, status)
+         if (status .ne. 0) 
+     +   write(*,*) 
+     +   'ncagt failed for character attribute Description'
+         if (description .ne. 'Attributes') 
+     +   write(*,*) 'Wrong values of the character attribute' 
+
+
+1000     continue
+         return
+         end

Modified: packages/libhdf4/branches/upstream/current/mfhdf/fortran/config/jackets-aix.c
===================================================================
--- packages/libhdf4/branches/upstream/current/mfhdf/fortran/config/jackets-aix.c	2007-05-15 09:05:29 UTC (rev 830)
+++ packages/libhdf4/branches/upstream/current/mfhdf/fortran/config/jackets-aix.c	2007-05-15 09:53:05 UTC (rev 831)
@@ -2,7 +2,7 @@
  *	Copyright 1990, University Corporation for Atmospheric Research
  *      See netcdf/COPYRIGHT file for copying and redistribution conditions.
  */
-/* $Id: jackets-aix.c,v 1.6 1997/11/05 22:19:48 koziol Exp $ */
+/* $Id: jackets-aix.c,v 1.10 2005/02/09 03:04:10 epourmal Exp $ */
 /*
  * OVERVIEW
  *
@@ -34,7 +34,7 @@
 
 struct ncfils {			/* This will be a common block from Fortran */
     double dd;
-#if defined __alpha || (_MIPS_SZLONG == 64)
+#if defined __alpha || (_MIPS_SZLONG == 64) || defined __ia64 || (defined __sun && defined _LP64) || defined AIX5L64 || defined __x86_64__
     int ll;
 #else
     long ll;
@@ -65,7 +65,7 @@
 
 struct ncfils {			/* This will be a common block from Fortran */
     double dd;
-#if defined __alpha || (_MIPS_SZLONG == 64)
+#if defined __alpha || (_MIPS_SZLONG == 64) || defined __ia64 || (defined __sun && defined _LP64) || defined AIX5L64 || defined __x86_64__
     int ll;
 #else
     long ll;
@@ -163,7 +163,7 @@
 	*target++ = *source++;
     *target = '\0';
 }
-
+#ifdef WE_COULDNT_READ_NAMES_WITH_SPACES
 /* copy function used to copy strings terminated with blanks */
 static void
 nstrncpy (target, source, maxlen)
@@ -175,8 +175,26 @@
 	*target++ = *source++;
     *target = '\0';
 }
+#endif
 
+/* copy function used to copy strings with embeded blanks and
+   terminated with blanks */
+static void
+nstrncpy (target, source, maxlen)
+    char *target;		/* space to be copied into */
+    char *source;		/* string to be copied */
+    int maxlen;			/* maximum length of *source */
+{
+/* Copy all string */
+    while (maxlen--) 
+        *target++ = *source++;
+    *target -- = '\0';
+/* Disregard all trailing spaces  */
+     while (*target == ' ')
+         *target-- = '\0';
 
+}
+
 /*
  * Compute product of dimensions.
  */
@@ -412,7 +430,7 @@
 }
 #endif /* FORTRAN_HAS_NO_SHORT */
 
-#if defined __alpha || (_MIPS_SZLONG == 64)
+#if defined __alpha || (_MIPS_SZLONG == 64) || defined __ia64 || (defined __sun && defined _LP64) || defined AIX5L64 || defined __x86_64__
 /*
  * Convert multi-dimensional array of NCLONGs stored in ints to packed
  * array of longs, in malloc'ed space.  Returns pointer to longs or NULL
@@ -899,7 +917,7 @@
 	return;
     }				/* else */
 #endif				/* FORTRAN_HAS_NO_SHORT */
-#if defined __alpha || (_MIPS_SZLONG == 64)
+#if defined __alpha || (_MIPS_SZLONG == 64) || defined __ia64 || (defined __sun && defined _LP64) || defined AIX5L64 || defined __x86_64__
 #ifdef HDF
     if ((nc_type) datatype == NC_LONG && handle->file_type!=HDF_FILE) {
 	long          longs = *(int *)value;
@@ -1013,7 +1031,7 @@
 	return;
     }				/* else */
 #endif				/* FORTRAN_HAS_NO_SHORT */
-#if defined __alpha || (_MIPS_SZLONG == 64)
+#if defined __alpha || (_MIPS_SZLONG == 64) || defined __ia64 || (defined __sun && defined _LP64) || defined AIX5L64 || defined __x86_64__
 #ifdef HDF
     if ((nc_type) datatype == NC_LONG && handle->file_type!=HDF_FILE) {
 	long *longs = itol (value, ncount, ndims);
@@ -1124,7 +1142,7 @@
 	tmpbasis	= nctypelen(NC_LONG);
     else
 #endif
-#if defined __alpha || (_MIPS_SZLONG == 64)
+#if defined __alpha || (_MIPS_SZLONG == 64) || defined __ia64 || (defined __sun && defined _LP64) || defined AIX5L64 || defined __x86_64__
     if (datatype == NC_LONG)
 	tmpbasis	= sizeof(int);
     else
@@ -1181,7 +1199,7 @@
 	return;
     }				/* else */
 #endif				/* FORTRAN_HAS_NO_SHORT */
-#if defined __alpha || (_MIPS_SZLONG == 64)
+#if defined __alpha || (_MIPS_SZLONG == 64) || defined __ia64 || (defined __sun && defined _LP64) || defined AIX5L64 || defined __x86_64__
 #ifdef HDF
     if ((nc_type) datatype == NC_LONG && handle->file_type!=HDF_FILE) {
 	long *longs = itolg (value, ncount, nbasis, ndims);
@@ -1317,7 +1335,7 @@
 	return;
     }				/* else */
 #endif				/* FORTRAN_HAS_NO_SHORT */
-#if defined __alpha || (_MIPS_SZLONG == 64)
+#if defined __alpha || (_MIPS_SZLONG == 64) || defined __ia64 || (defined __sun && defined _LP64) || defined AIX5L64 || defined __x86_64__
 #ifdef HDF
     if ((nc_type) datatype == NC_LONG && handle->file_type!=HDF_FILE) {
 	long          longs;
@@ -1459,13 +1477,19 @@
 	return;
     }				/* else */
 #endif				/* FORTRAN_HAS_NO_SHORT */
-#if defined __alpha || (_MIPS_SZLONG == 64)
+#if defined __alpha || (_MIPS_SZLONG == 64) || defined __ia64 || (defined __sun && defined _LP64) || defined AIX5L64 || defined __x86_64__
 #ifdef HDF
     if ((nc_type) datatype == NC_LONG && handle->file_type!=HDF_FILE) {
 	long iocount = dimprod (ncount, ndims);	/* product of dimensions */
+
+/* EIP  We need to use int instead of long on all platfroms where long is 8 bytes
 	long *longs = (long *) malloc (iocount * sizeof (long));
 	int *ip;
 	long *lp = longs;
+*/
+	int *longs = (int *) malloc (iocount * sizeof (int));
+	int *ip;
+	int *lp = longs;
 
 	if (longs == NULL) {
 	    *rcode = NC_SYSERR;
@@ -1592,7 +1616,8 @@
 	tmpbasis	= nctypelen(NC_LONG);
     else
 #endif
-#if defined __alpha || (_MIPS_SZLONG == 64)
+#if defined __alpha || (_MIPS_SZLONG == 64) || defined __ia64 || (defined __sun && defined _LP64) || defined AIX5L64 || defined __x86_64__
+
     if (datatype == NC_LONG)
 	tmpbasis	= sizeof(int);
     else
@@ -1663,7 +1688,8 @@
 	return;
     }				/* else */
 #endif				/* FORTRAN_HAS_NO_SHORT */
-#if defined __alpha || (_MIPS_SZLONG == 64)
+#if defined __alpha || (_MIPS_SZLONG == 64) || defined __ia64 || (defined __sun && defined _LP64) || defined AIX5L64 || defined __x86_64__
+
 #ifdef HDF
     if ((nc_type) datatype == NC_LONG && handle->file_type!=HDF_FILE) {
 	long iocount = dimprod (ncount, ndims);	/* product of dimensions */
@@ -1829,7 +1855,8 @@
 	return;
     }				/* else */
 #endif				/* FORTRAN_HAS_NO_SHORT */
-#if defined __alpha || (_MIPS_SZLONG == 64)
+#if defined __alpha || (_MIPS_SZLONG == 64) || defined __ia64 || (defined __sun && defined _LP64) || defined AIX5L64 || defined __x86_64__
+
 #ifdef HDF
     if ((nc_type) *datatype == NC_LONG && handle->file_type!=HDF_FILE) {
 	long *longs = itol (value, attlen, 1);
@@ -1994,12 +2021,20 @@
 	return;
     }				/* else */
 #endif				/* FORTRAN_HAS_NO_SHORT */
-#if defined __alpha || (_MIPS_SZLONG == 64)
+#if defined __alpha || (_MIPS_SZLONG == 64) || defined __ia64 || (defined __sun && defined _LP64) || defined AIX5L64 || defined __x86_64__
+
 #ifdef HDF
     if ((nc_type) datatype == NC_LONG && handle->file_type!=HDF_FILE) {
+/* EIP  We have to use int buffer to read data in on all platforms
+        where long is 8
+
 	long *longs = (long *) malloc (attlen * sizeof (long));
 	int *ip;
 	long *lp = longs;
+*/
+	int *longs = (int *) malloc (attlen * sizeof (int));
+	int *ip;
+	int *lp = longs;
 
 	if (longs == NULL) {
 	    *rcode = NC_SYSERR;

Modified: packages/libhdf4/branches/upstream/current/mfhdf/fortran/config/jackets-alpha.c
===================================================================
--- packages/libhdf4/branches/upstream/current/mfhdf/fortran/config/jackets-alpha.c	2007-05-15 09:05:29 UTC (rev 830)
+++ packages/libhdf4/branches/upstream/current/mfhdf/fortran/config/jackets-alpha.c	2007-05-15 09:53:05 UTC (rev 831)
@@ -2,7 +2,7 @@
  *	Copyright 1990, University Corporation for Atmospheric Research
  *      See netcdf/COPYRIGHT file for copying and redistribution conditions.
  */
-/* $Id: jackets-alpha.c,v 1.3 1997/11/05 22:19:50 koziol Exp $ */
+/* $Id: jackets-alpha.c,v 1.7 2005/02/09 03:04:10 epourmal Exp $ */
 /*
  * OVERVIEW
  *
@@ -34,7 +34,7 @@
 
 struct ncfils {			/* This will be a common block from Fortran */
     double dd;
-#ifdef __alpha
+#if defined __alpha || (_MIPS_SZLONG == 64) || defined __ia64 || (defined __sun && defined _LP64) || defined AIX5L64 || defined __x86_64__
     int ll;
 #else
     long ll;
@@ -65,7 +65,7 @@
 
 struct ncfils {			/* This will be a common block from Fortran */
     double dd;
-#ifdef __alpha
+#if defined __alpha || (_MIPS_SZLONG == 64) || defined __ia64 || (defined __sun && defined _LP64) || defined AIX5L64 || defined __x86_64__
     int ll;
 #else
     long ll;
@@ -163,7 +163,7 @@
 	*target++ = *source++;
     *target = '\0';
 }
-
+#ifdef WE_COULDNT_READ_NAMES_WITH_SPACES
 /* copy function used to copy strings terminated with blanks */
 static void
 nstrncpy (target, source, maxlen)
@@ -175,8 +175,26 @@
 	*target++ = *source++;
     *target = '\0';
 }
+#endif
 
+/* copy function used to copy strings with embeded blanks and
+   terminated with blanks */
+static void
+nstrncpy (target, source, maxlen)
+    char *target;		/* space to be copied into */
+    char *source;		/* string to be copied */
+    int maxlen;			/* maximum length of *source */
+{
+/* Copy all string */
+    while (maxlen--) 
+        *target++ = *source++;
+    *target -- = '\0';
+/* Disregard all trailing spaces  */
+     while (*target == ' ')
+         *target-- = '\0';
 
+}
+
 /*
  * Compute product of dimensions.
  */
@@ -412,7 +430,7 @@
 }
 #endif /* FORTRAN_HAS_NO_SHORT */
 
-#ifdef __alpha
+#if defined __alpha || (_MIPS_SZLONG == 64) || defined __ia64 || (defined __sun && defined _LP64) || defined AIX5L64 || defined __x86_64__
 /*
  * Convert multi-dimensional array of NCLONGs stored in ints to packed
  * array of longs, in malloc'ed space.  Returns pointer to longs or NULL
@@ -899,7 +917,7 @@
 	return;
     }				/* else */
 #endif				/* FORTRAN_HAS_NO_SHORT */
-#ifdef __alpha
+#if defined __alpha || (_MIPS_SZLONG == 64) || defined __ia64 || (defined __sun && defined _LP64) || defined AIX5L64 || defined __x86_64__
 #ifdef HDF
     if ((nc_type) datatype == NC_LONG && handle->file_type!=HDF_FILE) {
 	long          longs = *(int *)value;
@@ -1013,7 +1031,7 @@
 	return;
     }				/* else */
 #endif				/* FORTRAN_HAS_NO_SHORT */
-#ifdef __alpha
+#if defined __alpha || (_MIPS_SZLONG == 64) || defined __ia64 || (defined __sun && defined _LP64) || defined AIX5L64 || defined __x86_64__
 #ifdef HDF
     if ((nc_type) datatype == NC_LONG && handle->file_type!=HDF_FILE) {
 	long *longs = itol (value, ncount, ndims);
@@ -1124,7 +1142,7 @@
 	tmpbasis	= nctypelen(NC_LONG);
     else
 #endif
-#ifdef __alpha
+#if defined __alpha || (_MIPS_SZLONG == 64) || defined __ia64 || (defined __sun && defined _LP64) || defined AIX5L64 || defined __x86_64__
     if (datatype == NC_LONG)
 	tmpbasis	= sizeof(int);
     else
@@ -1181,7 +1199,7 @@
 	return;
     }				/* else */
 #endif				/* FORTRAN_HAS_NO_SHORT */
-#ifdef __alpha
+#if defined __alpha || (_MIPS_SZLONG == 64) || defined __ia64 || (defined __sun && defined _LP64) || defined AIX5L64 || defined __x86_64__
 #ifdef HDF
     if ((nc_type) datatype == NC_LONG && handle->file_type!=HDF_FILE) {
 	long *longs = itolg (value, ncount, nbasis, ndims);
@@ -1317,7 +1335,7 @@
 	return;
     }				/* else */
 #endif				/* FORTRAN_HAS_NO_SHORT */
-#ifdef __alpha
+#if defined __alpha || (_MIPS_SZLONG == 64) || defined __ia64 || (defined __sun && defined _LP64) || defined AIX5L64 || defined __x86_64__
 #ifdef HDF
     if ((nc_type) datatype == NC_LONG && handle->file_type!=HDF_FILE) {
 	long          longs;
@@ -1459,13 +1477,21 @@
 	return;
     }				/* else */
 #endif				/* FORTRAN_HAS_NO_SHORT */
-#ifdef __alpha
+#if defined __alpha || (_MIPS_SZLONG == 64) || defined __ia64 || (defined __sun && defined _LP64) || defined AIX5L64 || defined __x86_64__
 #ifdef HDF
     if ((nc_type) datatype == NC_LONG && handle->file_type!=HDF_FILE) {
 	long iocount = dimprod (ncount, ndims);	/* product of dimensions */
+
+/* EIP
+        This code doesn't work when long is 8 bytes. We need to use an int
+        buffer to read data in 
 	long *longs = (long *) malloc (iocount * sizeof (long));
 	int *ip;
 	long *lp = longs;
+*/
+	int *longs = (int *) malloc (iocount * sizeof (int));
+	int *ip;
+	int *lp = longs;
 
 	if (longs == NULL) {
 	    *rcode = NC_SYSERR;
@@ -1592,7 +1618,7 @@
 	tmpbasis	= nctypelen(NC_LONG);
     else
 #endif
-#ifdef __alpha
+#if defined __alpha || (_MIPS_SZLONG == 64) || defined __ia64 || (defined __sun && defined _LP64) || defined AIX5L64 || defined __x86_64__
     if (datatype == NC_LONG)
 	tmpbasis	= sizeof(int);
     else
@@ -1663,7 +1689,7 @@
 	return;
     }				/* else */
 #endif				/* FORTRAN_HAS_NO_SHORT */
-#ifdef __alpha
+#if defined __alpha || (_MIPS_SZLONG == 64) || defined __ia64 || (defined __sun && defined _LP64) || defined AIX5L64 || defined __x86_64__
 #ifdef HDF
     if ((nc_type) datatype == NC_LONG && handle->file_type!=HDF_FILE) {
 	long iocount = dimprod (ncount, ndims);	/* product of dimensions */
@@ -1829,7 +1855,7 @@
 	return;
     }				/* else */
 #endif				/* FORTRAN_HAS_NO_SHORT */
-#ifdef __alpha
+#if defined __alpha || (_MIPS_SZLONG == 64) || defined __ia64 || (defined __sun && defined _LP64) || defined AIX5L64 || defined __x86_64__
 #ifdef HDF
     if ((nc_type) *datatype == NC_LONG && handle->file_type!=HDF_FILE) {
 	long *longs = itol (value, attlen, 1);
@@ -1994,12 +2020,20 @@
 	return;
     }				/* else */
 #endif				/* FORTRAN_HAS_NO_SHORT */
-#ifdef __alpha
+#if defined __alpha || (_MIPS_SZLONG == 64) || defined __ia64 || (defined __sun && defined _LP64) || defined AIX5L64 || defined __x86_64__
 #ifdef HDF
     if ((nc_type) datatype == NC_LONG && handle->file_type!=HDF_FILE) {
+
+/* EIP
+        This code doesn't work when long is 8 bytes. We need to use an int
+        buffer to read data in 
 	long *longs = (long *) malloc (attlen * sizeof (long));
 	int *ip;
 	long *lp = longs;
+*/
+	int *longs = (int *) malloc (attlen * sizeof (int));
+	int *ip;
+	int *lp = longs;
 
 	if (longs == NULL) {
 	    *rcode = NC_SYSERR;

Added: packages/libhdf4/branches/upstream/current/mfhdf/fortran/config/jackets-apple.c
===================================================================
--- packages/libhdf4/branches/upstream/current/mfhdf/fortran/config/jackets-apple.c	                        (rev 0)
+++ packages/libhdf4/branches/upstream/current/mfhdf/fortran/config/jackets-apple.c	2007-05-15 09:53:05 UTC (rev 831)
@@ -0,0 +1,2086 @@
+/*
+ *	Copyright 1990, University Corporation for Atmospheric Research
+ *      See netcdf/COPYRIGHT file for copying and redistribution conditions.
+ */
+/* $Id: jackets-apple.c,v 1.4 2005/02/09 03:04:11 epourmal Exp $ */
+/*
+ * OVERVIEW
+ *
+ * This file contains jacket routines written in C for interfacing Fortran
+ * netCDF function calls to the actual C binding for the NetCDF.  This code
+ * is written explicitly for Sun.  In general, these functions handle
+ * character-string parameter conventions, convert between
+ * column-major-order arrays and row-major-order arrays, and map between
+ * array indices beginning at one and array indices beginning at zero.
+ *
+ */
+
+/* LINTLIBRARY */
+#include	<ctype.h>
+#include        <string.h>
+#include	<stdlib.h>
+#include	<stdio.h>
+#ifdef HDF
+#include        "local_nc.h"
+#else /* HDF */
+#include	"netcdf.h"
+#endif /* HDF */
+
+
+
+
+
+#if !NC_OLD_FILLVALUES
+
+struct ncfils {			/* This will be a common block from Fortran */
+    double dd;
+#if defined __alpha || (_MIPS_SZLONG == 64) || defined __ia64 || (defined __sun && defined _LP64) || defined AIX5L64 || defined __x86_64__
+
+    int ll;
+#else
+    long ll;
+#endif
+    float ff;
+    short ss;
+    char cc;
+    char bb;
+} ncfils_ = {
+    FILL_DOUBLE,
+    FILL_LONG,
+    FILL_FLOAT,
+    FILL_SHORT,
+    FILL_CHAR,
+    FILL_BYTE
+};
+
+#else	/* NC_OLD_FILLVALUES below */
+
+/*
+ * This section is provided for backward compatibility only.  Using
+ * XDR infinities for floating-point fill values has caused more problems
+ * than it has solved.  We encourage you to define your own data-specific
+ * fill values rather than use default ones.  
+ * If, however, you *must* use default fill values, then you should use
+ * the above fill values rather than the ones in this section.
+ */
+
+struct ncfils {			/* This will be a common block from Fortran */
+    double dd;
+#if defined __alpha || (_MIPS_SZLONG == 64) || defined __ia64 || (defined __sun && defined _LP64) || defined AIX5L64 || defined __x86_64__
+
+    int ll;
+#else
+    long ll;
+#endif
+    float ff;
+    short ss;
+    char cc;
+    char bb;
+} ncfils_ = {
+    XDR_D_INFINITY,		/* You may have to insert a constant here */
+    FILL_LONG,
+    XDR_F_INFINITY,		/* You may have to insert a constant here */
+    FILL_SHORT,
+    FILL_CHAR,
+    FILL_BYTE
+};
+
+#endif	/* NC_OLD_FILLVALUES above */
+
+
+/*
+ * global integer used for suppressing error messages and determining
+ * the fatality of errors.
+ */
+extern int ncopts;		/* default is (NC_FATAL | NC_VERBOSE) */
+
+/* global integer that contains a netCDF-specific error code */
+extern int ncerr;
+
+/* blank fill C string to make FORTRAN string */
+static void
+fcdcpy (fstring, fslen, sstring)
+    char *fstring;		/* output string to be blank-filled */
+    int fslen;			/* length of output string */
+    char *sstring;		/* input string, null-terminated */
+{
+    int i, len = strlen(sstring);
+
+    for (i = 0; i < len; i++)
+	*(fstring + i) = *(sstring + i);
+    for (i = len; i < fslen; i++)
+	*(fstring + i) = ' ';
+}
+
+
+static void
+reverse (array, length)
+    int array[];		/* array to be reversed */
+    int length;			/* length of array */
+{
+    int temp, i, j;
+
+    for (i = 0, j = length - 1; i < j; i++, j--) {
+	temp = array[i];
+	array[i] = array[j];
+	array[j] = temp;
+    }
+}
+
+
+static void
+revlongs (array, length)
+    long array[];		/* array to be reversed */
+    int length;			/* length of array */
+{
+    int i, j;
+    long temp;
+
+    for (i = 0, j = length - 1; i < j; i++, j--) {
+	temp = array[i];
+	array[i] = array[j];
+	array[j] = temp;
+    }
+}
+
+
+/* error handling function */
+static void
+handle_err (pname, rcode)
+    char *pname;		/* procedure name */
+    int rcode;			/* error return */
+{
+    cdf_routine_name = pname;
+    NCadvise(rcode, "string won't fit in CHARACTER variable provided");
+}
+
+/* copy function used to copy strings with embedded blanks */
+static void
+fstrncpy (target, source, maxlen)
+    char *target;		/* space to be copied into */
+    char *source;		/* string to be copied */
+    int maxlen;			/* maximum length of *source */
+{
+    while (maxlen-- && *source != '\0')
+	*target++ = *source++;
+    *target = '\0';
+}
+#ifdef WE_COULDNT_READ_NAMES_WITH_SPACES
+/* copy function used to copy strings terminated with blanks */
+static void
+nstrncpy (target, source, maxlen)
+    char *target;		/* space to be copied into */
+    char *source;		/* string to be copied */
+    int maxlen;			/* maximum length of *source */
+{
+    while (maxlen-- && *source != ' ')
+	*target++ = *source++;
+    *target = '\0';
+}
+#endif
+
+/* copy function used to copy strings with embeded blanks and
+   terminated with blanks */
+static void
+nstrncpy (target, source, maxlen)
+    char *target;		/* space to be copied into */
+    char *source;		/* string to be copied */
+    int maxlen;			/* maximum length of *source */
+{
+/* Copy all string */
+    while (maxlen--) 
+        *target++ = *source++;
+    *target -- = '\0';
+/* Disregard all trailing spaces  */
+     while (*target == ' ')
+         *target-- = '\0';
+
+}
+/*
+ * Compute product of dimensions.
+ */
+static long
+dimprod (dims, ndims)
+     long *dims;			/* list of dimensions */
+     int ndims;			/* number of dimensions in list */
+{
+    long *ip;
+    long prod = 1;
+
+    for (ip = dims; ip < &dims[ndims]; ip++)
+      prod *= *ip;
+    return prod;
+}
+
+
+#ifdef FORTRAN_HAS_NO_BYTE
+/*
+ * Convert multi-dimensional array of bytes stored in ints to packed array of
+ * bytes, in malloc'ed space.  Returns pointer to bytes or NULL if malloc
+ * failed.
+ */
+static char *
+itob(ints, dims, ndims)
+     int *ints;			/* multi-dimensional array of integers */
+     long *dims;			/* list of dimensions */
+     int ndims;			/* number of dimensions in list */
+{
+    long iocount = dimprod (dims, ndims);	/* product of dimensions */
+    char *bytes = (char *) malloc (iocount * sizeof (char));
+    int *ip;
+    char *bp = bytes;
+
+    if (bytes != NULL)
+      for (ip = ints; iocount > 0; iocount--)
+	*bp++ = (char) *ip++;
+    return bytes;
+}
+
+/*
+ * Convert a generalized multi-dimensional array of bytes stored in ints to 
+ * packed array of bytes, in malloc'ed space.  Returns pointer to bytes or 
+ * NULL if malloc failed.
+ */
+static char *
+itobg(ints, dims, basis, ndims)
+     int *ints;			/* multi-dimensional array of integers */
+     long *dims;			/* list of dimensions */
+     long *basis;			/* memory access basis vector */
+     int ndims;			/* number of dimensions in list */
+{
+    long iocount = dimprod (dims, ndims);	/* product of dimensions */
+    char *bytes = (char *) malloc (iocount * sizeof (char));
+
+    if (bytes != NULL && iocount > 0) {
+	int	idim;
+	char	*bp	= bytes;
+	char	*ip	= (char*)ints;
+	long	length[MAX_NC_DIMS];
+	long	coords[MAX_NC_DIMS];
+
+	for (idim = 0; idim < ndims; ++idim) {
+	    length[idim]	= dims[idim]*basis[idim];
+	    coords[idim]	= 0;
+	}
+
+	for (;;) {
+	    *bp++	= (char)*(int*)ip;
+	    idim	= ndims - 1;
+	carry:
+	    ip	+= basis[idim];
+	    if (++coords[idim] >= dims[idim]) {
+		coords[idim]	= 0;
+		ip		-= length[idim];
+		if (--idim < 0)
+		    break;
+		goto carry;
+	    }
+        }
+    }
+
+    return bytes;
+}
+
+/*
+ * Convert a packed array of bytes into a generalized multi-dimensional array
+ * of ints.
+ */
+static void
+btoig(bytes, ints, dims, basis, ndims)
+     char *bytes;		/* packed array of bytes */
+     int *ints;			/* multi-dimensional array of integers */
+     long *dims;		/* list of dimensions */
+     long *basis;		/* memory access basis vector */
+     int ndims;			/* number of dimensions in list */
+{
+    if (dimprod (dims, ndims) > 0) {
+	int	idim;
+	char	*bp	= bytes;
+	char	*ip	= (char*)ints;
+	long	length[MAX_NC_DIMS];
+	long	coords[MAX_NC_DIMS];
+
+	for (idim = 0; idim < ndims; ++idim) {
+	    length[idim]	= dims[idim]*basis[idim];
+	    coords[idim]	= 0;
+	}
+
+	for (;;) {
+	    *(int*)ip	= *bp++;
+	    idim	= ndims - 1;
+	carry:
+	    ip	+= basis[idim];
+	    if (++coords[idim] >= dims[idim]) {
+		coords[idim]	= 0;
+		ip		-= length[idim];
+		if (--idim < 0)
+		    break;
+		goto carry;
+	    }
+        }
+    }
+}
+#endif /* FORTRAN_HAS_NO_BYTE */
+
+#ifdef FORTRAN_HAS_NO_SHORT
+/*
+ * Convert multi-dimensional array of shorts stored in ints to packed array of
+ * shorts, in malloc'ed space.  Returns pointer to shorts or NULL if malloc
+ * failed.
+ */
+static short *
+itos(ints, dims, ndims)
+     int *ints;		/* multi-dimensional array of ints */
+     long *dims;			/* list of dimensions */
+     int ndims;			/* number of dimensions in list */
+{
+    long iocount = dimprod (dims, ndims);	/* product of dimensions */
+    short *shorts = (short *) malloc (iocount * sizeof (short));
+    int *ip;
+    short *sp = shorts;
+
+    if (shorts != NULL)
+      for (ip = ints; iocount > 0; iocount--)
+	*sp++ = (short) *ip++;
+    return shorts;
+}
+
+/*
+ * Convert a generalized multi-dimensional array of shorts stored in ints to 
+ * packed array of shorts, in malloc'ed space.  Returns pointer to shorts or 
+ * NULL if malloc failed.
+ */
+static short *
+itosg(ints, dims, basis, ndims)
+     int *ints;			/* multi-dimensional array of integers */
+     long *dims;			/* list of dimensions */
+     long *basis;			/* memory access basis vector */
+     int ndims;			/* number of dimensions in list */
+{
+    long iocount = dimprod (dims, ndims);	/* product of dimensions */
+    short *shorts = (short *) malloc (iocount * sizeof (short));
+
+    if (shorts != NULL && iocount > 0) {
+	int	idim;
+	char	*ip	= (char*)ints;
+	short	*sp	= shorts;
+	long	length[MAX_NC_DIMS];
+	long	coords[MAX_NC_DIMS];
+
+	for (idim = 0; idim < ndims; ++idim) {
+	    length[idim]	= dims[idim]*basis[idim];
+	    coords[idim]	= 0;
+	}
+
+	for (;;) {
+	    *sp++	= (short)*(int*)ip;
+	    idim	= ndims - 1;
+	carry:
+	    ip	+= basis[idim];
+	    if (++coords[idim] >= dims[idim]) {
+		coords[idim]	= 0;
+		ip		-= length[idim];
+		if (--idim < 0)
+		    break;
+		goto carry;
+	    }
+        }
+    }
+
+    return shorts;
+}
+
+/*
+ * Convert a packed array of shorts into a generalized multi-dimensional array
+ * of ints.
+ */
+static void
+stoig(shorts, ints, dims, basis, ndims)
+     short *shorts;		/* packed array of shorts */
+     int *ints;			/* multi-dimensional array of integers */
+     long *dims;		/* list of dimensions */
+     long *basis;		/* memory access basis vector */
+     int ndims;			/* number of dimensions in list */
+{
+    if (dimprod (dims, ndims) > 0) {
+	int	idim;
+	short	*sp	= shorts;
+	char	*ip	= (char*)ints;
+	long	length[MAX_NC_DIMS];
+	long	coords[MAX_NC_DIMS];
+
+	for (idim = 0; idim < ndims; ++idim) {
+	    length[idim]	= dims[idim]*basis[idim];
+	    coords[idim]	= 0;
+	}
+
+	for (;;) {
+	    *(int*)ip	= *sp++;
+	    idim	= ndims - 1;
+	carry:
+	    ip	+= basis[idim];
+	    if (++coords[idim] >= dims[idim]) {
+		coords[idim]	= 0;
+		ip		-= length[idim];
+		if (--idim < 0)
+		    break;
+		goto carry;
+	    }
+        }
+    }
+}
+#endif /* FORTRAN_HAS_NO_SHORT */
+
+#if defined __alpha || (_MIPS_SZLONG == 64) || defined __ia64 || (defined __sun && defined _LP64) || defined AIX5L64 || defined __x86_64__
+
+/*
+ * Convert multi-dimensional array of NCLONGs stored in ints to packed
+ * array of longs, in malloc'ed space.  Returns pointer to longs or NULL
+ * if malloc failed.
+ */
+static long *
+itol(ints, dims, ndims)
+    int		*ints;		/* multi-dimensional array of ints */
+    long	*dims;		/* list of dimensions */
+    int		ndims;		/* number of dimensions in list */
+{
+    long	iocount = dimprod (dims, ndims);
+    long	*longs = (long *) malloc (iocount * sizeof (long));
+    int		*ip;
+    long	*lp = longs;
+
+    if (longs != NULL)
+	for (ip = ints; iocount > 0; iocount--)
+	    *lp++ = (long) *ip++;
+    return longs;
+}
+
+/*
+ * Convert a generalized multi-dimensional array of longs stored in ints to 
+ * packed array of longs, in malloc'ed space.  Returns pointer to longs or 
+ * NULL if malloc failed.
+ */
+static long *
+itolg(ints, dims, imap, ndims)
+    int		*ints;		/* multi-dimensional array of integers */
+    long	*dims;		/* list of dimensions */
+    long	*imap;		/* memory access index mapping vector */
+    int		ndims;		/* number of dimensions in list */
+{
+    long	iocount = dimprod (dims, ndims);
+    long	*longs = (long *) malloc (iocount * sizeof (long));
+
+    if (longs != NULL && iocount > 0) {
+	int	idim;
+	char	*ip	= (char*)ints;
+	long	*lp	= longs;
+	long	length[MAX_NC_DIMS];
+	long	coords[MAX_NC_DIMS];
+
+	for (idim = 0; idim < ndims; ++idim) {
+	    length[idim]	= dims[idim]*imap[idim];
+	    coords[idim]	= 0;
+	}
+
+	for (;;) {
+	    *lp++	= (long)*(int*)ip;
+	    idim	= ndims - 1;
+	carry:
+	    ip	+= imap[idim];
+	    if (++coords[idim] >= dims[idim]) {
+		coords[idim]	= 0;
+		ip		-= length[idim];
+		if (--idim < 0)
+		    break;
+		goto carry;
+	    }
+        }
+    }
+
+    return longs;
+}
+
+/*
+ * Convert a packed array of longs into a generalized multi-dimensional array
+ * of ints.
+ */
+static void
+ltoig(longs, ints, dims, imap, ndims)
+    long	*longs;		/* packed array of longs */
+    int		*ints;		/* multi-dimensional array of integers */
+    long	*dims;		/* list of dimensions */
+    long	*imap;		/* memory access index mapping vector */
+    int		ndims;		/* number of dimensions in list */
+{
+    if (dimprod (dims, ndims) > 0) {
+	int	idim;
+	long	*lp	= longs;
+	char	*ip	= (char*)ints;
+	long	length[MAX_NC_DIMS];
+	long	coords[MAX_NC_DIMS];
+
+	for (idim = 0; idim < ndims; ++idim) {
+	    length[idim]	= dims[idim]*imap[idim];
+	    coords[idim]	= 0;
+	}
+
+	for (;;) {
+	    *(int*)ip	= *lp++;
+	    idim	= ndims - 1;
+	carry:
+	    ip	+= imap[idim];
+	    if (++coords[idim] >= dims[idim]) {
+		coords[idim]	= 0;
+		ip		-= length[idim];
+		if (--idim < 0)
+		    break;
+		goto carry;
+	    }
+        }
+    }
+}
+#endif	/* Alpha platform above */
+
+/* ------------ APPLE FORTRAN jackets for netCDF Functions ------------ */
+
+/* used to set the C global variable ncopts from Fortran */
+void
+#ifdef H4_ABSOFT
+NCPOPT(val)
+#else
+ncpopt(val)
+#endif
+    int		*val;	
+{
+    ncopts = *val;
+}
+
+
+/* used to get the C global variable ncopts from Fortran */
+void
+#ifdef H4_ABSOFT
+NCGOPT(val)
+#else
+ncgopt(val)
+#endif
+    int		*val;	
+{
+    *val = ncopts;
+}
+
+/*
+ * creates a new netCDF file, returning a netCDF ID.  New netCDF
+ * file is placed in define mode.
+ */
+int
+#ifdef H4_ABSOFT
+NCCRE(pathname, clobmode, rcode, pathnamelen)
+#else
+nccre(pathname, clobmode, rcode, pathnamelen)
+#endif
+    char	*pathname;	
+    int		pathnamelen;
+    int		*clobmode;	
+    int		*rcode;	
+{
+    char name[MAX_NC_NAME + 1];
+    int cdfid;
+
+    nstrncpy (name, pathname, pathnamelen);
+    if ((cdfid = nccreate (name, *clobmode)) != -1) {
+	*rcode = 0;
+	return (cdfid);
+    }
+    *rcode = ncerr;
+    return (-1);
+}
+
+
+/* opens an existing netCDF file for access */
+int
+#ifdef H4_ABSOFT
+NCOPN(pathname, rwmode, rcode, pathnamelen)
+#else
+ncopn(pathname, rwmode, rcode, pathnamelen)
+#endif
+    char	*pathname;	
+    int		pathnamelen;
+    int		*rwmode;	
+    int		*rcode;	
+{
+    char name[MAX_NC_NAME + 1];
+    int cdfid;
+
+    nstrncpy (name, pathname, pathnamelen);
+    if ((cdfid = ncopen (name, *rwmode)) != -1) {
+	*rcode = 0;
+	return (cdfid);
+    }
+    *rcode = ncerr;
+    return (-1);
+}
+
+
+/* adds a new dimension to an open netCDF file in define mode */
+int
+#ifdef H4_ABSOFT
+NCDDEF(cdfid, dimname, dimlen, rcode, dimnamelen)
+#else
+ncddef(cdfid, dimname, dimlen, rcode, dimnamelen)
+#endif
+    int		*cdfid;	
+    char	*dimname;	
+    int		dimnamelen;
+    int		*dimlen;	
+    int		*rcode;	
+{
+    char name[MAX_NC_NAME + 1];
+    int dimid;
+
+    nstrncpy (name, dimname, dimnamelen);
+    if ((dimid = ncdimdef (*cdfid, name, (long)*dimlen)) != -1) {
+	*rcode = 0;
+	return (dimid + 1);
+    }
+    *rcode = ncerr;
+    return (-1);
+}
+
+
+/*
+ * returns the ID of a netCDF dimension, given the name of the
+ * dimension
+ */
+int
+#ifdef H4_ABSOFT
+NCDID(cdfid, dimname, rcode, dimnamelen)
+#else
+ncdid(cdfid, dimname, rcode, dimnamelen)
+#endif
+    int		*cdfid;	
+    char	*dimname;	
+    int		dimnamelen;
+    int		*rcode;	
+{
+    char name[MAX_NC_NAME + 1];
+    int dimid;
+
+    nstrncpy (name, dimname, dimnamelen);
+    if ((dimid = ncdimid (*cdfid, name)) != -1) {
+	*rcode = 0;
+	return (dimid + 1);
+    }
+    *rcode = ncerr;
+    return (-1);
+}
+
+
+/* adds a new variable to an open netCDF file in define mode */
+int
+#ifdef H4_ABSOFT
+NCVDEF(cdfid, varname, datatype, ndims, dimarray, rcode, varnamelen)
+#else
+ncvdef(cdfid, varname, datatype, ndims, dimarray, rcode, varnamelen)
+#endif
+    int		*cdfid;	
+    char	*varname;	
+    int		varnamelen;
+    int		*datatype;	
+    int		*ndims;	
+    int		*dimarray;	
+    int		*rcode;	
+{
+    int varid, i, dimid[MAX_VAR_DIMS];
+    char name[MAX_NC_NAME + 1];
+
+    nstrncpy (name, varname, varnamelen);
+    for (i = 0; i < *ndims; i++)
+	dimid[i] = dimarray[i] - 1;
+    reverse (dimid, *ndims);
+    if ((varid = ncvardef (*cdfid, name, (nc_type) *datatype, *ndims,
+			   dimid)) != -1) {
+	*rcode = 0;
+	return (varid + 1);
+    }
+    *rcode = ncerr;
+    return (-1);
+}
+
+
+/* returns the ID of a netCDF variable given its name */
+int
+#ifdef H4_ABSOFT
+NCVID(cdfid, varname, rcode, varnamelen)
+#else
+ncvid(cdfid, varname, rcode, varnamelen)
+#endif
+    int		*cdfid;	
+    char	*varname;	
+    int		varnamelen;
+    int		*rcode;	
+{
+    int varid;
+    char name[MAX_NC_NAME + 1];
+
+    nstrncpy (name, varname, varnamelen);
+    if ((varid = ncvarid (*cdfid, name)) != -1) {
+	*rcode = 0;
+	return (varid + 1);
+    }
+    *rcode = ncerr;
+    return (-1);
+}
+
+
+/* returns number of bytes per netCDF data type */
+int
+#ifdef H4_ABSOFT
+NCTLEN(datatype, rcode)
+#else
+nctlen(datatype, rcode)
+#endif
+    int		*datatype;	
+    int		*rcode;	
+{
+    int itype;
+
+    if ((itype = nctypelen ((nc_type) *datatype)) != -1) {
+	*rcode = 0;
+	return (itype);
+    }
+    *rcode = ncerr;
+    return (-1);
+}
+
+/* closes an open netCDF file */
+void
+#ifdef H4_ABSOFT
+NCCLOS(cdfid, rcode)
+#else
+ncclos(cdfid, rcode)
+#endif
+    int		*cdfid;	
+    int		*rcode;	
+{
+    *rcode = 0;
+    if (ncclose (*cdfid) == -1)
+	*rcode = ncerr;
+}
+
+/* puts an open netCDF into define mode */
+void
+#ifdef H4_ABSOFT
+NCREDF(cdfid, rcode)
+#else
+ncredf(cdfid, rcode)
+#endif
+    int		*cdfid;	
+    int		*rcode;	
+{
+    *rcode = 0;
+    if (ncredef (*cdfid) == -1)
+	*rcode = ncerr;
+}
+
+/* takes an open netCDF out of define mode */
+void
+#ifdef H4_ABSOFT
+NCENDF(cdfid, rcode)
+#else
+ncendf(cdfid, rcode)
+#endif
+    int		*cdfid;	
+    int		*rcode;	
+{
+    *rcode = 0;
+    if (ncendef (*cdfid) == -1)
+	*rcode = ncerr;
+}
+
+/* returns information about an open netCDF file given its netCDF ID */
+void
+#ifdef H4_ABSOFT
+NCINQ(cdfid, ndims, nvars, natts, recdim, rcode)
+#else
+ncinq(cdfid, ndims, nvars, natts, recdim, rcode)
+#endif
+    int		*cdfid;	
+    int		*ndims;	
+    int		*nvars;	
+    int		*natts;	
+    int		*recdim;	
+    int		*rcode;	
+{
+    *rcode = 0;
+    if (ncinquire (*cdfid, ndims, nvars, natts, recdim) == -1) {
+	*rcode = ncerr;
+	return;
+    }
+    if (*recdim != -1)
+	(*recdim)++;
+}
+
+/*
+ * makes sure that the disk copy of a netCDF file open for writing
+ * is current
+ */
+void
+#ifdef H4_ABSOFT
+NCSNC(cdfid, rcode)
+#else
+ncsnc(cdfid, rcode)
+#endif
+    int		*cdfid;	
+    int		*rcode;	
+{
+    *rcode = 0;
+    if (ncsync (*cdfid) == -1)
+	*rcode = ncerr;
+}
+
+/*
+ * restores the netCDF to a known consistent state in case anything
+ * goes wrong during the definition of new dimensions, variables
+ * or attributes
+ */
+void
+#ifdef H4_ABSOFT
+NCABOR(cdfid, rcode)
+#else
+ncabor(cdfid, rcode)
+#endif
+    int		*cdfid;	
+    int		*rcode;	
+{
+    *rcode = 0;
+    if (ncabort (*cdfid) == -1)
+	*rcode = ncerr;
+}
+
+/* returns the name and size of a dimension, given its ID */
+void
+#ifdef H4_ABSOFT
+NCDINQ(cdfid, dimid, dimname, size, rcode, dimnamelen)
+#else
+ncdinq(cdfid, dimid, dimname, size, rcode, dimnamelen)
+#endif
+    int		*cdfid;	
+    int		*dimid;	
+    char	*dimname;	
+    int		dimnamelen;
+    int		*size;	
+    int		*rcode;	
+{
+    long siz;
+    char name[MAX_NC_NAME + 1];
+
+    *rcode = 0;
+    if (ncdiminq (*cdfid, *dimid - 1, name, &siz) == -1) {
+	*rcode = ncerr;
+	return;
+    }
+    *size = siz;
+    if (strlen (name) > dimnamelen) {
+	*rcode = NC_ESTS;
+	handle_err ("NCDINQ", *rcode);
+	return;
+    }
+    /* blank fill the input character string */
+    fcdcpy (dimname, dimnamelen, name);
+}
+
+/* renames an existing dimension in a netCDF open for writing */
+void
+#ifdef H4_ABSOFT
+NCDREN(cdfid, dimid, dimname, rcode, dimnamelen)
+#else
+ncdren(cdfid, dimid, dimname, rcode, dimnamelen)
+#endif
+    int		*cdfid;	
+    int		*dimid;	
+    char	*dimname;	
+    int		dimnamelen;
+    int		*rcode;	
+{
+    char name[MAX_NC_NAME + 1];
+
+    nstrncpy (name, dimname, dimnamelen);
+    *rcode = 0;
+    if (ncdimrename (*cdfid, *dimid - 1, name) == -1)
+	*rcode = ncerr;
+}
+
+/* returns information about a netCDF variable, given its ID */
+void
+#ifdef H4_ABSOFT
+NCVINQ(cdfid, varid, varname, datatype, ndims, dimarray, natts, rcode, varnamelen)
+#else
+ncvinq(cdfid, varid, varname, datatype, ndims, dimarray, natts, rcode, varnamelen)
+#endif
+    int		*cdfid;	
+    int		*varid;	
+    char	*varname;	
+    int		varnamelen;
+    int		*datatype;	
+    int		*ndims;	
+    int		*dimarray;	
+    int		*natts;	
+    int		*rcode;	
+{
+    char name[MAX_NC_NAME + 1];
+    int dimid[MAX_VAR_DIMS], i;
+
+    *rcode = 0;
+    if (ncvarinq (*cdfid, *varid - 1, name, (nc_type *) datatype, ndims, dimid,
+		  natts) == -1) {
+	*rcode = ncerr;
+	return;
+    }
+    for (i = 0; i < *ndims; i++)
+	dimarray[i] = dimid[i] + 1;
+    reverse (dimarray, *ndims);
+    if (strlen (name) > varnamelen) {
+	*rcode = NC_ESTS;
+	handle_err ("NCVINQ", *rcode);
+	return;
+    }
+    fcdcpy (varname, varnamelen, name);
+}
+
+/* puts a single numeric data value into a variable of an open netCDF */
+void
+#ifdef H4_ABSOFT
+NCVPT1(cdfid, varid, indices, value, rcode)
+#else
+ncvpt1(cdfid, varid, indices, value, rcode)
+#endif
+    int		*cdfid;	
+    int		*varid;	
+    int		*indices;	
+    void	*value;	
+    int		*rcode;	
+{
+    int datatype, ndims, natts, i;
+    long nindices[MAX_VAR_DIMS];
+    int dimid[MAX_VAR_DIMS];
+
+    if (ncvarinq (*cdfid, *varid - 1, (char *) 0,
+		  (nc_type *) & datatype, &ndims, dimid, &natts) == -1) {
+	*rcode = ncerr;
+	return;
+    }
+    for (i = 0; i < ndims; i++)
+	nindices[i] = indices[i] - 1;
+    revlongs (nindices, ndims);
+    *rcode = 0;
+#ifdef FORTRAN_HAS_NO_BYTE
+    if ((nc_type) datatype == NC_BYTE) {	/* pack ints into bytes */
+	char           bytes = *(int *) value;
+	if (ncvarput1(*cdfid, *varid - 1, nindices,
+		      (ncvoid *) &bytes) == -1) {
+	    *rcode = ncerr;
+	}
+	return;
+    }				/* else */
+#endif				/* FORTRAN_HAS_NO_BYTE */
+#ifdef FORTRAN_HAS_NO_SHORT
+    if ((nc_type) datatype == NC_SHORT) {	/* pack ints into shorts */
+	short          shorts = *(int *)value;
+	if (ncvarput1(*cdfid, *varid - 1, nindices, (ncvoid *) &shorts) == -1) {
+	    *rcode = ncerr;
+	}
+	return;
+    }				/* else */
+#endif				/* FORTRAN_HAS_NO_SHORT */
+    if (ncvarput1 (*cdfid, *varid - 1, nindices, value) == -1) {
+	*rcode = ncerr;
+    }
+}
+
+/* puts a single character into an open netCDF file */
+void
+#ifdef H4_ABSOFT
+NCVP1C(cdfid, varid, indices, chval, rcode, chvallen)
+#else
+ncvp1c(cdfid, varid, indices, chval, rcode, chvallen)
+#endif
+    int		*cdfid;	
+    int		*varid;	
+    int		*indices;	
+    char	*chval;	
+    int		chvallen;
+    int		*rcode;	
+{
+    int datatype, ndims, natts, i;
+    long nindices[MAX_VAR_DIMS];
+    int dimid[MAX_VAR_DIMS];
+
+    if (ncvarinq (*cdfid, *varid - 1, (char *) 0,
+		  (nc_type *) & datatype, &ndims, dimid, &natts) == -1) {
+	*rcode = ncerr;
+	return;
+    }
+    for (i = 0; i < ndims; i++)
+	nindices[i] = indices[i] - 1;
+    revlongs (nindices, ndims);
+    *rcode = 0;
+    if (ncvarput1 (*cdfid, *varid - 1, nindices, (ncvoid *) chval) == -1) {
+	*rcode = ncerr;
+    }
+}
+
+/*
+ * writes a hypercube of numeric values into a netCDF variable of an open
+ * netCDF file
+ */
+void
+#ifdef H4_ABSOFT
+NCVPT(cdfid, varid, start, count, value, rcode)
+#else
+ncvpt(cdfid, varid, start, count, value, rcode)
+#endif
+    int		*cdfid;	
+    int		*varid;	
+    int		*start;	
+    int		*count;	
+    void	*value;	
+    int		*rcode;	
+{
+    long ncount[MAX_VAR_DIMS], nstart[MAX_VAR_DIMS], i;
+    int ndims, datatype, dimarray[MAX_VAR_DIMS], natts;
+
+    if (ncvarinq (*cdfid, *varid - 1, (char *) 0, (nc_type *) & datatype,
+		  &ndims, dimarray, &natts) == -1) {
+	*rcode = ncerr;
+	return;
+    }
+    for (i = 0; i < ndims; i++) {
+	ncount[i] = count[i];
+	nstart[i] = start[i] - 1;
+    }
+    revlongs (ncount, ndims);
+    revlongs (nstart, ndims);
+
+    *rcode = 0;
+#ifdef FORTRAN_HAS_NO_BYTE
+    if ((nc_type) datatype == NC_BYTE) {	/* pack ints into bytes */
+	char *bytes = itob (value, ncount, ndims);
+	if (bytes == NULL) {
+	    *rcode = NC_SYSERR;
+	    return;
+	    }
+	if (ncvarput (*cdfid, *varid - 1, nstart, ncount,
+	              (ncvoid *) bytes) == -1) {
+	    *rcode = ncerr;
+	}
+	free (bytes);
+	return;
+    }				/* else */
+#endif				/* FORTRAN_HAS_NO_BYTE */
+#ifdef FORTRAN_HAS_NO_SHORT
+    if ((nc_type) datatype == NC_SHORT) { /* pack ints into shorts */
+	short *shorts = itos (value, ncount, ndims);
+	if (shorts == NULL) {
+	    *rcode = NC_SYSERR;
+	    return;
+	    }
+	if (ncvarput (*cdfid, *varid - 1, nstart, ncount,
+		      (ncvoid *) shorts) == -1) {
+	    *rcode = ncerr;
+	}
+	free (shorts);
+	return;
+    }				/* else */
+#endif				/* FORTRAN_HAS_NO_SHORT */
+    if (ncvarput (*cdfid, *varid - 1, nstart, ncount, value) == -1) {
+	*rcode = ncerr;
+    }
+}
+
+/* writes a hypercube of character values into an open netCDF file */
+void
+#ifdef H4_ABSOFT
+NCVPTC(cdfid, varid, start, count, string, lenstr, rcode, stringlen)
+#else
+ncvptc(cdfid, varid, start, count, string, lenstr, rcode, stringlen)
+#endif
+    int		*cdfid;	
+    int		*varid;	
+    int		*start;	
+    int		*count;	
+    char	*string;	
+    int		stringlen;
+    int		*lenstr;	
+    int		*rcode;	
+{
+    long ncount[MAX_VAR_DIMS], nstart[MAX_VAR_DIMS], i;
+    int ndims, datatype, dimarray[MAX_VAR_DIMS], natts;
+
+    if (ncvarinq (*cdfid, *varid - 1, (char *) 0,
+		  (nc_type *) & datatype, &ndims, dimarray, &natts) == -1) {
+	*rcode = ncerr;
+	return;
+    }
+    for (i = 0; i < ndims; i++) {
+	ncount[i] = count[i];
+	nstart[i] = start[i] - 1;
+    }
+    revlongs (ncount, ndims);
+    revlongs (nstart, ndims);
+    if (dimprod(ncount,ndims) > *lenstr) {
+	*rcode = NC_ESTS;
+	handle_err ("NCVPTC", *rcode);
+	return;
+    }
+    *rcode = 0;
+    if (ncvarput (*cdfid, *varid - 1, nstart, ncount, (ncvoid *) string) == -1) {
+	*rcode = ncerr;
+    }
+}
+
+/*
+ * writes a generalized hypercube of numeric values into a netCDF variable of 
+ * an open netCDF file
+ */
+void
+#ifdef H4_ABSOFT
+NCVPTG(cdfid, varid, start, count, stride, basis, value, rcode)
+#else
+ncvptg(cdfid, varid, start, count, stride, basis, value, rcode)
+#endif
+    int		*cdfid;	
+    int		*varid;	
+    int		*start;	
+    int		*count;	
+    int		*stride;	
+    int		*basis;	
+    void	*value;	
+    int		*rcode;	
+{
+    long ncount[MAX_VAR_DIMS], nstart[MAX_VAR_DIMS], i;
+    long nstride[MAX_VAR_DIMS], nbasis[MAX_VAR_DIMS];
+    long tmpbasis;
+    int ndims, datatype, dimarray[MAX_VAR_DIMS], natts;
+
+    if (ncvarinq (*cdfid, *varid - 1, (char *) 0, (nc_type *) & datatype,
+		  &ndims, dimarray, &natts) == -1) {
+	*rcode = ncerr;
+	return;
+    }
+#ifdef FORTRAN_HAS_NO_BYTE
+    if (datatype == NC_CHAR || datatype == NC_BYTE)
+	tmpbasis	= nctypelen(NC_LONG);
+    else
+#endif
+#ifdef FORTRAN_HAS_NO_SHORT
+    if (datatype == NC_SHORT)
+	tmpbasis	= nctypelen(NC_LONG);
+    else
+#endif
+#if defined __alpha || (_MIPS_SZLONG == 64) || defined __ia64 || (defined __sun && defined _LP64) || defined AIX5L64 || defined __x86_64__
+
+    if (datatype == NC_LONG)
+	tmpbasis	= sizeof(int);
+    else
+#endif
+	tmpbasis	= nctypelen(datatype);
+    for (i = 0; i < ndims; i++) {
+	ncount[i] = count[i];
+	nstart[i] = start[i] - 1;
+	nstride[i] = stride[0] == 0 ? 1 : stride[i];
+	nbasis[i] = basis[0] == 0 ? tmpbasis : basis[i];
+	tmpbasis *= count[i];
+    }
+    revlongs (ncount, ndims);
+    revlongs (nstart, ndims);
+    revlongs (nstride, ndims);
+    revlongs (nbasis, ndims);
+
+    *rcode = 0;
+#ifdef FORTRAN_HAS_NO_BYTE
+    if ((nc_type) datatype == NC_BYTE) {	/* pack ints into bytes */
+	/*
+	 * Release 2.3.1 had a bug in the following line: it used count
+	 * rather than ncount.
+	 */
+	char *bytes = itobg (value, ncount, nbasis, ndims);
+	if (bytes == NULL) {
+	    *rcode = NC_SYSERR;
+	    return;
+	    }
+	if (ncvarputg (*cdfid, *varid - 1, nstart, ncount, nstride, 
+		       (long*)NULL, (ncvoid *) bytes) == -1) {
+	    *rcode = ncerr;
+	}
+	free (bytes);
+	return;
+    }				/* else */
+#endif				/* FORTRAN_HAS_NO_BYTE */
+#ifdef FORTRAN_HAS_NO_SHORT
+    if ((nc_type) datatype == NC_SHORT) { /* pack ints into shorts */
+	/*
+	 * Release 2.3.1 had a bug in the following line: it used count
+	 * rather than ncount.
+	 */
+	short *shorts = itosg (value, ncount, nbasis, ndims);
+	if (shorts == NULL) {
+	    *rcode = NC_SYSERR;
+	    return;
+	    }
+	if (ncvarputg (*cdfid, *varid - 1, nstart, ncount, nstride,
+		      (long*)NULL, (ncvoid *) shorts) == -1) {
+	    *rcode = ncerr;
+	}
+	free (shorts);
+	return;
+    }				/* else */
+#endif				/* FORTRAN_HAS_NO_SHORT */
+    if (ncvarputg (*cdfid, *varid - 1, nstart, ncount, nstride, nbasis,
+		   value) == -1) {
+	*rcode = ncerr;
+    }
+}
+
+/*
+ * writes a generalized hypercube of character values into a netCDF variable of 
+ * an open netCDF file
+ */
+void
+#ifdef H4_ABSOFT
+NCVPGC(cdfid, varid, start, count, stride, basis, string, rcode, stringlen)
+#else
+ncvpgc(cdfid, varid, start, count, stride, basis, string, rcode, stringlen)
+#endif
+    int		*cdfid;	
+    int		*varid;	
+    int		*start;	
+    int		*count;	
+    int		*stride;	
+    int		*basis;	
+    char	*string;	
+    int		stringlen;
+    int		*rcode;	
+{
+    long ncount[MAX_VAR_DIMS], nstart[MAX_VAR_DIMS], i;
+    long nstride[MAX_VAR_DIMS], nbasis[MAX_VAR_DIMS];
+    long tmpbasis;
+    int ndims, datatype, dimarray[MAX_VAR_DIMS], natts;
+
+    if (ncvarinq (*cdfid, *varid - 1, (char *) 0, (nc_type *) & datatype,
+		  &ndims, dimarray, &natts) == -1) {
+	*rcode = ncerr;
+	return;
+    }
+    tmpbasis	= nctypelen(datatype);
+    for (i = 0; i < ndims; i++) {
+	ncount[i] = count[i];
+	nstart[i] = start[i] - 1;
+	nstride[i] = stride[0] == 0 ? 1 : stride[i];
+	nbasis[i] = basis[0] == 0 ? tmpbasis : basis[i];
+	tmpbasis *= count[i];
+    }
+    revlongs (ncount, ndims);
+    revlongs (nstart, ndims);
+    revlongs (nstride, ndims);
+    revlongs (nbasis, ndims);
+
+    *rcode = 0;
+    if (ncvarputg (*cdfid, *varid - 1, nstart, ncount, nstride, nbasis,
+		   (ncvoid*)string) == -1) {
+	*rcode = ncerr;
+    }
+}
+
+/* gets a single numeric value from a variable of an open netCDF file */
+void
+#ifdef H4_ABSOFT
+NCVGT1(cdfid, varid, indices, value, rcode)
+#else
+ncvgt1(cdfid, varid, indices, value, rcode)
+#endif
+    int		*cdfid;	
+    int		*varid;	
+    int		*indices;	
+    void	*value;	
+    int		*rcode;	
+{
+    long nindices[MAX_VAR_DIMS], i;
+    int datatype, ndims, dimarray[MAX_VAR_DIMS], natts;
+
+    if (ncvarinq (*cdfid, *varid - 1, (char *) 0, (nc_type *) & datatype,
+		  &ndims, dimarray, &natts) == -1) {
+	*rcode = ncerr;
+	return;
+    }
+    for (i = 0; i < ndims; i++) {
+	nindices[i] = indices[i] - 1;
+    }
+    revlongs (nindices, ndims);
+    *rcode = 0;
+#ifdef FORTRAN_HAS_NO_BYTE
+    if ((nc_type) datatype == NC_BYTE) {
+	char           bytes;
+	int            *ip = (int *) value;
+	char           *bp = &bytes;
+
+	if (ncvarget1(*cdfid, *varid - 1, nindices, (ncvoid *) &bytes) == -1) {
+	    *rcode = ncerr;
+	    return;
+	}
+	*ip = *bp;
+	return;
+    }				/* else */
+#endif				/* FORTRAN_HAS_NO_BYTE */
+#ifdef FORTRAN_HAS_NO_SHORT
+    if ((nc_type) datatype == NC_SHORT) {
+	short          shorts;
+	int            *ip = (int *) value;
+	short          *sp = &shorts;
+
+	if (ncvarget1(*cdfid, *varid - 1, nindices, (ncvoid *) &shorts) == -1) {
+	    *rcode = ncerr;
+	    return;
+	}
+	*ip = *sp;
+	return;
+    }				/* else */
+#endif				/* FORTRAN_HAS_NO_SHORT */
+    if (ncvarget1 (*cdfid, *varid - 1, nindices, value) == -1) {
+	*rcode = ncerr;
+    }
+}
+
+/*
+ * gets a single character data value from a variable of an open
+ * netCDF file
+ */
+void
+#ifdef H4_ABSOFT
+NCVG1C(cdfid, varid, indices, chval, rcode, chvallen)
+#else
+ncvg1c(cdfid, varid, indices, chval, rcode, chvallen)
+#endif
+    int		*cdfid;	
+    int		*varid;	
+    int		*indices;	
+    char	*chval;	
+    int		chvallen;
+    int		*rcode;	
+{
+    long nindices[MAX_VAR_DIMS];
+    int i, datatype, ndims, dimarray[MAX_VAR_DIMS], natts;
+
+    if (ncvarinq (*cdfid, *varid - 1, (char *) 0,
+		  (nc_type *) & datatype, &ndims, dimarray, &natts) == -1) {
+	*rcode = ncerr;
+	return;
+    }
+
+    for (i = 0; i < ndims; i++) {
+	nindices[i] = indices[i] - 1;
+    }
+    revlongs (nindices, ndims);
+    *rcode = 0;
+    if (ncvarget1 (*cdfid, *varid - 1, nindices, (ncvoid *) chval) == -1) {
+	*rcode = ncerr;
+    }
+}
+
+/*
+ * reads a hypercube of numeric values from a netCDF variable of an open
+ * netCDF file
+ */
+void
+#ifdef H4_ABSOFT
+NCVGT(cdfid, varid, start, count, value, rcode)
+#else
+ncvgt(cdfid, varid, start, count, value, rcode)
+#endif
+    int		*cdfid;	
+    int		*varid;	
+    int		*start;	
+    int		*count;	
+    void	*value;	
+    int		*rcode;	
+{
+    long ncount[MAX_VAR_DIMS], nstart[MAX_VAR_DIMS];
+    int i, ndims, datatype, dimarray[MAX_VAR_DIMS], natts;
+
+    if (ncvarinq (*cdfid, *varid - 1, (char *) 0, (nc_type *) & datatype,
+		  &ndims, dimarray, &natts) == -1) {
+	*rcode = ncerr;
+	return;
+    }
+    for (i = 0; i < ndims; i++) {
+	ncount[i] = count[i];
+	nstart[i] = start[i] - 1;
+    }
+    revlongs (ncount, ndims);
+    revlongs (nstart, ndims);
+
+    *rcode = 0;
+#ifdef FORTRAN_HAS_NO_BYTE
+    if ((nc_type) datatype == NC_BYTE) {
+	long iocount = dimprod (ncount, ndims);	/* product of dimensions */
+	char *bytes = (char *) malloc (iocount * sizeof (char));
+	int *ip;
+	char *bp = bytes;
+
+	if (bytes == NULL) {
+	    *rcode = NC_SYSERR;
+	    return;
+	}
+	if (ncvarget (*cdfid, *varid - 1, nstart, ncount,
+		      (ncvoid *) bytes) == -1) {
+	    *rcode = ncerr;
+	    free (bytes);
+	    return;
+	}
+	for (ip = (int *) value; iocount > 0; iocount--)
+	  *ip++ = *bp++;
+	free (bytes);
+	return;
+    }				/* else */
+#endif				/* FORTRAN_HAS_NO_BYTE */
+#ifdef FORTRAN_HAS_NO_SHORT
+    if ((nc_type) datatype == NC_SHORT) {
+	long iocount = dimprod (ncount, ndims);	/* product of dimensions */
+	short *shorts = (short *) malloc (iocount * sizeof (short));
+	int *ip;
+	short *sp = shorts;
+
+	if (shorts == NULL) {
+	    *rcode = NC_SYSERR;
+	    return;
+	}
+	if (ncvarget (*cdfid, *varid - 1, nstart, ncount,
+		      (ncvoid *) shorts) == -1) {
+	    *rcode = ncerr;
+	    free (shorts);
+	    return;
+	}
+	for (ip = (int *) value; iocount > 0; iocount--)
+	    *ip++ = *sp++;
+	free (shorts);
+	return;
+    }				/* else */
+#endif				/* FORTRAN_HAS_NO_SHORT */
+    if (ncvarget (*cdfid, *varid - 1, nstart, ncount, value) == -1) {
+	*rcode = ncerr;
+    }
+}
+
+/* reads a hypercube of character values from a netCDF variable */
+void
+#ifdef H4_ABSOFT
+NCVGTC(cdfid, varid, start, count, string, lenstr, rcode, stringlen)
+#else
+ncvgtc(cdfid, varid, start, count, string, lenstr, rcode, stringlen)
+#endif
+    int		*cdfid;	
+    int		*varid;	
+    int		*start;	
+    int		*count;	
+    char	*string;	
+    int		stringlen;
+    int		*lenstr;	
+    int		*rcode;	
+{
+    long ncount[MAX_VAR_DIMS], nstart[MAX_VAR_DIMS];
+    int i, ndims, datatype, dimarray[MAX_VAR_DIMS], natts;
+    int prod = 1;
+
+    if (ncvarinq (*cdfid, *varid - 1, (char *) 0,
+		  (nc_type *) & datatype, &ndims, dimarray, &natts) == -1) {
+	*rcode = ncerr;
+	return;
+    }
+    for (i = 0; i < ndims; i++) {
+	ncount[i] = count[i];
+	nstart[i] = start[i] - 1;
+	prod *= count[i];
+    }
+    if (prod > *lenstr) {
+	*rcode = NC_ESTS;
+	handle_err ("NCVGTC", *rcode);
+	return;
+    }
+    revlongs (ncount, ndims);
+    revlongs (nstart, ndims);
+    *rcode = 0;
+    if (ncvarget (*cdfid, *varid - 1, nstart, ncount, (ncvoid *) string) == -1) {
+	*rcode = ncerr;
+	return;
+    }
+
+    for (i = prod; i < *lenstr; i++)
+	string[i] = ' ';
+}
+
+/*
+ * reads a generalized hypercube of numeric values from a netCDF variable of an 
+ * open netCDF file
+ */
+void
+#ifdef H4_ABSOFT
+NCVGTG(cdfid, varid, start, count, stride, basis, value, rcode)
+#else
+ncvgtg(cdfid, varid, start, count, stride, basis, value, rcode)
+#endif
+    int		*cdfid;	
+    int		*varid;	
+    int		*start;	
+    int		*count;	
+    int		*stride;	
+    int		*basis;	
+    void	*value;	
+    int		*rcode;	
+{
+    long ncount[MAX_VAR_DIMS], nstart[MAX_VAR_DIMS];
+    long nstride[MAX_VAR_DIMS], nbasis[MAX_VAR_DIMS];
+    long tmpbasis;
+    int i, ndims, datatype, dimarray[MAX_VAR_DIMS], natts;
+
+    if (ncvarinq (*cdfid, *varid - 1, (char *) 0, (nc_type *) & datatype,
+		  &ndims, dimarray, &natts) == -1) {
+	*rcode = ncerr;
+	return;
+    }
+#ifdef FORTRAN_HAS_NO_BYTE
+    if (datatype == NC_CHAR || datatype == NC_BYTE)
+	tmpbasis	= nctypelen(NC_LONG);
+    else
+#endif
+#ifdef FORTRAN_HAS_NO_SHORT
+    if (datatype == NC_SHORT)
+	tmpbasis	= nctypelen(NC_LONG);
+    else
+#endif
+#if defined __alpha || (_MIPS_SZLONG == 64) || defined __ia64 || (defined __sun && defined _LP64) || defined AIX5L64 || defined __x86_64__
+
+    if (datatype == NC_LONG)
+	tmpbasis	= sizeof(int);
+    else
+#endif
+	tmpbasis	= nctypelen(datatype);
+    for (i = 0; i < ndims; i++) {
+	ncount[i] = count[i];
+	nstart[i] = start[i] - 1;
+	nstride[i] = stride[0] == 0 ? 1 : stride[i];
+	nbasis[i] = basis[0] == 0 ? tmpbasis : basis[i];
+	tmpbasis *= count[i];
+    }
+    revlongs (ncount, ndims);
+    revlongs (nstart, ndims);
+    revlongs (nstride, ndims);
+    revlongs (nbasis, ndims);
+
+    *rcode = 0;
+#ifdef FORTRAN_HAS_NO_BYTE
+    if ((nc_type) datatype == NC_BYTE) {
+	long iocount = dimprod (ncount, ndims);	/* product of dimensions */
+	char *bytes = (char *) malloc (iocount * sizeof (char));
+	int *ip;
+	char *bp = bytes;
+
+	if (bytes == NULL) {
+	    *rcode = NC_SYSERR;
+	    return;
+	}
+	if (ncvargetg (*cdfid, *varid - 1, nstart, ncount, nstride,
+		      (long*)NULL, (ncvoid *) bytes) == -1) {
+	    *rcode = ncerr;
+	    free (bytes);
+	    return;
+	}
+	/*
+	 * Release 2.3.1 had a bug in the following line: it used basis
+	 * rather than nbasis.
+	 */
+	btoig(bytes, (int*)value, ncount, nbasis, ndims);
+	free (bytes);
+	return;
+    }				/* else */
+#endif				/* FORTRAN_HAS_NO_BYTE */
+#ifdef FORTRAN_HAS_NO_SHORT
+    if ((nc_type) datatype == NC_SHORT) {
+	long iocount = dimprod (ncount, ndims);	/* product of dimensions */
+	short *shorts = (short *) malloc (iocount * sizeof (short));
+	int *ip;
+	short *sp = shorts;
+
+	if (shorts == NULL) {
+	    *rcode = NC_SYSERR;
+	    return;
+	}
+	if (ncvargetg (*cdfid, *varid - 1, nstart, ncount, nstride, 
+		       (long*)NULL, (ncvoid *) shorts) == -1) {
+	    *rcode = ncerr;
+	    free (shorts);
+	    return;
+	}
+	/*
+	 * Release 2.3.1 had a bug in the following line: it used basis
+	 * rather than nbasis.
+	 */
+	stoig(shorts, (int*)value, ncount, nbasis, ndims);
+	free (shorts);
+	return;
+    }				/* else */
+#endif				/* FORTRAN_HAS_NO_SHORT */
+    if (ncvargetg (*cdfid, *varid - 1, nstart, ncount, nstride,
+		   nbasis, value) == -1) {
+	*rcode = ncerr;
+    }
+}
+
+/*
+ * reads a generalized hypercube of character values from a netCDF variable 
+ * of an open netCDF file
+ */
+void
+#ifdef H4_ABSOFT
+NCVGGC(cdfid, varid, start, count, stride, basis, string, rcode, stringlen)
+#else
+ncvggc(cdfid, varid, start, count, stride, basis, string, rcode, stringlen)
+#endif
+    int		*cdfid;	
+    int		*varid;	
+    int		*start;	
+    int		*count;	
+    int		*stride;	
+    int		*basis;	
+    char	*string;	
+    int		stringlen;
+    int		*rcode;	
+{
+    long ncount[MAX_VAR_DIMS], nstart[MAX_VAR_DIMS];
+    long nstride[MAX_VAR_DIMS], nbasis[MAX_VAR_DIMS];
+    long tmpbasis;
+    int i, ndims, datatype, dimarray[MAX_VAR_DIMS], natts;
+
+    if (ncvarinq (*cdfid, *varid - 1, (char *) 0, (nc_type *) & datatype,
+		  &ndims, dimarray, &natts) == -1) {
+	*rcode = ncerr;
+	return;
+    }
+    tmpbasis	= nctypelen(datatype);
+    for (i = 0; i < ndims; i++) {
+	ncount[i] = count[i];
+	nstart[i] = start[i] - 1;
+	nstride[i] = stride[0] == 0 ? 1 : stride[i];
+	nbasis[i] = basis[0] == 0 ? tmpbasis : basis[i];
+	tmpbasis *= count[i];
+    }
+    revlongs (ncount, ndims);
+    revlongs (nstart, ndims);
+    revlongs (nstride, ndims);
+    revlongs (nbasis, ndims);
+
+    *rcode = 0;
+    if (ncvargetg (*cdfid, *varid - 1, nstart, ncount, nstride,
+		   nbasis, (ncvoid*)string) == -1) {
+	*rcode = ncerr;
+    }
+}
+
+/* changes the name of a netCDF variable in an open netCDF file */
+void
+#ifdef H4_ABSOFT
+NCVREN(cdfid, varid, varname, rcode, varnamelen)
+#else
+ncvren(cdfid, varid, varname, rcode, varnamelen)
+#endif
+    int		*cdfid;	
+    int		*varid;	
+    char	*varname;	
+    int		varnamelen;
+    int		*rcode;	
+{
+    char name[MAX_NC_NAME + 1];
+
+    nstrncpy (name, varname, varnamelen);
+    *rcode = 0;
+    if (ncvarrename (*cdfid, *varid - 1, name) == -1) {
+	*rcode = ncerr;
+    }
+}
+
+/*
+ * adds or changes a numeric variable or global attribute of an open
+ * netCDF file
+ */
+void
+#ifdef H4_ABSOFT
+NCAPT(cdfid, varid, attname, datatype, attlen, value, rcode, attnamelen)
+#else
+ncapt(cdfid, varid, attname, datatype, attlen, value, rcode, attnamelen)
+#endif
+    int		*cdfid;	
+    int		*varid;	
+    char	*attname;	
+    int		attnamelen;
+    int		*datatype;	
+    int		*attlen;	
+    void	*value;	
+    int		*rcode;	
+{
+    char name[MAX_NC_NAME + 1];
+
+    nstrncpy (name, attname, attnamelen);
+
+    *rcode = 0;
+#ifdef FORTRAN_HAS_NO_BYTE
+    if ((nc_type) *datatype == NC_BYTE) {	/* pack ints into bytes */
+	char *bytes = itob (value, attlen, 1);
+
+	if (bytes == NULL) {
+	    *rcode = NC_SYSERR;
+	    return;
+	}
+	if (ncattput (*cdfid, *varid - 1, name, (nc_type) *datatype, *attlen,
+		      (ncvoid *) bytes) == -1) {
+	    *rcode = ncerr;
+	}
+	free (bytes);
+	return;
+    }				/* else */
+#endif				/* FORTRAN_HAS_NO_BYTE */
+#ifdef FORTRAN_HAS_NO_SHORT
+    if ((nc_type) *datatype == NC_SHORT) {	/* pack ints into shorts */
+	short *shorts = itos (value, attlen, 1);
+
+	if (shorts == NULL) {
+	    *rcode = NC_SYSERR;
+	    return;
+	}
+	if (ncattput (*cdfid, *varid - 1, name, (nc_type) *datatype, *attlen,
+		      (ncvoid *) shorts) == -1) {
+	    *rcode = ncerr;
+	}
+	free (shorts);
+	return;
+    }				/* else */
+#endif				/* FORTRAN_HAS_NO_SHORT */
+    if (ncattput (*cdfid, *varid - 1, name, (nc_type) *datatype, *attlen,
+		  value) == -1) {
+	*rcode = ncerr;
+    }
+}
+
+/*
+ * adds or changes a character variable or global attribute
+ * of an open netCDF file
+ */
+void
+#ifdef H4_ABSOFT
+NCAPTC(cdfid, varid, attname, datatype, lenstr, string, rcode, attnamelen, stringlen)
+#else
+ncaptc(cdfid, varid, attname, datatype, lenstr, string, rcode, attnamelen, stringlen)
+#endif
+    int		*cdfid;	
+    int		*varid;	
+    char	*attname;	
+    int		attnamelen;
+    int		*datatype;	
+    int		*lenstr;	
+    char	*string;	
+    int		stringlen;
+    int		*rcode;	
+{
+    char name[MAX_NC_NAME + 1];
+    char *value;
+
+    nstrncpy (name, attname, attnamelen);
+    if (((value = malloc ((unsigned) *lenstr + 1)) == NULL) || (*lenstr == 0)) {
+	*rcode = NC_ESTS;
+	handle_err ("NCAPTC", *rcode);
+	return;
+    }
+    (void) fstrncpy (value, string, *lenstr);
+    *rcode = 0;
+    if (ncattput (*cdfid, *varid - 1, name, (nc_type) *datatype, *lenstr,
+		  (ncvoid *) value) == -1) {
+	*rcode = ncerr;
+    }
+    free (value);
+}
+
+/*
+ * returns information about a netCDF attribute given its variable
+ * ID and name
+ */
+void
+#ifdef H4_ABSOFT
+NCAINQ(cdfid, varid, attname, datatype, attlen, rcode, attnamelen)
+#else
+ncainq(cdfid, varid, attname, datatype, attlen, rcode, attnamelen)
+#endif
+    int		*cdfid;	
+    int		*varid;	
+    char	*attname;	
+    int		attnamelen;
+    int		*datatype;	
+    int		*attlen;	
+    int		*rcode;	
+{
+    char name[MAX_NC_NAME + 1];
+
+    nstrncpy (name, attname, attnamelen);
+    *rcode = 0;
+    if (ncattinq (*cdfid, *varid - 1, name, (nc_type *) datatype, attlen) == -1) {
+	*rcode = ncerr;
+    }
+}
+
+/*
+ * gets the value of a netCDF attribute given its variable ID
+ * and name
+ */
+void
+#ifdef H4_ABSOFT
+NCAGT(cdfid, varid, attname, value, rcode, attnamelen)
+#else
+ncagt(cdfid, varid, attname, value, rcode, attnamelen)
+#endif
+    int		*cdfid;	
+    int		*varid;	
+    char	*attname;	
+    int		attnamelen;
+    void	*value;	
+    int		*rcode;	
+{
+    char name[MAX_NC_NAME + 1];
+    int datatype;
+    int attlen;
+
+    nstrncpy (name, attname, attnamelen);
+    *rcode = 0;
+    if (ncattinq (*cdfid, *varid - 1, name, (nc_type *) &datatype, &attlen)
+	    == -1) {
+	*rcode = ncerr;
+	return;
+    }
+#ifdef FORTRAN_HAS_NO_BYTE
+    if ((nc_type) datatype == NC_BYTE) {
+	char *bytes = (char *) malloc (attlen);
+	int *ip;
+	char *bp = bytes;
+
+	if (bytes == NULL) {
+	    *rcode = NC_SYSERR;
+	    return;
+	}
+	if (ncattget (*cdfid, *varid - 1, name, (ncvoid *) bytes) == -1) {
+	    *rcode = ncerr;
+	    free (bytes);
+	    return;
+	}
+	for (ip = (int *) value; attlen > 0; attlen--)
+	    *ip++ = *bp++;
+	free (bytes);
+	return;
+    }				/* else */
+#endif				/* FORTRAN_HAS_NO_BYTE */
+#ifdef FORTRAN_HAS_NO_SHORT
+    if ((nc_type) datatype == NC_SHORT) {
+	short *shorts = (short *) malloc (attlen * sizeof (short));
+	int *ip;
+	short *sp = shorts;
+
+	if (shorts == NULL) {
+	    *rcode = NC_SYSERR;
+	    return;
+	}
+	if (ncattget (*cdfid, *varid - 1, name, (ncvoid *) shorts) == -1) {
+	    *rcode = ncerr;
+	    free (shorts);
+	    return;
+	}
+	for (ip = (int *) value; attlen > 0; attlen--)
+	    *ip++ = *sp++;
+	free (shorts);
+	return;
+    }				/* else */
+#endif				/* FORTRAN_HAS_NO_SHORT */
+    if (ncattget (*cdfid, *varid - 1, name, value) == -1) {
+	*rcode = ncerr;
+    }
+}
+
+/*
+ * gets the value of a netCDF character attribute given its variable
+ * ID and name
+ */
+void
+#ifdef H4_ABSOFT
+NCAGTC(cdfid, varid, attname, string, lenstr, rcode, attnamelen, stringlen)
+#else
+ncagtc(cdfid, varid, attname, string, lenstr, rcode, attnamelen, stringlen)
+#endif
+    int		*cdfid;	
+    int		*varid;	
+    char	*attname;	
+    int		attnamelen;
+    char	*string;	
+    int		stringlen;
+    int		*lenstr;	
+    int		*rcode;	
+{
+    char name[MAX_NC_NAME + 1];
+    int datatype;
+    int attlen;
+    int i;
+
+    nstrncpy (name, attname, attnamelen);
+    *rcode = 0;
+    if (ncattinq (*cdfid, *varid - 1, name, (nc_type *) &datatype, &attlen) == -1) {
+	*rcode = ncerr;
+	return;
+    }
+    if (attlen > *lenstr) {
+	*rcode = NC_ESTS;
+	handle_err ("NCAGTC", *rcode);
+	return;
+    }
+    if (ncattget (*cdfid, *varid - 1, name, (ncvoid *) string) == -1) {
+	*rcode = ncerr;
+	return;
+    }
+
+    for (i = attlen; i < *lenstr; i++)
+	string[i] = ' ';
+}
+
+/* copies an attribute from one open netCDF file to another */
+void
+#ifdef H4_ABSOFT
+NCACPY(incdfid, invarid, attname, outcdfid, outvarid, rcode, attnamelen)
+#else
+ncacpy(incdfid, invarid, attname, outcdfid, outvarid, rcode, attnamelen)
+#endif
+    int		*incdfid;	
+    int		*invarid;	
+    char	*attname;	
+    int		attnamelen;
+    int		*outcdfid;	
+    int		*outvarid;	
+    int		*rcode;	
+{
+    char name[MAX_NC_NAME + 1];
+
+    nstrncpy (name, attname, attnamelen);
+    *rcode = 0;
+    if (ncattcopy (*incdfid, *invarid - 1, name,
+		   *outcdfid, *outvarid - 1) == -1) {
+	*rcode = ncerr;
+    }
+}
+
+/*
+ * gets the name of an attribute given its variable ID and number
+ * as an attribute of that variable
+ */
+void
+#ifdef H4_ABSOFT
+NCANAM(cdfid, varid, attnum, attname, rcode, attnamelen)
+#else
+ncanam(cdfid, varid, attnum, attname, rcode, attnamelen)
+#endif
+    int		*cdfid;	
+    int		*varid;	
+    int		*attnum;	
+    char	*attname;	
+    int		attnamelen;
+    int		*rcode;	
+{
+    char name[MAX_NC_NAME + 1];
+
+    *rcode = 0;
+    if (ncattname (*cdfid, *varid - 1, *attnum - 1, name) == -1) {
+	*rcode = ncerr;
+	return;
+    }
+    if (strlen (name) > attnamelen) {
+	*rcode = NC_ESTS;
+	handle_err ("NCANAM", *rcode);
+	return;
+    }
+    fcdcpy (attname, attnamelen, name);
+}
+
+
+/* renames an attribute in an open netCDF file */
+void
+#ifdef H4_ABSOFT
+NCAREN(cdfid, varid, attname, newname, rcode, attnamelen, newnamelen)
+#else
+ncaren(cdfid, varid, attname, newname, rcode, attnamelen, newnamelen)
+#endif
+    int		*cdfid;	
+    int		*varid;	
+    char	*attname;	
+    int		attnamelen;
+    char	*newname;	
+    int		newnamelen;
+    int		*rcode;	
+{
+    char name[MAX_NC_NAME + 1], nname[MAX_NC_NAME + 1];
+
+    nstrncpy (name, attname, attnamelen);
+    nstrncpy (nname, newname, newnamelen);
+    *rcode = 0;
+    if (ncattrename (*cdfid, *varid - 1, name, nname) == -1) {
+	*rcode = ncerr;
+    }
+}
+
+/*
+ * deletes an attribute from an open netCDF file given the attribute
+ * name
+ */
+void
+#ifdef H4_ABSOFT
+NCADEL(cdfid, varid, attname, rcode, attnamelen)
+#else
+ncadel(cdfid, varid, attname, rcode, attnamelen)
+#endif
+    int		*cdfid;	
+    int		*varid;	
+    char	*attname;	
+    int		attnamelen;
+    int		*rcode;	
+{
+    char name[MAX_NC_NAME + 1];
+
+    nstrncpy (name, attname, attnamelen);
+    *rcode = 0;
+    if (ncattdel (*cdfid, *varid - 1, name) == -1) {
+	*rcode = ncerr;
+    }
+}
+
+
+/*
+ * sets the fill mode of a netCDF file open for writing
+ */
+int
+#ifdef H4_ABSOFT
+NCSFIL(cdfid, fillmode, rcode)
+#else
+ncsfil(cdfid, fillmode, rcode)
+#endif
+    int		*cdfid;	
+    int		*fillmode;	
+    int		*rcode;	
+{
+    int retval;
+
+    if ((retval = ncsetfill (*cdfid, *fillmode)) != -1) {
+	*rcode = 0;
+	return retval;
+    }
+    *rcode = ncerr;
+    return (-1);
+}
+

Modified: packages/libhdf4/branches/upstream/current/mfhdf/fortran/config/jackets-convex.c
===================================================================
--- packages/libhdf4/branches/upstream/current/mfhdf/fortran/config/jackets-convex.c	2007-05-15 09:05:29 UTC (rev 830)
+++ packages/libhdf4/branches/upstream/current/mfhdf/fortran/config/jackets-convex.c	2007-05-15 09:53:05 UTC (rev 831)
@@ -2,7 +2,7 @@
  *	Copyright 1990, University Corporation for Atmospheric Research
  *      See netcdf/COPYRIGHT file for copying and redistribution conditions.
  */
-/* $Id: jackets-convex.c,v 1.3 1997/11/05 22:19:55 koziol Exp $ */
+/* $Id: jackets-convex.c,v 1.5 2005/02/09 03:04:11 epourmal Exp $ */
 /*
  * OVERVIEW
  *
@@ -34,7 +34,7 @@
 
 struct ncfils {			/* This will be a common block from Fortran */
     double dd;
-#ifdef __alpha
+#if defined __alpha || (_MIPS_SZLONG == 64) || defined IA64 || (defined __sun && defined _LP64)
     int ll;
 #else
     long ll;
@@ -65,7 +65,7 @@
 
 struct ncfils {			/* This will be a common block from Fortran */
     double dd;
-#ifdef __alpha
+#if defined __alpha || (_MIPS_SZLONG == 64) || defined IA64 || (defined __sun && defined _LP64)
     int ll;
 #else
     long ll;
@@ -163,7 +163,7 @@
 	*target++ = *source++;
     *target = '\0';
 }
-
+#ifdef WE_COULDNT_READ_NAMES_WITH_SPACES
 /* copy function used to copy strings terminated with blanks */
 static void
 nstrncpy (target, source, maxlen)
@@ -175,8 +175,26 @@
 	*target++ = *source++;
     *target = '\0';
 }
+#endif
 
+/* copy function used to copy strings with embeded blanks and
+   terminated with blanks */
+static void
+nstrncpy (target, source, maxlen)
+    char *target;		/* space to be copied into */
+    char *source;		/* string to be copied */
+    int maxlen;			/* maximum length of *source */
+{
+/* Copy all string */
+    while (maxlen--) 
+        *target++ = *source++;
+    *target -- = '\0';
+/* Disregard all trailing spaces  */
+     while (*target == ' ')
+         *target-- = '\0';
 
+}
+
 /*
  * Compute product of dimensions.
  */
@@ -412,7 +430,7 @@
 }
 #endif /* FORTRAN_HAS_NO_SHORT */
 
-#ifdef __alpha
+#if defined __alpha || (_MIPS_SZLONG == 64) || defined IA64 || (defined __sun && defined _LP64)
 /*
  * Convert multi-dimensional array of NCLONGs stored in ints to packed
  * array of longs, in malloc'ed space.  Returns pointer to longs or NULL
@@ -899,7 +917,7 @@
 	return;
     }				/* else */
 #endif				/* FORTRAN_HAS_NO_SHORT */
-#ifdef __alpha
+#if defined __alpha || (_MIPS_SZLONG == 64) || defined IA64 || (defined __sun && defined _LP64)
 #ifdef HDF
     if ((nc_type) datatype == NC_LONG && handle->file_type!=HDF_FILE) {
 	long          longs = *(int *)value;
@@ -1013,7 +1031,7 @@
 	return;
     }				/* else */
 #endif				/* FORTRAN_HAS_NO_SHORT */
-#ifdef __alpha
+#if defined __alpha || (_MIPS_SZLONG == 64) || defined IA64 || (defined __sun && defined _LP64)
 #ifdef HDF
     if ((nc_type) datatype == NC_LONG && handle->file_type!=HDF_FILE) {
 	long *longs = itol (value, ncount, ndims);
@@ -1124,7 +1142,7 @@
 	tmpbasis	= nctypelen(NC_LONG);
     else
 #endif
-#ifdef __alpha
+#if defined __alpha || (_MIPS_SZLONG == 64) || defined IA64 || (defined __sun && defined _LP64)
     if (datatype == NC_LONG)
 	tmpbasis	= sizeof(int);
     else
@@ -1181,7 +1199,7 @@
 	return;
     }				/* else */
 #endif				/* FORTRAN_HAS_NO_SHORT */
-#ifdef __alpha
+#if defined __alpha || (_MIPS_SZLONG == 64) || defined IA64 || (defined __sun && defined _LP64)
 #ifdef HDF
     if ((nc_type) datatype == NC_LONG && handle->file_type!=HDF_FILE) {
 	long *longs = itolg (value, ncount, nbasis, ndims);
@@ -1317,7 +1335,7 @@
 	return;
     }				/* else */
 #endif				/* FORTRAN_HAS_NO_SHORT */
-#ifdef __alpha
+#if defined __alpha || (_MIPS_SZLONG == 64) || defined IA64 || (defined __sun && defined _LP64)
 #ifdef HDF
     if ((nc_type) datatype == NC_LONG && handle->file_type!=HDF_FILE) {
 	long          longs;
@@ -1459,7 +1477,7 @@
 	return;
     }				/* else */
 #endif				/* FORTRAN_HAS_NO_SHORT */
-#ifdef __alpha
+#if defined __alpha || (_MIPS_SZLONG == 64) || defined IA64 || (defined __sun && defined _LP64)
 #ifdef HDF
     if ((nc_type) datatype == NC_LONG && handle->file_type!=HDF_FILE) {
 	long iocount = dimprod (ncount, ndims);	/* product of dimensions */
@@ -1592,7 +1610,7 @@
 	tmpbasis	= nctypelen(NC_LONG);
     else
 #endif
-#ifdef __alpha
+#if defined __alpha || (_MIPS_SZLONG == 64) || defined IA64 || (defined __sun && defined _LP64)
     if (datatype == NC_LONG)
 	tmpbasis	= sizeof(int);
     else
@@ -1663,7 +1681,7 @@
 	return;
     }				/* else */
 #endif				/* FORTRAN_HAS_NO_SHORT */
-#ifdef __alpha
+#if defined __alpha || (_MIPS_SZLONG == 64) || defined IA64 || (defined __sun && defined _LP64)
 #ifdef HDF
     if ((nc_type) datatype == NC_LONG && handle->file_type!=HDF_FILE) {
 	long iocount = dimprod (ncount, ndims);	/* product of dimensions */
@@ -1829,7 +1847,7 @@
 	return;
     }				/* else */
 #endif				/* FORTRAN_HAS_NO_SHORT */
-#ifdef __alpha
+#if defined __alpha || (_MIPS_SZLONG == 64) || defined IA64 || (defined __sun && defined _LP64)
 #ifdef HDF
     if ((nc_type) *datatype == NC_LONG && handle->file_type!=HDF_FILE) {
 	long *longs = itol (value, attlen, 1);
@@ -1994,7 +2012,7 @@
 	return;
     }				/* else */
 #endif				/* FORTRAN_HAS_NO_SHORT */
-#ifdef __alpha
+#if defined __alpha || (_MIPS_SZLONG == 64) || defined IA64 || (defined __sun && defined _LP64)
 #ifdef HDF
     if ((nc_type) datatype == NC_LONG && handle->file_type!=HDF_FILE) {
 	long *longs = (long *) malloc (attlen * sizeof (long));

Modified: packages/libhdf4/branches/upstream/current/mfhdf/fortran/config/jackets-dec.c
===================================================================
--- packages/libhdf4/branches/upstream/current/mfhdf/fortran/config/jackets-dec.c	2007-05-15 09:05:29 UTC (rev 830)
+++ packages/libhdf4/branches/upstream/current/mfhdf/fortran/config/jackets-dec.c	2007-05-15 09:53:05 UTC (rev 831)
@@ -1,8 +1,8 @@
-/*
+*
  *	Copyright 1990, University Corporation for Atmospheric Research
  *      See netcdf/COPYRIGHT file for copying and redistribution conditions.
  */
-/* $Id: jackets-dec.c,v 1.3 1997/11/05 22:19:58 koziol Exp $ */
+/* $Id: jackets-dec.c,v 1.5 2005/02/09 03:04:12 epourmal Exp $ */
 /*
  * OVERVIEW
  *
@@ -34,7 +34,7 @@
 
 struct ncfils {			/* This will be a common block from Fortran */
     double dd;
-#ifdef __alpha
+#if defined __alpha || (_MIPS_SZLONG == 64) || defined IA64 || (defined __sun && defined _LP64)
     int ll;
 #else
     long ll;
@@ -65,7 +65,7 @@
 
 struct ncfils {			/* This will be a common block from Fortran */
     double dd;
-#ifdef __alpha
+#if defined __alpha || (_MIPS_SZLONG == 64) || defined IA64 || (defined __sun && defined _LP64)
     int ll;
 #else
     long ll;
@@ -163,7 +163,7 @@
 	*target++ = *source++;
     *target = '\0';
 }
-
+#ifdef WE_COULDNT_READ_NAMES_WITH_SPACES
 /* copy function used to copy strings terminated with blanks */
 static void
 nstrncpy (target, source, maxlen)
@@ -175,8 +175,25 @@
 	*target++ = *source++;
     *target = '\0';
 }
+#endif
 
+/* copy function used to copy strings with embeded blanks and
+   terminated with blanks */
+static void
+nstrncpy (target, source, maxlen)
+    char *target;		/* space to be copied into */
+    char *source;		/* string to be copied */
+    int maxlen;			/* maximum length of *source */
+{
+/* Copy all string */
+    while (maxlen--) 
+        *target++ = *source++;
+    *target -- = '\0';
+/* Disregard all trailing spaces  */
+     while (*target == ' ')
+         *target-- = '\0';
 
+}
 /*
  * Compute product of dimensions.
  */
@@ -412,7 +429,7 @@
 }
 #endif /* FORTRAN_HAS_NO_SHORT */
 
-#ifdef __alpha
+#if defined __alpha || (_MIPS_SZLONG == 64) || defined IA64 || (defined __sun && defined _LP64)
 /*
  * Convert multi-dimensional array of NCLONGs stored in ints to packed
  * array of longs, in malloc'ed space.  Returns pointer to longs or NULL
@@ -899,7 +916,7 @@
 	return;
     }				/* else */
 #endif				/* FORTRAN_HAS_NO_SHORT */
-#ifdef __alpha
+#if defined __alpha || (_MIPS_SZLONG == 64) || defined IA64 || (defined __sun && defined _LP64)
 #ifdef HDF
     if ((nc_type) datatype == NC_LONG && handle->file_type!=HDF_FILE) {
 	long          longs = *(int *)value;
@@ -1013,7 +1030,7 @@
 	return;
     }				/* else */
 #endif				/* FORTRAN_HAS_NO_SHORT */
-#ifdef __alpha
+#if defined __alpha || (_MIPS_SZLONG == 64) || defined IA64 || (defined __sun && defined _LP64)
 #ifdef HDF
     if ((nc_type) datatype == NC_LONG && handle->file_type!=HDF_FILE) {
 	long *longs = itol (value, ncount, ndims);
@@ -1124,7 +1141,7 @@
 	tmpbasis	= nctypelen(NC_LONG);
     else
 #endif
-#ifdef __alpha
+#if defined __alpha || (_MIPS_SZLONG == 64) || defined IA64 || (defined __sun && defined _LP64)
     if (datatype == NC_LONG)
 	tmpbasis	= sizeof(int);
     else
@@ -1181,7 +1198,7 @@
 	return;
     }				/* else */
 #endif				/* FORTRAN_HAS_NO_SHORT */
-#ifdef __alpha
+#if defined __alpha || (_MIPS_SZLONG == 64) || defined IA64 || (defined __sun && defined _LP64)
 #ifdef HDF
     if ((nc_type) datatype == NC_LONG && handle->file_type!=HDF_FILE) {
 	long *longs = itolg (value, ncount, nbasis, ndims);
@@ -1317,7 +1334,7 @@
 	return;
     }				/* else */
 #endif				/* FORTRAN_HAS_NO_SHORT */
-#ifdef __alpha
+#if defined __alpha || (_MIPS_SZLONG == 64) || defined IA64 || (defined __sun && defined _LP64)
 #ifdef HDF
     if ((nc_type) datatype == NC_LONG && handle->file_type!=HDF_FILE) {
 	long          longs;
@@ -1459,7 +1476,7 @@
 	return;
     }				/* else */
 #endif				/* FORTRAN_HAS_NO_SHORT */
-#ifdef __alpha
+#if defined __alpha || (_MIPS_SZLONG == 64) || defined IA64 || (defined __sun && defined _LP64)
 #ifdef HDF
     if ((nc_type) datatype == NC_LONG && handle->file_type!=HDF_FILE) {
 	long iocount = dimprod (ncount, ndims);	/* product of dimensions */
@@ -1592,7 +1609,7 @@
 	tmpbasis	= nctypelen(NC_LONG);
     else
 #endif
-#ifdef __alpha
+#if defined __alpha || (_MIPS_SZLONG == 64) || defined IA64 || (defined __sun && defined _LP64)
     if (datatype == NC_LONG)
 	tmpbasis	= sizeof(int);
     else
@@ -1663,7 +1680,7 @@
 	return;
     }				/* else */
 #endif				/* FORTRAN_HAS_NO_SHORT */
-#ifdef __alpha
+#if defined __alpha || (_MIPS_SZLONG == 64) || defined IA64 || (defined __sun && defined _LP64)
 #ifdef HDF
     if ((nc_type) datatype == NC_LONG && handle->file_type!=HDF_FILE) {
 	long iocount = dimprod (ncount, ndims);	/* product of dimensions */
@@ -1829,7 +1846,7 @@
 	return;
     }				/* else */
 #endif				/* FORTRAN_HAS_NO_SHORT */
-#ifdef __alpha
+#if defined __alpha || (_MIPS_SZLONG == 64) || defined IA64 || (defined __sun && defined _LP64)
 #ifdef HDF
     if ((nc_type) *datatype == NC_LONG && handle->file_type!=HDF_FILE) {
 	long *longs = itol (value, attlen, 1);
@@ -1994,7 +2011,7 @@
 	return;
     }				/* else */
 #endif				/* FORTRAN_HAS_NO_SHORT */
-#ifdef __alpha
+#if defined __alpha || (_MIPS_SZLONG == 64) || defined IA64 || (defined __sun && defined _LP64)
 #ifdef HDF
     if ((nc_type) datatype == NC_LONG && handle->file_type!=HDF_FILE) {
 	long *longs = (long *) malloc (attlen * sizeof (long));

Modified: packages/libhdf4/branches/upstream/current/mfhdf/fortran/config/jackets-fbsd.c
===================================================================
--- packages/libhdf4/branches/upstream/current/mfhdf/fortran/config/jackets-fbsd.c	2007-05-15 09:05:29 UTC (rev 830)
+++ packages/libhdf4/branches/upstream/current/mfhdf/fortran/config/jackets-fbsd.c	2007-05-15 09:53:05 UTC (rev 831)
@@ -2,7 +2,7 @@
  *	Copyright 1990, University Corporation for Atmospheric Research
  *      See netcdf/COPYRIGHT file for copying and redistribution conditions.
  */
-/* $Id: jackets-fbsd.c,v 1.4 1997/11/05 19:40:02 koziol Exp $ */
+/* $Id: jackets-fbsd.c,v 1.8 2005/02/09 03:04:12 epourmal Exp $ */
 /*
  * OVERVIEW
  *
@@ -34,7 +34,7 @@
 
 struct ncfils {			/* This will be a common block from Fortran */
     double dd;
-#if defined __alpha || (_MIPS_SZLONG == 64)
+#if defined __alpha || (_MIPS_SZLONG == 64) || defined __ia64 || (defined __sun && defined _LP64) || defined AIX5L64 || defined __x86_64__
     int ll;
 #else
     long ll;
@@ -65,7 +65,7 @@
 
 struct ncfils {			/* This will be a common block from Fortran */
     double dd;
-#if defined __alpha || (_MIPS_SZLONG == 64)
+#if defined __alpha || (_MIPS_SZLONG == 64) || defined __ia64 || (defined __sun && defined _LP64) || defined AIX5L64 || defined __x86_64__
     int ll;
 #else
     long ll;
@@ -163,7 +163,7 @@
 	*target++ = *source++;
     *target = '\0';
 }
-
+#ifdef WE_COULDNT_READ_NAMES_WITH_SPACES
 /* copy function used to copy strings terminated with blanks */
 static void
 nstrncpy (target, source, maxlen)
@@ -175,8 +175,26 @@
 	*target++ = *source++;
     *target = '\0';
 }
+#endif
 
+/* copy function used to copy strings with embeded blanks and
+   terminated with blanks */
+static void
+nstrncpy (target, source, maxlen)
+    char *target;		/* space to be copied into */
+    char *source;		/* string to be copied */
+    int maxlen;			/* maximum length of *source */
+{
+/* Copy all string */
+    while (maxlen--) 
+        *target++ = *source++;
+    *target -- = '\0';
+/* Disregard all trailing spaces  */
+     while (*target == ' ')
+         *target-- = '\0';
 
+}
+
 /*
  * Compute product of dimensions.
  */
@@ -412,7 +430,7 @@
 }
 #endif /* FORTRAN_HAS_NO_SHORT */
 
-#if defined __alpha || (_MIPS_SZLONG == 64)
+#if defined __alpha || (_MIPS_SZLONG == 64) || defined __ia64 || (defined __sun && defined _LP64) || defined AIX5L64 || defined __x86_64__
 /*
  * Convert multi-dimensional array of NCLONGs stored in ints to packed
  * array of longs, in malloc'ed space.  Returns pointer to longs or NULL
@@ -1065,7 +1083,7 @@
 	tmpbasis	= nctypelen(NC_LONG);
     else
 #endif
-#if defined __alpha || (_MIPS_SZLONG == 64)
+#if defined __alpha || (_MIPS_SZLONG == 64) || defined __ia64 || (defined __sun && defined _LP64) || defined AIX5L64 || defined __x86_64__
     if (datatype == NC_LONG)
 	tmpbasis	= sizeof(int);
     else
@@ -1419,7 +1437,7 @@
 	tmpbasis	= nctypelen(NC_LONG);
     else
 #endif
-#if defined __alpha || (_MIPS_SZLONG == 64)
+#if defined __alpha || (_MIPS_SZLONG == 64) || defined __ia64 || (defined __sun && defined _LP64) || defined AIX5L64 || defined __x86_64__
     if (datatype == NC_LONG)
 	tmpbasis	= sizeof(int);
     else

Modified: packages/libhdf4/branches/upstream/current/mfhdf/fortran/config/jackets-fujivp.c
===================================================================
--- packages/libhdf4/branches/upstream/current/mfhdf/fortran/config/jackets-fujivp.c	2007-05-15 09:05:29 UTC (rev 830)
+++ packages/libhdf4/branches/upstream/current/mfhdf/fortran/config/jackets-fujivp.c	2007-05-15 09:53:05 UTC (rev 831)
@@ -2,7 +2,7 @@
  *	Copyright 1990, University Corporation for Atmospheric Research
  *      See netcdf/COPYRIGHT file for copying and redistribution conditions.
  */
-/* $Header: /afs/ncsa/projects/hdf/cvs/dist/mfhdf/fortran/config/jackets-fujivp.c,v 1.2 1997/11/05 22:20:00 koziol Exp $ */
+/* $Header: /afs/ncsa/projects/hdf/cvs/hdf4/mfhdf/fortran/config/jackets-fujivp.c,v 1.4 2005/02/09 03:04:13 epourmal Exp $ */
 /*
  * OVERVIEW
  *
@@ -34,7 +34,7 @@
 
 struct ncfils {			/* This will be a common block from Fortran */
     double dd;
-#if defined __alpha || (_MIPS_SZLONG == 64)
+#if defined __alpha || (_MIPS_SZLONG == 64) || defined IA64 || (defined __sun && defined _LP64)
     int ll;
 #else
     long ll;
@@ -65,7 +65,7 @@
 
 struct ncfils {			/* This will be a common block from Fortran */
     double dd;
-#if defined __alpha || (_MIPS_SZLONG == 64)
+#if defined __alpha || (_MIPS_SZLONG == 64) || defined IA64 || (defined __sun && defined _LP64)
     int ll;
 #else
     long ll;
@@ -163,7 +163,7 @@
 	*target++ = *source++;
     *target = '\0';
 }
-
+#ifdef WE_COULDNT_READ_NAMES_WITH_SPACES
 /* copy function used to copy strings terminated with blanks */
 static void
 nstrncpy (target, source, maxlen)
@@ -175,8 +175,26 @@
 	*target++ = *source++;
     *target = '\0';
 }
+#endif
 
+/* copy function used to copy strings with embeded blanks and
+   terminated with blanks */
+static void
+nstrncpy (target, source, maxlen)
+    char *target;		/* space to be copied into */
+    char *source;		/* string to be copied */
+    int maxlen;			/* maximum length of *source */
+{
+/* Copy all string */
+    while (maxlen--) 
+        *target++ = *source++;
+    *target -- = '\0';
+/* Disregard all trailing spaces  */
+     while (*target == ' ')
+         *target-- = '\0';
 
+}
+
 /*
  * Compute product of dimensions.
  */
@@ -412,7 +430,7 @@
 }
 #endif /* FORTRAN_HAS_NO_SHORT */
 
-#if defined __alpha || (_MIPS_SZLONG == 64)
+#if defined __alpha || (_MIPS_SZLONG == 64) || defined IA64 || (defined __sun && defined _LP64)
 /*
  * Convert multi-dimensional array of NCLONGs stored in ints to packed
  * array of longs, in malloc'ed space.  Returns pointer to longs or NULL
@@ -899,7 +917,7 @@
 	return;
     }				/* else */
 #endif				/* FORTRAN_HAS_NO_SHORT */
-#if defined __alpha || (_MIPS_SZLONG == 64)
+#if defined __alpha || (_MIPS_SZLONG == 64) || defined IA64 || (defined __sun && defined _LP64)
 #ifdef HDF
     if ((nc_type) datatype == NC_LONG && handle->file_type!=HDF_FILE) {
 	long          longs = *(int *)value;
@@ -1013,7 +1031,7 @@
 	return;
     }				/* else */
 #endif				/* FORTRAN_HAS_NO_SHORT */
-#if defined __alpha || (_MIPS_SZLONG == 64)
+#if defined __alpha || (_MIPS_SZLONG == 64) || defined IA64 || (defined __sun && defined _LP64)
 #ifdef HDF
     if ((nc_type) datatype == NC_LONG && handle->file_type!=HDF_FILE) {
 	long *longs = itol (value, ncount, ndims);
@@ -1124,7 +1142,7 @@
 	tmpbasis	= nctypelen(NC_LONG);
     else
 #endif
-#if defined __alpha || (_MIPS_SZLONG == 64)
+#if defined __alpha || (_MIPS_SZLONG == 64) || defined IA64 || (defined __sun && defined _LP64)
     if (datatype == NC_LONG)
 	tmpbasis	= sizeof(int);
     else
@@ -1181,7 +1199,7 @@
 	return;
     }				/* else */
 #endif				/* FORTRAN_HAS_NO_SHORT */
-#if defined __alpha || (_MIPS_SZLONG == 64)
+#if defined __alpha || (_MIPS_SZLONG == 64) || defined IA64 || (defined __sun && defined _LP64)
 #ifdef HDF
     if ((nc_type) datatype == NC_LONG && handle->file_type!=HDF_FILE) {
 	long *longs = itolg (value, ncount, nbasis, ndims);
@@ -1317,7 +1335,7 @@
 	return;
     }				/* else */
 #endif				/* FORTRAN_HAS_NO_SHORT */
-#if defined __alpha || (_MIPS_SZLONG == 64)
+#if defined __alpha || (_MIPS_SZLONG == 64) || defined IA64 || (defined __sun && defined _LP64)
 #ifdef HDF
     if ((nc_type) datatype == NC_LONG && handle->file_type!=HDF_FILE) {
 	long          longs;
@@ -1459,7 +1477,7 @@
 	return;
     }				/* else */
 #endif				/* FORTRAN_HAS_NO_SHORT */
-#if defined __alpha || (_MIPS_SZLONG == 64)
+#if defined __alpha || (_MIPS_SZLONG == 64) || defined IA64 || (defined __sun && defined _LP64)
 #ifdef HDF
     if ((nc_type) datatype == NC_LONG && handle->file_type!=HDF_FILE) {
 	long iocount = dimprod (ncount, ndims);	/* product of dimensions */
@@ -1592,7 +1610,7 @@
 	tmpbasis	= nctypelen(NC_LONG);
     else
 #endif
-#if defined __alpha || (_MIPS_SZLONG == 64)
+#if defined __alpha || (_MIPS_SZLONG == 64) || defined IA64 || (defined __sun && defined _LP64)
     if (datatype == NC_LONG)
 	tmpbasis	= sizeof(int);
     else
@@ -1663,7 +1681,7 @@
 	return;
     }				/* else */
 #endif				/* FORTRAN_HAS_NO_SHORT */
-#if defined __alpha || (_MIPS_SZLONG == 64)
+#if defined __alpha || (_MIPS_SZLONG == 64) || defined IA64 || (defined __sun && defined _LP64)
 #ifdef HDF
     if ((nc_type) datatype == NC_LONG && handle->file_type!=HDF_FILE) {
 	long iocount = dimprod (ncount, ndims);	/* product of dimensions */
@@ -1829,7 +1847,7 @@
 	return;
     }				/* else */
 #endif				/* FORTRAN_HAS_NO_SHORT */
-#if defined __alpha || (_MIPS_SZLONG == 64)
+#if defined __alpha || (_MIPS_SZLONG == 64) || defined IA64 || (defined __sun && defined _LP64)
 #ifdef HDF
     if ((nc_type) *datatype == NC_LONG && handle->file_type!=HDF_FILE) {
 	long *longs = itol (value, attlen, 1);
@@ -1994,7 +2012,7 @@
 	return;
     }				/* else */
 #endif				/* FORTRAN_HAS_NO_SHORT */
-#if defined __alpha || (_MIPS_SZLONG == 64)
+#if defined __alpha || (_MIPS_SZLONG == 64) || defined IA64 || (defined __sun && defined _LP64)
 #ifdef HDF
     if ((nc_type) datatype == NC_LONG && handle->file_type!=HDF_FILE) {
 	long *longs = (long *) malloc (attlen * sizeof (long));

Modified: packages/libhdf4/branches/upstream/current/mfhdf/fortran/config/jackets-hpux.c
===================================================================
--- packages/libhdf4/branches/upstream/current/mfhdf/fortran/config/jackets-hpux.c	2007-05-15 09:05:29 UTC (rev 830)
+++ packages/libhdf4/branches/upstream/current/mfhdf/fortran/config/jackets-hpux.c	2007-05-15 09:53:05 UTC (rev 831)
@@ -2,7 +2,7 @@
  *	Copyright 1990, University Corporation for Atmospheric Research
  *      See netcdf/COPYRIGHT file for copying and redistribution conditions.
  */
-/* $Id: jackets-hpux.c,v 1.3 1997/11/05 22:20:03 koziol Exp $ */
+/* $Id: jackets-hpux.c,v 1.7 2005/02/09 03:04:13 epourmal Exp $ */
 /*
  * OVERVIEW
  *
@@ -34,7 +34,7 @@
 
 struct ncfils {			/* This will be a common block from Fortran */
     double dd;
-#if defined __alpha || (_MIPS_SZLONG == 64)
+#if defined __alpha || (_MIPS_SZLONG == 64) || defined __ia64 || (defined __sun && defined _LP64) || defined AIX5L64 || defined __x86_64__
     int ll;
 #else
     long ll;
@@ -65,7 +65,7 @@
 
 struct ncfils {			/* This will be a common block from Fortran */
     double dd;
-#if defined __alpha || (_MIPS_SZLONG == 64)
+#if defined __alpha || (_MIPS_SZLONG == 64) || defined __ia64 || (defined __sun && defined _LP64) || defined AIX5L64 || defined __x86_64__
     int ll;
 #else
     long ll;
@@ -163,7 +163,7 @@
 	*target++ = *source++;
     *target = '\0';
 }
-
+#ifdef WE_COULDNT_READ_NAMES_WITH_SPACES
 /* copy function used to copy strings terminated with blanks */
 static void
 nstrncpy (target, source, maxlen)
@@ -175,8 +175,26 @@
 	*target++ = *source++;
     *target = '\0';
 }
+#endif
 
+/* copy function used to copy strings with embeded blanks and
+   terminated with blanks */
+static void
+nstrncpy (target, source, maxlen)
+    char *target;		/* space to be copied into */
+    char *source;		/* string to be copied */
+    int maxlen;			/* maximum length of *source */
+{
+/* Copy all string */
+    while (maxlen--) 
+        *target++ = *source++;
+    *target -- = '\0';
+/* Disregard all trailing spaces  */
+     while (*target == ' ')
+         *target-- = '\0';
 
+}
+
 /*
  * Compute product of dimensions.
  */
@@ -412,7 +430,7 @@
 }
 #endif /* FORTRAN_HAS_NO_SHORT */
 
-#if defined __alpha || (_MIPS_SZLONG == 64)
+#if defined __alpha || (_MIPS_SZLONG == 64) || defined __ia64 || (defined __sun && defined _LP64) || defined AIX5L64 || defined __x86_64__
 /*
  * Convert multi-dimensional array of NCLONGs stored in ints to packed
  * array of longs, in malloc'ed space.  Returns pointer to longs or NULL
@@ -899,7 +917,7 @@
 	return;
     }				/* else */
 #endif				/* FORTRAN_HAS_NO_SHORT */
-#if defined __alpha || (_MIPS_SZLONG == 64)
+#if defined __alpha || (_MIPS_SZLONG == 64) || defined __ia64 || (defined __sun && defined _LP64) || defined AIX5L64 || defined __x86_64__
 #ifdef HDF
     if ((nc_type) datatype == NC_LONG && handle->file_type!=HDF_FILE) {
 	long          longs = *(int *)value;
@@ -1013,7 +1031,7 @@
 	return;
     }				/* else */
 #endif				/* FORTRAN_HAS_NO_SHORT */
-#if defined __alpha || (_MIPS_SZLONG == 64)
+#if defined __alpha || (_MIPS_SZLONG == 64) || defined __ia64 || (defined __sun && defined _LP64) || defined AIX5L64 || defined __x86_64__
 #ifdef HDF
     if ((nc_type) datatype == NC_LONG && handle->file_type!=HDF_FILE) {
 	long *longs = itol (value, ncount, ndims);
@@ -1124,7 +1142,7 @@
 	tmpbasis	= nctypelen(NC_LONG);
     else
 #endif
-#if defined __alpha || (_MIPS_SZLONG == 64)
+#if defined __alpha || (_MIPS_SZLONG == 64) || defined __ia64 || (defined __sun && defined _LP64) || defined AIX5L64 || defined __x86_64__
     if (datatype == NC_LONG)
 	tmpbasis	= sizeof(int);
     else
@@ -1181,7 +1199,7 @@
 	return;
     }				/* else */
 #endif				/* FORTRAN_HAS_NO_SHORT */
-#if defined __alpha || (_MIPS_SZLONG == 64)
+#if defined __alpha || (_MIPS_SZLONG == 64) || defined __ia64 || (defined __sun && defined _LP64) || defined AIX5L64 || defined __x86_64__
 #ifdef HDF
     if ((nc_type) datatype == NC_LONG && handle->file_type!=HDF_FILE) {
 	long *longs = itolg (value, ncount, nbasis, ndims);
@@ -1317,7 +1335,7 @@
 	return;
     }				/* else */
 #endif				/* FORTRAN_HAS_NO_SHORT */
-#if defined __alpha || (_MIPS_SZLONG == 64)
+#if defined __alpha || (_MIPS_SZLONG == 64) || defined __ia64 || (defined __sun && defined _LP64) || defined AIX5L64 || defined __x86_64__
 #ifdef HDF
     if ((nc_type) datatype == NC_LONG && handle->file_type!=HDF_FILE) {
 	long          longs;
@@ -1459,13 +1477,19 @@
 	return;
     }				/* else */
 #endif				/* FORTRAN_HAS_NO_SHORT */
-#if defined __alpha || (_MIPS_SZLONG == 64)
+#if defined __alpha || (_MIPS_SZLONG == 64) || defined __ia64 || (defined __sun && defined _LP64) || defined AIX5L64 || defined __x86_64__
 #ifdef HDF
     if ((nc_type) datatype == NC_LONG && handle->file_type!=HDF_FILE) {
 	long iocount = dimprod (ncount, ndims);	/* product of dimensions */
+/* EIP  We neet to use int buffer to read data in on the platforms where long is 8
+
 	long *longs = (long *) malloc (iocount * sizeof (long));
 	int *ip;
 	long *lp = longs;
+*/
+	int *longs = (int *) malloc (iocount * sizeof (int));
+	int *ip;
+	int *lp = longs;
 
 	if (longs == NULL) {
 	    *rcode = NC_SYSERR;
@@ -1592,7 +1616,7 @@
 	tmpbasis	= nctypelen(NC_LONG);
     else
 #endif
-#if defined __alpha || (_MIPS_SZLONG == 64)
+#if defined __alpha || (_MIPS_SZLONG == 64) || defined __ia64 || (defined __sun && defined _LP64) || defined AIX5L64 || defined __x86_64__
     if (datatype == NC_LONG)
 	tmpbasis	= sizeof(int);
     else
@@ -1663,7 +1687,7 @@
 	return;
     }				/* else */
 #endif				/* FORTRAN_HAS_NO_SHORT */
-#if defined __alpha || (_MIPS_SZLONG == 64)
+#if defined __alpha || (_MIPS_SZLONG == 64) || defined __ia64 || (defined __sun && defined _LP64) || defined AIX5L64 || defined __x86_64__
 #ifdef HDF
     if ((nc_type) datatype == NC_LONG && handle->file_type!=HDF_FILE) {
 	long iocount = dimprod (ncount, ndims);	/* product of dimensions */
@@ -1829,7 +1853,7 @@
 	return;
     }				/* else */
 #endif				/* FORTRAN_HAS_NO_SHORT */
-#if defined __alpha || (_MIPS_SZLONG == 64)
+#if defined __alpha || (_MIPS_SZLONG == 64) || defined __ia64 || (defined __sun && defined _LP64) || defined AIX5L64 || defined __x86_64__
 #ifdef HDF
     if ((nc_type) *datatype == NC_LONG && handle->file_type!=HDF_FILE) {
 	long *longs = itol (value, attlen, 1);
@@ -1994,12 +2018,17 @@
 	return;
     }				/* else */
 #endif				/* FORTRAN_HAS_NO_SHORT */
-#if defined __alpha || (_MIPS_SZLONG == 64)
+#if defined __alpha || (_MIPS_SZLONG == 64) || defined __ia64 || (defined __sun && defined _LP64) || defined AIX5L64 || defined __x86_64__
 #ifdef HDF
     if ((nc_type) datatype == NC_LONG && handle->file_type!=HDF_FILE) {
+/*EIP   We need to use int buffer to read data in on the platforms where long is 8 bytes
 	long *longs = (long *) malloc (attlen * sizeof (long));
 	int *ip;
 	long *lp = longs;
+*/
+	int *longs = (int *) malloc (attlen * sizeof (int));
+	int *ip;
+	int *lp = longs;
 
 	if (longs == NULL) {
 	    *rcode = NC_SYSERR;

Modified: packages/libhdf4/branches/upstream/current/mfhdf/fortran/config/jackets-ia64.c
===================================================================
--- packages/libhdf4/branches/upstream/current/mfhdf/fortran/config/jackets-ia64.c	2007-05-15 09:05:29 UTC (rev 830)
+++ packages/libhdf4/branches/upstream/current/mfhdf/fortran/config/jackets-ia64.c	2007-05-15 09:53:05 UTC (rev 831)
@@ -2,7 +2,7 @@
  *	Copyright 1990, University Corporation for Atmospheric Research
  *      See netcdf/COPYRIGHT file for copying and redistribution conditions.
  */
-/* $Id: jackets-ia64.c,v 1.1 2000/05/23 18:07:08 acheng Exp $ */
+/* $Id: jackets-ia64.c,v 1.5 2005/02/09 03:04:14 epourmal Exp $ */
 /*
  * OVERVIEW
  *
@@ -34,7 +34,7 @@
 
 struct ncfils {			/* This will be a common block from Fortran */
     double dd;
-#ifdef __alpha
+#if defined __alpha || (_MIPS_SZLONG == 64) || defined IA64 || (defined __sun && defined _LP64)
     int ll;
 #else
     long ll;
@@ -65,7 +65,7 @@
 
 struct ncfils {			/* This will be a common block from Fortran */
     double dd;
-#ifdef __alpha
+#if defined __alpha || (_MIPS_SZLONG == 64) || defined IA64 || (defined __sun && defined _LP64)
     int ll;
 #else
     long ll;
@@ -163,7 +163,7 @@
 	*target++ = *source++;
     *target = '\0';
 }
-
+#ifdef WE_COULDNT_READ_NAMES_WITH_SPACES
 /* copy function used to copy strings terminated with blanks */
 static void
 nstrncpy (target, source, maxlen)
@@ -175,8 +175,26 @@
 	*target++ = *source++;
     *target = '\0';
 }
+#endif
 
+/* copy function used to copy strings with embeded blanks and
+   terminated with blanks */
+static void
+nstrncpy (target, source, maxlen)
+    char *target;		/* space to be copied into */
+    char *source;		/* string to be copied */
+    int maxlen;			/* maximum length of *source */
+{
+/* Copy all string */
+    while (maxlen--) 
+        *target++ = *source++;
+    *target -- = '\0';
+/* Disregard all trailing spaces  */
+     while (*target == ' ')
+         *target-- = '\0';
 
+}
+
 /*
  * Compute product of dimensions.
  */
@@ -412,7 +430,7 @@
 }
 #endif /* FORTRAN_HAS_NO_SHORT */
 
-#ifdef __alpha
+#if defined __alpha || (_MIPS_SZLONG == 64) || defined IA64 || (defined __sun && defined _LP64)
 /*
  * Convert multi-dimensional array of NCLONGs stored in ints to packed
  * array of longs, in malloc'ed space.  Returns pointer to longs or NULL
@@ -899,7 +917,7 @@
 	return;
     }				/* else */
 #endif				/* FORTRAN_HAS_NO_SHORT */
-#ifdef __alpha
+#if defined __alpha || (_MIPS_SZLONG == 64) || defined IA64 || (defined __sun && defined _LP64)
 #ifdef HDF
     if ((nc_type) datatype == NC_LONG && handle->file_type!=HDF_FILE) {
 	long          longs = *(int *)value;
@@ -1013,7 +1031,7 @@
 	return;
     }				/* else */
 #endif				/* FORTRAN_HAS_NO_SHORT */
-#ifdef __alpha
+#if defined __alpha || (_MIPS_SZLONG == 64) || defined IA64 || (defined __sun && defined _LP64)
 #ifdef HDF
     if ((nc_type) datatype == NC_LONG && handle->file_type!=HDF_FILE) {
 	long *longs = itol (value, ncount, ndims);
@@ -1124,7 +1142,7 @@
 	tmpbasis	= nctypelen(NC_LONG);
     else
 #endif
-#ifdef __alpha
+#if defined __alpha || (_MIPS_SZLONG == 64) || defined IA64 || (defined __sun && defined _LP64)
     if (datatype == NC_LONG)
 	tmpbasis	= sizeof(int);
     else
@@ -1181,7 +1199,7 @@
 	return;
     }				/* else */
 #endif				/* FORTRAN_HAS_NO_SHORT */
-#ifdef __alpha
+#if defined __alpha || (_MIPS_SZLONG == 64) || defined IA64 || (defined __sun && defined _LP64)
 #ifdef HDF
     if ((nc_type) datatype == NC_LONG && handle->file_type!=HDF_FILE) {
 	long *longs = itolg (value, ncount, nbasis, ndims);
@@ -1317,7 +1335,7 @@
 	return;
     }				/* else */
 #endif				/* FORTRAN_HAS_NO_SHORT */
-#ifdef __alpha
+#if defined __alpha || (_MIPS_SZLONG == 64) || defined IA64 || (defined __sun && defined _LP64)
 #ifdef HDF
     if ((nc_type) datatype == NC_LONG && handle->file_type!=HDF_FILE) {
 	long          longs;
@@ -1459,7 +1477,7 @@
 	return;
     }				/* else */
 #endif				/* FORTRAN_HAS_NO_SHORT */
-#ifdef __alpha
+#if defined __alpha || (_MIPS_SZLONG == 64) || defined IA64 || (defined __sun && defined _LP64)
 #ifdef HDF
     if ((nc_type) datatype == NC_LONG && handle->file_type!=HDF_FILE) {
 	long iocount = dimprod (ncount, ndims);	/* product of dimensions */
@@ -1592,7 +1610,7 @@
 	tmpbasis	= nctypelen(NC_LONG);
     else
 #endif
-#ifdef __alpha
+#if defined __alpha || (_MIPS_SZLONG == 64) || defined IA64 || (defined __sun && defined _LP64)
     if (datatype == NC_LONG)
 	tmpbasis	= sizeof(int);
     else
@@ -1663,7 +1681,7 @@
 	return;
     }				/* else */
 #endif				/* FORTRAN_HAS_NO_SHORT */
-#ifdef __alpha
+#if defined __alpha || (_MIPS_SZLONG == 64) || defined IA64 || (defined __sun && defined _LP64)
 #ifdef HDF
     if ((nc_type) datatype == NC_LONG && handle->file_type!=HDF_FILE) {
 	long iocount = dimprod (ncount, ndims);	/* product of dimensions */
@@ -1829,7 +1847,7 @@
 	return;
     }				/* else */
 #endif				/* FORTRAN_HAS_NO_SHORT */
-#ifdef __alpha
+#if defined __alpha || (_MIPS_SZLONG == 64) || defined IA64 || (defined __sun && defined _LP64)
 #ifdef HDF
     if ((nc_type) *datatype == NC_LONG && handle->file_type!=HDF_FILE) {
 	long *longs = itol (value, attlen, 1);
@@ -1994,7 +2012,7 @@
 	return;
     }				/* else */
 #endif				/* FORTRAN_HAS_NO_SHORT */
-#ifdef __alpha
+#if defined __alpha || (_MIPS_SZLONG == 64) || defined IA64 || (defined __sun && defined _LP64)
 #ifdef HDF
     if ((nc_type) datatype == NC_LONG && handle->file_type!=HDF_FILE) {
 	long *longs = (long *) malloc (attlen * sizeof (long));

Modified: packages/libhdf4/branches/upstream/current/mfhdf/fortran/config/jackets-irix32.c
===================================================================
--- packages/libhdf4/branches/upstream/current/mfhdf/fortran/config/jackets-irix32.c	2007-05-15 09:05:29 UTC (rev 830)
+++ packages/libhdf4/branches/upstream/current/mfhdf/fortran/config/jackets-irix32.c	2007-05-15 09:53:05 UTC (rev 831)
@@ -2,7 +2,7 @@
  *	Copyright 1990, University Corporation for Atmospheric Research
  *      See netcdf/COPYRIGHT file for copying and redistribution conditions.
  */
-/* $Id: jackets-irix32.c,v 1.3 1997/11/05 22:20:05 koziol Exp $ */
+/* $Id: jackets-irix32.c,v 1.5 2005/02/09 03:04:14 epourmal Exp $ */
 /*
  * OVERVIEW
  *
@@ -34,7 +34,7 @@
 
 struct ncfils {			/* This will be a common block from Fortran */
     double dd;
-#ifdef __alpha
+#if defined __alpha || (_MIPS_SZLONG == 64) || defined IA64 || (defined __sun && defined _LP64)
     int ll;
 #else
     long ll;
@@ -65,7 +65,7 @@
 
 struct ncfils {			/* This will be a common block from Fortran */
     double dd;
-#ifdef __alpha
+#if defined __alpha || (_MIPS_SZLONG == 64) || defined IA64 || (defined __sun && defined _LP64)
     int ll;
 #else
     long ll;
@@ -163,7 +163,7 @@
 	*target++ = *source++;
     *target = '\0';
 }
-
+#ifdef WE_COULDNT_READ_NAMES_WITH_SPACES
 /* copy function used to copy strings terminated with blanks */
 static void
 nstrncpy (target, source, maxlen)
@@ -175,8 +175,26 @@
 	*target++ = *source++;
     *target = '\0';
 }
+#endif
 
+/* copy function used to copy strings with embeded blanks and
+   terminated with blanks */
+static void
+nstrncpy (target, source, maxlen)
+    char *target;		/* space to be copied into */
+    char *source;		/* string to be copied */
+    int maxlen;			/* maximum length of *source */
+{
+/* Copy all string */
+    while (maxlen--) 
+        *target++ = *source++;
+    *target -- = '\0';
+/* Disregard all trailing spaces  */
+     while (*target == ' ')
+         *target-- = '\0';
 
+}
+
 /*
  * Compute product of dimensions.
  */
@@ -412,7 +430,7 @@
 }
 #endif /* FORTRAN_HAS_NO_SHORT */
 
-#ifdef __alpha
+#if defined __alpha || (_MIPS_SZLONG == 64) || defined IA64 || (defined __sun && defined _LP64)
 /*
  * Convert multi-dimensional array of NCLONGs stored in ints to packed
  * array of longs, in malloc'ed space.  Returns pointer to longs or NULL
@@ -899,7 +917,7 @@
 	return;
     }				/* else */
 #endif				/* FORTRAN_HAS_NO_SHORT */
-#ifdef __alpha
+#if defined __alpha || (_MIPS_SZLONG == 64) || defined IA64 || (defined __sun && defined _LP64)
 #ifdef HDF
     if ((nc_type) datatype == NC_LONG && handle->file_type!=HDF_FILE) {
 	long          longs = *(int *)value;
@@ -1013,7 +1031,7 @@
 	return;
     }				/* else */
 #endif				/* FORTRAN_HAS_NO_SHORT */
-#ifdef __alpha
+#if defined __alpha || (_MIPS_SZLONG == 64) || defined IA64 || (defined __sun && defined _LP64)
 #ifdef HDF
     if ((nc_type) datatype == NC_LONG && handle->file_type!=HDF_FILE) {
 	long *longs = itol (value, ncount, ndims);
@@ -1124,7 +1142,7 @@
 	tmpbasis	= nctypelen(NC_LONG);
     else
 #endif
-#ifdef __alpha
+#if defined __alpha || (_MIPS_SZLONG == 64) || defined IA64 || (defined __sun && defined _LP64)
     if (datatype == NC_LONG)
 	tmpbasis	= sizeof(int);
     else
@@ -1181,7 +1199,7 @@
 	return;
     }				/* else */
 #endif				/* FORTRAN_HAS_NO_SHORT */
-#ifdef __alpha
+#if defined __alpha || (_MIPS_SZLONG == 64) || defined IA64 || (defined __sun && defined _LP64)
 #ifdef HDF
     if ((nc_type) datatype == NC_LONG && handle->file_type!=HDF_FILE) {
 	long *longs = itolg (value, ncount, nbasis, ndims);
@@ -1317,7 +1335,7 @@
 	return;
     }				/* else */
 #endif				/* FORTRAN_HAS_NO_SHORT */
-#ifdef __alpha
+#if defined __alpha || (_MIPS_SZLONG == 64) || defined IA64 || (defined __sun && defined _LP64)
 #ifdef HDF
     if ((nc_type) datatype == NC_LONG && handle->file_type!=HDF_FILE) {
 	long          longs;
@@ -1459,7 +1477,7 @@
 	return;
     }				/* else */
 #endif				/* FORTRAN_HAS_NO_SHORT */
-#ifdef __alpha
+#if defined __alpha || (_MIPS_SZLONG == 64) || defined IA64 || (defined __sun && defined _LP64)
 #ifdef HDF
     if ((nc_type) datatype == NC_LONG && handle->file_type!=HDF_FILE) {
 	long iocount = dimprod (ncount, ndims);	/* product of dimensions */
@@ -1592,7 +1610,7 @@
 	tmpbasis	= nctypelen(NC_LONG);
     else
 #endif
-#ifdef __alpha
+#if defined __alpha || (_MIPS_SZLONG == 64) || defined IA64 || (defined __sun && defined _LP64)
     if (datatype == NC_LONG)
 	tmpbasis	= sizeof(int);
     else
@@ -1663,7 +1681,7 @@
 	return;
     }				/* else */
 #endif				/* FORTRAN_HAS_NO_SHORT */
-#ifdef __alpha
+#if defined __alpha || (_MIPS_SZLONG == 64) || defined IA64 || (defined __sun && defined _LP64)
 #ifdef HDF
     if ((nc_type) datatype == NC_LONG && handle->file_type!=HDF_FILE) {
 	long iocount = dimprod (ncount, ndims);	/* product of dimensions */
@@ -1829,7 +1847,7 @@
 	return;
     }				/* else */
 #endif				/* FORTRAN_HAS_NO_SHORT */
-#ifdef __alpha
+#if defined __alpha || (_MIPS_SZLONG == 64) || defined IA64 || (defined __sun && defined _LP64)
 #ifdef HDF
     if ((nc_type) *datatype == NC_LONG && handle->file_type!=HDF_FILE) {
 	long *longs = itol (value, attlen, 1);
@@ -1994,7 +2012,7 @@
 	return;
     }				/* else */
 #endif				/* FORTRAN_HAS_NO_SHORT */
-#ifdef __alpha
+#if defined __alpha || (_MIPS_SZLONG == 64) || defined IA64 || (defined __sun && defined _LP64)
 #ifdef HDF
     if ((nc_type) datatype == NC_LONG && handle->file_type!=HDF_FILE) {
 	long *longs = (long *) malloc (attlen * sizeof (long));

Modified: packages/libhdf4/branches/upstream/current/mfhdf/fortran/config/jackets-irix4.c
===================================================================
--- packages/libhdf4/branches/upstream/current/mfhdf/fortran/config/jackets-irix4.c	2007-05-15 09:05:29 UTC (rev 830)
+++ packages/libhdf4/branches/upstream/current/mfhdf/fortran/config/jackets-irix4.c	2007-05-15 09:53:05 UTC (rev 831)
@@ -2,7 +2,7 @@
  *	Copyright 1990, University Corporation for Atmospheric Research
  *      See netcdf/COPYRIGHT file for copying and redistribution conditions.
  */
-/* $Id: jackets-irix4.c,v 1.3 1997/11/05 22:20:09 koziol Exp $ */
+/* $Id: jackets-irix4.c,v 1.5 2005/02/09 03:04:15 epourmal Exp $ */
 /*
  * OVERVIEW
  *
@@ -34,7 +34,7 @@
 
 struct ncfils {			/* This will be a common block from Fortran */
     double dd;
-#ifdef __alpha
+#if defined __alpha || (_MIPS_SZLONG == 64) || defined IA64 || (defined __sun && defined _LP64)
     int ll;
 #else
     long ll;
@@ -65,7 +65,7 @@
 
 struct ncfils {			/* This will be a common block from Fortran */
     double dd;
-#ifdef __alpha
+#if defined __alpha || (_MIPS_SZLONG == 64) || defined IA64 || (defined __sun && defined _LP64)
     int ll;
 #else
     long ll;
@@ -163,7 +163,7 @@
 	*target++ = *source++;
     *target = '\0';
 }
-
+#ifdef WE_COULDNT_READ_NAMES_WITH_SPACES
 /* copy function used to copy strings terminated with blanks */
 static void
 nstrncpy (target, source, maxlen)
@@ -175,8 +175,26 @@
 	*target++ = *source++;
     *target = '\0';
 }
+#endif
 
+/* copy function used to copy strings with embeded blanks and
+   terminated with blanks */
+static void
+nstrncpy (target, source, maxlen)
+    char *target;		/* space to be copied into */
+    char *source;		/* string to be copied */
+    int maxlen;			/* maximum length of *source */
+{
+/* Copy all string */
+    while (maxlen--) 
+        *target++ = *source++;
+    *target -- = '\0';
+/* Disregard all trailing spaces  */
+     while (*target == ' ')
+         *target-- = '\0';
 
+}
+
 /*
  * Compute product of dimensions.
  */
@@ -412,7 +430,7 @@
 }
 #endif /* FORTRAN_HAS_NO_SHORT */
 
-#ifdef __alpha
+#if defined __alpha || (_MIPS_SZLONG == 64) || defined IA64 || (defined __sun && defined _LP64)
 /*
  * Convert multi-dimensional array of NCLONGs stored in ints to packed
  * array of longs, in malloc'ed space.  Returns pointer to longs or NULL
@@ -899,7 +917,7 @@
 	return;
     }				/* else */
 #endif				/* FORTRAN_HAS_NO_SHORT */
-#ifdef __alpha
+#if defined __alpha || (_MIPS_SZLONG == 64) || defined IA64 || (defined __sun && defined _LP64)
 #ifdef HDF
     if ((nc_type) datatype == NC_LONG && handle->file_type!=HDF_FILE) {
 	long          longs = *(int *)value;
@@ -1013,7 +1031,7 @@
 	return;
     }				/* else */
 #endif				/* FORTRAN_HAS_NO_SHORT */
-#ifdef __alpha
+#if defined __alpha || (_MIPS_SZLONG == 64) || defined IA64 || (defined __sun && defined _LP64)
 #ifdef HDF
     if ((nc_type) datatype == NC_LONG && handle->file_type!=HDF_FILE) {
 	long *longs = itol (value, ncount, ndims);
@@ -1124,7 +1142,7 @@
 	tmpbasis	= nctypelen(NC_LONG);
     else
 #endif
-#ifdef __alpha
+#if defined __alpha || (_MIPS_SZLONG == 64) || defined IA64 || (defined __sun && defined _LP64)
     if (datatype == NC_LONG)
 	tmpbasis	= sizeof(int);
     else
@@ -1181,7 +1199,7 @@
 	return;
     }				/* else */
 #endif				/* FORTRAN_HAS_NO_SHORT */
-#ifdef __alpha
+#if defined __alpha || (_MIPS_SZLONG == 64) || defined IA64 || (defined __sun && defined _LP64)
 #ifdef HDF
     if ((nc_type) datatype == NC_LONG && handle->file_type!=HDF_FILE) {
 	long *longs = itolg (value, ncount, nbasis, ndims);
@@ -1317,7 +1335,7 @@
 	return;
     }				/* else */
 #endif				/* FORTRAN_HAS_NO_SHORT */
-#ifdef __alpha
+#if defined __alpha || (_MIPS_SZLONG == 64) || defined IA64 || (defined __sun && defined _LP64)
 #ifdef HDF
     if ((nc_type) datatype == NC_LONG && handle->file_type!=HDF_FILE) {
 	long          longs;
@@ -1459,7 +1477,7 @@
 	return;
     }				/* else */
 #endif				/* FORTRAN_HAS_NO_SHORT */
-#ifdef __alpha
+#if defined __alpha || (_MIPS_SZLONG == 64) || defined IA64 || (defined __sun && defined _LP64)
 #ifdef HDF
     if ((nc_type) datatype == NC_LONG && handle->file_type!=HDF_FILE) {
 	long iocount = dimprod (ncount, ndims);	/* product of dimensions */
@@ -1592,7 +1610,7 @@
 	tmpbasis	= nctypelen(NC_LONG);
     else
 #endif
-#ifdef __alpha
+#if defined __alpha || (_MIPS_SZLONG == 64) || defined IA64 || (defined __sun && defined _LP64)
     if (datatype == NC_LONG)
 	tmpbasis	= sizeof(int);
     else
@@ -1663,7 +1681,7 @@
 	return;
     }				/* else */
 #endif				/* FORTRAN_HAS_NO_SHORT */
-#ifdef __alpha
+#if defined __alpha || (_MIPS_SZLONG == 64) || defined IA64 || (defined __sun && defined _LP64)
 #ifdef HDF
     if ((nc_type) datatype == NC_LONG && handle->file_type!=HDF_FILE) {
 	long iocount = dimprod (ncount, ndims);	/* product of dimensions */
@@ -1829,7 +1847,7 @@
 	return;
     }				/* else */
 #endif				/* FORTRAN_HAS_NO_SHORT */
-#ifdef __alpha
+#if defined __alpha || (_MIPS_SZLONG == 64) || defined IA64 || (defined __sun && defined _LP64)
 #ifdef HDF
     if ((nc_type) *datatype == NC_LONG && handle->file_type!=HDF_FILE) {
 	long *longs = itol (value, attlen, 1);
@@ -1994,7 +2012,7 @@
 	return;
     }				/* else */
 #endif				/* FORTRAN_HAS_NO_SHORT */
-#ifdef __alpha
+#if defined __alpha || (_MIPS_SZLONG == 64) || defined IA64 || (defined __sun && defined _LP64)
 #ifdef HDF
     if ((nc_type) datatype == NC_LONG && handle->file_type!=HDF_FILE) {
 	long *longs = (long *) malloc (attlen * sizeof (long));

Modified: packages/libhdf4/branches/upstream/current/mfhdf/fortran/config/jackets-irix5.c
===================================================================
--- packages/libhdf4/branches/upstream/current/mfhdf/fortran/config/jackets-irix5.c	2007-05-15 09:05:29 UTC (rev 830)
+++ packages/libhdf4/branches/upstream/current/mfhdf/fortran/config/jackets-irix5.c	2007-05-15 09:53:05 UTC (rev 831)
@@ -2,7 +2,7 @@
  *	Copyright 1990, University Corporation for Atmospheric Research
  *      See netcdf/COPYRIGHT file for copying and redistribution conditions.
  */
-/* $Id: jackets-irix5.c,v 1.3 1997/11/05 22:20:13 koziol Exp $ */
+/* $Id: jackets-irix5.c,v 1.5 2005/02/09 03:04:15 epourmal Exp $ */
 /*
  * OVERVIEW
  *
@@ -34,7 +34,7 @@
 
 struct ncfils {			/* This will be a common block from Fortran */
     double dd;
-#ifdef __alpha
+#if defined __alpha || (_MIPS_SZLONG == 64) || defined IA64 || (defined __sun && defined _LP64)
     int ll;
 #else
     long ll;
@@ -65,7 +65,7 @@
 
 struct ncfils {			/* This will be a common block from Fortran */
     double dd;
-#ifdef __alpha
+#if defined __alpha || (_MIPS_SZLONG == 64) || defined IA64 || (defined __sun && defined _LP64)
     int ll;
 #else
     long ll;
@@ -163,7 +163,7 @@
 	*target++ = *source++;
     *target = '\0';
 }
-
+#ifdef WE_COULDNT_READ_NAMES_WITH_SPACES
 /* copy function used to copy strings terminated with blanks */
 static void
 nstrncpy (target, source, maxlen)
@@ -175,8 +175,26 @@
 	*target++ = *source++;
     *target = '\0';
 }
+#endif
 
+/* copy function used to copy strings with embeded blanks and
+   terminated with blanks */
+static void
+nstrncpy (target, source, maxlen)
+    char *target;		/* space to be copied into */
+    char *source;		/* string to be copied */
+    int maxlen;			/* maximum length of *source */
+{
+/* Copy all string */
+    while (maxlen--) 
+        *target++ = *source++;
+    *target -- = '\0';
+/* Disregard all trailing spaces  */
+     while (*target == ' ')
+         *target-- = '\0';
 
+}
+
 /*
  * Compute product of dimensions.
  */
@@ -412,7 +430,7 @@
 }
 #endif /* FORTRAN_HAS_NO_SHORT */
 
-#ifdef __alpha
+#if defined __alpha || (_MIPS_SZLONG == 64) || defined IA64 || (defined __sun && defined _LP64)
 /*
  * Convert multi-dimensional array of NCLONGs stored in ints to packed
  * array of longs, in malloc'ed space.  Returns pointer to longs or NULL
@@ -899,7 +917,7 @@
 	return;
     }				/* else */
 #endif				/* FORTRAN_HAS_NO_SHORT */
-#ifdef __alpha
+#if defined __alpha || (_MIPS_SZLONG == 64) || defined IA64 || (defined __sun && defined _LP64)
 #ifdef HDF
     if ((nc_type) datatype == NC_LONG && handle->file_type!=HDF_FILE) {
 	long          longs = *(int *)value;
@@ -1013,7 +1031,7 @@
 	return;
     }				/* else */
 #endif				/* FORTRAN_HAS_NO_SHORT */
-#ifdef __alpha
+#if defined __alpha || (_MIPS_SZLONG == 64) || defined IA64 || (defined __sun && defined _LP64)
 #ifdef HDF
     if ((nc_type) datatype == NC_LONG && handle->file_type!=HDF_FILE) {
 	long *longs = itol (value, ncount, ndims);
@@ -1124,7 +1142,7 @@
 	tmpbasis	= nctypelen(NC_LONG);
     else
 #endif
-#ifdef __alpha
+#if defined __alpha || (_MIPS_SZLONG == 64) || defined IA64 || (defined __sun && defined _LP64)
     if (datatype == NC_LONG)
 	tmpbasis	= sizeof(int);
     else
@@ -1181,7 +1199,7 @@
 	return;
     }				/* else */
 #endif				/* FORTRAN_HAS_NO_SHORT */
-#ifdef __alpha
+#if defined __alpha || (_MIPS_SZLONG == 64) || defined IA64 || (defined __sun && defined _LP64)
 #ifdef HDF
     if ((nc_type) datatype == NC_LONG && handle->file_type!=HDF_FILE) {
 	long *longs = itolg (value, ncount, nbasis, ndims);
@@ -1317,7 +1335,7 @@
 	return;
     }				/* else */
 #endif				/* FORTRAN_HAS_NO_SHORT */
-#ifdef __alpha
+#if defined __alpha || (_MIPS_SZLONG == 64) || defined IA64 || (defined __sun && defined _LP64)
 #ifdef HDF
     if ((nc_type) datatype == NC_LONG && handle->file_type!=HDF_FILE) {
 	long          longs;
@@ -1459,7 +1477,7 @@
 	return;
     }				/* else */
 #endif				/* FORTRAN_HAS_NO_SHORT */
-#ifdef __alpha
+#if defined __alpha || (_MIPS_SZLONG == 64) || defined IA64 || (defined __sun && defined _LP64)
 #ifdef HDF
     if ((nc_type) datatype == NC_LONG && handle->file_type!=HDF_FILE) {
 	long iocount = dimprod (ncount, ndims);	/* product of dimensions */
@@ -1592,7 +1610,7 @@
 	tmpbasis	= nctypelen(NC_LONG);
     else
 #endif
-#ifdef __alpha
+#if defined __alpha || (_MIPS_SZLONG == 64) || defined IA64 || (defined __sun && defined _LP64)
     if (datatype == NC_LONG)
 	tmpbasis	= sizeof(int);
     else
@@ -1663,7 +1681,7 @@
 	return;
     }				/* else */
 #endif				/* FORTRAN_HAS_NO_SHORT */
-#ifdef __alpha
+#if defined __alpha || (_MIPS_SZLONG == 64) || defined IA64 || (defined __sun && defined _LP64)
 #ifdef HDF
     if ((nc_type) datatype == NC_LONG && handle->file_type!=HDF_FILE) {
 	long iocount = dimprod (ncount, ndims);	/* product of dimensions */
@@ -1829,7 +1847,7 @@
 	return;
     }				/* else */
 #endif				/* FORTRAN_HAS_NO_SHORT */
-#ifdef __alpha
+#if defined __alpha || (_MIPS_SZLONG == 64) || defined IA64 || (defined __sun && defined _LP64)
 #ifdef HDF
     if ((nc_type) *datatype == NC_LONG && handle->file_type!=HDF_FILE) {
 	long *longs = itol (value, attlen, 1);
@@ -1994,7 +2012,7 @@
 	return;
     }				/* else */
 #endif				/* FORTRAN_HAS_NO_SHORT */
-#ifdef __alpha
+#if defined __alpha || (_MIPS_SZLONG == 64) || defined IA64 || (defined __sun && defined _LP64)
 #ifdef HDF
     if ((nc_type) datatype == NC_LONG && handle->file_type!=HDF_FILE) {
 	long *longs = (long *) malloc (attlen * sizeof (long));

Modified: packages/libhdf4/branches/upstream/current/mfhdf/fortran/config/jackets-irix6.c
===================================================================
--- packages/libhdf4/branches/upstream/current/mfhdf/fortran/config/jackets-irix6.c	2007-05-15 09:05:29 UTC (rev 830)
+++ packages/libhdf4/branches/upstream/current/mfhdf/fortran/config/jackets-irix6.c	2007-05-15 09:53:05 UTC (rev 831)
@@ -2,7 +2,7 @@
  *	Copyright 1990, University Corporation for Atmospheric Research
  *      See netcdf/COPYRIGHT file for copying and redistribution conditions.
  */
-/* $Id: jackets-irix6.c,v 1.3 1997/11/05 22:20:16 koziol Exp $ */
+/* $Id: jackets-irix6.c,v 1.7 2005/02/09 03:04:16 epourmal Exp $ */
 /*
  * OVERVIEW
  *
@@ -34,7 +34,7 @@
 
 struct ncfils {			/* This will be a common block from Fortran */
     double dd;
-#ifdef __alpha
+#if defined __alpha || (_MIPS_SZLONG == 64) || defined __ia64 || (defined __sun && defined _LP64) || defined AIX5L64 || defined __x86_64__
     int ll;
 #else
     long ll;
@@ -65,7 +65,7 @@
 
 struct ncfils {			/* This will be a common block from Fortran */
     double dd;
-#ifdef __alpha
+#if defined __alpha || (_MIPS_SZLONG == 64) || defined __ia64 || (defined __sun && defined _LP64) || defined AIX5L64 || defined __x86_64__
     int ll;
 #else
     long ll;
@@ -163,7 +163,7 @@
 	*target++ = *source++;
     *target = '\0';
 }
-
+#ifdef WE_COULDNT_READ_NAMES_WITH_SPACES
 /* copy function used to copy strings terminated with blanks */
 static void
 nstrncpy (target, source, maxlen)
@@ -175,8 +175,26 @@
 	*target++ = *source++;
     *target = '\0';
 }
+#endif
 
+/* copy function used to copy strings with embeded blanks and
+   terminated with blanks */
+static void
+nstrncpy (target, source, maxlen)
+    char *target;		/* space to be copied into */
+    char *source;		/* string to be copied */
+    int maxlen;			/* maximum length of *source */
+{
+/* Copy all string */
+    while (maxlen--) 
+        *target++ = *source++;
+    *target -- = '\0';
+/* Disregard all trailing spaces  */
+     while (*target == ' ')
+         *target-- = '\0';
 
+}
+
 /*
  * Compute product of dimensions.
  */
@@ -412,7 +430,7 @@
 }
 #endif /* FORTRAN_HAS_NO_SHORT */
 
-#ifdef __alpha
+#if defined __alpha || (_MIPS_SZLONG == 64) || defined __ia64 || (defined __sun && defined _LP64) || defined AIX5L64 || defined __x86_64__
 /*
  * Convert multi-dimensional array of NCLONGs stored in ints to packed
  * array of longs, in malloc'ed space.  Returns pointer to longs or NULL
@@ -899,7 +917,7 @@
 	return;
     }				/* else */
 #endif				/* FORTRAN_HAS_NO_SHORT */
-#ifdef __alpha
+#if defined __alpha || (_MIPS_SZLONG == 64) || defined __ia64 || (defined __sun && defined _LP64) || defined AIX5L64 || defined __x86_64__
 #ifdef HDF
     if ((nc_type) datatype == NC_LONG && handle->file_type!=HDF_FILE) {
 	long          longs = *(int *)value;
@@ -1013,7 +1031,7 @@
 	return;
     }				/* else */
 #endif				/* FORTRAN_HAS_NO_SHORT */
-#ifdef __alpha
+#if defined __alpha || (_MIPS_SZLONG == 64) || defined __ia64 || (defined __sun && defined _LP64) || defined AIX5L64 || defined __x86_64__
 #ifdef HDF
     if ((nc_type) datatype == NC_LONG && handle->file_type!=HDF_FILE) {
 	long *longs = itol (value, ncount, ndims);
@@ -1124,7 +1142,7 @@
 	tmpbasis	= nctypelen(NC_LONG);
     else
 #endif
-#ifdef __alpha
+#if defined __alpha || (_MIPS_SZLONG == 64) || defined __ia64 || (defined __sun && defined _LP64) || defined AIX5L64 || defined __x86_64__
     if (datatype == NC_LONG)
 	tmpbasis	= sizeof(int);
     else
@@ -1181,7 +1199,7 @@
 	return;
     }				/* else */
 #endif				/* FORTRAN_HAS_NO_SHORT */
-#ifdef __alpha
+#if defined __alpha || (_MIPS_SZLONG == 64) || defined __ia64 || (defined __sun && defined _LP64) || defined AIX5L64 || defined __x86_64__
 #ifdef HDF
     if ((nc_type) datatype == NC_LONG && handle->file_type!=HDF_FILE) {
 	long *longs = itolg (value, ncount, nbasis, ndims);
@@ -1317,7 +1335,7 @@
 	return;
     }				/* else */
 #endif				/* FORTRAN_HAS_NO_SHORT */
-#ifdef __alpha
+#if defined __alpha || (_MIPS_SZLONG == 64) || defined __ia64 || (defined __sun && defined _LP64) || defined AIX5L64 || defined __x86_64__
 #ifdef HDF
     if ((nc_type) datatype == NC_LONG && handle->file_type!=HDF_FILE) {
 	long          longs;
@@ -1459,13 +1477,18 @@
 	return;
     }				/* else */
 #endif				/* FORTRAN_HAS_NO_SHORT */
-#ifdef __alpha
+#if defined __alpha || (_MIPS_SZLONG == 64) || defined __ia64 || (defined __sun && defined _LP64) || defined AIX5L64 || defined __x86_64__
 #ifdef HDF
     if ((nc_type) datatype == NC_LONG && handle->file_type!=HDF_FILE) {
 	long iocount = dimprod (ncount, ndims);	/* product of dimensions */
+/* EIP  We need to use int buffer to read data in on the platforms where long is 8 bytes
 	long *longs = (long *) malloc (iocount * sizeof (long));
 	int *ip;
 	long *lp = longs;
+*/
+	int *longs = (int *) malloc (iocount * sizeof (int));
+	int *ip;
+	int *lp = longs;
 
 	if (longs == NULL) {
 	    *rcode = NC_SYSERR;
@@ -1592,7 +1615,7 @@
 	tmpbasis	= nctypelen(NC_LONG);
     else
 #endif
-#ifdef __alpha
+#if defined __alpha || (_MIPS_SZLONG == 64) || defined __ia64 || (defined __sun && defined _LP64) || defined AIX5L64 || defined __x86_64__
     if (datatype == NC_LONG)
 	tmpbasis	= sizeof(int);
     else
@@ -1663,7 +1686,7 @@
 	return;
     }				/* else */
 #endif				/* FORTRAN_HAS_NO_SHORT */
-#ifdef __alpha
+#if defined __alpha || (_MIPS_SZLONG == 64) || defined __ia64 || (defined __sun && defined _LP64) || defined AIX5L64 || defined __x86_64__
 #ifdef HDF
     if ((nc_type) datatype == NC_LONG && handle->file_type!=HDF_FILE) {
 	long iocount = dimprod (ncount, ndims);	/* product of dimensions */
@@ -1829,7 +1852,7 @@
 	return;
     }				/* else */
 #endif				/* FORTRAN_HAS_NO_SHORT */
-#ifdef __alpha
+#if defined __alpha || (_MIPS_SZLONG == 64) || defined __ia64 || (defined __sun && defined _LP64) || defined AIX5L64 || defined __x86_64__
 #ifdef HDF
     if ((nc_type) *datatype == NC_LONG && handle->file_type!=HDF_FILE) {
 	long *longs = itol (value, attlen, 1);
@@ -1994,12 +2017,17 @@
 	return;
     }				/* else */
 #endif				/* FORTRAN_HAS_NO_SHORT */
-#ifdef __alpha
+#if defined __alpha || (_MIPS_SZLONG == 64) || defined __ia64 || (defined __sun && defined _LP64) || defined AIX5L64 || defined __x86_64__
 #ifdef HDF
     if ((nc_type) datatype == NC_LONG && handle->file_type!=HDF_FILE) {
+/* EIP  We need int buffer to read data in on the platfroms where long is 8 bytes
 	long *longs = (long *) malloc (attlen * sizeof (long));
 	int *ip;
 	long *lp = longs;
+*/
+	int *longs = (int *) malloc (attlen * sizeof (int));
+	int *ip;
+	int *lp = longs;
 
 	if (longs == NULL) {
 	    *rcode = NC_SYSERR;

Modified: packages/libhdf4/branches/upstream/current/mfhdf/fortran/config/jackets-linux.c
===================================================================
--- packages/libhdf4/branches/upstream/current/mfhdf/fortran/config/jackets-linux.c	2007-05-15 09:05:29 UTC (rev 830)
+++ packages/libhdf4/branches/upstream/current/mfhdf/fortran/config/jackets-linux.c	2007-05-15 09:53:05 UTC (rev 831)
@@ -2,7 +2,7 @@
  *	Copyright 1990, University Corporation for Atmospheric Research
  *      See netcdf/COPYRIGHT file for copying and redistribution conditions.
  */
-/* $Id: jackets-linux.c,v 1.3 1997/11/05 22:20:21 koziol Exp $ */
+/* $Id: jackets-linux.c,v 1.8 2005/02/09 03:04:16 epourmal Exp $ */
 /*
  * OVERVIEW
  *
@@ -34,7 +34,7 @@
 
 struct ncfils {			/* This will be a common block from Fortran */
     double dd;
-#ifdef __alpha
+#if defined __alpha || (_MIPS_SZLONG == 64) || defined __ia64 || (defined __sun && defined _LP64) || defined AIX5L64 || defined __x86_64__
     int ll;
 #else
     long ll;
@@ -65,7 +65,7 @@
 
 struct ncfils {			/* This will be a common block from Fortran */
     double dd;
-#ifdef __alpha
+#if defined __alpha || (_MIPS_SZLONG == 64) || defined __ia64 || (defined __sun && defined _LP64) || defined AIX5L64 || defined __x86_64__
     int ll;
 #else
     long ll;
@@ -163,7 +163,7 @@
 	*target++ = *source++;
     *target = '\0';
 }
-
+#ifdef WE_COULDNT_READ_NAMES_WITH_SPACES
 /* copy function used to copy strings terminated with blanks */
 static void
 nstrncpy (target, source, maxlen)
@@ -175,8 +175,26 @@
 	*target++ = *source++;
     *target = '\0';
 }
+#endif
 
+/* copy function used to copy strings with embeded blanks and
+   terminated with blanks */
+static void
+nstrncpy (target, source, maxlen)
+    char *target;		/* space to be copied into */
+    char *source;		/* string to be copied */
+    int maxlen;			/* maximum length of *source */
+{
+/* Copy all string */
+    while (maxlen--) 
+        *target++ = *source++;
+    *target -- = '\0';
+/* Disregard all trailing spaces  */
+     while (*target == ' ')
+         *target-- = '\0';
 
+}
+
 /*
  * Compute product of dimensions.
  */
@@ -412,7 +430,7 @@
 }
 #endif /* FORTRAN_HAS_NO_SHORT */
 
-#ifdef __alpha
+#if defined __alpha || (_MIPS_SZLONG == 64) || defined __ia64 || (defined __sun && defined _LP64) || defined AIX5L64 || defined __x86_64__
 /*
  * Convert multi-dimensional array of NCLONGs stored in ints to packed
  * array of longs, in malloc'ed space.  Returns pointer to longs or NULL
@@ -521,11 +539,15 @@
 }
 #endif	/* Alpha platform above */
 
-/* ------------ Sun FORTRAN jackets for netCDF Functions ------------ */
+/* ------------ Linux FORTRAN jackets for netCDF Functions ------------ */
 
 /* used to set the C global variable ncopts from Fortran */
 void
+#ifdef H4_ABSOFT
+NCPOPT(val)
+#else
 ncpopt_(val)
+#endif
     int		*val;	
 {
     ncopts = *val;
@@ -534,7 +556,11 @@
 
 /* used to get the C global variable ncopts from Fortran */
 void
+#ifdef H4_ABSOFT
+NCGOPT(val)
+#else
 ncgopt_(val)
+#endif
     int		*val;	
 {
     *val = ncopts;
@@ -545,7 +571,11 @@
  * file is placed in define mode.
  */
 int
+#ifdef H4_ABSOFT
+NCCRE(pathname, clobmode, rcode, pathnamelen)
+#else
 nccre_(pathname, clobmode, rcode, pathnamelen)
+#endif
     char	*pathname;	
     int		pathnamelen;
     int		*clobmode;	
@@ -566,7 +596,11 @@
 
 /* opens an existing netCDF file for access */
 int
+#ifdef H4_ABSOFT
+NCOPN(pathname, rwmode, rcode, pathnamelen)
+#else
 ncopn_(pathname, rwmode, rcode, pathnamelen)
+#endif
     char	*pathname;	
     int		pathnamelen;
     int		*rwmode;	
@@ -587,7 +621,11 @@
 
 /* adds a new dimension to an open netCDF file in define mode */
 int
+#ifdef H4_ABSOFT
+NCDDEF(cdfid, dimname, dimlen, rcode, dimnamelen)
+#else
 ncddef_(cdfid, dimname, dimlen, rcode, dimnamelen)
+#endif
     int		*cdfid;	
     char	*dimname;	
     int		dimnamelen;
@@ -612,7 +650,11 @@
  * dimension
  */
 int
+#ifdef H4_ABSOFT
+NCDID(cdfid, dimname, rcode, dimnamelen)
+#else
 ncdid_(cdfid, dimname, rcode, dimnamelen)
+#endif
     int		*cdfid;	
     char	*dimname;	
     int		dimnamelen;
@@ -633,7 +675,11 @@
 
 /* adds a new variable to an open netCDF file in define mode */
 int
+#ifdef H4_ABSOFT
+NCVDEF(cdfid, varname, datatype, ndims, dimarray, rcode, varnamelen)
+#else
 ncvdef_(cdfid, varname, datatype, ndims, dimarray, rcode, varnamelen)
+#endif
     int		*cdfid;	
     char	*varname;	
     int		varnamelen;
@@ -661,7 +707,11 @@
 
 /* returns the ID of a netCDF variable given its name */
 int
+#ifdef H4_ABSOFT
+NCVID(cdfid, varname, rcode, varnamelen)
+#else
 ncvid_(cdfid, varname, rcode, varnamelen)
+#endif
     int		*cdfid;	
     char	*varname;	
     int		varnamelen;
@@ -682,7 +732,11 @@
 
 /* returns number of bytes per netCDF data type */
 int
+#ifdef H4_ABSOFT
+NCTLEN(datatype, rcode)
+#else
 nctlen_(datatype, rcode)
+#endif
     int		*datatype;	
     int		*rcode;	
 {
@@ -698,7 +752,11 @@
 
 /* closes an open netCDF file */
 void
+#ifdef H4_ABSOFT
+NCCLOS(cdfid, rcode)
+#else
 ncclos_(cdfid, rcode)
+#endif
     int		*cdfid;	
     int		*rcode;	
 {
@@ -709,7 +767,11 @@
 
 /* puts an open netCDF into define mode */
 void
+#ifdef H4_ABSOFT
+NCREDF(cdfid, rcode)
+#else
 ncredf_(cdfid, rcode)
+#endif
     int		*cdfid;	
     int		*rcode;	
 {
@@ -720,7 +782,11 @@
 
 /* takes an open netCDF out of define mode */
 void
+#ifdef H4_ABSOFT
+NCENDF(cdfid, rcode)
+#else
 ncendf_(cdfid, rcode)
+#endif
     int		*cdfid;	
     int		*rcode;	
 {
@@ -731,7 +797,11 @@
 
 /* returns information about an open netCDF file given its netCDF ID */
 void
+#ifdef H4_ABSOFT
+NCINQ(cdfid, ndims, nvars, natts, recdim, rcode)
+#else
 ncinq_(cdfid, ndims, nvars, natts, recdim, rcode)
+#endif
     int		*cdfid;	
     int		*ndims;	
     int		*nvars;	
@@ -753,7 +823,11 @@
  * is current
  */
 void
+#ifdef H4_ABSOFT
+NCSNC(cdfid, rcode)
+#else
 ncsnc_(cdfid, rcode)
+#endif
     int		*cdfid;	
     int		*rcode;	
 {
@@ -768,7 +842,11 @@
  * or attributes
  */
 void
+#ifdef H4_ABSOFT
+NCABOR(cdfid, rcode)
+#else
 ncabor_(cdfid, rcode)
+#endif
     int		*cdfid;	
     int		*rcode;	
 {
@@ -779,7 +857,11 @@
 
 /* returns the name and size of a dimension, given its ID */
 void
+#ifdef H4_ABSOFT
+NCDINQ(cdfid, dimid, dimname, size, rcode, dimnamelen)
+#else
 ncdinq_(cdfid, dimid, dimname, size, rcode, dimnamelen)
+#endif
     int		*cdfid;	
     int		*dimid;	
     char	*dimname;	
@@ -807,7 +889,11 @@
 
 /* renames an existing dimension in a netCDF open for writing */
 void
+#ifdef H4_ABSOFT
+NCDREN(cdfid, dimid, dimname, rcode, dimnamelen)
+#else
 ncdren_(cdfid, dimid, dimname, rcode, dimnamelen)
+#endif
     int		*cdfid;	
     int		*dimid;	
     char	*dimname;	
@@ -824,7 +910,11 @@
 
 /* returns information about a netCDF variable, given its ID */
 void
+#ifdef H4_ABSOFT
+NCVINQ(cdfid, varid, varname, datatype, ndims, dimarray, natts, rcode, varnamelen)
+#else
 ncvinq_(cdfid, varid, varname, datatype, ndims, dimarray, natts, rcode, varnamelen)
+#endif
     int		*cdfid;	
     int		*varid;	
     char	*varname;	
@@ -857,7 +947,11 @@
 
 /* puts a single numeric data value into a variable of an open netCDF */
 void
+#ifdef H4_ABSOFT
+NCVPT1(cdfid, varid, indices, value, rcode)
+#else
 ncvpt1_(cdfid, varid, indices, value, rcode)
+#endif
     int		*cdfid;	
     int		*varid;	
     int		*indices;	
@@ -899,7 +993,7 @@
 	return;
     }				/* else */
 #endif				/* FORTRAN_HAS_NO_SHORT */
-#ifdef __alpha
+#if defined __alpha || (_MIPS_SZLONG == 64) || defined __ia64 || (defined __sun && defined _LP64) || defined AIX5L64 || defined __x86_64__
 #ifdef HDF
     if ((nc_type) datatype == NC_LONG && handle->file_type!=HDF_FILE) {
 	long          longs = *(int *)value;
@@ -925,7 +1019,11 @@
 
 /* puts a single character into an open netCDF file */
 void
+#ifdef H4_ABSOFT
+NCVP1C(cdfid, varid, indices, chval, rcode, chvallen)
+#else
 ncvp1c_(cdfid, varid, indices, chval, rcode, chvallen)
+#endif
     int		*cdfid;	
     int		*varid;	
     int		*indices;	
@@ -956,7 +1054,11 @@
  * netCDF file
  */
 void
+#ifdef H4_ABSOFT
+NCVPT(cdfid, varid, start, count, value, rcode)
+#else
 ncvpt_(cdfid, varid, start, count, value, rcode)
+#endif
     int		*cdfid;	
     int		*varid;	
     int		*start;	
@@ -1013,7 +1115,7 @@
 	return;
     }				/* else */
 #endif				/* FORTRAN_HAS_NO_SHORT */
-#ifdef __alpha
+#if defined __alpha || (_MIPS_SZLONG == 64) || defined __ia64 || (defined __sun && defined _LP64) || defined AIX5L64 || defined __x86_64__
 #ifdef HDF
     if ((nc_type) datatype == NC_LONG && handle->file_type!=HDF_FILE) {
 	long *longs = itol (value, ncount, ndims);
@@ -1051,7 +1153,11 @@
 
 /* writes a hypercube of character values into an open netCDF file */
 void
+#ifdef H4_ABSOFT
+NCVPTC(cdfid, varid, start, count, string, lenstr, rcode, stringlen)
+#else
 ncvptc_(cdfid, varid, start, count, string, lenstr, rcode, stringlen)
+#endif
     int		*cdfid;	
     int		*varid;	
     int		*start;	
@@ -1091,7 +1197,11 @@
  * an open netCDF file
  */
 void
+#ifdef H4_ABSOFT
+NCVPTG(cdfid, varid, start, count, stride, basis, value, rcode)
+#else
 ncvptg_(cdfid, varid, start, count, stride, basis, value, rcode)
+#endif
     int		*cdfid;	
     int		*varid;	
     int		*start;	
@@ -1124,7 +1234,7 @@
 	tmpbasis	= nctypelen(NC_LONG);
     else
 #endif
-#ifdef __alpha
+#if defined __alpha || (_MIPS_SZLONG == 64) || defined __ia64 || (defined __sun && defined _LP64) || defined AIX5L64 || defined __x86_64__
     if (datatype == NC_LONG)
 	tmpbasis	= sizeof(int);
     else
@@ -1181,7 +1291,7 @@
 	return;
     }				/* else */
 #endif				/* FORTRAN_HAS_NO_SHORT */
-#ifdef __alpha
+#if defined __alpha || (_MIPS_SZLONG == 64) || defined __ia64 || (defined __sun && defined _LP64) || defined AIX5L64 || defined __x86_64__
 #ifdef HDF
     if ((nc_type) datatype == NC_LONG && handle->file_type!=HDF_FILE) {
 	long *longs = itolg (value, ncount, nbasis, ndims);
@@ -1223,7 +1333,11 @@
  * an open netCDF file
  */
 void
+#ifdef H4_ABSOFT
+NCVPGC(cdfid, varid, start, count, stride, basis, string, rcode, stringlen)
+#else
 ncvpgc_(cdfid, varid, start, count, stride, basis, string, rcode, stringlen)
+#endif
     int		*cdfid;	
     int		*varid;	
     int		*start;	
@@ -1266,7 +1380,11 @@
 
 /* gets a single numeric value from a variable of an open netCDF file */
 void
+#ifdef H4_ABSOFT
+NCVGT1(cdfid, varid, indices, value, rcode)
+#else
 ncvgt1_(cdfid, varid, indices, value, rcode)
+#endif
     int		*cdfid;	
     int		*varid;	
     int		*indices;	
@@ -1317,7 +1435,7 @@
 	return;
     }				/* else */
 #endif				/* FORTRAN_HAS_NO_SHORT */
-#ifdef __alpha
+#if defined __alpha || (_MIPS_SZLONG == 64) || defined __ia64 || (defined __sun && defined _LP64) || defined AIX5L64 || defined __x86_64__
 #ifdef HDF
     if ((nc_type) datatype == NC_LONG && handle->file_type!=HDF_FILE) {
 	long          longs;
@@ -1354,7 +1472,11 @@
  * netCDF file
  */
 void
+#ifdef H4_ABSOFT
+NCVG1C(cdfid, varid, indices, chval, rcode, chvallen)
+#else
 ncvg1c_(cdfid, varid, indices, chval, rcode, chvallen)
+#endif
     int		*cdfid;	
     int		*varid;	
     int		*indices;	
@@ -1386,7 +1508,11 @@
  * netCDF file
  */
 void
+#ifdef H4_ABSOFT
+NCVGT(cdfid, varid, start, count, value, rcode)
+#else
 ncvgt_(cdfid, varid, start, count, value, rcode)
+#endif
     int		*cdfid;	
     int		*varid;	
     int		*start;	
@@ -1459,13 +1585,18 @@
 	return;
     }				/* else */
 #endif				/* FORTRAN_HAS_NO_SHORT */
-#ifdef __alpha
+#if defined __alpha || (_MIPS_SZLONG == 64) || defined __ia64 || (defined __sun && defined _LP64) || defined AIX5L64 || defined __x86_64__
 #ifdef HDF
     if ((nc_type) datatype == NC_LONG && handle->file_type!=HDF_FILE) {
 	long iocount = dimprod (ncount, ndims);	/* product of dimensions */
+/* EIP   We need int buffer to read data in on the platforms where long is 8 bytes
 	long *longs = (long *) malloc (iocount * sizeof (long));
 	int *ip;
 	long *lp = longs;
+*/
+	int *longs = (int *) malloc (iocount * sizeof (int));
+	int *ip;
+	int *lp = longs;
 
 	if (longs == NULL) {
 	    *rcode = NC_SYSERR;
@@ -1513,7 +1644,11 @@
 
 /* reads a hypercube of character values from a netCDF variable */
 void
+#ifdef H4_ABSOFT
+NCVGTC(cdfid, varid, start, count, string, lenstr, rcode, stringlen)
+#else
 ncvgtc_(cdfid, varid, start, count, string, lenstr, rcode, stringlen)
+#endif
     int		*cdfid;	
     int		*varid;	
     int		*start;	
@@ -1559,7 +1694,11 @@
  * open netCDF file
  */
 void
+#ifdef H4_ABSOFT
+NCVGTG(cdfid, varid, start, count, stride, basis, value, rcode)
+#else
 ncvgtg_(cdfid, varid, start, count, stride, basis, value, rcode)
+#endif
     int		*cdfid;	
     int		*varid;	
     int		*start;	
@@ -1592,7 +1731,7 @@
 	tmpbasis	= nctypelen(NC_LONG);
     else
 #endif
-#ifdef __alpha
+#if defined __alpha || (_MIPS_SZLONG == 64) || defined __ia64 || (defined __sun && defined _LP64) || defined AIX5L64 || defined __x86_64__
     if (datatype == NC_LONG)
 	tmpbasis	= sizeof(int);
     else
@@ -1663,7 +1802,7 @@
 	return;
     }				/* else */
 #endif				/* FORTRAN_HAS_NO_SHORT */
-#ifdef __alpha
+#if defined __alpha || (_MIPS_SZLONG == 64) || defined __ia64 || (defined __sun && defined _LP64) || defined AIX5L64 || defined __x86_64__
 #ifdef HDF
     if ((nc_type) datatype == NC_LONG && handle->file_type!=HDF_FILE) {
 	long iocount = dimprod (ncount, ndims);	/* product of dimensions */
@@ -1715,7 +1854,11 @@
  * of an open netCDF file
  */
 void
+#ifdef H4_ABSOFT
+NCVGGC(cdfid, varid, start, count, stride, basis, string, rcode, stringlen)
+#else
 ncvggc_(cdfid, varid, start, count, stride, basis, string, rcode, stringlen)
+#endif
     int		*cdfid;	
     int		*varid;	
     int		*start;	
@@ -1758,7 +1901,11 @@
 
 /* changes the name of a netCDF variable in an open netCDF file */
 void
+#ifdef H4_ABSOFT
+NCVREN(cdfid, varid, varname, rcode, varnamelen)
+#else
 ncvren_(cdfid, varid, varname, rcode, varnamelen)
+#endif
     int		*cdfid;	
     int		*varid;	
     char	*varname;	
@@ -1779,7 +1926,11 @@
  * netCDF file
  */
 void
+#ifdef H4_ABSOFT
+NCAPT(cdfid, varid, attname, datatype, attlen, value, rcode, attnamelen)
+#else
 ncapt_(cdfid, varid, attname, datatype, attlen, value, rcode, attnamelen)
+#endif
     int		*cdfid;	
     int		*varid;	
     char	*attname;	
@@ -1829,7 +1980,7 @@
 	return;
     }				/* else */
 #endif				/* FORTRAN_HAS_NO_SHORT */
-#ifdef __alpha
+#if defined __alpha || (_MIPS_SZLONG == 64) || defined __ia64 || (defined __sun && defined _LP64) || defined AIX5L64 || defined __x86_64__
 #ifdef HDF
     if ((nc_type) *datatype == NC_LONG && handle->file_type!=HDF_FILE) {
 	long *longs = itol (value, attlen, 1);
@@ -1873,7 +2024,11 @@
  * of an open netCDF file
  */
 void
+#ifdef H4_ABSOFT
+NCAPTC(cdfid, varid, attname, datatype, lenstr, string, rcode, attnamelen, stringlen)
+#else
 ncaptc_(cdfid, varid, attname, datatype, lenstr, string, rcode, attnamelen, stringlen)
+#endif
     int		*cdfid;	
     int		*varid;	
     char	*attname;	
@@ -1907,7 +2062,11 @@
  * ID and name
  */
 void
+#ifdef H4_ABSOFT
+NCAINQ(cdfid, varid, attname, datatype, attlen, rcode, attnamelen)
+#else
 ncainq_(cdfid, varid, attname, datatype, attlen, rcode, attnamelen)
+#endif
     int		*cdfid;	
     int		*varid;	
     char	*attname;	
@@ -1930,7 +2089,11 @@
  * and name
  */
 void
+#ifdef H4_ABSOFT
+NCAGT(cdfid, varid, attname, value, rcode, attnamelen)
+#else
 ncagt_(cdfid, varid, attname, value, rcode, attnamelen)
+#endif
     int		*cdfid;	
     int		*varid;	
     char	*attname;	
@@ -1994,12 +2157,17 @@
 	return;
     }				/* else */
 #endif				/* FORTRAN_HAS_NO_SHORT */
-#ifdef __alpha
+#if defined __alpha || (_MIPS_SZLONG == 64) || defined __ia64 || (defined __sun && defined _LP64) || defined AIX5L64 || defined __x86_64__
 #ifdef HDF
     if ((nc_type) datatype == NC_LONG && handle->file_type!=HDF_FILE) {
+/* EIP  We need to use int buffer to read data in on the platforms where long is 8 bytes
 	long *longs = (long *) malloc (attlen * sizeof (long));
 	int *ip;
 	long *lp = longs;
+*/
+	int *longs = (int *) malloc (attlen * sizeof (int));
+	int *ip;
+	int *lp = longs;
 
 	if (longs == NULL) {
 	    *rcode = NC_SYSERR;
@@ -2047,7 +2215,11 @@
  * ID and name
  */
 void
+#ifdef H4_ABSOFT
+NCAGTC(cdfid, varid, attname, string, lenstr, rcode, attnamelen, stringlen)
+#else
 ncagtc_(cdfid, varid, attname, string, lenstr, rcode, attnamelen, stringlen)
+#endif
     int		*cdfid;	
     int		*varid;	
     char	*attname;	
@@ -2084,7 +2256,11 @@
 
 /* copies an attribute from one open netCDF file to another */
 void
+#ifdef H4_ABSOFT
+NCACPY(incdfid, invarid, attname, outcdfid, outvarid, rcode, attnamelen)
+#else
 ncacpy_(incdfid, invarid, attname, outcdfid, outvarid, rcode, attnamelen)
+#endif
     int		*incdfid;	
     int		*invarid;	
     char	*attname;	
@@ -2108,7 +2284,11 @@
  * as an attribute of that variable
  */
 void
+#ifdef H4_ABSOFT
+NCANAM(cdfid, varid, attnum, attname, rcode, attnamelen)
+#else
 ncanam_(cdfid, varid, attnum, attname, rcode, attnamelen)
+#endif
     int		*cdfid;	
     int		*varid;	
     int		*attnum;	
@@ -2134,7 +2314,11 @@
 
 /* renames an attribute in an open netCDF file */
 void
+#ifdef H4_ABSOFT
+NCAREN(cdfid, varid, attname, newname, rcode, attnamelen, newnamelen)
+#else
 ncaren_(cdfid, varid, attname, newname, rcode, attnamelen, newnamelen)
+#endif
     int		*cdfid;	
     int		*varid;	
     char	*attname;	
@@ -2158,7 +2342,11 @@
  * name
  */
 void
+#ifdef H4_ABSOFT
+NCADEL(cdfid, varid, attname, rcode, attnamelen)
+#else
 ncadel_(cdfid, varid, attname, rcode, attnamelen)
+#endif
     int		*cdfid;	
     int		*varid;	
     char	*attname;	
@@ -2179,7 +2367,11 @@
  * sets the fill mode of a netCDF file open for writing
  */
 int
+#ifdef H4_ABSOFT
+NCSFIL(cdfid, fillmode, rcode)
+#else
 ncsfil_(cdfid, fillmode, rcode)
+#endif
     int		*cdfid;	
     int		*fillmode;	
     int		*rcode;	

Modified: packages/libhdf4/branches/upstream/current/mfhdf/fortran/config/jackets-mac.c
===================================================================
--- packages/libhdf4/branches/upstream/current/mfhdf/fortran/config/jackets-mac.c	2007-05-15 09:05:29 UTC (rev 830)
+++ packages/libhdf4/branches/upstream/current/mfhdf/fortran/config/jackets-mac.c	2007-05-15 09:53:05 UTC (rev 831)
@@ -2,7 +2,7 @@
  *	Copyright 1990, University Corporation for Atmospheric Research
  *      See netcdf/COPYRIGHT file for copying and redistribution conditions.
  */
-/* $Id: jackets-mac.c,v 1.3 1997/11/05 22:20:24 koziol Exp $ */
+/* $Id: jackets-mac.c,v 1.5 2005/02/09 03:04:16 epourmal Exp $ */
 /*
  * OVERVIEW
  *
@@ -34,7 +34,7 @@
 
 struct ncfils {			/* This will be a common block from Fortran */
     double dd;
-#ifdef __alpha
+#if defined __alpha || (_MIPS_SZLONG == 64) || defined IA64 || (defined __sun && defined _LP64)
     int ll;
 #else
     long ll;
@@ -65,7 +65,7 @@
 
 struct ncfils {			/* This will be a common block from Fortran */
     double dd;
-#ifdef __alpha
+#if defined __alpha || (_MIPS_SZLONG == 64) || defined IA64 || (defined __sun && defined _LP64)
     int ll;
 #else
     long ll;
@@ -163,7 +163,7 @@
 	*target++ = *source++;
     *target = '\0';
 }
-
+#ifdef WE_COULDNT_READ_NAMES_WITH_SPACES
 /* copy function used to copy strings terminated with blanks */
 static void
 nstrncpy (target, source, maxlen)
@@ -175,8 +175,26 @@
 	*target++ = *source++;
     *target = '\0';
 }
+#endif
 
+/* copy function used to copy strings with embeded blanks and
+   terminated with blanks */
+static void
+nstrncpy (target, source, maxlen)
+    char *target;		/* space to be copied into */
+    char *source;		/* string to be copied */
+    int maxlen;			/* maximum length of *source */
+{
+/* Copy all string */
+    while (maxlen--) 
+        *target++ = *source++;
+    *target -- = '\0';
+/* Disregard all trailing spaces  */
+     while (*target == ' ')
+         *target-- = '\0';
 
+}
+
 /*
  * Compute product of dimensions.
  */
@@ -412,7 +430,7 @@
 }
 #endif /* FORTRAN_HAS_NO_SHORT */
 
-#ifdef __alpha
+#if defined __alpha || (_MIPS_SZLONG == 64) || defined IA64 || (defined __sun && defined _LP64)
 /*
  * Convert multi-dimensional array of NCLONGs stored in ints to packed
  * array of longs, in malloc'ed space.  Returns pointer to longs or NULL
@@ -899,7 +917,7 @@
 	return;
     }				/* else */
 #endif				/* FORTRAN_HAS_NO_SHORT */
-#ifdef __alpha
+#if defined __alpha || (_MIPS_SZLONG == 64) || defined IA64 || (defined __sun && defined _LP64)
 #ifdef HDF
     if ((nc_type) datatype == NC_LONG && handle->file_type!=HDF_FILE) {
 	long          longs = *(int *)value;
@@ -1013,7 +1031,7 @@
 	return;
     }				/* else */
 #endif				/* FORTRAN_HAS_NO_SHORT */
-#ifdef __alpha
+#if defined __alpha || (_MIPS_SZLONG == 64) || defined IA64 || (defined __sun && defined _LP64)
 #ifdef HDF
     if ((nc_type) datatype == NC_LONG && handle->file_type!=HDF_FILE) {
 	long *longs = itol (value, ncount, ndims);
@@ -1124,7 +1142,7 @@
 	tmpbasis	= nctypelen(NC_LONG);
     else
 #endif
-#ifdef __alpha
+#if defined __alpha || (_MIPS_SZLONG == 64) || defined IA64 || (defined __sun && defined _LP64)
     if (datatype == NC_LONG)
 	tmpbasis	= sizeof(int);
     else
@@ -1181,7 +1199,7 @@
 	return;
     }				/* else */
 #endif				/* FORTRAN_HAS_NO_SHORT */
-#ifdef __alpha
+#if defined __alpha || (_MIPS_SZLONG == 64) || defined IA64 || (defined __sun && defined _LP64)
 #ifdef HDF
     if ((nc_type) datatype == NC_LONG && handle->file_type!=HDF_FILE) {
 	long *longs = itolg (value, ncount, nbasis, ndims);
@@ -1317,7 +1335,7 @@
 	return;
     }				/* else */
 #endif				/* FORTRAN_HAS_NO_SHORT */
-#ifdef __alpha
+#if defined __alpha || (_MIPS_SZLONG == 64) || defined IA64 || (defined __sun && defined _LP64)
 #ifdef HDF
     if ((nc_type) datatype == NC_LONG && handle->file_type!=HDF_FILE) {
 	long          longs;
@@ -1459,7 +1477,7 @@
 	return;
     }				/* else */
 #endif				/* FORTRAN_HAS_NO_SHORT */
-#ifdef __alpha
+#if defined __alpha || (_MIPS_SZLONG == 64) || defined IA64 || (defined __sun && defined _LP64)
 #ifdef HDF
     if ((nc_type) datatype == NC_LONG && handle->file_type!=HDF_FILE) {
 	long iocount = dimprod (ncount, ndims);	/* product of dimensions */
@@ -1592,7 +1610,7 @@
 	tmpbasis	= nctypelen(NC_LONG);
     else
 #endif
-#ifdef __alpha
+#if defined __alpha || (_MIPS_SZLONG == 64) || defined IA64 || (defined __sun && defined _LP64)
     if (datatype == NC_LONG)
 	tmpbasis	= sizeof(int);
     else
@@ -1663,7 +1681,7 @@
 	return;
     }				/* else */
 #endif				/* FORTRAN_HAS_NO_SHORT */
-#ifdef __alpha
+#if defined __alpha || (_MIPS_SZLONG == 64) || defined IA64 || (defined __sun && defined _LP64)
 #ifdef HDF
     if ((nc_type) datatype == NC_LONG && handle->file_type!=HDF_FILE) {
 	long iocount = dimprod (ncount, ndims);	/* product of dimensions */
@@ -1829,7 +1847,7 @@
 	return;
     }				/* else */
 #endif				/* FORTRAN_HAS_NO_SHORT */
-#ifdef __alpha
+#if defined __alpha || (_MIPS_SZLONG == 64) || defined IA64 || (defined __sun && defined _LP64)
 #ifdef HDF
     if ((nc_type) *datatype == NC_LONG && handle->file_type!=HDF_FILE) {
 	long *longs = itol (value, attlen, 1);
@@ -1994,7 +2012,7 @@
 	return;
     }				/* else */
 #endif				/* FORTRAN_HAS_NO_SHORT */
-#ifdef __alpha
+#if defined __alpha || (_MIPS_SZLONG == 64) || defined IA64 || (defined __sun && defined _LP64)
 #ifdef HDF
     if ((nc_type) datatype == NC_LONG && handle->file_type!=HDF_FILE) {
 	long *longs = (long *) malloc (attlen * sizeof (long));

Modified: packages/libhdf4/branches/upstream/current/mfhdf/fortran/config/jackets-solaris.c
===================================================================
--- packages/libhdf4/branches/upstream/current/mfhdf/fortran/config/jackets-solaris.c	2007-05-15 09:05:29 UTC (rev 830)
+++ packages/libhdf4/branches/upstream/current/mfhdf/fortran/config/jackets-solaris.c	2007-05-15 09:53:05 UTC (rev 831)
@@ -2,7 +2,7 @@
  *	Copyright 1990, University Corporation for Atmospheric Research
  *      See netcdf/COPYRIGHT file for copying and redistribution conditions.
  */
-/* $Id: jackets-solaris.c,v 1.3 1997/11/05 22:20:26 koziol Exp $ */
+/* $Id: jackets-solaris.c,v 1.7 2005/02/09 03:04:17 epourmal Exp $ */
 /*
  * OVERVIEW
  *
@@ -34,7 +34,7 @@
 
 struct ncfils {			/* This will be a common block from Fortran */
     double dd;
-#ifdef __alpha
+#if defined __alpha || (_MIPS_SZLONG == 64) || defined __ia64 || (defined __sun && defined _LP64) || defined AIX5L64 || defined __x86_64__
     int ll;
 #else
     long ll;
@@ -65,7 +65,7 @@
 
 struct ncfils {			/* This will be a common block from Fortran */
     double dd;
-#ifdef __alpha
+#if defined __alpha || (_MIPS_SZLONG == 64) || defined __ia64 || (defined __sun && defined _LP64) || defined AIX5L64 || defined __x86_64__
     int ll;
 #else
     long ll;
@@ -163,7 +163,7 @@
 	*target++ = *source++;
     *target = '\0';
 }
-
+#ifdef WE_COULDNT_READ_NAMES_WITH_SPACES
 /* copy function used to copy strings terminated with blanks */
 static void
 nstrncpy (target, source, maxlen)
@@ -175,8 +175,26 @@
 	*target++ = *source++;
     *target = '\0';
 }
+#endif
 
+/* copy function used to copy strings with embeded blanks and
+   terminated with blanks */
+static void
+nstrncpy (target, source, maxlen)
+    char *target;		/* space to be copied into */
+    char *source;		/* string to be copied */
+    int maxlen;			/* maximum length of *source */
+{
+/* Copy all string */
+    while (maxlen--) 
+        *target++ = *source++;
+    *target -- = '\0';
+/* Disregard all trailing spaces  */
+     while (*target == ' ')
+         *target-- = '\0';
 
+}
+
 /*
  * Compute product of dimensions.
  */
@@ -412,7 +430,7 @@
 }
 #endif /* FORTRAN_HAS_NO_SHORT */
 
-#ifdef __alpha
+#if defined __alpha || (_MIPS_SZLONG == 64) || defined __ia64 || (defined __sun && defined _LP64) || defined AIX5L64 || defined __x86_64__
 /*
  * Convert multi-dimensional array of NCLONGs stored in ints to packed
  * array of longs, in malloc'ed space.  Returns pointer to longs or NULL
@@ -899,7 +917,7 @@
 	return;
     }				/* else */
 #endif				/* FORTRAN_HAS_NO_SHORT */
-#ifdef __alpha
+#if defined __alpha || (_MIPS_SZLONG == 64) || defined __ia64 || (defined __sun && defined _LP64) || defined AIX5L64 || defined __x86_64__
 #ifdef HDF
     if ((nc_type) datatype == NC_LONG && handle->file_type!=HDF_FILE) {
 	long          longs = *(int *)value;
@@ -1013,7 +1031,7 @@
 	return;
     }				/* else */
 #endif				/* FORTRAN_HAS_NO_SHORT */
-#ifdef __alpha
+#if defined __alpha || (_MIPS_SZLONG == 64) || defined __ia64 || (defined __sun && defined _LP64) || defined AIX5L64 || defined __x86_64__
 #ifdef HDF
     if ((nc_type) datatype == NC_LONG && handle->file_type!=HDF_FILE) {
 	long *longs = itol (value, ncount, ndims);
@@ -1124,7 +1142,7 @@
 	tmpbasis	= nctypelen(NC_LONG);
     else
 #endif
-#ifdef __alpha
+#if defined __alpha || (_MIPS_SZLONG == 64) || defined __ia64 || (defined __sun && defined _LP64) || defined AIX5L64 || defined __x86_64__
     if (datatype == NC_LONG)
 	tmpbasis	= sizeof(int);
     else
@@ -1181,7 +1199,7 @@
 	return;
     }				/* else */
 #endif				/* FORTRAN_HAS_NO_SHORT */
-#ifdef __alpha
+#if defined __alpha || (_MIPS_SZLONG == 64) || defined __ia64 || (defined __sun && defined _LP64) || defined AIX5L64 || defined __x86_64__
 #ifdef HDF
     if ((nc_type) datatype == NC_LONG && handle->file_type!=HDF_FILE) {
 	long *longs = itolg (value, ncount, nbasis, ndims);
@@ -1317,7 +1335,7 @@
 	return;
     }				/* else */
 #endif				/* FORTRAN_HAS_NO_SHORT */
-#ifdef __alpha
+#if defined __alpha || (_MIPS_SZLONG == 64) || defined __ia64 || (defined __sun && defined _LP64) || defined AIX5L64 || defined __x86_64__
 #ifdef HDF
     if ((nc_type) datatype == NC_LONG && handle->file_type!=HDF_FILE) {
 	long          longs;
@@ -1459,13 +1477,20 @@
 	return;
     }				/* else */
 #endif				/* FORTRAN_HAS_NO_SHORT */
-#ifdef __alpha
+#if defined __alpha || (_MIPS_SZLONG == 64) || defined __ia64 || (defined __sun && defined _LP64) || defined AIX5L64 || defined __x86_64__
 #ifdef HDF
     if ((nc_type) datatype == NC_LONG && handle->file_type!=HDF_FILE) {
 	long iocount = dimprod (ncount, ndims);	/* product of dimensions */
+/* EIP
+        This code is wrong when long is 8 bytes. We need to use an int
+        buffer to read data in
 	long *longs = (long *) malloc (iocount * sizeof (long));
 	int *ip;
 	long *lp = longs;
+*/
+	int *longs = (int *) malloc (iocount * sizeof (int));
+	int *ip;
+	int *lp = longs;
 
 	if (longs == NULL) {
 	    *rcode = NC_SYSERR;
@@ -1592,7 +1617,7 @@
 	tmpbasis	= nctypelen(NC_LONG);
     else
 #endif
-#ifdef __alpha
+#if defined __alpha || (_MIPS_SZLONG == 64) || defined __ia64 || (defined __sun && defined _LP64) || defined AIX5L64 || defined __x86_64__
     if (datatype == NC_LONG)
 	tmpbasis	= sizeof(int);
     else
@@ -1663,7 +1688,7 @@
 	return;
     }				/* else */
 #endif				/* FORTRAN_HAS_NO_SHORT */
-#ifdef __alpha
+#if defined __alpha || (_MIPS_SZLONG == 64) || defined __ia64 || (defined __sun && defined _LP64) || defined AIX5L64 || defined __x86_64__
 #ifdef HDF
     if ((nc_type) datatype == NC_LONG && handle->file_type!=HDF_FILE) {
 	long iocount = dimprod (ncount, ndims);	/* product of dimensions */
@@ -1829,7 +1854,7 @@
 	return;
     }				/* else */
 #endif				/* FORTRAN_HAS_NO_SHORT */
-#ifdef __alpha
+#if defined __alpha || (_MIPS_SZLONG == 64) || defined __ia64 || (defined __sun && defined _LP64) || defined AIX5L64 || defined __x86_64__
 #ifdef HDF
     if ((nc_type) *datatype == NC_LONG && handle->file_type!=HDF_FILE) {
 	long *longs = itol (value, attlen, 1);
@@ -1994,12 +2019,19 @@
 	return;
     }				/* else */
 #endif				/* FORTRAN_HAS_NO_SHORT */
-#ifdef __alpha
+#if defined __alpha || (_MIPS_SZLONG == 64) || defined __ia64 || (defined __sun && defined _LP64) || defined AIX5L64 || defined __x86_64__
 #ifdef HDF
     if ((nc_type) datatype == NC_LONG && handle->file_type!=HDF_FILE) {
+/* EIP
+        This code is wrong when long is 8 bytes. We need to use an int
+        buffer to read data in
 	long *longs = (long *) malloc (attlen * sizeof (long));
 	int *ip;
 	long *lp = longs;
+*/
+	int *longs = (int *) malloc (attlen * sizeof (int));
+	int *ip;
+	int *lp = longs;
 
 	if (longs == NULL) {
 	    *rcode = NC_SYSERR;

Added: packages/libhdf4/branches/upstream/current/mfhdf/fortran/config/jackets-solaris64.c
===================================================================
--- packages/libhdf4/branches/upstream/current/mfhdf/fortran/config/jackets-solaris64.c	                        (rev 0)
+++ packages/libhdf4/branches/upstream/current/mfhdf/fortran/config/jackets-solaris64.c	2007-05-15 09:53:05 UTC (rev 831)
@@ -0,0 +1,2214 @@
+/*
+ *	Copyright 1990, University Corporation for Atmospheric Research
+ *      See netcdf/COPYRIGHT file for copying and redistribution conditions.
+ */
+/* $Id: jackets-solaris64.c,v 1.4 2005/02/09 03:04:17 epourmal Exp $ */
+/*
+ * OVERVIEW
+ *
+ * This file contains jacket routines written in C for interfacing Fortran
+ * netCDF function calls to the actual C binding for the NetCDF.  This code
+ * is written explicitly for Sun.  In general, these functions handle
+ * character-string parameter conventions, convert between
+ * column-major-order arrays and row-major-order arrays, and map between
+ * array indices beginning at one and array indices beginning at zero.
+ *
+ */
+
+/* LINTLIBRARY */
+#include	<ctype.h>
+#include        <string.h>
+#include	<stdlib.h>
+#include	<stdio.h>
+#ifdef HDF
+#include        "local_nc.h"
+#else /* HDF */
+#include	"netcdf.h"
+#endif /* HDF */
+
+
+
+
+
+#if !NC_OLD_FILLVALUES
+
+struct ncfils {			/* This will be a common block from Fortran */
+    double dd;
+#if defined __alpha || (_MIPS_SZLONG == 64) || defined IA64 || (defined __sun && defined _LP64)
+    int ll;
+#else
+    long ll;
+#endif
+    float ff;
+    short ss;
+    char cc;
+    char bb;
+} ncfils_ = {
+    FILL_DOUBLE,
+    FILL_LONG,
+    FILL_FLOAT,
+    FILL_SHORT,
+    FILL_CHAR,
+    FILL_BYTE
+};
+
+#else	/* NC_OLD_FILLVALUES below */
+
+/*
+ * This section is provided for backward compatibility only.  Using
+ * XDR infinities for floating-point fill values has caused more problems
+ * than it has solved.  We encourage you to define your own data-specific
+ * fill values rather than use default ones.  
+ * If, however, you *must* use default fill values, then you should use
+ * the above fill values rather than the ones in this section.
+ */
+
+struct ncfils {			/* This will be a common block from Fortran */
+    double dd;
+#if defined __alpha || (_MIPS_SZLONG == 64) || defined IA64 || (defined __sun && defined _LP64)
+    int ll;
+#else
+    long ll;
+#endif
+    float ff;
+    short ss;
+    char cc;
+    char bb;
+} ncfils_ = {
+    XDR_D_INFINITY,		/* You may have to insert a constant here */
+    FILL_LONG,
+    XDR_F_INFINITY,		/* You may have to insert a constant here */
+    FILL_SHORT,
+    FILL_CHAR,
+    FILL_BYTE
+};
+
+#endif	/* NC_OLD_FILLVALUES above */
+
+
+/*
+ * global integer used for suppressing error messages and determining
+ * the fatality of errors.
+ */
+extern int ncopts;		/* default is (NC_FATAL | NC_VERBOSE) */
+
+/* global integer that contains a netCDF-specific error code */
+extern int ncerr;
+
+/* blank fill C string to make FORTRAN string */
+static void
+fcdcpy (fstring, fslen, sstring)
+    char *fstring;		/* output string to be blank-filled */
+    int fslen;			/* length of output string */
+    char *sstring;		/* input string, null-terminated */
+{
+    int i, len = strlen(sstring);
+
+    for (i = 0; i < len; i++)
+	*(fstring + i) = *(sstring + i);
+    for (i = len; i < fslen; i++)
+	*(fstring + i) = ' ';
+}
+
+
+static void
+reverse (array, length)
+    int array[];		/* array to be reversed */
+    int length;			/* length of array */
+{
+    int temp, i, j;
+
+    for (i = 0, j = length - 1; i < j; i++, j--) {
+	temp = array[i];
+	array[i] = array[j];
+	array[j] = temp;
+    }
+}
+
+
+static void
+revlongs (array, length)
+    long array[];		/* array to be reversed */
+    int length;			/* length of array */
+{
+    int i, j;
+    long temp;
+
+    for (i = 0, j = length - 1; i < j; i++, j--) {
+	temp = array[i];
+	array[i] = array[j];
+	array[j] = temp;
+    }
+}
+
+
+/* error handling function */
+static void
+handle_err (pname, rcode)
+    char *pname;		/* procedure name */
+    int rcode;			/* error return */
+{
+    cdf_routine_name = pname;
+    NCadvise(rcode, "string won't fit in CHARACTER variable provided");
+}
+
+/* copy function used to copy strings with embedded blanks */
+static void
+fstrncpy (target, source, maxlen)
+    char *target;		/* space to be copied into */
+    char *source;		/* string to be copied */
+    int maxlen;			/* maximum length of *source */
+{
+    while (maxlen-- && *source != '\0')
+	*target++ = *source++;
+    *target = '\0';
+}
+#ifdef WE_COULDNT_READ_NAMES_WITH_SPACES
+/* copy function used to copy strings terminated with blanks */
+static void
+nstrncpy (target, source, maxlen)
+    char *target;		/* space to be copied into */
+    char *source;		/* string to be copied */
+    int maxlen;			/* maximum length of *source */
+{
+    while (maxlen-- && *source != ' ')
+	*target++ = *source++;
+    *target = '\0';
+}
+#endif
+
+/* copy function used to copy strings with embeded blanks and
+   terminated with blanks */
+static void
+nstrncpy (target, source, maxlen)
+    char *target;		/* space to be copied into */
+    char *source;		/* string to be copied */
+    int maxlen;			/* maximum length of *source */
+{
+/* Copy all string */
+    while (maxlen--) 
+        *target++ = *source++;
+    *target -- = '\0';
+/* Disregard all trailing spaces  */
+     while (*target == ' ')
+         *target-- = '\0';
+
+}
+
+/*
+ * Compute product of dimensions.
+ */
+static long
+dimprod (dims, ndims)
+     long *dims;			/* list of dimensions */
+     int ndims;			/* number of dimensions in list */
+{
+    long *ip;
+    long prod = 1;
+
+    for (ip = dims; ip < &dims[ndims]; ip++)
+      prod *= *ip;
+    return prod;
+}
+
+
+#ifdef FORTRAN_HAS_NO_BYTE
+/*
+ * Convert multi-dimensional array of bytes stored in ints to packed array of
+ * bytes, in malloc'ed space.  Returns pointer to bytes or NULL if malloc
+ * failed.
+ */
+static char *
+itob(ints, dims, ndims)
+     int *ints;			/* multi-dimensional array of integers */
+     long *dims;			/* list of dimensions */
+     int ndims;			/* number of dimensions in list */
+{
+    long iocount = dimprod (dims, ndims);	/* product of dimensions */
+    char *bytes = (char *) malloc (iocount * sizeof (char));
+    int *ip;
+    char *bp = bytes;
+
+    if (bytes != NULL)
+      for (ip = ints; iocount > 0; iocount--)
+	*bp++ = (char) *ip++;
+    return bytes;
+}
+
+/*
+ * Convert a generalized multi-dimensional array of bytes stored in ints to 
+ * packed array of bytes, in malloc'ed space.  Returns pointer to bytes or 
+ * NULL if malloc failed.
+ */
+static char *
+itobg(ints, dims, basis, ndims)
+     int *ints;			/* multi-dimensional array of integers */
+     long *dims;			/* list of dimensions */
+     long *basis;			/* memory access basis vector */
+     int ndims;			/* number of dimensions in list */
+{
+    long iocount = dimprod (dims, ndims);	/* product of dimensions */
+    char *bytes = (char *) malloc (iocount * sizeof (char));
+
+    if (bytes != NULL && iocount > 0) {
+	int	idim;
+	char	*bp	= bytes;
+	char	*ip	= (char*)ints;
+	long	length[MAX_NC_DIMS];
+	long	coords[MAX_NC_DIMS];
+
+	for (idim = 0; idim < ndims; ++idim) {
+	    length[idim]	= dims[idim]*basis[idim];
+	    coords[idim]	= 0;
+	}
+
+	for (;;) {
+	    *bp++	= (char)*(int*)ip;
+	    idim	= ndims - 1;
+	carry:
+	    ip	+= basis[idim];
+	    if (++coords[idim] >= dims[idim]) {
+		coords[idim]	= 0;
+		ip		-= length[idim];
+		if (--idim < 0)
+		    break;
+		goto carry;
+	    }
+        }
+    }
+
+    return bytes;
+}
+
+/*
+ * Convert a packed array of bytes into a generalized multi-dimensional array
+ * of ints.
+ */
+static void
+btoig(bytes, ints, dims, basis, ndims)
+     char *bytes;		/* packed array of bytes */
+     int *ints;			/* multi-dimensional array of integers */
+     long *dims;		/* list of dimensions */
+     long *basis;		/* memory access basis vector */
+     int ndims;			/* number of dimensions in list */
+{
+    if (dimprod (dims, ndims) > 0) {
+	int	idim;
+	char	*bp	= bytes;
+	char	*ip	= (char*)ints;
+	long	length[MAX_NC_DIMS];
+	long	coords[MAX_NC_DIMS];
+
+	for (idim = 0; idim < ndims; ++idim) {
+	    length[idim]	= dims[idim]*basis[idim];
+	    coords[idim]	= 0;
+	}
+
+	for (;;) {
+	    *(int*)ip	= *bp++;
+	    idim	= ndims - 1;
+	carry:
+	    ip	+= basis[idim];
+	    if (++coords[idim] >= dims[idim]) {
+		coords[idim]	= 0;
+		ip		-= length[idim];
+		if (--idim < 0)
+		    break;
+		goto carry;
+	    }
+        }
+    }
+}
+#endif /* FORTRAN_HAS_NO_BYTE */
+
+#ifdef FORTRAN_HAS_NO_SHORT
+/*
+ * Convert multi-dimensional array of shorts stored in ints to packed array of
+ * shorts, in malloc'ed space.  Returns pointer to shorts or NULL if malloc
+ * failed.
+ */
+static short *
+itos(ints, dims, ndims)
+     int *ints;		/* multi-dimensional array of ints */
+     long *dims;			/* list of dimensions */
+     int ndims;			/* number of dimensions in list */
+{
+    long iocount = dimprod (dims, ndims);	/* product of dimensions */
+    short *shorts = (short *) malloc (iocount * sizeof (short));
+    int *ip;
+    short *sp = shorts;
+
+    if (shorts != NULL)
+      for (ip = ints; iocount > 0; iocount--)
+	*sp++ = (short) *ip++;
+    return shorts;
+}
+
+/*
+ * Convert a generalized multi-dimensional array of shorts stored in ints to 
+ * packed array of shorts, in malloc'ed space.  Returns pointer to shorts or 
+ * NULL if malloc failed.
+ */
+static short *
+itosg(ints, dims, basis, ndims)
+     int *ints;			/* multi-dimensional array of integers */
+     long *dims;			/* list of dimensions */
+     long *basis;			/* memory access basis vector */
+     int ndims;			/* number of dimensions in list */
+{
+    long iocount = dimprod (dims, ndims);	/* product of dimensions */
+    short *shorts = (short *) malloc (iocount * sizeof (short));
+
+    if (shorts != NULL && iocount > 0) {
+	int	idim;
+	char	*ip	= (char*)ints;
+	short	*sp	= shorts;
+	long	length[MAX_NC_DIMS];
+	long	coords[MAX_NC_DIMS];
+
+	for (idim = 0; idim < ndims; ++idim) {
+	    length[idim]	= dims[idim]*basis[idim];
+	    coords[idim]	= 0;
+	}
+
+	for (;;) {
+	    *sp++	= (short)*(int*)ip;
+	    idim	= ndims - 1;
+	carry:
+	    ip	+= basis[idim];
+	    if (++coords[idim] >= dims[idim]) {
+		coords[idim]	= 0;
+		ip		-= length[idim];
+		if (--idim < 0)
+		    break;
+		goto carry;
+	    }
+        }
+    }
+
+    return shorts;
+}
+
+/*
+ * Convert a packed array of shorts into a generalized multi-dimensional array
+ * of ints.
+ */
+static void
+stoig(shorts, ints, dims, basis, ndims)
+     short *shorts;		/* packed array of shorts */
+     int *ints;			/* multi-dimensional array of integers */
+     long *dims;		/* list of dimensions */
+     long *basis;		/* memory access basis vector */
+     int ndims;			/* number of dimensions in list */
+{
+    if (dimprod (dims, ndims) > 0) {
+	int	idim;
+	short	*sp	= shorts;
+	char	*ip	= (char*)ints;
+	long	length[MAX_NC_DIMS];
+	long	coords[MAX_NC_DIMS];
+
+	for (idim = 0; idim < ndims; ++idim) {
+	    length[idim]	= dims[idim]*basis[idim];
+	    coords[idim]	= 0;
+	}
+
+	for (;;) {
+	    *(int*)ip	= *sp++;
+	    idim	= ndims - 1;
+	carry:
+	    ip	+= basis[idim];
+	    if (++coords[idim] >= dims[idim]) {
+		coords[idim]	= 0;
+		ip		-= length[idim];
+		if (--idim < 0)
+		    break;
+		goto carry;
+	    }
+        }
+    }
+}
+#endif /* FORTRAN_HAS_NO_SHORT */
+
+#if defined __alpha || (_MIPS_SZLONG == 64) || defined IA64 || (defined __sun && defined _LP64)
+/*
+ * Convert multi-dimensional array of NCLONGs stored in ints to packed
+ * array of longs, in malloc'ed space.  Returns pointer to longs or NULL
+ * if malloc failed.
+ */
+static long *
+itol(ints, dims, ndims)
+    int		*ints;		/* multi-dimensional array of ints */
+    long	*dims;		/* list of dimensions */
+    int		ndims;		/* number of dimensions in list */
+{
+    long	iocount = dimprod (dims, ndims);
+    long	*longs = (long *) malloc (iocount * sizeof (long));
+    int		*ip;
+    long	*lp = longs;
+
+    if (longs != NULL)
+	for (ip = ints; iocount > 0; iocount--)
+	    *lp++ = (long) *ip++;
+    return longs;
+}
+
+/*
+ * Convert a generalized multi-dimensional array of longs stored in ints to 
+ * packed array of longs, in malloc'ed space.  Returns pointer to longs or 
+ * NULL if malloc failed.
+ */
+static long *
+itolg(ints, dims, imap, ndims)
+    int		*ints;		/* multi-dimensional array of integers */
+    long	*dims;		/* list of dimensions */
+    long	*imap;		/* memory access index mapping vector */
+    int		ndims;		/* number of dimensions in list */
+{
+    long	iocount = dimprod (dims, ndims);
+    long	*longs = (long *) malloc (iocount * sizeof (long));
+
+    if (longs != NULL && iocount > 0) {
+	int	idim;
+	char	*ip	= (char*)ints;
+	long	*lp	= longs;
+	long	length[MAX_NC_DIMS];
+	long	coords[MAX_NC_DIMS];
+
+	for (idim = 0; idim < ndims; ++idim) {
+	    length[idim]	= dims[idim]*imap[idim];
+	    coords[idim]	= 0;
+	}
+
+	for (;;) {
+	    *lp++	= (long)*(int*)ip;
+	    idim	= ndims - 1;
+	carry:
+	    ip	+= imap[idim];
+	    if (++coords[idim] >= dims[idim]) {
+		coords[idim]	= 0;
+		ip		-= length[idim];
+		if (--idim < 0)
+		    break;
+		goto carry;
+	    }
+        }
+    }
+
+    return longs;
+}
+
+/*
+ * Convert a packed array of longs into a generalized multi-dimensional array
+ * of ints.
+ */
+static void
+ltoig(longs, ints, dims, imap, ndims)
+    long	*longs;		/* packed array of longs */
+    int		*ints;		/* multi-dimensional array of integers */
+    long	*dims;		/* list of dimensions */
+    long	*imap;		/* memory access index mapping vector */
+    int		ndims;		/* number of dimensions in list */
+{
+    if (dimprod (dims, ndims) > 0) {
+	int	idim;
+	long	*lp	= longs;
+	char	*ip	= (char*)ints;
+	long	length[MAX_NC_DIMS];
+	long	coords[MAX_NC_DIMS];
+
+	for (idim = 0; idim < ndims; ++idim) {
+	    length[idim]	= dims[idim]*imap[idim];
+	    coords[idim]	= 0;
+	}
+
+	for (;;) {
+	    *(int*)ip	= *lp++;
+	    idim	= ndims - 1;
+	carry:
+	    ip	+= imap[idim];
+	    if (++coords[idim] >= dims[idim]) {
+		coords[idim]	= 0;
+		ip		-= length[idim];
+		if (--idim < 0)
+		    break;
+		goto carry;
+	    }
+        }
+    }
+}
+#endif	/* Alpha platform above */
+
+/* ------------ Sun FORTRAN jackets for netCDF Functions ------------ */
+
+/* used to set the C global variable ncopts from Fortran */
+void
+ncpopt_(val)
+    int		*val;	
+{
+    ncopts = *val;
+}
+
+
+/* used to get the C global variable ncopts from Fortran */
+void
+ncgopt_(val)
+    int		*val;	
+{
+    *val = ncopts;
+}
+
+/*
+ * creates a new netCDF file, returning a netCDF ID.  New netCDF
+ * file is placed in define mode.
+ */
+int
+nccre_(pathname, clobmode, rcode, pathnamelen)
+    char	*pathname;	
+    int		pathnamelen;
+    int		*clobmode;	
+    int		*rcode;	
+{
+    char name[MAX_NC_NAME + 1];
+    int cdfid;
+
+    nstrncpy (name, pathname, pathnamelen);
+    if ((cdfid = nccreate (name, *clobmode)) != -1) {
+	*rcode = 0;
+	return (cdfid);
+    }
+    *rcode = ncerr;
+    return (-1);
+}
+
+
+/* opens an existing netCDF file for access */
+int
+ncopn_(pathname, rwmode, rcode, pathnamelen)
+    char	*pathname;	
+    int		pathnamelen;
+    int		*rwmode;	
+    int		*rcode;	
+{
+    char name[MAX_NC_NAME + 1];
+    int cdfid;
+
+    nstrncpy (name, pathname, pathnamelen);
+    if ((cdfid = ncopen (name, *rwmode)) != -1) {
+	*rcode = 0;
+	return (cdfid);
+    }
+    *rcode = ncerr;
+    return (-1);
+}
+
+
+/* adds a new dimension to an open netCDF file in define mode */
+int
+ncddef_(cdfid, dimname, dimlen, rcode, dimnamelen)
+    int		*cdfid;	
+    char	*dimname;	
+    int		dimnamelen;
+    int		*dimlen;	
+    int		*rcode;	
+{
+    char name[MAX_NC_NAME + 1];
+    int dimid;
+
+    nstrncpy (name, dimname, dimnamelen);
+    if ((dimid = ncdimdef (*cdfid, name, (long)*dimlen)) != -1) {
+	*rcode = 0;
+	return (dimid + 1);
+    }
+    *rcode = ncerr;
+    return (-1);
+}
+
+
+/*
+ * returns the ID of a netCDF dimension, given the name of the
+ * dimension
+ */
+int
+ncdid_(cdfid, dimname, rcode, dimnamelen)
+    int		*cdfid;	
+    char	*dimname;	
+    int		dimnamelen;
+    int		*rcode;	
+{
+    char name[MAX_NC_NAME + 1];
+    int dimid;
+
+    nstrncpy (name, dimname, dimnamelen);
+    if ((dimid = ncdimid (*cdfid, name)) != -1) {
+	*rcode = 0;
+	return (dimid + 1);
+    }
+    *rcode = ncerr;
+    return (-1);
+}
+
+
+/* adds a new variable to an open netCDF file in define mode */
+int
+ncvdef_(cdfid, varname, datatype, ndims, dimarray, rcode, varnamelen)
+    int		*cdfid;	
+    char	*varname;	
+    int		varnamelen;
+    int		*datatype;	
+    int		*ndims;	
+    int		*dimarray;	
+    int		*rcode;	
+{
+    int varid, i, dimid[MAX_VAR_DIMS];
+    char name[MAX_NC_NAME + 1];
+
+    nstrncpy (name, varname, varnamelen);
+    for (i = 0; i < *ndims; i++)
+	dimid[i] = dimarray[i] - 1;
+    reverse (dimid, *ndims);
+    if ((varid = ncvardef (*cdfid, name, (nc_type) *datatype, *ndims,
+			   dimid)) != -1) {
+	*rcode = 0;
+	return (varid + 1);
+    }
+    *rcode = ncerr;
+    return (-1);
+}
+
+
+/* returns the ID of a netCDF variable given its name */
+int
+ncvid_(cdfid, varname, rcode, varnamelen)
+    int		*cdfid;	
+    char	*varname;	
+    int		varnamelen;
+    int		*rcode;	
+{
+    int varid;
+    char name[MAX_NC_NAME + 1];
+
+    nstrncpy (name, varname, varnamelen);
+    if ((varid = ncvarid (*cdfid, name)) != -1) {
+	*rcode = 0;
+	return (varid + 1);
+    }
+    *rcode = ncerr;
+    return (-1);
+}
+
+
+/* returns number of bytes per netCDF data type */
+int
+nctlen_(datatype, rcode)
+    int		*datatype;	
+    int		*rcode;	
+{
+    int itype;
+
+    if ((itype = nctypelen ((nc_type) *datatype)) != -1) {
+	*rcode = 0;
+	return (itype);
+    }
+    *rcode = ncerr;
+    return (-1);
+}
+
+/* closes an open netCDF file */
+void
+ncclos_(cdfid, rcode)
+    int		*cdfid;	
+    int		*rcode;	
+{
+    *rcode = 0;
+    if (ncclose (*cdfid) == -1)
+	*rcode = ncerr;
+}
+
+/* puts an open netCDF into define mode */
+void
+ncredf_(cdfid, rcode)
+    int		*cdfid;	
+    int		*rcode;	
+{
+    *rcode = 0;
+    if (ncredef (*cdfid) == -1)
+	*rcode = ncerr;
+}
+
+/* takes an open netCDF out of define mode */
+void
+ncendf_(cdfid, rcode)
+    int		*cdfid;	
+    int		*rcode;	
+{
+    *rcode = 0;
+    if (ncendef (*cdfid) == -1)
+	*rcode = ncerr;
+}
+
+/* returns information about an open netCDF file given its netCDF ID */
+void
+ncinq_(cdfid, ndims, nvars, natts, recdim, rcode)
+    int		*cdfid;	
+    int		*ndims;	
+    int		*nvars;	
+    int		*natts;	
+    int		*recdim;	
+    int		*rcode;	
+{
+    *rcode = 0;
+    if (ncinquire (*cdfid, ndims, nvars, natts, recdim) == -1) {
+	*rcode = ncerr;
+	return;
+    }
+    if (*recdim != -1)
+	(*recdim)++;
+}
+
+/*
+ * makes sure that the disk copy of a netCDF file open for writing
+ * is current
+ */
+void
+ncsnc_(cdfid, rcode)
+    int		*cdfid;	
+    int		*rcode;	
+{
+    *rcode = 0;
+    if (ncsync (*cdfid) == -1)
+	*rcode = ncerr;
+}
+
+/*
+ * restores the netCDF to a known consistent state in case anything
+ * goes wrong during the definition of new dimensions, variables
+ * or attributes
+ */
+void
+ncabor_(cdfid, rcode)
+    int		*cdfid;	
+    int		*rcode;	
+{
+    *rcode = 0;
+    if (ncabort (*cdfid) == -1)
+	*rcode = ncerr;
+}
+
+/* returns the name and size of a dimension, given its ID */
+void
+ncdinq_(cdfid, dimid, dimname, size, rcode, dimnamelen)
+    int		*cdfid;	
+    int		*dimid;	
+    char	*dimname;	
+    int		dimnamelen;
+    int		*size;	
+    int		*rcode;	
+{
+    long siz;
+    char name[MAX_NC_NAME + 1];
+
+    *rcode = 0;
+    if (ncdiminq (*cdfid, *dimid - 1, name, &siz) == -1) {
+	*rcode = ncerr;
+	return;
+    }
+    *size = siz;
+    if (strlen (name) > dimnamelen) {
+	*rcode = NC_ESTS;
+	handle_err ("NCDINQ", *rcode);
+	return;
+    }
+    /* blank fill the input character string */
+    fcdcpy (dimname, dimnamelen, name);
+}
+
+/* renames an existing dimension in a netCDF open for writing */
+void
+ncdren_(cdfid, dimid, dimname, rcode, dimnamelen)
+    int		*cdfid;	
+    int		*dimid;	
+    char	*dimname;	
+    int		dimnamelen;
+    int		*rcode;	
+{
+    char name[MAX_NC_NAME + 1];
+
+    nstrncpy (name, dimname, dimnamelen);
+    *rcode = 0;
+    if (ncdimrename (*cdfid, *dimid - 1, name) == -1)
+	*rcode = ncerr;
+}
+
+/* returns information about a netCDF variable, given its ID */
+void
+ncvinq_(cdfid, varid, varname, datatype, ndims, dimarray, natts, rcode, varnamelen)
+    int		*cdfid;	
+    int		*varid;	
+    char	*varname;	
+    int		varnamelen;
+    int		*datatype;	
+    int		*ndims;	
+    int		*dimarray;	
+    int		*natts;	
+    int		*rcode;	
+{
+    char name[MAX_NC_NAME + 1];
+    int dimid[MAX_VAR_DIMS], i;
+
+    *rcode = 0;
+    if (ncvarinq (*cdfid, *varid - 1, name, (nc_type *) datatype, ndims, dimid,
+		  natts) == -1) {
+	*rcode = ncerr;
+	return;
+    }
+    for (i = 0; i < *ndims; i++)
+	dimarray[i] = dimid[i] + 1;
+    reverse (dimarray, *ndims);
+    if (strlen (name) > varnamelen) {
+	*rcode = NC_ESTS;
+	handle_err ("NCVINQ", *rcode);
+	return;
+    }
+    fcdcpy (varname, varnamelen, name);
+}
+
+/* puts a single numeric data value into a variable of an open netCDF */
+void
+ncvpt1_(cdfid, varid, indices, value, rcode)
+    int		*cdfid;	
+    int		*varid;	
+    int		*indices;	
+    void	*value;	
+    int		*rcode;	
+{
+    int datatype, ndims, natts, i;
+    long nindices[MAX_VAR_DIMS];
+    int dimid[MAX_VAR_DIMS];
+#ifdef HDF
+    NC *handle=NC_check_id(*cdfid);
+#endif /* HDF */
+
+    if (ncvarinq (*cdfid, *varid - 1, (char *) 0,
+		  (nc_type *) & datatype, &ndims, dimid, &natts) == -1) {
+	*rcode = ncerr;
+	return;
+    }
+    for (i = 0; i < ndims; i++)
+	nindices[i] = indices[i] - 1;
+    revlongs (nindices, ndims);
+    *rcode = 0;
+#ifdef FORTRAN_HAS_NO_BYTE
+    if ((nc_type) datatype == NC_BYTE) {	/* pack ints into bytes */
+	char           bytes = *(int *) value;
+	if (ncvarput1(*cdfid, *varid - 1, nindices,
+		      (ncvoid *) &bytes) == -1) {
+	    *rcode = ncerr;
+	}
+	return;
+    }				/* else */
+#endif				/* FORTRAN_HAS_NO_BYTE */
+#ifdef FORTRAN_HAS_NO_SHORT
+    if ((nc_type) datatype == NC_SHORT) {	/* pack ints into shorts */
+	short          shorts = *(int *)value;
+	if (ncvarput1(*cdfid, *varid - 1, nindices, (ncvoid *) &shorts) == -1) {
+	    *rcode = ncerr;
+	}
+	return;
+    }				/* else */
+#endif				/* FORTRAN_HAS_NO_SHORT */
+#if defined __alpha || (_MIPS_SZLONG == 64) || defined IA64 || (defined __sun && defined _LP64)
+#ifdef HDF
+    if ((nc_type) datatype == NC_LONG && handle->file_type!=HDF_FILE) {
+	long          longs = *(int *)value;
+	if (ncvarput1(*cdfid, *varid - 1, nindices, (ncvoid *) &longs) == -1) {
+	    *rcode = ncerr;
+	}
+	return;
+    }				/* else */
+#else /* HDF */
+    if ((nc_type) datatype == NC_LONG) {
+	long          longs = *(int *)value;
+	if (ncvarput1(*cdfid, *varid - 1, nindices, (ncvoid *) &longs) == -1) {
+	    *rcode = ncerr;
+	}
+	return;
+    }				/* else */
+#endif /* HDF */
+#endif
+    if (ncvarput1 (*cdfid, *varid - 1, nindices, value) == -1) {
+	*rcode = ncerr;
+    }
+}
+
+/* puts a single character into an open netCDF file */
+void
+ncvp1c_(cdfid, varid, indices, chval, rcode, chvallen)
+    int		*cdfid;	
+    int		*varid;	
+    int		*indices;	
+    char	*chval;	
+    int		chvallen;
+    int		*rcode;	
+{
+    int datatype, ndims, natts, i;
+    long nindices[MAX_VAR_DIMS];
+    int dimid[MAX_VAR_DIMS];
+
+    if (ncvarinq (*cdfid, *varid - 1, (char *) 0,
+		  (nc_type *) & datatype, &ndims, dimid, &natts) == -1) {
+	*rcode = ncerr;
+	return;
+    }
+    for (i = 0; i < ndims; i++)
+	nindices[i] = indices[i] - 1;
+    revlongs (nindices, ndims);
+    *rcode = 0;
+    if (ncvarput1 (*cdfid, *varid - 1, nindices, (ncvoid *) chval) == -1) {
+	*rcode = ncerr;
+    }
+}
+
+/*
+ * writes a hypercube of numeric values into a netCDF variable of an open
+ * netCDF file
+ */
+void
+ncvpt_(cdfid, varid, start, count, value, rcode)
+    int		*cdfid;	
+    int		*varid;	
+    int		*start;	
+    int		*count;	
+    void	*value;	
+    int		*rcode;	
+{
+    long ncount[MAX_VAR_DIMS], nstart[MAX_VAR_DIMS], i;
+    int ndims, datatype, dimarray[MAX_VAR_DIMS], natts;
+#ifdef HDF
+    NC *handle=NC_check_id(*cdfid);
+#endif /* HDF */
+
+    if (ncvarinq (*cdfid, *varid - 1, (char *) 0, (nc_type *) & datatype,
+		  &ndims, dimarray, &natts) == -1) {
+	*rcode = ncerr;
+	return;
+    }
+    for (i = 0; i < ndims; i++) {
+	ncount[i] = count[i];
+	nstart[i] = start[i] - 1;
+    }
+    revlongs (ncount, ndims);
+    revlongs (nstart, ndims);
+
+    *rcode = 0;
+#ifdef FORTRAN_HAS_NO_BYTE
+    if ((nc_type) datatype == NC_BYTE) {	/* pack ints into bytes */
+	char *bytes = itob (value, ncount, ndims);
+	if (bytes == NULL) {
+	    *rcode = NC_SYSERR;
+	    return;
+	    }
+	if (ncvarput (*cdfid, *varid - 1, nstart, ncount,
+	              (ncvoid *) bytes) == -1) {
+	    *rcode = ncerr;
+	}
+	free (bytes);
+	return;
+    }				/* else */
+#endif				/* FORTRAN_HAS_NO_BYTE */
+#ifdef FORTRAN_HAS_NO_SHORT
+    if ((nc_type) datatype == NC_SHORT) { /* pack ints into shorts */
+	short *shorts = itos (value, ncount, ndims);
+	if (shorts == NULL) {
+	    *rcode = NC_SYSERR;
+	    return;
+	    }
+	if (ncvarput (*cdfid, *varid - 1, nstart, ncount,
+		      (ncvoid *) shorts) == -1) {
+	    *rcode = ncerr;
+	}
+	free (shorts);
+	return;
+    }				/* else */
+#endif				/* FORTRAN_HAS_NO_SHORT */
+#if defined __alpha || (_MIPS_SZLONG == 64) || defined IA64 || (defined __sun && defined _LP64)
+#ifdef HDF
+    if ((nc_type) datatype == NC_LONG && handle->file_type!=HDF_FILE) {
+	long *longs = itol (value, ncount, ndims);
+	if (longs == NULL) {
+	    *rcode = NC_SYSERR;
+	    return;
+	    }
+	if (ncvarput (*cdfid, *varid - 1, nstart, ncount,
+	              (ncvoid *) longs) == -1) {
+	    *rcode = ncerr;
+	}
+	free (longs);
+	return;
+    }				/* else */
+#else /* HDF */
+    if ((nc_type) datatype == NC_LONG) {
+	long *longs = itol (value, ncount, ndims);
+	if (longs == NULL) {
+	    *rcode = NC_SYSERR;
+	    return;
+	    }
+	if (ncvarput (*cdfid, *varid - 1, nstart, ncount,
+	              (ncvoid *) longs) == -1) {
+	    *rcode = ncerr;
+	}
+	free (longs);
+	return;
+    }				/* else */
+#endif /* HDF */
+#endif
+    if (ncvarput (*cdfid, *varid - 1, nstart, ncount, value) == -1) {
+	*rcode = ncerr;
+    }
+}
+
+/* writes a hypercube of character values into an open netCDF file */
+void
+ncvptc_(cdfid, varid, start, count, string, lenstr, rcode, stringlen)
+    int		*cdfid;	
+    int		*varid;	
+    int		*start;	
+    int		*count;	
+    char	*string;	
+    int		stringlen;
+    int		*lenstr;	
+    int		*rcode;	
+{
+    long ncount[MAX_VAR_DIMS], nstart[MAX_VAR_DIMS], i;
+    int ndims, datatype, dimarray[MAX_VAR_DIMS], natts;
+
+    if (ncvarinq (*cdfid, *varid - 1, (char *) 0,
+		  (nc_type *) & datatype, &ndims, dimarray, &natts) == -1) {
+	*rcode = ncerr;
+	return;
+    }
+    for (i = 0; i < ndims; i++) {
+	ncount[i] = count[i];
+	nstart[i] = start[i] - 1;
+    }
+    revlongs (ncount, ndims);
+    revlongs (nstart, ndims);
+    if (dimprod(ncount,ndims) > *lenstr) {
+	*rcode = NC_ESTS;
+	handle_err ("NCVPTC", *rcode);
+	return;
+    }
+    *rcode = 0;
+    if (ncvarput (*cdfid, *varid - 1, nstart, ncount, (ncvoid *) string) == -1) {
+	*rcode = ncerr;
+    }
+}
+
+/*
+ * writes a generalized hypercube of numeric values into a netCDF variable of 
+ * an open netCDF file
+ */
+void
+ncvptg_(cdfid, varid, start, count, stride, basis, value, rcode)
+    int		*cdfid;	
+    int		*varid;	
+    int		*start;	
+    int		*count;	
+    int		*stride;	
+    int		*basis;	
+    void	*value;	
+    int		*rcode;	
+{
+    long ncount[MAX_VAR_DIMS], nstart[MAX_VAR_DIMS], i;
+    long nstride[MAX_VAR_DIMS], nbasis[MAX_VAR_DIMS];
+    long tmpbasis;
+    int ndims, datatype, dimarray[MAX_VAR_DIMS], natts;
+#ifdef HDF
+    NC *handle=NC_check_id(*cdfid);
+#endif /* HDF */
+
+    if (ncvarinq (*cdfid, *varid - 1, (char *) 0, (nc_type *) & datatype,
+		  &ndims, dimarray, &natts) == -1) {
+	*rcode = ncerr;
+	return;
+    }
+#ifdef FORTRAN_HAS_NO_BYTE
+    if (datatype == NC_CHAR || datatype == NC_BYTE)
+	tmpbasis	= nctypelen(NC_LONG);
+    else
+#endif
+#ifdef FORTRAN_HAS_NO_SHORT
+    if (datatype == NC_SHORT)
+	tmpbasis	= nctypelen(NC_LONG);
+    else
+#endif
+#if defined __alpha || (_MIPS_SZLONG == 64) || defined IA64 || (defined __sun && defined _LP64)
+    if (datatype == NC_LONG)
+	tmpbasis	= sizeof(int);
+    else
+#endif
+	tmpbasis	= nctypelen(datatype);
+    for (i = 0; i < ndims; i++) {
+	ncount[i] = count[i];
+	nstart[i] = start[i] - 1;
+	nstride[i] = stride[0] == 0 ? 1 : stride[i];
+	nbasis[i] = basis[0] == 0 ? tmpbasis : basis[i];
+	tmpbasis *= count[i];
+    }
+    revlongs (ncount, ndims);
+    revlongs (nstart, ndims);
+    revlongs (nstride, ndims);
+    revlongs (nbasis, ndims);
+
+    *rcode = 0;
+#ifdef FORTRAN_HAS_NO_BYTE
+    if ((nc_type) datatype == NC_BYTE) {	/* pack ints into bytes */
+	/*
+	 * Release 2.3.1 had a bug in the following line: it used count
+	 * rather than ncount.
+	 */
+	char *bytes = itobg (value, ncount, nbasis, ndims);
+	if (bytes == NULL) {
+	    *rcode = NC_SYSERR;
+	    return;
+	    }
+	if (ncvarputg (*cdfid, *varid - 1, nstart, ncount, nstride, 
+		       (long*)NULL, (ncvoid *) bytes) == -1) {
+	    *rcode = ncerr;
+	}
+	free (bytes);
+	return;
+    }				/* else */
+#endif				/* FORTRAN_HAS_NO_BYTE */
+#ifdef FORTRAN_HAS_NO_SHORT
+    if ((nc_type) datatype == NC_SHORT) { /* pack ints into shorts */
+	/*
+	 * Release 2.3.1 had a bug in the following line: it used count
+	 * rather than ncount.
+	 */
+	short *shorts = itosg (value, ncount, nbasis, ndims);
+	if (shorts == NULL) {
+	    *rcode = NC_SYSERR;
+	    return;
+	    }
+	if (ncvarputg (*cdfid, *varid - 1, nstart, ncount, nstride,
+		      (long*)NULL, (ncvoid *) shorts) == -1) {
+	    *rcode = ncerr;
+	}
+	free (shorts);
+	return;
+    }				/* else */
+#endif				/* FORTRAN_HAS_NO_SHORT */
+#if defined __alpha || (_MIPS_SZLONG == 64) || defined IA64 || (defined __sun && defined _LP64)
+#ifdef HDF
+    if ((nc_type) datatype == NC_LONG && handle->file_type!=HDF_FILE) {
+	long *longs = itolg (value, ncount, nbasis, ndims);
+	if (longs == NULL) {
+	    *rcode = NC_SYSERR;
+	    return;
+	    }
+	if (ncvarputg (*cdfid, *varid - 1, nstart, ncount, nstride,
+		      (long*)NULL, (ncvoid *) longs) == -1) {
+	    *rcode = ncerr;
+	}
+	free (longs);
+	return;
+    }				/* else */
+#else /* HDF */
+    if ((nc_type) datatype == NC_LONG) {
+	long *longs = itolg (value, ncount, nbasis, ndims);
+	if (longs == NULL) {
+	    *rcode = NC_SYSERR;
+	    return;
+	    }
+	if (ncvarputg (*cdfid, *varid - 1, nstart, ncount, nstride,
+		      (long*)NULL, (ncvoid *) longs) == -1) {
+	    *rcode = ncerr;
+	}
+	free (longs);
+	return;
+    }				/* else */
+#endif /* HDF */
+#endif
+    if (ncvarputg (*cdfid, *varid - 1, nstart, ncount, nstride, nbasis,
+		   value) == -1) {
+	*rcode = ncerr;
+    }
+}
+
+/*
+ * writes a generalized hypercube of character values into a netCDF variable of 
+ * an open netCDF file
+ */
+void
+ncvpgc_(cdfid, varid, start, count, stride, basis, string, rcode, stringlen)
+    int		*cdfid;	
+    int		*varid;	
+    int		*start;	
+    int		*count;	
+    int		*stride;	
+    int		*basis;	
+    char	*string;	
+    int		stringlen;
+    int		*rcode;	
+{
+    long ncount[MAX_VAR_DIMS], nstart[MAX_VAR_DIMS], i;
+    long nstride[MAX_VAR_DIMS], nbasis[MAX_VAR_DIMS];
+    long tmpbasis;
+    int ndims, datatype, dimarray[MAX_VAR_DIMS], natts;
+
+    if (ncvarinq (*cdfid, *varid - 1, (char *) 0, (nc_type *) & datatype,
+		  &ndims, dimarray, &natts) == -1) {
+	*rcode = ncerr;
+	return;
+    }
+    tmpbasis	= nctypelen(datatype);
+    for (i = 0; i < ndims; i++) {
+	ncount[i] = count[i];
+	nstart[i] = start[i] - 1;
+	nstride[i] = stride[0] == 0 ? 1 : stride[i];
+	nbasis[i] = basis[0] == 0 ? tmpbasis : basis[i];
+	tmpbasis *= count[i];
+    }
+    revlongs (ncount, ndims);
+    revlongs (nstart, ndims);
+    revlongs (nstride, ndims);
+    revlongs (nbasis, ndims);
+
+    *rcode = 0;
+    if (ncvarputg (*cdfid, *varid - 1, nstart, ncount, nstride, nbasis,
+		   (ncvoid*)string) == -1) {
+	*rcode = ncerr;
+    }
+}
+
+/* gets a single numeric value from a variable of an open netCDF file */
+void
+ncvgt1_(cdfid, varid, indices, value, rcode)
+    int		*cdfid;	
+    int		*varid;	
+    int		*indices;	
+    void	*value;	
+    int		*rcode;	
+{
+    long nindices[MAX_VAR_DIMS], i;
+    int datatype, ndims, dimarray[MAX_VAR_DIMS], natts;
+#ifdef HDF
+    NC *handle=NC_check_id(*cdfid);
+#endif /* HDF */
+
+    if (ncvarinq (*cdfid, *varid - 1, (char *) 0, (nc_type *) & datatype,
+		  &ndims, dimarray, &natts) == -1) {
+	*rcode = ncerr;
+	return;
+    }
+    for (i = 0; i < ndims; i++) {
+	nindices[i] = indices[i] - 1;
+    }
+    revlongs (nindices, ndims);
+    *rcode = 0;
+#ifdef FORTRAN_HAS_NO_BYTE
+    if ((nc_type) datatype == NC_BYTE) {
+	char           bytes;
+	int            *ip = (int *) value;
+	char           *bp = &bytes;
+
+	if (ncvarget1(*cdfid, *varid - 1, nindices, (ncvoid *) &bytes) == -1) {
+	    *rcode = ncerr;
+	    return;
+	}
+	*ip = *bp;
+	return;
+    }				/* else */
+#endif				/* FORTRAN_HAS_NO_BYTE */
+#ifdef FORTRAN_HAS_NO_SHORT
+    if ((nc_type) datatype == NC_SHORT) {
+	short          shorts;
+	int            *ip = (int *) value;
+	short          *sp = &shorts;
+
+	if (ncvarget1(*cdfid, *varid - 1, nindices, (ncvoid *) &shorts) == -1) {
+	    *rcode = ncerr;
+	    return;
+	}
+	*ip = *sp;
+	return;
+    }				/* else */
+#endif				/* FORTRAN_HAS_NO_SHORT */
+#if defined __alpha || (_MIPS_SZLONG == 64) || defined IA64 || (defined __sun && defined _LP64)
+#ifdef HDF
+    if ((nc_type) datatype == NC_LONG && handle->file_type!=HDF_FILE) {
+	long          longs;
+	int           *ip = (int *) value;
+
+	if (ncvarget1(*cdfid, *varid - 1, nindices, (ncvoid *) &longs) == -1) {
+	    *rcode = ncerr;
+	    return;
+	}
+	*ip = longs;
+	return;
+    }				/* else */
+#else /* HDF */
+    if ((nc_type) datatype == NC_LONG) {
+	long          longs;
+	int           *ip = (int *) value;
+
+	if (ncvarget1(*cdfid, *varid - 1, nindices, (ncvoid *) &longs) == -1) {
+	    *rcode = ncerr;
+	    return;
+	}
+	*ip = longs;
+	return;
+    }				/* else */
+#endif /* HDF */
+#endif
+    if (ncvarget1 (*cdfid, *varid - 1, nindices, value) == -1) {
+	*rcode = ncerr;
+    }
+}
+
+/*
+ * gets a single character data value from a variable of an open
+ * netCDF file
+ */
+void
+ncvg1c_(cdfid, varid, indices, chval, rcode, chvallen)
+    int		*cdfid;	
+    int		*varid;	
+    int		*indices;	
+    char	*chval;	
+    int		chvallen;
+    int		*rcode;	
+{
+    long nindices[MAX_VAR_DIMS];
+    int i, datatype, ndims, dimarray[MAX_VAR_DIMS], natts;
+
+    if (ncvarinq (*cdfid, *varid - 1, (char *) 0,
+		  (nc_type *) & datatype, &ndims, dimarray, &natts) == -1) {
+	*rcode = ncerr;
+	return;
+    }
+
+    for (i = 0; i < ndims; i++) {
+	nindices[i] = indices[i] - 1;
+    }
+    revlongs (nindices, ndims);
+    *rcode = 0;
+    if (ncvarget1 (*cdfid, *varid - 1, nindices, (ncvoid *) chval) == -1) {
+	*rcode = ncerr;
+    }
+}
+
+/*
+ * reads a hypercube of numeric values from a netCDF variable of an open
+ * netCDF file
+ */
+void
+ncvgt_(cdfid, varid, start, count, value, rcode)
+    int		*cdfid;	
+    int		*varid;	
+    int		*start;	
+    int		*count;	
+    void	*value;	
+    int		*rcode;	
+{
+    long ncount[MAX_VAR_DIMS], nstart[MAX_VAR_DIMS];
+    int i, ndims, datatype, dimarray[MAX_VAR_DIMS], natts;
+#ifdef HDF
+    NC *handle=NC_check_id(*cdfid);
+#endif /* HDF */
+
+    if (ncvarinq (*cdfid, *varid - 1, (char *) 0, (nc_type *) & datatype,
+		  &ndims, dimarray, &natts) == -1) {
+	*rcode = ncerr;
+	return;
+    }
+    for (i = 0; i < ndims; i++) {
+	ncount[i] = count[i];
+	nstart[i] = start[i] - 1;
+    }
+    revlongs (ncount, ndims);
+    revlongs (nstart, ndims);
+
+    *rcode = 0;
+#ifdef FORTRAN_HAS_NO_BYTE
+    if ((nc_type) datatype == NC_BYTE) {
+	long iocount = dimprod (ncount, ndims);	/* product of dimensions */
+	char *bytes = (char *) malloc (iocount * sizeof (char));
+	int *ip;
+	char *bp = bytes;
+
+	if (bytes == NULL) {
+	    *rcode = NC_SYSERR;
+	    return;
+	}
+	if (ncvarget (*cdfid, *varid - 1, nstart, ncount,
+		      (ncvoid *) bytes) == -1) {
+	    *rcode = ncerr;
+	    free (bytes);
+	    return;
+	}
+	for (ip = (int *) value; iocount > 0; iocount--)
+	  *ip++ = *bp++;
+	free (bytes);
+	return;
+    }				/* else */
+#endif				/* FORTRAN_HAS_NO_BYTE */
+#ifdef FORTRAN_HAS_NO_SHORT
+    if ((nc_type) datatype == NC_SHORT) {
+	long iocount = dimprod (ncount, ndims);	/* product of dimensions */
+	short *shorts = (short *) malloc (iocount * sizeof (short));
+	int *ip;
+	short *sp = shorts;
+
+	if (shorts == NULL) {
+	    *rcode = NC_SYSERR;
+	    return;
+	}
+	if (ncvarget (*cdfid, *varid - 1, nstart, ncount,
+		      (ncvoid *) shorts) == -1) {
+	    *rcode = ncerr;
+	    free (shorts);
+	    return;
+	}
+	for (ip = (int *) value; iocount > 0; iocount--)
+	    *ip++ = *sp++;
+	free (shorts);
+	return;
+    }				/* else */
+#endif				/* FORTRAN_HAS_NO_SHORT */
+#if defined __alpha || (_MIPS_SZLONG == 64) || defined IA64 || (defined __sun && defined _LP64)
+#ifdef HDF
+    if ((nc_type) datatype == NC_LONG && handle->file_type!=HDF_FILE) {
+	long iocount = dimprod (ncount, ndims);	/* product of dimensions */
+	long *longs = (long *) malloc (iocount * sizeof (long));
+	int *ip;
+	long *lp = longs;
+
+	if (longs == NULL) {
+	    *rcode = NC_SYSERR;
+	    return;
+	}
+	if (ncvarget (*cdfid, *varid - 1, nstart, ncount,
+		      (ncvoid *) longs) == -1) {
+	    *rcode = ncerr;
+	    free (longs);
+	    return;
+	}
+	for (ip = (int *) value; iocount > 0; iocount--)
+	    *ip++ = *lp++;
+	free (longs);
+	return;
+    }				/* else */
+#else /* HDF */
+    if ((nc_type) datatype == NC_LONG) {
+	long iocount = dimprod (ncount, ndims);	/* product of dimensions */
+	long *longs = (long *) malloc (iocount * sizeof (long));
+	int *ip;
+	long *lp = longs;
+
+	if (longs == NULL) {
+	    *rcode = NC_SYSERR;
+	    return;
+	}
+	if (ncvarget (*cdfid, *varid - 1, nstart, ncount,
+		      (ncvoid *) longs) == -1) {
+	    *rcode = ncerr;
+	    free (longs);
+	    return;
+	}
+	for (ip = (int *) value; iocount > 0; iocount--)
+	    *ip++ = *lp++;
+	free (longs);
+	return;
+    }				/* else */
+#endif /* HDF */
+#endif
+    if (ncvarget (*cdfid, *varid - 1, nstart, ncount, value) == -1) {
+	*rcode = ncerr;
+    }
+}
+
+/* reads a hypercube of character values from a netCDF variable */
+void
+ncvgtc_(cdfid, varid, start, count, string, lenstr, rcode, stringlen)
+    int		*cdfid;	
+    int		*varid;	
+    int		*start;	
+    int		*count;	
+    char	*string;	
+    int		stringlen;
+    int		*lenstr;	
+    int		*rcode;	
+{
+    long ncount[MAX_VAR_DIMS], nstart[MAX_VAR_DIMS];
+    int i, ndims, datatype, dimarray[MAX_VAR_DIMS], natts;
+    int prod = 1;
+
+    if (ncvarinq (*cdfid, *varid - 1, (char *) 0,
+		  (nc_type *) & datatype, &ndims, dimarray, &natts) == -1) {
+	*rcode = ncerr;
+	return;
+    }
+    for (i = 0; i < ndims; i++) {
+	ncount[i] = count[i];
+	nstart[i] = start[i] - 1;
+	prod *= count[i];
+    }
+    if (prod > *lenstr) {
+	*rcode = NC_ESTS;
+	handle_err ("NCVGTC", *rcode);
+	return;
+    }
+    revlongs (ncount, ndims);
+    revlongs (nstart, ndims);
+    *rcode = 0;
+    if (ncvarget (*cdfid, *varid - 1, nstart, ncount, (ncvoid *) string) == -1) {
+	*rcode = ncerr;
+	return;
+    }
+
+    for (i = prod; i < *lenstr; i++)
+	string[i] = ' ';
+}
+
+/*
+ * reads a generalized hypercube of numeric values from a netCDF variable of an 
+ * open netCDF file
+ */
+void
+ncvgtg_(cdfid, varid, start, count, stride, basis, value, rcode)
+    int		*cdfid;	
+    int		*varid;	
+    int		*start;	
+    int		*count;	
+    int		*stride;	
+    int		*basis;	
+    void	*value;	
+    int		*rcode;	
+{
+    long ncount[MAX_VAR_DIMS], nstart[MAX_VAR_DIMS];
+    long nstride[MAX_VAR_DIMS], nbasis[MAX_VAR_DIMS];
+    long tmpbasis;
+    int i, ndims, datatype, dimarray[MAX_VAR_DIMS], natts;
+#ifdef HDF
+    NC *handle=NC_check_id(*cdfid);
+#endif /* HDF */
+
+    if (ncvarinq (*cdfid, *varid - 1, (char *) 0, (nc_type *) & datatype,
+		  &ndims, dimarray, &natts) == -1) {
+	*rcode = ncerr;
+	return;
+    }
+#ifdef FORTRAN_HAS_NO_BYTE
+    if (datatype == NC_CHAR || datatype == NC_BYTE)
+	tmpbasis	= nctypelen(NC_LONG);
+    else
+#endif
+#ifdef FORTRAN_HAS_NO_SHORT
+    if (datatype == NC_SHORT)
+	tmpbasis	= nctypelen(NC_LONG);
+    else
+#endif
+#if defined __alpha || (_MIPS_SZLONG == 64) || defined IA64 || (defined __sun && defined _LP64)
+    if (datatype == NC_LONG)
+	tmpbasis	= sizeof(int);
+    else
+#endif
+	tmpbasis	= nctypelen(datatype);
+    for (i = 0; i < ndims; i++) {
+	ncount[i] = count[i];
+	nstart[i] = start[i] - 1;
+	nstride[i] = stride[0] == 0 ? 1 : stride[i];
+	nbasis[i] = basis[0] == 0 ? tmpbasis : basis[i];
+	tmpbasis *= count[i];
+    }
+    revlongs (ncount, ndims);
+    revlongs (nstart, ndims);
+    revlongs (nstride, ndims);
+    revlongs (nbasis, ndims);
+
+    *rcode = 0;
+#ifdef FORTRAN_HAS_NO_BYTE
+    if ((nc_type) datatype == NC_BYTE) {
+	long iocount = dimprod (ncount, ndims);	/* product of dimensions */
+	char *bytes = (char *) malloc (iocount * sizeof (char));
+	int *ip;
+	char *bp = bytes;
+
+	if (bytes == NULL) {
+	    *rcode = NC_SYSERR;
+	    return;
+	}
+	if (ncvargetg (*cdfid, *varid - 1, nstart, ncount, nstride,
+		      (long*)NULL, (ncvoid *) bytes) == -1) {
+	    *rcode = ncerr;
+	    free (bytes);
+	    return;
+	}
+	/*
+	 * Release 2.3.1 had a bug in the following line: it used basis
+	 * rather than nbasis.
+	 */
+	btoig(bytes, (int*)value, ncount, nbasis, ndims);
+	free (bytes);
+	return;
+    }				/* else */
+#endif				/* FORTRAN_HAS_NO_BYTE */
+#ifdef FORTRAN_HAS_NO_SHORT
+    if ((nc_type) datatype == NC_SHORT) {
+	long iocount = dimprod (ncount, ndims);	/* product of dimensions */
+	short *shorts = (short *) malloc (iocount * sizeof (short));
+	int *ip;
+	short *sp = shorts;
+
+	if (shorts == NULL) {
+	    *rcode = NC_SYSERR;
+	    return;
+	}
+	if (ncvargetg (*cdfid, *varid - 1, nstart, ncount, nstride, 
+		       (long*)NULL, (ncvoid *) shorts) == -1) {
+	    *rcode = ncerr;
+	    free (shorts);
+	    return;
+	}
+	/*
+	 * Release 2.3.1 had a bug in the following line: it used basis
+	 * rather than nbasis.
+	 */
+	stoig(shorts, (int*)value, ncount, nbasis, ndims);
+	free (shorts);
+	return;
+    }				/* else */
+#endif				/* FORTRAN_HAS_NO_SHORT */
+#if defined __alpha || (_MIPS_SZLONG == 64) || defined IA64 || (defined __sun && defined _LP64)
+#ifdef HDF
+    if ((nc_type) datatype == NC_LONG && handle->file_type!=HDF_FILE) {
+	long iocount = dimprod (ncount, ndims);	/* product of dimensions */
+	long *longs = (long *) malloc (iocount * sizeof (long));
+
+	if (longs == NULL) {
+	    *rcode = NC_SYSERR;
+	    return;
+	}
+	if (ncvargetg (*cdfid, *varid - 1, nstart, ncount, nstride, 
+		       (long*)NULL, (ncvoid *) longs) == -1) {
+	    *rcode = ncerr;
+	    free (longs);
+	    return;
+	}
+	ltoig(longs, (int*)value, ncount, nbasis, ndims);
+	free (longs);
+	return;
+    }				/* else */
+#else /* HDF */
+    if ((nc_type) datatype == NC_LONG) {
+	long iocount = dimprod (ncount, ndims);	/* product of dimensions */
+	long *longs = (long *) malloc (iocount * sizeof (long));
+
+	if (longs == NULL) {
+	    *rcode = NC_SYSERR;
+	    return;
+	}
+	if (ncvargetg (*cdfid, *varid - 1, nstart, ncount, nstride, 
+		       (long*)NULL, (ncvoid *) longs) == -1) {
+	    *rcode = ncerr;
+	    free (longs);
+	    return;
+	}
+	ltoig(longs, (int*)value, ncount, nbasis, ndims);
+	free (longs);
+	return;
+    }				/* else */
+#endif /* HDF */
+#endif
+    if (ncvargetg (*cdfid, *varid - 1, nstart, ncount, nstride,
+		   nbasis, value) == -1) {
+	*rcode = ncerr;
+    }
+}
+
+/*
+ * reads a generalized hypercube of character values from a netCDF variable 
+ * of an open netCDF file
+ */
+void
+ncvggc_(cdfid, varid, start, count, stride, basis, string, rcode, stringlen)
+    int		*cdfid;	
+    int		*varid;	
+    int		*start;	
+    int		*count;	
+    int		*stride;	
+    int		*basis;	
+    char	*string;	
+    int		stringlen;
+    int		*rcode;	
+{
+    long ncount[MAX_VAR_DIMS], nstart[MAX_VAR_DIMS];
+    long nstride[MAX_VAR_DIMS], nbasis[MAX_VAR_DIMS];
+    long tmpbasis;
+    int i, ndims, datatype, dimarray[MAX_VAR_DIMS], natts;
+
+    if (ncvarinq (*cdfid, *varid - 1, (char *) 0, (nc_type *) & datatype,
+		  &ndims, dimarray, &natts) == -1) {
+	*rcode = ncerr;
+	return;
+    }
+    tmpbasis	= nctypelen(datatype);
+    for (i = 0; i < ndims; i++) {
+	ncount[i] = count[i];
+	nstart[i] = start[i] - 1;
+	nstride[i] = stride[0] == 0 ? 1 : stride[i];
+	nbasis[i] = basis[0] == 0 ? tmpbasis : basis[i];
+	tmpbasis *= count[i];
+    }
+    revlongs (ncount, ndims);
+    revlongs (nstart, ndims);
+    revlongs (nstride, ndims);
+    revlongs (nbasis, ndims);
+
+    *rcode = 0;
+    if (ncvargetg (*cdfid, *varid - 1, nstart, ncount, nstride,
+		   nbasis, (ncvoid*)string) == -1) {
+	*rcode = ncerr;
+    }
+}
+
+/* changes the name of a netCDF variable in an open netCDF file */
+void
+ncvren_(cdfid, varid, varname, rcode, varnamelen)
+    int		*cdfid;	
+    int		*varid;	
+    char	*varname;	
+    int		varnamelen;
+    int		*rcode;	
+{
+    char name[MAX_NC_NAME + 1];
+
+    nstrncpy (name, varname, varnamelen);
+    *rcode = 0;
+    if (ncvarrename (*cdfid, *varid - 1, name) == -1) {
+	*rcode = ncerr;
+    }
+}
+
+/*
+ * adds or changes a numeric variable or global attribute of an open
+ * netCDF file
+ */
+void
+ncapt_(cdfid, varid, attname, datatype, attlen, value, rcode, attnamelen)
+    int		*cdfid;	
+    int		*varid;	
+    char	*attname;	
+    int		attnamelen;
+    int		*datatype;	
+    int		*attlen;	
+    void	*value;	
+    int		*rcode;	
+{
+    char name[MAX_NC_NAME + 1];
+#ifdef HDF
+    NC *handle=NC_check_id(*cdfid);
+#endif /* HDF */
+
+    nstrncpy (name, attname, attnamelen);
+
+    *rcode = 0;
+#ifdef FORTRAN_HAS_NO_BYTE
+    if ((nc_type) *datatype == NC_BYTE) {	/* pack ints into bytes */
+	char *bytes = itob (value, attlen, 1);
+
+	if (bytes == NULL) {
+	    *rcode = NC_SYSERR;
+	    return;
+	}
+	if (ncattput (*cdfid, *varid - 1, name, (nc_type) *datatype, *attlen,
+		      (ncvoid *) bytes) == -1) {
+	    *rcode = ncerr;
+	}
+	free (bytes);
+	return;
+    }				/* else */
+#endif				/* FORTRAN_HAS_NO_BYTE */
+#ifdef FORTRAN_HAS_NO_SHORT
+    if ((nc_type) *datatype == NC_SHORT) {	/* pack ints into shorts */
+	short *shorts = itos (value, attlen, 1);
+
+	if (shorts == NULL) {
+	    *rcode = NC_SYSERR;
+	    return;
+	}
+	if (ncattput (*cdfid, *varid - 1, name, (nc_type) *datatype, *attlen,
+		      (ncvoid *) shorts) == -1) {
+	    *rcode = ncerr;
+	}
+	free (shorts);
+	return;
+    }				/* else */
+#endif				/* FORTRAN_HAS_NO_SHORT */
+#if defined __alpha || (_MIPS_SZLONG == 64) || defined IA64 || (defined __sun && defined _LP64)
+#ifdef HDF
+    if ((nc_type) *datatype == NC_LONG && handle->file_type!=HDF_FILE) {
+	long *longs = itol (value, attlen, 1);
+
+	if (longs == NULL) {
+	    *rcode = NC_SYSERR;
+	    return;
+	}
+	if (ncattput (*cdfid, *varid - 1, name, (nc_type) *datatype, *attlen,
+		      (ncvoid *) longs) == -1) {
+	    *rcode = ncerr;
+	}
+	free (longs);
+	return;
+    }				/* else */
+#else /* HDF */
+    if ((nc_type) *datatype == NC_LONG) {
+	long *longs = itol (value, attlen, 1);
+
+	if (longs == NULL) {
+	    *rcode = NC_SYSERR;
+	    return;
+	}
+	if (ncattput (*cdfid, *varid - 1, name, (nc_type) *datatype, *attlen,
+		      (ncvoid *) longs) == -1) {
+	    *rcode = ncerr;
+	}
+	free (longs);
+	return;
+    }				/* else */
+#endif /* HDF */
+#endif
+    if (ncattput (*cdfid, *varid - 1, name, (nc_type) *datatype, *attlen,
+		  value) == -1) {
+	*rcode = ncerr;
+    }
+}
+
+/*
+ * adds or changes a character variable or global attribute
+ * of an open netCDF file
+ */
+void
+ncaptc_(cdfid, varid, attname, datatype, lenstr, string, rcode, attnamelen, stringlen)
+    int		*cdfid;	
+    int		*varid;	
+    char	*attname;	
+    int		attnamelen;
+    int		*datatype;	
+    int		*lenstr;	
+    char	*string;	
+    int		stringlen;
+    int		*rcode;	
+{
+    char name[MAX_NC_NAME + 1];
+    char *value;
+
+    nstrncpy (name, attname, attnamelen);
+    if (((value = malloc ((unsigned) *lenstr + 1)) == NULL) || (*lenstr == 0)) {
+	*rcode = NC_ESTS;
+	handle_err ("NCAPTC", *rcode);
+	return;
+    }
+    (void) fstrncpy (value, string, *lenstr);
+    *rcode = 0;
+    if (ncattput (*cdfid, *varid - 1, name, (nc_type) *datatype, *lenstr,
+		  (ncvoid *) value) == -1) {
+	*rcode = ncerr;
+    }
+    free (value);
+}
+
+/*
+ * returns information about a netCDF attribute given its variable
+ * ID and name
+ */
+void
+ncainq_(cdfid, varid, attname, datatype, attlen, rcode, attnamelen)
+    int		*cdfid;	
+    int		*varid;	
+    char	*attname;	
+    int		attnamelen;
+    int		*datatype;	
+    int		*attlen;	
+    int		*rcode;	
+{
+    char name[MAX_NC_NAME + 1];
+
+    nstrncpy (name, attname, attnamelen);
+    *rcode = 0;
+    if (ncattinq (*cdfid, *varid - 1, name, (nc_type *) datatype, attlen) == -1) {
+	*rcode = ncerr;
+    }
+}
+
+/*
+ * gets the value of a netCDF attribute given its variable ID
+ * and name
+ */
+void
+ncagt_(cdfid, varid, attname, value, rcode, attnamelen)
+    int		*cdfid;	
+    int		*varid;	
+    char	*attname;	
+    int		attnamelen;
+    void	*value;	
+    int		*rcode;	
+{
+    char name[MAX_NC_NAME + 1];
+    int datatype;
+    int attlen;
+#ifdef HDF
+    NC *handle=NC_check_id(*cdfid);
+#endif /* HDF */
+
+    nstrncpy (name, attname, attnamelen);
+    *rcode = 0;
+    if (ncattinq (*cdfid, *varid - 1, name, (nc_type *) &datatype, &attlen)
+	    == -1) {
+	*rcode = ncerr;
+	return;
+    }
+#ifdef FORTRAN_HAS_NO_BYTE
+    if ((nc_type) datatype == NC_BYTE) {
+	char *bytes = (char *) malloc (attlen);
+	int *ip;
+	char *bp = bytes;
+
+	if (bytes == NULL) {
+	    *rcode = NC_SYSERR;
+	    return;
+	}
+	if (ncattget (*cdfid, *varid - 1, name, (ncvoid *) bytes) == -1) {
+	    *rcode = ncerr;
+	    free (bytes);
+	    return;
+	}
+	for (ip = (int *) value; attlen > 0; attlen--)
+	    *ip++ = *bp++;
+	free (bytes);
+	return;
+    }				/* else */
+#endif				/* FORTRAN_HAS_NO_BYTE */
+#ifdef FORTRAN_HAS_NO_SHORT
+    if ((nc_type) datatype == NC_SHORT) {
+	short *shorts = (short *) malloc (attlen * sizeof (short));
+	int *ip;
+	short *sp = shorts;
+
+	if (shorts == NULL) {
+	    *rcode = NC_SYSERR;
+	    return;
+	}
+	if (ncattget (*cdfid, *varid - 1, name, (ncvoid *) shorts) == -1) {
+	    *rcode = ncerr;
+	    free (shorts);
+	    return;
+	}
+	for (ip = (int *) value; attlen > 0; attlen--)
+	    *ip++ = *sp++;
+	free (shorts);
+	return;
+    }				/* else */
+#endif				/* FORTRAN_HAS_NO_SHORT */
+#if defined __alpha || (_MIPS_SZLONG == 64) || defined IA64 || (defined __sun && defined _LP64)
+#ifdef HDF
+    if ((nc_type) datatype == NC_LONG && handle->file_type!=HDF_FILE) {
+	long *longs = (long *) malloc (attlen * sizeof (long));
+	int *ip;
+	long *lp = longs;
+
+	if (longs == NULL) {
+	    *rcode = NC_SYSERR;
+	    return;
+	}
+	if (ncattget (*cdfid, *varid - 1, name, (ncvoid *) longs) == -1) {
+	    *rcode = ncerr;
+	    free (longs);
+	    return;
+	}
+	for (ip = (int *) value; attlen > 0; attlen--)
+	    *ip++ = *lp++;
+	free (longs);
+	return;
+    }				/* else */
+#else /* HDF */
+    if ((nc_type) datatype == NC_LONG) {
+	long *longs = (long *) malloc (attlen * sizeof (long));
+	int *ip;
+	long *lp = longs;
+
+	if (longs == NULL) {
+	    *rcode = NC_SYSERR;
+	    return;
+	}
+	if (ncattget (*cdfid, *varid - 1, name, (ncvoid *) longs) == -1) {
+	    *rcode = ncerr;
+	    free (longs);
+	    return;
+	}
+	for (ip = (int *) value; attlen > 0; attlen--)
+	    *ip++ = *lp++;
+	free (longs);
+	return;
+    }				/* else */
+#endif /* HDF */
+#endif
+    if (ncattget (*cdfid, *varid - 1, name, value) == -1) {
+	*rcode = ncerr;
+    }
+}
+
+/*
+ * gets the value of a netCDF character attribute given its variable
+ * ID and name
+ */
+void
+ncagtc_(cdfid, varid, attname, string, lenstr, rcode, attnamelen, stringlen)
+    int		*cdfid;	
+    int		*varid;	
+    char	*attname;	
+    int		attnamelen;
+    char	*string;	
+    int		stringlen;
+    int		*lenstr;	
+    int		*rcode;	
+{
+    char name[MAX_NC_NAME + 1];
+    int datatype;
+    int attlen;
+    int i;
+
+    nstrncpy (name, attname, attnamelen);
+    *rcode = 0;
+    if (ncattinq (*cdfid, *varid - 1, name, (nc_type *) &datatype, &attlen) == -1) {
+	*rcode = ncerr;
+	return;
+    }
+    if (attlen > *lenstr) {
+	*rcode = NC_ESTS;
+	handle_err ("NCAGTC", *rcode);
+	return;
+    }
+    if (ncattget (*cdfid, *varid - 1, name, (ncvoid *) string) == -1) {
+	*rcode = ncerr;
+	return;
+    }
+
+    for (i = attlen; i < *lenstr; i++)
+	string[i] = ' ';
+}
+
+/* copies an attribute from one open netCDF file to another */
+void
+ncacpy_(incdfid, invarid, attname, outcdfid, outvarid, rcode, attnamelen)
+    int		*incdfid;	
+    int		*invarid;	
+    char	*attname;	
+    int		attnamelen;
+    int		*outcdfid;	
+    int		*outvarid;	
+    int		*rcode;	
+{
+    char name[MAX_NC_NAME + 1];
+
+    nstrncpy (name, attname, attnamelen);
+    *rcode = 0;
+    if (ncattcopy (*incdfid, *invarid - 1, name,
+		   *outcdfid, *outvarid - 1) == -1) {
+	*rcode = ncerr;
+    }
+}
+
+/*
+ * gets the name of an attribute given its variable ID and number
+ * as an attribute of that variable
+ */
+void
+ncanam_(cdfid, varid, attnum, attname, rcode, attnamelen)
+    int		*cdfid;	
+    int		*varid;	
+    int		*attnum;	
+    char	*attname;	
+    int		attnamelen;
+    int		*rcode;	
+{
+    char name[MAX_NC_NAME + 1];
+
+    *rcode = 0;
+    if (ncattname (*cdfid, *varid - 1, *attnum - 1, name) == -1) {
+	*rcode = ncerr;
+	return;
+    }
+    if (strlen (name) > attnamelen) {
+	*rcode = NC_ESTS;
+	handle_err ("NCANAM", *rcode);
+	return;
+    }
+    fcdcpy (attname, attnamelen, name);
+}
+
+
+/* renames an attribute in an open netCDF file */
+void
+ncaren_(cdfid, varid, attname, newname, rcode, attnamelen, newnamelen)
+    int		*cdfid;	
+    int		*varid;	
+    char	*attname;	
+    int		attnamelen;
+    char	*newname;	
+    int		newnamelen;
+    int		*rcode;	
+{
+    char name[MAX_NC_NAME + 1], nname[MAX_NC_NAME + 1];
+
+    nstrncpy (name, attname, attnamelen);
+    nstrncpy (nname, newname, newnamelen);
+    *rcode = 0;
+    if (ncattrename (*cdfid, *varid - 1, name, nname) == -1) {
+	*rcode = ncerr;
+    }
+}
+
+/*
+ * deletes an attribute from an open netCDF file given the attribute
+ * name
+ */
+void
+ncadel_(cdfid, varid, attname, rcode, attnamelen)
+    int		*cdfid;	
+    int		*varid;	
+    char	*attname;	
+    int		attnamelen;
+    int		*rcode;	
+{
+    char name[MAX_NC_NAME + 1];
+
+    nstrncpy (name, attname, attnamelen);
+    *rcode = 0;
+    if (ncattdel (*cdfid, *varid - 1, name) == -1) {
+	*rcode = ncerr;
+    }
+}
+
+
+/*
+ * sets the fill mode of a netCDF file open for writing
+ */
+int
+ncsfil_(cdfid, fillmode, rcode)
+    int		*cdfid;	
+    int		*fillmode;	
+    int		*rcode;	
+{
+    int retval;
+
+    if ((retval = ncsetfill (*cdfid, *fillmode)) != -1) {
+	*rcode = 0;
+	return retval;
+    }
+    *rcode = ncerr;
+    return (-1);
+}
+

Modified: packages/libhdf4/branches/upstream/current/mfhdf/fortran/config/jackets-solarisx86.c
===================================================================
--- packages/libhdf4/branches/upstream/current/mfhdf/fortran/config/jackets-solarisx86.c	2007-05-15 09:05:29 UTC (rev 830)
+++ packages/libhdf4/branches/upstream/current/mfhdf/fortran/config/jackets-solarisx86.c	2007-05-15 09:53:05 UTC (rev 831)
@@ -2,7 +2,7 @@
  *	Copyright 1990, University Corporation for Atmospheric Research
  *      See netcdf/COPYRIGHT file for copying and redistribution conditions.
  */
-/* $Id: jackets-solarisx86.c,v 1.3 1997/11/05 22:20:31 koziol Exp $ */
+/* $Id: jackets-solarisx86.c,v 1.5 2005/02/09 03:04:18 epourmal Exp $ */
 /*
  * OVERVIEW
  *
@@ -34,7 +34,7 @@
 
 struct ncfils {			/* This will be a common block from Fortran */
     double dd;
-#ifdef __alpha
+#if defined __alpha || (_MIPS_SZLONG == 64) || defined IA64 || (defined __sun && defined _LP64)
     int ll;
 #else
     long ll;
@@ -65,7 +65,7 @@
 
 struct ncfils {			/* This will be a common block from Fortran */
     double dd;
-#ifdef __alpha
+#if defined __alpha || (_MIPS_SZLONG == 64) || defined IA64 || (defined __sun && defined _LP64)
     int ll;
 #else
     long ll;
@@ -163,7 +163,7 @@
 	*target++ = *source++;
     *target = '\0';
 }
-
+#ifdef WE_COULDNT_READ_NAMES_WITH_SPACES
 /* copy function used to copy strings terminated with blanks */
 static void
 nstrncpy (target, source, maxlen)
@@ -175,8 +175,27 @@
 	*target++ = *source++;
     *target = '\0';
 }
+#endif
 
+/* copy function used to copy strings with embeded blanks and
+   terminated with blanks */
+static void
+nstrncpy (target, source, maxlen)
+    char *target;		/* space to be copied into */
+    char *source;		/* string to be copied */
+    int maxlen;			/* maximum length of *source */
+{
+/* Copy all string */
+    while (maxlen--) 
+        *target++ = *source++;
+    *target -- = '\0';
+/* Disregard all trailing spaces  */
+     while (*target == ' ')
+         *target-- = '\0';
 
+}
+
+
 /*
  * Compute product of dimensions.
  */
@@ -412,7 +431,7 @@
 }
 #endif /* FORTRAN_HAS_NO_SHORT */
 
-#ifdef __alpha
+#if defined __alpha || (_MIPS_SZLONG == 64) || defined IA64 || (defined __sun && defined _LP64)
 /*
  * Convert multi-dimensional array of NCLONGs stored in ints to packed
  * array of longs, in malloc'ed space.  Returns pointer to longs or NULL
@@ -899,7 +918,7 @@
 	return;
     }				/* else */
 #endif				/* FORTRAN_HAS_NO_SHORT */
-#ifdef __alpha
+#if defined __alpha || (_MIPS_SZLONG == 64) || defined IA64 || (defined __sun && defined _LP64)
 #ifdef HDF
     if ((nc_type) datatype == NC_LONG && handle->file_type!=HDF_FILE) {
 	long          longs = *(int *)value;
@@ -1013,7 +1032,7 @@
 	return;
     }				/* else */
 #endif				/* FORTRAN_HAS_NO_SHORT */
-#ifdef __alpha
+#if defined __alpha || (_MIPS_SZLONG == 64) || defined IA64 || (defined __sun && defined _LP64)
 #ifdef HDF
     if ((nc_type) datatype == NC_LONG && handle->file_type!=HDF_FILE) {
 	long *longs = itol (value, ncount, ndims);
@@ -1124,7 +1143,7 @@
 	tmpbasis	= nctypelen(NC_LONG);
     else
 #endif
-#ifdef __alpha
+#if defined __alpha || (_MIPS_SZLONG == 64) || defined IA64 || (defined __sun && defined _LP64)
     if (datatype == NC_LONG)
 	tmpbasis	= sizeof(int);
     else
@@ -1181,7 +1200,7 @@
 	return;
     }				/* else */
 #endif				/* FORTRAN_HAS_NO_SHORT */
-#ifdef __alpha
+#if defined __alpha || (_MIPS_SZLONG == 64) || defined IA64 || (defined __sun && defined _LP64)
 #ifdef HDF
     if ((nc_type) datatype == NC_LONG && handle->file_type!=HDF_FILE) {
 	long *longs = itolg (value, ncount, nbasis, ndims);
@@ -1317,7 +1336,7 @@
 	return;
     }				/* else */
 #endif				/* FORTRAN_HAS_NO_SHORT */
-#ifdef __alpha
+#if defined __alpha || (_MIPS_SZLONG == 64) || defined IA64 || (defined __sun && defined _LP64)
 #ifdef HDF
     if ((nc_type) datatype == NC_LONG && handle->file_type!=HDF_FILE) {
 	long          longs;
@@ -1459,7 +1478,7 @@
 	return;
     }				/* else */
 #endif				/* FORTRAN_HAS_NO_SHORT */
-#ifdef __alpha
+#if defined __alpha || (_MIPS_SZLONG == 64) || defined IA64 || (defined __sun && defined _LP64)
 #ifdef HDF
     if ((nc_type) datatype == NC_LONG && handle->file_type!=HDF_FILE) {
 	long iocount = dimprod (ncount, ndims);	/* product of dimensions */
@@ -1592,7 +1611,7 @@
 	tmpbasis	= nctypelen(NC_LONG);
     else
 #endif
-#ifdef __alpha
+#if defined __alpha || (_MIPS_SZLONG == 64) || defined IA64 || (defined __sun && defined _LP64)
     if (datatype == NC_LONG)
 	tmpbasis	= sizeof(int);
     else
@@ -1663,7 +1682,7 @@
 	return;
     }				/* else */
 #endif				/* FORTRAN_HAS_NO_SHORT */
-#ifdef __alpha
+#if defined __alpha || (_MIPS_SZLONG == 64) || defined IA64 || (defined __sun && defined _LP64)
 #ifdef HDF
     if ((nc_type) datatype == NC_LONG && handle->file_type!=HDF_FILE) {
 	long iocount = dimprod (ncount, ndims);	/* product of dimensions */
@@ -1829,7 +1848,7 @@
 	return;
     }				/* else */
 #endif				/* FORTRAN_HAS_NO_SHORT */
-#ifdef __alpha
+#if defined __alpha || (_MIPS_SZLONG == 64) || defined IA64 || (defined __sun && defined _LP64)
 #ifdef HDF
     if ((nc_type) *datatype == NC_LONG && handle->file_type!=HDF_FILE) {
 	long *longs = itol (value, attlen, 1);
@@ -1994,7 +2013,7 @@
 	return;
     }				/* else */
 #endif				/* FORTRAN_HAS_NO_SHORT */
-#ifdef __alpha
+#if defined __alpha || (_MIPS_SZLONG == 64) || defined IA64 || (defined __sun && defined _LP64)
 #ifdef HDF
     if ((nc_type) datatype == NC_LONG && handle->file_type!=HDF_FILE) {
 	long *longs = (long *) malloc (attlen * sizeof (long));

Modified: packages/libhdf4/branches/upstream/current/mfhdf/fortran/config/jackets-sun.c
===================================================================
--- packages/libhdf4/branches/upstream/current/mfhdf/fortran/config/jackets-sun.c	2007-05-15 09:05:29 UTC (rev 830)
+++ packages/libhdf4/branches/upstream/current/mfhdf/fortran/config/jackets-sun.c	2007-05-15 09:53:05 UTC (rev 831)
@@ -2,7 +2,7 @@
  *	Copyright 1990, University Corporation for Atmospheric Research
  *      See netcdf/COPYRIGHT file for copying and redistribution conditions.
  */
-/* $Id: jackets-sun.c,v 1.3 1997/11/05 22:20:34 koziol Exp $ */
+/* $Id: jackets-sun.c,v 1.5 2005/02/09 03:04:18 epourmal Exp $ */
 /*
  * OVERVIEW
  *
@@ -34,7 +34,7 @@
 
 struct ncfils {			/* This will be a common block from Fortran */
     double dd;
-#ifdef __alpha
+#if defined __alpha || (_MIPS_SZLONG == 64) || defined IA64 || (defined __sun && defined _LP64)
     int ll;
 #else
     long ll;
@@ -65,7 +65,7 @@
 
 struct ncfils {			/* This will be a common block from Fortran */
     double dd;
-#ifdef __alpha
+#if defined __alpha || (_MIPS_SZLONG == 64) || defined IA64 || (defined __sun && defined _LP64)
     int ll;
 #else
     long ll;
@@ -163,7 +163,7 @@
 	*target++ = *source++;
     *target = '\0';
 }
-
+#ifdef WE_COULDNT_READ_NAMES_WITH_SPACES
 /* copy function used to copy strings terminated with blanks */
 static void
 nstrncpy (target, source, maxlen)
@@ -175,8 +175,27 @@
 	*target++ = *source++;
     *target = '\0';
 }
+#endif
 
+/* copy function used to copy strings with embeded blanks and
+   terminated with blanks */
+static void
+nstrncpy (target, source, maxlen)
+    char *target;		/* space to be copied into */
+    char *source;		/* string to be copied */
+    int maxlen;			/* maximum length of *source */
+{
+/* Copy all string */
+    while (maxlen--) 
+        *target++ = *source++;
+    *target -- = '\0';
+/* Disregard all trailing spaces  */
+     while (*target == ' ')
+         *target-- = '\0';
 
+}
+
+
 /*
  * Compute product of dimensions.
  */
@@ -412,7 +431,7 @@
 }
 #endif /* FORTRAN_HAS_NO_SHORT */
 
-#ifdef __alpha
+#if defined __alpha || (_MIPS_SZLONG == 64) || defined IA64 || (defined __sun && defined _LP64)
 /*
  * Convert multi-dimensional array of NCLONGs stored in ints to packed
  * array of longs, in malloc'ed space.  Returns pointer to longs or NULL
@@ -899,7 +918,7 @@
 	return;
     }				/* else */
 #endif				/* FORTRAN_HAS_NO_SHORT */
-#ifdef __alpha
+#if defined __alpha || (_MIPS_SZLONG == 64) || defined IA64 || (defined __sun && defined _LP64)
 #ifdef HDF
     if ((nc_type) datatype == NC_LONG && handle->file_type!=HDF_FILE) {
 	long          longs = *(int *)value;
@@ -1013,7 +1032,7 @@
 	return;
     }				/* else */
 #endif				/* FORTRAN_HAS_NO_SHORT */
-#ifdef __alpha
+#if defined __alpha || (_MIPS_SZLONG == 64) || defined IA64 || (defined __sun && defined _LP64)
 #ifdef HDF
     if ((nc_type) datatype == NC_LONG && handle->file_type!=HDF_FILE) {
 	long *longs = itol (value, ncount, ndims);
@@ -1124,7 +1143,7 @@
 	tmpbasis	= nctypelen(NC_LONG);
     else
 #endif
-#ifdef __alpha
+#if defined __alpha || (_MIPS_SZLONG == 64) || defined IA64 || (defined __sun && defined _LP64)
     if (datatype == NC_LONG)
 	tmpbasis	= sizeof(int);
     else
@@ -1181,7 +1200,7 @@
 	return;
     }				/* else */
 #endif				/* FORTRAN_HAS_NO_SHORT */
-#ifdef __alpha
+#if defined __alpha || (_MIPS_SZLONG == 64) || defined IA64 || (defined __sun && defined _LP64)
 #ifdef HDF
     if ((nc_type) datatype == NC_LONG && handle->file_type!=HDF_FILE) {
 	long *longs = itolg (value, ncount, nbasis, ndims);
@@ -1317,7 +1336,7 @@
 	return;
     }				/* else */
 #endif				/* FORTRAN_HAS_NO_SHORT */
-#ifdef __alpha
+#if defined __alpha || (_MIPS_SZLONG == 64) || defined IA64 || (defined __sun && defined _LP64)
 #ifdef HDF
     if ((nc_type) datatype == NC_LONG && handle->file_type!=HDF_FILE) {
 	long          longs;
@@ -1459,7 +1478,7 @@
 	return;
     }				/* else */
 #endif				/* FORTRAN_HAS_NO_SHORT */
-#ifdef __alpha
+#if defined __alpha || (_MIPS_SZLONG == 64) || defined IA64 || (defined __sun && defined _LP64)
 #ifdef HDF
     if ((nc_type) datatype == NC_LONG && handle->file_type!=HDF_FILE) {
 	long iocount = dimprod (ncount, ndims);	/* product of dimensions */
@@ -1592,7 +1611,7 @@
 	tmpbasis	= nctypelen(NC_LONG);
     else
 #endif
-#ifdef __alpha
+#if defined __alpha || (_MIPS_SZLONG == 64) || defined IA64 || (defined __sun && defined _LP64)
     if (datatype == NC_LONG)
 	tmpbasis	= sizeof(int);
     else
@@ -1663,7 +1682,7 @@
 	return;
     }				/* else */
 #endif				/* FORTRAN_HAS_NO_SHORT */
-#ifdef __alpha
+#if defined __alpha || (_MIPS_SZLONG == 64) || defined IA64 || (defined __sun && defined _LP64)
 #ifdef HDF
     if ((nc_type) datatype == NC_LONG && handle->file_type!=HDF_FILE) {
 	long iocount = dimprod (ncount, ndims);	/* product of dimensions */
@@ -1829,7 +1848,7 @@
 	return;
     }				/* else */
 #endif				/* FORTRAN_HAS_NO_SHORT */
-#ifdef __alpha
+#if defined __alpha || (_MIPS_SZLONG == 64) || defined IA64 || (defined __sun && defined _LP64)
 #ifdef HDF
     if ((nc_type) *datatype == NC_LONG && handle->file_type!=HDF_FILE) {
 	long *longs = itol (value, attlen, 1);
@@ -1994,7 +2013,7 @@
 	return;
     }				/* else */
 #endif				/* FORTRAN_HAS_NO_SHORT */
-#ifdef __alpha
+#if defined __alpha || (_MIPS_SZLONG == 64) || defined IA64 || (defined __sun && defined _LP64)
 #ifdef HDF
     if ((nc_type) datatype == NC_LONG && handle->file_type!=HDF_FILE) {
 	long *longs = (long *) malloc (attlen * sizeof (long));

Modified: packages/libhdf4/branches/upstream/current/mfhdf/fortran/config/jackets-t3e.c
===================================================================
--- packages/libhdf4/branches/upstream/current/mfhdf/fortran/config/jackets-t3e.c	2007-05-15 09:05:29 UTC (rev 830)
+++ packages/libhdf4/branches/upstream/current/mfhdf/fortran/config/jackets-t3e.c	2007-05-15 09:53:05 UTC (rev 831)
@@ -2,7 +2,7 @@
  *	Copyright 1990, University Corporation for Atmospheric Research
  *      See netcdf/COPYRIGHT file for copying and redistribution conditions.
  */
-/* $Id: jackets-t3e.c,v 1.4 1998/03/03 23:41:08 acheng Exp $ */
+/* $Id: jackets-t3e.c,v 1.8 2005/02/09 03:04:19 epourmal Exp $ */
 /*
  * OVERVIEW
  *
@@ -39,7 +39,7 @@
 
 struct ncfils {			/* This will be a common block from Fortran */
     double dd;
-#if defined __alpha || (_MIPS_SZLONG == 64)
+#if defined __alpha || (_MIPS_SZLONG == 64) || defined __ia64 || (defined __sun && defined _LP64) || defined AIX5L64 || defined __x86_64__
     int ll;
 #else
     long ll;
@@ -70,7 +70,7 @@
 
 struct ncfils {			/* This will be a common block from Fortran */
     double dd;
-#if defined __alpha || (_MIPS_SZLONG == 64)
+#if defined __alpha || (_MIPS_SZLONG == 64) || defined __ia64 || (defined __sun && defined _LP64) || defined AIX5L64 || defined __x86_64__
     int ll;
 #else
     long ll;
@@ -168,7 +168,7 @@
 	*target++ = *source++;
     *target = '\0';
 }
-
+#ifdef WE_COULDNT_READ_NAMES_WITH_SPACES
 /* copy function used to copy strings terminated with blanks */
 static void
 nstrncpy (target, source, maxlen)
@@ -180,8 +180,26 @@
 	*target++ = *source++;
     *target = '\0';
 }
+#endif
 
+/* copy function used to copy strings with embeded blanks and
+   terminated with blanks */
+static void
+nstrncpy (target, source, maxlen)
+    char *target;		/* space to be copied into */
+    char *source;		/* string to be copied */
+    int maxlen;			/* maximum length of *source */
+{
+/* Copy all string */
+    while (maxlen--) 
+        *target++ = *source++;
+    *target -- = '\0';
+/* Disregard all trailing spaces  */
+     while (*target == ' ')
+         *target-- = '\0';
 
+}
+
 /*
  * Compute product of dimensions.
  */
@@ -417,7 +435,7 @@
 }
 #endif /* FORTRAN_HAS_NO_SHORT */
 
-#if defined __alpha || (_MIPS_SZLONG == 64)
+#if defined __alpha || (_MIPS_SZLONG == 64) || defined __ia64 || (defined __sun && defined _LP64) || defined AIX5L64 || defined __x86_64__
 /*
  * Convert multi-dimensional array of NCLONGs stored in ints to packed
  * array of longs, in malloc'ed space.  Returns pointer to longs or NULL
@@ -913,7 +931,7 @@
 	return;
     }				/* else */
 #endif				/* FORTRAN_HAS_NO_SHORT */
-#if defined __alpha || (_MIPS_SZLONG == 64)
+#if defined __alpha || (_MIPS_SZLONG == 64) || defined __ia64 || (defined __sun && defined _LP64) || defined AIX5L64 || defined __x86_64__
 #ifdef HDF
     if ((nc_type) datatype == NC_LONG && handle->file_type!=HDF_FILE) {
 	long          longs = *(int *)value;
@@ -1028,7 +1046,7 @@
 	return;
     }				/* else */
 #endif				/* FORTRAN_HAS_NO_SHORT */
-#if defined __alpha || (_MIPS_SZLONG == 64)
+#if defined __alpha || (_MIPS_SZLONG == 64) || defined __ia64 || (defined __sun && defined _LP64) || defined AIX5L64 || defined __x86_64__
 #ifdef HDF
     if ((nc_type) datatype == NC_LONG && handle->file_type!=HDF_FILE) {
 	long *longs = itol (value, ncount, ndims);
@@ -1140,7 +1158,7 @@
 	tmpbasis	= nctypelen(NC_LONG);
     else
 #endif
-#if defined __alpha || (_MIPS_SZLONG == 64)
+#if defined __alpha || (_MIPS_SZLONG == 64) || defined __ia64 || (defined __sun && defined _LP64) || defined AIX5L64 || defined __x86_64__
     if (datatype == NC_LONG)
 	tmpbasis	= sizeof(int);
     else
@@ -1197,7 +1215,7 @@
 	return;
     }				/* else */
 #endif				/* FORTRAN_HAS_NO_SHORT */
-#if defined __alpha || (_MIPS_SZLONG == 64)
+#if defined __alpha || (_MIPS_SZLONG == 64) || defined __ia64 || (defined __sun && defined _LP64) || defined AIX5L64 || defined __x86_64__
 #ifdef HDF
     if ((nc_type) datatype == NC_LONG && handle->file_type!=HDF_FILE) {
 	long *longs = itolg (value, ncount, nbasis, ndims);
@@ -1334,7 +1352,7 @@
 	return;
     }				/* else */
 #endif				/* FORTRAN_HAS_NO_SHORT */
-#if defined __alpha || (_MIPS_SZLONG == 64)
+#if defined __alpha || (_MIPS_SZLONG == 64) || defined __ia64 || (defined __sun && defined _LP64) || defined AIX5L64 || defined __x86_64__
 #ifdef HDF
     if ((nc_type) datatype == NC_LONG && handle->file_type!=HDF_FILE) {
 	long          longs;
@@ -1477,7 +1495,7 @@
 	return;
     }				/* else */
 #endif				/* FORTRAN_HAS_NO_SHORT */
-#if defined __alpha || (_MIPS_SZLONG == 64)
+#if defined __alpha || (_MIPS_SZLONG == 64) || defined __ia64 || (defined __sun && defined _LP64) || defined AIX5L64 || defined __x86_64__
 #ifdef HDF
     if ((nc_type) datatype == NC_LONG && handle->file_type!=HDF_FILE) {
 	long iocount = dimprod (ncount, ndims);	/* product of dimensions */
@@ -1611,7 +1629,7 @@
 	tmpbasis	= nctypelen(NC_LONG);
     else
 #endif
-#if defined __alpha || (_MIPS_SZLONG == 64)
+#if defined __alpha || (_MIPS_SZLONG == 64) || defined __ia64 || (defined __sun && defined _LP64) || defined AIX5L64 || defined __x86_64__
     if (datatype == NC_LONG)
 	tmpbasis	= sizeof(int);
     else
@@ -1682,7 +1700,7 @@
 	return;
     }				/* else */
 #endif				/* FORTRAN_HAS_NO_SHORT */
-#if defined __alpha || (_MIPS_SZLONG == 64)
+#if defined __alpha || (_MIPS_SZLONG == 64) || defined __ia64 || (defined __sun && defined _LP64) || defined AIX5L64 || defined __x86_64__
 #ifdef HDF
     if ((nc_type) datatype == NC_LONG && handle->file_type!=HDF_FILE) {
 	long iocount = dimprod (ncount, ndims);	/* product of dimensions */
@@ -1851,7 +1869,7 @@
 	return;
     }				/* else */
 #endif				/* FORTRAN_HAS_NO_SHORT */
-#if defined __alpha || (_MIPS_SZLONG == 64)
+#if defined __alpha || (_MIPS_SZLONG == 64) || defined __ia64 || (defined __sun && defined _LP64) || defined AIX5L64 || defined __x86_64__
 #ifdef HDF
     if ((nc_type) *datatype == NC_LONG && handle->file_type!=HDF_FILE) {
 	long *longs = itol (value, attlen, 1);
@@ -2020,7 +2038,7 @@
 	return;
     }				/* else */
 #endif				/* FORTRAN_HAS_NO_SHORT */
-#if defined __alpha || (_MIPS_SZLONG == 64)
+#if defined __alpha || (_MIPS_SZLONG == 64) || defined __ia64 || (defined __sun && defined _LP64) || defined AIX5L64 || defined __x86_64__
 #ifdef HDF
     if ((nc_type) datatype == NC_LONG && handle->file_type!=HDF_FILE) {
 	long *longs = (long *) malloc (attlen * sizeof (long));

Modified: packages/libhdf4/branches/upstream/current/mfhdf/fortran/config/jackets-unicos.c
===================================================================
--- packages/libhdf4/branches/upstream/current/mfhdf/fortran/config/jackets-unicos.c	2007-05-15 09:05:29 UTC (rev 830)
+++ packages/libhdf4/branches/upstream/current/mfhdf/fortran/config/jackets-unicos.c	2007-05-15 09:53:05 UTC (rev 831)
@@ -2,7 +2,7 @@
  *	Copyright 1990, University Corporation for Atmospheric Research
  *      See netcdf/COPYRIGHT file for copying and redistribution conditions.
  */
-/* $Id: jackets-unicos.c,v 1.3 1997/11/05 22:20:41 koziol Exp $ */
+/* $Id: jackets-unicos.c,v 1.7 2005/02/09 03:04:19 epourmal Exp $ */
 /*
  * OVERVIEW
  *
@@ -39,7 +39,7 @@
 
 struct ncfils {			/* This will be a common block from Fortran */
     double dd;
-#if defined __alpha || (_MIPS_SZLONG == 64)
+#if defined __alpha || (_MIPS_SZLONG == 64) || defined __ia64 || (defined __sun && defined _LP64) || defined AIX5L64 || defined __x86_64__
     int ll;
 #else
     long ll;
@@ -70,7 +70,7 @@
 
 struct ncfils {			/* This will be a common block from Fortran */
     double dd;
-#if defined __alpha || (_MIPS_SZLONG == 64)
+#if defined __alpha || (_MIPS_SZLONG == 64) || defined __ia64 || (defined __sun && defined _LP64) || defined AIX5L64 || defined __x86_64__
     int ll;
 #else
     long ll;
@@ -168,7 +168,7 @@
 	*target++ = *source++;
     *target = '\0';
 }
-
+#ifdef WE_COULDNT_READ_NAMES_WITH_SPACES
 /* copy function used to copy strings terminated with blanks */
 static void
 nstrncpy (target, source, maxlen)
@@ -180,8 +180,27 @@
 	*target++ = *source++;
     *target = '\0';
 }
+#endif
 
+/* copy function used to copy strings with embeded blanks and
+   terminated with blanks */
+static void
+nstrncpy (target, source, maxlen)
+    char *target;		/* space to be copied into */
+    char *source;		/* string to be copied */
+    int maxlen;			/* maximum length of *source */
+{
+/* Copy all string */
+    while (maxlen--) 
+        *target++ = *source++;
+    *target -- = '\0';
+/* Disregard all trailing spaces  */
+     while (*target == ' ')
+         *target-- = '\0';
 
+}
+
+
 /*
  * Compute product of dimensions.
  */
@@ -417,7 +436,7 @@
 }
 #endif /* FORTRAN_HAS_NO_SHORT */
 
-#if defined __alpha || (_MIPS_SZLONG == 64)
+#if defined __alpha || (_MIPS_SZLONG == 64) || defined __ia64 || (defined __sun && defined _LP64) || defined AIX5L64 || defined __x86_64__
 /*
  * Convert multi-dimensional array of NCLONGs stored in ints to packed
  * array of longs, in malloc'ed space.  Returns pointer to longs or NULL
@@ -913,7 +932,7 @@
 	return;
     }				/* else */
 #endif				/* FORTRAN_HAS_NO_SHORT */
-#if defined __alpha || (_MIPS_SZLONG == 64)
+#if defined __alpha || (_MIPS_SZLONG == 64) || defined __ia64 || (defined __sun && defined _LP64) || defined AIX5L64 || defined __x86_64__
 #ifdef HDF
     if ((nc_type) datatype == NC_LONG && handle->file_type!=HDF_FILE) {
 	long          longs = *(int *)value;
@@ -1028,7 +1047,7 @@
 	return;
     }				/* else */
 #endif				/* FORTRAN_HAS_NO_SHORT */
-#if defined __alpha || (_MIPS_SZLONG == 64)
+#if defined __alpha || (_MIPS_SZLONG == 64) || defined __ia64 || (defined __sun && defined _LP64) || defined AIX5L64 || defined __x86_64__
 #ifdef HDF
     if ((nc_type) datatype == NC_LONG && handle->file_type!=HDF_FILE) {
 	long *longs = itol (value, ncount, ndims);
@@ -1140,7 +1159,7 @@
 	tmpbasis	= nctypelen(NC_LONG);
     else
 #endif
-#if defined __alpha || (_MIPS_SZLONG == 64)
+#if defined __alpha || (_MIPS_SZLONG == 64) || defined __ia64 || (defined __sun && defined _LP64) || defined AIX5L64 || defined __x86_64__
     if (datatype == NC_LONG)
 	tmpbasis	= sizeof(int);
     else
@@ -1197,7 +1216,7 @@
 	return;
     }				/* else */
 #endif				/* FORTRAN_HAS_NO_SHORT */
-#if defined __alpha || (_MIPS_SZLONG == 64)
+#if defined __alpha || (_MIPS_SZLONG == 64) || defined __ia64 || (defined __sun && defined _LP64) || defined AIX5L64 || defined __x86_64__
 #ifdef HDF
     if ((nc_type) datatype == NC_LONG && handle->file_type!=HDF_FILE) {
 	long *longs = itolg (value, ncount, nbasis, ndims);
@@ -1334,7 +1353,7 @@
 	return;
     }				/* else */
 #endif				/* FORTRAN_HAS_NO_SHORT */
-#if defined __alpha || (_MIPS_SZLONG == 64)
+#if defined __alpha || (_MIPS_SZLONG == 64) || defined __ia64 || (defined __sun && defined _LP64) || defined AIX5L64 || defined __x86_64__
 #ifdef HDF
     if ((nc_type) datatype == NC_LONG && handle->file_type!=HDF_FILE) {
 	long          longs;
@@ -1477,7 +1496,7 @@
 	return;
     }				/* else */
 #endif				/* FORTRAN_HAS_NO_SHORT */
-#if defined __alpha || (_MIPS_SZLONG == 64)
+#if defined __alpha || (_MIPS_SZLONG == 64) || defined __ia64 || (defined __sun && defined _LP64) || defined AIX5L64 || defined __x86_64__
 #ifdef HDF
     if ((nc_type) datatype == NC_LONG && handle->file_type!=HDF_FILE) {
 	long iocount = dimprod (ncount, ndims);	/* product of dimensions */
@@ -1611,7 +1630,7 @@
 	tmpbasis	= nctypelen(NC_LONG);
     else
 #endif
-#if defined __alpha || (_MIPS_SZLONG == 64)
+#if defined __alpha || (_MIPS_SZLONG == 64) || defined __ia64 || (defined __sun && defined _LP64) || defined AIX5L64 || defined __x86_64__
     if (datatype == NC_LONG)
 	tmpbasis	= sizeof(int);
     else
@@ -1682,7 +1701,7 @@
 	return;
     }				/* else */
 #endif				/* FORTRAN_HAS_NO_SHORT */
-#if defined __alpha || (_MIPS_SZLONG == 64)
+#if defined __alpha || (_MIPS_SZLONG == 64) || defined __ia64 || (defined __sun && defined _LP64) || defined AIX5L64 || defined __x86_64__
 #ifdef HDF
     if ((nc_type) datatype == NC_LONG && handle->file_type!=HDF_FILE) {
 	long iocount = dimprod (ncount, ndims);	/* product of dimensions */
@@ -1851,7 +1870,7 @@
 	return;
     }				/* else */
 #endif				/* FORTRAN_HAS_NO_SHORT */
-#if defined __alpha || (_MIPS_SZLONG == 64)
+#if defined __alpha || (_MIPS_SZLONG == 64) || defined __ia64 || (defined __sun && defined _LP64) || defined AIX5L64 || defined __x86_64__
 #ifdef HDF
     if ((nc_type) *datatype == NC_LONG && handle->file_type!=HDF_FILE) {
 	long *longs = itol (value, attlen, 1);
@@ -2020,7 +2039,7 @@
 	return;
     }				/* else */
 #endif				/* FORTRAN_HAS_NO_SHORT */
-#if defined __alpha || (_MIPS_SZLONG == 64)
+#if defined __alpha || (_MIPS_SZLONG == 64) || defined __ia64 || (defined __sun && defined _LP64) || defined AIX5L64 || defined __x86_64__
 #ifdef HDF
     if ((nc_type) datatype == NC_LONG && handle->file_type!=HDF_FILE) {
 	long *longs = (long *) malloc (attlen * sizeof (long));

Added: packages/libhdf4/branches/upstream/current/mfhdf/fortran/config/netcdf-apple.inc
===================================================================
--- packages/libhdf4/branches/upstream/current/mfhdf/fortran/config/netcdf-apple.inc	                        (rev 0)
+++ packages/libhdf4/branches/upstream/current/mfhdf/fortran/config/netcdf-apple.inc	2007-05-15 09:53:05 UTC (rev 831)
@@ -0,0 +1,147 @@
+c      
+c     Functions in the FORTRAN interface
+
+      integer nccre, ncopn, ncddef, ncdid, ncvdef, ncvid, nctlen
+      integer ncsfil
+      external nccre, ncopn, ncddef, ncdid, ncvdef, ncvid, nctlen
+      external ncsfil
+
+      integer NCRDWR,NCCREAT,NCEXCL,NCINDEF,NCNSYNC,NCHSYNC
+      integer NCNDIRTY,NCHDIRTY,NCLINK,NCNOWRIT,NCWRITE
+      integer NCCLOB,NCNOCLOB,NCGLOBAL,NCFILL,NCNOFILL
+      integer MAXNCOP,MAXNCDIM,MAXNCATT,MAXNCVAR
+      integer MAXNCNAM,MAXVDIMS,NCNOERR,NCEBADID
+      integer NCENFILE,NCEEXIST,NCEINVAL,NCEPERM,NCENOTIN
+      integer NCEINDEF,NCECOORD,NCEMAXDS,NCENAME
+      integer NCENOATT,NCEMAXAT,NCEBADTY,NCEBADD, NCESTS
+      integer NCEUNLIM,NCEMAXVS,NCENOTVR,NCEGLOB,NCENOTNC
+      integer NCFOOBAR,NCSYSERR,NCFATAL,NCVERBOS, NCENTOOL
+      
+      integer NCBYTE,NCCHAR,NCSHORT,NCLONG,NCFLOAT,NCDOUBLE
+      
+      parameter(NCBYTE = 1)
+      parameter(NCCHAR = 2)
+      parameter(NCSHORT = 3)
+      parameter(NCLONG = 4)
+      parameter(NCFLOAT = 5)
+      parameter(NCDOUBLE = 6)
+      
+c     
+c     masks for the struct NC flag field; passed in as 'mode' arg to
+c     nccreate and ncopen.
+c     
+      
+c     read/write, 0 => readonly 
+      parameter(NCRDWR = 1)
+c     in create phase, cleared by ncendef 
+      parameter(NCCREAT = 2)
+c     on create destroy existing file 
+      parameter(NCEXCL = 4)
+c     in define mode, cleared by ncendef 
+      parameter(NCINDEF = 8)
+c     synchronise numrecs on change (X'10')
+      parameter(NCNSYNC = 16)
+c     synchronise whole header on change (X'20')
+      parameter(NCHSYNC = 32)
+c     numrecs has changed (X'40')
+      parameter(NCNDIRTY = 64)	
+c     header info has changed (X'80')
+      parameter(NCHDIRTY = 128)
+c     prefill vars on endef and increase of record, the default behavior
+      parameter(NCFILL = 0)
+c     don't fill vars on endef and increase of record (X'100')
+      parameter(NCNOFILL = 256)
+c     isa link (X'8000')
+      parameter(NCLINK = 32768)
+      
+c     
+c     'mode' arguments for nccreate and ncopen
+c     
+      
+      parameter(NCNOWRIT = 0)
+      parameter(NCWRITE = NCRDWR)
+      parameter(NCCLOB = 11)
+      parameter(NCNOCLOB = 15)
+c     
+c     'size' argument to ncdimdef for an unlimited dimension
+c     
+      integer NCUNLIM
+      parameter(NCUNLIM = 0)
+      
+c     
+c     attribute id to put/get a global attribute
+c     
+      parameter(NCGLOBAL  = 0)
+c     
+c     Advisory Maximums
+c     
+      parameter(MAXNCOP = 32)
+      parameter(MAXNCDIM = 32)
+      parameter(MAXNCATT = 512)
+      parameter(MAXNCVAR = 512)
+c     Not enforced 
+      parameter(MAXNCNAM = 128)
+      parameter(MAXVDIMS = MAXNCDIM)
+      
+      
+c     
+c     The netcdf data types
+c     
+      
+c     
+c     Global netcdf error status variable
+c     Initialized in error.c
+c     
+      
+c     No Error 
+      parameter(NCNOERR = 0)
+c     Not a netcdf id 
+      parameter(NCEBADID = 1)
+c     Too many netcdfs open 
+      parameter(NCENFILE = 2)	
+c     netcdf file exists && NCNOCLOB
+      parameter(NCEEXIST = 3)
+c     Invalid Argument 
+      parameter(NCEINVAL = 4)
+c     Write to read only 
+      parameter(NCEPERM = 5)
+c     Operation not allowed in data mode 
+      parameter(NCENOTIN = 6)	
+c     Operation not allowed in define mode 
+      parameter(NCEINDEF = 7)	
+c     Coordinates out of Domain 
+      parameter(NCECOORD = 8)
+c     MAXNCDIMS exceeded 
+      parameter(NCEMAXDS = 9)
+c     String match to name in use 
+      parameter(NCENAME = 10)	
+c     Attribute not found 
+      parameter(NCENOATT = 11)
+c     MAXNCATTRS exceeded 
+      parameter(NCEMAXAT = 12)
+c     Not a netcdf data type 
+      parameter(NCEBADTY = 13)
+c     Invalid dimension id 
+      parameter(NCEBADD = 14)	
+c     NCUNLIMITED in the wrong index 
+      parameter(NCEUNLIM = 15)
+c     MAXNCVARS exceeded 
+      parameter(NCEMAXVS = 16)
+c     Variable not found 
+      parameter(NCENOTVR = 17)
+c     Action prohibited on NCGLOBAL varid 
+      parameter(NCEGLOB = 18)
+c     Not a netcdf file 
+      parameter(NCENOTNC = 19)
+      parameter(NCESTS = 20)
+      parameter (NCENTOOL = 21)	
+      parameter(NCFOOBAR = 32)
+      parameter(NCSYSERR = -1)
+      
+      
+c     
+c     Global options variable. Used to determine behavior of error handler.
+c     Initialized in lerror.c
+c     
+      parameter(NCFATAL = 1)
+      parameter(NCVERBOS = 2)

Added: packages/libhdf4/branches/upstream/current/mfhdf/fortran/config/netcdf-solaris64.inc
===================================================================
--- packages/libhdf4/branches/upstream/current/mfhdf/fortran/config/netcdf-solaris64.inc	                        (rev 0)
+++ packages/libhdf4/branches/upstream/current/mfhdf/fortran/config/netcdf-solaris64.inc	2007-05-15 09:53:05 UTC (rev 831)
@@ -0,0 +1,147 @@
+c      
+c     Functions in the FORTRAN interface
+
+      integer nccre, ncopn, ncddef, ncdid, ncvdef, ncvid, nctlen
+      integer ncsfil
+      external nccre, ncopn, ncddef, ncdid, ncvdef, ncvid, nctlen
+      external ncsfil
+
+      integer NCRDWR,NCCREAT,NCEXCL,NCINDEF,NCNSYNC,NCHSYNC
+      integer NCNDIRTY,NCHDIRTY,NCLINK,NCNOWRIT,NCWRITE
+      integer NCCLOB,NCNOCLOB,NCGLOBAL,NCFILL,NCNOFILL
+      integer MAXNCOP,MAXNCDIM,MAXNCATT,MAXNCVAR
+      integer MAXNCNAM,MAXVDIMS,NCNOERR,NCEBADID
+      integer NCENFILE,NCEEXIST,NCEINVAL,NCEPERM,NCENOTIN
+      integer NCEINDEF,NCECOORD,NCEMAXDS,NCENAME
+      integer NCENOATT,NCEMAXAT,NCEBADTY,NCEBADD, NCESTS
+      integer NCEUNLIM,NCEMAXVS,NCENOTVR,NCEGLOB,NCENOTNC
+      integer NCFOOBAR,NCSYSERR,NCFATAL,NCVERBOS, NCENTOOL
+      
+      integer NCBYTE,NCCHAR,NCSHORT,NCLONG,NCFLOAT,NCDOUBLE
+      
+      parameter(NCBYTE = 1)
+      parameter(NCCHAR = 2)
+      parameter(NCSHORT = 3)
+      parameter(NCLONG = 4)
+      parameter(NCFLOAT = 5)
+      parameter(NCDOUBLE = 6)
+      
+c     
+c     masks for the struct NC flag field; passed in as 'mode' arg to
+c     nccreate and ncopen.
+c     
+      
+c     read/write, 0 => readonly 
+      parameter(NCRDWR = 1)
+c     in create phase, cleared by ncendef 
+      parameter(NCCREAT = 2)
+c     on create destroy existing file 
+      parameter(NCEXCL = 4)
+c     in define mode, cleared by ncendef 
+      parameter(NCINDEF = 8)
+c     synchronise numrecs on change (X'10')
+      parameter(NCNSYNC = 16)
+c     synchronise whole header on change (X'20')
+      parameter(NCHSYNC = 32)
+c     numrecs has changed (X'40')
+      parameter(NCNDIRTY = 64)	
+c     header info has changed (X'80')
+      parameter(NCHDIRTY = 128)
+c     prefill vars on endef and increase of record, the default behavior
+      parameter(NCFILL = 0)
+c     don't fill vars on endef and increase of record (X'100')
+      parameter(NCNOFILL = 256)
+c     isa link (X'8000')
+      parameter(NCLINK = 32768)
+      
+c     
+c     'mode' arguments for nccreate and ncopen
+c     
+      
+      parameter(NCNOWRIT = 0)
+      parameter(NCWRITE = NCRDWR)
+      parameter(NCCLOB = 11)
+      parameter(NCNOCLOB = 15)
+c     
+c     'size' argument to ncdimdef for an unlimited dimension
+c     
+      integer NCUNLIM
+      parameter(NCUNLIM = 0)
+      
+c     
+c     attribute id to put/get a global attribute
+c     
+      parameter(NCGLOBAL  = 0)
+c     
+c     Advisory Maximums
+c     
+      parameter(MAXNCOP = 32)
+      parameter(MAXNCDIM = 32)
+      parameter(MAXNCATT = 512)
+      parameter(MAXNCVAR = 512)
+c     Not enforced 
+      parameter(MAXNCNAM = 128)
+      parameter(MAXVDIMS = MAXNCDIM)
+      
+      
+c     
+c     The netcdf data types
+c     
+      
+c     
+c     Global netcdf error status variable
+c     Initialized in error.c
+c     
+      
+c     No Error 
+      parameter(NCNOERR = 0)
+c     Not a netcdf id 
+      parameter(NCEBADID = 1)
+c     Too many netcdfs open 
+      parameter(NCENFILE = 2)	
+c     netcdf file exists && NCNOCLOB
+      parameter(NCEEXIST = 3)
+c     Invalid Argument 
+      parameter(NCEINVAL = 4)
+c     Write to read only 
+      parameter(NCEPERM = 5)
+c     Operation not allowed in data mode 
+      parameter(NCENOTIN = 6)	
+c     Operation not allowed in define mode 
+      parameter(NCEINDEF = 7)	
+c     Coordinates out of Domain 
+      parameter(NCECOORD = 8)
+c     MAXNCDIMS exceeded 
+      parameter(NCEMAXDS = 9)
+c     String match to name in use 
+      parameter(NCENAME = 10)	
+c     Attribute not found 
+      parameter(NCENOATT = 11)
+c     MAXNCATTRS exceeded 
+      parameter(NCEMAXAT = 12)
+c     Not a netcdf data type 
+      parameter(NCEBADTY = 13)
+c     Invalid dimension id 
+      parameter(NCEBADD = 14)	
+c     NCUNLIMITED in the wrong index 
+      parameter(NCEUNLIM = 15)
+c     MAXNCVARS exceeded 
+      parameter(NCEMAXVS = 16)
+c     Variable not found 
+      parameter(NCENOTVR = 17)
+c     Action prohibited on NCGLOBAL varid 
+      parameter(NCEGLOB = 18)
+c     Not a netcdf file 
+      parameter(NCENOTNC = 19)
+      parameter(NCESTS = 20)
+      parameter (NCENTOOL = 21)	
+      parameter(NCFOOBAR = 32)
+      parameter(NCSYSERR = -1)
+      
+      
+c     
+c     Global options variable. Used to determine behavior of error handler.
+c     Initialized in lerror.c
+c     
+      parameter(NCFATAL = 1)
+      parameter(NCVERBOS = 2)

Modified: packages/libhdf4/branches/upstream/current/mfhdf/fortran/fort_ps/hdftestp.f
===================================================================
--- packages/libhdf4/branches/upstream/current/mfhdf/fortran/fort_ps/hdftestp.f	2007-05-15 09:05:29 UTC (rev 830)
+++ packages/libhdf4/branches/upstream/current/mfhdf/fortran/fort_ps/hdftestp.f	2007-05-15 09:53:05 UTC (rev 831)
@@ -5,11 +5,11 @@
 
       implicit none
 
-      integer fid1, fid2
-	integer fid_empty
+      integer fid1, fid2
+      integer fid_empty
 
-      integer sds1, sds2, sds3, sds4
-	integer sds_empty, index_empty, flag_empty
+      integer sds1, sds2, sds3, sds4
+      integer sds_empty, index_empty, flag_empty
 
       integer dim1, dim2
 
@@ -38,8 +38,8 @@
       integer sfid2ref, sfref2index, sfsdmvc, sfisdmvc
       integer sfsextf,  hxsdir,    hxscdir
       integer sfwcdata, sfrcdata,  sfscfill, sfgcfill
-      integer sfscatt,  sfrcatt,   sfsnatt,  sfrnatt
-	integer sfchempty
+      integer sfscatt,  sfrcatt,   sfsnatt,  sfrnatt
+      integer sfchempty
       integer SD_UNLIMITED, SD_DIMVAL_BW_INCOMP, DFNT_INT32
       integer DFNT_FLOAT32, DFNT_CHAR8
       integer SD_DIMVAL_BW_COMP, SD_FILL, SD_NOFILL
@@ -54,41 +54,42 @@
       DATA cfill/'@'/, icfill/' '/
       DATA catt/'U','S'/, icatt/' ',' '/
       DATA natt/10,20/, inatt/0,0/
-      DATA i32/15,25/, ii32/0,0/
-
-C
-C--- Create a file with an empty SDS
-C
-      fid_empty = sfstart('test_empty.hdf', 4)
-      if(fid_empty.eq.-1) then
-         print *, 'sfstart returned bad ID'
-         err = err + 1
-      endif
-C
-C--- Create an empty SDS
-C
-      dims(1) = 4
-      dims(2) = 9
-      nt = DFNT_INT32
-      rank = 2
-      sds_empty = sfcreate(fid_empty, 'Empty_SDS', nt, rank, dims)
-      if(sds_empty.eq.-1) then
-         print *, 'SDcreate Empty  returned bad ID', sds_empty
-         err = err + 1
-      endif
-
-      stat = sfendacc(sds_empty)
-      if(stat.ne.0) then
-         print *, 'SDendaccess returned', stat
-         err = err + 1
-      endif
-      stat = sfend(fid_empty)
-      if(stat.ne.0) then
-         print *, 'SDend returned', stat
-         err = err + 1
-      endif
+      DATA i32/15,25/, ii32/0,0/
 
+      err=0
 
+C
+C--- Create a file with an empty SDS
+C
+      fid_empty = sfstart('test_empty.hdf', 4)
+      if(fid_empty.eq.-1) then
+         print *, 'sfstart returned bad ID'
+         err = err + 1
+      endif
+C
+C--- Create an empty SDS
+C
+      dims(1) = 4
+      dims(2) = 9
+      nt = DFNT_INT32
+      rank = 2
+      sds_empty = sfcreate(fid_empty, 'Empty_SDS', nt, rank, dims)
+      if(sds_empty.eq.-1) then
+         print *, 'SDcreate Empty  returned bad ID', sds_empty
+         err = err + 1
+      endif
+
+      stat = sfendacc(sds_empty)
+      if(stat.ne.0) then
+         print *, 'SDendaccess returned', stat
+         err = err + 1
+      endif
+      stat = sfend(fid_empty)
+      if(stat.ne.0) then
+         print *, 'SDend returned', stat
+         err = err + 1
+      endif
+
 C     create a new file
       err = 0
       eps = 0.0001
@@ -328,39 +329,38 @@
          err = err + 1
       endif
 
-
-C
-C     OK, let's open it back up and take a look at what we've done
-C
-      fid_empty = sfstart('test_empty.hdf', 3)
-      if(fid_empty.eq.-1) then
-          print *, 'Reopen returned', fid_empty
-          err = err + 1
-      endif
-      index_empty = sfn2index(fid_empty,'Empty_SDS')
- 
-      sds_empty= sfselect(fid_empty, index_empty)
-      if(sds_empty.eq. -1) then
-         print *, 'Select returned', sds_empty
-         err = err + 1
-      endif
-      stat = sfchempty(sds_empty, flag_empty)
-      if(stat.ne. 0 .or. flag_empty. ne. 1) then
-        print*, 'sfchempty returned wrong flag, should be 1)'
-        err = err +1
-      endif 
-
-      stat = sfendacc(sds_empty)
-      if(stat.ne.0) then
-         print *, 'SDendaccess returned', stat
-         err = err + 1
-      endif
-      stat = sfend(fid_empty)
-      if(stat.ne.0) then
-         print *, 'SDend returned', stat
-         err = err + 1
-      endif
+C
+C     OK, let's open it back up and take a look at what we've done
+C
+      fid_empty = sfstart('test_empty.hdf', 3)
+      if(fid_empty.eq.-1) then
+          print *, 'Reopen returned', fid_empty
+          err = err + 1
+      endif
+      index_empty = sfn2index(fid_empty,'Empty_SDS')
+ 
+      sds_empty= sfselect(fid_empty, index_empty)
+      if(sds_empty.eq. -1) then
+         print *, 'Select returned', sds_empty
+         err = err + 1
+      endif
+      stat = sfchempty(sds_empty, flag_empty)
+      if(stat.ne. 0 .or. flag_empty. ne. 1) then
+        print*, 'sfchempty returned wrong flag, should be 1)'
+        err = err +1
+      endif 
 
+      stat = sfendacc(sds_empty)
+      if(stat.ne.0) then
+         print *, 'SDendaccess returned', stat
+         err = err + 1
+      endif
+      stat = sfend(fid_empty)
+      if(stat.ne.0) then
+         print *, 'SDend returned', stat
+         err = err + 1
+      endif
+
       fid2 = sfstart('test1.hdf', 3)
       if(fid2.eq.-1) then
           print *, 'Reopen returned', fid2
@@ -368,15 +368,15 @@
       endif
  
       sds3 = sfselect(fid2, 0)
-      if(sds3.eq.-1) then
+      if(sds3.eq. -1) then
          print *, 'Select returned', sds3
          err = err + 1
       endif
-	stat = sfchempty(sds3, flag_empty)
-      if(stat.ne. 0 .or. flag_empty. ne. 0) then
-        print*, 'sfchempty returned wrong flag, should be 0)'
-        err = err +1
-      endif
+      stat = sfchempty(sds3, flag_empty)
+      if(stat.ne. 0 .or. flag_empty. ne. 0) then
+        print*, 'sfchempty returned wrong flag, should be 0)'
+        err = err +1
+      endif
 
       stat = sfginfo(sds3, name, rank, idims, nt, nattr)
       if(stat.ne.0) then
@@ -441,13 +441,13 @@
       endif
 
       sds4 = sfselect(fid2, 1)
-      if(sds4.eq.-1) then
+      if(sds4.eq. -1) then
          print *, 'Select #4  returned', sds4
          err = err + 1
       endif
 
       dim2 = sfdimid(sds4, 1)
-      if(dim2.eq.-1) then
+      if(dim2.eq. -1) then
          print *, 'Get dim id #2 returned', dim2
          err = err + 1
       endif
@@ -1209,7 +1209,9 @@
      .             sds_index(N_COMP_TYPES)
          integer   RANK, comp_type, c_out
          integer   comp_arg(N_COMP_ARG)
+         integer   comp_prm_out(N_COMP_ARG)
          integer   comp_type_out(N_COMP_TYPES)
+         integer   comp_typesd
          integer   d_dims(2)
          integer   ch_dims(2),ch_dims_out(2), start_dims(2)
          integer   start(2), stride(2), edges(2)
@@ -1229,7 +1231,7 @@
 C  SDS functions declarations
 C
          integer   sfstart, sfcreate, sfendacc, sfend,
-     .             sfn2index, sfselect,
+     .             sfn2index, sfselect, sfgcompress,
      .             sfsfill, sfschnk, sfscchnk, sfwchnk, 
      .             sfgichnk, sfrchnk, sfwdata, sfrdata
 C
@@ -1325,12 +1327,12 @@
      .           nbit_fill_one,
      .           nbit_start_bit,
      .           nbit_bit_len
-          parameter ( deflate_level    = 1,
+          parameter ( deflate_level    = 6,
      .                skphuff_skp_size = 2,
      .                nbit_sign_ext    = 0,
      .                nbit_fill_one    = 0,
-     .                nbit_start_bit   = 0,
-     .                nbit_bit_len     = 31 )
+     .                nbit_start_bit   = 6,
+     .                nbit_bit_len     = 7 )
 
 
 C
@@ -1580,6 +1582,60 @@
                 print *, 'sfselect failed for', i, ' -th dataset'
                 err_chunk = err_chunk + 1
             endif
+C
+C  Find out type of compression used and compression parameters.
+C
+            status = sfgcompress(sds_id(i), comp_typesd, comp_prm_out)
+	    if (status .eq. -1) then
+            print *, 'sfgcompress failed for', i, ' -th dataset'
+                err_chunk = err_chunk + 1
+            endif
+            if (name(i) .eq. 'Nocomp_data') then
+                if (comp_typesd .ne. COMP_CODE_NONE) then
+            print *, 'wrong compression type for Nocomp_data dataset'
+                err_chunk = err_chunk + 1
+                endif
+            endif
+            if (name(i) .eq. 'Rlcomp_data') then
+                if (comp_typesd .ne. COMP_CODE_RLE) then
+            print *, 'wrong compression type for Rlcomp_data dataset'
+                err_chunk = err_chunk + 1
+                endif
+            endif
+            if (name(i) .eq. 'Hucomp_data') then
+                if (comp_typesd .ne. COMP_CODE_SKPHUFF) then
+            print *, 'wrong compression type for Hucomp_data dataset'
+                err_chunk = err_chunk + 1
+                endif
+                if (comp_prm_out(1). ne. skphuff_skp_size) then
+         print *, 'wrong compression parameter for Hucomp_data dataset'
+                err_chunk = err_chunk + 1
+                endif
+
+            endif
+            if (name(i) .eq. 'Gzcomp_data') then
+                if (comp_typesd .ne. COMP_CODE_DEFLATE) then
+          print *, 'wrong compression type for Gzcomp_data dataset'
+                endif
+                if (comp_prm_out(1). ne. deflate_level) then
+          print *, 'wrong compression parameter for Gzcomp_data dataset'
+                err_chunk = err_chunk + 1
+                endif
+            endif
+
+            if (name(i) .eq. 'Nbcomp_data') then
+                if (comp_typesd .ne. COMP_CODE_NBIT) then
+          print *, 'wrong compression type for Nbcomp_data dataset'
+                endif
+                if ((comp_prm_out(1) .ne. nbit_sign_ext) .or.
+     .          (comp_prm_out(2) .ne. nbit_fill_one) .or.
+     .          (comp_prm_out(3) .ne. nbit_start_bit) .or.
+     .          (comp_prm_out(4) .ne. nbit_bit_len)) then
+          print *, 'wrong compression parameter for Nbcomp_data dataset'
+                err_chunk = err_chunk + 1
+                endif
+            endif
+
 201      continue
 
 C
@@ -1831,12 +1887,12 @@
      .           nbit_fill_one,
      .           nbit_start_bit,
      .           nbit_bit_len
-          parameter ( deflate_level    = 1,
+          parameter ( deflate_level    = 6,
      .                skphuff_skp_size = 2,
      .                nbit_sign_ext    = 0,
      .                nbit_fill_one    = 0,
-     .                nbit_start_bit   = 0,
-     .                nbit_bit_len     = 31 )
+     .                nbit_start_bit   = 6,
+     .                nbit_bit_len     = 7 )
 
 
 C
@@ -2221,8 +2277,8 @@
          integer   sd_id(N_COMP_TYPES),
      .             sds_id(N_COMP_TYPES),
      .             sds_index(N_COMP_TYPES)
-         integer   RANK, comp_type
-         integer   comp_arg(N_COMP_ARG)
+         integer   RANK, comp_type, comp_type_out
+         integer   comp_arg(N_COMP_ARG), comp_prm_out(N_COMP_ARG)
          integer   d_dims(2)
          integer   start(2), stride(2), edges(2)
          integer   status, fill_value
@@ -2242,7 +2298,7 @@
          integer   sfstart, sfcreate, sfendacc, sfend,
      .             sfn2index, sfselect,
      .             sfsfill, sfrdata,
-     .             sfwdata, sfscompress
+     .             sfwdata, sfscompress, sfgcompress
 C
 C  Initial data declarations( change if you which to test larger arrays )
 C
@@ -2317,7 +2373,7 @@
 C
          integer deflate_level,
      .           skphuff_skp_size
-          parameter ( deflate_level    = 1,
+          parameter ( deflate_level    = 6,
      .                skphuff_skp_size = 2 )
 
 
@@ -2475,8 +2531,48 @@
                 print *, 'sfselect failed for', i, ' -th dataset'
                 err_compress = err_compress + 1
             endif
+C
+C  Find out type of compression used and compression parameters.
+C
+            status = sfgcompress(sds_id(i), comp_type_out, comp_prm_out)
+	    if (status .eq. -1) then
+            print *, 'sfgcompress failed for', i, ' -th dataset'
+                err_compress = err_compress + 1
+            endif
+            if (name(i) .eq. 'Nocomp_data') then
+                if (comp_type_out .ne. COMP_CODE_NONE) then
+            print *, 'wrong compression type for Nocomp_data dataset'
+                err_compress = err_compress + 1
+                endif
+            endif
+            if (name(i) .eq. 'Rlcomp_data') then
+                if (comp_type_out .ne. COMP_CODE_RLE) then
+            print *, 'wrong compression type for Rlcomp_data dataset'
+                err_compress = err_compress + 1
+                endif
+            endif
+            if (name(i) .eq. 'Hucomp_data') then
+                if (comp_type_out .ne. COMP_CODE_SKPHUFF) then
+            print *, 'wrong compression type for Hucomp_data dataset'
+                err_compress = err_compress + 1
+                endif
+                if (comp_prm_out(1). ne. skphuff_skp_size) then
+         print *, 'wrong compression parameter for Hucomp_data dataset'
+                err_compress = err_compress + 1
+                endif
 
+            endif
+            if (name(i) .eq. 'Gzcomp_data') then
+                if (comp_type_out .ne. COMP_CODE_DEFLATE) then
+          print *, 'wrong compression type for Gzcomp_data dataset'
+                endif
+                if (comp_prm_out(1). ne. deflate_level) then
+          print *, 'wrong compression parameter for Gzcomp_data dataset'
+                err_compress = err_compress + 1
+                endif
+            endif
 
+
 C
 C   Read part of the data back using sfrdata function
 C

Modified: packages/libhdf4/branches/upstream/current/mfhdf/fortran/fort_ps/mfsdpf.c
===================================================================
--- packages/libhdf4/branches/upstream/current/mfhdf/fortran/fort_ps/mfsdpf.c	2007-05-15 09:05:29 UTC (rev 830)
+++ packages/libhdf4/branches/upstream/current/mfhdf/fortran/fort_ps/mfsdpf.c	2007-05-15 09:53:05 UTC (rev 831)
@@ -11,10 +11,10 @@
  ****************************************************************************/
 
 #ifdef RCSID
-static char RcsId[] = "@(#)$Revision: 1.4 $";
+static char RcsId[] = "@(#)$Revision: 1.7 $";
 #endif
 
-/* $Id: mfsdpf.c,v 1.4 1999/04/02 18:37:19 ptlu Exp $ */
+/* $Id: mfsdpf.c,v 1.7 2001/10/16 14:19:41 epourmal Exp $ */
 
 /*
   mfsdpf.c -- based on mfsdf.c,v 1.26
@@ -2051,4 +2051,93 @@
     status = SDcheckempty(*id, &flag_c);
     *flag = flag_c;
     return(status);
-}   
\ No newline at end of file
+}   
+/*------------------------------------------------------------------------- 
+ * Name:    scgcompress
+ * Puporse: Call SDgetcompress 
+ * Inputs:  id: SDS access id
+ * Outputs: comp_type:  type of compression
+ *                      COMP_CODE_NONE = 0
+ *                      COMP_CODE_RLE  = 1
+ *                      COMP_CODE_NBIT = 2
+ *                      COMP_CODE_SKPHUFF = 3
+ *                      COMP_CODE_DEFLATE = 4
+ *          SKPHUFF:
+ *          comp_prm[0] = skphuff_skp_size: size of individual elements for 
+ *                            Adaptive Huffman compression algorithm
+ *          GZIP:
+ *          comp_prm[0] = deflate_level:    GZIP  compression parameter
+ *          NBIT:
+ *          comp_prm[0] = nbit_sign_ext
+ *          comp_prm[1] = nbit_fill_one
+ *          comp_prm[2] = nbit_start_bit
+ *          comp_prm[3] = nbit_bit_len
+ * Returns: 0 on success, -1 on failure with error set
+ * Users:   HDF Fortran programmers          
+ *-------------------------------------------------------------------------*/
+
+    FRETVAL (intf)
+#ifdef PROTOTYPE
+       nscgcompress(intf *id, intf *comp_type, intf *comp_prm)
+#else
+       nscgcompress( id, comp_type, comp_prm)
+       intf *id;
+       intf *comp_type;
+       intf *comp_prm;
+#endif /* PROTOTYPE */
+{
+
+    comp_info c_info;         /* compression info     */
+    comp_coder_t c_type;              /* compression type definition */
+
+    int   CASE;
+    intn c_ret;
+    intf ret = -1;
+
+
+    c_ret = SDgetcompress(*id, &c_type, &c_info);
+    if (c_ret == 0) {
+    CASE = (int)c_type;
+    switch (CASE)  {
+
+       case COMP_CODE_NONE:       /* No compression */
+         *comp_type = 0;
+	  ret = 0;
+         break;
+    
+       case COMP_CODE_RLE:             /* RLE compression */
+         *comp_type = 1;
+	  ret = 0;
+         break;
+
+       case COMP_CODE_NBIT:      /* NBIT encoding */
+          *comp_type = 2;
+          comp_prm[0] = c_info.nbit.sign_ext; 
+          comp_prm[1] = c_info.nbit.fill_one; 
+          comp_prm[2] = c_info.nbit.start_bit; 
+          comp_prm[3] = c_info.nbit.bit_len; 
+	  ret = 0;
+          break;
+
+ 
+       case COMP_CODE_SKPHUFF:      /* Skipping Huffman encoding */
+          *comp_type = 3;
+          comp_prm[0] = c_info.skphuff.skp_size; 
+	  ret = 0;
+          break;
+
+       case COMP_CODE_DEFLATE:      /* GZIP compression */  
+          *comp_type = 4;
+          comp_prm[0] = c_info.deflate.level; 
+	  ret = 0;
+          break;
+
+       default:
+
+          return FAIL;
+                    
+                     } /*end CASE */
+    } /* end if */
+    return(ret);
+
+}

Modified: packages/libhdf4/branches/upstream/current/mfhdf/fortran/fort_ps/mfsdpff.f
===================================================================
--- packages/libhdf4/branches/upstream/current/mfhdf/fortran/fort_ps/mfsdpff.f	2007-05-15 09:05:29 UTC (rev 830)
+++ packages/libhdf4/branches/upstream/current/mfhdf/fortran/fort_ps/mfsdpff.f	2007-05-15 09:53:05 UTC (rev 831)
@@ -10,7 +10,7 @@
 C*                                                                          *
 C****************************************************************************
 C
-C $Id: mfsdpff.f,v 1.5 1999/04/02 18:38:06 ptlu Exp $
+C $Id: mfsdpff.f,v 1.6 2001/09/24 23:03:06 epourmal Exp $
 C
 C mfsdpff.f, based on mfsdff.f,v 1.7
 C
@@ -1685,7 +1685,7 @@
         INTEGER FUNCTION scscompress(id, comp_type, comp_prm) 
       !MS$ATTRIBUTES C, reference, alias: '_SCSCOMPRESS' :: scscompress 
           integer id, comp_type, comp_prm(*) 
-        END FUNCTION sc scompress
+        END FUNCTION scscompress
       END INTERFACE
 
          sfscompress = scscompress(id, comp_type, comp_prm)
@@ -1693,6 +1693,44 @@
          end
 
 C-------------------------------------------------------------------------
+C        Name:      sfgcompress
+C        Purpose:   get compression information about  SDS 
+C        Inputs:    id       - data set ID
+C        Output:    comp_type - type of compression
+C                   supports the following compression types:
+C                            ( see hcomp.h  file) 
+C                            COMP_CODE_NONE = 0
+C                            COMP_CODE_RLE =1
+C                            COMP_CODE_SKPHUFF = 3
+C                            COMP_CODE_DEFLATE = 4 
+C                   comp_prm - compression parameter array:
+C                   comp_prm(1) = deflate_level for GZIP
+C                   comp_prm(1) = skphuff_skp_size for ADAPTIVE HUFFMAN
+C        NOTE: IT IS USER's responsibility to pass correct compression
+C              parameters for each type of compression
+C
+C        Returns:   0 on success, -1 on failure
+C        Calls:     scgcompress (C stub for SDsetcompress function)
+C-------------------------------------------------------------------------
+
+         INTEGER function sfgcompress(id, comp_type,comp_prm)
+	     !MS$if defined(BUILD_HDF_DLL)
+	     !MS$attributes dllexport :: sfgcompress 
+	     !MS$endif
+
+         INTEGER id, comp_type, comp_prm(*)
+      INTERFACE
+        INTEGER FUNCTION scgcompress(id, comp_type, comp_prm) 
+      !MS$ATTRIBUTES C, reference, alias: '_SCGCOMPRESS' :: scgcompress 
+          integer id, comp_type, comp_prm(*) 
+        END FUNCTION scgcompress
+      END INTERFACE
+         sfgcompress = scgcompress(id, comp_type, comp_prm)
+         return
+         end
+
+
+C-------------------------------------------------------------------------
 C        Name:      sfisrcrd
 C        Purpose:   checkes if SDS is appendable ,i.e, has unlimited 
 C                   dimension 

Modified: packages/libhdf4/branches/upstream/current/mfhdf/fortran/hdftest.f
===================================================================
--- packages/libhdf4/branches/upstream/current/mfhdf/fortran/hdftest.f	2007-05-15 09:05:29 UTC (rev 830)
+++ packages/libhdf4/branches/upstream/current/mfhdf/fortran/hdftest.f	2007-05-15 09:53:05 UTC (rev 831)
@@ -1209,7 +1209,9 @@
      .             sds_index(N_COMP_TYPES)
          integer   RANK, comp_type, c_out
          integer   comp_arg(N_COMP_ARG)
+         integer   comp_prm_out(N_COMP_ARG)
          integer   comp_type_out(N_COMP_TYPES)
+         integer   comp_typesd
          integer   d_dims(2)
          integer   ch_dims(2),ch_dims_out(2), start_dims(2)
          integer   start(2), stride(2), edges(2)
@@ -1229,7 +1231,7 @@
 C  SDS functions declarations
 C
          integer   sfstart, sfcreate, sfendacc, sfend,
-     .             sfn2index, sfselect,
+     .             sfn2index, sfselect, sfgcompress,
      .             sfsfill, sfschnk, sfscchnk, sfwchnk, 
      .             sfgichnk, sfrchnk, sfwdata, sfrdata
 C
@@ -1325,12 +1327,12 @@
      .           nbit_fill_one,
      .           nbit_start_bit,
      .           nbit_bit_len
-          parameter ( deflate_level    = 1,
+          parameter ( deflate_level    = 6,
      .                skphuff_skp_size = 2,
      .                nbit_sign_ext    = 0,
      .                nbit_fill_one    = 0,
-     .                nbit_start_bit   = 0,
-     .                nbit_bit_len     = 31 )
+     .                nbit_start_bit   = 6,
+     .                nbit_bit_len     = 7 )
 
 
 C
@@ -1580,6 +1582,60 @@
                 print *, 'sfselect failed for', i, ' -th dataset'
                 err_chunk = err_chunk + 1
             endif
+C
+C  Find out type of compression used and compression parameters.
+C
+            status = sfgcompress(sds_id(i), comp_typesd, comp_prm_out)
+	    if (status .eq. -1) then
+            print *, 'sfgcompress failed for', i, ' -th dataset'
+                err_chunk = err_chunk + 1
+            endif
+            if (name(i) .eq. 'Nocomp_data') then
+                if (comp_typesd .ne. COMP_CODE_NONE) then
+            print *, 'wrong compression type for Nocomp_data dataset'
+                err_chunk = err_chunk + 1
+                endif
+            endif
+            if (name(i) .eq. 'Rlcomp_data') then
+                if (comp_typesd .ne. COMP_CODE_RLE) then
+            print *, 'wrong compression type for Rlcomp_data dataset'
+                err_chunk = err_chunk + 1
+                endif
+            endif
+            if (name(i) .eq. 'Hucomp_data') then
+                if (comp_typesd .ne. COMP_CODE_SKPHUFF) then
+            print *, 'wrong compression type for Hucomp_data dataset'
+                err_chunk = err_chunk + 1
+                endif
+                if (comp_prm_out(1). ne. skphuff_skp_size) then
+         print *, 'wrong compression parameter for Hucomp_data dataset'
+                err_chunk = err_chunk + 1
+                endif
+
+            endif
+            if (name(i) .eq. 'Gzcomp_data') then
+                if (comp_typesd .ne. COMP_CODE_DEFLATE) then
+          print *, 'wrong compression type for Gzcomp_data dataset'
+                endif
+                if (comp_prm_out(1). ne. deflate_level) then
+          print *, 'wrong compression parameter for Gzcomp_data dataset'
+                err_chunk = err_chunk + 1
+                endif
+            endif
+
+            if (name(i) .eq. 'Nbcomp_data') then
+                if (comp_typesd .ne. COMP_CODE_NBIT) then
+          print *, 'wrong compression type for Nbcomp_data dataset'
+                endif
+                if ((comp_prm_out(1) .ne. nbit_sign_ext) .or.
+     .          (comp_prm_out(2) .ne. nbit_fill_one) .or.
+     .          (comp_prm_out(3) .ne. nbit_start_bit) .or.
+     .          (comp_prm_out(4) .ne. nbit_bit_len)) then
+          print *, 'wrong compression parameter for Nbcomp_data dataset'
+                err_chunk = err_chunk + 1
+                endif
+            endif
+
 201      continue
 
 C
@@ -1831,12 +1887,12 @@
      .           nbit_fill_one,
      .           nbit_start_bit,
      .           nbit_bit_len
-          parameter ( deflate_level    = 1,
+          parameter ( deflate_level    = 6,
      .                skphuff_skp_size = 2,
      .                nbit_sign_ext    = 0,
      .                nbit_fill_one    = 0,
-     .                nbit_start_bit   = 0,
-     .                nbit_bit_len     = 31 )
+     .                nbit_start_bit   = 6,
+     .                nbit_bit_len     = 7 )
 
 
 C
@@ -2221,8 +2277,8 @@
          integer   sd_id(N_COMP_TYPES),
      .             sds_id(N_COMP_TYPES),
      .             sds_index(N_COMP_TYPES)
-         integer   RANK, comp_type
-         integer   comp_arg(N_COMP_ARG)
+         integer   RANK, comp_type, comp_type_out
+         integer   comp_arg(N_COMP_ARG), comp_prm_out(N_COMP_ARG)
          integer   d_dims(2)
          integer   start(2), stride(2), edges(2)
          integer   status, fill_value
@@ -2242,7 +2298,7 @@
          integer   sfstart, sfcreate, sfendacc, sfend,
      .             sfn2index, sfselect,
      .             sfsfill, sfrdata,
-     .             sfwdata, sfscompress
+     .             sfwdata, sfscompress, sfgcompress
 C
 C  Initial data declarations( change if you which to test larger arrays )
 C
@@ -2317,7 +2373,7 @@
 C
          integer deflate_level,
      .           skphuff_skp_size
-          parameter ( deflate_level    = 1,
+          parameter ( deflate_level    = 6,
      .                skphuff_skp_size = 2 )
 
 
@@ -2475,8 +2531,48 @@
                 print *, 'sfselect failed for', i, ' -th dataset'
                 err_compress = err_compress + 1
             endif
+C
+C  Find out type of compression used and compression parameters.
+C
+            status = sfgcompress(sds_id(i), comp_type_out, comp_prm_out)
+	    if (status .eq. -1) then
+            print *, 'sfgcompress failed for', i, ' -th dataset'
+                err_compress = err_compress + 1
+            endif
+            if (name(i) .eq. 'Nocomp_data') then
+                if (comp_type_out .ne. COMP_CODE_NONE) then
+            print *, 'wrong compression type for Nocomp_data dataset'
+                err_compress = err_compress + 1
+                endif
+            endif
+            if (name(i) .eq. 'Rlcomp_data') then
+                if (comp_type_out .ne. COMP_CODE_RLE) then
+            print *, 'wrong compression type for Rlcomp_data dataset'
+                err_compress = err_compress + 1
+                endif
+            endif
+            if (name(i) .eq. 'Hucomp_data') then
+                if (comp_type_out .ne. COMP_CODE_SKPHUFF) then
+            print *, 'wrong compression type for Hucomp_data dataset'
+                err_compress = err_compress + 1
+                endif
+                if (comp_prm_out(1). ne. skphuff_skp_size) then
+         print *, 'wrong compression parameter for Hucomp_data dataset'
+                err_compress = err_compress + 1
+                endif
 
+            endif
+            if (name(i) .eq. 'Gzcomp_data') then
+                if (comp_type_out .ne. COMP_CODE_DEFLATE) then
+          print *, 'wrong compression type for Gzcomp_data dataset'
+                endif
+                if (comp_prm_out(1). ne. deflate_level) then
+          print *, 'wrong compression parameter for Gzcomp_data dataset'
+                err_compress = err_compress + 1
+                endif
+            endif
 
+
 C
 C   Read part of the data back using sfrdata function
 C

Modified: packages/libhdf4/branches/upstream/current/mfhdf/fortran/mfsdf.c
===================================================================
--- packages/libhdf4/branches/upstream/current/mfhdf/fortran/mfsdf.c	2007-05-15 09:05:29 UTC (rev 830)
+++ packages/libhdf4/branches/upstream/current/mfhdf/fortran/mfsdf.c	2007-05-15 09:53:05 UTC (rev 831)
@@ -11,10 +11,10 @@
  ****************************************************************************/
 
 #ifdef RCSID
-static char RcsId[] = "@(#)$Revision: 1.35 $";
+static char RcsId[] = "@(#)$Revision: 1.40 $";
 #endif
 
-/* $Id: mfsdf.c,v 1.35 1999/03/27 22:57:18 epourmal Exp $ */
+/* $Id: mfsdf.c,v 1.40 2004/11/22 20:15:04 epourmal Exp $ */
 
 /*
 
@@ -1504,7 +1504,7 @@
  * Returns:  0 on success, -1 on failure with error set
  *----------------------------------------------------------------------------*/   
     FRETVAL (intf)
-#ifdef PROTOTYPEi
+#ifdef PROTOTYPE
        nscrchnk(intf *id, intf *start, VOIDP num_data)
 #else
        nscrchnk(id, start, num_data)
@@ -1834,7 +1834,7 @@
 
     int32 sdsid;              /* SDS id               */
     comp_info c_info;         /* compression info     */
-    int32 c_type;              /* compression type definition */
+    comp_coder_t c_type;              /* compression type definition */
 
     int   CASE;
     intf ret;
@@ -1873,6 +1873,95 @@
     return(ret);
 
 }
+/*-------------------------------------------------------------------------
+ * Name:    scgcompress
+ * Puporse: Call SDgetcompress 
+ * Inputs:  id: SDS access id
+ * Outputs: comp_type:  type of compression
+ *                      COMP_CODE_NONE = 0
+ *                      COMP_CODE_RLE  = 1
+ *                      COMP_CODE_NBIT = 2
+ *                      COMP_CODE_SKPHUFF = 3
+ *                      COMP_CODE_DEFLATE = 4
+ *          SKPHUFF:
+ *          comp_prm[0] = skphuff_skp_size: size of individual elements for 
+ *                            Adaptive Huffman compression algorithm
+ *          GZIP:
+ *          comp_prm[0] = deflate_level:    GZIP  compression parameter
+ *          NBIT:
+ *          comp_prm[0] = nbit_sign_ext
+ *          comp_prm[1] = nbit_fill_one
+ *          comp_prm[2] = nbit_start_bit
+ *          comp_prm[3] = nbit_bit_len
+ * Returns: 0 on success, -1 on failure with error set
+ * Users:   HDF Fortran programmers          
+ *-------------------------------------------------------------------------*/
+
+    FRETVAL (intf)
+#ifdef PROTOTYPE
+       nscgcompress(intf *id, intf *comp_type, intf *comp_prm)
+#else
+       nscgcompress( id, comp_type, comp_prm)
+       intf *id;
+       intf *comp_type;
+       intf *comp_prm;
+#endif /* PROTOTYPE */
+{
+
+    comp_info c_info;         /* compression info     */
+    comp_coder_t c_type;              /* compression type definition */
+
+    int   CASE;
+    intn c_ret;
+    intf ret = -1;
+
+
+    c_ret = SDgetcompress(*id, &c_type, &c_info);
+    if (c_ret == 0) {
+    CASE = (int)c_type;
+    switch (CASE)  {
+
+       case COMP_CODE_NONE:       /* No compression */
+         *comp_type = 0;
+	  ret = 0;
+         break;
+    
+       case COMP_CODE_RLE:             /* RLE compression */
+         *comp_type = 1;
+	  ret = 0;
+         break;
+
+       case COMP_CODE_NBIT:      /* NBIT encoding */
+          *comp_type = 2;
+          comp_prm[0] = c_info.nbit.sign_ext; 
+          comp_prm[1] = c_info.nbit.fill_one; 
+          comp_prm[2] = c_info.nbit.start_bit; 
+          comp_prm[3] = c_info.nbit.bit_len; 
+	  ret = 0;
+          break;
+
+ 
+       case COMP_CODE_SKPHUFF:      /* Skipping Huffman encoding */
+          *comp_type = 3;
+          comp_prm[0] = c_info.skphuff.skp_size; 
+	  ret = 0;
+          break;
+
+       case COMP_CODE_DEFLATE:      /* GZIP compression */  
+          *comp_type = 4;
+          comp_prm[0] = c_info.deflate.level; 
+	  ret = 0;
+          break;
+
+       default:
+
+          return FAIL;
+                    
+                     } /*end CASE */
+    } /* end if */
+    return(ret);
+
+}
 /*-----------------------------------------------------------------------------
  * Name:    sfisrcrd
  * Purpose: call SDisrecord to see if a dataset is a record variable

Modified: packages/libhdf4/branches/upstream/current/mfhdf/fortran/mfsdff.f
===================================================================
--- packages/libhdf4/branches/upstream/current/mfhdf/fortran/mfsdff.f	2007-05-15 09:05:29 UTC (rev 830)
+++ packages/libhdf4/branches/upstream/current/mfhdf/fortran/mfsdff.f	2007-05-15 09:53:05 UTC (rev 831)
@@ -10,7 +10,7 @@
 C*                                                                          *
 C****************************************************************************
 C
-C $Id: mfsdff.f,v 1.10 1999/03/27 22:57:17 epourmal Exp $
+C $Id: mfsdff.f,v 1.11 2001/09/21 15:53:57 epourmal Exp $
 C
 
 C----------------------------------------------------------------------
@@ -557,6 +557,36 @@
          end
 
 C-------------------------------------------------------------------------
+C        Name:      sfgcompress
+C        Purpose:   get compression information about  SDS 
+C        Inputs:    id       - data set ID
+C        Output:    comp_type - type of compression
+C                   supports the following compression types:
+C                            ( see hcomp.h  file) 
+C                            COMP_CODE_NONE = 0
+C                            COMP_CODE_RLE =1
+C                            COMP_CODE_SKPHUFF = 3
+C                            COMP_CODE_DEFLATE = 4 
+C                   comp_prm - compression parameter array:
+C                   comp_prm(1) = deflate_level for GZIP
+C                   comp_prm(1) = skphuff_skp_size for ADAPTIVE HUFFMAN
+C        NOTE: IT IS USER's responsibility to pass correct compression
+C              parameters for each type of compression
+C
+C        Returns:   0 on success, -1 on failure
+C        Calls:     scgcompress (C stub for SDsetcompress function)
+C-------------------------------------------------------------------------
+
+         INTEGER function sfgcompress(id, comp_type,comp_prm)
+
+         INTEGER id, comp_type, comp_prm(*)
+         INTEGER scgcompress 
+         sfgcompress = scgcompress(id, comp_type, comp_prm)
+         return
+         end
+
+
+C-------------------------------------------------------------------------
 C        Name:      sfchempty
 C        Purpose:   checks whether an SDS is empty ( data has not been written) 
 C        Inputs:    id       - data set ID

Modified: packages/libhdf4/branches/upstream/current/mfhdf/fortran/msoft/ftest.for
===================================================================
--- packages/libhdf4/branches/upstream/current/mfhdf/fortran/msoft/ftest.for	2007-05-15 09:05:29 UTC (rev 830)
+++ packages/libhdf4/branches/upstream/current/mfhdf/fortran/msoft/ftest.for	2007-05-15 09:53:05 UTC (rev 831)
@@ -1,7 +1,7 @@
 c********************************************************************
 c   Copyright 1989, University Corporation for Atmospheric Research
 c   See netcdf/README file for copying and redistribution conditions.
-c   $Header: /afs/ncsa/projects/hdf/cvs/dist/mfhdf/fortran/msoft/ftest.for,v 1.1 1993/04/21 21:49:16 chouck Exp $
+c   $Header: /afs/ncsa/projects/hdf/cvs/hdf4/mfhdf/fortran/msoft/ftest.for,v 1.1 1993/04/21 21:49:16 chouck Exp $
 c********************************************************************/
 
 $include: "msoft.int"

Modified: packages/libhdf4/branches/upstream/current/mfhdf/fortran/msoft/jackets.c
===================================================================
--- packages/libhdf4/branches/upstream/current/mfhdf/fortran/msoft/jackets.c	2007-05-15 09:05:29 UTC (rev 830)
+++ packages/libhdf4/branches/upstream/current/mfhdf/fortran/msoft/jackets.c	2007-05-15 09:53:05 UTC (rev 831)
@@ -2,7 +2,7 @@
  *	Copyright 1990, University Corporation for Atmospheric Research
  *      See netcdf/README file for copying and redistribution conditions.
  */
-/* $Header: /afs/ncsa/projects/hdf/cvs/dist/mfhdf/fortran/msoft/jackets.c,v 1.1 1993/04/21 21:49:17 chouck Exp $ */
+/* $Header: /afs/ncsa/projects/hdf/cvs/hdf4/mfhdf/fortran/msoft/jackets.c,v 1.1 1993/04/21 21:49:17 chouck Exp $ */
 /*
  * OVERVIEW
  *

Added: packages/libhdf4/branches/upstream/current/mfhdf/fortran/test_nc.cdl
===================================================================
--- packages/libhdf4/branches/upstream/current/mfhdf/fortran/test_nc.cdl	                        (rev 0)
+++ packages/libhdf4/branches/upstream/current/mfhdf/fortran/test_nc.cdl	2007-05-15 09:53:05 UTC (rev 831)
@@ -0,0 +1,42 @@
+netcdf new {
+dimensions:
+	x    = 2;
+	y    = 3;
+	time = UNLIMITED ; // (12 currently)
+variables:
+        float a(x,y);
+	int date(time) ;
+	int time(time) ;
+        short b(time, y, x);
+        double c(y);
+// global attributes:
+    :Description = "Attributes";
+    :int_attr = -100, 200, -300, 400, -500;
+    :float_attr = 1.f, 2.f, 3.f;
+    :short_attr = 0s, 1s;
+    :double_attr = -1.d, 2.d, -7.d;
+
+data:
+ a = 1.0, 2.0, 3.0, 4.0, 5.0, 6.0;
+
+ date = 840116, 840214, 840316, 840415, 840516, 840615, 840716, 840816, 
+    840915, 841016, 841115, 841216 ;
+
+ time = 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12 ;
+  
+ b = 1, 1, 2, 2, 3, 3,
+     4, 4, 5, 5, 6, 6,
+     7, 7, 8, 8, 9, 9,
+    10, 10, 11, 11, 12, 12,
+    13, 13, 14, 14, 15, 15,
+    16, 16, 17, 17, 18, 18,
+    19, 19, 20, 20, 21, 22,
+    23, 23, 24, 24, 25, 25,
+    26, 26, 27, 27, 28, 28,
+    29, 29, 30, 30, 31, 31,
+    32, 32, 33, 33, 34, 34,
+    35, 35, 36, 36, 37, 37 ;
+ 
+ c = 2.d, 3.d, 100.d;
+
+}

Added: packages/libhdf4/branches/upstream/current/mfhdf/fortran/test_nc.nc
===================================================================
(Binary files differ)


Property changes on: packages/libhdf4/branches/upstream/current/mfhdf/fortran/test_nc.nc
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Modified: packages/libhdf4/branches/upstream/current/mfhdf/fortran/vms/ftest.for
===================================================================
--- packages/libhdf4/branches/upstream/current/mfhdf/fortran/vms/ftest.for	2007-05-15 09:05:29 UTC (rev 830)
+++ packages/libhdf4/branches/upstream/current/mfhdf/fortran/vms/ftest.for	2007-05-15 09:53:05 UTC (rev 831)
@@ -1,7 +1,7 @@
 c********************************************************************
 c   Copyright 1993, UCAR/Unidata
 c   See netcdf/COPYRIGHT file for copying and redistribution conditions.
-c   $Header: /afs/ncsa/projects/hdf/cvs/dist/mfhdf/fortran/vms/ftest.for,v 1.2 1996/01/30 16:20:52 sxu Exp $
+c   $Header: /afs/ncsa/projects/hdf/cvs/hdf4/mfhdf/fortran/vms/ftest.for,v 1.2 1996/01/30 16:20:52 sxu Exp $
 c********************************************************************/
 
 

Modified: packages/libhdf4/branches/upstream/current/mfhdf/fortran/vms/ftest.m4
===================================================================
--- packages/libhdf4/branches/upstream/current/mfhdf/fortran/vms/ftest.m4	2007-05-15 09:05:29 UTC (rev 830)
+++ packages/libhdf4/branches/upstream/current/mfhdf/fortran/vms/ftest.m4	2007-05-15 09:53:05 UTC (rev 831)
@@ -1,7 +1,7 @@
 c********************************************************************
 c   Copyright 1989, University Corporation for Atmospheric Research
 c   See netcdf/README file for copying and redistribution conditions.
-c   $Header: /afs/ncsa/projects/hdf/cvs/dist/mfhdf/fortran/vms/ftest.m4,v 1.1 1993/11/22 16:50:42 georgev Exp $
+c   $Header: /afs/ncsa/projects/hdf/cvs/hdf4/mfhdf/fortran/vms/ftest.m4,v 1.1 1993/11/22 16:50:42 georgev Exp $
 c********************************************************************/
 c
 c     program to test the VMS Fortran jacket interface to the netCDF

Modified: packages/libhdf4/branches/upstream/current/mfhdf/fortran/vms/jackets.c
===================================================================
--- packages/libhdf4/branches/upstream/current/mfhdf/fortran/vms/jackets.c	2007-05-15 09:05:29 UTC (rev 830)
+++ packages/libhdf4/branches/upstream/current/mfhdf/fortran/vms/jackets.c	2007-05-15 09:53:05 UTC (rev 831)
@@ -2,7 +2,7 @@
  *	Copyright 1990, University Corporation for Atmospheric Research
  *      See netcdf/README file for copying and redistribution conditions.
  */
-/* $Header: /afs/ncsa/projects/hdf/cvs/dist/mfhdf/fortran/vms/jackets.c,v 1.3 1998/06/25 17:06:14 epourmal Exp $ */
+/* $Header: /afs/ncsa/projects/hdf/cvs/hdf4/mfhdf/fortran/vms/jackets.c,v 1.3 1998/06/25 17:06:14 epourmal Exp $ */
 /*
  * OVERVIEW
  *

Added: packages/libhdf4/branches/upstream/current/mfhdf/hdfimport/Makefile.am
===================================================================
--- packages/libhdf4/branches/upstream/current/mfhdf/hdfimport/Makefile.am	                        (rev 0)
+++ packages/libhdf4/branches/upstream/current/mfhdf/hdfimport/Makefile.am	2007-05-15 09:53:05 UTC (rev 831)
@@ -0,0 +1,35 @@
+#############################################################################
+##                      Setup for building programs                        ##
+#############################################################################
+
+## Setup the different includes and preprocessor #defines we need.
+INCLUDES=-I$(top_srcdir)/hdf/src        \
+         -I$(top_srcdir)/mfhdf/libsrc   \
+         -I$(top_srcdir)/mfhdf/port     \
+         -I../libsrc
+DEFINES=-DNDEBUG -DHDF
+AM_CPPFLAGS=$(INCLUDES) $(DEFINES)
+
+#############################################################################
+##                          Programs to build                              ##
+#############################################################################
+
+bin_PROGRAMS = hdfimport
+
+hdfimport_SOURCES = hdfimport.c
+hdfimport_LDADD = ../libsrc/libmfhdf.a $(top_builddir)/hdf/src/libdf.a @LIBS@
+hdfimport_DEPENDENCIES = $(top_builddir)/hdf/src/libdf.a ../libsrc/libmfhdf.a
+
+#############################################################################
+##                   Testing -- Here there be dragons.                     ##
+#############################################################################
+
+check_PROGRAMS = hdfimporttest
+check_SCRIPTS = testutil.sh
+
+hdfimporttest_SOURCES = hdfimporttest.c
+hdfimporttest_LDADD = ../libsrc/libmfhdf.a $(top_builddir)/hdf/src/libdf.a @LIBS@
+hdfimporttest_DEPENDENCIES = $(top_builddir)/hdf/src/libdf.a ../libsrc/libmfhdf.a
+
+check: hdfimporttest
+	@$(SHELL) ./testutil.sh

Added: packages/libhdf4/branches/upstream/current/mfhdf/hdfimport/Makefile.in
===================================================================
--- packages/libhdf4/branches/upstream/current/mfhdf/hdfimport/Makefile.in	                        (rev 0)
+++ packages/libhdf4/branches/upstream/current/mfhdf/hdfimport/Makefile.in	2007-05-15 09:53:05 UTC (rev 831)
@@ -0,0 +1,461 @@
+# Makefile.in generated by automake 1.7.7 from Makefile.am.
+# @configure_input@
+
+# Copyright 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003
+# 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.
+
+ at SET_MAKE@
+
+#############################################################################
+#############################################################################
+
+srcdir = @srcdir@
+top_srcdir = @top_srcdir@
+VPATH = @srcdir@
+pkgdatadir = $(datadir)/@PACKAGE@
+pkglibdir = $(libdir)/@PACKAGE@
+pkgincludedir = $(includedir)/@PACKAGE@
+top_builddir = ../..
+
+am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
+INSTALL = @INSTALL@
+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 = :
+host_triplet = @host@
+ACLOCAL = @ACLOCAL@
+AMDEP_FALSE = @AMDEP_FALSE@
+AMDEP_TRUE = @AMDEP_TRUE@
+AMTAR = @AMTAR@
+AR = @AR@
+AUTOCONF = @AUTOCONF@
+AUTOHEADER = @AUTOHEADER@
+AUTOMAKE = @AUTOMAKE@
+AWK = @AWK@
+CC = @CC@
+CCDEPMODE = @CCDEPMODE@
+CFLAGS = @CFLAGS@
+CPP = @CPP@
+CPPFLAGS = @CPPFLAGS@
+CXX = @CXX@
+CXXCPP = @CXXCPP@
+CXXDEPMODE = @CXXDEPMODE@
+CXXFLAGS = @CXXFLAGS@
+CYGPATH_W = @CYGPATH_W@
+DEFS = @DEFS@
+DEPDIR = @DEPDIR@
+DIFF = @DIFF@
+ECHO_C = @ECHO_C@
+ECHO_N = @ECHO_N@
+ECHO_T = @ECHO_T@
+EGREP = @EGREP@
+EXEEXT = @EXEEXT@
+F77 = @F77@
+FFLAGS = @FFLAGS@
+HDF_BUILD_FORTRAN_FALSE = @HDF_BUILD_FORTRAN_FALSE@
+HDF_BUILD_FORTRAN_TRUE = @HDF_BUILD_FORTRAN_TRUE@
+HDF_BUILD_XDR_FALSE = @HDF_BUILD_XDR_FALSE@
+HDF_BUILD_XDR_TRUE = @HDF_BUILD_XDR_TRUE@
+INSTALL_DATA = @INSTALL_DATA@
+INSTALL_PROGRAM = @INSTALL_PROGRAM@
+INSTALL_SCRIPT = @INSTALL_SCRIPT@
+INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
+LDFLAGS = @LDFLAGS@
+LEX = @LEX@
+LEXLIB = @LEXLIB@
+LEX_OUTPUT_ROOT = @LEX_OUTPUT_ROOT@
+LIBOBJS = @LIBOBJS@
+LIBS = @LIBS@
+LN_S = @LN_S@
+LTLIBOBJS = @LTLIBOBJS@
+MAINT = @MAINT@
+MAINTAINER_MODE_FALSE = @MAINTAINER_MODE_FALSE@
+MAINTAINER_MODE_TRUE = @MAINTAINER_MODE_TRUE@
+MAKEINFO = @MAKEINFO@
+NEQN = @NEQN@
+OBJEXT = @OBJEXT@
+PACKAGE = @PACKAGE@
+PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
+PACKAGE_NAME = @PACKAGE_NAME@
+PACKAGE_STRING = @PACKAGE_STRING@
+PACKAGE_TARNAME = @PACKAGE_TARNAME@
+PACKAGE_VERSION = @PACKAGE_VERSION@
+PATH_SEPARATOR = @PATH_SEPARATOR@
+RANLIB = @RANLIB@
+SET_MAKE = @SET_MAKE@
+SHELL = @SHELL@
+STRIP = @STRIP@
+TBL = @TBL@
+VERSION = @VERSION@
+YACC = @YACC@
+ac_ct_CC = @ac_ct_CC@
+ac_ct_CXX = @ac_ct_CXX@
+ac_ct_F77 = @ac_ct_F77@
+ac_ct_RANLIB = @ac_ct_RANLIB@
+ac_ct_STRIP = @ac_ct_STRIP@
+am__fastdepCC_FALSE = @am__fastdepCC_FALSE@
+am__fastdepCC_TRUE = @am__fastdepCC_TRUE@
+am__fastdepCXX_FALSE = @am__fastdepCXX_FALSE@
+am__fastdepCXX_TRUE = @am__fastdepCXX_TRUE@
+am__include = @am__include@
+am__leading_dot = @am__leading_dot@
+am__quote = @am__quote@
+bindir = @bindir@
+build = @build@
+build_alias = @build_alias@
+build_cpu = @build_cpu@
+build_os = @build_os@
+build_vendor = @build_vendor@
+datadir = @datadir@
+exec_prefix = @exec_prefix@
+host = @host@
+host_alias = @host_alias@
+host_cpu = @host_cpu@
+host_os = @host_os@
+host_vendor = @host_vendor@
+includedir = @includedir@
+infodir = @infodir@
+install_sh = @install_sh@
+libdir = @libdir@
+libexecdir = @libexecdir@
+localstatedir = @localstatedir@
+mandir = @mandir@
+oldincludedir = @oldincludedir@
+prefix = @prefix@
+program_transform_name = @program_transform_name@
+sbindir = @sbindir@
+sharedstatedir = @sharedstatedir@
+sysconfdir = @sysconfdir@
+target_alias = @target_alias@
+
+INCLUDES = -I$(top_srcdir)/hdf/src        \
+         -I$(top_srcdir)/mfhdf/libsrc   \
+         -I$(top_srcdir)/mfhdf/port     \
+         -I../libsrc
+
+DEFINES = -DNDEBUG -DHDF
+AM_CPPFLAGS = $(INCLUDES) $(DEFINES)
+
+
+#############################################################################
+#############################################################################
+bin_PROGRAMS = hdfimport
+
+hdfimport_SOURCES = hdfimport.c
+hdfimport_LDADD = ../libsrc/libmfhdf.a $(top_builddir)/hdf/src/libdf.a @LIBS@
+hdfimport_DEPENDENCIES = $(top_builddir)/hdf/src/libdf.a ../libsrc/libmfhdf.a
+
+
+#############################################################################
+#############################################################################
+check_PROGRAMS = hdfimporttest
+check_SCRIPTS = testutil.sh
+
+hdfimporttest_SOURCES = hdfimporttest.c
+hdfimporttest_LDADD = ../libsrc/libmfhdf.a $(top_builddir)/hdf/src/libdf.a @LIBS@
+hdfimporttest_DEPENDENCIES = $(top_builddir)/hdf/src/libdf.a ../libsrc/libmfhdf.a
+subdir = mfhdf/hdfimport
+ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
+mkinstalldirs = $(SHELL) $(top_srcdir)/bin/mkinstalldirs
+CONFIG_HEADER = $(top_builddir)/hdf/src/h4config.h
+CONFIG_CLEAN_FILES = testutil.sh
+bin_PROGRAMS = hdfimport$(EXEEXT)
+check_PROGRAMS = hdfimporttest$(EXEEXT)
+PROGRAMS = $(bin_PROGRAMS)
+
+am_hdfimport_OBJECTS = hdfimport.$(OBJEXT)
+hdfimport_OBJECTS = $(am_hdfimport_OBJECTS)
+hdfimport_LDFLAGS =
+am_hdfimporttest_OBJECTS = hdfimporttest.$(OBJEXT)
+hdfimporttest_OBJECTS = $(am_hdfimporttest_OBJECTS)
+hdfimporttest_LDFLAGS =
+
+DEFAULT_INCLUDES =  -I. -I$(srcdir) -I$(top_builddir)/hdf/src
+depcomp = $(SHELL) $(top_srcdir)/bin/depcomp
+am__depfiles_maybe = depfiles
+ at AMDEP_TRUE@DEP_FILES = ./$(DEPDIR)/hdfimport.Po \
+ at AMDEP_TRUE@	./$(DEPDIR)/hdfimporttest.Po
+COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \
+	$(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
+CCLD = $(CC)
+LINK = $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@
+DIST_SOURCES = $(hdfimport_SOURCES) $(hdfimporttest_SOURCES)
+DIST_COMMON = $(srcdir)/Makefile.in Makefile.am testutil.sh.in
+SOURCES = $(hdfimport_SOURCES) $(hdfimporttest_SOURCES)
+
+all: all-am
+
+.SUFFIXES:
+.SUFFIXES: .c .o .obj
+$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ Makefile.am  $(top_srcdir)/configure.ac $(ACLOCAL_M4)
+	cd $(top_srcdir) && \
+	  $(AUTOMAKE) --foreign  mfhdf/hdfimport/Makefile
+Makefile: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.in  $(top_builddir)/config.status
+	cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)
+testutil.sh: $(top_builddir)/config.status testutil.sh.in
+	cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@
+binPROGRAMS_INSTALL = $(INSTALL_PROGRAM)
+install-binPROGRAMS: $(bin_PROGRAMS)
+	@$(NORMAL_INSTALL)
+	$(mkinstalldirs) $(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-checkPROGRAMS:
+	-test -z "$(check_PROGRAMS)" || rm -f $(check_PROGRAMS)
+hdfimport$(EXEEXT): $(hdfimport_OBJECTS) $(hdfimport_DEPENDENCIES) 
+	@rm -f hdfimport$(EXEEXT)
+	$(LINK) $(hdfimport_LDFLAGS) $(hdfimport_OBJECTS) $(hdfimport_LDADD) $(LIBS)
+hdfimporttest$(EXEEXT): $(hdfimporttest_OBJECTS) $(hdfimporttest_DEPENDENCIES) 
+	@rm -f hdfimporttest$(EXEEXT)
+	$(LINK) $(hdfimporttest_LDFLAGS) $(hdfimporttest_OBJECTS) $(hdfimporttest_LDADD) $(LIBS)
+
+mostlyclean-compile:
+	-rm -f *.$(OBJEXT) core *.core
+
+distclean-compile:
+	-rm -f *.tab.c
+
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/hdfimport.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/hdfimporttest.Po at am__quote@
+
+.c.o:
+ at am__fastdepCC_TRUE@	if $(COMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" \
+ at am__fastdepCC_TRUE@	  -c -o $@ `test -f '$<' || echo '$(srcdir)/'`$<; \
+ at am__fastdepCC_TRUE@	then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; \
+ at am__fastdepCC_TRUE@	else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; \
+ at am__fastdepCC_TRUE@	fi
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	depfile='$(DEPDIR)/$*.Po' tmpdepfile='$(DEPDIR)/$*.TPo' @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	$(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCC_FALSE@	$(COMPILE) -c `test -f '$<' || echo '$(srcdir)/'`$<
+
+.c.obj:
+ at am__fastdepCC_TRUE@	if $(COMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" \
+ at am__fastdepCC_TRUE@	  -c -o $@ `if test -f '$<'; then $(CYGPATH_W) '$<'; else $(CYGPATH_W) '$(srcdir)/$<'; fi`; \
+ at am__fastdepCC_TRUE@	then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; \
+ at am__fastdepCC_TRUE@	else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; \
+ at am__fastdepCC_TRUE@	fi
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	depfile='$(DEPDIR)/$*.Po' tmpdepfile='$(DEPDIR)/$*.TPo' @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	$(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCC_FALSE@	$(COMPILE) -c `if test -f '$<'; then $(CYGPATH_W) '$<'; else $(CYGPATH_W) '$(srcdir)/$<'; fi`
+uninstall-info-am:
+
+ETAGS = etags
+ETAGSFLAGS =
+
+CTAGS = ctags
+CTAGSFLAGS =
+
+tags: TAGS
+
+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; } \
+	       END { for (i in files) print i; }'`; \
+	mkid -fID $$unique
+
+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; } \
+	       END { for (i in files) print i; }'`; \
+	test -z "$(ETAGS_ARGS)$$tags$$unique" \
+	  || $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
+	     $$tags $$unique
+
+ctags: CTAGS
+CTAGS:  $(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; } \
+	       END { 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
+DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
+
+top_distdir = ../..
+distdir = $(top_distdir)/$(PACKAGE)-$(VERSION)
+
+distdir: $(DISTFILES)
+	@srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \
+	topsrcdirstrip=`echo "$(top_srcdir)" | sed 's|.|.|g'`; \
+	list='$(DISTFILES)'; for file in $$list; do \
+	  case $$file in \
+	    $(srcdir)/*) file=`echo "$$file" | sed "s|^$$srcdirstrip/||"`;; \
+	    $(top_srcdir)/*) file=`echo "$$file" | sed "s|^$$topsrcdirstrip/|$(top_builddir)/|"`;; \
+	  esac; \
+	  if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
+	  dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \
+	  if test "$$dir" != "$$file" && test "$$dir" != "."; then \
+	    dir="/$$dir"; \
+	    $(mkinstalldirs) "$(distdir)$$dir"; \
+	  else \
+	    dir=''; \
+	  fi; \
+	  if test -d $$d/$$file; then \
+	    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
+	$(MAKE) $(AM_MAKEFLAGS) $(check_PROGRAMS) $(check_SCRIPTS)
+check: check-am
+all-am: Makefile $(PROGRAMS)
+
+installdirs:
+	$(mkinstalldirs) $(DESTDIR)$(bindir)
+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_STRIP_FLAG=-s \
+	  `test -z '$(STRIP)' || \
+	    echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
+mostlyclean-generic:
+
+clean-generic:
+
+distclean-generic:
+	-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-checkPROGRAMS clean-generic \
+	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:
+
+info: info-am
+
+info-am:
+
+install-data-am:
+
+install-exec-am: install-binPROGRAMS
+
+install-info: install-info-am
+
+install-man:
+
+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 uninstall-info-am
+
+.PHONY: CTAGS GTAGS all all-am check check-am clean clean-binPROGRAMS \
+	clean-checkPROGRAMS clean-generic ctags distclean \
+	distclean-compile distclean-generic distclean-tags distdir dvi \
+	dvi-am info info-am install install-am install-binPROGRAMS \
+	install-data install-data-am install-exec install-exec-am \
+	install-info install-info-am install-man 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 uninstall-info-am
+
+
+check: hdfimporttest
+	@$(SHELL) ./testutil.sh
+# 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:


Property changes on: packages/libhdf4/branches/upstream/current/mfhdf/hdfimport/Makefile.in
___________________________________________________________________
Name: svn:executable
   + *

Added: packages/libhdf4/branches/upstream/current/mfhdf/hdfimport/hdfimport.c
===================================================================
--- packages/libhdf4/branches/upstream/current/mfhdf/hdfimport/hdfimport.c	                        (rev 0)
+++ packages/libhdf4/branches/upstream/current/mfhdf/hdfimport/hdfimport.c	2007-05-15 09:53:05 UTC (rev 831)
@@ -0,0 +1,3760 @@
+/****************************************************************************
+ * NCSA HDF                                                                 *
+ * Software Development Group                                               *
+ * National Center for Supercomputing Applications                          *
+ * University of Illinois at Urbana-Champaign                               *
+ * 605 E. Springfield, Champaign IL 61820                                   *
+ *                                                                          *
+ * For conditions of distribution and use, see the accompanying             *
+ * hdf/COPYING file.                                                        *
+ *                                                                          *
+ ****************************************************************************/
+/* 
+ * Name:
+ *      hdfimport (previously fp2hdf) 
+ *
+ * Purpose:
+ *      To convert floating point and/or integer data to HDF Scientific Data Set (SDS)
+ *      and/or 8-bit Raster Image Set (RIS8) format, storing the results
+ *      in an HDF file.  The image data can be scaled about the mean value.
+ *
+ *                                  -------------
+ *      floating point data        |             | ----------> RIS8
+ *      (SDS, ASCII text, or  ---> | hdfimport   |   and/or
+ *      native floating point)     |             | ----------> SDS
+ *                                  -------------
+ *					   AND / OR
+ *	                           ---------------
+ *      integer data               |              | 
+ *      (ASCII text, or       ---> |  hdfimport   |  ----------> SDS 
+ *      binary integer)            |              | 
+ *                                  --------------
+ * Synopsis:
+ *      hdfimport -h[elp], OR
+ *      hdfimport <infile> [ [-t[ype] <output-type> | -n] [<infile> [-t[ype] <output-type> | -n ]]...] 
+ *                            -o[utfile] <outfile> [-r[aster] [ras_opts ...]] [-f[loat]]
+ *      
+ *      -h[elp]:
+ *              Print this summary of usage, and exit.
+ *
+ *      <infile(s)>:
+ *              Name of the input file(s), containing a single 
+ *		two-dimensional or three-dimensional floating point array 
+ *		in either ASCII text, native floating point, native integer 
+ *		or HDF SDS format.  If an HDF file is used for input, it 
+ *		must contain an SDS. The SDS need only contain a dimension 
+ *		record and the data, but if it also contains maximum and 
+ *		minimum values and/or scales for each axis, these will 
+ *		be used.  If the input format is ASCII text or native 
+ *		floating point or native integer, see "Notes" below on 
+ *		how it must be organized.
+ *      
+ *      -t[ype] <output_type>: 
+ *              Optionally used for every input ASCII file to specify the 
+ *	        data type of the data-set to be written. If not specified               
+ *              default data type is 32-bit floating point. <output-type>
+ *              can be any of the following: FP32 (default), FP64, INT32
+ * 	        INT16, INT8. It can be used only with ASCII files.
+ *     
+ *      -n:  
+ *		This option is to be used only if the binary input file 
+ *		contains 64-bit floating point data and the default
+ *		behaviour (default behaviour is to write it to a 32-bit
+ *		floating point data-set) should be overridden to write 
+ *		it to a 64-bit floating point data-set.
+ *
+ *      -o[utfile] <outfile>:
+ *              Data from one or more input files are stored as one or
+ *              more data sets and/or images in one HDF output file,
+ *              "outfile".
+ *
+ *      -r[aster]:
+ *              Store output as a raster image set in the output file.
+ *
+ *      -f[loat]:
+ *              Store output as a scientific data set in the output file.
+ *              This is the default if the "-r" option is not specified.
+ *
+ *      ras_opts ...
+ *
+ *      -e[xpand] <horiz> <vert> [<depth>]:
+ *              Expand float data via pixel replication to produce the
+ *              image(s).  "horiz" and "vert" give the horizontal and
+ *              vertical resolution of the image(s) to be produced; and
+ *              optionally, "depth" gives the number of images or depth
+ *              planes (for 3D input data).
+ * 
+ *      -i[nterp] <horiz> <vert> [<depth>]:
+ *              Apply bilinear, or trilinear, interpolation to the float
+ *              data to produce the image(s).  "horiz", "vert", and "depth"
+ *              must be greater than or equal to the dimensions of the
+ *              original dataset.
+ *      If max and min are supplied in input file, this option clips
+ *      values that are greater than max or less then min, setting
+ *      them to the max and min, respectively.
+ *
+ *      -p[alfile] <palfile>:
+ *              Store the palette with the image.  Get the palette from
+ *              "palfile"; which may be an HDF file containing a palette,
+ *              or a file containing a raw palette.
+ *
+ *      -m[ean] <mean>:
+ *              If a floating point mean value is given, the image will be
+ *              scaled about the mean.  The new extremes (newmax and newmin),
+ *              as given by:
+ *
+ *                 newmax = mean + max(abs(max-mean), abs(mean-min))
+ *                 newmin = mean - max(abs(max-mean), abs(mean-min))
+ *
+ *              will be equidistant from the mean value.  If no mean value
+ *              is given, then the mean will be:  0.5 * (max + min)
+ *
+ * Notes:
+ *      If the input file format is ASCII text or native floating point or native integer(32-bit,
+ *      16-bit, 8-bit), it
+ *      must have the following input fields:
+ *
+ *              format
+ *              nplanes
+ *              nrows
+ *              ncols
+ *              max_value
+ *              min_value
+ *              [plane1 plane2 plane3 ...]
+ *              row1 row2 row3 ...
+ *              col1 col2 col3 ...
+ *              data1 data2 data3 ...
+ *              ...
+ *
+ *      Where:
+ *              format:
+ *                      Format designator ("TEXT", "FP32", "FP64", "IN32", "IN16", "IN08").
+ *                      nplanes, nrows, ncols:
+ *                      Dimensions are specified in the order slowest changing dimension first.
+ *			ncols is dimension of the fastest changing dimension. (horizontal axis
+ *			or X-axis in a 3D scale)
+ *			nrows corresponds to dimension of the vertical axis or Y-axis in a 3D 
+ *			scale.
+ *			nplanes corresponds to the slowest changing dimension i.e. dimension of 
+ *			the depth axis or the Z-axis in a 3D scale ("1" for 2D input).
+ *              max_value:
+ *                      Maximum data value.
+ *              min_value:
+ *                      Minimum data value.
+ *              plane1, plane2, plane3, ...:
+ *                      Scales for depth axis.
+ *              row1, row2, row3, ...:
+ *                      Scales for the vertical axis.
+ *              col1, col2, col3, ...:
+ *                      Scales for the horizontal axis.
+ *              data1, data2, data3, ...:
+ *                      The data ordered by rows, left to right and top
+ *                      to bottom; then optionally, ordered by planes,
+ *                      front to back.
+ *
+ *      For FP32 and FP64 input format, "format", "nplanes", "nrows", "ncols",
+ *      and "nplanes" are native integers; where "format" is the integer
+ *      representation of the appropriate 4-character string (0x46503332 for
+ *      "FP32" and 0x46503634 for "FP64").  The remaining input fields are
+ *      composed of native 32-bit floating point values for FP32 input format,
+ *      or native 64-bit floating point values for FP64 input format.
+ *
+ *      For IN32, IN16 and IN08 input format, "format", "nplanes", "nrows", "ncols",
+ *      and "nplanes" are native integers; where "format" is the integer
+ *      representation of the appropriate 4-character string. The remaining input 
+ *      fields are composed of native 32-bit integer values for IN32 input format,
+ *      or native 16-bit integer values for IN16 input format or native 8-bit 
+ *      integer values for IN08 input format.
+ *
+ * Source Availability:
+ *      This program is in the public domain, and was developed and made
+ *      available by the National Center for Supercomputing Applications,
+ *      University of Illinois, Urbana-Champaign (ftp.ncsa.uiuc.edu).
+ *
+ * History:
+ *      Beta version:                                           17-May-89
+ *              (by Mike Folk mfolk at ncsa.uiuc.edu)
+ *      Revision to put in the mean option:                     15-Sep-89
+ *              (by Glen Mortensen gam at inel.gov)
+ *      Officially released:                                    01-Dec-89
+ *              (by NCSA ftp.ncsa.uiuc.edu)
+ *      Revision to fix some bugs:                              16-Mar-90
+ *              (by Mike Folk mfolk at ncsa.uiuc.edu)
+ *      Revision to support 3D and native fp input:             15-May-90
+ *              (by Bob Weaver baw at inel.gov)
+ *      Revision to fix bug in interp() :                       17-Oct-90
+ *              (by Fred Walsteijn nwalstyn at fys.ruu.n)
+ *      Revision to fix bug in interp() :                       23-Nov-90
+ *              Now it clips values outside of max and min.
+ *              (by Fred Walsteijn nwalstyn at fys.ruu.n)
+ *      Revision to start to use HDF 3.2 (and 3.3) library:     22-Jun-93
+ *              Still lots to do to support other number types.
+ *              (by Chris Houck chouck at ncsa.uiuc.edu)
+ *      Revision to incorporate 32-bit integer, 16-bit integer, 08-Jan-02
+ *              8-bit integer data types and converting 64-bit 
+ *              input data to 64-bit output data.
+ *              (by Pankaj Kamat pkamat at uiuc.edu)	 
+ */
+
+#include "hdf.h"
+#include <stdio.h>
+#ifndef MIPSEL
+#include <math.h>
+#endif /* MIPSEL */
+#include <string.h>
+#include <ctype.h>
+#include <mfhdf.h>
+
+#ifdef WIN32
+#include <sys/stat.h>
+#include <fcntl.h>
+#endif
+
+/*
+ * global macros
+ */
+#define EXPAND      1   /* -e: expand image with pixel replication */
+#define INTERP      2   /* -i: expand image with interpolation */
+
+/*
+ * structure definition to associate input files with the output data types
+ */
+struct infilesformat
+{
+	char filename[255];
+	int outtype;   /* if the value is "" output type will be FP32. Applicable only to TEXT Files*/
+};
+/*
+ * structure definition for command line options
+ */
+struct Options
+  {
+      struct infilesformat  infiles[30];  /* structure to hold the list of input file names. Limited to 30*/
+      char        outfile[32];  /* output file name */
+      char        palfile[32];  /* palette file name, if any */
+      int         fcount;       /* number of input files */
+      int         to_float;     /* float output is desired */
+      int         to_image;     /* image output is desired */
+      int         to_int;  
+      int         pal;          /* output palette with image */
+      int         ctm;          /* color transform method: EXPAND or INTERP */
+      int         exh;          /* horizontal expansion factor */
+      int         exv;          /* vertical expansion factor */
+      int         exd;          /* depth expansion factor */
+      int         hres;         /* horizontal resolution of output image */
+      int         vres;         /* vertical resolution of output image */
+      int         dres;         /* depth resolution of output image */
+      int         mean;         /* scale image around a mean */
+      float32     meanval;      /* mean value to scale the image around */
+	
+  };
+
+/* Additional Structures to handle different data types */
+struct int16set /* variables for an INT 16 data set */
+{
+	int16 max;
+	int16 min;
+	int16 *hscale;
+	int16 *vscale;
+	int16 *dscale;
+};
+
+struct int32set /* variables for an INT 32 data set */
+{
+  int32 max;
+  int32 min;
+  int32 *hscale;
+  int32 *vscale;
+  int32 *dscale;
+};
+
+struct fp64set /* variables for a FLOAT 64 data set */
+{
+	float64 max;
+	float64 min;
+	float64 *hscale;
+	float64 *vscale;
+	float64 *dscale;
+};
+
+struct int8set /* variables for an INT 8 data set */
+{
+	int8 max;
+	int8 min;
+	int8 *hscale;
+	int8 *vscale;
+	int8 *dscale;
+};
+
+/*
+ * structure definition for the input data
+ */
+struct Input
+  {
+      int         is_hdf;       /* HDF file format flag */
+      int         is_text;      /* ASCII text format flag */
+      int         is_fp32;      /* 32-bit native floating point format flag */
+      int         is_fp64;      /* 64-bit native floating point format flag */
+      int 	      is_int32;	    /* 32-bit int */
+      int 	      is_int16;     /* 16-bit int */
+      int         rank;         /* number of input data dimensions */
+      int         dims[3];      /* input dimensions - ncols, nrows, nplanes */
+      int         is_vscale;    /* vertical axis scales in the input */
+      int         is_hscale;    /* horizontal axis scales in the input */
+      int         is_dscale;    /* depth axis scales in the input */
+      float32     max;          /* maximum value of the data */
+      float32     min;          /* minimum value of the data */
+      float32    *hscale;       /* horizontal scales for fp32*/
+      float32    *vscale;       /* vertical scales for fp32*/
+      float32    *dscale;       /* depth scales for fp32*/
+      struct int32set	in32s;
+      struct int16set	in16s;
+      struct int8set	in8s;
+      struct fp64set	fp64s;
+      VOIDP       data;         /* input data */
+	  int 	      outtype;
+  };
+
+
+/*
+ * structure definition for the output raster images
+ */
+struct Raster
+  {
+      int         hres;         /* horizontal resolution of the image */
+      int         vres;         /* vertical resolution of the image */
+      int         dres;         /* depth resolution of the image */
+      unsigned char *image;
+  };
+
+/*
+ *  constants to represent data types
+ */
+
+#define FP_32 0
+#define FP_64 1
+#define INT_32 2
+#define INT_16 3
+#define INT_8 4
+#define NO_NE 5
+
+
+/*
+ * state table tokens
+ */
+#define FILNAME 0   /* filename */
+#define OPT_o   1   /* output filename */
+#define OPT_r   2   /* convert to image */
+#define OPT_e   3   /* expand image via pixel replication */
+#define OPT_i   4   /* make interpolated image */
+#define NUMBR   5   /* resolution of enlarged image */
+#define OPT_p   6   /* palette filename */
+#define OPT_f   7   /* convert to float (default) */
+#define OPT_h   8   /* request for explanation */
+#define OPT_m   9   /* mean to scale around */
+#define OPT_t   10  /* datatype of the SDS to be written */ 
+#define OPT_n   11  /* for  a FLOAT 64 binary input file to be accepted as FLOAT 64 SDS (default behaviour is writing it as FLOAT 32 SDS */
+#define ERR 20  /* invalid token */
+
+/*
+ * state table for parsing the command line.
+ */
+static int  state_table[19][12] =
+{
+
+    /* token ordering:
+       FILNAME      OPT_o   OPT_r   OPT_e   OPT_i   NUMBR   OPT_p   OPT_f
+       OPT_h        OPT_m   OPT_z */
+
+    /* state 0: start */
+    {1, ERR, ERR, ERR, ERR, ERR, ERR, ERR,
+    14, ERR, ERR, ERR},
+
+    /* state 1: input files */
+    {1, 2, ERR, ERR, ERR, ERR, ERR, ERR,
+    ERR, ERR, 17, 18},
+
+    /* state 2: -o[utfile] */
+    {3, ERR, ERR, ERR, ERR, ERR, ERR, ERR,
+    ERR, ERR, ERR, ERR},
+
+    /* state 3: outfile */
+    {ERR, ERR, 4, ERR, ERR, ERR, ERR, 13,
+    ERR, ERR, ERR, ERR},
+
+    /* state 4: -r[aster] */
+    {ERR, ERR, ERR, 5, 9, ERR, 10, 12,
+    ERR, 15, ERR, ERR},
+
+    /* state 5: -e[xpand] */
+    {ERR, ERR, ERR, ERR, ERR, 6, ERR, ERR,
+    ERR, ERR, ERR, ERR},
+
+    /* state 6: -e[xpand] or -i[nterp] option argument */
+    {ERR, ERR, ERR, ERR, ERR, 7, ERR, ERR,
+    ERR, ERR, ERR, ERR},
+
+    /* state 7: -e[xpand] or -i[nterp] option argument */
+    {ERR, ERR, ERR, ERR, ERR, 8, 10, 12,
+    ERR, 15, ERR, ERR},
+
+    /* state 8: -e[xpand] or -i[nterp] option argument */
+    {ERR, ERR, ERR, ERR, ERR, ERR, 10, 12,
+    ERR, 15, ERR, ERR},
+
+    /* state 9: -i[nterp] */
+    {ERR, ERR, ERR, ERR, ERR, 6, ERR, ERR,
+    ERR, ERR, ERR, ERR},
+
+    /* state 10: -p[alfile] */
+    {11, ERR, ERR, ERR, ERR, ERR, ERR, ERR,
+    ERR, ERR, ERR, ERR},
+
+    /* state 11: palfile */
+    {ERR, ERR, ERR, 5, 9, ERR, ERR, 12,
+    ERR, 15, ERR, ERR},
+
+    /* state 12: -f[loat] (after -r[aster]) */
+    {ERR, ERR, ERR, ERR, ERR, ERR, ERR, ERR,
+    ERR, ERR, ERR, ERR},
+
+    /* state 13: -f[loat] */
+    {ERR, ERR, 4, ERR, ERR, ERR, ERR, ERR,
+    ERR, ERR, ERR, ERR},
+
+    /* state 14: -h[elp] */
+    {ERR, ERR, ERR, ERR, ERR, ERR, ERR, ERR,
+    ERR, ERR, ERR, ERR},
+
+    /* state 15: -m[ean] */
+    {ERR, ERR, ERR, ERR, ERR, 16, ERR, ERR,
+    ERR, ERR, ERR, ERR},
+
+    /* state 16: mean */
+    {ERR, ERR, ERR, 5, 9, ERR, 10, 12,
+     ERR, ERR, ERR, ERR},
+
+    /* state 17: output type for data set */
+    {1, 2, ERR, ERR, ERR, ERR, ERR, ERR,                     
+    ERR, ERR, ERR, ERR},
+    
+     /* state 18: override default behaviour for FP 64 */
+    {1, 2, ERR, ERR, ERR, ERR, ERR, ERR,                     
+    ERR, ERR, ERR, ERR}
+    
+    
+};
+
+/* static local functions */
+static int  gtoken(char *s);
+static int  process(struct Options *opt);
+static int  gfloat(char *infile, FILE * strm, float32 *fp32, struct Input *in);
+static int  gint(char *infile, FILE * strm, int *ival, struct Input *in);
+static int  isnum(char *s);
+static int  gdata(char *infile, struct Input *in, FILE *strm, int *is_maxmin);
+static int  gdimen(char *infile, struct Input *inp, FILE *strm);
+static int  gmaxmin(char *infile, struct Input *in, FILE *strm, int *is_maxmin);
+static int  gscale(char *infile, struct Input *in, FILE *strm, int *is_scale);
+static int  gtype(char *infile, struct Input *in, FILE **strm);
+static int  indexes(float32 *scale, int dim, int *idx, int res);
+static int  interp(struct Input *in, struct Raster *im);
+static int  palette(char *palfile);
+static int  pixrep(struct Input *in, struct Raster *im);
+
+/*
+ * functions with non-integer return types
+ */
+void        help(char *);
+void        mean(struct Input *, struct Options *);
+void        usage(char *);
+
+/*
+ * Additional functions defined to incorporate the revisions (pkamat)
+ */
+static int  gfloat64(char *infile, FILE * strm, float64 *fp64, struct Input *in);
+static int  gint32(char *infile, FILE * strm, int32 *ival, struct Input *in);
+static int  gint16(char *infile, FILE * strm, int16 *ival, struct Input *in);
+static int  gint8(char *infile, FILE * strm, int8 *ival, struct Input *in);
+static int  init_scales(struct Input * in);
+void        fpdeallocate(struct Input *in, struct Raster *im, struct Options *opt);
+
+/*
+ * Name:
+ *      main
+ *
+ * Purpose:
+ *      The driver for "hdfimport".
+ *
+ *  Revision (pkamat):
+ *		Changes to the state table to handle -t option and the -n option.
+ *      Also, a different structure used for holding input files.
+ */
+int
+main(int argc, char *argv[])
+{
+    struct Options opt;
+    int         i,k;
+    int         outfile_named = FALSE;
+    int         token;
+    int         state = 0;
+    int flag = 0;
+    char types [5][6] = { "FP32", "FP64", "INT32", "INT16", "INT8" };	
+
+    const char *err1 = "Invalid number of arguments:  %d.\n";
+    const char *err2 = "Error in state table.\n";
+    const char *err3 = "No output file given.\n";
+    const char *err4 = "Program aborted.\n";
+    /* const char *err5 = "Cannot allooacte memory.\n"; */
+    /*
+     * set 'stdout' and 'stderr' to line-buffering mode
+     */
+    (void) setvbuf(stderr, (char *) NULL, _IOLBF, 0);
+    (void) setvbuf(stdout, (char *) NULL, _IOLBF, 0);
+
+#if defined __MWERKS__
+    argc = ccommand(&argv);
+#endif
+
+    /*
+     * validate the number of command line arguments
+     */
+    if (argc < 2)
+      {
+          (void) fprintf(stderr, err1, argc);
+          usage(argv[0]);
+          goto err;
+      }
+
+    opt.to_image = FALSE;   /* default: no image */
+    opt.to_float = FALSE;   /* default: make float if no image */
+			    /* Set FALSE here.  Will be set TRUE */
+			    /* after confirming image option is not set.  */
+    opt.ctm = EXPAND;   /* default: pixel replication */
+    opt.hres = 0;   /* default: no expansion values */
+    opt.vres = 0;
+    opt.dres = 0;
+    opt.pal = FALSE;    /* default: no palette */
+    opt.mean = FALSE;   /* default: no mean given */
+    opt.fcount = 0;     /* to count number of input files */
+
+    /*
+     * parse the command line
+     */
+    for (i = 1; i < argc; i++)
+      {
+          if ((token = gtoken(argv[i])) == ERR)
+            {
+                usage(argv[0]);
+                goto err;
+            }
+			
+          state = state_table[state][token];
+	    
+          switch (state)
+            {
+	    case 1: /* counting input files */                  
+	      (void) HDstrcpy(opt.infiles[opt.fcount].filename, argv[i]);
+	      opt.infiles[opt.fcount].outtype = NO_NE;
+	      opt.fcount++;
+	      break;
+	    case 2: /* -o found; look for outfile */
+	      break;
+	    case 3: /* get outfile name */
+	      (void) HDstrcpy(opt.outfile, argv[i]);
+	      outfile_named = TRUE;
+	      break;
+	    case 4: /* -r found */
+	      opt.to_image = TRUE;
+	      break;
+	    case 5: /* -e found */
+	      opt.ctm = EXPAND;
+	      break;
+	    case 6: /* horizontal resolution */
+	      opt.hres = atoi(argv[i]);
+	      break;
+	    case 7: /* vertical resolution */
+	      opt.vres = atoi(argv[i]);
+	      break;
+	    case 8: /* depth resolution */
+	      opt.dres = atoi(argv[i]);
+	      break;
+	    case 9: /* -i found */
+	      opt.ctm = INTERP;
+	      break;
+	    case 10:    /* -p found */
+	      opt.pal = TRUE;
+	      break;
+	    case 11:    /* get pal filename */
+	      (void) HDstrcpy(opt.palfile, argv[i]);
+	      break;
+	    case 12:    /* -f found (after a -r) */
+	    case 13:    /* -f found (no -r yet) */
+	      opt.to_float = TRUE;
+	      break;
+	    case 14:    /* -h found; help, then exit */
+	      help(argv[0]);
+	      exit(0);
+	    case 15:    /* -m found */
+	      opt.mean = TRUE;
+	      break;
+	    case 16:    /* mean value */
+	      opt.meanval = (float32)atof(argv[i]);
+	      break;
+	    case 17:  /* -t found */
+	      i++;
+	      flag = 0;
+	      for (k=0; ((k<=4) && (!flag)); k++)
+		if (!strcmp(argv[i], types[k])) flag = 1;
+	      if (flag)
+		opt.infiles[opt.fcount-1].outtype = k-1;		
+	      else
+		{
+		  usage(argv[0]);
+		  goto err;
+		}
+	      break;
+	    case 18: /* -n found */
+	      opt.infiles[opt.fcount-1].outtype = FP_64;
+	      break;
+	    case ERR:   /* command syntax error */
+	    default:
+	      (void) fprintf(stderr, err2);
+	      usage(argv[0]);
+	      goto err;
+            }
+      }
+
+
+     /*
+     * make sure an output file was specified
+     */
+    if (!outfile_named)
+      {
+          (void) fprintf(stderr, err3);
+          usage(argv[0]);
+          goto err;
+      }
+
+    if (!opt.to_image)
+        opt.to_float = TRUE;	      
+
+    /*
+     * process the input files
+     */
+    if (process(&opt))
+        goto err;
+
+    return(0);
+
+  err:
+    (void) fprintf(stderr, err4);
+    return(1);
+}
+
+/*
+ * Name:
+ *      gdata
+ *
+ * Purpose:
+ *      Get the input data.
+ *
+ * Revision(pkamat):
+ *      Modified to read in data of type INT 32, INT 16, INT 8 
+ *      in addition to FP 32 and FP 64.
+ */
+static int
+gdata(char *infile, struct Input *in, FILE *strm, int *is_maxmin)
+{
+    int32       i, j, k;
+    float32    *fp32;
+    int32        *in32;
+    int16 *in16;
+    float64 *fp64;
+    int8 *in8;
+    int32       hdfdims[3];     /* order: ZYX or YX */
+    int32       len = in->dims[0] * in->dims[1] * in->dims[2];
+
+    const char *err1 = "Unable to get input data from file: %s.\n";
+    
+    /*
+     * extract the input data from the input file
+     */
+    if (in->is_hdf == TRUE)
+      {
+          /*
+           * hdfdims is ordered: ZYX or YX
+           * in->dims is ordered: XYZ
+           */
+          if (in->rank == 2)
+            {
+                hdfdims[0] = in->dims[1];
+                hdfdims[1] = in->dims[0];
+            }
+          else
+            {
+                hdfdims[0] = in->dims[2];
+                hdfdims[1] = in->dims[1];
+                hdfdims[2] = in->dims[0];
+            }
+
+          if (DFSDgetdata(infile, in->rank, hdfdims, in->data))
+            {
+                (void) fprintf(stderr, err1, infile);
+                goto err;
+            }
+      }
+    else
+      {
+	    if (in->outtype == FP_32)
+	      {
+		for (k = 0, fp32 = (float32 *) in->data; k < in->dims[2]; k++)
+		  {
+		    for (j = 0; j < in->dims[1]; j++)
+		      {
+			for (i = 0; i < in->dims[0]; i++, fp32++)
+			  {
+                            if (gfloat(infile, strm, fp32, in))
+                              {
+                                  (void) fprintf(stderr, err1, infile);
+                                  goto err;
+                              }
+			  }
+		      }
+		  }
+		if (*is_maxmin == FALSE)
+		  {
+		    in->min = in->max = *(float32*) in->data;
+		    for (i = 1; i< len; i++)
+		      {
+			if (((float32 *) in->data)[i] > in->max)
+			  in->max = ((float32 *) in->data)[i];
+			if (((float32*) in->data)[i] < in->min)
+			  in->min = ((float32*) in->data)[i];
+		      }
+		    *is_maxmin = TRUE;
+		  }
+	      }
+	    if (in->outtype == INT_32)
+	      {
+		for (k = 0, in32 = (int32 *) in->data; k < in->dims[2] ; k++)
+		  {
+		    for (j= 0; j < in->dims[1]; j++)
+		      {
+			for (i =0; i < in->dims[0]; i++, in32++)
+			  {
+			    if (gint32(infile, strm, in32, in))
+			      {
+				(void) fprintf(stderr, err1, infile);
+				goto err;
+			      }
+			  }
+		      }
+		  }
+		if (*is_maxmin == FALSE)
+		  {
+		    in->in32s.min = in->in32s.max = *(int32 *) in->data;
+		    for (i = 1; i<len; i++)
+		      {
+			if (((int32 *) in->data)[i] > in->in32s.max)
+			  in->in32s.max = ((int32 *) in->data)[i];
+			if (((int32 *) in->data)[i] < in->in32s.min)
+			  in->in32s.min = ((int32 *) in->data)[i];
+		      }
+		    *is_maxmin = TRUE;
+		  }
+	      }
+	    if (in->outtype == INT_16)
+	      {
+		for (k = 0, in16 = (int16 *) in->data; k < in->dims[2] ; k++)
+		  {
+		    for (j= 0; j < in->dims[1]; j++)
+		      {
+			for (i =0; i < in->dims[0]; i++, in16++)
+			  {
+			    if (gint16(infile, strm, in16, in))
+			      {
+				(void) fprintf(stderr, err1, infile);
+				goto err;
+			      }
+			  }
+		      }
+		  }
+		if (*is_maxmin == FALSE)
+		  {
+		    in->in16s.min = in->in16s.max = *(int16 *) in->data;
+		    for (i = 1; i<len; i++)
+		      {
+			if (((int16 *) in->data)[i] > in->in16s.max)
+			  in->in16s.max = ((int16 *) in->data)[i];
+			if (((int16 *) in->data)[i] < in->in16s.min)
+			  in->in16s.min = ((int16 *) in->data)[i];
+		      }
+		    *is_maxmin = TRUE;
+		  }
+	      }
+	    
+	    if (in->outtype == INT_8)
+	      {
+		for (k = 0, in8 = (int8 *) in->data; k < in->dims[2] ; k++)
+		  {
+		    for (j= 0; j < in->dims[1]; j++)
+		      {
+			for (i =0; i < in->dims[0]; i++, in8++)
+			  {
+			    if (gint8(infile, strm, in8, in))
+			      {
+				(void) fprintf(stderr, err1, infile);
+				goto err;
+			      }
+			  }
+		      }
+		  }
+		if (*is_maxmin == FALSE)
+		  {
+		    in->in8s.min = in->in8s.max = *(int8 *) in->data;
+		    for (i = 1; i<len; i++)
+		      {
+			if (((int8 *) in->data)[i] > in->in8s.max)
+			  in->in8s.max = ((int8 *) in->data)[i];
+			if (((int8 *) in->data)[i] < in->in8s.min)
+			  in->in8s.min = ((int8 *) in->data)[i];
+		      }
+		    *is_maxmin = TRUE;
+		  }
+	      }
+
+	    if (in->outtype == FP_64)
+	      {
+		for (k = 0, fp64 = (float64 *) in->data; k < in->dims[2]; k++)
+		  {
+		    for (j = 0; j < in->dims[1]; j++)
+		      {
+			for (i = 0; i < in->dims[0]; i++, fp64++)
+			  {
+                            if (gfloat64(infile, strm, fp64, in))
+                              {
+                                  (void) fprintf(stderr, err1, infile);
+                                  goto err;
+                              }
+			  }
+		      }
+		  }
+		if (*is_maxmin == FALSE)
+		  {
+		    in->fp64s.min = in->fp64s.max = *(float64*) in->data;
+		    for (i = 1; i< len; i++)
+		      {
+			if (((float64 *) in->data)[i] > in->fp64s.max)
+			  in->fp64s.max = ((float64*) in->data)[i];
+			if (((float64*) in->data)[i] < in->fp64s.min)
+			  in->fp64s.min = ((float64*) in->data)[i];
+		      }
+		    *is_maxmin = TRUE;
+		  }
+	      }
+	    
+	    /* } */
+          (void) fclose(strm);
+      }
+
+#ifdef  DEBUG
+    (void) printf("\tdata:");
+    for (k = 0, fp32 = in->data; k < in->dims[2]; k++)
+      {
+          (void) printf("\n");
+          for (j = 0; j < in->dims[1]; j++)
+            {
+                (void) printf("\n\t");
+                for (i = 0; i < in->dims[0]; i++, fp32++)
+                    (void) printf("%E ", *fp32);
+            }
+      }
+    (void) printf("\n\n\n");
+#endif /* DEBUG */
+
+    return (0);
+
+  err:
+    return (1);
+}
+
+/*
+ * Name:
+ *      gdimen
+ *
+ * Purpose:
+ *      Determine the input data dimensions.
+ */
+ 
+static int
+gdimen(char *infile, struct Input *inp, FILE *strm)
+{
+    int32       hdfdims[3];     /* order: ZYX or YX */
+    int32       nt;             /* number type of input file */
+
+    const char *err1 = "Unable to get data dimensions from file: %s.\n";
+    const char *err2 = "Invalid data rank of %d in file: %s.\n";
+    const char *err3 = "Dimension(s) is less than '2' in file: %s.\n";
+    const char *err4 = "Unexpected number type from file: %s.\n";
+
+    /*
+     * extract the rank and dimensions of the HDF input file
+     */
+    if (inp->is_hdf == TRUE)
+      {
+          if (DFSDgetdims(infile, &inp->rank, hdfdims, 3) == FAIL)
+            {
+                (void) fprintf(stderr, err1, infile);
+                goto err;
+            }
+
+          /* don't know how to deal with other numbers yet */
+          if (DFSDgetNT(&nt) == FAIL || nt != DFNT_FLOAT32)
+            {
+                (void) fprintf(stderr, err4, infile);
+                goto err;
+            }
+
+          /*
+           * hdfdims is ordered: ZYX or YX
+           * inp->dims is ordered: XYZ
+           */
+          if (inp->rank == 2)
+            {
+                inp->dims[0] = hdfdims[1];
+                inp->dims[1] = hdfdims[0];
+                inp->dims[2] = 1;
+            }
+          else if (inp->rank == 3)
+            {
+                inp->dims[0] = hdfdims[2];
+                inp->dims[1] = hdfdims[1];
+                inp->dims[2] = hdfdims[0];
+            }
+          else
+            {
+                (void) fprintf(stderr, err2, inp->rank, infile);
+                goto err;
+            }
+
+          /*
+           * get the rank and dimensions from files of other input formats
+           * 
+           */
+      }
+    else
+      {	       			
+          if (gint(infile, strm, &inp->dims[2], inp))
+            {
+                (void) fprintf(stderr, err1, infile);
+                goto err;
+            }
+          if (inp->dims[2] > 1)
+              inp->rank = 3;
+          else
+              inp->rank = 2;
+          if (gint(infile, strm, &inp->dims[1], inp))
+            {
+                (void) fprintf(stderr, err1, infile);
+                goto err;
+            }
+          if (gint(infile, strm, &inp->dims[0], inp))
+            {
+                (void) fprintf(stderr, err1, infile);
+                goto err;
+            }
+      }
+
+    /*
+     * validate dimension sizes
+     */
+    if ((inp->dims[0] < 2) || (inp->dims[1] < 2))
+      {
+          (void) fprintf(stderr, err3, infile);
+          goto err;
+      }
+
+#ifdef  DEBUG
+    (void) printf("\nInput Information ...\n\n");
+    (void) printf("\trank:\n\n\t%d\n\n", inp->rank);
+    (void) printf("\tdimensions (nplanes,nrows,ncols):\n\n");
+    (void) printf("\t%d %d %d\n\n", inp->dims[2], inp->dims[1], inp->dims[0]);
+#endif /* DEBUG */
+
+    return (0);
+
+  err:
+    return (1);
+}
+
+/*
+ * Name:
+ *      gfloat
+ *
+ * Purpose:
+ *      Read in a single floating point value from the input stream.  The
+ *      input format may either be ASCII text , 32-bit native floating point,
+ *      or 64-bit native floating point.
+ */
+static int
+gfloat(char *infile, FILE * strm, float32 *fp32, struct Input *in)
+{
+    float64     fp64=0.0;
+
+    const char *err1 = "Unable to get 'float' value from file: %s.\n";
+    
+    if (in->is_text == TRUE)
+      {
+          if (fscanf(strm, "%e", fp32) != 1)
+            {
+                (void) fprintf(stderr, err1, infile);
+                goto err;
+            }
+      }
+    else if (in->is_fp32 == TRUE)
+      {
+	if (fread((char *) fp32, sizeof(float32), 1, strm) != 1)
+	  {
+	    (void) fprintf(stderr, err1, infile);
+	    goto err;
+	  }
+      }
+    else
+      {
+	if (fread((char *) &fp64, sizeof(float64), 1, strm) != 1)
+	  {
+	    (void) fprintf(stderr, err1, infile);
+	    goto err;
+	  }
+	*fp32 = (float32) fp64;
+      }
+
+    return (0);
+
+  err:
+    return (1);
+}
+
+/*
+ * Name: (pkamat - New function)
+ *      gfloat64
+ *
+ * Purpose:
+ *      Read in a double floating point value from the input stream.  The
+ *      input format may either be ASCII text ,
+ *      or 64-bit native floating point.
+ */
+
+static int
+gfloat64(char *infile, FILE * strm, float64 *fp64, struct Input *in)
+{
+    const char *err1 = "Unable to get 'float' value from file: %s.\n";
+    
+    if (in->is_text == TRUE)
+      {
+	if (fscanf(strm, "%le", fp64) != 1)
+	  {
+	    (void) fprintf(stderr, err1, infile);
+	    goto err;
+	  }
+      }
+    else
+      {
+	if (fread((char *) fp64, sizeof(float64), 1, strm) != 1)
+	  {
+	    (void) fprintf(stderr, err1, infile);
+	    goto err;
+	  }
+      }
+	
+    return (0);
+
+  err:
+    return (1);
+}
+
+/*
+ * Name:
+ *      gint
+ *
+ * Purpose:
+ *      Read in a single integer value from the input stream.  The input
+ *      format may either be ASCII text or a native BCD of type integer.
+ */
+static int
+gint(char *infile, FILE * strm, int *ival, struct Input *in)
+{
+    const char *err1 = "Unable to get 'int' value from file: %s.\n";
+    /*
+     * process TEXT-formatted input
+     */
+    if (in->is_text == TRUE)
+      {
+          if (fscanf(strm, "%d", ival) != 1)
+            {
+                (void) fprintf(stderr, err1, infile);
+                goto err;
+            }
+
+          /*
+           * process BCD-formatted input
+           */
+      }
+    else
+      {
+          if (fread((char *) ival, sizeof(int), 1, strm) != 1)
+            {
+                (void) fprintf(stderr, err1, infile);
+                goto err;
+            }
+      }
+
+    return (0);
+
+  err:
+    return (1);
+}
+
+/*
+ * Name: (pkamat - New function)
+ *      gint32
+ *
+ * Purpose:
+ *      Read in a single 32-bit integer value from the input stream.  The input
+ *      format may either be ASCII text or a native BCD of type integer.
+ */
+
+static int
+gint32(char *infile, FILE * strm, int32 *ival, struct Input *in)
+{
+    const char *err1 = "Unable to get 'int' value from file: %s.\n";
+    /*
+     * process TEXT-formatted input
+     */
+    if (in->is_text == TRUE)
+      {
+          if (fscanf(strm, "%d", ival) != 1)
+            {
+                (void) fprintf(stderr, err1, infile);
+                goto err;
+            }
+
+          /*
+           * process BCD-formatted input
+           */
+      }
+    else
+      {
+          if (fread((char *) ival, sizeof(int32), 1, strm) != 1)
+            {
+                (void) fprintf(stderr, err1, infile);
+                goto err;
+            }
+      }
+
+    return (0);
+
+  err:
+    return (1);
+}
+
+/*
+ * Name: (pkamat - New function)
+ *      gint16
+ *
+ * Purpose:
+ *      Read in a single 16-bit integer value from the input stream.  The input
+ *      format may either be ASCII text or a native BCD of type 16-bit integer.
+ */
+
+static int
+gint16(char *infile, FILE * strm, int16 *ival, struct Input *in)
+{
+    const char *err1 = "Unable to get 'int' value from file: %s.\n";
+     
+    if (in->is_text == TRUE)
+      {
+	if (fscanf(strm, "%hd", ival) != 1)
+	  {
+	    (void) fprintf(stderr, err1, infile);
+	    goto err;
+	  }
+      }             
+    
+ else
+ { 
+     if (fread((char *) ival, sizeof(int16), 1, strm) != 1)
+       {
+	 (void) fprintf(stderr, err1, infile);
+	 goto err;
+       }
+ }
+ 
+
+    return (0);
+
+  err:
+    return (1);
+}
+
+/*
+ * Name: (pkamat - New function)
+ *      gint8
+ *
+ * Purpose:
+ *      Read in a single 8-bit integer value from the input stream.  The input
+ *      format may either be ASCII text or a native BCD of type 8-bit integer.
+ */
+
+static int
+gint8(char *infile, FILE * strm, int8 *ival, struct Input *in)
+{
+    const char *err1 = "Unable to get 'int' 8  value from file: %s.\n";
+    int16 temp;
+    
+    if (in->is_text == TRUE)
+      {
+	if (fscanf(strm, "%hd", &temp) != 1)
+	  {
+	    (void) fprintf(stderr, err1, infile);
+	    goto err;
+	  }
+	*ival = (int8) temp;
+      }
+    else
+      { 
+	if (fread((char *) ival, sizeof(int8), 1, strm) != 1)
+	  {
+	    (void) fprintf(stderr, err1, infile);
+		  goto err;
+	  }
+      }
+    return (0);
+    
+ err:
+    return (1);
+}
+/*
+ * Name:
+ *      gmaxmin
+ *
+ * Purpose:
+ *      Extract the maximum and minimum data values from the input file.
+ *      Supports 32-bit integer, 16-bit integer, 8-bit integer, 32-bit float, 64-bit float
+ */
+static int
+gmaxmin(char *infile, struct Input *in, FILE *strm, int *is_maxmin)
+{
+    const char *err1 = "Unable to get max/min values from file: %s.\n";
+ 
+    /*
+     * extract the max/min values from the input file
+     */
+    if (in->is_hdf == TRUE)
+      {
+	if (!DFSDgetrange(&in->max, &in->min))
+	  if (in->max > in->min)
+	    *is_maxmin = TRUE;
+      }
+    else
+      {
+	if (in->outtype == FP_32)
+	  {
+	    if (gfloat(infile, strm, &in->max, in))
+	      {
+		(void) fprintf(stderr, err1, infile);
+		goto err;
+	      }
+	    if (gfloat(infile, strm, &in->min, in))
+	      {
+		(void) fprintf(stderr, err1, infile);
+		goto err;
+	      }
+	    if (in->max > in->min)
+	      *is_maxmin = TRUE;
+	  }
+	if (in->outtype == FP_64)
+	  {
+	      if (gfloat64(infile, strm, &in->fp64s.max, in))
+		{
+		  (void) fprintf(stderr, err1, infile);
+		  goto err;
+		}
+	      if (gfloat64(infile, strm, &in->fp64s.min, in))
+		{
+		  (void) fprintf(stderr, err1, infile);
+		  goto err;
+		}
+	      if (in->fp64s.max > in->fp64s.min)
+		*is_maxmin = TRUE;
+	  }
+	if (in->outtype == INT_32)
+	  {
+	    if (gint32(infile, strm, &in->in32s.max, in))
+		{
+		  (void) fprintf(stderr, err1, infile);
+		  goto 	err;
+		}
+	      if (gint32(infile, strm, &in->in32s.min, in))
+		{
+		  (void) fprintf(stderr, err1, infile);
+		  goto err;
+		}
+	      if (in->in32s.max > in->in32s.min)
+		*is_maxmin = TRUE;
+	  }
+	
+	if (in->outtype == INT_16)
+	  {
+	    if (gint16(infile, strm, &in->in16s.max, in))
+	      {
+		(void) fprintf(stderr, err1, infile);
+		goto 	err;
+	      }
+	    if (gint16(infile, strm, &in->in16s.min, in))
+	      {
+		(void) fprintf(stderr, err1, infile);
+		goto err;
+	      }
+	    if (in->in16s.max > in->in16s.min)
+	      *is_maxmin = TRUE;
+	  }
+	  
+	if (in->outtype == INT_8)
+	  {
+	    if (gint8(infile, strm, &in->in8s.max, in))
+	      {
+		(void) fprintf(stderr, err1, infile);
+		goto 	err;
+	      }
+	    if (gint8(infile, strm, &in->in8s.min, in))
+		{
+		  (void) fprintf(stderr, err1, infile);
+		  goto err;
+		}
+	    if (in->in8s.max > in->in8s.min)
+	      *is_maxmin = TRUE;
+	  }
+      }
+    
+#ifdef  DEBUG
+    (void) printf("\tinput maximum/minimum values:\n\n");
+    (void) printf("\t%E %E\n\n", in->max, in->min);
+#endif /* DEBUG */
+    
+    return (0);
+    
+ err:
+    return (1);
+}
+
+/*
+ * Name:
+ *      gscale
+ *
+ * Purpose:
+ *      Determine the scale for each axis.
+ *
+ * Revision: (pkamat)
+ *      Modified to support 32-bit integer, 16-bit integer, 8-bit integer in
+ *		addition to 32-bit float and 64-bit float
+ */
+static int
+gscale(char *infile, struct Input *in, FILE *strm, int *is_scale)
+{
+    int         i;
+    int32       hdfdims[3];     /* order: ZYX or YX */
+
+    const char *err1 = "Unable to get axis scale from file: %s.\n";
+
+    *is_scale = TRUE;
+
+    /*
+     * hdfdims is ordered: ZYX or YX
+     * in->dims is ordered: XYZ
+     */
+    if (in->rank == 2)
+      {
+          hdfdims[0] = in->dims[1];
+          hdfdims[1] = in->dims[0];
+      }
+    else
+      {
+          hdfdims[0] = in->dims[2];
+          hdfdims[1] = in->dims[1];
+          hdfdims[2] = in->dims[0];
+      }
+
+    /*
+     * extract the scale values from the input file
+     */
+    if (in->is_hdf == TRUE)
+      {
+          if (in->rank == 2)
+            {
+                if (DFSDgetdimscale(1, hdfdims[0], in->vscale))
+                  {
+                      *is_scale = FALSE;
+                      for (i = 0; i <= hdfdims[0]; i++)
+                          in->vscale[i] = (float32) i;
+                  }
+                if (DFSDgetdimscale(2, hdfdims[1], in->hscale))
+                  {
+                      *is_scale = FALSE;
+                      for (i = 0; i <= hdfdims[1]; i++)
+                          in->hscale[i] = (float32) i;
+                  }
+            }
+          else
+            {
+                if (DFSDgetdimscale(1, hdfdims[0], in->dscale))
+                  {
+                      *is_scale = FALSE;
+                      for (i = 0; i <= hdfdims[0]; i++)
+                          in->dscale[i] = (float32) i;
+                  }
+                if (DFSDgetdimscale(2, hdfdims[1], in->vscale))
+                  {
+                      *is_scale = FALSE;
+                      for (i = 0; i <= hdfdims[1]; i++)
+                          in->vscale[i] = (float32) i;
+                  }
+                if (DFSDgetdimscale(3, hdfdims[2], in->hscale))
+                  {
+                      *is_scale = FALSE;
+                      for (i = 0; i <= hdfdims[2]; i++)
+                          in->hscale[i] = (float32) i;
+                  }
+            }
+      }
+    else
+      {
+	switch(in->outtype)
+	  {
+	  case 0: /* 32-bit float */
+	    if (in->rank == 2)
+	      {
+		for (i = 0; i < hdfdims[0]; i++)
+		  {
+		    if (gfloat(infile, strm, &in->vscale[i], in))
+		      {
+			(void) fprintf(stderr, err1, infile);
+			goto err;
+		      }
+		  }
+		in->vscale[i] = in->vscale[i - 1];
+		for (i = 0; i < hdfdims[1]; i++)
+		  {
+		    if (gfloat(infile, strm, &in->hscale[i], in))
+		      {
+			(void) fprintf(stderr, err1, infile);
+			goto err;
+		      }
+		  }
+		
+		in->hscale[i] = in->hscale[i - 1];
+	      }
+	    else
+	      {
+		for (i = 0; i < hdfdims[0]; i++)
+		  {
+		    if (gfloat(infile, strm, &in->dscale[i], in))
+		      {
+			(void) fprintf(stderr, err1, infile);
+			goto err;
+		      }
+		  }
+		in->dscale[i] = in->dscale[i - 1];
+		for (i = 0; i < hdfdims[1]; i++)
+		  {
+		    if (gfloat(infile, strm, &in->vscale[i], in))
+		      {
+			(void) fprintf(stderr, err1, infile);
+			goto err;
+		      }
+		  }
+		in->vscale[i] = in->vscale[i - 1];
+		for (i = 0; i < hdfdims[2]; i++)
+		  {
+		    if (gfloat(infile, strm, &in->hscale[i], in))
+		      {
+			(void) fprintf(stderr, err1, infile);
+			goto err;                 	
+		      }
+		  }
+		in->hscale[i] = in->hscale[i - 1];
+	      }
+	    break;
+	    
+	  case 1: /* 64-bit float */
+	    if (in->rank == 2)
+		  {
+		    for (i = 0; i < hdfdims[0]; i++)
+		      {
+			if (gfloat64(infile, strm, &in->fp64s.vscale[i], in))
+			  {
+			    (void) fprintf(stderr, err1, infile);
+			    goto err;
+			  }
+		      }
+		    in->fp64s.vscale[i] = in->fp64s.vscale[i - 1];     
+		    for (i = 0; i < hdfdims[1]; i++)
+		      {
+			if (gfloat64(infile, strm, &in->fp64s.hscale[i], in))
+			  {
+			    (void) fprintf(stderr, err1, infile);
+			    goto err;
+			  }
+		      }
+		    in->fp64s.hscale[i] = in->fp64s.hscale[i - 1];
+		  }
+	    else
+	      {
+		for (i = 0; i < hdfdims[0]; i++)
+		  {
+		    if (gfloat64(infile, strm, &in->fp64s.dscale[i], in))
+		      {
+			(void) fprintf(stderr, err1, infile);
+			goto err;
+		      }
+		  }
+		in->fp64s.dscale[i] = in->fp64s.dscale[i - 1];
+
+		for (i = 0; i < hdfdims[1]; i++)
+		  {
+			if (gfloat64(infile, strm, &in->fp64s.vscale[i], in))
+			  {
+			    (void) fprintf(stderr, err1, infile);
+			    goto err;
+			  }
+		  }
+		in->fp64s.vscale[i] = in->fp64s.vscale[i - 1];
+
+		for (i = 0; i < hdfdims[2]; i++)
+		  {
+		    if (gfloat64(infile, strm, &in->fp64s.hscale[i], in))
+		      {
+			(void) fprintf(stderr, err1, infile);
+			goto err;                 	
+		      }
+		  }
+		in->fp64s.hscale[i] = in->fp64s.hscale[i - 1];
+	      }
+	    break;
+		
+	  case 2: /* 32-bit integer */
+	    if (in->rank == 2)
+	      {
+		for (i = 0; i < hdfdims[0]; i++)
+		  {
+		    if (gint32(infile, strm, &in->in32s.vscale[i], in))
+		      {
+			(void) fprintf(stderr, err1, infile);
+			    goto err;
+		      }
+		    
+		  }
+		in->in32s.vscale[i] = in->in32s.vscale[i - 1];
+		for (i = 0; i < hdfdims[1]; i++)
+		      {
+			if (gint32(infile, strm, &in->in32s.hscale[i], in))
+			  {
+			    (void) fprintf(stderr, err1, infile);
+			    goto err;
+			  }
+		      }
+		in->in32s.hscale[i] = in->in32s.hscale[i - 1];
+	      }
+	    
+	    else
+	      {
+		    for (i = 0; i < hdfdims[0]; i++)
+		      {
+			if (gint32(infile, strm, &in->in32s.dscale[i], in))
+			  {
+			    (void) fprintf(stderr, err1, infile);
+			    goto err;
+			  }
+		      }
+		    in->in32s.dscale[i] = in->in32s.dscale[i - 1];
+		    for (i = 0; i < hdfdims[1]; i++)
+		      {
+			if (gint32(infile, strm, &in->in32s.vscale[i], in))
+			  {
+			    (void) fprintf(stderr, err1, infile);
+			    goto err;
+			  }
+		      }
+		    in->in32s.vscale[i] = in->in32s.vscale[i - 1];
+		    for (i = 0; i < hdfdims[2]; i++)
+		      {
+			if (gint32(infile, strm, &in->in32s.hscale[i], in))
+			  {
+			    (void) fprintf(stderr, err1, infile);
+			    goto err;                 	
+			  }
+		      }
+		    in->in32s.hscale[i] = in->in32s.hscale[i - 1];
+	      }
+		break;
+
+	  case 3: /* 16-bit integer */
+		if (in->rank == 2)
+		  {
+		    for (i = 0; i < hdfdims[0]; i++)
+		      {
+			if (gint16(infile, strm, &in->in16s.vscale[i], in))
+			  {
+			    (void) fprintf(stderr, err1, infile);
+			    goto err;
+			  }
+		      }
+		    in->in16s.vscale[i] = in->in16s.vscale[i - 1];
+		    for (i = 0; i < hdfdims[1]; i++)
+		      {
+			if (gint16(infile, strm, &in->in16s.hscale[i], in))
+			  {
+			    (void) fprintf(stderr, err1, infile);
+			    goto err;
+			  }
+		      }
+		    in->in16s.hscale[i] = in->in16s.hscale[i - 1];
+		  }
+		
+		else
+		  {
+		    for (i = 0; i < hdfdims[0]; i++)
+		      {
+			if (gint16(infile, strm, &in->in16s.dscale[i], in))
+			  {
+			    (void) fprintf(stderr, err1, infile);
+			    goto err;
+			  }
+		      }
+		    in->in16s.dscale[i] = in->in16s.dscale[i - 1];
+		    for (i = 0; i < hdfdims[1]; i++)
+		      {
+			if (gint16(infile, strm, &in->in16s.vscale[i], in))
+			  {
+			    (void) fprintf(stderr, err1, infile);
+			    goto err;
+			  }
+		      }
+		    in->in16s.vscale[i] = in->in16s.vscale[i - 1];
+		    for (i = 0; i < hdfdims[2]; i++)
+		      {
+			if (gint16(infile, strm, &in->in16s.hscale[i], in))
+			  {
+			    (void) fprintf(stderr, err1, infile);
+			    goto err;                 	
+			  }
+		      }
+		    in->in16s.hscale[i] = in->in16s.hscale[i - 1];
+		  }
+		break;
+
+	      case 4: /* 8-bit integer */
+		if (in->rank == 2)
+		  {
+		    for (i = 0; i < hdfdims[0]; i++)
+		      {
+			if (gint8(infile, strm, &in->in8s.vscale[i], in))
+			  {
+			    (void) fprintf(stderr, err1, infile);
+			    goto err;
+			  }
+		      }
+		    in->in8s.vscale[i] = in->in8s.vscale[i - 1];
+		    for (i = 0; i < hdfdims[1]; i++)
+		      {
+			if (gint8(infile, strm, &in->in8s.hscale[i], in))
+			  {
+			    (void) fprintf(stderr, err1, infile);
+			    goto err;
+			  }
+		      }
+		    in->in8s.hscale[i] = in->in8s.hscale[i - 1];
+		  }
+		
+		else
+		  {
+		    for (i = 0; i < hdfdims[0]; i++)
+		      {
+			if (gint8(infile, strm, &in->in8s.dscale[i], in))
+			  {
+			    (void) fprintf(stderr, err1, infile);
+			    goto err;
+			  }
+		      }
+		    in->in8s.dscale[i] = in->in8s.dscale[i - 1];
+		    for (i = 0; i < hdfdims[1]; i++)
+		      {
+			if (gint8(infile, strm, &in->in8s.vscale[i], in))
+			  {
+			    (void) fprintf(stderr, err1, infile);
+			    goto err;
+			  }
+		      }
+		    in->in8s.vscale[i] = in->in8s.vscale[i - 1];
+		    for (i = 0; i < hdfdims[2]; i++)
+		      {
+			if (gint8(infile, strm, &in->in8s.hscale[i], in))
+			  {
+			    (void) fprintf(stderr, err1, infile);
+			    goto err;                 	
+			  }
+		      }
+		    in->in8s.hscale[i] = in->in8s.hscale[i - 1];
+		  }
+		break;
+	      }
+      }
+
+#ifdef  DEBUG
+    if (in->rank == 2)
+      {
+          (void) printf("\tscales of the axes (vert,horiz):\n\n\t");
+          for (i = 0; i < hdfdims[0]; i++)
+              (void) printf("%E ", in->vscale[i]);
+          (void) printf("\n\t");
+          for (i = 0; i < hdfdims[1]; i++)
+              (void) printf("%E ", in->hscale[i]);
+      }
+    else
+      {
+          (void) printf("\tscales of the axes (depth,vert,horiz):\n\n\t");
+          for (i = 0; i < hdfdims[0]; i++)
+              (void) printf("%E ", in->dscale[i]);
+          (void) printf("\n\t");
+          for (i = 0; i < hdfdims[1]; i++)
+              (void) printf("%E ", in->vscale[i]);
+          (void) printf("\n\t");
+          for (i = 0; i < hdfdims[2]; i++)
+              (void) printf("%E ", in->hscale[i]);
+      }
+    (void) printf("\n\n\n");
+#endif /* DEBUG */
+
+    return (0);
+
+  err:
+    return (1);
+}
+
+/*
+ * Name:
+ *      gtoken
+ *
+ * Purpose:
+ *      Return the token identifier associated with the command line
+ *      argument.
+ */
+static int
+gtoken(char *s)
+{
+    size_t      len;
+    int         token;
+
+    const char *err1 = "Illegal argument: %s.\n";
+
+    /*
+     * identify the token type
+     */
+    if (s[0] == '-')
+      {     /* option name (or negative number) */
+          token = ERR;
+          len = HDstrlen(&s[1]);
+          switch (s[1])
+            {
+                case 'o':
+                    if (!HDstrncmp("outfile", &s[1], len))
+                        token = OPT_o;
+                    break;
+                case 'r':
+                    if (!HDstrncmp("raster", &s[1], len))
+                        token = OPT_r;
+                    break;
+                case 'e':
+                    if (!HDstrncmp("expand", &s[1], len))
+                        token = OPT_e;
+                    break;
+                case 'i':
+                    if (!HDstrncmp("interp", &s[1], len))
+                        token = OPT_i;
+                    break;
+                case 'p':
+                    if (!HDstrncmp("palfile", &s[1], len))
+                        token = OPT_p;
+                    break;
+                case 'f':
+                    if (!HDstrncmp("float", &s[1], len))
+                        token = OPT_f;
+                    break;
+                case 'h':
+                    if (!HDstrncmp("help", &s[1], len))
+                        token = OPT_h;
+                    break;
+                case 'm':
+                    if (!HDstrncmp("mean", &s[1], len))
+                        token = OPT_m;
+                    break;
+			    case 'n':                 
+                        token = OPT_n;
+	                break;
+				case 't':
+ 					    token = OPT_t;	
+					break;
+                default:
+                    if (isnum(s))   /* negative number? */
+                        token = NUMBR;
+            }
+          if (token == ERR)
+              (void) fprintf(stderr, err1, s);
+
+      }
+    else if (isnum(s))  /* positive number */
+        token = NUMBR;
+    else    /* filename */
+        token = FILNAME;
+
+    return (token);
+}
+
+/*
+ * Name:
+ *      gtype
+ *
+ * Purpose:
+ *      Determine the type of the input file (HDF, TEXT, FP32, FP64)
+ *
+ * Revision: (pkamat)
+ *		Modified to support INT32, INT16, INT8 formats.
+ *      Also determines and validates the outtype type of the data-set
+ */
+static int
+gtype(char *infile, struct Input *in, FILE **strm)
+{
+    char        buf[8];
+
+    const char *err1 = "Unable to open file: %s.\n";
+    const char *err2 = "Unable to get format tag from file: %s.\n";
+    const char *err3 = "Invalid file format in file: %s.\n";
+    const char *err4 = "Invalid use of -t or -n options. Can be used only for TEXT files or for FP64 binary files\n";
+
+    /*
+     * determine the input file format
+     */
+    if (Hishdf(infile))
+        in->is_hdf = TRUE;
+    else
+      {
+	if ((*strm = fopen(infile, "r")) == NULL)
+	  {
+	    (void) fprintf(stderr, err1, infile);
+	    goto err;
+	  }
+	if (fread(buf, 4, 1, *strm) != 1)
+	  {
+	    (void) fprintf(stderr, err2, infile);
+	    goto err;
+	  }
+	if (!HDmemcmp("TEXT", buf, 4) || !HDmemcmp("text", buf, 4))
+	  {
+	    in->is_text = TRUE;
+	    if (in->outtype == NO_NE)
+	      in->outtype = FP_32;
+	    
+	  }
+	else
+	  {
+	    if (!HDmemcmp("FP64", buf, 4) ||
+		     !HDmemcmp("fp64", buf, 4))
+	      {
+			in->is_fp64 = TRUE;
+			if (in->outtype != FP_64)
+				if (in->outtype != NO_NE)
+				{
+					(void) fprintf(stderr, err4, infile);
+					goto err;		
+				}
+				else in->outtype = FP_32;
+	      }
+	    else
+	      {
+		if (in->outtype != NO_NE)
+		  {   
+		    (void) fprintf(stderr, err4, infile);
+		    goto err;		
+		  }
+		if (!HDmemcmp("FP32", buf, 4) || !HDmemcmp("fp32", buf, 4))
+		  {
+		    in->is_fp32 = TRUE;
+		    in->outtype = FP_32;
+		
+		  }
+		
+		else if (!HDmemcmp("IN32", buf, 4) ||
+                         !HDmemcmp("in32", buf, 4))
+		  in->outtype = INT_32;
+		else if (!HDmemcmp("IN16", buf, 4) ||
+			 !HDmemcmp("in16", buf, 4))
+		  in->outtype = INT_16;
+		else if (!HDmemcmp("IN08", buf, 4) ||
+		       !HDmemcmp("in08", buf, 4))
+		  in->outtype = INT_8;
+		else
+		  {
+		    (void) fprintf(stderr, err3, infile);
+		    goto err;
+		  }
+		if (in->outtype == NO_NE)
+		  {   
+		    (void) fprintf(stderr, err4, infile);
+		    goto err;
+		  }
+	      }
+	  }
+      }
+    
+    return (0);
+
+  err:
+    return (1);
+}
+
+/*
+ * Name:
+ *      help
+ *
+ * Purpose:
+ *      Print a helpful summary of command usage and features.
+ */
+void
+help(char *name)
+{
+    (void) printf("Name:\n");
+    (void) printf("\t%s (previously fp2hdf)\n\n", name);
+    (void) printf("Purpose:\n");
+    (void) printf("\tTo convert floating point data to HDF Scientific ");
+    (void) printf("Data Set (SDS)\n");
+    (void) printf("\tand/or 8-bit Raster Image Set (RIS8) format, ");
+    (void) printf("storing the results\n");
+    (void) printf("\tin an HDF file.  The image data can be scaled ");
+    (void) printf("about a mean value.\n\n");
+    (void) printf("Version:\n");
+    (void) printf("\tv1.2 (Jan 10, 2002)\n\n");
+
+    (void) fprintf (stderr, "Synopsis:");
+    (void) fprintf (stderr, "\n\t%s -h[elp], OR", name);
+    (void) fprintf (stderr, "\n\t%s <infile> [ [-t[ype] <output-type> | -n] [<infile> [-t[ype] <output-type> | -n]...]", name);
+    (void) fprintf (stderr, "\n\t\t\t\t\t-o[utfile] <outfile> [-r[aster] [ras_opts ...]] [-f[loat]]");
+
+    (void) fprintf (stderr, "\n\n\t-h[elp]:");
+    (void) fprintf (stderr, "\n\t\tPrint this summary of usage, and exit.");
+    (void) fprintf (stderr, "\n\t\t");
+    (void) fprintf (stderr, "\n\n\t<infile(s)>:");
+    (void) fprintf (stderr, "\n\t\tName of the input file(s), containing a single ");
+    (void) fprintf (stderr, "\n\t\ttwo-dimensional or three-dimensional floating point array ");
+    (void) fprintf (stderr, "\n\t\tin either ASCII text, native floating point, native integer ");
+    (void) fprintf (stderr, "\n\t\tor HDF SDS format.  If an HDF file is used for input, it ");
+    (void) fprintf (stderr, "\n\t\tmust contain an SDS. The SDS need only contain a dimension ");
+    (void) fprintf (stderr, "\n\t\trecord and the data, but if it also contains maximum and ");
+    (void) fprintf (stderr, "\n\t\tminimum values and/or scales for each axis, these will ");
+    (void) fprintf (stderr, "\n\t\tbe used.  If the input format is ASCII text or native ");
+    (void) fprintf (stderr, "\n\t\tfloating point or native integer, see \"Notes\" below on ");
+    (void) fprintf (stderr, "\n\t\thow it must be organized.");
+
+    (void) fprintf (stderr, "\n\n\t-t[ype] <output_type>: ");
+    (void) fprintf (stderr, "\n\t\tOptionally used for every input ASCII file to specify the ");
+    (void) fprintf (stderr, "\n\t\tdata type of the data-set to be written. If not specified               ");
+    (void) fprintf (stderr, "\n\t\tdefault data type is 32-bit floating point. <output-type>");
+    (void) fprintf (stderr, "\n\t\tcan be any of the following: FP32 (default), FP64, INT32");
+    (void) fprintf (stderr, "\n\t\tINT16, INT8. It can be used only with ASCII files.");
+
+    (void) fprintf (stderr, "\n\n\t-n:  ");
+    (void) fprintf (stderr, "\n\t\tThis option is to be used only if the binary input file ");
+    (void) fprintf (stderr, "\n\t\tcontains 64-bit floating point data and the default");
+    (void) fprintf (stderr, "\n\t\tbehaviour (default behaviour is to write it to a 32-bit");
+    (void) fprintf (stderr, "\n\t\tfloating point data-set) should be overridden to write ");
+    (void) fprintf (stderr, "\n\t\tit to a 64-bit floating point data-set.");
+
+    (void) fprintf (stderr, "\n\n\t-o[utfile] <outfile>:");
+    (void) fprintf (stderr, "\n\t\tData from one or more input files are stored as one or");
+    (void) fprintf (stderr, "\n\t\tmore data sets and/or images in one HDF output file,");
+    (void) fprintf (stderr, "\n\t\t\"outfile\".");
+
+    (void) fprintf (stderr, "\n\n\t-r[aster]:");
+    (void) fprintf (stderr, "\n\t\tStore output as a raster image set in the output file.");
+
+    (void) fprintf (stderr, "\n\n\t-f[loat]:");
+    (void) fprintf (stderr, "\n\tStore output as a scientific data set in the output file.");
+    (void) fprintf (stderr, "\n\tThis is the default if the \"-r\" option is not specified.");
+
+    (void) fprintf (stderr, "\n\n\tras_opts ...");
+    (void) fprintf (stderr, "\n\n\t-e[xpand] <horiz> <vert> [<depth>]:");
+    (void) fprintf (stderr, "\n\tExpand float data via pixel replication to produce the");
+    (void) fprintf (stderr, "\n\timage(s).  \"horiz\" and \"vert\" give the horizontal and");
+    (void) fprintf (stderr, "\n\tvertical resolution of the image(s) to be produced; and");
+    (void) fprintf (stderr, "\n\toptionally, \"depth\" gives the number of images or depth");
+    (void) fprintf (stderr, "\n\tplanes (for 3D input data).");
+
+    (void) fprintf (stderr, "\n\n\t-i[nterp] <horiz> <vert> [<depth>]:");
+    (void) fprintf (stderr, "\n\t\tApply bilinear, or trilinear, interpolation to the float");
+    (void) fprintf (stderr, "\n\t\tdata to produce the image(s).  \"horiz\", \"vert\", and \"depth\"");
+    (void) fprintf (stderr, "\n\t\tmust be greater than or equal to the dimensions of the");
+    (void) fprintf (stderr, "\n\t\toriginal dataset.");
+    (void) fprintf (stderr, "\n\t\tIf max and min are supplied in input file, this option clips");
+    (void) fprintf (stderr, "\n\t\tvalues that are greater than max or less then min, setting");
+    (void) fprintf (stderr, "\n\t\tthem to the max and min, respectively.");
+
+    (void) fprintf (stderr, "\n\n\t-p[alfile] <palfile>:");
+    (void) fprintf (stderr, "\n\t\tStore the palette with the image.  Get the palette from");
+    (void) fprintf (stderr, "\n\t\t\"palfile\"; which may be an HDF file containing a palette,");
+    (void) fprintf (stderr, "\n\t\tor a file containing a raw palette.");
+
+    (void) fprintf (stderr, "\n\n\t-m[ean] <mean>:");
+    (void) fprintf (stderr, "\n\t\tIf a floating point mean value is given, the image will be");
+    (void) fprintf (stderr, "\n\t\tscaled about the mean.  The new extremes (newmax and newmin),");
+    (void) fprintf (stderr, "\n\t\tas given by:");
+
+    (void) fprintf (stderr, "\n\n\t\t\tnewmax = mean + max(abs(max-mean), abs(mean-min))");
+    (void) fprintf (stderr, "\n\t\t\tnewmin = mean - max(abs(max-mean), abs(mean-min))");
+
+    (void) fprintf (stderr, "\n\n\t\twill be equidistant from the mean value.  If no mean value");
+    (void) fprintf (stderr, "\n\t\tis given, then the mean will be:  0.5   (max + min)");
+
+    (void) fprintf (stderr, "\n\n\tNotes:");
+    (void) fprintf (stderr, "\n\t\tIf the input file format is ASCII text or native floating point or native integer(32-bit,");
+    (void) fprintf (stderr, "\n\t\t16-bit, 8-bit), it");
+    (void) fprintf (stderr, "\n\t\tmust have the following input fields:");
+
+    (void) fprintf (stderr, "\n\t\tformat");
+    (void) fprintf (stderr, "\n\t\tnplanes");
+    (void) fprintf (stderr, "\n\t\tnrows");
+    (void) fprintf (stderr, "\n\t\tcols");
+    (void) fprintf (stderr, "\n\t\tmax_value");
+    (void) fprintf (stderr, "\n\t\tmin_value");
+    (void) fprintf (stderr, "\n\t\t[plane1 plane2 plane3 ...]");
+    (void) fprintf (stderr, "\n\t\trow1 row2 row3 ...");
+    (void) fprintf (stderr, "\n\t\tcol1 col2 col3 ...");
+    (void) fprintf (stderr, "\n\t\tdata1 data2 data3 ...");
+
+    (void) fprintf (stderr, "\n\n\t\tWhere:");
+    (void) fprintf (stderr, "\n\n\t\tformat:");
+    (void) fprintf (stderr, "\n\t\t\tFormat designator (\"TEXT\", \"FP32\", \"FP64\", \"IN32\", \"IN16\", \"IN08\").");
+    (void) fprintf (stderr, "\n\t\t\tnplanes, nrows, ncols:");
+    (void) fprintf (stderr, "\n\t\t\tDimensions are specified in the order slowest changing dimension first.");
+    (void) fprintf (stderr, "\n\t\t\tncols is dimension of the fastest changing dimension. (horizontal axis");
+    (void) fprintf (stderr, "\n\t\t\tor X-axis in a 3D scale)");
+    (void) fprintf (stderr, "\n\t\t\tnrows corresponds to dimension of the vertical axis or Y-axis in a 3D ");
+    (void) fprintf (stderr, "\n\t\t\tscale.");
+    (void) fprintf (stderr, "\n\t\t\tnplanes corresponds to the slowest changing dimension i.e. dimension of ");
+    (void) fprintf (stderr, "\n\t\t\tthe depth axis or the Z-axis in a 3D scale (\"1\" for 2D input).");
+    (void) fprintf (stderr, "\n\t\tmax_value:");
+    (void) fprintf (stderr, "\n\t\t\tMaximum data value.");
+    (void) fprintf (stderr, "\n\t\tmin_value:");
+    (void) fprintf (stderr, "\n\t\t\tMinimum data value.");
+    (void) fprintf (stderr, "\n\t\tplane1, plane2, plane3, ...:");
+    (void) fprintf (stderr, "\n\t\t\tScales for depth axis.");
+    (void) fprintf (stderr, "\n\t\trow1, row2, row3, ...:");
+    (void) fprintf (stderr, "\n\t\t\tScales for the vertical axis.");
+    (void) fprintf (stderr, "\n\t\tcol1, col2, col3, ...:");
+    (void) fprintf (stderr, "\n\t\t\tScales for the horizontal axis.");
+    (void) fprintf (stderr, "\n\t\tdata1, data2, data3, ...:");
+    (void) fprintf (stderr, "\n\t\t\tThe data ordered by rows, left to right and top");
+    (void) fprintf (stderr, "\n\t\t\tto bottom; then optionally, ordered by planes,");
+    (void) fprintf (stderr, "\n\t\t\tfront to back.");
+
+    (void) fprintf (stderr, "\n\n\t\tFor FP32 and FP64 input format, \"format\", \"nplanes\", \"nrows\", \"ncols\",");
+    (void) fprintf (stderr, "\n\t\tand \"nplanes\" are native integers; where \"format\" is the integer");
+    (void) fprintf (stderr, "\n\t\trepresentation of the appropriate 4-character string (0x46503332 for");
+    (void) fprintf (stderr, "\n\t\t\"FP32\" and 0x46503634 for \"FP64\").  The remaining input fields are");
+    (void) fprintf (stderr, "\n\t\tcomposed of native 32-bit floating point values for FP32 input format,");
+    (void) fprintf (stderr, "\n\t\tor native 64-bit floating point values for FP64 input format.");
+
+    (void) fprintf (stderr, "\n\n\tFor IN32, IN16 and IN08 input format, \"format\", \"nplanes\", \"nrows\", \"ncols\",");
+    (void) fprintf (stderr, "\n\t\tand \"nplanes\" are native integers; where \"format\" is the integer");
+    (void) fprintf (stderr, "\n\t\trepresentation of the appropriate 4-character string. The remaining input ");
+    (void) fprintf (stderr, "\n\t\tfields are composed of native 32-bit integer values for IN32 input format,");
+    (void) fprintf (stderr, "\n\t\tor native 16-bit integer values for IN16 input format or native 8-bit ");
+    (void) fprintf (stderr, "\n\t\tinteger values for IN08 input format.");
+
+    (void) printf("\nExamples:\n");
+    (void) printf("\tConvert floating point data in \"f1.txt\" to SDS ");
+    (void) printf("format, and store it\n");
+    (void) printf("\tas an SDS in HDF file \"o1\":\n\n");
+    (void) printf("\t\t%s f1.txt -o o1\n\n", name);
+    (void) printf("\tConvert floating point data in \"f2.hdf\" to ");
+    (void) printf("8-bit raster format, and\n");
+    (void) printf("\tstore it as an RIS8 in HDF file \"o2\":\n\n");
+    (void) printf("\t\t%s f2.hdf -o o2 -r\n\n", name);
+    (void) printf("\tConvert floating point data in \"f3.bin\" to ");
+    (void) printf("8-bit raster format and\n");
+    (void) printf("\tSDS format, and store both the RIS8 and the SDS ");
+    (void) printf("in HDF file \"o3\":\n\n");
+    (void) printf("\t\t%s f3.bin -o o3 -r -f\n\n", name);
+    (void) printf("\tConvert floating point data in \"f4\" to a ");
+    (void) printf("500x600 raster image, and\n");
+    (void) printf("\tstore the RIS8 in HDF file \"o4\".  Also store a ");
+    (void) printf("palette from \"palfile\"\n");
+    (void) printf("\twith the image:\n\n");
+    (void) printf("\t\t%s f4 -o o4 -r -e 500 600 -p palfile\n\n", name);
+    (void) printf("\tConvert floating point data in \"f5\" to 200 ");
+    (void) printf("planes of 500x600 raster\n");
+    (void) printf("\timages, and store the RIS8 in HDF file \"o5\".  ");
+    (void) printf("Also scale the image\n");
+    (void) printf("\tdata so that it is centered about a mean value ");
+    (void) printf("of 10.0:\n\n");
+    (void) printf("\t\t%s f5 -o o5 -r -i 500 600 200 -m 10.0\n", name);
+
+    return;
+}
+
+/*
+ * Name:
+ *      indexes
+ *
+ * Purpose:
+ *      For each pixel location along an axis, determine the nearest
+ *      scale value neighbor.  Return a list of indexes into the scale
+ *      array.
+ */
+static int
+indexes(float32 *scale, int dim, int *idx, int res)
+{
+    int         i, j;
+    float32    *midpt;
+    float32     loc;
+    float32     delta;
+
+    const char *err1 = "Unable to allocate dynamic memory.\n";
+    /*
+     * determine the midpoints between scale values
+     */
+    if ((midpt = (float32 *) HDmalloc((size_t) dim * sizeof(float32))) == NULL)
+      {
+          (void) fprintf(stderr, err1);
+          goto err;
+      }
+    for (i = 0; i < dim - 1; i++)
+        midpt[i] = (scale[i] + scale[i + 1]) * (float32)0.5;
+    midpt[dim - 1] = scale[dim - 1] + (scale[dim - 1] - midpt[dim - 2]);
+
+    /*
+     * determine the distance between pixel locations
+     */
+    delta = (scale[dim - 1] - scale[0]) / (float32)(res - 1);
+
+    /*
+     * compute indexes, keeping the index the same until the location
+     * extends beyond the midpoint
+     */
+    for (i = 1, j = 0, idx[0] = 0, loc = scale[0]; i < res; i++)
+      {
+          loc += delta;
+          idx[i] = idx[i - 1];
+          while (loc >= midpt[j])
+            {
+                idx[i] += 1;
+                j += 1;
+            }
+      }
+
+    /*
+     * free dynamically allocated memory
+     */
+    HDfree((char *) midpt);
+
+    return (0);
+
+  err:
+    return (1);
+}
+
+/*
+ * Name:
+ *      interp
+ *
+ * Purpose:
+ *      Use a bilinear, or trilinear, interpolation scheme to construct
+ *      the raster image(s).
+ *
+ *  Bug revision:  the line that previously read:
+ *
+ *      hratio[i] = ((hrange > 0) ? 1.0 : -1.0) * (in->hscale[j+1] -
+ *                    loc) / (in->hscale[j+1] - in->hscale[j]);
+ *    has been changed to read:
+ *      hratio[i] = (in->hscale[j+1] - loc) / (in->hscale[j+1] - in->hscale[j]);
+ *
+ *    Similar changes were made to the corresponding lines for
+ *    computing vratio and dratio.
+ *
+ *  Bug revision: If values occur that are outside the ranges of the
+ *    max and min values provided, these values are now "clipped" to
+ *    be the same as the max and min, respectively.
+ */
+
+static int
+interp(struct Input *in, struct Raster *im)
+{
+    int         i, j, k, m;
+    int        *hinc, *voff, *doff = NULL;
+    float32     pix;
+    float32     loc;
+    float32     range;
+    float32     ratio;
+    float32     hrange, vrange, drange = (float32)0.0;
+    float32     hdelta, vdelta, ddelta = (float32)0.0;
+    float32     t1, t2, t3, t4, t5, t6;
+    float32    *hratio, *vratio, *dratio = NULL;
+    float32    *pt[8];
+    unsigned char *ip = im->image;
+
+    const char *err1 = "Unable to allocate dynamic memory.\n";
+
+    /*
+     * determine the range of pixel locations
+     */
+    range = in->max - in->min;
+    ratio = (float32)237.9 / range;
+    hrange = in->hscale[in->dims[0] - 1] - in->hscale[0];
+    vrange = in->vscale[in->dims[1] - 1] - in->vscale[0];
+    if (in->rank == 3)
+        drange = in->dscale[in->dims[2] - 1] - in->dscale[0];
+
+    /*
+     * determine the distance between pixel locations
+     */
+    hdelta = hrange / (float32)(im->hres - 1);
+    vdelta = vrange / (float32)(im->vres - 1);
+    if (in->rank == 3)
+        ddelta = drange / (float32)(im->dres - 1);
+
+    /*
+     * allocate dynamic memory for the interpolation ratio buffers
+     */
+    if ((hratio = (float32 *) HDmalloc((size_t) im->hres * sizeof(float32))) == NULL)
+      {
+          (void) fprintf(stderr, err1);
+          goto err;
+      }
+    if ((vratio = (float32 *) HDmalloc((unsigned int) im->vres *
+                                         sizeof(float32))) == NULL)
+      {
+          (void) fprintf(stderr, err1);
+          goto err;
+      }
+    if (in->rank == 3)
+      {
+          if ((dratio = (float32 *) HDmalloc((unsigned int) im->dres *
+                                               sizeof(float32))) == NULL)
+            {
+                (void) fprintf(stderr, err1);
+                goto err;
+            }
+      }
+
+    /*
+     * allocate dynamic memory for the pixel location offset/increment
+     * buffers
+     */
+    if ((hinc = (int *) HDmalloc((unsigned int) im->hres *
+                                   sizeof(int))) == NULL)
+      {
+          (void) fprintf(stderr, err1);
+          goto err;
+      }
+    if ((voff = (int *) HDmalloc((unsigned int) (im->vres + 1) *
+                                   sizeof(int))) == NULL)
+      {
+          (void) fprintf(stderr, err1);
+          goto err;
+      }
+    if (in->rank == 3)
+      {
+          if ((doff = (int *) HDmalloc((unsigned int) (im->dres + 1) *
+                                         sizeof(int))) == NULL)
+            {
+                (void) fprintf(stderr, err1);
+                goto err;
+            }
+      }
+
+    /*
+     * compute the interpolation ratios and pixel location
+     * offsets/increments for each axis
+     */
+    for (i = 0, j = 0; i < im->hres; i++)
+      {
+          loc = hdelta * (float) i + in->hscale[0];
+          hinc[i] = 0;
+          while ((j < (in->dims[0] - 2)) && ((hrange > (float32)0.0) ?
+                     (in->hscale[j + 1] < loc) : (in->hscale[j + 1] > loc)))
+            {
+                hinc[i] += 1;
+                j += 1;
+            }
+          hratio[i] = (in->hscale[j + 1] - loc) / (in->hscale[j + 1] - in->hscale[j]);
+      }
+    for (i = 0, j = 0, voff[0] = 0; i < im->vres; i++)
+      {
+          loc = vdelta * (float) i + in->vscale[0];
+          while ((j < (in->dims[1] - 2)) && ((vrange > (float32)0.0) ?
+                     (in->vscale[j + 1] < loc) : (in->vscale[j + 1] > loc)))
+            {
+                voff[i] += 1;
+                j += 1;
+            }
+          vratio[i] = (in->vscale[j + 1] - loc) / (in->vscale[j + 1] - in->vscale[j]);
+          voff[i + 1] = voff[i];
+      }
+    if (in->rank == 3)
+      {
+          for (i = 0, j = 0, doff[0] = 0; i < im->dres; i++)
+            {
+                loc = ddelta * (float) i + in->dscale[0];
+                while ((j < (in->dims[2] - 2)) && ((drange > (float32)0.0) ?
+                     (in->dscale[j + 1] < loc) : (in->dscale[j + 1] > loc)))
+                  {
+                      doff[i] += 1;
+                      j += 1;
+                  }
+                dratio[i] = (in->dscale[j + 1] - loc) /
+                    (in->dscale[j + 1] - in->dscale[j]);
+                doff[i + 1] = doff[i];
+            }
+      }
+
+    /*
+     * do the interpolation for each point in the target image, taking
+     * advantage of the fact that the target is evenly spaced along each
+     * axis
+     */
+    if (in->rank == 2)
+      {
+          for (i = 0; i < im->vres; i++)
+            {
+                pt[0] = (float32 *) in->data + (in->dims[0] * voff[i]);
+                pt[1] = pt[0] + 1;
+                pt[2] = pt[0] + in->dims[0];
+                pt[3] = pt[2] + 1;
+                for (j = 0; j < im->hres; j++)
+                  {
+                      for (m = 0; m < 4; m++)
+                          pt[m] += hinc[j];
+                      t1 = *pt[2] - ((*pt[2] - *pt[0]) * vratio[i]);
+                      t2 = *pt[3] - ((*pt[3] - *pt[1]) * vratio[i]);
+                      pix = t2 - ((t2 - t1) * hratio[j]);
+                      if (pix > in->max)
+                          pix = in->max;    /* clip (bug fix) */
+                      if (pix < in->min)
+                          pix = in->min;    /* ditto */
+                      *ip++ = (unsigned char)((ratio * (pix - in->min)) + (float32)1.5);
+                  }
+            }
+      }
+    else
+      {     /* rank == 3 */
+          for (i = 0; i < im->dres; i++)
+            {
+                for (j = 0; j < im->vres; j++)
+                  {
+                      pt[0] = (float32 *) in->data + (in->dims[0] * voff[j]) +
+                          (in->dims[0] * in->dims[1] * doff[i]);
+                      pt[1] = pt[0] + 1;
+                      pt[2] = pt[0] + in->dims[0];
+                      pt[3] = pt[2] + 1;
+                      pt[4] = pt[0] + (in->dims[0] * in->dims[1]);
+                      pt[5] = pt[4] + 1;
+                      pt[6] = pt[4] + in->dims[0];
+                      pt[7] = pt[6] + 1;
+                      for (k = 0; k < im->hres; k++)
+                        {
+                            for (m = 0; m < 8; m++)
+                                pt[m] += hinc[k];
+                            t1 = *pt[4] - ((*pt[4] - *pt[0]) *
+                                           dratio[i]);
+                            t2 = *pt[6] - ((*pt[6] - *pt[2]) *
+                                           dratio[i]);
+                            t3 = *pt[5] - ((*pt[5] - *pt[1]) *
+                                           dratio[i]);
+                            t4 = *pt[7] - ((*pt[7] - *pt[3]) *
+                                           dratio[i]);
+                            t5 = t2 - ((t2 - t1) * vratio[j]);
+                            t6 = t4 - ((t4 - t3) * vratio[j]);
+                            pix = t6 - ((t6 - t5) * hratio[k]);
+                            if (pix > in->max)
+                                pix = in->max;  /* clip (bug fix) */
+                            if (pix < in->min)
+                                pix = in->min;  /* ditto */
+                            *ip++ = (unsigned char)((ratio * (pix - in->min)) + (float32)1.5);
+                        }
+                  }
+            }
+      }
+
+    /*
+     * free dynamically allocated memory
+     */
+    HDfree((char *) hratio);
+    HDfree((char *) vratio);
+    if (in->rank == 3)
+        HDfree((char *) dratio);
+    HDfree((char *) hinc);
+    HDfree((char *) voff);
+    if (in->rank == 3)
+        HDfree((char *) doff);
+
+    return (0);
+
+  err:
+    return (1);
+}
+
+/*
+ * Name:
+ *      isnum
+ *
+ * Purpose:
+ *      Determine whether or not the string is representative of an
+ *      integer or floating point number.  If it is, a non-zero value
+ *      is returned.  A leading (-) to denote sign is acceptable.
+ */
+static int
+isnum(char *s)
+{
+    char       *cp;
+    int         rval = FALSE;
+
+    /*
+     * check to see if its a floating point number
+     */
+    cp = s;
+    (void) strtod(s, &cp);
+    if ((*cp == '\0') && (cp != s))
+        rval = TRUE;
+
+    /*
+     * check to see if its an integer number (radix 8, 10, or 16)
+     */
+    else
+      {
+          cp = s;
+          (void) strtol(s, &cp, 0);
+          if ((*cp == '\0') && (cp != s))
+              rval = TRUE;
+      }
+
+    return (rval);
+}
+
+/*
+ * Name:
+ *      mean
+ *
+ * Purpose:
+ *      Reset the maximum and minimum data values to be symmetric about
+ *      the user-specified mean value.
+ */
+void
+mean(struct Input *in,struct Options * opt)
+{
+    float32     delta, delta_max, delta_min;
+
+    delta_max = (float32)fabs((double)(in->max - opt->meanval));
+    delta_min = (float32)fabs((double)(opt->meanval - in->min));
+    delta = (delta_max > delta_min) ? delta_max : delta_min;
+
+    in->max = opt->meanval + delta;
+    in->min = opt->meanval - delta;
+
+    return;
+}
+
+/*
+ * Name:
+ *      palette
+ *
+ * Purpose:
+ *      Process the (user specified) palette input file.
+ */
+static int
+palette(char *palfile)
+{
+    unsigned char *color;
+    unsigned char pal[1024], red[256], green[256], blue[256];
+    FILE       *strm;
+    int         i;
+
+    const char *err1 = "Unable to get palette from file: %s.\n";
+    const char *err2 = "Unable to open palette file: %s.\n";
+    const char *err3 = "Unable to set default palette.\n";
+
+    /*
+     * extract a palette from an HDF file
+     */
+    if (Hishdf(palfile))
+      {
+          if (DFPgetpal(palfile, pal))
+            {
+                (void) fprintf(stderr, err1, palfile);
+                goto err;
+            }
+
+          /*
+           * read in a raw palette file
+           */
+      }
+    else
+      {
+          if ((strm = fopen(palfile, "r")) == NULL)
+            {
+                (void) fprintf(stderr, err2, palfile);
+                goto err;
+            }
+          if (fread((char *) red, 1, 256, strm) != 256)
+            {
+                (void) fprintf(stderr, err1, palfile);
+                goto err;
+            }
+          else if (fread((char *) green, 1, 256, strm) != 256)
+            {
+                (void) fprintf(stderr, err1, palfile);
+                goto err;
+            }
+          else if (fread((char *) blue, 1, 256, strm) != 256)
+            {
+                (void) fprintf(stderr, err1, palfile);
+                goto err;
+            }
+          (void) fclose(strm);
+
+          /*
+           * interleave the R,G,B values
+           */
+          color = pal;
+          for (i = 0; i < 256; i++)
+            {
+                *color++ = red[i];
+                *color++ = green[i];
+                *color++ = blue[i];
+            }
+      }
+
+    /*
+     * set up the palette as the default for subsequent images
+     */
+    if (DFR8setpalette(pal))
+      {
+          (void) fprintf(stderr, err3);
+          goto err;
+      }
+
+    return (0);
+
+  err:
+    return (1);
+}
+
+/*
+ * Name:
+ *      pixrep
+ *
+ * Purpose:
+ *      Expand the image(s) to the desired resolution using pixel
+ *      replication.
+ */
+static int
+pixrep(struct Input *in, struct Raster *im)
+{
+    int        *hidx, *vidx, *didx;
+    int         ovidx, odidx;
+    int         dummy;
+    int32       i, j, k;
+    float32    *dp;
+    float32     range;
+    float32     ratio;
+    unsigned char *ip, *plane, *row, *pix;
+
+    const char *err1 = "Unable to dynamically allocate memory.\n";
+    dp = (float32 *) in->data;
+    ip = im->image;
+    range = in->max - in->min;
+    ratio = (float32)237.9 / range;
+
+    /*
+     * determine the scale indexes of the horizontal pixel locations
+     */
+    if ((hidx = (int *) HDmalloc((unsigned int) (im->hres + 1) * sizeof(int))) == NULL)
+      {
+          (void) fprintf(stderr, err1);
+          goto err;
+      }
+
+    if (indexes(in->hscale, in->dims[0], hidx, im->hres))
+        goto err;
+
+    /*
+     * determine the scale indexes of the vertical pixel locations
+     */
+    if ((vidx = (int *) HDmalloc((unsigned int) (im->vres + 1) *
+                                   sizeof(int))) == NULL)
+      {
+          (void) fprintf(stderr, err1);
+          goto err;
+      }
+
+    if (indexes(in->vscale, in->dims[1], vidx, im->vres))
+        goto err;
+
+    /*
+     * determine the scale indexes of the depth plane locations
+     */
+    dummy = 0;
+    didx = &dummy;
+    if (in->rank == 3)
+      {
+          if ((didx = (int *) HDmalloc((unsigned int) (im->dres + 1) *
+                                         sizeof(int))) == NULL)
+            {
+                (void) fprintf(stderr, err1);
+                goto err;
+            }
+
+          if (indexes(in->dscale, in->dims[2], didx, im->dres))
+              goto err;
+      }
+
+    /*
+     * compute the expanded image
+     */
+    if ((pix = (unsigned char *) HDmalloc((unsigned int) (in->dims[0] + 1))) ==
+        NULL)
+      {
+          (void) fprintf(stderr, err1);
+          goto err;
+      }
+    for (k = 0, odidx = didx[0] - 1; k < im->dres; k++)
+      {
+          /*
+           * construct a new depth plane
+           */
+          if (didx[k] > odidx)
+            {
+                for (j = 0, ovidx = vidx[0] - 1; j < im->vres; j++)
+                  {
+                      /*
+                       * construct a new row
+                       */
+                      if (vidx[j] > ovidx)
+                        {
+                            for (i = 0; i < in->dims[0]; i++)
+                                pix[i] = (unsigned char )((ratio * (*dp++ - in->min)) + (float32)1.5);
+                            for (i = 0; i < im->hres; i++)
+                                *ip++ = pix[hidx[i]];
+                            /*
+                             * repeat the previous row
+                             */
+                        }
+                      else
+                        {
+                            row = ip - im->hres;
+                            for (i = 0; i < im->hres; i++)
+                                *ip++ = *row++;
+                        }
+                      ovidx = vidx[j];
+                  }
+                /*
+                 * repeat the previous depth plane
+                 */
+            }
+          else
+            {
+                plane = ip - (im->hres * im->vres);
+                for (j = 0; j < im->vres; j++)
+                    for (i = 0; i < im->hres; i++)
+                        *ip++ = plane[(j * im->hres) + i];
+            }
+          odidx = didx[k];
+      }
+
+    /*
+     * free dynamically allocated space
+     */
+    HDfree((char *) hidx);
+    HDfree((char *) vidx);
+    if (in->rank == 3)
+        HDfree((char *) didx);
+    HDfree((char *) pix);
+
+    return (0);
+
+  err:
+    return (1);
+}
+
+/*
+ * Name:
+ *      process
+ *
+ * Purpose:
+ *      Process each input file.
+ *
+ * Revision: (pkamat)
+ *		Modified to support the writing of the data set in any of the
+ *		following types: INT32, INT16, INT8 and FP64
+ */
+static int
+process(struct Options *opt)
+{
+    struct Input in;	
+    struct Raster im;
+    unsigned char *ip;
+    int         i, j;
+    int         is_maxmin;
+    int         is_scale;
+    int32       len;
+    FILE       *strm;
+    int32       hdf;
+    int32 	    sd_id, sds_id;
+    int32 	    start3[3], edges3[3], start2[2], edges2[2];
+    int32       dim_index = 0, dim_id;
+    
+#ifdef  DEBUG
+    int         h, v, d;
+#endif /* DEBUG */
+
+    const char *err1 = "Error creating HDF output file: %s.\n";
+    const char *err1a = "Error opening the created HDF output file for writing.\n";
+    const char *err2 = "Unable to dynamically allocate memory.\n";
+    const char *err3a = "Warning: cannot make image smaller using -e ";
+    const char *err3b = "option.\n\t %s resolution will be made the ";
+    const char *err3c = "same as %s dimension of the\n\t dataset, ";
+    const char *err3d = "which is: %d.\n\n";
+    const char *err4 = "Unable to write an RIS8 to the HDF output file\n";
+    const char *err5 = "Unable to write an SDS to the HDF output file\n";
+    const char *err6 = "Unable to close the HDF output file\n";
+    /*
+     * process the palette file (if one was specified)
+     */
+    if (opt->pal == TRUE)
+        if (palette(opt->palfile))
+            goto err;
+
+    /*
+     * create the HDF output file 
+     */
+    if ((hdf = Hopen(opt->outfile, DFACC_CREATE, 0)) == FAIL)
+      {
+          (void) fprintf(stderr, err1, opt->outfile);
+          goto err;
+      }
+    (void) Hclose(hdf);
+
+	/* new interface */
+    if ((sd_id = SDstart(opt->outfile, DFACC_WRITE)) == FAIL)
+      {
+	 (void) fprintf(stderr, err1a, opt->outfile);
+          goto err;
+      }
+
+    /*
+     * main loop: process input files, one per pass
+     */
+
+    for (i = 0; i < opt->fcount; i++)
+
+      {
+          /*
+           * initialize key parameters
+           */
+          in.is_hdf = FALSE;
+          in.is_text = FALSE;
+          in.is_fp32 = FALSE;
+          in.is_fp64 = FALSE;
+	      
+	      in.outtype = opt->infiles[i].outtype;
+          is_maxmin = FALSE;
+          is_scale = FALSE;
+
+          /*
+           * get the file type, input data dimensions, and input data
+           * max/min values
+           */
+	     
+	  if (gtype(opt->infiles[i].filename, &in, &strm))
+	    goto err;
+
+	  if (gdimen(opt->infiles[i].filename, &in, strm))
+	    goto err;
+	  
+	  if (gmaxmin(opt->infiles[i].filename, &in, strm, &is_maxmin))
+	    goto err;
+
+          /*
+           * initialise the scale variables according to the output type of data set
+           */
+
+	  if (init_scales(&in))
+	    goto err;
+
+	      /*
+           * get the scale for each axis
+           */
+      if (gscale(opt->infiles[i].filename, &in, strm, &is_scale))
+              goto err;
+
+          /*
+           * get the input data
+           */
+      len = in.dims[0] * in.dims[1] * in.dims[2];
+	
+	  switch(in.outtype)
+	    {
+	    case 0: /* 32-bit float */
+	      if ((in.data = (VOIDP) HDmalloc((size_t) len * sizeof(float32))) == NULL)
+		{
+		  (void) fprintf(stderr, err2);
+		  goto err;
+		}
+	      break;
+	    case 1: /* 64-bit float */
+	      if ((in.data = (VOIDP) HDmalloc((size_t) len * sizeof(float64))) == NULL)
+		{
+		  (void) fprintf(stderr, err2);
+		  goto err;
+		}
+	      break;
+	    case 2: /* 32-bit integer */
+	      if ((in.data = (VOIDP) HDmalloc((size_t) len * sizeof(int32))) == NULL)
+		{
+		  (void) fprintf(stderr, err2);
+		  goto err;
+		}
+	      break;
+	    case 3: /* 16-bit integer */
+	      if ((in.data = (VOIDP) HDmalloc((size_t) len * sizeof(int16))) == NULL)
+		{
+		  (void) fprintf(stderr, err2);
+		  goto err;
+		}
+	      break;
+	    case 4: /* 8-bit integer */
+	      if ((in.data = (VOIDP) HDmalloc((size_t) len * sizeof(int8))) == NULL)
+		{
+		  (void) fprintf(stderr, err2);
+		  goto err;
+		}
+	      break;
+	    }
+	  
+          if (gdata(opt->infiles->filename, &in, strm, &is_maxmin))
+	    goto err;
+		
+          /*
+           * put the input data in the HDF output file, in SDS format
+           */
+
+	  if (opt->to_float == TRUE)
+	    {
+
+	  switch(in.outtype)
+	    {
+
+	    case 0: /* 32-bit float */
+            
+			/* create data-set */ 
+			if (in.rank == 2)
+                  {
+                     	edges2[0] = in.dims[1];
+		  	edges2[1] = in.dims[0];
+		  	
+			
+			sds_id = SDcreate (sd_id, NULL, DFNT_FLOAT32, in.rank, edges2);
+		  	start2[0] = 0;
+		  	start2[1] = 0;	
+                  }
+                else
+                  {
+		        edges3[0] = in.dims[2];
+		  	edges3[1] = in.dims[1];
+			edges3[2] = in.dims[0];
+			sds_id = SDcreate (sd_id, NULL, DFNT_FLOAT32, in.rank, edges3);
+			start3[0] = 0;
+			start3[1] = 0;	
+			start3[2] = 0;
+                  }
+
+                
+                if (is_scale == TRUE)
+                  {
+			/* set range */
+		    if (SDsetrange(sds_id, &in.max, &in.min)!=0)
+		      {
+			(void) fprintf(stderr, err5);
+			    goto err;
+		      }	
+		    
+			/* set dimension scale */
+			if (in.rank == 2)
+		      {
+			dim_index = 0;
+			dim_id = SDgetdimid (sds_id, dim_index);
+			    
+			
+			if (SDsetdimscale(dim_id, edges2[0],DFNT_FLOAT32,(VOIDP)in.vscale)!=0)
+			  {
+			    (void) fprintf(stderr, err5);
+			    goto err;
+			  }
+			    
+			dim_index = 1;  
+			dim_id = SDgetdimid (sds_id, dim_index); 
+			
+			if (SDsetdimscale(dim_id, edges2[1], DFNT_FLOAT32, (VOIDP)in.hscale)!=0)
+			  {
+			    (void) fprintf(stderr, err5);
+			    goto err;
+			  }
+		      }
+		    else
+		      {
+			dim_index = 0; 
+			dim_id = SDgetdimid (sds_id, dim_index);
+			if (SDsetdimscale(dim_id, edges3[0], DFNT_FLOAT32, (VOIDP)in.dscale)!=0)
+			  {
+			    (void) fprintf(stderr, err5);
+			    goto err;
+			  }
+			dim_index = 1; 
+			dim_id = SDgetdimid (sds_id, dim_index); 
+			
+			if (SDsetdimscale(dim_id, edges3[1], DFNT_FLOAT32, (VOIDP)in.vscale)!=0)
+			  {
+			      (void) fprintf(stderr, err5);
+			  			goto err;
+			    }
+			  dim_index = 2; 
+			  dim_id = SDgetdimid (sds_id, dim_index);	
+			  
+			  if (SDsetdimscale(dim_id, edges3[2], DFNT_FLOAT32, (VOIDP)in.hscale)!=0)
+			    {
+			      (void) fprintf(stderr, err5);
+			      goto err;
+			    }
+		      }
+                  }
+				/* write data to the data set */
+		if (in.rank == 2)
+		  {
+		    if (SDwritedata(sds_id, start2, NULL, edges2, (VOIDP)in.data)!=0)
+		      {
+			(void) fprintf(stderr, err5);
+			goto err;
+		      }
+		  }
+		else
+		  {
+		    if (SDwritedata(sds_id, start3, NULL, edges3, (VOIDP)in.data)!=0)
+		      {
+			(void) fprintf(stderr, err5);
+			goto err;
+		      }
+		    
+		  }
+		break; 
+		
+	    case 1:/* 64-bit float */
+            
+			/* create data-set */ 
+	       
+	      if (in.rank == 2)
+		{
+		  edges2[0] = in.dims[1];
+		  edges2[1] = in.dims[0];
+		  sds_id = SDcreate (sd_id, NULL, DFNT_FLOAT64, in.rank, edges2);
+		  start2[0] = 0;
+		  start2[1] = 0;	
+		}
+	      else
+		{
+		  edges3[0] = in.dims[2];
+		  edges3[1] = in.dims[1];
+		  edges3[2] = in.dims[0];
+		  sds_id = SDcreate (sd_id, NULL, DFNT_FLOAT64, in.rank, edges3);
+		  start3[0] = 0;
+		  start3[1] = 0;	
+		  start3[2] = 0;
+		}
+	      
+	      
+	      if (is_scale == TRUE)
+		{
+		  /* set range */
+		  if (SDsetrange(sds_id, &in.fp64s.max, &in.fp64s.min)!=0)
+		    {
+			(void) fprintf(stderr, err5);
+			goto err;
+		    }
+		  
+		  /* set dimension scale */
+		  if (in.rank == 2)
+		    {
+		      dim_index = 0;
+		      dim_id = SDgetdimid (sds_id, dim_index); 
+		 
+		      if (SDsetdimscale(dim_id, edges2[0],DFNT_FLOAT64,(VOIDP)in.fp64s.vscale)!=0)
+			{
+			  (void) fprintf(stderr, err5);
+			  goto err;
+			}
+			
+		      dim_index = 1; 
+		      dim_id = SDgetdimid (sds_id, dim_index); 
+		      if (SDsetdimscale(dim_id, edges2[1], DFNT_FLOAT64, (VOIDP)in.fp64s.hscale)!=0)
+			{
+			  (void) fprintf(stderr, err5);
+			  goto err;
+			}
+		    }
+		  else
+		    {
+		      dim_index = 0;
+		      dim_id = SDgetdimid (sds_id, dim_index);  	
+		      if (SDsetdimscale(dim_id, edges3[0], DFNT_FLOAT64, (VOIDP)in.fp64s.dscale)!=0)
+			  {
+			    (void) fprintf(stderr, err5);
+			    goto err;
+			  }
+		      dim_index = 1; 
+		      dim_id = SDgetdimid (sds_id, dim_index); 
+		      if (SDsetdimscale(dim_id, edges3[1], DFNT_FLOAT64, (VOIDP)in.fp64s.vscale)!=0)
+			{
+			  (void) fprintf(stderr, err5);
+			  goto err;
+			}
+		      dim_index = 2;
+		      dim_id = SDgetdimid (sds_id, dim_index);  	
+		      if (SDsetdimscale(dim_id, edges3[2], DFNT_FLOAT64, (VOIDP)in.fp64s.hscale)!=0)
+			{
+			  (void) fprintf(stderr, err5);
+			  goto err;
+			}
+		    }
+		}
+		  
+		/* write data to the data set */
+	      if (in.rank == 2)
+		{
+		  if (SDwritedata(sds_id, start2, NULL, edges2, (VOIDP)in.data)!=0)
+		    {
+		      (void) fprintf(stderr, err5);
+		      goto err;
+		    }
+		}
+	      else
+		  {
+		    if (SDwritedata(sds_id, start3, NULL, edges3, (VOIDP)in.data)!=0)
+		      {
+			(void) fprintf(stderr, err5);
+			goto err;
+		      }
+		    
+		  }
+	      break; 
+	    case 2: /* 32-bit integer */
+            
+			/* create data-set */ 
+	      
+	      if (in.rank == 2)
+		{
+		  edges2[0] = in.dims[1];
+		  edges2[1] = in.dims[0];
+		  sds_id = SDcreate (sd_id, NULL, DFNT_INT32, in.rank, edges2);
+		  start2[0] = 0;
+		  start2[1] = 0;	
+		}
+	      else
+		{
+		  edges3[0] = in.dims[2];
+		  edges3[1] = in.dims[1];
+		  edges3[2] = in.dims[0];
+		  sds_id = SDcreate (sd_id, NULL, DFNT_INT32, in.rank, edges3);
+		  start3[0] = 0;
+		  start3[1] = 0;	
+		  start3[2] = 0;
+		}
+	      
+	      if (is_scale == TRUE)
+		{
+		  /* set range */
+		  if (SDsetrange(sds_id, &in.in32s.max, &in.in32s.min)!=0)
+		    {
+		      (void) fprintf(stderr, err5);
+		      goto err;
+		    }
+
+		  /* set dimension scale */
+		  if (in.rank == 2)
+		    {	
+		       dim_index = 0;
+		      dim_id = SDgetdimid (sds_id, dim_index);
+			if (SDsetdimscale(dim_id, edges2[0],DFNT_INT32,(VOIDP)in.in32s.vscale)!=0)
+			  {
+			    (void) fprintf(stderr, err5);
+			    goto err;
+			  }
+			
+			dim_index = 1; 
+			dim_id = SDgetdimid (sds_id, dim_index);  
+			if (SDsetdimscale(dim_id, edges2[1], DFNT_INT32, (VOIDP)in.in32s.hscale)!=0)
+			  {
+			    (void) fprintf(stderr, err5);
+		 		goto err;
+			  }
+		    }
+		  else 
+		    {
+		      
+		      dim_index = 0;
+		      dim_id = SDgetdimid (sds_id, dim_index);	
+		      if (SDsetdimscale(dim_id, edges3[0], DFNT_INT32, (VOIDP)in.in32s.dscale)!=0)
+			{
+			  (void) fprintf(stderr, err5);
+			  goto err;
+			}
+		      dim_index = 1; 
+		      dim_id = SDgetdimid (sds_id, dim_index); 
+		      if (SDsetdimscale(dim_id, edges3[1], DFNT_INT32, (VOIDP)in.in32s.vscale)!=0)
+			{
+			  (void) fprintf(stderr, err5);
+			  goto err;
+			}
+		      dim_index = 2;
+		      dim_id = SDgetdimid (sds_id, dim_index);	
+		      if (SDsetdimscale(dim_id, edges3[2], DFNT_INT32, (VOIDP)in.in32s.hscale)!=0)
+			{
+			  (void) fprintf(stderr, err5);
+			  goto err;
+			}
+		    }
+		}				
+	    
+		  /* write data to the data set */
+		  if (in.rank == 2)
+		{
+		  if (SDwritedata(sds_id, start2, NULL, edges2, (VOIDP)in.data)!=0)
+		    {
+		      (void) fprintf(stderr, err5);
+		      goto err;
+		    }
+		}
+	      else
+		{
+		  if (SDwritedata(sds_id, start3, NULL, edges3, (VOIDP)in.data)!=0)
+		    {
+		      (void) fprintf(stderr, err5);
+		      goto err;
+		    }			
+		}
+	      
+	      break;
+	    case 3: /* 16-bit integer */
+            
+			/* create data-set */ 
+	      
+	      if (in.rank == 2)
+		{
+		  edges2[0] = in.dims[1];
+		  edges2[1] = in.dims[0];
+		  sds_id = SDcreate (sd_id, NULL, DFNT_INT16, in.rank, edges2);
+		  start2[0] = 0;
+		  start2[1] = 0;	
+		}
+	      else
+		{
+		  edges3[0] = in.dims[2];
+		  edges3[1] = in.dims[1];
+		  edges3[2] = in.dims[0];
+		  sds_id = SDcreate (sd_id, NULL, DFNT_INT16, in.rank, edges3);
+		  start3[0] = 0;
+		  start3[1] = 0;	
+		  start3[2] = 0;
+		}
+		
+	      if (is_scale == TRUE)
+		{
+		  /* set range */
+		  if (SDsetrange(sds_id, &in.in16s.max, &in.in16s.min)!=0)
+		    {
+		      (void) fprintf(stderr, err5);
+		      goto err;
+		    }
+
+		  /* set dimension scale */
+		  if (in.rank == 2)
+		    {	
+		      dim_index = 0;
+		      dim_id = SDgetdimid (sds_id, dim_index);  
+		      if (SDsetdimscale(dim_id, edges2[0],DFNT_INT16,(VOIDP)in.in16s.vscale)!=0)
+			{
+			  (void) fprintf(stderr, err5);
+			  goto err;
+			}
+		      
+		      dim_index = 1; 
+		      dim_id = SDgetdimid (sds_id, dim_index);  
+		      if (SDsetdimscale(dim_id, edges2[1], DFNT_INT16, (VOIDP)in.in16s.hscale)!=0)
+			{
+			  (void) fprintf(stderr, err5);
+			  goto err;
+			}
+		    }
+		  else 
+		    {
+		      dim_index = 0;
+		      dim_id = SDgetdimid (sds_id, dim_index);	
+		      if (SDsetdimscale(dim_id, edges3[0], DFNT_INT16, (VOIDP)in.in16s.dscale)!=0)
+			{
+			  (void) fprintf(stderr, err5);
+			  goto err;
+			}
+		      dim_index = 1; 
+		      dim_id = SDgetdimid (sds_id, dim_index); 
+		      if (SDsetdimscale(dim_id, edges3[1], DFNT_INT16, (VOIDP)in.in16s.vscale)!=0)
+			{
+			  (void) fprintf(stderr, err5);
+			  goto err;
+			}
+		      dim_index = 2;
+		      dim_id = SDgetdimid (sds_id, dim_index);	
+		      if (SDsetdimscale(dim_id, edges3[2], DFNT_INT16, (VOIDP)in.in16s.hscale)!=0)
+			{
+			  (void) fprintf(stderr, err5);
+			  goto err;
+			}
+		    }
+		}				
+	      if (in.rank == 2)
+		{
+		  if (SDwritedata(sds_id, start2, NULL, edges2, (VOIDP)in.data)!=0)
+		    {
+		      (void) fprintf(stderr, err5);
+		      goto err;
+		    }
+		}
+	      else
+		{
+			  /* write data to the data set */
+		  if (SDwritedata(sds_id, start3, NULL, edges3, (VOIDP)in.data)!=0)
+		    {
+		      (void) fprintf(stderr, err5);
+		      goto err;
+		    }			
+		}
+	      
+	break;
+	    case 4: /* 8-bit integer */
+            
+			/* create data-set */ 
+	      
+	      if (in.rank == 2)
+		{
+		  edges2[0] = in.dims[1];
+		  edges2[1] = in.dims[0];
+		  sds_id = SDcreate (sd_id, NULL, DFNT_INT8, in.rank, edges2);
+		  start2[0] = 0;
+		  start2[1] = 0;	
+		}
+	      else
+		{
+		  edges3[0] = in.dims[2];
+		  edges3[1] = in.dims[1];
+		  edges3[2] = in.dims[0];
+		  sds_id = SDcreate (sd_id, NULL, DFNT_INT8, in.rank, edges3);
+		  start3[0] = 0;
+		  start3[1] = 0;	
+		  start3[2] = 0;
+		}
+		
+	      if (is_scale == TRUE)
+		{
+		  /* set range */
+		  if (SDsetrange(sds_id, &in.in8s.max, &in.in8s.min)!=0)
+		    {
+		      (void) fprintf(stderr, err5);
+		      goto err;
+		    }
+
+		  /* set dimension scale */
+		  if (in.rank == 2)
+		    {	
+		      dim_index = 0;
+		      dim_id = SDgetdimid (sds_id, dim_index);
+		      if (SDsetdimscale(dim_id, edges2[0],DFNT_INT8,(VOIDP)in.in8s.vscale)!=0)
+			{
+			  (void) fprintf(stderr, err5);
+			  goto err;
+			}
+		      
+		      dim_index = 1; 
+		      dim_id = SDgetdimid (sds_id, dim_index); 
+		      if (SDsetdimscale(dim_id, edges2[1], DFNT_INT8, (VOIDP)in.in8s.hscale)!=0)
+			{
+			  (void) fprintf(stderr, err5);
+			  goto err;
+			}
+		    }
+		  else 
+		    {
+		      dim_index = 0;
+		      dim_id = SDgetdimid (sds_id, dim_index);	
+		      if (SDsetdimscale(dim_id, edges3[0], DFNT_INT8, (VOIDP)in.in8s.dscale)!=0)
+			{
+			  (void) fprintf(stderr, err5);
+			  goto err;
+			}
+		      dim_index = 1; 
+		      dim_id = SDgetdimid (sds_id, dim_index); 
+		      if (SDsetdimscale(dim_id, edges3[1], DFNT_INT8, (VOIDP)in.in8s.vscale)!=0)
+			{
+			  (void) fprintf(stderr, err5);
+			  goto err;
+			}
+		      dim_index = 2;
+		      dim_id = SDgetdimid (sds_id, dim_index);	
+		      if (SDsetdimscale(dim_id, edges3[2], DFNT_INT8, (VOIDP)in.in8s.hscale)!=0)
+			{
+			    (void) fprintf(stderr, err5);
+			    goto err;
+			}
+		    }
+		}	
+		  
+		  /* write data to the data set */
+	      if (in.rank == 2)
+		{
+		  if (SDwritedata(sds_id, start2, NULL, edges2, (VOIDP)in.data)!=0)
+		    {
+		      (void) fprintf(stderr, err5);
+		      goto err;
+		    }
+		}
+	      else
+		{
+		  if (SDwritedata(sds_id, start3, NULL, edges3, (VOIDP)in.data)!=0)
+		    {
+		      (void) fprintf(stderr, err5);
+		      goto err;
+		    }			
+		}
+	      break;
+	    }
+	    }	  
+          /*
+           * put the input data in the HDF output file, in RIS8 format
+           */
+          if (opt->to_image == TRUE)
+            {
+                /*
+                 * allocate a buffer for the output image
+                 */
+                im.hres = (opt->hres == 0) ? in.dims[0] : opt->hres;
+                if ((im.hres < in.dims[0]) && (opt->ctm == EXPAND))
+                  {
+                      (void) fprintf(stderr, err3a);
+                      (void) fprintf(stderr, err3b, "Horiz.");
+                      (void) fprintf(stderr, err3c, "horiz.");
+                      (void) fprintf(stderr, err3d, in.dims[0]);
+                      im.hres = in.dims[0];
+                      opt->hres = in.dims[0];
+                  }
+                im.vres = (opt->vres == 0) ? in.dims[1] : opt->vres;
+                if ((im.vres < in.dims[1]) && (opt->ctm == EXPAND))
+                  {
+                      (void) fprintf(stderr, err3a);
+                      (void) fprintf(stderr, err3b, "Vert.");
+                      (void) fprintf(stderr, err3c, "vert.");
+                      (void) fprintf(stderr, err3d, in.dims[1]);
+                      im.vres = in.dims[1];
+                      opt->vres = in.dims[1];
+                  }
+                im.dres = 1;
+                if (in.rank == 3)
+                  {
+                      im.dres = (opt->dres == 0) ? in.dims[2] :
+                          opt->dres;
+                      if ((im.dres < in.dims[2]) &&
+                          (opt->ctm == EXPAND))
+                        {
+                            (void) fprintf(stderr, err3a);
+                            (void) fprintf(stderr, err3b, "Depth");
+                            (void) fprintf(stderr, err3c, "depth");
+                            (void) fprintf(stderr, err3d,
+                                           in.dims[2]);
+                            im.dres = in.dims[2];
+                            opt->dres = in.dims[2];
+                        }
+                  }
+                len = im.hres * im.vres * im.dres;
+                if ((im.image = (unsigned char *) HDmalloc((unsigned int) len)) == NULL)
+                  {
+                      (void) fprintf(stderr, err2);
+                      goto err;
+                  }
+
+                /*
+                 * reset max/min symmetrically about the mean value
+                 */
+                if (opt->mean == TRUE)
+                    mean(&in, opt);
+
+                /*
+                 * perform pixel replication or interpolation
+                 */
+                if (opt->ctm == EXPAND)
+                  {
+                      if (pixrep(&in, &im))
+                          goto err;
+                  }
+                else
+                  {     /* INTERP */
+                      if (interp(&in, &im))
+                          goto err;
+                  }
+
+                len = im.hres * im.vres;
+                for (j = 0, ip = im.image; j < im.dres; j++, ip += len)
+                  {
+                      if (DFR8addimage(opt->outfile, ip, im.hres,
+                                       im.vres, DFTAG_RLE))
+                        {
+                            (void) fprintf(stderr, err4);
+                            goto err;
+                        }
+                  }
+
+#ifdef  DEBUG
+                (void) printf("Output Raster Information ...\n\n");
+                (void) printf("\tresolution (horiz,vert,[depth]):\n\n");
+                if (in.rank == 2)
+                    (void) printf("\t%d %d\n\n", im.hres, im.vres);
+                else
+                    (void) printf("\t%d %d %d\n\n", im.hres,
+                                  im.vres, im.dres);
+                if (opt->mean == TRUE)
+                  {
+                      (void) printf("\tadjusted max/min values:\n\n");
+                      (void) printf("\t%f %f\n\n", in.max, in.min);
+                  }
+                (void) printf("\tcolor index values:");
+                for (d = 0, ip = im.image; d < im.dres; d++)
+                  {
+                      (void) printf("\n");
+                      for (v = 0; v < im.vres; v++)
+                        {
+                            (void) printf("\n");
+                            for (h = 0; h < im.hres; h++, ip++)
+                                (void) printf("\t%d", *ip);
+                        }
+                  }
+                (void) printf("\n");
+#endif /* DEBUG */
+            }
+		  /*
+           * free dynamically allocated space
+           */
+	  fpdeallocate(&in,&im,opt);
+	 
+	  /* close data-set */
+	  if (opt->to_float)
+	    {
+	      if (SDendaccess (sds_id) !=0 )
+		{
+		  (void) fprintf(stderr, err5);
+		  goto err;
+		}
+	    }
+	    
+      }
+
+	  /* close file */
+	if (SDend (sd_id) != 0)
+	  {
+	    (void) fprintf(stderr, err6);
+	    goto err;
+	  }
+	
+    return (0);
+
+  err:
+    return (1);
+}
+
+/*
+ * Name: (pkamat - New function)
+ *      fpdeallocate
+ *
+ * Purpose:
+ *      Deallocate memory of all data structures
+ */
+
+void fpdeallocate(struct Input *in, struct Raster *im, struct Options *opt)
+{
+ switch(in->outtype)
+    {
+    case 0 :
+      HDfree((char *) in->hscale);
+      HDfree((char *) in->vscale);
+      if (in->rank == 3)
+	HDfree((char *) in->dscale);
+      
+      if (opt->to_image == TRUE)
+	HDfree((char *) im->image);
+      break;
+      
+    case 1 :
+      HDfree((char *) in->fp64s.hscale);
+      HDfree((char *) in->fp64s.vscale);
+      if (in->rank == 3)
+	HDfree((char *) in->fp64s.dscale);
+      
+      if (opt->to_image == TRUE)
+	HDfree((char *) im->image);
+      break;
+      
+    case 2 :
+      HDfree((char *) in->in32s.hscale);
+      HDfree((char *) in->in32s.vscale);
+      if (in->rank == 3)
+	HDfree((char *) in->in32s.dscale);
+      break;
+		
+    case 3 :
+      HDfree((char *) in->in16s.hscale);
+      HDfree((char *) in->in16s.vscale);
+      if (in->rank == 3)
+	HDfree((char *) in->in16s.dscale);
+      break;
+      
+    case 4 :
+      HDfree((char *) in->in8s.hscale);
+      HDfree((char *) in->in8s.vscale);
+      if (in->rank == 3)
+	HDfree((char *) in->in8s.dscale);
+      break;
+      
+    }
+   HDfree((char *) in->data);
+
+}
+
+
+/*
+ * Name: (pkamat - New function)
+ *      init_scales
+ *
+ * Purpose:
+ *      Initialise the data-structures to hold scale information
+ */
+static int init_scales(struct Input * in)
+{
+  const char *err1 = "Unable to dynamically allocate memory.\n";
+  switch(in->outtype)
+    {
+    case 0: /* 32-bit float */
+      if ((in->hscale = (float32 *) HDmalloc((size_t)
+					     (in->dims[0] + 1) * sizeof(float32))) == NULL)
+	{
+	  (void) fprintf(stderr, err1);
+	  goto err;
+	}
+      if ((in->vscale = (float32 *) HDmalloc((size_t)
+					     (in->dims[1] + 1) * sizeof(float32))) == NULL)
+	{
+	  (void) fprintf(stderr, err1);
+	  goto err;
+	}
+      if (in->rank == 3)
+	{
+	  if ((in->dscale = (float32 *) HDmalloc((size_t)
+						 (in->dims[2] + 1) * sizeof(float32))) == NULL)
+	    {
+	      (void) fprintf(stderr, err1);
+	      goto err;
+	    }
+	}
+      break;
+      
+    case 1: /* 64-bit float */
+      
+      if ((in->fp64s.hscale = (float64 *) HDmalloc((size_t)
+						   (in->dims[0] + 1) * sizeof(float64))) == NULL)
+	{
+	    (void) fprintf(stderr, err1);
+	    goto err;
+	}
+      if ((in->fp64s.vscale = (float64 *) HDmalloc((size_t)
+						   (in->dims[1] + 1) * sizeof(float64))) == NULL)
+	{
+	  (void) fprintf(stderr, err1);
+	  goto err;
+	}
+      if (in->rank == 3)
+	{
+	  if ((in->fp64s.dscale = (float64 *) HDmalloc((size_t)
+						  (in->dims[2] + 1) * sizeof(float64))) == NULL)
+	    {
+	      (void) fprintf(stderr, err1);
+	      goto err;
+	    }
+	}
+      break;
+    case 2: /* 32-bit integer */
+      if ((in->in32s.hscale = (int32 *) HDmalloc((size_t)
+						 (in->dims[0] + 1) * sizeof(int32))) == NULL)
+	{
+	  (void) fprintf(stderr, err1);
+	  goto err;
+	}
+      if ((in->in32s.vscale = (int32 *) HDmalloc((size_t)
+						 (in->dims[1] + 1) * sizeof(int32))) == NULL)
+	{
+	  (void) fprintf(stderr, err1);
+	  goto err;
+	}
+      if (in->rank == 3)
+	{
+	  if ((in->in32s.dscale = (int32 *) HDmalloc((size_t)
+                             (in->dims[2] + 1) * sizeof(int32))) == NULL)
+	    {
+	      (void) fprintf(stderr, err1);
+	      goto err;
+	    }
+	}
+      break;
+      
+    case 3: /* 16-bit integer */
+      if ((in->in16s.hscale = (int16 *) HDmalloc((size_t)
+						 (in->dims[0] + 1) * sizeof(int16))) == NULL)
+	{
+	  (void) fprintf(stderr, err1);
+	  goto err;
+	}
+      if ((in->in16s.vscale = (int16 *) HDmalloc((size_t)
+						 (in->dims[1] + 1) * sizeof(int16))) == NULL)
+	{
+	  (void) fprintf(stderr, err1);
+	  goto err;
+	}
+      if (in->rank == 3)
+	{
+	  if ((in->in16s.dscale = (int16 *) HDmalloc((size_t)
+						     (in->dims[2] + 1) * sizeof(int16))) == NULL)
+	    {
+	      (void) fprintf(stderr, err1);
+	      goto err;
+	    }
+	}
+      break;
+	
+    case 4: /* 8-bit integer */
+      if ((in->in8s.hscale = (int8 *) HDmalloc((size_t)
+					       (in->dims[0] + 1) * sizeof(int8))) == NULL)
+	{
+	  (void) fprintf(stderr, err1);
+	  goto err;
+	}
+      if ((in->in8s.vscale = (int8 *) HDmalloc((size_t)
+                             (in->dims[1] + 1) * sizeof(int8))) == NULL)
+	{
+	  (void) fprintf(stderr, err1);
+	  goto err;
+	}
+      if (in->rank == 3)
+	{
+	  if ((in->in8s.dscale = (int8 *) HDmalloc((size_t)
+						   (in->dims[2] + 1) * sizeof(int8))) == NULL)
+	    {
+	      (void) fprintf(stderr, err1);
+	      goto err;
+	    }
+	}
+      break;	
+      
+    }
+	return (0);
+    err:
+	return (1);
+}
+
+/*
+ * Name:
+ *      usage
+ *
+ * Purpose:
+ *      Print a summary of command usage.
+ */
+void
+usage(char *name)
+{
+    (void) fprintf(stderr, "\nUsage:\t%s -h[elp], OR\n", name);
+    (void) fprintf(stderr, "\t%s <infile> [ [-t[ype] <output-type> | -n] ", name);
+    (void) fprintf(stderr, "[<infile> [-t[ype] <output-type> | -n ]]...]\n");
+    (void) fprintf(stderr, "\t\t\t\t\t-o[utfile] <outfile> [options..]\n");
+    (void) fprintf(stderr, "\n\t-t[ype] <output_type>");
+     
+    (void) fprintf(stderr, "\n\t\tOptionally used for every input ASCII file to specify the");
+    (void) fprintf(stderr, "\n\t\tdata type of the data-set to be written. If not specified");
+    (void) fprintf(stderr, "\n\t\tdefault data type is 32-bit floating point. <output-type>");
+    (void) fprintf(stderr, "\n\t\tcan be any of the following: FP32 (default), FP64, INT32");
+    (void) fprintf(stderr, "\n\t\tINT16, INT8. It can be used only with ASCII files.");
+
+    (void) fprintf(stderr, "\n\t-n");
+    (void) fprintf(stderr, "\n\t\tThis option is to be used only if the binary input file ");
+    (void) fprintf(stderr, "\n\t\tcontains 64-bit floating point data and the default");
+    (void) fprintf(stderr, "\n\t\tbehaviour (default behaviour is to write it to a 32-bit");
+    (void) fprintf(stderr, "\n\t\tfloating point data-set) should be overridden to write ");
+    (void) fprintf(stderr, "\n\t\tit to a 64-bit floating point data-set.");
+    (void) fprintf(stderr, "\n\n\toptions...\n");
+    (void) fprintf(stderr, "\n\t-r[aster]:\n");
+    (void) fprintf(stderr, "\t\tproduce an image.  Could be ");
+    (void) fprintf(stderr, "followed by:\n");
+    (void) fprintf(stderr, "\t\t-e[xpand] <horiz> <vert> ");
+    (void) fprintf(stderr, "[<depth>]:\n");
+    (void) fprintf(stderr, "\t\t\t resolution with pixel ");
+    (void) fprintf(stderr, "replication\n");
+    (void) fprintf(stderr, "\t\t-i[nterp] <horiz> <vert> ");
+    (void) fprintf(stderr, "[<depth>]:\n");
+    (void) fprintf(stderr, "\t\t\tresolution with interpolation\n");
+    (void) fprintf(stderr, "\t\t-p[alfile] <palfile>:\n");
+    (void) fprintf(stderr, "\t\t\tinclude palette from palfile\n");
+    (void) fprintf(stderr, "\t\t-m[ean] <meanval>:\n");
+    (void) fprintf(stderr, "\t\t\tmean value to scale image ");
+    (void) fprintf(stderr, "around\n");
+    (void) fprintf(stderr, "\t-f[loat]:\n");
+    (void) fprintf(stderr, "\t\tproduce floating point data\n\n");
+
+    return;
+}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+


Property changes on: packages/libhdf4/branches/upstream/current/mfhdf/hdfimport/hdfimport.c
___________________________________________________________________
Name: svn:executable
   + *

Added: packages/libhdf4/branches/upstream/current/mfhdf/hdfimport/hdfimport.input1
===================================================================
--- packages/libhdf4/branches/upstream/current/mfhdf/hdfimport/hdfimport.input1	                        (rev 0)
+++ packages/libhdf4/branches/upstream/current/mfhdf/hdfimport/hdfimport.input1	2007-05-15 09:53:05 UTC (rev 831)
@@ -0,0 +1,49 @@
+open cb32r2.hdf
+prev tag = 30
+next tag = 702
+info
+dump -float
+close
+open cb32r3.hdf
+prev tag = 30
+next tag = 702
+info
+dump -float
+close
+open cb64r2.hdf
+prev tag = 30
+next tag = 702
+info
+dump -float
+close
+open cb64r3.hdf
+prev tag = 30
+next tag = 702
+info
+dump -float
+close
+open ctxtr2.hdf
+prev tag = 30
+next tag = 702
+info
+dump -float
+close
+open ctxtr3.hdf
+prev tag = 30
+next tag = 702
+info
+dump -float
+close
+open cb64r2_ris.hdf
+prev tag = 30
+next tag = 702
+info
+dump -float
+close
+open ctxtr2_ris.hdf
+prev tag = 30
+next tag = 303
+info
+dump -byte
+close
+quit


Property changes on: packages/libhdf4/branches/upstream/current/mfhdf/hdfimport/hdfimport.input1
___________________________________________________________________
Name: svn:executable
   + *

Added: packages/libhdf4/branches/upstream/current/mfhdf/hdfimport/hdfimport.out1
===================================================================
--- packages/libhdf4/branches/upstream/current/mfhdf/hdfimport/hdfimport.out1	                        (rev 0)
+++ packages/libhdf4/branches/upstream/current/mfhdf/hdfimport/hdfimport.out1	2007-05-15 09:53:05 UTC (rev 831)
@@ -0,0 +1,646 @@
+ctxtr2.hdf:
+
+Version Descriptor            : (tag 30)
+	Ref no      1	      92 bytes
+
+Number type                   : (tag 106)
+	Ref no     13	       4 bytes
+	Ref no     15	       4 bytes
+	Ref no     17	       4 bytes
+
+SciData dimension record      : (tag 701)
+	Ref no     13	      22 bytes
+	Ref no     15	      14 bytes
+	Ref no     17	      14 bytes
+
+Scientific Data               : (tag 702)
+	Ref no      4	      12 bytes
+	Ref no      6	      16 bytes
+	Ref no      7	      48 bytes
+
+Numeric Data Group            : (tag 720)
+	Ref no      2	      16 bytes
+	Ref no      3	      16 bytes
+	Ref no      5	      16 bytes
+
+Vdata                         : (tag 1962)
+	Ref no      8	      60 bytes
+	Ref no     10	      60 bytes
+	Ref no     12	      61 bytes
+
+Vdata Storage                 : (tag 1963)
+	Ref no      8	       4 bytes
+	Ref no     10	       4 bytes
+	Ref no     12	       8 bytes
+
+Vgroup                        : (tag 1965)
+	Ref no      9	      33 bytes
+	Ref no     11	      33 bytes
+	Ref no     14	      56 bytes
+	Ref no     16	      49 bytes
+	Ref no     18	      49 bytes
+	Ref no     19	      51 bytes
+
+ctxtr3.hdf:
+
+Version Descriptor            : (tag 30)
+	Ref no      1	      92 bytes
+
+Number type                   : (tag 106)
+	Ref no     17	       4 bytes
+	Ref no     19	       4 bytes
+	Ref no     21	       4 bytes
+	Ref no     23	       4 bytes
+
+SciData dimension record      : (tag 701)
+	Ref no     17	      30 bytes
+	Ref no     19	      14 bytes
+	Ref no     21	      14 bytes
+	Ref no     23	      14 bytes
+
+Scientific Data               : (tag 702)
+	Ref no      4	      20 bytes
+	Ref no      6	      12 bytes
+	Ref no      8	      16 bytes
+	Ref no      9	     240 bytes
+
+Numeric Data Group            : (tag 720)
+	Ref no      2	      16 bytes
+	Ref no      3	      16 bytes
+	Ref no      5	      16 bytes
+	Ref no      7	      16 bytes
+
+Vdata                         : (tag 1962)
+	Ref no     10	      60 bytes
+	Ref no     12	      60 bytes
+	Ref no     14	      60 bytes
+	Ref no     16	      61 bytes
+
+Vdata Storage                 : (tag 1963)
+	Ref no     10	       4 bytes
+	Ref no     12	       4 bytes
+	Ref no     14	       4 bytes
+	Ref no     16	       8 bytes
+
+Vgroup                        : (tag 1965)
+	Ref no     11	      33 bytes
+	Ref no     13	      33 bytes
+	Ref no     15	      33 bytes
+	Ref no     18	      60 bytes
+	Ref no     20	      49 bytes
+	Ref no     22	      49 bytes
+	Ref no     24	      49 bytes
+	Ref no     25	      59 bytes
+
+cb32i2.hdf:
+
+Version Descriptor            : (tag 30)
+	Ref no      1	      92 bytes
+
+Number type                   : (tag 106)
+	Ref no     13	       4 bytes
+	Ref no     15	       4 bytes
+	Ref no     17	       4 bytes
+
+SciData dimension record      : (tag 701)
+	Ref no     13	      22 bytes
+	Ref no     15	      14 bytes
+	Ref no     17	      14 bytes
+
+Scientific Data               : (tag 702)
+	Ref no      4	      12 bytes
+	Ref no      6	      16 bytes
+	Ref no      7	      48 bytes
+
+Numeric Data Group            : (tag 720)
+	Ref no      2	      16 bytes
+	Ref no      3	      16 bytes
+	Ref no      5	      16 bytes
+
+Vdata                         : (tag 1962)
+	Ref no      8	      60 bytes
+	Ref no     10	      60 bytes
+	Ref no     12	      61 bytes
+
+Vdata Storage                 : (tag 1963)
+	Ref no      8	       4 bytes
+	Ref no     10	       4 bytes
+	Ref no     12	       8 bytes
+
+Vgroup                        : (tag 1965)
+	Ref no      9	      33 bytes
+	Ref no     11	      33 bytes
+	Ref no     14	      56 bytes
+	Ref no     16	      49 bytes
+	Ref no     18	      49 bytes
+	Ref no     19	      51 bytes
+
+cb32i3.hdf:
+
+Version Descriptor            : (tag 30)
+	Ref no      1	      92 bytes
+
+Number type                   : (tag 106)
+	Ref no     17	       4 bytes
+	Ref no     19	       4 bytes
+	Ref no     21	       4 bytes
+	Ref no     23	       4 bytes
+
+SciData dimension record      : (tag 701)
+	Ref no     17	      30 bytes
+	Ref no     19	      14 bytes
+	Ref no     21	      14 bytes
+	Ref no     23	      14 bytes
+
+Scientific Data               : (tag 702)
+	Ref no      4	      20 bytes
+	Ref no      6	      12 bytes
+	Ref no      8	      16 bytes
+	Ref no      9	     240 bytes
+
+Numeric Data Group            : (tag 720)
+	Ref no      2	      16 bytes
+	Ref no      3	      16 bytes
+	Ref no      5	      16 bytes
+	Ref no      7	      16 bytes
+
+Vdata                         : (tag 1962)
+	Ref no     10	      60 bytes
+	Ref no     12	      60 bytes
+	Ref no     14	      60 bytes
+	Ref no     16	      61 bytes
+
+Vdata Storage                 : (tag 1963)
+	Ref no     10	       4 bytes
+	Ref no     12	       4 bytes
+	Ref no     14	       4 bytes
+	Ref no     16	       8 bytes
+
+Vgroup                        : (tag 1965)
+	Ref no     11	      33 bytes
+	Ref no     13	      33 bytes
+	Ref no     15	      33 bytes
+	Ref no     18	      60 bytes
+	Ref no     20	      49 bytes
+	Ref no     22	      49 bytes
+	Ref no     24	      49 bytes
+	Ref no     25	      59 bytes
+
+cb16i2.hdf:
+
+Version Descriptor            : (tag 30)
+	Ref no      1	      92 bytes
+
+Number type                   : (tag 106)
+	Ref no     13	       4 bytes
+	Ref no     15	       4 bytes
+	Ref no     17	       4 bytes
+
+SciData dimension record      : (tag 701)
+	Ref no     13	      22 bytes
+	Ref no     15	      14 bytes
+	Ref no     17	      14 bytes
+
+Scientific Data               : (tag 702)
+	Ref no      4	       6 bytes
+	Ref no      6	       8 bytes
+	Ref no      7	      24 bytes
+
+Numeric Data Group            : (tag 720)
+	Ref no      2	      16 bytes
+	Ref no      3	      16 bytes
+	Ref no      5	      16 bytes
+
+Vdata                         : (tag 1962)
+	Ref no      8	      60 bytes
+	Ref no     10	      60 bytes
+	Ref no     12	      61 bytes
+
+Vdata Storage                 : (tag 1963)
+	Ref no      8	       4 bytes
+	Ref no     10	       4 bytes
+	Ref no     12	       4 bytes
+
+Vgroup                        : (tag 1965)
+	Ref no      9	      33 bytes
+	Ref no     11	      33 bytes
+	Ref no     14	      56 bytes
+	Ref no     16	      49 bytes
+	Ref no     18	      49 bytes
+	Ref no     19	      51 bytes
+
+cb16i3.hdf:
+
+Version Descriptor            : (tag 30)
+	Ref no      1	      92 bytes
+
+Number type                   : (tag 106)
+	Ref no     17	       4 bytes
+	Ref no     19	       4 bytes
+	Ref no     21	       4 bytes
+	Ref no     23	       4 bytes
+
+SciData dimension record      : (tag 701)
+	Ref no     17	      30 bytes
+	Ref no     19	      14 bytes
+	Ref no     21	      14 bytes
+	Ref no     23	      14 bytes
+
+Scientific Data               : (tag 702)
+	Ref no      4	      10 bytes
+	Ref no      6	       6 bytes
+	Ref no      8	       8 bytes
+	Ref no      9	     120 bytes
+
+Numeric Data Group            : (tag 720)
+	Ref no      2	      16 bytes
+	Ref no      3	      16 bytes
+	Ref no      5	      16 bytes
+	Ref no      7	      16 bytes
+
+Vdata                         : (tag 1962)
+	Ref no     10	      60 bytes
+	Ref no     12	      60 bytes
+	Ref no     14	      60 bytes
+	Ref no     16	      61 bytes
+
+Vdata Storage                 : (tag 1963)
+	Ref no     10	       4 bytes
+	Ref no     12	       4 bytes
+	Ref no     14	       4 bytes
+	Ref no     16	       4 bytes
+
+Vgroup                        : (tag 1965)
+	Ref no     11	      33 bytes
+	Ref no     13	      33 bytes
+	Ref no     15	      33 bytes
+	Ref no     18	      60 bytes
+	Ref no     20	      49 bytes
+	Ref no     22	      49 bytes
+	Ref no     24	      49 bytes
+	Ref no     25	      59 bytes
+
+cb32r2.hdf:
+
+Version Descriptor            : (tag 30)
+	Ref no      1	      92 bytes
+
+Number type                   : (tag 106)
+	Ref no     13	       4 bytes
+	Ref no     15	       4 bytes
+	Ref no     17	       4 bytes
+
+SciData dimension record      : (tag 701)
+	Ref no     13	      22 bytes
+	Ref no     15	      14 bytes
+	Ref no     17	      14 bytes
+
+Scientific Data               : (tag 702)
+	Ref no      4	      12 bytes
+	Ref no      6	      16 bytes
+	Ref no      7	      48 bytes
+
+Numeric Data Group            : (tag 720)
+	Ref no      2	      16 bytes
+	Ref no      3	      16 bytes
+	Ref no      5	      16 bytes
+
+Vdata                         : (tag 1962)
+	Ref no      8	      60 bytes
+	Ref no     10	      60 bytes
+	Ref no     12	      61 bytes
+
+Vdata Storage                 : (tag 1963)
+	Ref no      8	       4 bytes
+	Ref no     10	       4 bytes
+	Ref no     12	       8 bytes
+
+Vgroup                        : (tag 1965)
+	Ref no      9	      33 bytes
+	Ref no     11	      33 bytes
+	Ref no     14	      56 bytes
+	Ref no     16	      49 bytes
+	Ref no     18	      49 bytes
+	Ref no     19	      51 bytes
+
+cb32r3.hdf:
+
+Version Descriptor            : (tag 30)
+	Ref no      1	      92 bytes
+
+Number type                   : (tag 106)
+	Ref no     17	       4 bytes
+	Ref no     19	       4 bytes
+	Ref no     21	       4 bytes
+	Ref no     23	       4 bytes
+
+SciData dimension record      : (tag 701)
+	Ref no     17	      30 bytes
+	Ref no     19	      14 bytes
+	Ref no     21	      14 bytes
+	Ref no     23	      14 bytes
+
+Scientific Data               : (tag 702)
+	Ref no      4	      20 bytes
+	Ref no      6	      12 bytes
+	Ref no      8	      16 bytes
+	Ref no      9	     240 bytes
+
+Numeric Data Group            : (tag 720)
+	Ref no      2	      16 bytes
+	Ref no      3	      16 bytes
+	Ref no      5	      16 bytes
+	Ref no      7	      16 bytes
+
+Vdata                         : (tag 1962)
+	Ref no     10	      60 bytes
+	Ref no     12	      60 bytes
+	Ref no     14	      60 bytes
+	Ref no     16	      61 bytes
+
+Vdata Storage                 : (tag 1963)
+	Ref no     10	       4 bytes
+	Ref no     12	       4 bytes
+	Ref no     14	       4 bytes
+	Ref no     16	       8 bytes
+
+Vgroup                        : (tag 1965)
+	Ref no     11	      33 bytes
+	Ref no     13	      33 bytes
+	Ref no     15	      33 bytes
+	Ref no     18	      60 bytes
+	Ref no     20	      49 bytes
+	Ref no     22	      49 bytes
+	Ref no     24	      49 bytes
+	Ref no     25	      59 bytes
+
+cb64r2.hdf:
+
+Version Descriptor            : (tag 30)
+	Ref no      1	      92 bytes
+
+Number type                   : (tag 106)
+	Ref no     13	       4 bytes
+	Ref no     15	       4 bytes
+	Ref no     17	       4 bytes
+
+SciData dimension record      : (tag 701)
+	Ref no     13	      22 bytes
+	Ref no     15	      14 bytes
+	Ref no     17	      14 bytes
+
+Scientific Data               : (tag 702)
+	Ref no      4	      12 bytes
+	Ref no      6	      16 bytes
+	Ref no      7	      48 bytes
+
+Numeric Data Group            : (tag 720)
+	Ref no      2	      16 bytes
+	Ref no      3	      16 bytes
+	Ref no      5	      16 bytes
+
+Vdata                         : (tag 1962)
+	Ref no      8	      60 bytes
+	Ref no     10	      60 bytes
+	Ref no     12	      61 bytes
+
+Vdata Storage                 : (tag 1963)
+	Ref no      8	       4 bytes
+	Ref no     10	       4 bytes
+	Ref no     12	       8 bytes
+
+Vgroup                        : (tag 1965)
+	Ref no      9	      33 bytes
+	Ref no     11	      33 bytes
+	Ref no     14	      56 bytes
+	Ref no     16	      49 bytes
+	Ref no     18	      49 bytes
+	Ref no     19	      51 bytes
+
+cb64r3.hdf:
+
+Version Descriptor            : (tag 30)
+	Ref no      1	      92 bytes
+
+Number type                   : (tag 106)
+	Ref no     17	       4 bytes
+	Ref no     19	       4 bytes
+	Ref no     21	       4 bytes
+	Ref no     23	       4 bytes
+
+SciData dimension record      : (tag 701)
+	Ref no     17	      30 bytes
+	Ref no     19	      14 bytes
+	Ref no     21	      14 bytes
+	Ref no     23	      14 bytes
+
+Scientific Data               : (tag 702)
+	Ref no      4	      20 bytes
+	Ref no      6	      12 bytes
+	Ref no      8	      16 bytes
+	Ref no      9	     240 bytes
+
+Numeric Data Group            : (tag 720)
+	Ref no      2	      16 bytes
+	Ref no      3	      16 bytes
+	Ref no      5	      16 bytes
+	Ref no      7	      16 bytes
+
+Vdata                         : (tag 1962)
+	Ref no     10	      60 bytes
+	Ref no     12	      60 bytes
+	Ref no     14	      60 bytes
+	Ref no     16	      61 bytes
+
+Vdata Storage                 : (tag 1963)
+	Ref no     10	       4 bytes
+	Ref no     12	       4 bytes
+	Ref no     14	       4 bytes
+	Ref no     16	       8 bytes
+
+Vgroup                        : (tag 1965)
+	Ref no     11	      33 bytes
+	Ref no     13	      33 bytes
+	Ref no     15	      33 bytes
+	Ref no     18	      60 bytes
+	Ref no     20	      49 bytes
+	Ref no     22	      49 bytes
+	Ref no     24	      49 bytes
+	Ref no     25	      59 bytes
+
+cb64r2-n.hdf:
+
+Version Descriptor            : (tag 30)
+	Ref no      1	      92 bytes
+
+Number type                   : (tag 106)
+	Ref no     13	       4 bytes
+	Ref no     15	       4 bytes
+	Ref no     17	       4 bytes
+
+SciData dimension record      : (tag 701)
+	Ref no     13	      22 bytes
+	Ref no     15	      14 bytes
+	Ref no     17	      14 bytes
+
+Scientific Data               : (tag 702)
+	Ref no      4	      24 bytes
+	Ref no      6	      32 bytes
+	Ref no      7	      96 bytes
+
+Numeric Data Group            : (tag 720)
+	Ref no      2	      16 bytes
+	Ref no      3	      16 bytes
+	Ref no      5	      16 bytes
+
+Vdata                         : (tag 1962)
+	Ref no      8	      60 bytes
+	Ref no     10	      60 bytes
+	Ref no     12	      61 bytes
+
+Vdata Storage                 : (tag 1963)
+	Ref no      8	       4 bytes
+	Ref no     10	       4 bytes
+	Ref no     12	      16 bytes
+
+Vgroup                        : (tag 1965)
+	Ref no      9	      33 bytes
+	Ref no     11	      33 bytes
+	Ref no     14	      56 bytes
+	Ref no     16	      49 bytes
+	Ref no     18	      49 bytes
+	Ref no     19	      53 bytes
+
+cb64r3-n.hdf:
+
+Version Descriptor            : (tag 30)
+	Ref no      1	      92 bytes
+
+Number type                   : (tag 106)
+	Ref no     17	       4 bytes
+	Ref no     19	       4 bytes
+	Ref no     21	       4 bytes
+	Ref no     23	       4 bytes
+
+SciData dimension record      : (tag 701)
+	Ref no     17	      30 bytes
+	Ref no     19	      14 bytes
+	Ref no     21	      14 bytes
+	Ref no     23	      14 bytes
+
+Scientific Data               : (tag 702)
+	Ref no      4	      40 bytes
+	Ref no      6	      24 bytes
+	Ref no      8	      32 bytes
+	Ref no      9	     480 bytes
+
+Numeric Data Group            : (tag 720)
+	Ref no      2	      16 bytes
+	Ref no      3	      16 bytes
+	Ref no      5	      16 bytes
+	Ref no      7	      16 bytes
+
+Vdata                         : (tag 1962)
+	Ref no     10	      60 bytes
+	Ref no     12	      60 bytes
+	Ref no     14	      60 bytes
+	Ref no     16	      61 bytes
+
+Vdata Storage                 : (tag 1963)
+	Ref no     10	       4 bytes
+	Ref no     12	       4 bytes
+	Ref no     14	       4 bytes
+	Ref no     16	      16 bytes
+
+Vgroup                        : (tag 1965)
+	Ref no     11	      33 bytes
+	Ref no     13	      33 bytes
+	Ref no     15	      33 bytes
+	Ref no     18	      60 bytes
+	Ref no     20	      49 bytes
+	Ref no     22	      49 bytes
+	Ref no     24	      49 bytes
+	Ref no     25	      61 bytes
+
+ctxtr2_ris.hdf:
+
+Version Descriptor            : (tag 30)
+	Ref no      1	      92 bytes
+
+Number type                   : (tag 106)
+	Ref no      2	       4 bytes
+
+Image Dimensions-8            : (tag 200)
+	Ref no      2	       4 bytes
+
+RLE Compressed Image-8        : (tag 203)
+	Ref no      2	     400 bytes
+
+Image Dimensions              : (tag 300)
+	Ref no      2	      20 bytes
+
+Compressed Image              : (tag 303)
+	Ref no      2	     400 bytes
+
+Raster Image Group            : (tag 306)
+	Ref no      2	       8 bytes
+
+cb64r2_ris.hdf:
+
+Version Descriptor            : (tag 30)
+	Ref no      1	      92 bytes
+
+Number type                   : (tag 106)
+	Ref no      8	       4 bytes
+	Ref no     14	       4 bytes
+	Ref no     16	       4 bytes
+	Ref no     18	       4 bytes
+
+Image Dimensions-8            : (tag 200)
+	Ref no      8	       4 bytes
+
+RLE Compressed Image-8        : (tag 203)
+	Ref no      8	    2550 bytes
+
+Image Dimensions              : (tag 300)
+	Ref no      8	      20 bytes
+
+Compressed Image              : (tag 303)
+	Ref no      8	    2550 bytes
+
+Raster Image Group            : (tag 306)
+	Ref no      8	       8 bytes
+
+SciData dimension record      : (tag 701)
+	Ref no     14	      22 bytes
+	Ref no     16	      14 bytes
+	Ref no     18	      14 bytes
+
+Scientific Data               : (tag 702)
+	Ref no      4	      12 bytes
+	Ref no      6	      16 bytes
+	Ref no      7	      48 bytes
+
+Numeric Data Group            : (tag 720)
+	Ref no      2	      16 bytes
+	Ref no      3	      16 bytes
+	Ref no      5	      16 bytes
+
+Vdata                         : (tag 1962)
+	Ref no      9	      60 bytes
+	Ref no     11	      60 bytes
+	Ref no     13	      61 bytes
+
+Vdata Storage                 : (tag 1963)
+	Ref no      9	       4 bytes
+	Ref no     11	       4 bytes
+	Ref no     13	       8 bytes
+
+Vgroup                        : (tag 1965)
+	Ref no     10	      33 bytes
+	Ref no     12	      33 bytes
+	Ref no     15	      56 bytes
+	Ref no     17	      49 bytes
+	Ref no     19	      49 bytes
+	Ref no     20	      55 bytes
+


Property changes on: packages/libhdf4/branches/upstream/current/mfhdf/hdfimport/hdfimport.out1
___________________________________________________________________
Name: svn:executable
   + *

Added: packages/libhdf4/branches/upstream/current/mfhdf/hdfimport/hdfimport.out2
===================================================================
--- packages/libhdf4/branches/upstream/current/mfhdf/hdfimport/hdfimport.out2	                        (rev 0)
+++ packages/libhdf4/branches/upstream/current/mfhdf/hdfimport/hdfimport.out2	2007-05-15 09:53:05 UTC (rev 831)
@@ -0,0 +1,69 @@
+ (2) 	Scientific Data               : (Tag 702) Ref 4
+       0:    1.100000e+01   1.200000e+01   1.300000e+01
+ (2) 	Scientific Data               : (Tag 702) Ref 4
+       0:    5.100000e+01   5.600000e+01   6.100000e+01   6.600000e+01
+      16:    7.100000e+01
+ (2) 	Scientific Data               : (Tag 702) Ref 4
+       0:    1.100000e+01   1.200000e+01   1.300000e+01
+ (2) 	Scientific Data               : (Tag 702) Ref 4
+       0:    5.100000e+01   5.600000e+01   6.100000e+01   6.600000e+01
+      16:    7.100000e+01
+ (2) 	Scientific Data               : (Tag 702) Ref 4
+       0:    1.100000e+01   1.200000e+01   1.300000e+01
+ (2) 	Scientific Data               : (Tag 702) Ref 4
+       0:    5.100000e+01   5.600000e+01   6.100000e+01   6.600000e+01
+      16:    7.100000e+01
+ (2) 	Scientific Data               : (Tag 702) Ref 4
+       0:    1.100000e+01   1.200000e+01   1.300000e+01
+ (2) 	Compressed Image              : (Tag 303) Ref 2
+       0:    137      1    144     60    144    120    137    179 
+       8:    137      1    144     60    144    120    137    179 
+      16:    137      1    144     60    144    120    137    179 
+      24:    137      1    144     60    144    120    137    179 
+      32:    137      1    144     60    144    120    137    179 
+      40:    137      1    144     60    144    120    137    179 
+      48:    137      1    144     60    144    120    137    179 
+      56:    137      1    144     60    144    120    137    179 
+      64:    137      1    144     60    144    120    137    179 
+      72:    137      1    144     60    144    120    137    179 
+      80:    137      1    144     60    144    120    137    179 
+      88:    137      1    144     60    144    120    137    179 
+      96:    137      1    144     60    144    120    137    179 
+     104:    137     31    144     90    144    150    137    209 
+     112:    137     31    144     90    144    150    137    209 
+     120:    137     31    144     90    144    150    137    209 
+     128:    137     31    144     90    144    150    137    209 
+     136:    137     31    144     90    144    150    137    209 
+     144:    137     31    144     90    144    150    137    209 
+     152:    137     31    144     90    144    150    137    209 
+     160:    137     31    144     90    144    150    137    209 
+     168:    137     31    144     90    144    150    137    209 
+     176:    137     31    144     90    144    150    137    209 
+     184:    137     31    144     90    144    150    137    209 
+     192:    137     31    144     90    144    150    137    209 
+     200:    137     31    144     90    144    150    137    209 
+     208:    137     31    144     90    144    150    137    209 
+     216:    137     31    144     90    144    150    137    209 
+     224:    137     31    144     90    144    150    137    209 
+     232:    137     31    144     90    144    150    137    209 
+     240:    137     31    144     90    144    150    137    209 
+     248:    137     31    144     90    144    150    137    209 
+     256:    137     31    144     90    144    150    137    209 
+     264:    137     31    144     90    144    150    137    209 
+     272:    137     31    144     90    144    150    137    209 
+     280:    137     31    144     90    144    150    137    209 
+     288:    137     31    144     90    144    150    137    209 
+     296:    137     60    144    120    144    179    137    239 
+     304:    137     60    144    120    144    179    137    239 
+     312:    137     60    144    120    144    179    137    239 
+     320:    137     60    144    120    144    179    137    239 
+     328:    137     60    144    120    144    179    137    239 
+     336:    137     60    144    120    144    179    137    239 
+     344:    137     60    144    120    144    179    137    239 
+     352:    137     60    144    120    144    179    137    239 
+     360:    137     60    144    120    144    179    137    239 
+     368:    137     60    144    120    144    179    137    239 
+     376:    137     60    144    120    144    179    137    239 
+     384:    137     60    144    120    144    179    137    239 
+     392:    137     60    144    120    144    179    137    239 
+     400: 


Property changes on: packages/libhdf4/branches/upstream/current/mfhdf/hdfimport/hdfimport.out2
___________________________________________________________________
Name: svn:executable
   + *

Added: packages/libhdf4/branches/upstream/current/mfhdf/hdfimport/hdfimporttest.c
===================================================================
--- packages/libhdf4/branches/upstream/current/mfhdf/hdfimport/hdfimporttest.c	                        (rev 0)
+++ packages/libhdf4/branches/upstream/current/mfhdf/hdfimport/hdfimporttest.c	2007-05-15 09:53:05 UTC (rev 831)
@@ -0,0 +1,470 @@
+/****************************************************************************
+ * NCSA HDF                                                                 *
+ * Software Development Group                                               *
+ * National Center for Supercomputing Applications                          *
+ * University of Illinois at Urbana-Champaign                               *
+ * 605 E. Springfield, Champaign IL 61820                                   *
+ *                                                                          *
+ * For conditions of distribution and use, see the accompanying             *
+ * hdf/COPYING file.                                                        *
+ *                                                                          *
+ ****************************************************************************/
+#include <stdio.h>
+#include "hdf.h"
+
+/*
+ * Name:
+ *      hdfimporttest
+ *
+ * Description:
+ *      This program creates binary and text input files that can be
+ *      used to test the hdfimport program.  
+ *
+ *      June 1, 1990
+ *      Bob Weaver, baw at inel.gov
+ *
+ *      Last Revision: December 10, 2001
+ *      Pankaj Kamat, pkamat at uiuc.edu
+ *
+ *      row     values start at 11 and increment by 1 => 11, 12, 13
+ *      column  values start at 21 and increment by 2 => 21, 23, 25, 27
+ *      plane   values start at 51 and increment by 5 => 51, 56, 61, 66, 71
+ *
+ *      data element value = row value + column value [+ plane value, if rank=3]
+ */
+int
+main(int argc, char * argv[] )
+{
+    int         nrow = 3, ncol = 4, npln = 5, ione = 1;
+    int         i, j, k;
+    FILE       *sp;
+
+    float32     b32r2[3][4], b32r3[5][3][4];
+    float32     row4[3], col4[4], pln4[5];
+    float32     rowo4 = (float32)11.0e0, colo4 = (float32)21.0e0, plno4 = (float32)51.0e0;
+    float32     rowi4 = (float32)1.0e0, coli4 = (float32)2.0e0, plni4 = (float32)5.0e0;
+    float32     ezero = (float32)0.0e0;
+    
+    int32     b32i2[3][4], b32i3[5][3][4];          
+    int32     row4i[3], col4i[4], pln4i[5];
+    int32     rowo4i = (int32)11 , colo4i = (int32)21 , plno4i = (int32)51 ;
+    int32     rowi4i = (int32)1 , coli4i = (int32)2 , plni4i = (int32)5 ;
+    int32 	  ezeroi = (int32)0;
+    	
+    int16     b16i2[3][4], b16i3[5][3][4];          
+    int16     row4i16[3], col4i16[4], pln4i16[5];
+    int16     rowo4i16 = (int16)11 , colo4i16 = (int16)21 , plno4i16 = (int16)51 ;
+    int16     rowi4i16 = (int16)1 , coli4i16 = (int16)2 , plni4i16 = (int16)5 ;
+    int16 	  ezeroi16 = (int16)0;
+    
+    int8     b8i2[3][4], b8i3[5][3][4];          
+    int8     row4i8[3], col4i8[4], pln4i8[5];
+    int8     rowo4i8 = (int8)11 , colo4i8 = (int8)21 , plno4i8 = (int8)51 ;
+    int8     rowi4i8 = (int8)1 , coli4i8 = (int8)2 , plni4i8 = (int8)5 ;
+    int8 	  ezeroi8 = (int8)0;
+    
+    float64     b64r2[3][4], b64r3[5][3][4];
+    float64     row8[3], col8[4], pln8[5];
+    float64     rowo8 = 11.0e0, colo8 = 21.0e0, plno8 = 51.0e0;
+    float64     rowi8 = 1.0e0, coli8 = 2.0e0, plni8 = 5.0e0;
+    float64     dzero = 0.0e0;
+
+    const char *text = "TEXT";
+    const char *fp32 = "FP32";
+    const char *fp64 = "FP64";
+    const char *in32 = "IN32";
+    const char *in16 = "IN16";
+    const char *in8  = "IN08";	
+
+    /* shut compiler up */
+    argv=argv; argc=argc;
+
+    /*
+     * initialize the row, column, and plane vectors
+     *
+     * row values start at 11 and increment by 1 => 11, 12, 13
+     * column values start at 21 and increment by 2 => 21, 23, 25, 27
+     * plane values start at 51 and increment by 5 => 51, 56, 61, 66, 71
+     */
+
+    row4[0] = rowo4;
+    col4[0] = colo4;
+    pln4[0] = plno4;
+    
+    row8[0] = rowo8;
+    col8[0] = colo8;
+    pln8[0] = plno8;
+    
+    row4i[0] = rowo4i;
+    col4i[0] = colo4i;
+    pln4i[0] = plno4i;
+    
+    row4i16[0] = rowo4i16;
+    col4i16[0] = colo4i16;
+    pln4i16[0] = plno4i16;
+    
+    row4i8[0] = rowo4i8;
+    col4i8[0] = colo4i8;
+    pln4i8[0] = plno4i8;
+    
+    
+    
+
+    for (i = 1; i < nrow; i++)
+      {
+          row4[i] = row4[i - 1] + rowi4;
+          row8[i] = row8[i - 1] + rowi8;
+	    row4i[i] = row4i[i - 1] + rowi4i;
+	    row4i16[i] = row4i16[i - 1] + rowi4i16;
+	    row4i8[i] = row4i8[i - 1] + rowi4i8;      
+	}
+	    
+    for (j = 1; j < ncol; j++)
+      {
+          col4[j] = col4[j - 1] + coli4;
+          col8[j] = col8[j - 1] + coli8;
+	    col4i[j] = col4i[j - 1] + coli4i;
+	    col4i16[j] = col4i16[j - 1] + coli4i16;	    
+	    col4i8[j] = col4i8[j - 1] + coli4i8;
+      }
+    for (k = 1; k < npln; k++)
+      {
+          pln4[k] = pln4[k - 1] + plni4;
+          pln8[k] = pln8[k - 1] + plni8;
+	    pln4i[k] = pln4i[k - 1] + plni4i;
+	    pln4i16[k] = pln4i16[k - 1] + plni4i16;	    
+	    pln4i8[k] = pln4i8[k - 1] + plni4i8;
+	    	    
+      }
+
+    /*
+     * build array elements - rank 2
+     *
+     * element value = sum of row value and col values
+     */
+
+    for (i = 0; i < nrow; i++)
+      {
+          for (j = 0; j < ncol; j++)
+            {
+                b32r2[i][j] = row4[i] + col4[j];
+                b64r2[i][j] = row8[i] + col8[j];
+		    b32i2[i][j] = row4i[i] + col4i[j];  
+		    b16i2[i][j] = row4i16[i] + col4i16[j]; 
+		    b8i2[i][j] = row4i8[i] + col4i8[j]; 
+            }
+      }
+
+    /*
+     * build array elements - rank 3
+     *
+     * element value = sum of row value, col, and plane values
+     */
+
+    for (i = 0; i < nrow; i++)
+      {
+          for (j = 0; j < ncol; j++)
+            {
+                for (k = 0; k < npln; k++)
+                  {
+                      b32r3[k][i][j] = row4[i] + col4[j] + pln4[k];
+                      b64r3[k][i][j] = row8[i] + col8[j] + pln8[k];
+			    b32i3[k][i][j] = row4i[i] + col4i[j] + pln4i[k];
+			    b16i3[k][i][j] = row4i16[i] + col4i16[j] + pln4i16[k];
+			    b8i3[k][i][j] = row4i8[i] + col4i8[j] + pln4i8[k];
+                  }
+            }
+      }
+
+    /*
+     * text file - rank 2 & 3
+     */
+
+    sp = fopen("ctxtr2", "w");
+    (void) fprintf(sp, "%s\n", text);
+    (void) fprintf(sp, "%10d%10d%10d\n", ione, nrow, ncol);
+    (void) fprintf(sp, "%14.6E%14.6E\n", ezero, ezero);
+    for (i = 0; i < nrow; i++)
+        (void) fprintf(sp, "%14.6E", row4[i]);
+    (void) fprintf(sp, "\n");
+    for (j = 0; j < ncol; j++)
+        (void) fprintf(sp, "%14.6E", col4[j]);
+    (void) fprintf(sp, "\n");
+    for (i = 0; i < nrow; i++)
+      {
+          for (j = 0; j < ncol; j++)
+              (void) fprintf(sp, "%14.6E", b32r2[i][j]);
+          (void) fprintf(sp, "\n");
+      }
+    (void) fclose(sp);
+    
+     sp = fopen("ctxti2", "w");
+    (void) fprintf(sp, "%s\n", text);
+    (void) fprintf(sp, "%10d%10d%10d\n", ione, nrow, ncol);
+    (void) fprintf(sp, "%10d%10d\n", ezeroi, ezeroi);
+    for (i = 0; i < nrow; i++)
+        (void) fprintf(sp, "%10d", row4i[i]);
+    (void) fprintf(sp, "\n");
+    for (j = 0; j < ncol; j++)
+        (void) fprintf(sp, "%10d", col4i[j]);
+    (void) fprintf(sp, "\n");
+    for (i = 0; i < nrow; i++)
+      {
+          for (j = 0; j < ncol; j++)
+              (void) fprintf(sp, "%10d", b32i2[i][j]);
+          (void) fprintf(sp, "\n");
+      }
+    (void) fclose(sp);
+
+ 	sp = fopen("ctxti162", "w");
+    (void) fprintf(sp, "%s\n", text);
+    (void) fprintf(sp, "%10d%10d%10d\n", ione, nrow, ncol);
+    (void) fprintf(sp, "%10u%10u\n", ezeroi16, ezeroi16);
+    for (i = 0; i < nrow; i++)
+        (void) fprintf(sp, "%10u", row4i16[i]);
+    (void) fprintf(sp, "\n");
+    for (j = 0; j < ncol; j++)
+        (void) fprintf(sp, "%10u", col4i16[j]);
+    (void) fprintf(sp, "\n");
+    for (i = 0; i < nrow; i++)
+      {
+          for (j = 0; j < ncol; j++)
+              (void) fprintf(sp, "%10u", b16i2[i][j]);
+          (void) fprintf(sp, "\n");
+      }
+    (void) fclose(sp);
+    
+    sp = fopen("ctxti82", "w");
+    (void) fprintf(sp, "%s\n", text);
+    (void) fprintf(sp, "%10d%10d%10d\n", ione, nrow, ncol);
+    (void) fprintf(sp, "%10c%10c\n", ezeroi8, ezeroi8);
+    for (i = 0; i < nrow; i++)
+        (void) fprintf(sp, "%10c", row4i8[i]);
+    (void) fprintf(sp, "\n");
+    for (j = 0; j < ncol; j++)
+        (void) fprintf(sp, "%10c", col4i8[j]);
+    (void) fprintf(sp, "\n");
+    for (i = 0; i < nrow; i++)
+      {
+          for (j = 0; j < ncol; j++)
+              (void) fprintf(sp, "%10c", b8i2[i][j]);
+          (void) fprintf(sp, "\n");
+      }
+    (void) fclose(sp);
+    
+    sp = fopen("ctxtr3", "w");
+    (void) fprintf(sp, "%s\n", text);
+    (void) fprintf(sp, "%10d%10d%10d\n", npln, nrow, ncol);
+    (void) fprintf(sp, "%14.6E%14.6E\n", ezero, ezero);
+    for (k = 0; k < npln; k++)
+        (void) fprintf(sp, "%14.6E", pln4[k]);
+    (void) fprintf(sp, "\n");
+    for (i = 0; i < nrow; i++)
+        (void) fprintf(sp, "%14.6E", row4[i]);
+    (void) fprintf(sp, "\n");
+    for (j = 0; j < ncol; j++)
+        (void) fprintf(sp, "%14.6E", col4[j]);
+    (void) fprintf(sp, "\n");
+    for (k = 0; k < npln; k++)
+        for (i = 0; i < nrow; i++)
+          {
+              for (j = 0; j < ncol; j++)
+                  (void) fprintf(sp, "%14.6E", b32r3[k][i][j]);
+              (void) fprintf(sp, "\n");
+          }
+    (void) fclose(sp);
+
+    /*
+     * binary 32-bit file - rank 2 & 3
+     */
+
+    sp = fopen("cb32r2", "w");
+    (void) fwrite(fp32, strlen(fp32), 1, sp);
+    (void) fwrite((char *) &ione, sizeof(int), 1, sp);
+    (void) fwrite((char *) &nrow, sizeof(int), 1, sp);
+    (void) fwrite((char *) &ncol, sizeof(int), 1, sp);
+    (void) fwrite((char *) &ezero, sizeof(float32), 1, sp);
+    (void) fwrite((char *) &ezero, sizeof(float32), 1, sp);
+    for (i = 0; i < nrow; i++)
+        (void) fwrite((char *) &row4[i], sizeof(float32), 1, sp);
+    for (j = 0; j < ncol; j++)
+        (void) fwrite((char *) &col4[j], sizeof(float32), 1, sp);
+    for (i = 0; i < nrow; i++)
+        for (j = 0; j < ncol; j++)
+            (void) fwrite((char *) &b32r2[i][j], sizeof(float32), 1,
+                          sp);
+    (void) fclose(sp);
+
+    sp = fopen("cb32i2", "w");
+    (void) fwrite(in32, strlen(in32), 1, sp);
+    (void) fwrite((char *) &ione, sizeof(int), 1, sp);
+    (void) fwrite((char *) &nrow, sizeof(int), 1, sp);
+    (void) fwrite((char *) &ncol, sizeof(int), 1, sp);
+    (void) fwrite((char *) &ezeroi, sizeof(int32), 1, sp);
+    (void) fwrite((char *) &ezeroi, sizeof(int32), 1, sp);
+    for (i = 0; i < nrow; i++)
+        (void) fwrite((char *) &row4i[i], sizeof(int32), 1, sp);
+    for (j = 0; j < ncol; j++)
+        (void) fwrite((char *) &col4i[j], sizeof(int32), 1, sp);
+    for (i = 0; i < nrow; i++)
+        for (j = 0; j < ncol; j++)
+            (void) fwrite((char *) &b32i2[i][j], sizeof(int32), 1,
+                          sp);
+    (void) fclose(sp);
+
+    sp = fopen("cb16i2", "w");
+    (void) fwrite(in16, strlen(in16), 1, sp);
+    (void) fwrite((char *) &ione, sizeof(int), 1, sp);
+    (void) fwrite((char *) &nrow, sizeof(int), 1, sp);
+    (void) fwrite((char *) &ncol, sizeof(int), 1, sp);
+    (void) fwrite((char *) &ezeroi16, sizeof(int16), 1, sp);
+    (void) fwrite((char *) &ezeroi, sizeof(int16), 1, sp);
+    for (i = 0; i < nrow; i++)
+        (void) fwrite((char *) &row4i16[i], sizeof(int16), 1, sp);
+    for (j = 0; j < ncol; j++)
+        (void) fwrite((char *) &col4i16[j], sizeof(int16), 1, sp);
+    for (i = 0; i < nrow; i++)
+        for (j = 0; j < ncol; j++)
+            (void) fwrite((char *) &b16i2[i][j], sizeof(int16), 1,
+                          sp);
+    (void) fclose(sp);
+    
+     sp = fopen("cb8i2", "w");
+    (void) fwrite(in8, strlen(in8), 1, sp);
+    (void) fwrite((char *) &ione, sizeof(int), 1, sp);
+    (void) fwrite((char *) &nrow, sizeof(int), 1, sp);
+    (void) fwrite((char *) &ncol, sizeof(int), 1, sp);
+    (void) fwrite((char *) &ezeroi8, sizeof(int8), 1, sp);
+    (void) fwrite((char *) &ezeroi8, sizeof(int8), 1, sp);
+    for (i = 0; i < nrow; i++)
+        (void) fwrite((char *) &row4i8[i], sizeof(int8), 1, sp);
+    for (j = 0; j < ncol; j++)
+        (void) fwrite((char *) &col4i8[j], sizeof(int8), 1, sp);
+    for (i = 0; i < nrow; i++)
+        for (j = 0; j < ncol; j++)
+            (void) fwrite((char *) &b8i2[i][j], sizeof(int8), 1,
+                          sp);
+    (void) fclose(sp);
+
+    sp = fopen("cb32r3", "w");
+    (void) fwrite(fp32, strlen(fp32), 1, sp);
+    (void) fwrite((char *) &npln, sizeof(int), 1, sp);
+    (void) fwrite((char *) &nrow, sizeof(int), 1, sp);
+    (void) fwrite((char *) &ncol, sizeof(int), 1, sp);
+    (void) fwrite((char *) &ezero, sizeof(float32), 1, sp);
+    (void) fwrite((char *) &ezero, sizeof(float32), 1, sp);
+    for (k = 0; k < npln; k++)
+        (void) fwrite((char *) &pln4[k], sizeof(float32), 1, sp);
+    for (i = 0; i < nrow; i++)
+        (void) fwrite((char *) &row4[i], sizeof(float32), 1, sp);
+    for (j = 0; j < ncol; j++)
+        (void) fwrite((char *) &col4[j], sizeof(float32), 1, sp);
+    for (k = 0; k < npln; k++)
+        for (i = 0; i < nrow; i++)
+            for (j = 0; j < ncol; j++)
+                (void) fwrite((char *) &b32r3[k][i][j],
+                              sizeof(float32), 1, sp);
+    (void) fclose(sp);
+    
+     sp = fopen("cb32i3", "w");
+    (void) fwrite(in32, strlen(in32), 1, sp);
+    (void) fwrite((char *) &npln, sizeof(int), 1, sp);
+    (void) fwrite((char *) &nrow, sizeof(int), 1, sp);
+    (void) fwrite((char *) &ncol, sizeof(int), 1, sp);
+    (void) fwrite((char *) &ezeroi, sizeof(int32), 1, sp);
+    (void) fwrite((char *) &ezeroi, sizeof(int32), 1, sp);
+    for (k = 0; k < npln; k++)
+        (void) fwrite((char *) &pln4i[k], sizeof(int32), 1, sp);
+    for (i = 0; i < nrow; i++)
+        (void) fwrite((char *) &row4i[i], sizeof(int32), 1, sp);
+    for (j = 0; j < ncol; j++)
+        (void) fwrite((char *) &col4i[j], sizeof(int32), 1, sp);
+    for (k = 0; k < npln; k++)
+    	for (i = 0; i < nrow; i++)
+        for (j = 0; j < ncol; j++)
+            (void) fwrite((char *) &b32i3[k][i][j], sizeof(int32), 1,
+                          sp);
+    (void) fclose(sp);
+    
+     sp = fopen("cb16i3", "w");
+    (void) fwrite(in16, strlen(in16), 1, sp);
+    (void) fwrite((char *) &npln, sizeof(int), 1, sp);
+    (void) fwrite((char *) &nrow, sizeof(int), 1, sp);
+    (void) fwrite((char *) &ncol, sizeof(int), 1, sp);
+    (void) fwrite((char *) &ezeroi16, sizeof(int16), 1, sp);
+    (void) fwrite((char *) &ezeroi16, sizeof(int16), 1, sp);
+    for (k = 0; k < npln; k++)
+        (void) fwrite((char *) &pln4i16[k], sizeof(int16), 1, sp);
+    for (i = 0; i < nrow; i++)
+        (void) fwrite((char *) &row4i16[i], sizeof(int16), 1, sp);
+    for (j = 0; j < ncol; j++)
+        (void) fwrite((char *) &col4i16[j], sizeof(int16), 1, sp);
+    for (k = 0; k < npln; k++)
+    	for (i = 0; i < nrow; i++)
+        for (j = 0; j < ncol; j++)
+            (void) fwrite((char *) &b16i3[k][i][j], sizeof(int16), 1,
+                          sp);
+    (void) fclose(sp);
+    
+     sp = fopen("cb8i3", "w");
+    (void) fwrite(in8, strlen(in8), 1, sp);
+    (void) fwrite((char *) &npln, sizeof(int), 1, sp);
+    (void) fwrite((char *) &nrow, sizeof(int), 1, sp);
+    (void) fwrite((char *) &ncol, sizeof(int), 1, sp);
+    (void) fwrite((char *) &ezeroi8, sizeof(int8), 1, sp);
+    (void) fwrite((char *) &ezeroi8, sizeof(int8), 1, sp);
+    for (k = 0; k < npln; k++)
+        (void) fwrite((char *) &pln4i8[k], sizeof(int8), 1, sp);
+    for (i = 0; i < nrow; i++)
+        (void) fwrite((char *) &row4i8[i], sizeof(int8), 1, sp);
+    for (j = 0; j < ncol; j++)
+        (void) fwrite((char *) &col4i8[j], sizeof(int8), 1, sp);
+    for (k = 0; k < npln; k++)
+    	for (i = 0; i < nrow; i++)
+        for (j = 0; j < ncol; j++)
+            (void) fwrite((char *) &b8i3[k][i][j], sizeof(int8), 1,
+                          sp);
+    (void) fclose(sp);
+  
+    /*
+     * binary 64-bit file - rank 2 & 3
+     */
+
+    sp = fopen("cb64r2", "w");
+    (void) fwrite(fp64, strlen(fp64), 1, sp);
+    (void) fwrite((char *) &ione, sizeof(int), 1, sp);
+    (void) fwrite((char *) &nrow, sizeof(int), 1, sp);
+    (void) fwrite((char *) &ncol, sizeof(int), 1, sp);
+    (void) fwrite((char *) &dzero, sizeof(float64), 1, sp);
+    (void) fwrite((char *) &dzero, sizeof(float64), 1, sp);
+    for (i = 0; i < nrow; i++)
+        (void) fwrite((char *) &row8[i], sizeof(float64), 1, sp);
+    for (j = 0; j < ncol; j++)
+        (void) fwrite((char *) &col8[j], sizeof(float64), 1, sp);
+    for (i = 0; i < nrow; i++)
+        for (j = 0; j < ncol; j++)
+            (void) fwrite((char *) &b64r2[i][j], sizeof(float64), 1,
+                          sp);
+    (void) fclose(sp);
+
+    sp = fopen("cb64r3", "w");
+    (void) fwrite(fp64, strlen(fp64), 1, sp);
+    (void) fwrite((char *) &npln, sizeof(int), 1, sp);
+    (void) fwrite((char *) &nrow, sizeof(int), 1, sp);
+    (void) fwrite((char *) &ncol, sizeof(int), 1, sp);
+    (void) fwrite((char *) &dzero, sizeof(float64), 1, sp);
+    (void) fwrite((char *) &dzero, sizeof(float64), 1, sp);
+    for (k = 0; k < npln; k++)
+        (void) fwrite((char *) &pln8[k], sizeof(float64), 1, sp);
+    for (i = 0; i < nrow; i++)
+        (void) fwrite((char *) &row8[i], sizeof(float64), 1, sp);
+    for (j = 0; j < ncol; j++)
+        (void) fwrite((char *) &col8[j], sizeof(float64), 1, sp);
+    for (k = 0; k < npln; k++)
+        for (i = 0; i < nrow; i++)
+            for (j = 0; j < ncol; j++)
+                (void) fwrite((char *) &b64r3[k][i][j],
+                              sizeof(float64), 1, sp);
+    (void) fclose(sp);
+    return (0);
+}


Property changes on: packages/libhdf4/branches/upstream/current/mfhdf/hdfimport/hdfimporttest.c
___________________________________________________________________
Name: svn:executable
   + *

Added: packages/libhdf4/branches/upstream/current/mfhdf/hdfimport/testutil.sh.in
===================================================================
--- packages/libhdf4/branches/upstream/current/mfhdf/hdfimport/testutil.sh.in	                        (rev 0)
+++ packages/libhdf4/branches/upstream/current/mfhdf/hdfimport/testutil.sh.in	2007-05-15 09:53:05 UTC (rev 831)
@@ -0,0 +1,147 @@
+#!/bin/sh 
+# HDF Utilities Test script
+# Usage: testutil.sh [machine-type]
+
+srcdir=@srcdir@
+
+machinetype="$1"
+
+# Check if target machine supports 32 bits datatype.
+# "true" is TRUE; "" means FALSE.
+case $machinetype in
+    *unicos*) has32="";;
+    *) has32="true";;
+esac
+
+# initialize errors variable
+errors=0
+haserr=0
+
+# setup hdfed command which is used often
+HDFED='../../hdf/util/hdfed'
+HDFLS='../../hdf/util/hdfls'
+HDFEDCMD="$HDFED -batch"		# use -batch mode for no prompt
+SED="sed -e /library/,/String/d"  # filter out the library version
+
+echo ""
+echo "=============================="
+echo "HDFIMPORT tests started"
+echo "=============================="
+
+if [ -f hdfimport -a -f hdfimporttest ]; then
+echo "** Testing hdfimport  ***"
+
+/bin/rm -f ctxt* cb* *.hdf hdfls.tmp5 hdfed.tmp6
+./hdfimporttest
+echo "Testing for 32-bit floating point ASCII (2D data)" 
+./hdfimport ctxtr2 -o ctxtr2.hdf
+echo "Testing for 32-bit floating point ASCII (3D data)" 
+./hdfimport ctxtr3 -o ctxtr3.hdf
+echo "Testing for 32-bit integer binary (2D data)" 
+./hdfimport cb32i2 -o cb32i2.hdf
+echo "Testing for 32-bit integer  binary (3D data)" 
+./hdfimport cb32i3 -o cb32i3.hdf
+echo "Testing for 16-bit integer binary (2D data)" 
+./hdfimport cb16i2 -o cb16i2.hdf
+echo "Testing for 16-bit integer (3D data)" 
+./hdfimport cb16i3 -o cb16i3.hdf
+echo "Testing for 32-bit floating point binary (2D data)" 
+./hdfimport cb32r2 -o cb32r2.hdf
+echo "Testing for 32-bit floating point binary (3D data)" 
+./hdfimport cb32r3 -o cb32r3.hdf
+echo "Testing for 64-bit floating point binary (2D data) - Default Behaviour (Conversion to 32 bit FP SDS)" 
+./hdfimport cb64r2 -o cb64r2.hdf
+echo "Testing for 64-bit floating point binary (3D data) - Default Behaviour (Conversion to 32-bit FP SDS)" 
+./hdfimport cb64r3 -o cb64r3.hdf
+echo "Testing for 64-bit floating point binary (2D data) - Conversion to 64-bit FP SDS" 
+./hdfimport cb64r2 -n -o cb64r2-n.hdf
+echo "Testing for 64-bit floating point binary (3D data) - Conversion to 64-bit FP SDS" 
+./hdfimport cb64r3 -n -o cb64r3-n.hdf
+echo "Testing for raster options" 
+./hdfimport ctxtr2 -o ctxtr2_ris.hdf -raster -e 50 50
+./hdfimport cb64r2 -o cb64r2_ris.hdf -raster -i 50 50 -f
+($HDFLS -l ctxtr2.hdf | $SED) > hdfls.tmp5 2>&1
+($HDFLS -l ctxtr3.hdf | $SED) >> hdfls.tmp5 2>&1
+($HDFLS -l cb32i2.hdf | $SED) >> hdfls.tmp5 2>&1
+($HDFLS -l cb32i3.hdf | $SED) >> hdfls.tmp5 2>&1
+($HDFLS -l cb16i2.hdf | $SED) >> hdfls.tmp5 2>&1
+($HDFLS -l cb16i3.hdf | $SED) >> hdfls.tmp5 2>&1
+($HDFLS -l cb32r2.hdf | $SED) >> hdfls.tmp5 2>&1
+($HDFLS -l cb32r3.hdf | $SED) >> hdfls.tmp5 2>&1
+($HDFLS -l cb64r2.hdf | $SED) >> hdfls.tmp5 2>&1
+($HDFLS -l cb64r3.hdf | $SED) >> hdfls.tmp5 2>&1
+($HDFLS -l cb64r2-n.hdf | $SED) >> hdfls.tmp5 2>&1
+($HDFLS -l cb64r3-n.hdf | $SED) >> hdfls.tmp5 2>&1
+($HDFLS -l ctxtr2_ris.hdf | $SED) >> hdfls.tmp5 2>&1
+($HDFLS -l cb64r2_ris.hdf | $SED) >> hdfls.tmp5 2>&1
+
+    diff  hdfls.tmp5 $srcdir/hdfimport.out1 || errors=1
+    $HDFEDCMD < $srcdir/hdfimport.input1 > hdfed.tmp6 2>&1
+    diff  hdfed.tmp6 $srcdir/hdfimport.out2 || errors=1
+
+/bin/rm -f ctxt* cb* *.hdf hdfls.tmp5 hdfed.tmp6
+#/bin/rm -f ctxt* cb* *.hdf 
+else
+haserr=1
+echo "** hdfimport or hdfimporttest not available ***"
+fi
+
+if [ $errors -eq 1 ]; then
+  haserr=1
+  echo " ********* NOTE ***************"
+  echo " hdfimport might have failed ***"
+  echo " The above errors could be formatting "
+  echo " problems which can be ignored "
+  echo " please run the following by hand to verify "
+  echo " "
+  echo "  /bin/rm -f ctxtr* cb* *.hdf hdfls.tmp5 hdfed.tmp6"
+  echo " ./hdfimporttest "
+  echo " ./hdfimport ctxtr2 -o ctxtr2.hdf "
+  echo " ./hdfimport ctxtr3 -o ctxtr3.hdf "
+  echo " ./hdfimport cb32i2 -o cb32i2.hdf "
+  echo " ./hdfimport cb32i3 -o cb32i3.hdf "
+  echo " ./hdfimport cb16i2 -o cb16i2.hdf "
+  echo " ./hdfimport cb16i3 -o cb16i3.hdf "
+  echo " ./hdfimport cb32r2 -o cb32r2.hdf "
+  echo " ./hdfimport cb32r3 -o cb32r3.hdf "
+  echo " ./hdfimport cb64r2 -o cb64r2.hdf "
+  echo " ./hdfimport cb64r3 -o cb64r3.hdf "
+  echo " ./hdfimport cb64r2 -n -o cb64r2-n.hdf "
+  echo " ./hdfimport cb64r3 -n -o cb64r3-n.hdf "
+  echo " ./hdfimport ctxtr2 -o ctxtr2_ris.hdf -raster -e 50 50 "
+  echo " ./hdfimport cb64r2 -o cb64r2_ris.hdf -raster -i 50 50 -f "
+  echo "($HDFLS -l ctxtr2.hdf | $SED) >&  hdfls.tmp5 "
+  echo "($HDFLS -l ctxtr3.hdf | $SED) >>& hdfls.tmp5 "
+  echo "($HDFLS -l cb32i2.hdf | $SED) >> hdfls.tmp5 2>&1 "
+  echo "($HDFLS -l cb32i3.hdf | $SED) >> hdfls.tmp5 2>&1 "
+  echo "($HDFLS -l cb16i2.hdf | $SED) >> hdfls.tmp5 2>&1 "
+  echo "($HDFLS -l cb16i3.hdf | $SED) >> hdfls.tmp5 2>&1 "
+  echo "($HDFLS -l cb32r2.hdf | $SED) >>& hdfls.tmp5 "
+  echo "($HDFLS -l cb32r3.hdf | $SED) >>& hdfls.tmp5 "
+  echo "($HDFLS -l cb64r2.hdf | $SED) >>& hdfls.tmp5 "
+  echo "($HDFLS -l cb64r3.hdf | $SED) >>& hdfls.tmp5 "
+  echo "($HDFLS -l cb64r2-n.hdf | $SED) >> hdfls.tmp5 2>&1 "
+  echo "($HDFLS -l cb64r3-n.hdf | $SED) >> hdfls.tmp5 2>&1 "
+  echo "($HDFLS -l ctxtr2_ris.hdf | $SED) >>& hdfls.tmp5 "
+  echo "($HDFLS -l cb64r2_ris.hdf | $SED) >>& hdfls.tmp5 "
+  echo " diff hdfls.tmp5 hdfimport.out1 "
+  echo " $HDFEDCMD < hdfimport.input1 >& hdfed.tmp6 "
+  echo " diff hdfed.tmp6 hdfimport.out2 "
+  echo " ******* END NOTE *************"
+  echo ""
+  errors=0
+fi
+
+#
+# Check errors result
+if [ $haserr -eq 0 ]; then
+    echo "================================="
+    echo "HDFIMPORT Utilities tests passed."
+    echo "================================="
+else
+    echo "*********************************************"
+    echo "HDFIMPORT Utilities tests encountered errors"
+    echo "*********************************************"
+fi
+echo ""
+exit $haserr


Property changes on: packages/libhdf4/branches/upstream/current/mfhdf/hdfimport/testutil.sh.in
___________________________________________________________________
Name: svn:executable
   + *

Added: packages/libhdf4/branches/upstream/current/mfhdf/hdiff/Makefile.am
===================================================================
--- packages/libhdf4/branches/upstream/current/mfhdf/hdiff/Makefile.am	                        (rev 0)
+++ packages/libhdf4/branches/upstream/current/mfhdf/hdiff/Makefile.am	2007-05-15 09:53:05 UTC (rev 831)
@@ -0,0 +1,40 @@
+#############################################################################
+##                      Setup for building programs                        ##
+#############################################################################
+
+## Setup the different includes and preprocessor #defines we need.
+INCLUDES=-I$(top_srcdir)/hdf/src        \
+         -I$(top_srcdir)/mfhdf/libsrc   \
+         -I$(top_srcdir)/mfhdf/port     \
+         -I../libsrc
+DEFINES=-DNDEBUG -DHDF
+AM_CPPFLAGS=$(INCLUDES) $(DEFINES)
+
+#############################################################################
+##                          Programs to build                              ##
+#############################################################################
+
+bin_PROGRAMS = hdiff
+
+## Information for building the "hdiff" program
+hdiff_SOURCES = hdiff.c hdiff_array.c hdiff_gr.c hdiff_list.c hdiff_main.c  \
+                hdiff_mattbl.c hdiff_gattr.c hdiff_misc.c hdiff_sds.c       \
+                hdiff_table.c hdiff_vs.c
+hdiff_LDADD = ../libsrc/libmfhdf.a $(top_builddir)/hdf/src/libdf.a @LIBS@
+hdiff_DEPENDENCIES = $(top_builddir)/hdf/src/libdf.a ../libsrc/libmfhdf.a
+
+#############################################################################
+##                              Testing                                    ##
+#############################################################################
+
+check_SCRIPTS = testhdiff.sh
+
+noinst_PROGRAMS = hdifftst
+
+hdifftst_SOURCES = hdifftst.c
+hdifftst_LDADD = ../libsrc/libmfhdf.a $(top_builddir)/hdf/src/libdf.a @LIBS@
+hdifftst_DEPENDENCIES = $(top_builddir)/hdf/src/libdf.a ../libsrc/libmfhdf.a
+
+check: hdifftst
+	@srcdir="$(srcdir)" $(SHELL) $(srcdir)/testhdiff.sh
+ 

Added: packages/libhdf4/branches/upstream/current/mfhdf/hdiff/Makefile.in
===================================================================
--- packages/libhdf4/branches/upstream/current/mfhdf/hdiff/Makefile.in	                        (rev 0)
+++ packages/libhdf4/branches/upstream/current/mfhdf/hdiff/Makefile.in	2007-05-15 09:53:05 UTC (rev 831)
@@ -0,0 +1,482 @@
+# Makefile.in generated by automake 1.7.7 from Makefile.am.
+# @configure_input@
+
+# Copyright 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003
+# 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.
+
+ at SET_MAKE@
+
+#############################################################################
+#############################################################################
+
+srcdir = @srcdir@
+top_srcdir = @top_srcdir@
+VPATH = @srcdir@
+pkgdatadir = $(datadir)/@PACKAGE@
+pkglibdir = $(libdir)/@PACKAGE@
+pkgincludedir = $(includedir)/@PACKAGE@
+top_builddir = ../..
+
+am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
+INSTALL = @INSTALL@
+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 = :
+host_triplet = @host@
+ACLOCAL = @ACLOCAL@
+AMDEP_FALSE = @AMDEP_FALSE@
+AMDEP_TRUE = @AMDEP_TRUE@
+AMTAR = @AMTAR@
+AR = @AR@
+AUTOCONF = @AUTOCONF@
+AUTOHEADER = @AUTOHEADER@
+AUTOMAKE = @AUTOMAKE@
+AWK = @AWK@
+CC = @CC@
+CCDEPMODE = @CCDEPMODE@
+CFLAGS = @CFLAGS@
+CPP = @CPP@
+CPPFLAGS = @CPPFLAGS@
+CXX = @CXX@
+CXXCPP = @CXXCPP@
+CXXDEPMODE = @CXXDEPMODE@
+CXXFLAGS = @CXXFLAGS@
+CYGPATH_W = @CYGPATH_W@
+DEFS = @DEFS@
+DEPDIR = @DEPDIR@
+DIFF = @DIFF@
+ECHO_C = @ECHO_C@
+ECHO_N = @ECHO_N@
+ECHO_T = @ECHO_T@
+EGREP = @EGREP@
+EXEEXT = @EXEEXT@
+F77 = @F77@
+FFLAGS = @FFLAGS@
+HDF_BUILD_FORTRAN_FALSE = @HDF_BUILD_FORTRAN_FALSE@
+HDF_BUILD_FORTRAN_TRUE = @HDF_BUILD_FORTRAN_TRUE@
+HDF_BUILD_XDR_FALSE = @HDF_BUILD_XDR_FALSE@
+HDF_BUILD_XDR_TRUE = @HDF_BUILD_XDR_TRUE@
+INSTALL_DATA = @INSTALL_DATA@
+INSTALL_PROGRAM = @INSTALL_PROGRAM@
+INSTALL_SCRIPT = @INSTALL_SCRIPT@
+INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
+LDFLAGS = @LDFLAGS@
+LEX = @LEX@
+LEXLIB = @LEXLIB@
+LEX_OUTPUT_ROOT = @LEX_OUTPUT_ROOT@
+LIBOBJS = @LIBOBJS@
+LIBS = @LIBS@
+LN_S = @LN_S@
+LTLIBOBJS = @LTLIBOBJS@
+MAINT = @MAINT@
+MAINTAINER_MODE_FALSE = @MAINTAINER_MODE_FALSE@
+MAINTAINER_MODE_TRUE = @MAINTAINER_MODE_TRUE@
+MAKEINFO = @MAKEINFO@
+NEQN = @NEQN@
+OBJEXT = @OBJEXT@
+PACKAGE = @PACKAGE@
+PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
+PACKAGE_NAME = @PACKAGE_NAME@
+PACKAGE_STRING = @PACKAGE_STRING@
+PACKAGE_TARNAME = @PACKAGE_TARNAME@
+PACKAGE_VERSION = @PACKAGE_VERSION@
+PATH_SEPARATOR = @PATH_SEPARATOR@
+RANLIB = @RANLIB@
+SET_MAKE = @SET_MAKE@
+SHELL = @SHELL@
+STRIP = @STRIP@
+TBL = @TBL@
+VERSION = @VERSION@
+YACC = @YACC@
+ac_ct_CC = @ac_ct_CC@
+ac_ct_CXX = @ac_ct_CXX@
+ac_ct_F77 = @ac_ct_F77@
+ac_ct_RANLIB = @ac_ct_RANLIB@
+ac_ct_STRIP = @ac_ct_STRIP@
+am__fastdepCC_FALSE = @am__fastdepCC_FALSE@
+am__fastdepCC_TRUE = @am__fastdepCC_TRUE@
+am__fastdepCXX_FALSE = @am__fastdepCXX_FALSE@
+am__fastdepCXX_TRUE = @am__fastdepCXX_TRUE@
+am__include = @am__include@
+am__leading_dot = @am__leading_dot@
+am__quote = @am__quote@
+bindir = @bindir@
+build = @build@
+build_alias = @build_alias@
+build_cpu = @build_cpu@
+build_os = @build_os@
+build_vendor = @build_vendor@
+datadir = @datadir@
+exec_prefix = @exec_prefix@
+host = @host@
+host_alias = @host_alias@
+host_cpu = @host_cpu@
+host_os = @host_os@
+host_vendor = @host_vendor@
+includedir = @includedir@
+infodir = @infodir@
+install_sh = @install_sh@
+libdir = @libdir@
+libexecdir = @libexecdir@
+localstatedir = @localstatedir@
+mandir = @mandir@
+oldincludedir = @oldincludedir@
+prefix = @prefix@
+program_transform_name = @program_transform_name@
+sbindir = @sbindir@
+sharedstatedir = @sharedstatedir@
+sysconfdir = @sysconfdir@
+target_alias = @target_alias@
+
+INCLUDES = -I$(top_srcdir)/hdf/src        \
+         -I$(top_srcdir)/mfhdf/libsrc   \
+         -I$(top_srcdir)/mfhdf/port     \
+         -I../libsrc
+
+DEFINES = -DNDEBUG -DHDF
+AM_CPPFLAGS = $(INCLUDES) $(DEFINES)
+
+
+#############################################################################
+#############################################################################
+bin_PROGRAMS = hdiff
+
+hdiff_SOURCES = hdiff.c hdiff_array.c hdiff_gr.c hdiff_list.c hdiff_main.c  \
+                hdiff_mattbl.c hdiff_gattr.c hdiff_misc.c hdiff_sds.c       \
+                hdiff_table.c hdiff_vs.c
+
+hdiff_LDADD = ../libsrc/libmfhdf.a $(top_builddir)/hdf/src/libdf.a @LIBS@
+hdiff_DEPENDENCIES = $(top_builddir)/hdf/src/libdf.a ../libsrc/libmfhdf.a
+
+
+#############################################################################
+#############################################################################
+check_SCRIPTS = testhdiff.sh
+
+noinst_PROGRAMS = hdifftst
+
+hdifftst_SOURCES = hdifftst.c
+hdifftst_LDADD = ../libsrc/libmfhdf.a $(top_builddir)/hdf/src/libdf.a @LIBS@
+hdifftst_DEPENDENCIES = $(top_builddir)/hdf/src/libdf.a ../libsrc/libmfhdf.a
+subdir = mfhdf/hdiff
+ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
+mkinstalldirs = $(SHELL) $(top_srcdir)/bin/mkinstalldirs
+CONFIG_HEADER = $(top_builddir)/hdf/src/h4config.h
+CONFIG_CLEAN_FILES =
+bin_PROGRAMS = hdiff$(EXEEXT)
+noinst_PROGRAMS = hdifftst$(EXEEXT)
+PROGRAMS = $(bin_PROGRAMS) $(noinst_PROGRAMS)
+
+am_hdiff_OBJECTS = hdiff.$(OBJEXT) hdiff_array.$(OBJEXT) \
+	hdiff_gr.$(OBJEXT) hdiff_list.$(OBJEXT) hdiff_main.$(OBJEXT) \
+	hdiff_mattbl.$(OBJEXT) hdiff_gattr.$(OBJEXT) \
+	hdiff_misc.$(OBJEXT) hdiff_sds.$(OBJEXT) hdiff_table.$(OBJEXT) \
+	hdiff_vs.$(OBJEXT)
+hdiff_OBJECTS = $(am_hdiff_OBJECTS)
+hdiff_LDFLAGS =
+am_hdifftst_OBJECTS = hdifftst.$(OBJEXT)
+hdifftst_OBJECTS = $(am_hdifftst_OBJECTS)
+hdifftst_LDFLAGS =
+
+DEFAULT_INCLUDES =  -I. -I$(srcdir) -I$(top_builddir)/hdf/src
+depcomp = $(SHELL) $(top_srcdir)/bin/depcomp
+am__depfiles_maybe = depfiles
+ at AMDEP_TRUE@DEP_FILES = ./$(DEPDIR)/hdiff.Po ./$(DEPDIR)/hdiff_array.Po \
+ at AMDEP_TRUE@	./$(DEPDIR)/hdiff_gattr.Po ./$(DEPDIR)/hdiff_gr.Po \
+ at AMDEP_TRUE@	./$(DEPDIR)/hdiff_list.Po ./$(DEPDIR)/hdiff_main.Po \
+ at AMDEP_TRUE@	./$(DEPDIR)/hdiff_mattbl.Po \
+ at AMDEP_TRUE@	./$(DEPDIR)/hdiff_misc.Po ./$(DEPDIR)/hdiff_sds.Po \
+ at AMDEP_TRUE@	./$(DEPDIR)/hdiff_table.Po ./$(DEPDIR)/hdiff_vs.Po \
+ at AMDEP_TRUE@	./$(DEPDIR)/hdifftst.Po
+COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \
+	$(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
+CCLD = $(CC)
+LINK = $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@
+DIST_SOURCES = $(hdiff_SOURCES) $(hdifftst_SOURCES)
+DIST_COMMON = $(srcdir)/Makefile.in Makefile.am
+SOURCES = $(hdiff_SOURCES) $(hdifftst_SOURCES)
+
+all: all-am
+
+.SUFFIXES:
+.SUFFIXES: .c .o .obj
+$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ Makefile.am  $(top_srcdir)/configure.ac $(ACLOCAL_M4)
+	cd $(top_srcdir) && \
+	  $(AUTOMAKE) --foreign  mfhdf/hdiff/Makefile
+Makefile: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.in  $(top_builddir)/config.status
+	cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)
+binPROGRAMS_INSTALL = $(INSTALL_PROGRAM)
+install-binPROGRAMS: $(bin_PROGRAMS)
+	@$(NORMAL_INSTALL)
+	$(mkinstalldirs) $(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)
+hdiff$(EXEEXT): $(hdiff_OBJECTS) $(hdiff_DEPENDENCIES) 
+	@rm -f hdiff$(EXEEXT)
+	$(LINK) $(hdiff_LDFLAGS) $(hdiff_OBJECTS) $(hdiff_LDADD) $(LIBS)
+hdifftst$(EXEEXT): $(hdifftst_OBJECTS) $(hdifftst_DEPENDENCIES) 
+	@rm -f hdifftst$(EXEEXT)
+	$(LINK) $(hdifftst_LDFLAGS) $(hdifftst_OBJECTS) $(hdifftst_LDADD) $(LIBS)
+
+mostlyclean-compile:
+	-rm -f *.$(OBJEXT) core *.core
+
+distclean-compile:
+	-rm -f *.tab.c
+
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/hdiff.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/hdiff_array.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/hdiff_gattr.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/hdiff_gr.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/hdiff_list.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/hdiff_main.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/hdiff_mattbl.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/hdiff_misc.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/hdiff_sds.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/hdiff_table.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/hdiff_vs.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/hdifftst.Po at am__quote@
+
+.c.o:
+ at am__fastdepCC_TRUE@	if $(COMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" \
+ at am__fastdepCC_TRUE@	  -c -o $@ `test -f '$<' || echo '$(srcdir)/'`$<; \
+ at am__fastdepCC_TRUE@	then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; \
+ at am__fastdepCC_TRUE@	else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; \
+ at am__fastdepCC_TRUE@	fi
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	depfile='$(DEPDIR)/$*.Po' tmpdepfile='$(DEPDIR)/$*.TPo' @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	$(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCC_FALSE@	$(COMPILE) -c `test -f '$<' || echo '$(srcdir)/'`$<
+
+.c.obj:
+ at am__fastdepCC_TRUE@	if $(COMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" \
+ at am__fastdepCC_TRUE@	  -c -o $@ `if test -f '$<'; then $(CYGPATH_W) '$<'; else $(CYGPATH_W) '$(srcdir)/$<'; fi`; \
+ at am__fastdepCC_TRUE@	then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; \
+ at am__fastdepCC_TRUE@	else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; \
+ at am__fastdepCC_TRUE@	fi
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	depfile='$(DEPDIR)/$*.Po' tmpdepfile='$(DEPDIR)/$*.TPo' @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	$(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCC_FALSE@	$(COMPILE) -c `if test -f '$<'; then $(CYGPATH_W) '$<'; else $(CYGPATH_W) '$(srcdir)/$<'; fi`
+uninstall-info-am:
+
+ETAGS = etags
+ETAGSFLAGS =
+
+CTAGS = ctags
+CTAGSFLAGS =
+
+tags: TAGS
+
+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; } \
+	       END { for (i in files) print i; }'`; \
+	mkid -fID $$unique
+
+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; } \
+	       END { for (i in files) print i; }'`; \
+	test -z "$(ETAGS_ARGS)$$tags$$unique" \
+	  || $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
+	     $$tags $$unique
+
+ctags: CTAGS
+CTAGS:  $(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; } \
+	       END { 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
+DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
+
+top_distdir = ../..
+distdir = $(top_distdir)/$(PACKAGE)-$(VERSION)
+
+distdir: $(DISTFILES)
+	@srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \
+	topsrcdirstrip=`echo "$(top_srcdir)" | sed 's|.|.|g'`; \
+	list='$(DISTFILES)'; for file in $$list; do \
+	  case $$file in \
+	    $(srcdir)/*) file=`echo "$$file" | sed "s|^$$srcdirstrip/||"`;; \
+	    $(top_srcdir)/*) file=`echo "$$file" | sed "s|^$$topsrcdirstrip/|$(top_builddir)/|"`;; \
+	  esac; \
+	  if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
+	  dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \
+	  if test "$$dir" != "$$file" && test "$$dir" != "."; then \
+	    dir="/$$dir"; \
+	    $(mkinstalldirs) "$(distdir)$$dir"; \
+	  else \
+	    dir=''; \
+	  fi; \
+	  if test -d $$d/$$file; then \
+	    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
+	$(MAKE) $(AM_MAKEFLAGS) $(check_SCRIPTS)
+check: check-am
+all-am: Makefile $(PROGRAMS)
+
+installdirs:
+	$(mkinstalldirs) $(DESTDIR)$(bindir)
+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_STRIP_FLAG=-s \
+	  `test -z '$(STRIP)' || \
+	    echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
+mostlyclean-generic:
+
+clean-generic:
+
+distclean-generic:
+	-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:
+
+info: info-am
+
+info-am:
+
+install-data-am:
+
+install-exec-am: install-binPROGRAMS
+
+install-info: install-info-am
+
+install-man:
+
+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 uninstall-info-am
+
+.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 info info-am install install-am install-binPROGRAMS \
+	install-data install-data-am install-exec install-exec-am \
+	install-info install-info-am install-man 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 uninstall-info-am
+
+
+check: hdifftst
+	@srcdir="$(srcdir)" $(SHELL) $(srcdir)/testhdiff.sh
+# 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:

Added: packages/libhdf4/branches/upstream/current/mfhdf/hdiff/hdiff.c
===================================================================
--- packages/libhdf4/branches/upstream/current/mfhdf/hdiff/hdiff.c	                        (rev 0)
+++ packages/libhdf4/branches/upstream/current/mfhdf/hdiff/hdiff.c	2007-05-15 09:53:05 UTC (rev 831)
@@ -0,0 +1,413 @@
+/****************************************************************************
+ * NCSA HDF                                                                 *
+ * Software Development Group                                               *
+ * National Center for Supercomputing Applications                          *
+ * University of Illinois at Urbana-Champaign                               *
+ * 605 E. Springfield, Champaign IL 61820                                   *
+ *                                                                          *
+ * For conditions of distribution and use, see the accompanying             *
+ * hdf/COPYING file.                                                        *
+ *                                                                          *
+ ****************************************************************************/
+
+
+#include "hdiff.h"
+#include "hdiff_list.h"
+#include "hdiff_mattbl.h"
+
+/*-------------------------------------------------------------------------
+ * Function: hdiff
+ *
+ * Purpose: find differences between two HDF files
+ *
+ * Return: number of differences found, -1 on failure
+ *
+ * Programmer: Pedro Vicente, pvn at ncsa.uiuc.edu
+ *
+ * Date: August 22, 2003
+ *
+ *-------------------------------------------------------------------------
+ */
+
+int hdiff(const char *fname1, 
+          const char *fname2, 
+          diff_opt_t *opt)
+{
+ dtable_t  *list1;
+ dtable_t  *list2;
+ int       nobjects1;
+ int       nobjects2;
+ int       nfound=0;
+ int32     sd1_id,                 
+           sd2_id,
+           gr1_id,                 
+           gr2_id,
+           file1_id,                 
+           file2_id;
+
+ /* init tables */
+ dtable_init(&list1);
+ dtable_init(&list2);
+
+/*-------------------------------------------------------------------------
+ * get a list of objects for both files
+ *-------------------------------------------------------------------------
+ */
+
+ if ((nobjects1=Hgetlist(fname1, list1))<=0)
+  return FAIL;
+ if ((nobjects2=Hgetlist(fname2, list2))<=0)
+  return FAIL;
+
+ if (opt->verbose) {
+  dtable_print(list1);
+  dtable_print(list2);
+ }
+
+/*-------------------------------------------------------------------------
+ * open file IDs
+ *-------------------------------------------------------------------------
+ */
+
+ if ((file1_id = Hopen(fname1, DFACC_READ, 0))==FAIL)
+ {
+  printf("Exiting: Hopen failed on <%s>", fname1);
+  return FAIL;
+ }
+ 
+ if ((file2_id = Hopen(fname2, DFACC_READ, 0))==FAIL)
+ {
+  printf("Exiting: Hopen failed on <%s>", fname2);
+  return FAIL;
+ }
+
+/*-------------------------------------------------------------------------
+ * SD interface
+ *-------------------------------------------------------------------------
+ */
+
+ if ((sd1_id = SDstart(fname1, DFACC_RDONLY))==FAIL) {
+  printf("SDstart failed on <%s>", fname1);
+  return FAIL;
+ }
+ if ((sd2_id = SDstart(fname2, DFACC_RDONLY))==FAIL) {
+  printf("SDstart failed on <%s>", fname2);
+  return FAIL;
+ }
+
+/*-------------------------------------------------------------------------
+ * GR interface
+ *-------------------------------------------------------------------------
+ */
+
+ if ((gr1_id = GRstart(file1_id))==FAIL) {
+  printf("GRstart failed on <%s>", fname1);
+  return FAIL;
+ }
+ if ((gr2_id = GRstart(file2_id))==FAIL) {
+  printf("GRstart failed on <%s>", fname2);
+  return FAIL;
+ }
+
+/*-------------------------------------------------------------------------
+ * do loop
+ *-------------------------------------------------------------------------
+ */
+
+
+ nfound=match(fname1,nobjects1,list1,
+              fname2,nobjects2,list2,
+              sd1_id,gr1_id,file1_id,
+              sd2_id,gr2_id,file2_id,
+              opt);
+
+
+/*-------------------------------------------------------------------------
+ * global attributes
+ *-------------------------------------------------------------------------
+ */
+ 
+ if (opt->ga == 1) 
+  nfound+=gattr_diff(sd1_id, sd2_id, opt);
+
+
+/*-------------------------------------------------------------------------
+ * close
+ *-------------------------------------------------------------------------
+ */
+ 
+ if ( SDend(sd1_id)==FAIL) {
+  printf("Error: SDend failed on <%s>", fname1);
+  return FAIL;
+ }
+ if (SDend(sd2_id)==FAIL) {
+  printf("Error: SDend failed on <%s>", fname2);
+  return FAIL;
+ }
+ if (GRend(gr1_id)==FAIL) {
+  printf("Error: GRend failed on <%s>", fname1);
+  return FAIL;
+ }
+ if (GRend(gr2_id)==FAIL) {
+  printf("Error: GRend failed on <%s>", fname2);
+  return FAIL;
+ }
+ if (Hclose(file1_id)==FAIL) {
+  printf("Error: Hclose failed on <%s>", fname1);
+  return FAIL;
+ }
+ if (Hclose(file2_id)==FAIL) {
+  printf("Error: Hclose failed on <%s>", fname2);
+  return FAIL;
+ }
+
+
+ /* free tables */
+ dtable_free(list1);
+ dtable_free(list2);
+
+ return nfound;
+}
+
+
+
+/*-------------------------------------------------------------------------
+ * Function: match
+ *
+ * Purpose: Find common objects; the algorithm used for this search is the 
+ *  cosequential match algorithm and is described in 
+ *  Folk, Michael; Zoellick, Bill. (1992). File Structures. Addison-Wesley.
+ *
+ * Return: Number of differences found
+ *
+ * Programmer: Pedro Vicente, pvn at ncsa.uiuc.edu
+ *
+ * Date: August 22, 2003
+ *
+ *-------------------------------------------------------------------------
+ */
+int match( const char *fname1, int nobjects1, dtable_t *list1,
+           const char *fname2, int nobjects2, dtable_t *list2,
+           int32 sd1_id, int32 gr1_id, int32 file1_id,                
+           int32 sd2_id, int32 gr2_id, int32 file2_id,
+           diff_opt_t *opt )
+{
+ int   cmp;
+ int   more_names_exist = (nobjects1>0 && nobjects2>0) ? 1 : 0;
+ int   curr1=0;
+ int   curr2=0;
+ int   nfound=0, ret;
+ /*build a common list */
+ match_table_t *mattbl=NULL;
+ unsigned infile[2]; 
+ char     c1, c2;
+ int      i;
+
+/*-------------------------------------------------------------------------
+ * build the list
+ *-------------------------------------------------------------------------
+ */
+ match_table_init( &mattbl );
+
+ while ( more_names_exist )
+ {
+  cmp = strcmp( list1->objs[curr1].obj_name, list2->objs[curr2].obj_name );
+  if ( cmp == 0 )
+  {
+   infile[0]=1; infile[1]=1;
+   match_table_add(mattbl,infile,
+    list1->objs[curr1].obj_name,
+    list1->objs[curr1].tag,
+    list1->objs[curr1].ref,
+    list2->objs[curr2].tag,
+    list2->objs[curr2].ref);
+
+   curr1++;
+   curr2++;
+  }
+  else if ( cmp < 0 )
+  {
+   infile[0]=1; infile[1]=0;
+   match_table_add(mattbl,infile,
+    list1->objs[curr1].obj_name,
+    list1->objs[curr1].tag,
+    list1->objs[curr1].ref,
+    -1,
+    -1);
+   curr1++;
+  }
+  else 
+  {
+   infile[0]=0; infile[1]=1;
+   match_table_add(mattbl,infile,
+    list2->objs[curr2].obj_name,
+    -1,
+    -1,
+    list2->objs[curr2].tag,
+    list2->objs[curr2].ref);
+   curr2++;
+  }
+
+  more_names_exist = (curr1<nobjects1 && curr2<nobjects2) ? 1 : 0;
+
+ 
+ } /* end while */
+
+ /* list1 did not end */
+ if (curr1<nobjects1)
+ {
+  while ( curr1<nobjects1 )
+  {
+   infile[0]=1; infile[1]=0;
+   match_table_add(mattbl,infile,
+    list1->objs[curr1].obj_name,
+    list1->objs[curr1].tag,
+    list1->objs[curr1].ref,
+    -1,
+    -1);
+   curr1++;
+  }
+ }
+
+ /* list2 did not end */
+ if (curr2<nobjects2)
+ {
+  while ( curr2<nobjects2 )
+  {
+   infile[0]=0; infile[1]=1;
+   match_table_add(mattbl,infile,
+    list2->objs[curr2].obj_name,
+    -1,
+    -1,
+    list2->objs[curr2].tag,
+    list2->objs[curr2].ref);
+   curr2++;
+  }
+ }
+
+/*-------------------------------------------------------------------------
+ * print the list
+ *-------------------------------------------------------------------------
+ */
+
+ if (opt->verbose) {
+  printf("---------------------------------------\n");
+  printf("file1     file2\n");
+  printf("---------------------------------------\n");
+  for (i = 0; i < mattbl->nobjs; i++)
+  {
+   c1 = (char)((mattbl->objs[i].flags[0]) ? 'x' : ' ');
+   c2 = (char)((mattbl->objs[i].flags[1]) ? 'x' : ' ');
+   printf("%5c %6c    %-15s\n", c1, c2, mattbl->objs[i].obj_name);
+  }
+  printf("\n");
+ }
+
+
+/*-------------------------------------------------------------------------
+ * do the diff for objects
+ *-------------------------------------------------------------------------
+ */
+
+ for (i = 0; i < mattbl->nobjs; i++)
+ {
+  if ( mattbl->objs[i].flags[0] && mattbl->objs[i].flags[1] )
+  {
+   if((ret=diff( fname1, 
+    fname2,
+    file1_id,
+    file2_id,
+    sd1_id,
+    sd2_id,
+    gr1_id,
+    gr2_id,
+    mattbl->objs[i].obj_name, 
+    mattbl->objs[i].obj_name, 
+    mattbl->objs[i].tag1,
+    mattbl->objs[i].ref1,
+    mattbl->objs[i].tag2,
+    mattbl->objs[i].ref2,
+    opt ))<0)
+    return FAIL;
+   nfound+=ret;
+  }
+ }
+
+
+ /* free table */
+ match_table_free(mattbl);
+ return nfound;
+}
+
+/*-------------------------------------------------------------------------
+ * Function: diff
+ *
+ * Purpose: switch between types and choose the diff function
+ *
+ * Return: Number of differences found
+ *
+ * Programmer: Pedro Vicente, pvn at ncsa.uiuc.edu
+ *
+ * Date: August 25, 2003
+ *
+ *-------------------------------------------------------------------------
+ */
+
+int diff( const char *fname1,
+          const char *fname2, 
+          int32 file1_id,
+          int32 file2_id,
+          int32 sd1_id,
+          int32 sd2_id,
+          int32 gr1_id,
+          int32 gr2_id,
+          char *obj1_name,
+          char *obj2_name,
+          int32 tag1,
+          int32 ref1,
+          int32 tag2,
+          int32 ref2,
+          diff_opt_t *opt )
+{
+ int nfound=0;
+
+ switch ( tag1 )
+ {
+  case DFTAG_SD:  /* Scientific Data */
+  case DFTAG_SDG: /* Scientific Data Group */
+  case DFTAG_NDG: /* Numeric Data Group */
+   if ((nfound=diff_sds(fname1,fname2,sd1_id,sd2_id,ref1,ref2,opt))<0)
+    return FAIL;
+  break;
+
+  case DFTAG_VG: 
+   break;
+   
+  case DFTAG_RI:  /* Raster Image */
+  case DFTAG_CI:  /* Compressed Image */
+  case DFTAG_RIG: /* Raster Image Group */
+  case DFTAG_RI8: /* Raster-8 image */
+  case DFTAG_CI8: /* RLE compressed 8-bit image */
+  case DFTAG_II8: /* IMCOMP compressed 8-bit image */
+   if (opt->gr == 1) {
+     if ((nfound=diff_gr(file1_id,file2_id,gr1_id,gr2_id,ref1,ref2,opt))<0)
+      return FAIL;
+   }
+   break;
+   
+  case DFTAG_VH: 
+   if (opt->vd == 1) {
+    if ((nfound=diff_vs(file1_id,file2_id,ref1,ref2,opt))<0)
+     return FAIL;
+   }
+   break;
+  
+  default:
+   printf("Tag <%d> and Tag <%d>: Comparison not supported for <%s> and <%s> \n", 
+    tag1, tag2, obj1_name, obj2_name);
+   break;
+ } 
+ 
+ return nfound;
+}
+

Added: packages/libhdf4/branches/upstream/current/mfhdf/hdiff/hdiff.h
===================================================================
--- packages/libhdf4/branches/upstream/current/mfhdf/hdiff/hdiff.h	                        (rev 0)
+++ packages/libhdf4/branches/upstream/current/mfhdf/hdiff/hdiff.h	2007-05-15 09:53:05 UTC (rev 831)
@@ -0,0 +1,194 @@
+/*********************************************************************
+ *   Copyright 1993, UCAR/Unidata
+ *   See netcdf/COPYRIGHT file for copying and redistribution conditions.
+ *   /hdf/src/master/mfhdf/ncdump/ncdump.h,v 1.1 1993/04/21 21:51:19 chouck Exp
+ *********************************************************************/
+
+
+
+
+#ifndef HDIFF_H__
+#define HDIFF_H__
+
+
+#include "hdf.h"
+#include "mfhdf.h"
+#include "hdiff_table.h"
+
+#define  Printf  (void) printf
+
+
+
+struct ncdim {   /* dimension */
+    char name[MAX_NC_NAME];
+    int32 size;
+};
+
+struct ncvar {   /* variable */
+    char name[MAX_NC_NAME];
+    int32 type;
+    int32 ndims;
+    int32 dims[MAX_VAR_DIMS];
+    int32 natts;
+};
+
+struct ncatt {   /* attribute */
+    int32 var;
+    char name[MAX_NC_NAME];
+    int32 type;
+    int32 len;
+    void *val;
+};
+
+typedef
+enum {LANG_NONE, LANG_C, LANG_F} Nclang; 
+
+typedef struct {   /* selection for comparison  */
+    int verbose;   /*
+     * if true, print cuurent interface comparison
+     */
+    int ga;   /*
+     * if true, compare global attributes only 
+     */
+    int sa;   /*
+     * if true, compare SD local attributes only 
+     */
+    int sd;   /*
+     * if true, compare SD data only 
+     */
+    int gr;   /*
+     * if true, compare GR data only 
+     */
+    int vd;   /*
+     * if true, compare Vdata only 
+     */
+    uint32 max_err_cnt;         /*
+                                 * max. no of difference to be printed
+                                 */
+    float32 err_limit;  /*
+     * limit of difference for the comparison
+     */
+    int nlvars;   /*
+     * Number of variables specified with -v option
+     * on command line
+     */
+    char** lvars;  /*
+     * list of variable names specified with -v
+     * option on command line
+     */
+    int nuvars;   /*
+     * Number of variables specified with -u option
+     * on command line
+     */
+    char** uvars;  /*
+     * list of variable names specified with -u
+     * option on command line
+     */
+    int statistics;
+
+} diff_opt_t;
+
+
+
+
+/*-------------------------------------------------------------------------
+ * public functions
+ *-------------------------------------------------------------------------
+ */
+
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+int  hdiff(const char *fname1, const char *fname2, diff_opt_t *opt);
+
+#ifdef __cplusplus
+}
+#endif
+
+
+
+
+/*-------------------------------------------------------------------------
+ * private functions
+ *-------------------------------------------------------------------------
+ */
+
+int  gattr_diff(int32 sdid1, int32 sdid2, diff_opt_t *opt);
+int  sdattr_diff(int32 sdid1, int32 sdid2, diff_opt_t *opt);
+void pr_att_vals(nc_type type, int len, void *vals);
+int  vdata_cmp(int32 vs1, int32 vs2, char *gname, char*cname, uint32 max_err_cnt);
+void fmt_print(uint8 *x, int32 type);
+void make_vars(char *optarg, diff_opt_t *opt, int option);
+
+
+int array_diff(void *buf1, 
+               void *buf2, 
+               uint32 tot_cnt, 
+               const char *name1,
+               const char *name2,
+               int rank,
+               int32 *dims,
+               int32 type, 
+               float32 err_limit, 
+               uint32 max_err_cnt, 
+               int32 statistics,
+               void *fill1, 
+               void *fill2);
+
+
+int match( const char *fname1, int nobjects1, dtable_t *list1,
+           const char *fname2, int nobjects2, dtable_t *list2,
+           int32 sd1_id, int32 gr1_id, int32 file1_id,                
+           int32 sd2_id, int32 gr2_id, int32 file2_id,
+           diff_opt_t *opt );
+
+
+int diff( const char *fname1,
+          const char *fname2, 
+          int32 file1_id,
+          int32 file2_id,
+										int32 sd1_id,
+          int32 sd2_id,
+										int32 gr1_id,
+          int32 gr2_id,
+          char *obj1_name,
+          char *obj2_name,
+          int32 tag1,
+          int32 ref1,
+          int32 tag2,
+          int32 ref2,
+          diff_opt_t *opt );
+
+void print_dims( int r, int32 *d );
+
+
+int diff_vs( int32 file1_id,
+             int32 file2_id,
+             int32 ref1,              
+             int32 ref2,
+             diff_opt_t * opt);
+
+
+int diff_gr( int32 file1_id,
+             int32 file2_id,
+													int32 gr1_id,              
+             int32 gr2_id,
+             int32 ref1,              
+             int32 ref2,
+             diff_opt_t * opt);
+
+
+int diff_sds(const char  *fname1, 
+             const char  *fname2, 
+													int32 sd1_id,              
+             int32 sd2_id,
+             int32 ref1,
+             int32 ref2,
+             diff_opt_t *opt);
+
+
+
+#endif
+

Added: packages/libhdf4/branches/upstream/current/mfhdf/hdiff/hdiff_array.c
===================================================================
--- packages/libhdf4/branches/upstream/current/mfhdf/hdiff/hdiff_array.c	                        (rev 0)
+++ packages/libhdf4/branches/upstream/current/mfhdf/hdiff/hdiff_array.c	2007-05-15 09:53:05 UTC (rev 831)
@@ -0,0 +1,716 @@
+
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+#include <ctype.h>
+#include <stdlib.h>
+#include <math.h>
+#include <limits.h>
+#include <float.h>
+#include <assert.h>
+#include "hdf.h"
+#include "mfhdf.h"
+#include "hdiff.h"
+#include "vgint.h"
+
+#define MYMAX(A,B) (((A) > (B)) ? (A) : (B))
+#define MYMIN(A,B) (((A) < (B)) ? (A) : (B))
+#define PRINT_FSTATS(T) {\
+ printf("Type: %s  Npts: %d  Ndiff: %d (%f%%)\n", \
+ T, tot_cnt, n_diff, 100.*(float64)n_diff/(float64)tot_cnt); \
+ printf("Avg Diff: %.3e  Max Diff: %.3e\n",  \
+ d_avg_diff/n_stats, d_max_diff); \
+ printf("Range File1: %f/%f  File2: %f/%f\n", \
+d_min_val1, d_max_val1, d_min_val2, d_max_val2); }
+#define PRINT_ISTATS(T) {\
+ printf("Type: %s  Npts: %d  Ndiff: %d (%f%%)\n", \
+ T, tot_cnt,n_diff, 100.*(float64)n_diff/(float64)tot_cnt); \
+ printf("Avg Diff: %e   Max. Diff: %d\n",  \
+ (d_avg_diff / n_stats), i4_max_diff); \
+ printf("Range File1: %d/%d  File2: %d/%d\n", \
+i4_min_val1, i4_max_val1, i4_min_val2, i4_max_val2); }
+
+
+/*-------------------------------------------------------------------------
+ * printf formatting
+ *-------------------------------------------------------------------------
+ */
+#define SPACES  "          "
+#define FFORMAT "%-15f %-15f %-15f\n"
+#define IFORMAT "%-15d %-15d %-15d\n"
+#define CFORMAT "%-16c %-17c\n"
+#define SFORMAT "%-16s %-17s\n"
+#define UIFORMAT "%-15u %-15u %-15u\n"
+#define LIFORMAT "%-15ld %-15ld %-15ld\n"
+#define ULIFORMAT "%-15lu %-15lu %-15lu\n"
+
+
+/*-------------------------------------------------------------------------
+ * Function: print_pos
+ *
+ * Purpose: convert an array index position to matrix notation
+ *
+ * Return: pos matrix array
+ *
+ * Programmer: Pedro Vicente, pvn at ncsa.uiuc.edu
+ *
+ * Date: May 9, 2003
+ *
+ *-------------------------------------------------------------------------
+ */
+void print_pos( int        *ph, 
+                uint32     curr_pos, 
+                int32      *acc, 
+                int32      *pos, 
+                int        rank, 
+                const char *obj1, 
+                const char *obj2 )
+{
+ int i;
+
+ /* print header */
+ if ( *ph==1 )
+ {
+  *ph=0;
+  printf("%-15s %-15s %-15s %-20s\n", 
+   "position", 
+   (obj1!=NULL) ? obj1 : " ", 
+   (obj2!=NULL) ? obj2 : " ",
+   "difference");
+  printf("------------------------------------------------------------\n");
+ }
+
+ for ( i = 0; i < rank; i++)
+ {
+  pos[i] = curr_pos/acc[i];
+  curr_pos -= acc[i]*pos[i];
+ }
+ assert( curr_pos == 0 );
+
+ printf("[ " );  
+ for ( i = 0; i < rank; i++)
+ {
+  fprintf(stdout,"%d ", pos[i]  );
+ }
+ printf("]" );
+}
+
+/*-------------------------------------------------------------------------
+ * Function: array_diff
+ *
+ * Purpose: memory compare
+ *
+ *-------------------------------------------------------------------------
+ */
+
+int array_diff(void *buf1, 
+               void *buf2, 
+               uint32 tot_cnt, 
+               const char *name1,
+               const char *name2,
+               int rank,
+               int32 *dims,
+               int32 type, 
+               float32 err_limit, 
+               uint32 max_err_cnt, 
+               int32 statistics,
+               void *fill1, 
+               void *fill2)
+
+
+{
+ uint32   i;
+ int8    *i1ptr1, *i1ptr2;
+ int16   *i2ptr1, *i2ptr2;
+ int32   *i4ptr1, *i4ptr2;
+ float32 *fptr1, *fptr2;
+ float64 *dptr1, *dptr2;
+ float64 d_diff, d_avg_diff = 0., d_max_diff = 0.;
+ float64 d_max_val1=0, d_min_val1=0, d_max_val2=0, d_min_val2=0;
+ float64 d_val1, d_val2;
+ float64 d_sumx = 0., d_sumy = 0., d_sumx2 = 0., d_sumy2 = 0., d_sumxy=0.;
+ float64 slope, intercept, correlation;
+ float32 f_diff;
+ int32   i4_diff, i4_max_diff = 0;
+ int32   i4_max_val1=0, i4_min_val1=0, i4_max_val2=0, i4_min_val2=0;
+ int16   i2_diff;
+ int8    c_diff;
+ uint32  n_diff = 0;
+ int     is_fill1, is_fill2;
+ int     n_stats = 0;
+ char    *debug;
+ FILE    *fp=NULL;
+ int32   acc[MAX_VAR_DIMS];   /* accumulator position */
+ int32   pos[MAX_VAR_DIMS];   /* matrix position */
+ int     ph=1;                /* print header  */
+ int     j;
+
+ acc[rank-1]=1;
+ for(j=(rank-2); j>=0; j--)
+ {
+  acc[j]=acc[j+1]*(int)dims[j+1];
+ }
+ for ( j = 0; j < rank; j++)
+  pos[j]=0;
+
+
+ debug = getenv("DEBUG");
+ if (debug) {
+  fp = fopen("hdiff.debug", "w");
+ }
+ 
+ switch(type) {
+ case DFNT_INT8:
+ case DFNT_CHAR8:
+  i4_max_val1 = SCHAR_MIN;
+  i4_min_val1 = SCHAR_MAX;
+  i4_max_val2 = SCHAR_MIN;
+  i4_min_val2 = SCHAR_MAX;
+  break;
+ case DFNT_UINT8:
+ case DFNT_UCHAR8:
+  i4_max_val1 = -UCHAR_MAX -1;
+  i4_min_val1 = UCHAR_MAX;
+  i4_max_val2 = -UCHAR_MAX -1;
+  i4_min_val2 = UCHAR_MAX;
+  break;
+ case DFNT_INT16:
+  i4_max_val1 = SHRT_MIN;
+  i4_min_val1 = SHRT_MAX;
+  i4_max_val2 = SHRT_MIN;
+  i4_min_val2 = SHRT_MAX;
+  break;
+ case DFNT_UINT16:
+  i4_max_val1 = -USHRT_MAX -1;
+  i4_min_val1 = USHRT_MAX;
+  i4_max_val2 = -USHRT_MAX -1;
+  i4_min_val2 = USHRT_MAX;
+  break;
+ case DFNT_INT32:
+  i4_max_val1 = INT_MIN;
+  i4_min_val1 = INT_MAX;
+  i4_max_val2 = INT_MIN;
+  i4_min_val2 = INT_MAX;
+  break;
+ case DFNT_UINT32:
+  i4_max_val1 = INT_MIN;
+  i4_min_val1 = INT_MAX;
+  i4_max_val2 = INT_MIN;
+  i4_min_val2 = INT_MAX;
+  break;
+ case DFNT_FLOAT:
+  d_max_val1 = -FLT_MAX;
+  d_min_val1 = FLT_MAX;
+  d_max_val2 = -FLT_MAX;
+  d_min_val2 = FLT_MAX;
+  break;
+ case DFNT_DOUBLE:
+  d_max_val1 = -DBL_MAX;
+  d_min_val1 = DBL_MAX;
+  d_max_val2 = -DBL_MAX;
+  d_min_val2 = DBL_MAX;
+  break;
+ default:
+  printf(" bad type - %d\n", type);
+ }
+ switch(type)
+ {
+ case DFNT_INT8:
+ case DFNT_UINT8:
+ case DFNT_UCHAR8:
+ case DFNT_CHAR8:
+  i1ptr1 = (int8 *) buf1;
+  i1ptr2 = (int8 *) buf2;
+  for (i=0; i<tot_cnt; i++)
+  {
+   c_diff = (int8)abs(*i1ptr1 - *i1ptr2);
+   is_fill1 = fill1 && (*i1ptr1 == *((int8 *)fill1));
+   is_fill2 = fill2 && (*i1ptr2 == *((int8 *)fill2));
+   if (!is_fill1 && !is_fill2) {
+    d_avg_diff += (float64)c_diff;
+    i4_max_diff = MYMAX(i4_max_diff, c_diff);
+    d_val2 = (float64)(*i1ptr2);
+    d_val1 = (float64)(*i1ptr1);
+    d_sumx += d_val1;
+    d_sumy += d_val2;
+    d_sumx2 += d_val1 * d_val1;
+    d_sumy2 += d_val2 * d_val2;
+    d_sumxy += d_val1 * d_val2;
+    n_stats++;
+   }
+   if (!is_fill1) {
+    i4_max_val1 = MYMAX(i4_max_val1, (int32)(*i1ptr1));
+    i4_min_val1 = MYMIN(i4_min_val1, (int32)(*i1ptr1));
+   }
+   if (!is_fill2) {
+    i4_max_val2 = MYMAX(i4_max_val2, (int32)(*i1ptr2));
+    i4_min_val2 = MYMIN(i4_min_val2, (int32)(*i1ptr2));
+   }
+   if (c_diff > (int32) err_limit)
+   {
+    n_diff++;
+    if (n_diff <= max_err_cnt) {
+     print_pos(&ph,i,acc,pos,rank,name1,name2);
+     printf(SPACES);
+     printf(IFORMAT,*i1ptr1,*i1ptr2,abs(*i1ptr1-*i1ptr2));
+    }
+   }                                               
+   i1ptr1++;  i1ptr2++;
+  }
+  if (statistics) {
+   PRINT_ISTATS("Byte");
+  }
+  
+  break;
+  
+ case DFNT_INT16:
+ case DFNT_UINT16:
+  i2ptr1 = (int16 *) buf1;
+  i2ptr2 = (int16 *) buf2;
+  for (i=0; i<tot_cnt; i++)
+  {
+   i2_diff = (int16)abs(*i2ptr1 - *i2ptr2);
+   is_fill1 = fill1 && (*i2ptr1 == *((int16 *)fill1));
+   is_fill2 = fill2 && (*i2ptr2 == *((int16 *)fill2));
+   if (debug) {
+    fprintf(fp, "%d %d %d %d\n", is_fill1, is_fill2, (int32)(*i2ptr1), (int32)(*i2ptr2));
+   }
+   if (!is_fill1 && !is_fill2) {
+    d_val1 = (float64)(*i2ptr1);
+    d_val2 = (float64)(*i2ptr2);
+    d_sumx += d_val1;
+    d_sumy += d_val2;
+    d_sumx2 += d_val1 * d_val1;
+    d_sumy2 += d_val2 * d_val2;
+    d_sumxy += d_val1 * d_val2;
+    d_avg_diff += (float64)i2_diff;
+    i4_max_diff = MYMAX(i4_max_diff, i2_diff);
+    n_stats++;
+   }
+   if (!is_fill1) {
+    i4_max_val1 = MYMAX(i4_max_val1, (int32)(*i2ptr1));
+    i4_min_val1 = MYMIN(i4_min_val1, (int32)(*i2ptr1));
+   }
+   if (!is_fill2) {
+    i4_max_val2 = MYMAX(i4_max_val2, (int32)(*i2ptr2));
+    i4_min_val2 = MYMIN(i4_min_val2, (int32)(*i2ptr2));
+   }
+   if (i2_diff > (int) err_limit)
+   {
+    n_diff++;
+    if (n_diff <= max_err_cnt) {
+     print_pos(&ph,i,acc,pos,rank,name1,name2);
+     printf(SPACES);
+     printf(IFORMAT,*i2ptr1,*i2ptr2,abs(*i2ptr1-*i2ptr2));
+    }
+   }                                               
+   i2ptr1++;  i2ptr2++;
+  }
+  if (statistics) {
+   PRINT_ISTATS("Integer2");
+  }
+  break;
+  
+ case DFNT_INT32:
+ case DFNT_UINT32:
+  i4ptr1 = (int32 *) buf1;
+  i4ptr2 = (int32 *) buf2;
+  for (i=0; i<tot_cnt; i++)
+  {
+   i4_diff = labs(*i4ptr1 - *i4ptr2);
+   is_fill1 = fill1 && (*i4ptr1 == *((int32 *)fill1));
+   is_fill2 = fill2 && (*i4ptr2 == *((int32 *)fill2));
+   if (!is_fill1 && !is_fill2) {
+    d_avg_diff += (float64)i4_diff;
+    d_val1 = (float64)(*i4ptr1);
+    d_val2 = (float64)(*i4ptr2);
+    d_sumx += d_val1;
+    d_sumy += d_val2;
+    d_sumx2 += d_val1 * d_val1;
+    d_sumy2 += d_val2 * d_val2;
+    d_sumxy += d_val1 * d_val2;
+    i4_max_diff = (int32)MYMAX(i4_max_diff, (float64)(i4_diff));
+    n_stats++;
+   }
+   if (! is_fill1) {
+    i4_max_val1 = MYMAX(i4_max_val1,*i4ptr1);
+    i4_min_val1 = MYMIN(i4_min_val1,*i4ptr1);
+   }
+    if (! is_fill2) {
+    i4_max_val2 = MYMAX(i4_max_val2,*i4ptr2);
+    i4_min_val2 = MYMIN(i4_min_val2,*i4ptr2);
+   }
+   if (i4_diff > (int32) err_limit)
+   {
+    n_diff++;
+    if (n_diff <= max_err_cnt) {
+     print_pos(&ph,i,acc,pos,rank,name1,name2);
+     printf(SPACES);
+     printf(IFORMAT,*i4ptr1,*i4ptr2,abs(*i4ptr1-*i4ptr2));
+    }
+   }                                               
+   i4ptr1++;  i4ptr2++;
+  }
+  if (statistics) {
+   PRINT_ISTATS("Integer4");
+  }
+  
+  break;
+  
+ case DFNT_FLOAT:
+  fptr1 = (float32 *) buf1;
+  fptr2 = (float32 *) buf2;
+  for (i=0; i<tot_cnt; i++)
+  {
+   f_diff = (float32)fabs(*fptr1 - *fptr2);
+   is_fill1 = fill1 && (*fptr1 == *((float32 *)fill1));
+   is_fill2 = fill2 && (*fptr2 == *((float32 *)fill2));
+   if (debug) {
+    fprintf(fp, "%d %d %f %f\n", is_fill1, is_fill2, *fptr1, *fptr2);
+   }
+   if (!is_fill1 && !is_fill2) {
+    d_avg_diff += (float64)f_diff;
+    d_val1 = (float64)(*fptr1);
+    d_val2 = (float64)(*fptr2);
+    d_sumx += d_val1;
+    d_sumy += d_val2;
+    d_sumx2 += d_val1 * d_val1;
+    d_sumy2 += d_val2 * d_val2;
+    d_sumxy += d_val1 * d_val2;
+    d_max_diff = MYMAX(d_max_diff, (float64)(f_diff));
+    n_stats++;
+   }
+   if (!is_fill1) {
+    d_max_val1 = MYMAX(d_max_val1, (float64)(*fptr1));
+    d_min_val1 = MYMIN(d_min_val1, (float64)(*fptr1));
+   }
+   if (!is_fill2) {
+    d_max_val2 = MYMAX(d_max_val2, (float64)(*fptr2));
+    d_min_val2 = MYMIN(d_min_val2, (float64)(*fptr2));
+   }
+   if (f_diff > err_limit)
+   {
+    n_diff++;
+    if (n_diff <= max_err_cnt) {
+     print_pos(&ph,i,acc,pos,rank,name1,name2);
+     printf(SPACES);
+     printf(FFORMAT,*fptr1,*fptr2,fabs(*fptr1-*fptr2));
+    }
+   }                                               
+   fptr1++;  fptr2++;
+  }
+  if (statistics) {
+   PRINT_FSTATS("Float");
+  }
+  break;
+  
+ case DFNT_DOUBLE:
+  dptr1 = (float64 *) buf1;
+  dptr2 = (float64 *) buf2;
+  for (i=0; i<tot_cnt; i++)
+  {
+   d_diff = fabs(*dptr1 - *dptr2);
+   is_fill1 = fill1 && (*dptr1 == *((float64 *)fill1));
+   is_fill2 = fill2 && (*dptr2 == *((float64 *)fill2));
+   if (!is_fill1 && !is_fill2) {
+    d_avg_diff += d_diff;
+    d_val1 = (float64)(*dptr1);
+    d_val2 = (float64)(*dptr2);
+    d_sumx += d_val1;
+    d_sumy += d_val2;
+    d_sumx2 += d_val1 * d_val1;
+    d_sumy2 += d_val2 * d_val2;
+    d_sumxy += d_val1 * d_val2;
+    d_max_diff = MYMAX(d_max_diff, (d_diff));
+    n_stats++;
+   }
+   if (! is_fill1) {
+    d_max_val1 = MYMAX(d_max_val1, (*dptr1));
+    d_min_val1 = MYMIN(d_min_val1, (*dptr1));
+   }
+   if (! is_fill2) {
+    d_max_val2 = MYMAX(d_max_val2, (*dptr2));
+    d_min_val2 = MYMIN(d_min_val2, (*dptr2));
+   }
+   if (d_diff > (float64) err_limit)
+   {
+    n_diff++;
+    if (n_diff <= max_err_cnt) {
+     print_pos(&ph,i,acc,pos,rank,name1,name2);
+     printf(SPACES);
+     printf(FFORMAT,*dptr1,*dptr2,fabs(*dptr1-*dptr2));
+    }
+   }
+   dptr1++;  dptr2++;
+  }
+  if (statistics) {
+   PRINT_FSTATS("Double");
+  }
+  break;
+  
+ default:
+  printf(" bad type - %d\n", type);
+  }
+  if (statistics) {
+   float64 sqrt_arg;
+   if ((float64)n_stats * d_sumx2 - d_sumx * d_sumx != 0.0) {
+    slope = ((float64)n_stats * d_sumxy - d_sumx * d_sumy) / 
+     ((float64)n_stats * d_sumx2 - d_sumx * d_sumx);
+    intercept = (d_sumy - slope * d_sumx) / (float64)n_stats;
+    sqrt_arg = ((float64)n_stats*d_sumx2 - d_sumx*d_sumx) /
+     ((float64)n_stats * d_sumy2 - d_sumy * d_sumy);
+    correlation = slope * sqrt(sqrt_arg);
+    printf("Regression  N: %d  Slope: %e  Intercept: %e  R: %e\n",
+     n_stats, slope, intercept, correlation);
+   }
+   else {
+    printf("Regression  Slope: NaN  Intercept: NaN  R: NaN\n");
+   }
+  }
+  if (debug) {
+   fclose(fp);
+  }
+  return (n_diff>0 ? 1 : 0 );
+}
+
+
+/*-------------------------------------------------------------------------
+ * Function: vdata_cmp
+ *
+ * Purpose: memory compare
+ *
+ *-------------------------------------------------------------------------
+ */
+
+
+void
+fmt_print(uint8 *x, int32 type)
+{
+ int16    s = 0;
+ int32    l = 0;
+ float32  f = 0;
+ float64  d = 0;
+ 
+ switch(type) 
+ {
+ case DFNT_CHAR:
+  putchar(*x);
+  break;
+  
+ case DFNT_UINT8:
+ case DFNT_INT8:
+  printf("%02x ", *x);
+  break;
+  
+ case DFNT_UINT16:
+ case DFNT_INT16:
+  HDmemcpy(&s, x, sizeof(int16));
+  printf("%d", s);
+  break;
+  
+ case DFNT_UINT32:
+ case DFNT_INT32:
+  HDmemcpy(&l, x, sizeof(int32));
+  printf("%d", l);
+  break;
+  
+ case DFNT_FLOAT32:
+  HDmemcpy(&f, x, sizeof(float32));
+  printf("%f", f);
+  break;
+  
+ case DFNT_FLOAT64:
+  HDmemcpy(&d, x, sizeof(float64));
+  printf("%f", f);
+  break;
+  
+ default: 
+  fprintf(stderr,"sorry, type [%d] not supported\n", type); 
+  break;
+  
+ }
+}
+
+
+int
+vdata_cmp(int32  vs1, int32  vs2, 
+          char   *gname, 
+          char   *cname, 
+          uint32  max_err_cnt)
+{
+ int32   i, j, k, iflag;
+ uint32  err_cnt;
+ int32   nv1, interlace1, vsize1;
+ int32   vsotag1;
+ char    fields1[VSFIELDMAX*FIELDNAMELENMAX];
+ char    vsclass1[VSNAMELENMAX], vsname1[VSNAMELENMAX];
+ int32   nv2, interlace2, vsize2;
+ int32   vsotag2;
+ char    fields2[VSFIELDMAX*FIELDNAMELENMAX];
+ char    vsclass2[VSNAMELENMAX], vsname2[VSNAMELENMAX];
+ uint8   *buf1, *buf2, *b1, *b2;
+ int32   off1[60], off2[60];
+ int     ret=0;
+ DYN_VWRITELIST *w1, *w2;
+ 
+ VSinquire(vs1, &nv1, &interlace1, fields1, &vsize1, vsname1);
+ VSinquire(vs2, &nv2, &interlace2, fields2, &vsize2, vsname2);
+ 
+ vsotag1 = VSQuerytag(vs1);
+ VSgetclass(vs1,vsclass1);
+ 
+ vsotag2 = VSQuerytag(vs2);
+ VSgetclass(vs2,vsclass2);
+ 
+ if (vsotag1 != vsotag2 || nv1 != nv2 || interlace1 != interlace2 ||
+  strcmp(fields1, fields2) != 0 || strcmp(vsclass1, vsclass2) != 0 ||
+  (strcmp(vsclass1, "Attr0.0") != 0 && vsize1 != vsize2))
+ {
+  printf("\n---------------------------\n");
+  printf("Vdata Name: %s <%s/%s> (Different attributes)\n",
+   vsname1, gname, cname);
+  printf("> <%d> nrec=%d interlace=%d fld=[%s] vsize=%d class={%s})\n",
+   vsotag1, nv1, interlace1, fields1, vsize1, vsclass1);
+  printf("< <%d> nrec=%d interlace=%d fld=[%s] vsize=%d class={%s})\n",
+   vsotag2, nv2, interlace2, fields2, vsize2, vsclass2);
+  return 1;
+ }
+ 
+ 
+ /* compare the data */
+ 
+ buf1 = (uint8 *) malloc((unsigned) (nv1 * vsize1));
+ buf2 = (uint8 *) malloc((unsigned) (nv2 * vsize2));
+ if (!buf1 || !buf2) 
+ {
+  printf("Out of memory!");
+  exit(0);
+ }
+ 
+ VSsetfields(vs1, fields1);
+ VSread(vs1, buf1, nv1, interlace1);
+ w1 = (DYN_VWRITELIST*) vswritelist(vs1);
+ 
+ VSsetfields(vs2, fields2);
+ VSread(vs2, buf2, nv2, interlace2);
+ w2 = (DYN_VWRITELIST*) vswritelist(vs2);
+ 
+ b1 = buf1;
+ b2 = buf2;
+ 
+ for (j=0; j < w1->n; j++)
+  off1[j] = DFKNTsize(w1->type[j] | DFNT_NATIVE);
+ 
+ for (j=0; j < w2->n; j++)
+  off2[j] = DFKNTsize(w2->type[j] | DFNT_NATIVE);
+ 
+ iflag = 0;
+ 
+ err_cnt = 0;
+ 
+ if (vsize1 == vsize2)
+ {
+  for (i=0; i<nv1; i++)
+  {
+   if (memcmp(b1, b2, (size_t)vsize1) == 0)
+   {
+    b1 += vsize1;   
+    b2 += vsize2;
+    continue;
+   }
+   if (iflag == 0)
+   {
+    iflag = 1;         /* there is a difference */
+    printf("\n---------------------------\n");
+    printf("Vdata Name: %s (Data record comparison)\n", 
+     vsname1);
+    ret=1;
+   }
+   
+   printf("> %d: ", i);
+   for (j=0; j<w1->n; j++)
+   {
+    for (k=0; k<w1->order[j]; k++)
+    {
+     fmt_print(b1, w1->type[j]);
+     b1 += off1[j];
+     if (w1->type[j] != DFNT_CHAR)
+      putchar(' ');
+    }
+   }        
+   putchar('\n');
+   printf("< %d: ", i);
+   for (j=0; j<w2->n; j++)
+   {
+    for (k=0; k<w2->order[j]; k++)
+    {
+     fmt_print(b2, w2->type[j]);
+     b2 += off2[j];
+     if (w2->type[j] != DFNT_CHAR)
+      putchar(' ');
+    }
+   }        
+   putchar('\n');
+   
+   if (max_err_cnt > 0)
+   {
+    err_cnt++;
+    if (err_cnt >= max_err_cnt)
+     break;
+   }
+  }
+ }
+ else
+ {
+  printf("****....\n");
+  for (i=0; i<nv1; i++)
+  {
+   if (iflag == 0)
+   {
+    iflag = 1;         /* there is a difference */
+    printf("\n---------------------------\n");
+    printf("Vdata Name: %s (Data record comparison)\n", 
+     vsname1);
+    ret=1;
+   }
+   printf("> %d: ", i);
+   for (j=0; j<w1->n; j++)
+   {
+    for (k=0; k<w1->order[j]; k++)
+    {
+     fmt_print(b1, w1->type[j]);
+     b1 += off1[j];
+     if (w1->type[j] != DFNT_CHAR)
+      putchar(' ');
+    }
+   }  
+   putchar('\n');
+   printf("< %d: ", i);
+   for (j=0; j<w2->n; j++)
+   {
+    for (k=0; k<w2->order[j]; k++)
+    {
+     fmt_print(b2, w2->type[j]);
+     b1 += off2[j];
+     if (w2->type[j] != DFNT_CHAR)
+      putchar(' ');
+    }
+   }  
+   putchar('\n');
+   
+   if (max_err_cnt > 0)
+   {
+    err_cnt++;
+    if (err_cnt >= max_err_cnt)
+     break;
+   }
+  }
+  
+ }
+ 
+ if (buf1)free((char *) buf1);
+ if (buf2)free((char *) buf2);
+
+ return ret;
+}
+

Added: packages/libhdf4/branches/upstream/current/mfhdf/hdiff/hdiff_gattr.c
===================================================================
--- packages/libhdf4/branches/upstream/current/mfhdf/hdiff/hdiff_gattr.c	                        (rev 0)
+++ packages/libhdf4/branches/upstream/current/mfhdf/hdiff/hdiff_gattr.c	2007-05-15 09:53:05 UTC (rev 831)
@@ -0,0 +1,105 @@
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+#include <ctype.h>
+#include <stdlib.h>
+
+
+
+#include "hdf.h"
+#include "mfhdf.h"
+#include "vg.h"
+
+#include "hdiff.h"
+
+
+int
+gattr_diff(int32 sdid1, 
+           int32 sdid2, 
+           diff_opt_t *opt)
+{
+ int32   nvars1, nvars2;      /* number of variables */
+ int32   ngatts1, ngatts2;    /* number of global attributes */
+ struct  ncatt att1, att2;    /* attribute */
+ int     ia, ib;              /* attribute number */
+ int     iret2, ret=0;
+
+ SDfileinfo(sdid1, &nvars1, &ngatts1);
+ 
+ /* get global attributes */
+ 
+ for (ia = 0; ia < ngatts1; ia++) 
+ {
+  SDattrinfo(sdid1, ia, att1.name, &att1.type, &att1.len);
+  ib = SDfindattr(sdid2, att1.name);
+  if (ib == -1)     /* attribute doesn't exist in file2 */
+  {
+   printf("\n---------------------------\n");
+   printf("< %s\n", att1.name);
+   printf("> '%s' does not exist in file2\n", att1.name);
+   ret=1;
+   continue;
+  }
+  iret2 = SDattrinfo(sdid2, ib, att2.name, &att2.type, &att2.len);
+  att1.val = (void *) malloc((unsigned) (att1.len*DFKNTsize(att1.type | DFNT_NATIVE)));
+  if (!att1.val) 
+  {
+   fprintf(stderr,"Out of memory!\n");
+   SDend(sdid1);
+   SDend(sdid2);
+   exit(0);
+  }
+  att2.val = (void *) malloc((unsigned) (att2.len*DFKNTsize(att2.type | DFNT_NATIVE)));
+  if (!att2.val) 
+  {
+   fprintf(stderr,"Out of memory!\n");
+   SDend(sdid1);
+   SDend(sdid2);
+   exit(0);
+  }
+  SDreadattr(sdid1, ia, att1.val);
+  iret2 = SDreadattr(sdid2, ib, att2.val);
+  
+  iret2 = 0;
+  if (att1.type != att2.type || att1.len != att2.len) 
+   iret2 = 1;
+  if (iret2 == 0)       /* compare the data */
+   iret2 = memcmp((void *) att1.val, att2.val, 
+   att1.len*DFKNTsize(att1.type | DFNT_NATIVE));
+  
+  if (iret2 != 0)
+  {
+   printf("\n---------------------------\n");
+   printf("Attr Name: %s\n", att1.name);
+   printf("< ");
+   pr_att_vals((nc_type)att1.type, att1.len, att1.val);
+   printf("\n> ");
+   pr_att_vals((nc_type)att2.type, att2.len, att2.val);
+   printf("\n");
+   ret=1;
+  }
+  
+  free ((char *) att1.val);
+  free ((char *) att2.val);
+ }
+ 
+ /* check any global attributes in file2 but not in file1 */
+ 
+ iret2 =  SDfileinfo(sdid2, &nvars2, &ngatts2);
+ 
+ for (ib = 0; ib < ngatts2; ib++) 
+ {
+  iret2 = SDattrinfo(sdid2, ib, att2.name, &att2.type, &att2.len);
+  ia = SDfindattr(sdid1, att2.name);
+  if (ia == -1)     /* attribute doesn't exist in file2 */
+  {
+   printf("\n---------------------------\n");
+   printf("< '%s' does not exist in file1\n", att2.name);
+   printf("> %s\n", att2.name);
+   ret=1;
+  }
+ }
+ 
+ return ret;
+}
+

Added: packages/libhdf4/branches/upstream/current/mfhdf/hdiff/hdiff_gr.c
===================================================================
--- packages/libhdf4/branches/upstream/current/mfhdf/hdiff/hdiff_gr.c	                        (rev 0)
+++ packages/libhdf4/branches/upstream/current/mfhdf/hdiff/hdiff_gr.c	2007-05-15 09:53:05 UTC (rev 831)
@@ -0,0 +1,288 @@
+/****************************************************************************
+ * NCSA HDF                                                                 *
+ * Software Development Group                                               *
+ * National Center for Supercomputing Applications                          *
+ * University of Illinois at Urbana-Champaign                               *
+ * 605 E. Springfield, Champaign IL 61820                                   *
+ *                                                                          *
+ * For conditions of distribution and use, see the accompanying             *
+ * hdf/COPYING file.                                                        *
+ *                                                                          *
+ ****************************************************************************/
+
+
+#include "hdiff.h"
+#include "hdiff_list.h"
+#include "hdiff_mattbl.h"
+
+
+/*-------------------------------------------------------------------------
+ * Function: diff_gr
+ *
+ * Purpose: diff for GR
+ *
+ * Return: Number of differences found
+ *
+ * Programmer: Pedro Vicente, pvn at ncsa.uiuc.edu
+ *
+ * Date: August 27, 2003
+ *
+ *-------------------------------------------------------------------------
+ */
+
+int diff_gr( int32 file1_id,
+             int32 file2_id,
+             int32 gr1_id,              
+             int32 gr2_id,
+             int32 ref1,              
+             int32 ref2,
+             diff_opt_t *opt)  
+{
+ int32 ri1_id,                 /* data set identifier */
+       ri1_index,              /* index number of the data set */
+       dtype1,                 /* GR data type */
+       dimsizes1[MAX_VAR_DIMS],/* dimensional size */
+       nattrs1,                /* number of attributes */
+       ncomps1,                /* number of components */
+       interlace_mode1,        /* interlace mode of an image */ 
+       ri2_id,                 /* data set identifier */
+       ri2_index,              /* index number of the data set */
+       dtype2,                 /* GR data type */
+       dimsizes2[MAX_VAR_DIMS],/* dimensional size */
+       nattrs2,                /* number of attributes */
+       ncomps2,                /* number of components */
+       interlace_mode2,        /* interlace mode of an image */ 
+       start[MAX_VAR_DIMS],    /* read start */
+       edges[MAX_VAR_DIMS],    /* read edges */
+       numtype,                /* number type */
+       eltsz,                  /* element size */
+       nelms,                  /* number of elements */
+       data_size;
+ char  gr1_name[MAX_NC_NAME]; 
+ char  gr2_name[MAX_NC_NAME]; 
+ int   nfound=0;
+ int   dim_diff=0;             /* dimensions are different */
+ VOIDP buf1=NULL;
+ VOIDP buf2=NULL;
+ uint32 max_err_cnt;
+ int   i, cmp;
+
+
+/*-------------------------------------------------------------------------
+ * object 1
+ *-------------------------------------------------------------------------
+ */
+ 
+ ri1_index = GRreftoindex(gr1_id,(uint16)ref1);
+ ri1_id    = GRselect(gr1_id,ri1_index);
+   
+ /*obtain name,rank,dimsizes,datatype and num of attributes of gr */
+ if (GRgetiminfo(ri1_id,gr1_name,&ncomps1,&dtype1,&interlace_mode1,dimsizes1,&nattrs1)==FAIL) {
+   printf( "Failed to get info for SDS ref <%d>\n",ref1);
+   GRendaccess(ri1_id);
+   return FAIL;
+  }
+
+
+/*-------------------------------------------------------------------------
+ * object 2
+ *-------------------------------------------------------------------------
+ */
+ 
+ ri2_index = GRreftoindex(gr2_id,(uint16)ref2);
+ ri2_id    = GRselect(gr2_id,ri2_index);
+   
+ /*obtain name,rank,dimsizes,datatype and num of attributes of gr */
+ if (GRgetiminfo(ri2_id,gr2_name,&ncomps2,&dtype2,&interlace_mode2,dimsizes2,&nattrs2)==FAIL) {
+   printf( "Failed to get info for SDS ref <%d>\n",ref2);
+   GRendaccess(ri2_id);
+   return FAIL;
+  }
+
+
+/*-------------------------------------------------------------------------
+ * check for different type
+ *-------------------------------------------------------------------------
+ */
+ 
+ if (dtype1 != dtype2) 
+ {
+  printf("Comparison not supported\n");
+  printf("<%s> has datatype %d, <%s> has datatype %d ",gr1_name,dtype1,gr2_name,dtype2);
+  goto out;
+ }
+
+/*-------------------------------------------------------------------------
+ * check for the same rank
+ *-------------------------------------------------------------------------
+ */
+ 
+ if ( ncomps1 != ncomps2 )
+ {
+  printf("Comparison not supported\n");
+  printf("<%s> has %d components\n", gr1_name, ncomps1);
+  printf("\n" );
+  printf("<%s> has %d components\n", gr2_name, ncomps2);
+  goto out;
+ }
+
+/*-------------------------------------------------------------------------
+ * check for different dimensions
+ *-------------------------------------------------------------------------
+ */
+ 
+ for ( i=0; i<2; i++) 
+ {
+  if ( dimsizes1[i] != dimsizes2[i] )
+   dim_diff=1;
+ }
+
+/*-------------------------------------------------------------------------
+ * dimensions
+ *-------------------------------------------------------------------------
+ */
+
+ if (dim_diff==1)
+ {
+  printf("Comparison not supported\n");
+  printf("<%s> has dimensions ", gr1_name);
+  print_dims(2,dimsizes1);
+  printf("\n" );
+  printf("<%s> has dimensions ", gr2_name);
+  print_dims(2,dimsizes2);
+  goto out;
+ }
+
+/*-------------------------------------------------------------------------
+ * match interlace 
+ * NOTE: GR images are always stored as pixel_interlace (0) on disk
+ *       that does not happen with images saved with the 
+ *       DF24 - Single-file 24-Bit Raster Image Interface,
+ *       where the interlace mode on disk can be 0, 1 or 2
+ *-------------------------------------------------------------------------
+ */
+ if ( interlace_mode1 != interlace_mode2 )
+ {
+  if (opt->verbose)
+  printf("Warning: different interlace mode: <%d> and <%d>\n", 
+   interlace_mode1,interlace_mode2);
+  interlace_mode1=interlace_mode2;
+ }
+
+
+/*-------------------------------------------------------------------------
+ * get size 
+ *-------------------------------------------------------------------------
+ */
+
+ /* compute the number of the bytes for each value. */
+ numtype = dtype1 & DFNT_MASK;
+ eltsz = DFKNTsize(numtype | DFNT_NATIVE);
+
+ /* set edges of SDS */
+ nelms=1;
+ for (i = 0; i < 2; i++) {
+  nelms   *= dimsizes1[i];
+  edges[i] = dimsizes1[i];
+  start[i] = 0;
+ }
+
+ data_size = dimsizes1[0]*dimsizes1[1]*ncomps1*eltsz;
+
+/*-------------------------------------------------------------------------
+ * Read image 1
+ *-------------------------------------------------------------------------
+ */
+ 
+ /* alloc */
+ if ((buf1 = (VOIDP) HDmalloc(data_size)) == NULL) {
+  printf( "Failed to allocate %d elements of size %d\n", nelms, eltsz);
+  goto out;
+ }
+ 
+ /* set the interlace for reading  */
+ if ( GRreqimageil(ri1_id, interlace_mode1) == FAIL ){
+  printf( "Could not set interlace for GR <%s>\n", gr1_name);
+  goto out;
+ }
+ 
+ /* read data */
+ if (GRreadimage (ri1_id, start, NULL, edges, buf1) == FAIL) {
+  printf( "Could not read GR <%s>\n", gr1_name);
+  goto out;
+ }
+
+/*-------------------------------------------------------------------------
+ * Read image 2
+ *-------------------------------------------------------------------------
+ */
+
+ /* alloc */
+ if ((buf2 = (VOIDP) HDmalloc(data_size)) == NULL) {
+  printf( "Failed to allocate %d elements of size %d\n", nelms, eltsz);
+  goto out;
+ }
+ 
+ /* set the interlace for reading  */
+ if ( GRreqimageil(ri2_id, interlace_mode2) == FAIL ){
+  printf( "Could not set interlace for GR <%s>\n", gr2_name);
+  goto out;
+ }
+ 
+ /* read data */
+ if (GRreadimage (ri2_id, start, NULL, edges, buf2) == FAIL) {
+  printf( "Could not read GR <%s>\n", gr2_name);
+  goto out;
+ }
+
+
+/*-------------------------------------------------------------------------
+ * Comparing
+ *-------------------------------------------------------------------------
+ */
+ 
+
+ if (opt->verbose)
+ printf("Comparing <%s>\n",gr1_name); 
+
+ cmp = HDmemcmp(buf1,buf2,data_size);
+ if (cmp!=0)
+ {
+  
+ /* 
+  If max_err_cnt is set (i.e. not its default -1), use it otherwise set it
+  to tot_err_cnt so it doesn't trip  
+  */
+  max_err_cnt = (opt->max_err_cnt >= 0) ? opt->max_err_cnt : nelms;
+  nfound=array_diff(
+   buf1, 
+   buf2, 
+   nelms, 
+   gr1_name,
+   gr2_name,
+   2,
+   dimsizes1,
+   dtype1, 
+   opt->err_limit, 
+   max_err_cnt, 
+   opt->statistics, 
+   0, 
+   0);
+ }
+  
+/*-------------------------------------------------------------------------
+ * close
+ *-------------------------------------------------------------------------
+ */
+
+out:
+ if (GRendaccess(ri1_id)<0)
+  printf("GRendaccess returned -1");
+ if (GRendaccess(ri2_id)<0)
+  printf("GRendaccess returned -1");
+ if (buf1) free(buf1);
+ if (buf2) free(buf2);
+
+ return nfound;
+}
+

Added: packages/libhdf4/branches/upstream/current/mfhdf/hdiff/hdiff_list.c
===================================================================
--- packages/libhdf4/branches/upstream/current/mfhdf/hdiff/hdiff_list.c	                        (rev 0)
+++ packages/libhdf4/branches/upstream/current/mfhdf/hdiff/hdiff_list.c	2007-05-15 09:53:05 UTC (rev 831)
@@ -0,0 +1,1415 @@
+/****************************************************************************
+ * NCSA HDF                                                                 *
+ * Software Development Group                                               *
+ * National Center for Supercomputing Applications                          *
+ * University of Illinois at Urbana-Champaign                               *
+ * 605 E. Springfield, Champaign IL 61820                                   *
+ *                                                                          *
+ * For conditions of distribution and use, see the accompanying             *
+ * hdf/COPYING file.                                                        *
+ *                                                                          *
+ ****************************************************************************/
+
+#include <assert.h>
+
+
+#include "hdf.h"
+#include "mfhdf.h"
+#include "hdiff_list.h"
+
+static
+int is_reserved(char*vgroup_class);
+static
+char *get_path(char*path_name, char*obj_name);
+static 
+int insert_an_data(int32 file_id,
+                   int32 ref_in, 
+                   int32 tag_in,
+                   ann_type type, 
+                   char *path);
+
+
+
+
+/*-------------------------------------------------------------------------
+ * Function: Hgetlist
+ *
+ * Purpose: locate all HDF objects in the file and return a list of them
+ *
+ * Return: number of objects in the file, ok, -1 not ok
+ *
+ * Programmer: Pedro Vicente, pvn at ncsa.uiuc.edu
+ *
+ * Date: August 21, 2003
+ *
+ * Description:
+ *
+ * A main loop is used to locate all the objects in the file. This loop preserves the 
+ * hierarchy of the file. The algorithm used is 
+ * 1) Obtain the number of lone VGroups in the HDF file. 
+ * 2) Do a loop for each one of these groups. In each iteration a table is updated 
+ *    with the tag/reference pair of an object. 
+ *    2.1) Obtain the pairs of tag/references for the group 
+ *    2.2) Switch between the tag of the current object. Four cases are possible: 
+ *         1) Object is a group: recursively repeat the process (obtain the pairs of
+ *            tag/references for this group and do another tag switch). 
+ *            Add the object to the table. 
+ *         2) Object is a dataset: Add the object to the table.
+ *         3) Object is an image: Add the object to the table.  
+ *         4) Object is a vdata: Add the object to the table. 
+ * 3) Read all the HDF interfaces (SDS, GR and VS), checking for objects that are 
+ *    already in the table (meaning they belong to a previous inspected group, 
+ *    and should not be added).  These objects belong to a root group. 
+ * 4) Read all global attributes and annotations. 
+ *
+ *-------------------------------------------------------------------------
+ */
+
+
+int Hgetlist (const char* fname, dtable_t *table)
+{
+ int32    file_id, 
+          sd_id, 
+          gr_id;
+ int      n_objs=0;
+
+ /* open the file for read */
+ if ((file_id  = Hopen (fname,DFACC_READ,(int16)0))==FAIL)
+ {
+  printf("Cannot open file <%s>\n",fname);
+  return FAIL;
+ }
+
+ /* initialize the SD interface */
+ if ((sd_id  = SDstart (fname, DFACC_READ))==FAIL){
+  printf( "Could not start SD for <%s>\n",fname);
+  return FAIL;
+ }
+
+ /* initialize the GR interface */
+ if ((gr_id  = GRstart (file_id))==FAIL){
+  printf( "Could not start GR for <%s>\n",fname);
+  return FAIL;
+ }
+
+ /* iterate tru HDF interfaces */
+ hdiff_list_vg (fname,file_id,sd_id,gr_id,table);
+ hdiff_list_gr (fname,file_id,gr_id,table);
+ hdiff_list_sds(fname,file_id,sd_id,table);
+ hdiff_list_vs (fname,file_id,table);
+ hdiff_list_glb(fname,file_id,sd_id,gr_id,table);
+ hdiff_list_an (fname,file_id,table);
+
+ /* close */
+ if (GRend (gr_id)==FAIL) {
+  printf( "Failed to close GR interface <%s>\n", fname);
+  return FAIL;
+ }
+ if (SDend (sd_id)==FAIL) {
+  printf( "Failed to close SD interface <%s>\n", fname);
+  return FAIL;
+ }
+ if (Hclose (file_id) == FAIL ) {
+  printf( "Failed to close file <%s>\n", fname);
+  return FAIL;
+ }
+ 
+ n_objs=table->nobjs;
+ return n_objs;
+}
+
+
+
+/*-------------------------------------------------------------------------
+ * Function: hdiff_list_vg
+ *
+ * Purpose: locate all lone Vgroups in the file
+ *
+ * Return: void
+ *
+ *-------------------------------------------------------------------------
+ */
+
+
+int hdiff_list_vg(const char* fname,
+                  int32 file_id,
+                  int32 sd_id,             /* SD interface identifier */
+                  int32 gr_id,             /* GR interface identifier */
+                  dtable_t *table)
+{
+ int32 vgroup_id,      /* vgroup identifier */
+       nlones = 0,     /* number of lone vgroups */
+       ntagrefs,       /* number of tag/ref pairs in a vgroup */
+       *ref_array=NULL,/* buffer to hold the ref numbers of lone vgroups   */
+       *tags,          /* buffer to hold the tag numbers of vgroups   */
+       *refs,          /* buffer to hold the ref numbers of vgroups   */
+       tag_vg,
+       ref_vg;
+ char  vgroup_name[VGNAMELENMAX], vgroup_class[VGNAMELENMAX];
+ int   i;
+
+ /* initialize the V interface */
+ if (Vstart (file_id)==FAIL) {
+  printf("Error: Could not start group interface in <%s>\n", fname);
+  return FAIL;
+ }
+
+/*
+ * get the names and class names of all the lone vgroups.
+ * first, call Vlone with nlones set to 0 to get the number of
+ * lone vgroups in the file, but not to get their reference numbers.
+ */
+ nlones = Vlone (file_id, NULL, nlones );
+
+ if (nlones > 0)
+ {
+ /*
+  * use the nlones returned to allocate sufficient space for the
+  * buffer ref_array to hold the reference numbers of all lone vgroups,
+  */
+  ref_array = (int32 *) malloc(sizeof(int32) * nlones);
+  
+ /*
+  * and call Vlone again to retrieve the reference numbers into 
+  * the buffer ref_array.
+  */
+  nlones = Vlone (file_id, ref_array, nlones);
+  
+ /*
+  * iterate tru each lone vgroup.
+  */
+  for (i = 0; i < nlones; i++)
+  {
+  /*
+   * attach to the current vgroup then get its
+   * name and class. note: the current vgroup must be detached before
+   * moving to the next.
+   */
+   if ((vgroup_id = Vattach (file_id, ref_array[i], "r"))==FAIL){
+    printf("Error: Could not attach group with ref <%d>\n", ref_array[i]);
+   }
+   if (Vgetname (vgroup_id, vgroup_name)==FAIL){
+    printf("Error: Could not get name for group with ref <%d>\n", ref_array[i]);
+   }
+   if (Vgetclass (vgroup_id, vgroup_class)==FAIL){
+    printf("Error: Could not get class for group with ref <%d>\n", ref_array[i]);
+   }
+   
+   /* ignore reserved HDF groups/vdatas */
+   if( is_reserved(vgroup_class)){
+    if (Vdetach (vgroup_id)==FAIL){
+     printf("Error: Could not detach group <%s>\n", vgroup_class);
+    }
+    continue;
+   }
+   if(vgroup_name != NULL) 
+    if(strcmp(vgroup_name,GR_NAME)==0) {
+     if (Vdetach (vgroup_id)==FAIL){
+      printf("Error: Could not detach group <%s>\n", vgroup_class);
+     }
+     continue;
+    }
+
+    if ((ref_vg = VQueryref(vgroup_id))==FAIL){
+     printf( "Failed to get ref for <%s>\n", vgroup_name);
+    }
+    if ((tag_vg = VQuerytag(vgroup_id))==FAIL){
+     printf( "Failed to get tag for <%s>\n", vgroup_name);
+    }
+
+     /* add object to table */
+    dtable_add(table,tag_vg,ref_vg,vgroup_name);
+
+#if defined (HDIFF_DEBUG)
+    printf("%s\n",vgroup_name); 
+#endif
+  
+    insert_vg_attrs(vgroup_id,vgroup_name);
+    insert_vg_an(file_id,vgroup_id,vgroup_name);
+
+   /* insert objects for this group */
+    ntagrefs = Vntagrefs(vgroup_id);
+    if ( ntagrefs > 0 )
+    {
+     tags = (int32 *) malloc(sizeof(int32) * ntagrefs);
+     refs = (int32 *) malloc(sizeof(int32) * ntagrefs);
+     Vgettagrefs(vgroup_id, tags, refs, ntagrefs);
+     
+     insert_vg(fname,file_id,sd_id,gr_id,vgroup_name,tags,refs,ntagrefs,table);
+     
+     if (tags ) free (tags);
+     if (refs) free (refs);
+    }
+    
+    if(Vdetach (vgroup_id)==FAIL){
+     printf("Error: Could not detach group <%s>\n", vgroup_name);
+    }
+  
+  } /* for */
+  
+  
+  /* free the space allocated */
+  if (ref_array) 
+   free (ref_array);
+ } /* if */
+ 
+
+ /* terminate access to the V interface */
+ if (Vend (file_id)==FAIL) {
+  printf("Error: Could not end group interface in <%s>\n", vgroup_name);
+ }
+ 
+ return 0;
+}
+
+/*-------------------------------------------------------------------------
+ * Function: insert_vg
+ *
+ * Purpose: recursive function to locate objects in lone Vgroups
+ *
+ * Return: void
+ *
+ *-------------------------------------------------------------------------
+ */
+
+int insert_vg(const char* fname,
+              int32 file_id,
+              int32 sd_id,             /* SD interface identifier */
+              int32 gr_id,             /* GR interface identifier */
+              char*path_name,          /* absolute path for input group name */          
+              int32* in_tags,          /* tag list for parent group */
+              int32* in_refs,          /* ref list for parent group */
+              int npairs,              /* number tag/ref pairs for parent group */
+              dtable_t *table)
+{
+ int32 vgroup_id,             /* vgroup identifier */
+       ntagrefs,              /* number of tag/ref pairs in a vgroup */
+       tag,                   /* temporary tag */
+       ref,                   /* temporary ref */
+       *tags,                 /* buffer to hold the tag numbers of vgroups   */
+       *refs;                 /* buffer to hold the ref numbers of vgroups   */
+ char  vgroup_name[VGNAMELENMAX], vgroup_class[VGNAMELENMAX];
+ char  *path=NULL;
+ int   i;
+ 
+ for ( i = 0; i < npairs; i++ ) 
+ {
+  tag = in_tags[i];
+  ref = in_refs[i];
+  
+  switch(tag) 
+  {
+/*-------------------------------------------------------------------------
+ * VG
+ *-------------------------------------------------------------------------
+ */
+  case DFTAG_VG: 
+   
+   vgroup_id = Vattach (file_id, ref, "r");
+   Vgetname (vgroup_id, vgroup_name);
+   Vgetclass (vgroup_id, vgroup_class);
+   
+   /* ignore reserved HDF groups/vdatas */
+   if( is_reserved(vgroup_class)){
+    Vdetach (vgroup_id);
+    break;
+   }
+   if(vgroup_name != NULL) 
+    if(strcmp(vgroup_name,GR_NAME)==0) {
+     Vdetach (vgroup_id);
+     break;
+    }
+
+   /* initialize path */
+   path=get_path(path_name,vgroup_name);
+
+   /* add object to table */
+   dtable_add(table,tag,ref,path);
+
+#if defined (HDIFF_DEBUG)
+   printf("%s\n",path); 
+#endif
+  
+   insert_vg_attrs(vgroup_id,path);
+   insert_vg_an(file_id,vgroup_id,path);
+  
+   /* get objects for this group */
+   ntagrefs  = Vntagrefs(vgroup_id);
+   if ( ntagrefs > 0 )
+   {
+    tags = (int32 *) malloc(sizeof(int32) * ntagrefs);
+    refs = (int32 *) malloc(sizeof(int32) * ntagrefs);
+    Vgettagrefs(vgroup_id, tags, refs, ntagrefs);
+    /* recurse */
+    insert_vg(fname,file_id,sd_id,gr_id,path,tags,refs,ntagrefs,table);
+    free (tags);
+    free (refs);
+   }
+   if(Vdetach (vgroup_id)==FAIL){
+    printf("Error: Could not detach group <%s>\n", vgroup_name);
+   }
+   if (path)
+    free(path);
+
+   break;
+   
+
+/*-------------------------------------------------------------------------
+ * SDS
+ *-------------------------------------------------------------------------
+ */   
+   
+  case DFTAG_SD:  /* Scientific Data */
+  case DFTAG_SDG: /* Scientific Data Group */
+  case DFTAG_NDG: /* Numeric Data Group */
+   insert_sds(file_id,sd_id,tag,ref,path_name,table);
+   break;
+   
+/*-------------------------------------------------------------------------
+ * Image
+ *-------------------------------------------------------------------------
+ */   
+  case DFTAG_RI:  /* Raster Image */
+  case DFTAG_CI:  /* Compressed Image */
+  case DFTAG_RIG: /* Raster Image Group */
+  case DFTAG_RI8:  /* Raster-8 image */
+  case DFTAG_CI8:  /* RLE compressed 8-bit image */
+  case DFTAG_II8:  /* IMCOMP compressed 8-bit image */
+   insert_gr(file_id,gr_id,tag,ref,path_name,table);
+   break;
+
+/*-------------------------------------------------------------------------
+ * Vdata
+ *-------------------------------------------------------------------------
+ */   
+  case DFTAG_VH:  /* Vdata Header */
+   insert_vs(file_id,tag,ref,path_name,table,0);
+   break;
+   
+  }
+ }
+
+ return 0;
+}
+
+
+/*-------------------------------------------------------------------------
+ * Function: hdiff_list_gr
+ *
+ * Purpose: get top level GR images
+ *
+ * Return: void
+ *
+ *-------------------------------------------------------------------------
+ */
+
+int hdiff_list_gr(const char* fname,
+                  int32 file_id,
+                  int32 gr_id,             /* GR interface identifier */
+                  dtable_t *table)
+{
+ int32 ri_id,             /* raster image identifier */
+       n_rimages,         /* number of raster images in the file */
+       n_file_attrs,      /* number of file attributes */
+       ri_index,          /* index of a image */
+       gr_ref,            /* reference number of the GR image */
+       dim_sizes[2],      /* dimensions of an image */
+       n_comps,           /* number of components an image contains */
+       interlace_mode,    /* interlace mode of an image */ 
+       data_type,         /* number type of an image */
+       n_attrs;           /* number of attributes belong to an image */
+ char  name[MAX_GR_NAME]; /* name of an image */
+ 
+ /* determine the contents of the file */
+ if (GRfileinfo (gr_id, &n_rimages, &n_file_attrs)<0)
+ {
+  return -1;
+ }
+ 
+ for (ri_index = 0; ri_index < n_rimages; ri_index++)
+ {
+  ri_id = GRselect (gr_id, ri_index);
+  GRgetiminfo (ri_id, name, &n_comps, &data_type, &interlace_mode, 
+   dim_sizes, &n_attrs);
+
+  gr_ref = GRidtoref(ri_id);
+
+  /* check if already inserted in Vgroup; search all image tags */
+  if ( dtable_search(table,DFTAG_RI,gr_ref)>=0 ||
+       dtable_search(table,DFTAG_CI,gr_ref)>=0 ||
+       dtable_search(table,DFTAG_RIG,gr_ref)>=0 ||
+       dtable_search(table,DFTAG_RI8,gr_ref)>=0 ||
+       dtable_search(table,DFTAG_CI8,gr_ref)>=0 ||
+       dtable_search(table,DFTAG_II8,gr_ref)>=0 )
+  {
+   GRendaccess (ri_id);
+   continue;
+  }
+
+  /* insert GR  */
+  insert_gr(file_id,gr_id,DFTAG_RI,gr_ref,0,table);
+
+  /* terminate access to the current raster image */
+  GRendaccess (ri_id);
+ }
+ return 0;
+}
+
+
+/*-------------------------------------------------------------------------
+ * Function: hdiff_list_sds
+ *
+ * Purpose: get top level SDS
+ *
+ * Return: void
+ *
+ *-------------------------------------------------------------------------
+ */
+
+int hdiff_list_sds(const char* fname,
+                   int32 file_id,
+                   int32 sd_id,                  /* SD interface identifier */
+                   dtable_t *table)
+{
+ int32 sds_id,                 /* dataset identifier */
+       n_datasets,             /* number of datasets in the file */
+       n_file_attrs,           /* number of file attributes */
+       index,                  /* index of a dataset */
+       sds_ref,                /* reference number */
+       dim_sizes[MAX_VAR_DIMS],/* dimensions of an image */
+       data_type,              /* number type  */
+       rank,                   /* rank */
+       n_attrs;                /* number of attributes */
+ char  name[MAX_GR_NAME];      /* name of dataset */
+
+ /* determine the number of data sets in the file and the number of file attributes */
+ if (SDfileinfo (sd_id, &n_datasets, &n_file_attrs)<0)
+ {
+  return -1;
+ }
+
+ for (index = 0; index < n_datasets; index++)
+ {
+  sds_id  = SDselect (sd_id, index);
+  SDgetinfo(sds_id, name, &rank, dim_sizes, &data_type, &n_attrs);
+  sds_ref = SDidtoref(sds_id);
+
+  /* check if already inserted in Vgroup; search all SDS tags */
+  if ( dtable_search(table,DFTAG_SD,sds_ref)>=0 ||
+       dtable_search(table,DFTAG_SDG,sds_ref)>=0 ||
+       dtable_search(table,DFTAG_NDG,sds_ref)>=0 )
+  {
+   SDendaccess (sds_id);
+   continue;
+  }
+
+  /* insert SDS  */
+  insert_sds(file_id,sd_id,DFTAG_NDG,sds_ref,0,table);
+     
+  /* terminate access to the current dataset */
+  SDendaccess (sds_id);
+ }
+
+ return 0;
+}
+
+/*-------------------------------------------------------------------------
+ * Function: hdiff_list_vs
+ *
+ * Purpose: get top level VS
+ *
+ * Return: void
+ *
+ *-------------------------------------------------------------------------
+ */
+
+
+int hdiff_list_vs(const char* fname,
+                  int32 file_id,
+                  dtable_t *table)
+{
+ int32 nlones = 0,   /* number of lone vdatas */
+       *ref_array,   /* buffer to hold the ref numbers of lone vdatas   */
+       ref;          /* temporary ref number  */
+ int   i;
+
+ /* initialize the VS interface */
+ Vstart (file_id);
+/*
+ * get and print the names and class names of all the lone vdatas.
+ * first, call Vlone with nlones set to 0 to get the number of
+ * lone vdatas in the file, but not to get their reference numbers.
+ */
+ nlones = VSlone (file_id, NULL, nlones );
+
+ if (nlones > 0)
+ {
+ /*
+  * use the nlones returned to allocate sufficient space for the
+  * buffer ref_array to hold the reference numbers of all lone vgroups,
+  */
+  ref_array = (int32 *) malloc(sizeof(int32) * nlones);
+  
+ /*
+  * and call VSlone again to retrieve the reference numbers into 
+  * the buffer ref_array.
+  */
+  nlones = VSlone (file_id, ref_array, nlones);
+
+ /*
+  * iterate tru each lone vdata.
+  */
+  for (i = 0; i < nlones; i++)
+  {
+  /*
+   * attach to the current vdata then get its
+   * name and class. note: the current vdata must be detached before
+   * moving to the next.
+   */
+   ref = ref_array[i];
+
+   /* check if already inserted in Vgroup*/
+   if ( dtable_search(table,DFTAG_VH,ref)>=0 ) {
+    continue;
+   }
+
+   /* insert VS */
+   insert_vs(file_id,DFTAG_VH,ref,0,table,1);
+ 
+  } /* for */
+
+  
+  /* free the space allocated */
+  if (ref_array) free (ref_array);
+ } /* if */
+
+ /* terminate access to the VS interface */
+ Vend (file_id);
+ return 0;
+}
+
+
+/*-------------------------------------------------------------------------
+ * Function: insert_vg_attrs
+ *
+ * Purpose: insert VG attributes
+ *
+ * Return: 1 
+ *
+ *-------------------------------------------------------------------------
+ */
+
+int insert_vg_attrs(int32 vg_in,char *path) 
+{
+ int    n_attrs;
+ int32  data_type, size,  n_values;
+ char   attr_name[MAX_NC_NAME];
+ int    i;
+
+ /* Get the number of attributes attached to this vgroup.  */
+ if((n_attrs = Vnattrs (vg_in))==FAIL) {
+  printf( "Failed to get attributes for <%s>\n", path);
+  return-1;
+ }
+ 
+ for (i = 0; i < n_attrs; i++) 
+ {
+  if((Vattrinfo (vg_in, i, attr_name, &data_type, &n_values, &size))==FAIL) {
+   printf( "Failed to get attribute %d of <%s>\n", i, path);
+   continue;
+  }
+ 
+ }
+ return 1;
+}
+
+/*-------------------------------------------------------------------------
+ * Function: hdiff_list_glb
+ *
+ * Purpose: list/insert global SDS attributes, global GR atrributes
+ *
+ * Return: void
+ *
+ *-------------------------------------------------------------------------
+ */
+
+int hdiff_list_glb(const char* fname,
+                   int32 file_id,
+                   int32 sd_id,                  /* SD interface identifier */
+                   int32 gr_id,                  /* GR interface identifier */
+                   dtable_t *table)
+{
+ int32 n_datasets,             /* number of datasets in the file */
+       n_file_attrs;           /* number of file attributes */
+     
+/*-------------------------------------------------------------------------
+ * insert SDS global attributes
+ *-------------------------------------------------------------------------
+ */ 
+ /* determine the number of data sets in the file and the number of file attributes */
+ SDfileinfo (sd_id, &n_datasets, &n_file_attrs);
+ 
+ insert_sds_attrs(sd_id,n_file_attrs);
+
+/*-------------------------------------------------------------------------
+ * insert GR global attributes
+ *-------------------------------------------------------------------------
+ */ 
+ /* determine the number of data sets in the file and the number of file attributes */
+ GRfileinfo (gr_id, &n_datasets, &n_file_attrs);
+ 
+ insert_gr_attrs(gr_id,n_file_attrs);
+ return 0;
+}
+
+
+/*-------------------------------------------------------------------------
+ * Function: hdiff_list_an
+ *
+ * Purpose: list/insert AN FILE objects
+ *
+ * Return: void
+ *
+ *-------------------------------------------------------------------------
+ */
+
+
+int hdiff_list_an(const char* fname,
+                  int32 file_id,
+                  dtable_t *table)
+{
+ int32 an_id,         /* AN interface identifier */
+       ann_id,        /* an annotation identifier */
+       i,             /* position of an annotation in all of the same type*/
+       n_file_labels, n_file_descs, n_data_labels, n_data_descs;
+
+ /* Initialize the AN interface  */
+ an_id  = ANstart (file_id);
+
+/*
+ * Get the annotation information, e.g., the numbers of file labels, file
+ * descriptions, data labels, and data descriptions.
+ */
+ ANfileinfo (an_id, &n_file_labels, &n_file_descs, &n_data_labels, 
+  &n_data_descs);
+ 
+
+/*-------------------------------------------------------------------------
+ * AN_FILE_LABEL
+ *-------------------------------------------------------------------------
+ */ 
+
+
+ for (i = 0; i < n_file_labels; i++)
+ {
+ /* Get the identifier of the current data label */
+  ann_id = ANselect (an_id, i, AN_FILE_LABEL);
+  
+   /* Terminate access to the current data label */
+  ANendaccess (ann_id);
+ 
+ }
+
+/*-------------------------------------------------------------------------
+ * AN_FILE_DESC
+ *-------------------------------------------------------------------------
+ */ 
+
+ for (i = 0; i < n_file_descs; i++)
+ {
+ /* Get the identifier of the current data label */
+  ann_id = ANselect (an_id, i, AN_FILE_DESC);
+  
+  /* Terminate access to the current data label */
+  ANendaccess (ann_id);
+ }
+ 
+ /* Terminate access to the AN interface */
+ ANend (an_id);
+ 
+ return 0;
+}
+
+
+/*-------------------------------------------------------------------------
+ * Function: insert_vg_an
+ *
+ * Purpose: insert Vgroup ANs
+ *
+ * Return: ok, 1, -1 not ok 
+ *
+ *-------------------------------------------------------------------------
+ */
+
+int insert_vg_an(int32 file_id,
+                 int32 vgroup_id,
+                 char *path) 
+{
+ int32 ref_in,
+       tag_in;
+
+ if ((ref_in = VQueryref(vgroup_id))==FAIL){
+  printf( "Failed to get ref for <%s>\n", path);
+  return-1;
+ }
+ if ((tag_in = VQuerytag(vgroup_id))==FAIL){
+  printf( "Failed to get tag for <%s>\n", path);
+  return-1;
+ }
+ insert_an(file_id,ref_in,tag_in,path);
+
+ return 1;
+}
+
+
+/*-------------------------------------------------------------------------
+ * Function: insert_vs_an
+ *
+ * Purpose: insert Vdata ANs
+ *
+ * Return: ok, 1, -1 not ok 
+ *
+ *-------------------------------------------------------------------------
+ */
+
+int insert_vs_an(int32 file_id,
+                 int32 vdata_id,
+                 char *path)
+{
+ int32 ref_in,
+       tag_in;
+
+ if ((ref_in = VSQueryref(vdata_id))==FAIL){
+  printf( "Failed to get ref for <%s>\n", path);
+  return-1;
+ }
+ if ((tag_in = VSQuerytag(vdata_id))==FAIL){
+  printf( "Failed to get tag for <%s>\n", path);
+  return-1;
+ }
+ 
+ insert_an(file_id,ref_in,tag_in,path);
+
+ return 1;
+}
+
+
+/*-------------------------------------------------------------------------
+ * Function: insert_an_data
+ *
+ * Purpose: insert DATA ANs
+ *
+ * Return: ok, 1, -1 not ok 
+ *
+ *-------------------------------------------------------------------------
+ */
+
+static
+int insert_an_data(int32 file_id,
+                   int32 ref_in, 
+                   int32 tag_in,
+                   ann_type type, 
+                   char *path) 
+{
+ int32 an_id,         /* AN interface identifier */
+       ann_id,        /* an annotation identifier */
+       i,             /* position of an annotation */
+       n_anno;
+       
+ /* Initialize the AN interface  */
+ an_id  = ANstart (file_id);
+
+ /* Get the number of ANs in this object  */
+ if((n_anno = ANnumann(an_id,type,(uint16)tag_in,(uint16)ref_in))==FAIL) {
+  printf( "Failed to get annotations for <%s>\n", path);
+  return-1;
+ }
+ 
+ for (i = 0; i < n_anno; i++) 
+ {
+  if((ann_id = ANselect(an_id,i,type))==FAIL) {
+   printf( "Failed to select AN %d of <%s>\n", i, path);
+   continue;
+  }
+ 
+  if(ANendaccess(ann_id)==FAIL){
+   printf( "Failed to end AN %d of <%s>\n", i, path);
+   continue;
+  }
+
+ }
+
+  /* Terminate access to the AN interface */
+ ANend (an_id);
+ 
+ return 1;
+}
+
+
+/*-------------------------------------------------------------------------
+ * Function: insert_an
+ *
+ * Purpose: insert DATA ANs (AN_DATA_LABEL and AN_DATA_DESC)
+ *
+ * Return: ok, 1, -1 not ok 
+ *
+ *-------------------------------------------------------------------------
+ */
+
+
+int insert_an(int32 file_id,
+            int32 ref_in, 
+            int32 tag_in,
+            char *path) 
+{
+
+ insert_an_data(file_id,ref_in,tag_in, 
+                AN_DATA_LABEL,path);
+ insert_an_data(file_id,ref_in,tag_in,
+                AN_DATA_DESC,path);
+
+ return 1;
+}
+
+
+
+/*-------------------------------------------------------------------------
+ * Function: insert_sds
+ *
+ * Purpose: insert an SDS into file object list
+ *
+ * Return: 0, -1 for error 
+ *
+ * Programmer: Pedro Vicente, pvn at ncsa.uiuc.edu
+ *
+ * Date: August 22, 2003
+ *
+ *-------------------------------------------------------------------------
+ */
+
+int  insert_sds(int32 file_id,
+                int32 sd_id,
+                int32 tag,            /* tag of input SDS */
+                int32 ref,            /* ref of input SDS */
+                char *path_name,      /* absolute path for input group name */
+                dtable_t *table)
+{
+ int32 sds_id,                /* data set identifier */
+       sds_index,             /* index number of the data set */
+       dtype,                 /* SDS data type */
+       dimsizes[MAX_VAR_DIMS],/* dimensional size of SDS */
+       nattrs,                /* number of SDS attributes */
+       rank,                  /* rank of SDS */
+       dim_size,              /* dimension size */
+       dim_id;                /* dimension ID */
+ char             sds_name[MAX_NC_NAME]; 
+ char             dim_name[MAX_NC_NAME];
+ char             *path=NULL;
+ int              i;
+ 
+ sds_index = SDreftoindex(sd_id,ref);
+ sds_id    = SDselect(sd_id,sds_index);
+ 
+ /*obtain name,rank,dimsizes,datatype and num of attributes of sds */
+ SDgetinfo(sds_id,sds_name,&rank,dimsizes,&dtype,&nattrs);
+
+ /* check if the given SDS is a dimension scale, return 0 for no table add */
+ if ( SDiscoordvar(sds_id) ) {
+  SDendaccess(sds_id);
+  return 0;
+ }
+ 
+ /* initialize path */
+ path=get_path(path_name,sds_name);
+ 
+ /* add object to table */
+ dtable_add(table,tag,ref,path);
+
+#if defined (HDIFF_DEBUG)
+   printf("%s\n",path); 
+#endif
+
+/*-------------------------------------------------------------------------
+ * insert attributes
+ *-------------------------------------------------------------------------
+ */ 
+ 
+ insert_sds_attrs(sds_id,nattrs);
+ 
+/*-------------------------------------------------------------------------
+ * dimension scales
+ *-------------------------------------------------------------------------
+ */ 
+ 
+ /* loop through each dimension up to rank of SDS */
+ for (i = 0; i < rank; i++) 
+ {
+  /* get dimension handle for input dimension */
+  if ((dim_id = SDgetdimid(sds_id, i)) == FAIL) {
+   printf( "Failed to get dimension %d of SDS <%s>\n", i, path);
+   continue;
+  }
+  /* get dimension information for input dimension */
+  if (SDdiminfo(dim_id, dim_name, &dim_size, &dtype, &nattrs) == FAIL) {
+   printf( "Failed to get info for dimension %d of SDS <%s>\n", i, path);
+   continue;
+  }
+  /* attributes */
+  if (nattrs && insert_sds_attrs(dim_id, nattrs) == FAIL) {
+   printf( "Failed to copy attributes for dimension %d of of SDS <%s>\n", i, path);
+   continue;
+  }
+  
+ }
+
+/*-------------------------------------------------------------------------
+ * insert ANs
+ *-------------------------------------------------------------------------
+ */ 
+ 
+ insert_an(file_id,ref,tag,path);
+
+/*-------------------------------------------------------------------------
+ * terminate access to the SDSs
+ *-------------------------------------------------------------------------
+ */ 
+
+ SDendaccess(sds_id);
+   
+ if (path)
+  free(path);
+ 
+ return 0;
+ 
+}
+
+
+/*-------------------------------------------------------------------------
+ * Function: insert_sds_attrs
+ *
+ * Purpose: insert SDS attributes 
+ *   used for global, dataset and dimension attributes
+ *
+ * Return: 1, for success
+ *
+ * Programmer: Pedro Vicente, pvn at ncsa.uiuc.edu
+ *
+ * Date: August 22, 2003
+ *
+ *-------------------------------------------------------------------------
+ */
+
+int insert_sds_attrs(int32 id_in,int32 nattrs)
+{
+ int32 dtype,                 /* SDS data type */
+       nelms;                 /* number of elements */
+ char  attr_name[MAX_NC_NAME];
+ int   i;
+
+ /* loop through attributes in input SDS */
+ for (i = 0; i < nattrs; i++) 
+ {
+  if (SDattrinfo (id_in, i, attr_name, &dtype, &nelms) == FAIL) {
+   printf( "Cannot get info for attribute number %d\n", i);
+   continue;
+  }
+ 
+ }
+
+ return 1;
+}
+
+/*-------------------------------------------------------------------------
+ * Function: insert_gr_attrs
+ *
+ * Purpose: insert GR attributes 
+ *
+ * Return: 1, for success 
+ *
+ * Programmer: Pedro Vicente, pvn at ncsa.uiuc.edu
+ *
+ * Date: August 22, 2003
+ *
+ *-------------------------------------------------------------------------
+ */
+
+int insert_gr_attrs(int32 ri_id,int32 nattrs)
+{
+ int32 dtype,                 /* SDS data type */
+       nelms;                 /* number of elements */
+ char  attr_name[MAX_NC_NAME];
+ int   i;
+
+ /* loop through attributes in input GR */
+ for (i = 0; i < nattrs; i++) 
+ {
+  if (GRattrinfo (ri_id, i, attr_name, &dtype, &nelms) == FAIL) {
+   printf( "Cannot get info for attribute number %d\n", i);
+   continue;
+  }
+ 
+ }
+
+ return 1;
+}
+
+/*-------------------------------------------------------------------------
+ * Function: insert_vs_attrs
+ *
+ * Purpose: insert VS attributes 
+ *
+ * Return: 1, for success, -1 for error 
+ *
+ * Programmer: Pedro Vicente, pvn at ncsa.uiuc.edu
+ *
+ * Date: August 22, 2003
+ *
+ *-------------------------------------------------------------------------
+ */
+
+int insert_vs_attrs(int32 in, int32 findex, intn attrindex)
+{
+ char   attr_name[MAX_NC_NAME];
+ int32  n_values, attr_size, attr_type;
+
+ /* Get attribute information */
+ VSattrinfo(in, findex, attrindex, attr_name, &attr_type, &n_values, &attr_size);
+
+ return 1;
+}
+
+
+/*-------------------------------------------------------------------------
+ * Function: insert_gr
+ *
+ * Purpose: insert a GR 
+ *
+ * Return: 1
+ *
+ * Programmer: Pedro Vicente, pvn at ncsa.uiuc.edu
+ *
+ * Date: August 22, 2003
+ *
+ *-------------------------------------------------------------------------
+ */
+
+int  insert_gr(int32 file_id,
+               int32 gr_in,
+               int32 tag,               /* tag of input GR */
+               int32 ref,               /* ref of input GR */
+               char*path_name,          /* absolute path for input group name */
+               dtable_t *table)
+{
+ int32         ri_id,         /* raster image identifier */
+               ri_index,      /* index of a image */
+               dimsizes[2],   /* dimensions of an image */
+               n_comps,       /* number of components an image contains */
+               interlace_mode,/* interlace mode of an image */ 
+               dtype,         /* number type of an image */
+               n_attrs;       /* number of attributes belong to an image */
+               
+ int32         pal_id,        /* palette identifier */
+               r_num_entries, 
+               r_data_type, 
+               r_ncomp, 
+               r_interlace_mode; 
+ char          gr_name[MAX_GR_NAME]; 
+ char          *path=NULL;
+ int           has_pal = 0;
+
+ ri_index = GRreftoindex(gr_in,(uint16)ref);
+ ri_id    = GRselect(gr_in,ri_index);
+   
+ GRgetiminfo(ri_id,gr_name,&n_comps,&dtype,&interlace_mode,dimsizes,&n_attrs);
+ 
+ /* initialize path */
+ path=get_path(path_name,gr_name);
+
+ /* add object to table */
+ dtable_add(table,tag,ref,path);
+
+#if defined (HDIFF_DEBUG)
+   printf("%s\n",path); 
+#endif  
+ 
+/*-------------------------------------------------------------------------
+ * insert attributes
+ *-------------------------------------------------------------------------
+ */ 
+ 
+ insert_gr_attrs(ri_id,n_attrs);
+
+/*-------------------------------------------------------------------------
+ * check for palette
+ *-------------------------------------------------------------------------
+ */ 
+
+ pal_id = GRgetlutid(ri_id, 0);
+ GRgetlutinfo(pal_id,&r_ncomp,&r_data_type,&r_interlace_mode,&r_num_entries);
+
+ /*check if there is palette data */
+ has_pal=((r_ncomp == 0) || (r_interlace_mode < 0) || (r_num_entries == 0))?0:1;
+
+ if ( has_pal==1 )
+ {
+ 
+ } /* has_pal==1 */
+
+ 
+/*-------------------------------------------------------------------------
+ * insert ANs
+ *-------------------------------------------------------------------------
+ */ 
+
+ insert_an(file_id,ref,DFTAG_RIG,path);
+ insert_an(file_id,ref,DFTAG_RI,path);
+ 
+/*-------------------------------------------------------------------------
+ * terminate access to the GR
+ *-------------------------------------------------------------------------
+ */ 
+
+ /* terminate access to the GRs */
+ GRendaccess(ri_id);
+    
+ if (path)
+  free(path);
+ 
+ return 0;
+ 
+}
+
+
+
+/*-------------------------------------------------------------------------
+ * Function: insert_vs
+ *
+ * Purpose: insert a VS 
+ *
+ * Return: 0, -1 for error 
+ *
+ * Programmer: Pedro Vicente, pvn at ncsa.uiuc.edu
+ *
+ * Date: August 22, 2003
+ *
+ *-------------------------------------------------------------------------
+ */
+
+int  insert_vs( int32 file_id,
+                int32 tag,
+                int32 ref,               /* ref of input VS */
+                char*path_name,          /* absolute path for input group name */
+                dtable_t *table,
+                int is_lone)
+{
+ int32 vdata_id,              /* vdata identifier */
+       tag_vs,
+       ref_vs;
+ int   n_fields, n_attrs;
+ char  vdata_name [VSNAMELENMAX], vdata_class[VSNAMELENMAX];
+ char  *path=NULL;
+ int   i, j, ret=1;
+
+/*-------------------------------------------------------------------------
+ * attach the vdata, gets its name and class
+ *-------------------------------------------------------------------------
+ */ 
+
+ if ((vdata_id  = VSattach (file_id, ref, "r")) == FAIL ){
+  printf( "Failed to attach vdata ref %d\n", ref);
+  return-1;
+ }
+ if (VSgetname  (vdata_id, vdata_name) == FAIL ){
+  printf( "Failed to name for vdata ref %d\n", ref);
+  return-1;
+ }
+ if (VSgetclass (vdata_id, vdata_class) == FAIL ){
+  printf( "Failed to name for vdata ref %d\n", ref);
+  return-1;
+ }
+ 
+ /* ignore reserved HDF groups/vdatas; they are lone ones */
+ if( is_lone==1 && vdata_class != NULL) {
+  if( is_reserved(vdata_class)){
+   if (VSdetach (vdata_id) == FAIL )
+    printf( "Failed to detach vdata <%s>\n", path_name);
+   return 0;
+  }
+ }
+
+ 
+ if ((ref_vs = VSQueryref(vdata_id))==FAIL){
+  printf( "Failed to get ref for <%s>\n", vdata_name);
+ }
+ if ((tag_vs = VSQuerytag(vdata_id))==FAIL){
+  printf( "Failed to get tag for <%s>\n", vdata_name);
+ }
+
+
+ /* initialize path */
+ path=get_path(path_name,vdata_name);
+ 
+ /* add object to table */
+ dtable_add(table,tag_vs,ref_vs,path);
+
+#if defined (HDIFF_DEBUG)
+  printf("%s\n",path); 
+  assert(tag==tag_vs);
+  assert(ref==ref_vs);
+#endif
+
+/*-------------------------------------------------------------------------
+ * fields 
+ *-------------------------------------------------------------------------
+ */ 
+ 
+ if ((n_fields = VFnfields(vdata_id)) == FAIL ){
+  printf( "Failed getting fields for VS <%s>\n", path);
+  ret=-1;
+  goto out;
+ }
+ 
+
+
+
+/*-------------------------------------------------------------------------
+ * insert attributes
+ *-------------------------------------------------------------------------
+ */ 
+ 
+ if ((n_attrs = VSfnattrs( vdata_id, -1 )) == FAIL ){
+  printf( "Failed getting attributes for VS <%s>\n", path);
+  ret=-1;
+  goto out;
+ }
+ for (i = 0; i < n_attrs; i++) {
+  insert_vs_attrs(vdata_id, -1, i);
+ }
+ 
+/*-------------------------------------------------------------------------
+ * insert field attributes
+ *-------------------------------------------------------------------------
+ */ 
+  
+ for (i = 0; i < n_fields; i++) {
+  if ((n_attrs = VSfnattrs(vdata_id, i)) == FAIL ){
+   printf( "Failed getting fields for VS <%s>\n", path);
+   ret=-1;
+   goto out;
+  }
+  for (j = 0; j < n_attrs; j++) {
+   insert_vs_attrs(vdata_id, i, j);
+  }
+ }
+  
+
+/*-------------------------------------------------------------------------
+ * insert ANs
+ *-------------------------------------------------------------------------
+ */ 
+
+ insert_vs_an(file_id,vdata_id,path);
+
+/*-------------------------------------------------------------------------
+ * terminate access to the VSs
+ *-------------------------------------------------------------------------
+ */ 
+ 
+out:
+ VSdetach (vdata_id);
+ 
+ if (path)
+  free(path);
+ 
+ return ret;
+}
+
+
+
+
+
+
+/*-------------------------------------------------------------------------
+ * Function: is_reserved
+ *
+ * Purpose: check for reserved Vgroup/Vdata class/names
+ *
+ * Return: 1 if reserved, 0 if not
+ *
+ * Programmer: Pedro Vicente, pvn at ncsa.uiuc.edu
+ *
+ * Date: August 22, 2003
+ *
+ *-------------------------------------------------------------------------
+ */
+
+static
+int is_reserved(char*vgroup_class)
+{
+ int ret=0;
+ 
+ /* ignore reserved HDF groups/vdatas */
+ if(vgroup_class != NULL) {
+  if( (strcmp(vgroup_class,_HDF_ATTRIBUTE)==0) ||
+   (strcmp(vgroup_class,_HDF_VARIABLE) ==0) || 
+   (strcmp(vgroup_class,_HDF_DIMENSION)==0) ||
+   (strcmp(vgroup_class,_HDF_UDIMENSION)==0) ||
+   (strcmp(vgroup_class,DIM_VALS)==0) ||
+   (strcmp(vgroup_class,DIM_VALS01)==0) ||
+   (strcmp(vgroup_class,_HDF_CDF)==0) ||
+   (strcmp(vgroup_class,GR_NAME)==0) ||
+   (strcmp(vgroup_class,RI_NAME)==0) || 
+   (strcmp(vgroup_class,RIGATTRNAME)==0) ||
+   (strcmp(vgroup_class,RIGATTRCLASS)==0) ){
+   ret=1;
+  }
+
+  /* class and name(partial) for chunk table i.e. Vdata */
+  if( (strncmp(vgroup_class,"_HDF_CHK_TBL_",13)==0)){
+   ret=1;
+  }
+
+ }
+ 
+ return ret;
+}
+
+
+
+/*-------------------------------------------------------------------------
+ * Function: get_path
+ *
+ * Purpose: return absolute path for an object
+ *
+ * Return: path
+ *
+ * Programmer: Pedro Vicente, pvn at ncsa.uiuc.edu
+ *
+ * Date: July 11, 2003
+ *
+ *-------------------------------------------------------------------------
+ */
+
+static
+char *get_path(char*path_name, char*obj_name) 
+{
+ char *path=NULL;
+ /* initialize path */
+ if (path_name!=NULL) 
+ {
+  path = (char*) malloc(strlen(path_name) + strlen(obj_name) + 2);
+  strcpy( path, path_name );
+  strcat( path, "/" );
+  strcat( path, obj_name ); 
+ }
+ else
+ {
+  path = (char*) malloc(strlen(obj_name) + 1);
+  strcpy( path, obj_name ); 
+ }
+ return path;
+}
+
+
+
+

Added: packages/libhdf4/branches/upstream/current/mfhdf/hdiff/hdiff_list.h
===================================================================
--- packages/libhdf4/branches/upstream/current/mfhdf/hdiff/hdiff_list.h	                        (rev 0)
+++ packages/libhdf4/branches/upstream/current/mfhdf/hdiff/hdiff_list.h	2007-05-15 09:53:05 UTC (rev 831)
@@ -0,0 +1,99 @@
+/****************************************************************************
+ * NCSA HDF                                                                 *
+ * Software Development Group                                               *
+ * National Center for Supercomputing Applications                          *
+ * University of Illinois at Urbana-Champaign                               *
+ * 605 E. Springfield, Champaign IL 61820                                   *
+ *                                                                          *
+ * For conditions of distribution and use, see the accompanying             *
+ * hdf/COPYING file.                                                        *
+ *                                                                          *
+ ****************************************************************************/
+
+
+#ifndef HDF_HDIFF_LIST__
+#define HDF_HDIFF_LIST__
+
+
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#include "hdiff_table.h"
+
+
+/* get the list of HDF objects in the file */
+int Hgetlist (const char* fname, dtable_t *list);
+
+int hdiff_list_vg (const char* fname,int32 file_id,int32 sd_id,int32 gr_id,dtable_t *table);
+int hdiff_list_gr (const char* fname,int32 file_id,int32 gr_id,dtable_t *table);
+int hdiff_list_sds(const char* fname,int32 file_id,int32 sd_id,dtable_t *table);
+int hdiff_list_vs (const char* fname,int32 file_id,dtable_t *table);
+int hdiff_list_glb(const char* fname,int32 file_id,int32 sd_id,int32 gr_id,dtable_t *table);
+int hdiff_list_an (const char* fname,int32 file_id,dtable_t *table);
+
+
+int insert_vg_attrs(int32 vgroup_id,char *path);
+int insert_vg_an(int32 file_id,int32 vgroup_id,char *path);
+
+
+int insert_vg(const char* fname,
+              int32 file_id,
+              int32 sd_id,             /* SD interface identifier */
+              int32 gr_id,             /* GR interface identifier */
+              char*path_name,          /* absolute path for input group name */          
+              int32* in_tags,          /* tag list for parent group */
+              int32* in_refs,          /* ref list for parent group */
+              int npairs,              /* number tag/ref pairs for parent group */
+              dtable_t *table);
+
+int  insert_sds(int32 file_id,
+                int32 sd_id,
+                int32 tag,
+                int32 ref,
+                char *path_name,
+                dtable_t *table);
+
+int  insert_gr(int32 file_id,
+               int32 gr_in,
+               int32 tag,               /* tag of input GR */
+               int32 ref,               /* ref of input GR */
+               char*path_name,          /* absolute path for input group name */
+               dtable_t *table);
+
+int  insert_vs( int32 file_id,
+                int32 tag,
+                int32 ref,               /* ref of input VS */
+                char*path_name,          /* absolute path for input group name */
+                dtable_t *table,
+                int is_lone);
+
+
+int insert_sds_attrs(int32 sds_id,
+                     int32 nattrs);
+
+int insert_gr_attrs(int32 ri_id,
+                    int32 nattrs);
+
+
+int insert_an(int32 file_id,
+              int32 ref_in, 
+              int32 tag_in,
+              char *path);
+
+int insert_vs_an(int32 file_id,
+                 int32 vdata_id,
+                 char *path);
+
+int  insert_vs_attrs(int32 in, int32 findex, intn attrindex);
+
+
+
+
+#ifdef __cplusplus
+}
+#endif
+
+
+#endif  /* HDF_HDIFF_LIST__ */

Added: packages/libhdf4/branches/upstream/current/mfhdf/hdiff/hdiff_main.c
===================================================================
--- packages/libhdf4/branches/upstream/current/mfhdf/hdiff/hdiff_main.c	                        (rev 0)
+++ packages/libhdf4/branches/upstream/current/mfhdf/hdiff/hdiff_main.c	2007-05-15 09:53:05 UTC (rev 831)
@@ -0,0 +1,180 @@
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+#include <ctype.h>
+#include <stdlib.h>
+
+#include "hdf.h"
+#include "mfhdf.h"
+
+#include "hdiff.h"
+
+
+char *progname;
+
+/*
+Examples:
+
+# Compare global attributes only
+-g hdifftst1.hdf hdifftst2.hdf
+
+# Compare SD local attributes only
+-s hdifftst1.hdf hdifftst2.hdf
+
+# Compare SD data only
+-d hdifftst1.hdf hdifftst2.hdf
+
+# Compare Vdata data only
+-D hdifftst1.hdf hdifftst2.hdf
+
+# Print statistics
+-d -S hdifftst1.hdf hdifftst2.hdf
+
+# Compare SD data on variable(s)
+-d -v dset1 hdifftst1.hdf hdifftst2.hdf
+
+# Compare vdata on variable(s) 
+-D -u vdata1 hdifftst1.hdf hdifftst2.hdf
+
+# Print difference up to count number
+-d -e 2 hdifftst1.hdf hdifftst2.hdf
+
+# Print difference when it is greater than limit
+-d -t 2 hdifftst1.hdf hdifftst2.hdf
+
+# no options
+hdifftst1.hdf hdifftst2.hdf
+
+# verbose 
+-b hdifftst1.hdf hdifftst2.hdf
+*/
+
+
+static void
+usage()
+{
+ (void) fprintf(stderr,
+  "hdiff [-b] [-g] [-s] [-d] [-S] [-v ...] [-e counnt] [-t limit] file1 file2\n");
+ fprintf(stderr,"  [-b]              Verbose mode\n");
+ fprintf(stderr,"  [-g]              Compare global attributes only\n");
+ fprintf(stderr,"  [-s]              Compare SD local attributes only\n");
+ fprintf(stderr,"  [-d]              Compare SD data only\n");
+ fprintf(stderr,"  [-D]              Compare Vdata data only\n");
+ fprintf(stderr,"  [-S]              Print statistics\n");
+ fprintf(stderr,"  [-v var1[,...]]   Compare SD data on variable(s) <var1>,... only\n");
+ fprintf(stderr,"  [-u var1[,...]]   Compare vdata on variable(s) <var1>,... only\n");
+ fprintf(stderr,"  [-e count]        Print difference up to count number for each variable\n");
+ fprintf(stderr,"  [-t limit]        Print difference when it is greater than limit\n");
+ fprintf(stderr,"  file1             File name of the first input HDF file\n");
+ fprintf(stderr,"  file2             File name of the second input HDF file\n");
+ exit(EXIT_FAILURE);
+}
+
+
+int
+main(int argc, char *argv[])
+{
+ extern int optind;
+ extern int opterr;
+ extern char *optarg;
+ static diff_opt_t opt = /* defaults, overridden on command line */
+ {
+  0,    /* verbose mode */
+  1,    /* compare global attributes */
+  1,    /* compare SD local attributes */
+  1,    /* compare SD data */
+  1,    /* compare GR data */
+  1,    /* compare Vdata */
+ -1,    /* no limit on the difference to be printed */
+  0.0,  /* exact equal */
+  0,    /* if -v specified, number of variables */
+  0,    /* if -v specified, list of variable names */
+  0,    /* if -u specified, number of variables */
+  0,    /* if -u specified, list of variable names */
+  0     /* if -S specified print statistics */
+ };
+ int   c;
+ int   i;
+ int   nfound;
+ 
+ opterr = 1;
+ progname = argv[0];
+ 
+ if (argc == 1)
+  usage();
+ 
+ while ((c = getopt(argc, argv, "bgsdSDe:t:v:u:")) != EOF)
+  switch(c) {
+ case 'b':  /* verbose mode */
+  opt.verbose =1;
+  break;
+ case 'g':  /* global attributes only */
+  opt.ga = 1;
+  opt.sa = 0;
+  opt.sd = 0;
+  opt.vd = 0;
+  break;
+ case 's':  /* SD local attributes only */
+  opt.ga = 0;
+  opt.sa = 1;
+  opt.sd = 0;
+  opt.vd = 0;
+  break;
+ case 'd':  /* SD data only */
+  opt.ga = 0;
+  opt.sa = 0;
+  opt.sd = 1;
+  opt.vd = 0;
+  break;
+ case 'D':  /* SD data only */
+  opt.ga = 0;
+  opt.sa = 0;
+  opt.sd = 0;
+  opt.vd = 1;
+  break;
+ case 'e':  /* max no. of difference to be printed */
+  opt.max_err_cnt = atoi(optarg);
+  break;
+ case 't':  /* range of difference to be printed */
+  opt.err_limit = (float32)atof(optarg);
+  break;
+ case 'v':  /* variable names */
+  /* make list of names of variables specified */
+  make_vars (optarg, &opt, 1);
+  break;
+ case 'u':  /* variable names */
+  /* make list of names of variables specified */
+  make_vars (optarg, &opt, 2);
+  break;
+ case 'S':
+  opt.statistics = 1;
+  break;
+ case '?':
+  usage();
+  break;
+ }
+ 
+/*-------------------------------------------------------------------------
+ * print the command line options
+ *-------------------------------------------------------------------------
+ */
+ 
+ if ( opt.verbose == 1) {
+ printf("$hdiff");
+ for (i=1; i<argc ; i++) 
+ {
+  printf(" %s", argv[i] );
+ }
+ printf("\n");
+ }
+ 
+ argv = argv + optind;
+
+ nfound = hdiff(argv[0],argv[1],&opt);
+
+ if (nfound==0) 
+  return 0;
+ else
+  return 1;
+ 
+}

Added: packages/libhdf4/branches/upstream/current/mfhdf/hdiff/hdiff_mattbl.c
===================================================================
--- packages/libhdf4/branches/upstream/current/mfhdf/hdiff/hdiff_mattbl.c	                        (rev 0)
+++ packages/libhdf4/branches/upstream/current/mfhdf/hdiff/hdiff_mattbl.c	2007-05-15 09:53:05 UTC (rev 831)
@@ -0,0 +1,125 @@
+/****************************************************************************
+ * NCSA HDF                                                                 *
+ * Software Development Group                                               *
+ * National Center for Supercomputing Applications                          *
+ * University of Illinois at Urbana-Champaign                               *
+ * 605 E. Springfield, Champaign IL 61820                                   *
+ *                                                                          *
+ * For conditions of distribution and use, see the accompanying             *
+ * hdf/COPYING file.                                                        *
+ *                                                                          *
+ ****************************************************************************/
+
+#include <stdio.h>
+#include <stdlib.h>
+
+#include "hdiff_mattbl.h"
+
+
+/*-------------------------------------------------------------------------
+ * Function: match_table_add
+ *
+ * Purpose: mark object is in file;
+ *  flag[0] = file1
+ *  flag[1] = file2
+ *  object exists in file = flag = 1
+ *  does not exist        = flag = 0
+ * the key is <path, tag, ref >
+ *
+ * Return: void
+ *
+ * Programmer: Pedro Vicente, pvn at ncsa.uiuc.edu
+ *
+ * Date: August 25, 2003
+ *
+ *-------------------------------------------------------------------------
+ */
+
+void match_table_add (match_table_t *table, 
+                      unsigned *flags, 
+                      char* path, 
+                      int32 tag1, 
+                      int32 ref1,
+                      int32 tag2, 
+                      int32 ref2 )
+{
+ int i;
+ 
+ if (table->nobjs == table->size) {
+  table->size *= 2;
+  table->objs = (match_info_t*)realloc(table->objs, table->size * sizeof(match_info_t));
+  
+  for (i = table->nobjs; i < table->size; i++) {
+   table->objs[i].tag1 = table->objs[i].ref1 = -1;
+   table->objs[i].tag2 = table->objs[i].ref2 = -1;
+   table->objs[i].flags[0] = table->objs[i].flags[1] = -1;
+  }
+ }
+ 
+ i = table->nobjs++;
+ table->objs[i].tag1 = tag1;
+ table->objs[i].ref1 = ref1;
+ table->objs[i].tag2 = tag2;
+ table->objs[i].ref2 = ref2;
+ strcpy(table->objs[i].obj_name,path);
+ table->objs[i].flags[0] = flags[0];
+ table->objs[i].flags[1] = flags[1];
+}
+
+
+/*-------------------------------------------------------------------------
+ * Function: match_table_init
+ *
+ * Purpose: initialize table
+ *
+ * Return: void
+ *
+ * Programmer: Pedro Vicente, pvn at ncsa.uiuc.edu
+ *
+ * Date: July 3, 2003
+ *
+ *-------------------------------------------------------------------------
+ */
+
+void match_table_init( match_table_t **tbl )
+{
+ int i;
+ match_table_t* table = (match_table_t*) malloc(sizeof(match_table_t));
+ 
+ table->size = 20;
+ table->nobjs = 0;
+ table->objs = (match_info_t*) malloc(table->size * sizeof(match_info_t));
+ 
+ for (i = 0; i < table->size; i++) {
+  table->objs[i].tag1 = table->objs[i].ref1 = -1;
+  table->objs[i].tag2 = table->objs[i].ref2 = -1;
+  table->objs[i].flags[0] = table->objs[i].flags[1] = -1;
+ }
+ 
+ *tbl = table;
+}
+
+
+
+/*-------------------------------------------------------------------------
+ * Function: match_table_free
+ *
+ * Purpose: free table memory
+ *
+ * Return: void
+ *
+ * Programmer: Pedro Vicente, pvn at ncsa.uiuc.edu
+ *
+ * Date: July 3, 2003
+ *
+ *-------------------------------------------------------------------------
+ */
+
+void match_table_free( match_table_t *table )
+{
+ free(table->objs);
+ free(table);
+}
+
+
+

Added: packages/libhdf4/branches/upstream/current/mfhdf/hdiff/hdiff_mattbl.h
===================================================================
--- packages/libhdf4/branches/upstream/current/mfhdf/hdiff/hdiff_mattbl.h	                        (rev 0)
+++ packages/libhdf4/branches/upstream/current/mfhdf/hdiff/hdiff_mattbl.h	2007-05-15 09:53:05 UTC (rev 831)
@@ -0,0 +1,62 @@
+/****************************************************************************
+ * NCSA HDF                                                                 *
+ * Software Development Group                                               *
+ * National Center for Supercomputing Applications                          *
+ * University of Illinois at Urbana-Champaign                               *
+ * 605 E. Springfield, Champaign IL 61820                                   *
+ *                                                                          *
+ * For conditions of distribution and use, see the accompanying             *
+ * hdf/COPYING file.                                                        *
+ *                                                                          *
+ ****************************************************************************/
+
+
+#ifndef HDF_HDIFF_MATCH_TABLE__
+#define HDF_HDIFF_MATCH_TABLE__
+
+
+#include "hdf.h"
+#include "mfhdf.h"
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+/* match objects in 2 HDF files */ 
+typedef struct match_info_t {
+ int32   tag1;
+ int32   ref1;
+ int32   tag2;
+ int32   ref2;
+ char  obj_name[MAX_NC_NAME];      /* same name for file1 and 2 */
+ int   flags[2];                   /* object exists in file=1, no=0 */  
+} match_info_t;
+
+/* table to store the match info */
+typedef struct match_table_t {
+ int          size;
+ int          nobjs;
+ match_info_t *objs;
+} match_table_t;
+
+
+/* table methods */
+void match_table_init(match_table_t **table);
+void match_table_free(match_table_t *table);
+void match_table_add (match_table_t *table, 
+                      unsigned *flags, 
+                      char* path, 
+                      int32 tag1, 
+                      int32 ref1,
+                      int32 tag2, 
+                      int32 ref2 );
+
+
+
+
+#ifdef __cplusplus
+}
+#endif
+
+
+#endif  /* HDF_HDIFF_MATCH_TABLE__ */

Added: packages/libhdf4/branches/upstream/current/mfhdf/hdiff/hdiff_misc.c
===================================================================
--- packages/libhdf4/branches/upstream/current/mfhdf/hdiff/hdiff_misc.c	                        (rev 0)
+++ packages/libhdf4/branches/upstream/current/mfhdf/hdiff/hdiff_misc.c	2007-05-15 09:53:05 UTC (rev 831)
@@ -0,0 +1,266 @@
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+#include <ctype.h>
+#include <stdlib.h>
+
+
+
+#include "hdf.h"
+#include "mfhdf.h"
+
+#include "hdiff.h"
+
+/* 
+* convert pathname of netcdf file into name for cdl unit, by taking 
+* last component of path and stripping off any extension.
+*/
+char *
+name_path(char *path)
+{
+ char *cp, *newc;
+ 
+#ifdef vms
+#define FILE_DELIMITER ']'
+#endif    
+#ifdef MSDOS
+#define FILE_DELIMITER '\\'
+#endif    
+#ifndef FILE_DELIMITER /* default to unix */
+#define FILE_DELIMITER '/'
+#endif
+ cp = strrchr(path, FILE_DELIMITER);
+ if (cp == 0)  /* no delimiter */
+  cp = path;
+ else   /* skip delimeter */
+  cp++;
+ newc = (char *) malloc((unsigned) (strlen(cp)+1));
+ if (newc == 0) {
+  fprintf(stderr,"Out of memory!\n");
+  exit(EXIT_FAILURE);
+ }
+ (void) strcpy(newc, cp); /* copy last component of path */
+ if ((cp = strrchr(newc, '.')) != NULL)
+  *cp = '\0';  /* strip off any extension */
+ return newc;
+}
+
+
+char *
+type_name(nc_type type)
+{
+ switch (type) {
+ case DFNT_INT8:
+  return "byte";
+ case DFNT_CHAR:
+  return "char";
+ case DFNT_INT16:
+  return "short";
+ case DFNT_INT32:
+  return "long";
+ case DFNT_FLOAT:
+  return "float";
+ case DFNT_DOUBLE:
+  return "double";
+ default:
+  fprintf(stderr,"type_name: bad type %d", type);
+  return "bogus";
+ }
+}
+
+/*
+* Remove trailing zeros (after decimal point) but not trailing decimal
+* point from ss, a string representation of a floating-point number that
+* might include an exponent part.
+*/
+void
+tztrim(char *ss)
+  /* returned string representing dd */
+{
+ char *cp, *ep;
+ 
+ cp = ss;
+ if (*cp == '-')
+  cp++;
+ while(isdigit((int)*cp) || *cp == '.')
+  cp++;
+ if (*--cp == '.')
+  return;
+ ep = cp+1;
+ while (*cp == '0')
+  cp--;
+ cp++;
+ if (cp == ep)
+  return;
+ while (*ep)
+  *cp++ = *ep++;
+ *cp = '\0';
+ return;
+}
+
+
+/*
+* Print list of attribute values.  Attribute values must be printed with
+* explicit type tags, because their types are not declared.
+*/
+void
+pr_att_vals(nc_type type, int len, void *vals)
+{
+ int iel;
+ union {
+  char *cp;
+  int16 *sp;
+  int32 *lp;
+  float32 *fp;
+  float64 *dp;
+ } gp;
+ char *sp;
+ unsigned char uc;
+ char gps[30];  /* for ascii of a float or double precision */
+ char *f_fmt = "%#.8g";
+ char *d_fmt = "%#.16g";
+ 
+ switch (type) {
+ case DFNT_INT8:
+  gp.cp = (char *) vals;
+  for (iel = 0; iel < len; iel++)
+   if (isprint(uc = *gp.cp++ & 0377))
+    Printf ("'%c'%s", uc, iel<len-1 ? ", " : "");
+   else
+    Printf ("'\\%o'%s", uc, iel<len-1 ? ", " : "");
+   break;
+ case DFNT_CHAR:
+  gp.cp = (char *) vals;
+  Printf ("\"");
+  /* adjust len so trailing nulls don't get printed */
+  sp = gp.cp + len - 1;
+  while (*sp-- == '\0' && len > 0)
+   len--;
+  for (iel = 0; iel < len; iel++)
+   switch (uc = *gp.cp++ & 0377) {
+ case '\b':
+  Printf ("\\b");
+  break;
+ case '\f':
+  Printf ("\\f");
+  break;
+ case '\n':  /* generate linebreaks after new-lines */
+  Printf ("\\n\",\n    \"");
+  break;
+ case '\r':
+  Printf ("\\r");
+  break;
+ case '\t':
+  Printf ("\\t");
+  break;
+ case '\v':
+  Printf ("\\v");
+  break;
+ case '\\':
+  Printf ("\\\\");
+  break;
+ case '\'':
+  Printf ("\\'");
+  break;
+ case '\"':
+  Printf ("\\\"");
+  break;
+ default:
+  Printf ("%c",uc);
+  break;
+  }
+  Printf ("\"");
+  break;
+ case DFNT_INT16:
+  gp.sp = (int16 *) vals;
+  for (iel = 0; iel < len; iel++)
+   Printf ("%ds%s",*gp.sp++,iel<len-1 ? ", " : "");
+  break;
+ case DFNT_INT32:
+  gp.lp = (int32 *) vals;
+  for (iel = 0; iel < len; iel++)
+   Printf ("%d%s",*gp.lp++,iel<len-1 ? ", " : "");
+  break;
+ case DFNT_FLOAT:
+  gp.fp = (float32 *) vals;
+  for (iel = 0; iel < len; iel++) {
+   int ll;
+   (void) sprintf(gps, f_fmt, * gp.fp++);
+   /* append a trailing "f" for floating-point attributes */
+   ll = strlen(gps);
+   gps[ll + 1] = '\0';
+   gps[ll] = 'f';
+   tztrim(gps); /* trim trailing 0's after '.' */
+   Printf ("%s%s", gps, iel<len-1 ? ", " : "");
+  }
+  break;
+ case DFNT_DOUBLE:
+  gp.dp = (float64 *) vals;
+  for (iel = 0; iel < len; iel++) {
+   (void) sprintf(gps, d_fmt, *gp.dp++);
+   tztrim(gps); /* trim trailing 0's after '.' */
+   Printf ("%s%s", gps, iel<len-1 ? ", " : "");
+  }
+  break;
+ default:
+  fprintf(stderr,"pr_att_vals: bad type - %d", type);
+ }
+}
+
+
+
+void
+make_vars(char *optarg, diff_opt_t *opt, int option)
+{
+ char *cp = optarg;
+ int nvars = 1;
+ char ** cpp;
+ 
+ /* compute number of variable names in comma-delimited list */
+ if (option == 1)
+  opt->nlvars = 1;
+ else
+  opt->nuvars = 1;
+ 
+ while (*cp++)
+  if (*cp == ',')
+   nvars++;
+  
+  if (option == 1)
+  {
+   opt->lvars = (char **) malloc(nvars * sizeof(char*));
+   if (!opt->lvars) {
+    fprintf(stderr,"Out of memory!\n");
+    exit(EXIT_FAILURE);
+   }
+   cpp = opt->lvars;
+  }
+  else
+  {
+   opt->uvars = (char **) malloc(nvars * sizeof(char*));
+   if (!opt->uvars) {
+    fprintf(stderr,"Out of memory!\n");
+    exit(EXIT_FAILURE);
+   }
+   cpp = opt->uvars;
+  }
+  
+  /* copy variable names into list */
+  for (cp = strtok(optarg, ",");
+  cp != NULL;
+  cp = strtok((char *) NULL, ",")) {
+   
+   *cpp = (char *) malloc(strlen(cp) + 1);
+   if (!*cpp) {
+    fprintf(stderr,"Out of memory!\n");
+    exit(EXIT_FAILURE);
+   }
+   strcpy(*cpp, cp);
+   cpp++;
+  }
+  if (option == 1)
+   opt->nlvars = nvars;
+  else
+   opt->nuvars = nvars;
+}
+

Added: packages/libhdf4/branches/upstream/current/mfhdf/hdiff/hdiff_sds.c
===================================================================
--- packages/libhdf4/branches/upstream/current/mfhdf/hdiff/hdiff_sds.c	                        (rev 0)
+++ packages/libhdf4/branches/upstream/current/mfhdf/hdiff/hdiff_sds.c	2007-05-15 09:53:05 UTC (rev 831)
@@ -0,0 +1,455 @@
+/****************************************************************************
+ * NCSA HDF                                                                 *
+ * Software Development Group                                               *
+ * National Center for Supercomputing Applications                          *
+ * University of Illinois at Urbana-Champaign                               *
+ * 605 E. Springfield, Champaign IL 61820                                   *
+ *                                                                          *
+ * For conditions of distribution and use, see the accompanying             *
+ * hdf/COPYING file.                                                        *
+ *                                                                          *
+ ****************************************************************************/
+
+
+#include "hdiff.h"
+#include "hdiff_list.h"
+#include "hdiff_mattbl.h"
+
+
+static
+int diff_sds_attrs(int32 sds1_id,int32 nattrs1,int32 sds2_id,int32 nattrs2,char* sds1_name);
+
+
+/*-------------------------------------------------------------------------
+ * Function: diff_sds
+ *
+ * Purpose: diff for SDS
+ *
+ * Return: Number of differences found
+ *
+ * Programmer: Pedro Vicente, pvn at ncsa.uiuc.edu
+ *
+ * Date: August 25, 2003
+ *
+ *-------------------------------------------------------------------------
+ */
+
+int diff_sds(const char  *fname1, 
+             const char  *fname2,
+             int32 sd1_id,              
+             int32 sd2_id,
+             int32 ref1,
+             int32 ref2,
+             diff_opt_t * opt)
+{
+ int32 sds1_id,                /* data set identifier */
+       sds1_index,             /* index number of the data set */
+       dtype1,                 /* SDS data type */
+       dimsizes1[MAX_VAR_DIMS],/* dimensional size of SDS */
+       nattrs1,                /* number of SDS attributes */
+       rank1,                  /* rank of SDS */
+       sds2_id,                /* data set identifier */
+       sds2_index,             /* index number of the data set */
+       dtype2,                 /* SDS data type */
+       dimsizes2[MAX_VAR_DIMS],/* dimensional size of SDS */
+       nattrs2,                /* number of SDS attributes */
+       rank2,                  /* rank of SDS */
+       start[MAX_VAR_DIMS],    /* read start */
+       edges[MAX_VAR_DIMS],    /* read edges */
+       numtype,                /* number type */
+       eltsz,                  /* element size */
+       nelms;                  /* number of elements */
+ char  sds1_name[MAX_NC_NAME]; 
+ char  sds2_name[MAX_NC_NAME]; 
+ int   nfound=0;
+ int   dim_diff=0;             /* dimensions are different */
+ intn  empty1_sds;
+ intn  empty2_sds;
+ VOIDP buf1=NULL;
+ VOIDP buf2=NULL;
+ uint32 max_err_cnt;
+ int   i;
+ VOIDP fill1=NULL;
+ VOIDP fill2=NULL;
+
+/*-------------------------------------------------------------------------
+ * object 1
+ *-------------------------------------------------------------------------
+ */
+  
+ sds1_index = SDreftoindex(sd1_id,ref1);
+ sds1_id    = SDselect(sd1_id,sds1_index);
+ 
+ /*obtain name,rank,dimsizes,datatype and num of attributes of sds */
+ if (SDgetinfo(sds1_id,sds1_name,&rank1,dimsizes1,&dtype1,&nattrs1)==FAIL) {
+   printf( "Failed to get info for SDS ref <%d>\n",ref1);
+   SDendaccess(sds1_id);
+   return FAIL;
+  }
+
+
+/*-------------------------------------------------------------------------
+ * object 2
+ *-------------------------------------------------------------------------
+ */
+
+ sds2_index = SDreftoindex(sd2_id,ref2);
+ sds2_id    = SDselect(sd2_id,sds2_index);
+ 
+ /*obtain name,rank,dimsizes,datatype and num of attributes of sds */
+ if (SDgetinfo(sds2_id,sds2_name,&rank2,dimsizes2,&dtype2,&nattrs2)==FAIL) {
+   printf( "Failed to get info for SDS ref <%d>\n",ref2);
+   SDendaccess(sds2_id);
+   return FAIL;
+  }
+
+
+ /* flag to compare SDSs */
+ if (opt->sd == 1)
+ {
+
+/*-------------------------------------------------------------------------
+ * check for input SDs
+ *-------------------------------------------------------------------------
+ */
+ 
+ if (opt->nlvars > 0)   /* if specified vdata is selected */
+ {
+  int imatch = 0, j;
+  for (j = 0; j < opt->nlvars; j++)
+  {
+   if (strcmp(sds1_name, opt->lvars[j]) == 0)
+   {
+    imatch = 1;
+    break;
+   }
+  }
+  if (imatch == 0)
+  {
+   goto out;
+  }
+ }  
+
+/*-------------------------------------------------------------------------
+ * check for different type
+ *-------------------------------------------------------------------------
+ */
+ 
+ if (dtype1 != dtype2) 
+ {
+  printf("Comparison not supported\n");
+  printf("<%s> has datatype %d, <%s> has datatype %d ",sds1_name,dtype1,sds2_name,dtype2);
+  goto out;
+ }
+
+/*-------------------------------------------------------------------------
+ * check for the same rank
+ *-------------------------------------------------------------------------
+ */
+ 
+ if ( rank1 != rank2 )
+ {
+  printf("Comparison not supported\n");
+  printf("<%s> has rank %d, dimensions ", sds1_name, rank1);
+  print_dims(rank1,dimsizes1);
+  printf("\n" );
+  printf("<%s> has rank %d, dimensions ", sds2_name, rank2);
+  print_dims(rank2,dimsizes2);
+  goto out;
+ }
+
+/*-------------------------------------------------------------------------
+ * check for different dimensions
+ *-------------------------------------------------------------------------
+ */
+ 
+ for ( i=0; i<rank1; i++) 
+ {
+  if ( dimsizes1[i] != dimsizes2[i] )
+   dim_diff=1;
+ }
+
+/*-------------------------------------------------------------------------
+ * dimensions
+ *-------------------------------------------------------------------------
+ */
+
+ if (dim_diff==1)
+ {
+  printf("Comparison not supported\n");
+  printf("<%s> has rank %d, dimensions ", sds1_name, rank1);
+  print_dims(rank1,dimsizes1);
+  printf("\n" );
+  printf("<%s> has rank %d, dimensions ", sds2_name, rank2);
+  print_dims(rank2,dimsizes2);
+  goto out;
+ }
+
+/*-------------------------------------------------------------------------
+ * get size 
+ *-------------------------------------------------------------------------
+ */
+
+ /* compute the number of the bytes for each value. */
+ numtype = dtype1 & DFNT_MASK;
+ eltsz = DFKNTsize(numtype | DFNT_NATIVE);
+
+ /* set edges of SDS */
+ nelms=1;
+ for (i = 0; i < rank1; i++) {
+  nelms   *= dimsizes1[i];
+  edges[i] = dimsizes1[i];
+  start[i] = 0;
+ }
+
+/*-------------------------------------------------------------------------
+ * check if the input SDSs are empty. if so , do not read its data 
+ *-------------------------------------------------------------------------
+ */ 
+ if (SDcheckempty( sds1_id, &empty1_sds ) == FAIL) {
+  printf( "Failed to check empty SDS <%s>\n", sds1_name);
+  nfound=FAIL;
+  goto out;
+ }
+ if (empty1_sds==1 ) {
+  printf( "Empty SDS <%s>\n", sds1_name);
+  goto out;
+ }
+ if (SDcheckempty( sds2_id, &empty2_sds ) == FAIL) {
+  printf( "Failed to check empty SDS <%s>\n", sds2_name);
+  nfound=FAIL;
+  goto out;
+ }
+ if (empty2_sds==1 ) {
+  printf( "Empty SDS <%s>\n", sds2_name);
+  goto out;
+ }
+
+/*-------------------------------------------------------------------------
+ * Read
+ *-------------------------------------------------------------------------
+ */
+ 
+ /* alloc */
+ if ((buf1 = (VOIDP) HDmalloc(nelms * eltsz)) == NULL) {
+  printf( "Failed to allocate %d elements of size %d\n", nelms, eltsz);
+  nfound=FAIL;
+  goto out;
+ }
+ /* read data */
+ if (SDreaddata (sds1_id, start, NULL, edges, buf1) == FAIL) {
+  printf( "Could not read SDS <%s>\n", sds1_name);
+  nfound=FAIL;
+  goto out;
+ }
+ /* alloc */
+ if ((buf2 = (VOIDP) HDmalloc(nelms * eltsz)) == NULL) {
+  printf( "Failed to allocate %d elements of size %d\n", nelms, eltsz);
+  nfound=FAIL;
+  goto out;
+ }
+ /* read data */
+ if (SDreaddata (sds2_id, start, NULL, edges, buf2) == FAIL) {
+  printf( "Could not read SDS <%s>\n", sds2_name);
+  nfound=FAIL;
+  goto out;
+ }
+ 
+/*-------------------------------------------------------------------------
+ * get fill values
+ *-------------------------------------------------------------------------
+ */
+
+ fill1 = (VOIDP) HDmalloc(eltsz);
+ fill2 = (VOIDP) HDmalloc(eltsz);
+ if (fill1!=NULL && SDgetfillvalue(sds1_id,fill1)<0)
+ {
+  HDfree(fill1);
+  fill1=NULL;
+ }
+ if (fill2!=NULL && SDgetfillvalue(sds2_id,fill2)<0)
+ {
+  HDfree(fill2);
+  fill2=NULL;
+ }
+
+/*-------------------------------------------------------------------------
+ * Comparing
+ *-------------------------------------------------------------------------
+ */
+
+ if (opt->verbose)
+ printf("Comparing <%s>\n",sds1_name); 
+
+ /* 
+  If max_err_cnt is set (i.e. not its default -1), use it otherwise set it
+  to tot_err_cnt so it doesn't trip  
+ */
+ max_err_cnt = (opt->max_err_cnt >= 0) ? opt->max_err_cnt : nelms;
+ nfound=array_diff(buf1, 
+                   buf2, 
+                   nelms, 
+                   sds1_name,
+                   sds2_name,
+                   rank1,
+                   dimsizes1,
+                   dtype1, 
+                   opt->err_limit, 
+                   max_err_cnt, 
+                   opt->statistics, 
+                   fill1, 
+                   fill2);
+  
+ } /* flag to compare SDSs */
+ 
+ /* flag to compare SDSs local attributes */
+ if (opt->sa == 1)
+ {
+  diff_sds_attrs(sds1_id,nattrs1,sds2_id,nattrs2,sds1_name);
+ }
+ 
+/*-------------------------------------------------------------------------
+ * close
+ *-------------------------------------------------------------------------
+ */
+
+out:
+ if (SDendaccess(sds1_id)<0) {
+  fprintf(stderr,"SDendaccess FAIL\n");
+  nfound=FAIL;
+ }
+ if (SDendaccess(sds2_id)<0) {
+  fprintf(stderr,"SDendaccess FAIL\n");
+  nfound=FAIL;
+ }
+ if (buf1) free(buf1);
+ if (buf2) free(buf2);
+ if (fill1!=NULL) HDfree(fill1);
+ if (fill2!=NULL) HDfree(fill2);
+
+ return nfound;
+}
+
+
+
+
+/*-------------------------------------------------------------------------
+ * Function: diff_sds_attrs
+ *
+ * Purpose: compare SDS attributes
+ *
+ * Return: 
+ *
+ * Programmer: Pedro Vicente, pvn at ncsa.uiuc.edu
+ *
+ * Date: September 2, 2003
+ *
+ *-------------------------------------------------------------------------
+ */
+
+static
+int diff_sds_attrs(int32 sds1_id,int32 nattrs1,int32 sds2_id,int32 nattrs2,char* sds1_name)
+{
+ int32 dtype1,                 /* SDS data type */
+       nelms1,                 /* number of elements */
+       dtype2,                 /* SDS data type */
+       nelms2;                 /* number of elements */
+ char  attr1_name[MAX_NC_NAME];
+ char  attr2_name[MAX_NC_NAME];
+ VOIDP attr1_buf=NULL;
+ VOIDP attr2_buf=NULL;
+ int   i, cmp;
+
+ if ( nattrs1!=nattrs2) {
+  printf( "Different number of atrributes\n");
+  return -1;
+ }
+
+ /* loop through attributes */
+ for (i = 0; i < nattrs1; i++) 
+ {
+  if (SDattrinfo (sds1_id, i, attr1_name, &dtype1, &nelms1) == FAIL) {
+   printf( "Cannot get info for attribute number %d\n", i);
+   continue;
+  }
+  
+  if (SDattrinfo (sds2_id, i, attr2_name, &dtype2, &nelms2) == FAIL) {
+   printf( "Cannot get info for attribute number %d\n", i);
+   continue;
+  }
+
+  if (dtype1 != dtype2 || nelms1 != nelms2 || (strcmp(attr1_name,attr2_name)!=0)) {
+   printf( "Different information for attribute <%d>\n", i);
+   continue;
+  }
+  
+  attr1_buf = (void *) malloc((unsigned)nelms1*DFKNTsize(dtype1 | DFNT_NATIVE));
+  if (!attr1_buf) {
+   printf("Out of memory!");
+   return -1;
+  }
+  attr2_buf = (void *) malloc((unsigned)nelms2*DFKNTsize(dtype2 | DFNT_NATIVE));
+  if (!attr2_buf) {
+   printf("Out of memory!");
+   return -1;
+  }
+ 
+  if (SDreadattr(sds1_id, i, attr1_buf)==FAIL ) {
+   printf( "Could not read attribute number %d\n", i);
+   if (attr1_buf) free(attr1_buf);
+   if (attr2_buf) free(attr2_buf);
+   continue;
+  }
+  if (SDreadattr(sds2_id, i, attr2_buf)==FAIL ) {
+   printf( "Could not read attribute number %d\n", i);
+   if (attr1_buf) free(attr1_buf);
+   if (attr2_buf) free(attr2_buf);
+   continue;
+  }
+
+
+  cmp = HDmemcmp(attr1_buf,attr2_buf,nelms1*DFKNTsize(dtype1 | DFNT_NATIVE));
+  if (cmp!=0)
+  {
+   printf("\n---------------------------\n");
+   printf ("%s:%s = \n",sds1_name,attr1_name);
+   printf("<<<<\n");
+   pr_att_vals((nc_type)dtype1, nelms1, attr1_buf);
+   printf (" ;\n");
+   printf(">>>>\n");
+   pr_att_vals((nc_type)dtype2, nelms2, attr2_buf);
+   printf (" ;\n");
+
+  }
+
+  if (attr1_buf) free(attr1_buf);
+  if (attr2_buf) free(attr2_buf);
+ 
+ }
+
+ return 1;
+}
+
+
+
+/*-------------------------------------------------------------------------
+ * Function: print_dims
+ *
+ * Purpose: print dimensions
+ *
+ * Programmer: Pedro Vicente, pvn at ncsa.uiuc.edu
+ *
+ * Date: May 9, 2003
+ *
+ * Comments: 
+ *
+ *-------------------------------------------------------------------------
+ */
+void print_dims( int r, int32 *d )
+{
+ int i;
+ printf("[ " );  
+ for ( i=0; i<r; i++ ) 
+  printf("%d ",(int)d[i]  );
+ printf("] " );
+}

Added: packages/libhdf4/branches/upstream/current/mfhdf/hdiff/hdiff_table.c
===================================================================
--- packages/libhdf4/branches/upstream/current/mfhdf/hdiff/hdiff_table.c	                        (rev 0)
+++ packages/libhdf4/branches/upstream/current/mfhdf/hdiff/hdiff_table.c	2007-05-15 09:53:05 UTC (rev 831)
@@ -0,0 +1,205 @@
+/****************************************************************************
+ * NCSA HDF                                                                 *
+ * Software Development Group                                               *
+ * National Center for Supercomputing Applications                          *
+ * University of Illinois at Urbana-Champaign                               *
+ * 605 E. Springfield, Champaign IL 61820                                   *
+ *                                                                          *
+ * For conditions of distribution and use, see the accompanying             *
+ * hdf/COPYING file.                                                        *
+ *                                                                          *
+ ****************************************************************************/
+
+#include <stdio.h>
+#include <stdlib.h>
+
+#include "hdiff_table.h"
+
+/*-------------------------------------------------------------------------
+ * Function: dtable_search
+ *
+ * Purpose: search the table for tag and ref
+ *
+ * Return: index on success, -1 on failure
+ *
+ * Programmer: Pedro Vicente, pvn at ncsa.uiuc.edu
+ *
+ * Date: July 3, 2003
+ *
+ *-------------------------------------------------------------------------
+ */
+
+int dtable_search(dtable_t *table, int32 tag, int32 ref )
+{
+ int i;
+ 
+ for (i = 0; i < table->nobjs; i++)
+  if (table->objs[i].tag == tag && table->objs[i].ref == ref)
+   return i;
+  
+  return -1;
+}
+
+
+/*-------------------------------------------------------------------------
+ * Function: dtable_add
+ *
+ * Purpose: add pair tag/ref and object path to table
+ *
+ * Return: void
+ *
+ * Programmer: Pedro Vicente, pvn at ncsa.uiuc.edu
+ *
+ * Date: July 3, 2003
+ *
+ *-------------------------------------------------------------------------
+ */
+
+void dtable_add(dtable_t *table, int32 tag, int32 ref, char* path)
+{
+ int i;
+ 
+ if (table->nobjs == table->size) {
+  table->size *= 2;
+  table->objs = (dobj_info_t*)realloc(table->objs, table->size * sizeof(dobj_info_t));
+  
+  for (i = table->nobjs; i < table->size; i++) {
+   table->objs[i].tag = table->objs[i].ref = -1;
+   table->objs[i].flags[0] = table->objs[i].flags[1] = -1;
+  }
+ }
+ 
+ i = table->nobjs++;
+ table->objs[i].tag = tag;
+ table->objs[i].ref = ref;
+ strcpy(table->objs[i].obj_name,path);
+ table->objs[i].flags[0] = table->objs[i].flags[1] = -1;
+}
+
+
+
+/*-------------------------------------------------------------------------
+ * Function: dtable_init
+ *
+ * Purpose: initialize table
+ *
+ * Return: void
+ *
+ * Programmer: Pedro Vicente, pvn at ncsa.uiuc.edu
+ *
+ * Date: July 3, 2003
+ *
+ *-------------------------------------------------------------------------
+ */
+
+void dtable_init( dtable_t **tbl )
+{
+ int i;
+ dtable_t* table = (dtable_t*) malloc(sizeof(dtable_t));
+ 
+ table->size = 20;
+ table->nobjs = 0;
+ table->objs = (dobj_info_t*) malloc(table->size * sizeof(dobj_info_t));
+ 
+ for (i = 0; i < table->size; i++) {
+  table->objs[i].tag = table->objs[i].ref = -1;
+  table->objs[i].flags[0] = table->objs[i].flags[1] = -1;
+ }
+ 
+ *tbl = table;
+}
+
+/*-------------------------------------------------------------------------
+ * Function: dtable_free
+ *
+ * Purpose: free table memory
+ *
+ * Return: void
+ *
+ * Programmer: Pedro Vicente, pvn at ncsa.uiuc.edu
+ *
+ * Date: July 3, 2003
+ *
+ *-------------------------------------------------------------------------
+ */
+
+void dtable_free( dtable_t *table )
+{
+ free(table->objs);
+ free(table);
+}
+
+
+/*-------------------------------------------------------------------------
+ * Function: dtable_check
+ *
+ * Purpose: search the table for valid objects
+ *
+ * Return: error string or NULL for success
+ *
+ * Programmer: Pedro Vicente, pvn at ncsa.uiuc.edu
+ *
+ * Date: July 3, 2003
+ *
+ *-------------------------------------------------------------------------
+ */
+
+char* dtable_check(dtable_t *table, char*obj_name)
+{
+ int   i;
+ int32 tag;
+ 
+ for (i = 0; i < table->nobjs; i++)
+ {
+  if (strcmp(table->objs[i].obj_name,obj_name)==0)
+  {
+   /* found the name; check if it is an SDS or Image */
+   tag=table->objs[i].tag;
+   if (tag==DFTAG_SD  ||
+       tag==DFTAG_SDG ||
+       tag==DFTAG_NDG ||
+       tag==DFTAG_RI  ||
+       tag==DFTAG_CI  ||
+       tag==DFTAG_RIG ||
+       tag==DFTAG_RI8 ||
+       tag==DFTAG_CI8 ||
+       tag==DFTAG_II8 ) return NULL; 
+   else return "not compressible/chunk object";
+  }
+ }
+  
+  return "not found";
+}
+
+
+/*-------------------------------------------------------------------------
+ * Function: dtable_print
+ *
+ * Purpose: print object list
+ *
+ * Return: void
+ *
+ * Programmer: Pedro Vicente, pvn at ncsa.uiuc.edu
+ *
+ * Date: August 25, 2003
+ *
+ *-------------------------------------------------------------------------
+ */
+
+void dtable_print(dtable_t *table)
+{
+ int i;
+
+ printf("---------------------------------------\n");
+ printf("%5s %6s    %-15s\n", "Tag", "Ref", "Name");
+ printf("---------------------------------------\n");
+
+ for (i = 0; i < table->nobjs; i++)
+ {
+  printf("%5d %6d    %-15s\n", 
+   table->objs[i].tag, 
+   table->objs[i].ref, 
+   table->objs[i].obj_name);
+ }
+
+}

Added: packages/libhdf4/branches/upstream/current/mfhdf/hdiff/hdiff_table.h
===================================================================
--- packages/libhdf4/branches/upstream/current/mfhdf/hdiff/hdiff_table.h	                        (rev 0)
+++ packages/libhdf4/branches/upstream/current/mfhdf/hdiff/hdiff_table.h	2007-05-15 09:53:05 UTC (rev 831)
@@ -0,0 +1,66 @@
+/****************************************************************************
+ * NCSA HDF                                                                 *
+ * Software Development Group                                               *
+ * National Center for Supercomputing Applications                          *
+ * University of Illinois at Urbana-Champaign                               *
+ * 605 E. Springfield, Champaign IL 61820                                   *
+ *                                                                          *
+ * For conditions of distribution and use, see the accompanying             *
+ * hdf/COPYING file.                                                        *
+ *                                                                          *
+ ****************************************************************************/
+
+
+#ifndef HDIFF_TABLE_H__
+#define HDIFF_TABLE_H__
+
+
+#include "hdf.h"
+#include "mfhdf.h"
+
+#define PFORMAT  "  %-7s %-7s %-7s\n" /*chunk info, compression info, name*/
+#define PFORMAT1 "  %-7s %-7s %-7s"   /*chunk info, compression info, name*/
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+
+/*struct to store the tag/ref and path of an object 
+ the pair tag/ref uniquely identifies an HDF object */
+typedef struct dobj_info_t {
+ int32   tag;
+ int32   ref;
+ char    obj_name[MAX_NC_NAME];
+ int     flags[2];     
+ /*flags that store matching object information
+   between the 2 files 
+   object exists in file = 1
+   does not exist        = 0
+ */
+} dobj_info_t;
+
+/*struct that stores all objects */
+typedef struct dtable_t {
+ int        size;
+ int        nobjs;
+ dobj_info_t *objs;
+} dtable_t;
+
+
+/* table methods */
+void  dtable_init(dtable_t **table);
+void  dtable_free(dtable_t *table);
+int   dtable_search(dtable_t *table, int32 tag, int32 ref );
+void  dtable_add(dtable_t *table, int32 tag, int32 ref, char* obj_name);
+char* dtable_check(dtable_t *table, char*obj_name);
+void  dtable_print(dtable_t *table);
+
+
+
+#ifdef __cplusplus
+}
+#endif
+
+
+#endif  /* HDIFF_TABLE_H__ */

Added: packages/libhdf4/branches/upstream/current/mfhdf/hdiff/hdiff_vs.c
===================================================================
--- packages/libhdf4/branches/upstream/current/mfhdf/hdiff/hdiff_vs.c	                        (rev 0)
+++ packages/libhdf4/branches/upstream/current/mfhdf/hdiff/hdiff_vs.c	2007-05-15 09:53:05 UTC (rev 831)
@@ -0,0 +1,182 @@
+/****************************************************************************
+ * NCSA HDF                                                                 *
+ * Software Development Group                                               *
+ * National Center for Supercomputing Applications                          *
+ * University of Illinois at Urbana-Champaign                               *
+ * 605 E. Springfield, Champaign IL 61820                                   *
+ *                                                                          *
+ * For conditions of distribution and use, see the accompanying             *
+ * hdf/COPYING file.                                                        *
+ *                                                                          *
+ ****************************************************************************/
+
+
+#include "hdiff.h"
+#include "hdiff_list.h"
+#include "hdiff_mattbl.h"
+
+/*-------------------------------------------------------------------------
+ * Function: diff_vs
+ *
+ * Purpose: diff for VS 
+ *
+ * Return: Number of differences found
+ *
+ * Programmer: Pedro Vicente, pvn at ncsa.uiuc.edu
+ *
+ * Date: August 26, 2003
+ *
+ *-------------------------------------------------------------------------
+ */
+
+int diff_vs( int32 file1_id,
+             int32 file2_id,
+             int32 ref1,              
+             int32 ref2,
+             diff_opt_t * opt)          
+{
+ int32 vdata1_id,             /* vdata identifier */
+       n_records1,            /* number of records */
+       vdata1_size, 
+       interlace1_mode,
+       vdata2_id,             /* vdata identifier */
+       n_records2,            /* number of records */
+       vdata2_size, 
+       interlace2_mode;
+ char  vdata1_name [VSNAMELENMAX];
+ char  vdata1_class[VSNAMELENMAX];
+ char  fieldname1_list[VSFIELDMAX*FIELDNAMELENMAX];
+ char  vdata2_name [VSNAMELENMAX];
+ char  vdata2_class[VSNAMELENMAX];
+ char  fieldname2_list[VSFIELDMAX*FIELDNAMELENMAX];
+ int   ret=0;
+
+
+ 
+/*-------------------------------------------------------------------------
+ * object 1
+ *-------------------------------------------------------------------------
+ */
+
+ if (Vstart (file1_id)==FAIL) {
+  printf("Error: Could not start VS interface in VS ref %d\n", ref1);
+  return FAIL;
+ }
+
+ if ((vdata1_id  = VSattach (file1_id, ref1, "r")) == FAIL ){
+  printf( "Failed to attach VS ref %d\n", ref1);
+  return FAIL;
+ }
+ if (VSgetname  (vdata1_id, vdata1_name) == FAIL ){
+  printf( "Failed to name for VS ref %d\n", ref1);
+  ret=-1;
+  goto out;
+ }
+ if (VSgetclass (vdata1_id, vdata1_class) == FAIL ){
+  printf( "Failed to name for VS ref %d\n", ref1);
+  ret=-1;
+  goto out;
+ }
+ 
+ if (VSinquire(vdata1_id, &n_records1, &interlace1_mode, fieldname1_list, 
+  &vdata1_size, vdata1_name) == FAIL) {
+  printf( "Failed to get info for VS ref %d\n", ref1);
+  ret=-1;
+  goto out;
+ }
+ 
+ if (VFnfields(vdata1_id)== FAIL ){
+  printf( "Failed getting fields forVS ref %d\n", ref1);
+  ret=-1;
+  goto out;
+ }
+ 
+
+/*-------------------------------------------------------------------------
+ * object 2
+ *-------------------------------------------------------------------------
+ */
+
+ if (Vstart (file2_id)==FAIL) {
+  printf("Error: Could not start VS interface in VS ref %d\n", ref1);
+  return FAIL;
+ }
+
+ if ((vdata2_id  = VSattach (file2_id, ref2, "r")) == FAIL ){
+  printf( "Failed to attach VS ref %d\n", ref2);
+  ret=-2;
+  goto out;
+ }
+ if (VSgetname  (vdata2_id, vdata2_name) == FAIL ){
+  printf( "Failed to name for VS ref %d\n", ref2);
+  ret=-2;
+  goto out;
+ }
+ if (VSgetclass (vdata2_id, vdata2_class) == FAIL ){
+  printf( "Failed to name for VS ref %d\n", ref2);
+  ret=-2;
+  goto out;
+ }
+ 
+ if (VSinquire(vdata2_id, &n_records2, &interlace2_mode, fieldname2_list, 
+  &vdata2_size, vdata2_name) == FAIL) {
+  printf( "Failed to get info for VS ref %d\n", ref2);
+  ret=-2;
+  goto out;
+ }
+ 
+ if (VFnfields(vdata2_id)== FAIL ){
+  printf( "Failed getting fields forVS ref %d\n", ref2);
+  ret=-2;
+  goto out;
+ }
+
+/*-------------------------------------------------------------------------
+ * check for input VSs
+ *-------------------------------------------------------------------------
+ */
+ 
+ if (opt->nuvars > 0)   /* if specified vdata is selected */
+ {
+  int imatch = 0, j;
+  for (j = 0; j < opt->nuvars; j++)
+  {
+   if (strcmp(vdata1_name, opt->uvars[j]) == 0)
+   {
+    imatch = 1;
+    break;
+   }
+  }
+  if (imatch == 0)
+  {
+   goto out;
+  }
+ }   
+
+
+/*-------------------------------------------------------------------------
+ * Comparing
+ *-------------------------------------------------------------------------
+ */
+
+ if (opt->verbose)
+ printf("Comparing <%s>\n",vdata1_name);  
+
+ ret=vdata_cmp(vdata1_id,vdata2_id,vdata1_name,vdata1_class,opt->max_err_cnt);
+
+out:
+ /* terminate access to the VSs */
+ if (VSdetach (vdata1_id)==FAIL) {
+  printf( "Failed to dettach VS ref %d\n", ref1);
+ }
+ if (VSdetach (vdata2_id)==FAIL) {
+  printf( "Failed to dettach VS ref %d\n", ref2);
+ }
+ 
+ return ret;
+}
+
+
+
+
+

Added: packages/libhdf4/branches/upstream/current/mfhdf/hdiff/hdifftst.c
===================================================================
--- packages/libhdf4/branches/upstream/current/mfhdf/hdiff/hdifftst.c	                        (rev 0)
+++ packages/libhdf4/branches/upstream/current/mfhdf/hdiff/hdifftst.c	2007-05-15 09:53:05 UTC (rev 831)
@@ -0,0 +1,209 @@
+#include "mfhdf.h"
+ 
+#define X_LENGTH      2
+#define Y_LENGTH      3
+#define RANK          2  /* Number of dimensions of the SDS */
+#define FILE_ATTR_NAME "File_contents"
+#define SDS_ATTR_NAME  "Valid_range"
+
+
+#define  CLASS1_NAME    "5x1 Array"
+#define  CLASS2_NAME    "6x4 Array"
+#define  VDATA1_NAME    "vdata1"
+#define  VDATA2_NAME    "vdata2"
+#define  FIELD1_NAME    "Single-component Field"
+#define  FIELD2_NAME    "Multi-component Field"
+#define  N_RECORDS_1    5    /* number of records the first vdata contains  */
+#define  N_RECORDS_2    2    /* number of records the second vdata contains */
+#define  ORDER_2        4    /* order of the field in the second vdata      */
+
+#define  CLASS3_NAME       "Particle Data"
+#define  VDATA3_NAME       "vdata3"
+#define  FIELD3_NAME1      "Position"      /* contains x, y, z values */
+#define  FIELD3_NAME2      "Mass"          /* contains weight values */
+#define  FIELD3_NAME3      "Temperature"   /* contains min and max values */
+#define  FIELDNAME3_LIST   "Position,Mass,Temperature" /* No spaces b/w names */
+#define  ORDER3_1          3         /* order of first field */
+#define  ORDER3_2          1         /* order of second field */
+#define  ORDER3_3          2         /* order of third field */
+#define  N_VALS_PER_REC   (ORDER3_1 + ORDER3_2 + ORDER3_3)  /* number of values per record */
+
+
+int
+main( ) 
+{
+ int32 sd1_id, sd2_id;       /* SD interface identifier */
+ int32 sds1_id, sds2_id;     /* data set identifiers */
+ int32 dim_sizes[2];         /* sizes of the SDS dimensions */
+ int32 start[2], edges[2];
+ intn  status;
+ int32 status_32;
+ int32 n_values;
+ int32 buf1a[Y_LENGTH][X_LENGTH] = {{1,1},{1,1},{5,6}};
+ int32 buf1b[Y_LENGTH][X_LENGTH] = {{1,2},{3,4},{5,6}};
+ char8 bufga1[] = "Storm_track_data1"; 
+ char8 bufga2[] = "Storm_track_data2"; 
+ float32 bufa1[2] = {1., 1.};
+ float32 bufa2[2] = {1., 2.};
+                                                                     
+
+ /*vdata*/
+ int32 file1_id; 
+ int32 file2_id; 
+ int32 vdata1_id, vdata2_id;
+ char8 vdata1_buf1 [N_RECORDS_1] = {'V', 'D', 'A', 'T', 'A'};
+ char8 vdata1_buf2 [N_RECORDS_1] = {'X', 'D', 'A', 'T', 'A'};
+ int32 vdata2_buf1  [N_RECORDS_2][ORDER_2] = {{1, 2, 3, 4}, {5, 6, 7, 8}};
+ int32 vdata2_buf2  [N_RECORDS_2][ORDER_2] = {{1, 1, 1, 1}, {5, 6, 7, 8}};
+ float32 vdata3_buf1[N_RECORDS_2][N_VALS_PER_REC]={{1,2,3,4,5,6},{7,8,9,10,11,12}}; 
+ float32 vdata3_buf2[N_RECORDS_2][N_VALS_PER_REC]={{1,1,1,1,1,1},{7,8,9,10,11,12}}; 
+ 
+/* Define the location and size of the data to be written to the data set*/
+ start[0] = 0;
+ start[1] = 0;
+ edges[0] = Y_LENGTH;
+ edges[1] = X_LENGTH;
+
+/* Define the dimensions of the array to be created */
+ dim_sizes[0] = Y_LENGTH;
+ dim_sizes[1] = X_LENGTH;
+
+/*-------------------------------------------------------------------------
+ * SD data
+ *-------------------------------------------------------------------------
+ */
+ 
+/* Create the files and initialize the SD interface */
+ sd1_id = SDstart ("hdifftst1.hdf", DFACC_CREATE);
+ sd2_id = SDstart ("hdifftst2.hdf", DFACC_CREATE);
+
+/* Set a global attribute */
+ n_values  = sizeof(bufga1);
+ status = SDsetattr (sd1_id, FILE_ATTR_NAME, DFNT_CHAR8, n_values, (VOIDP)bufga1);
+ status = SDsetattr (sd2_id, FILE_ATTR_NAME, DFNT_CHAR8, n_values, (VOIDP)bufga2);
+  
+/* Create the data set */ 
+ sds1_id = SDcreate (sd1_id, "dset1", DFNT_INT32, RANK, dim_sizes);
+ sds2_id = SDcreate (sd2_id, "dset1", DFNT_INT32, RANK, dim_sizes);
+
+/* Assign attribute */
+ n_values  = 2;
+ status = SDsetattr (sds1_id, SDS_ATTR_NAME, DFNT_FLOAT32, n_values, (VOIDP)bufa1);
+ status = SDsetattr (sds2_id, SDS_ATTR_NAME, DFNT_FLOAT32, n_values, (VOIDP)bufa2);
+
+ 
+/* Write the stored data to the data set */
+ status = SDwritedata (sds1_id, start, NULL, edges, (VOIDP)buf1a);
+ status = SDwritedata (sds2_id, start, NULL, edges, (VOIDP)buf1b);
+ 
+/* Terminate access to the data set */
+ status = SDendaccess (sds1_id);
+ status = SDendaccess (sds2_id);
+
+ /* Create another data set */ 
+ sds1_id = SDcreate (sd1_id, "dset2", DFNT_INT32, RANK, dim_sizes);
+ sds2_id = SDcreate (sd2_id, "dset2", DFNT_INT32, RANK, dim_sizes);
+ status = SDwritedata (sds1_id, start, NULL, edges, (VOIDP)buf1a);
+ status = SDwritedata (sds2_id, start, NULL, edges, (VOIDP)buf1b);
+ status = SDendaccess (sds1_id);
+ status = SDendaccess (sds2_id);
+
+
+/*-------------------------------------------------------------------------
+ * end SD 
+ *-------------------------------------------------------------------------
+ */
+ 
+/* Terminate access to the SD interface and close the file */
+ status = SDend (sd1_id);
+ status = SDend (sd2_id);
+
+
+
+/*-------------------------------------------------------------------------
+ * VD data 
+ *-------------------------------------------------------------------------
+ */
+
+/* Open the HDF file for writing */
+ file1_id = Hopen ("hdifftst1.hdf", DFACC_WRITE, 0);
+ file2_id = Hopen ("hdifftst2.hdf", DFACC_WRITE, 0);
+ 
+/* Initialize the VS interface */
+ status = Vstart (file1_id);
+ status = Vstart (file2_id);
+
+/*-------------------------------------------------------------------------
+ * VD data one field
+ *-------------------------------------------------------------------------
+ */
+ 
+/* Create the first vdata and populate it with data from vdata1_buf */
+ VHstoredata (file1_id, FIELD1_NAME, (uint8 *)vdata1_buf1, 
+  N_RECORDS_1, DFNT_CHAR8, VDATA1_NAME, CLASS1_NAME); 
+ VHstoredata (file2_id, FIELD1_NAME, (uint8 *)vdata1_buf2, 
+  N_RECORDS_1, DFNT_CHAR8, VDATA1_NAME, CLASS1_NAME); 
+
+/*-------------------------------------------------------------------------
+ * VD data one field, order 4
+ *-------------------------------------------------------------------------
+ */
+ 
+/* Create the second vdata and populate it with data from vdata2_buf */
+ VHstoredatam (file1_id, FIELD2_NAME, (uint8 *)vdata2_buf1, 
+  N_RECORDS_2, DFNT_INT32, VDATA2_NAME, CLASS2_NAME, ORDER_2); 
+ VHstoredatam (file2_id, FIELD2_NAME, (uint8 *)vdata2_buf2, 
+  N_RECORDS_2, DFNT_INT32, VDATA2_NAME, CLASS2_NAME, ORDER_2); 
+
+/*-------------------------------------------------------------------------
+ * VD data several fields
+ *-------------------------------------------------------------------------
+ */
+
+/* Create a new vdata */
+ vdata1_id = VSattach (file1_id, -1, "w");
+ vdata2_id = VSattach (file2_id, -1, "w");
+
+/* Set name and class name of the vdata */
+ status_32 = VSsetname (vdata1_id, VDATA3_NAME);
+ status_32 = VSsetclass (vdata1_id, CLASS3_NAME);
+ status_32 = VSsetname (vdata2_id, VDATA3_NAME);
+ status_32 = VSsetclass (vdata2_id, CLASS3_NAME);
+
+/* Define fields */
+ status = VSfdefine (vdata1_id, FIELD3_NAME1, DFNT_FLOAT32, ORDER3_1 );
+ status = VSfdefine (vdata1_id, FIELD3_NAME2, DFNT_FLOAT32, ORDER3_2 );
+ status = VSfdefine (vdata1_id, FIELD3_NAME3, DFNT_FLOAT32, ORDER3_3 );
+ status = VSsetfields (vdata1_id, FIELDNAME3_LIST);
+ status = VSfdefine (vdata2_id, FIELD3_NAME1, DFNT_FLOAT32, ORDER3_1 );
+ status = VSfdefine (vdata2_id, FIELD3_NAME2, DFNT_FLOAT32, ORDER3_2 );
+ status = VSfdefine (vdata2_id, FIELD3_NAME3, DFNT_FLOAT32, ORDER3_3 );
+ status = VSsetfields (vdata2_id, FIELDNAME3_LIST);
+
+/* Write the data with full interlacing mode */
+ VSwrite (vdata1_id, (uint8 *)vdata3_buf1, N_RECORDS_2, FULL_INTERLACE);
+ VSwrite (vdata2_id, (uint8 *)vdata3_buf2, N_RECORDS_2, FULL_INTERLACE);
+
+ status_32 = VSdetach (vdata1_id);
+ status_32 = VSdetach (vdata2_id);
+
+/*-------------------------------------------------------------------------
+ * end VD data 
+ *-------------------------------------------------------------------------
+ */
+ 
+/* Terminate access to the VS interface and close the HDF file */
+ status = Vend (file1_id);
+ status = Vend (file2_id);
+ status_32 = Hclose (file1_id);
+ status_32 = Hclose (file2_id);
+
+ /* shut compiler */
+ status=status;
+ status_32=status_32;
+
+ return 0;
+
+}
+
+

Added: packages/libhdf4/branches/upstream/current/mfhdf/hdiff/testfiles/hdiff_01.txt
===================================================================
--- packages/libhdf4/branches/upstream/current/mfhdf/hdiff/testfiles/hdiff_01.txt	                        (rev 0)
+++ packages/libhdf4/branches/upstream/current/mfhdf/hdiff/testfiles/hdiff_01.txt	2007-05-15 09:53:05 UTC (rev 831)
@@ -0,0 +1,16 @@
+#############################
+Expected output for 'hdiff '
+#############################
+hdiff [-b] [-g] [-s] [-d] [-S] [-v ...] [-e counnt] [-t limit] file1 file2
+  [-b]              Verbose mode
+  [-g]              Compare global attributes only
+  [-s]              Compare SD local attributes only
+  [-d]              Compare SD data only
+  [-D]              Compare Vdata data only
+  [-S]              Print statistics
+  [-v var1[,...]]   Compare SD data on variable(s) <var1>,... only
+  [-u var1[,...]]   Compare vdata on variable(s) <var1>,... only
+  [-e count]        Print difference up to count number for each variable
+  [-t limit]        Print difference when it is greater than limit
+  file1             File name of the first input HDF file
+  file2             File name of the second input HDF file

Added: packages/libhdf4/branches/upstream/current/mfhdf/hdiff/testfiles/hdiff_02.txt
===================================================================
--- packages/libhdf4/branches/upstream/current/mfhdf/hdiff/testfiles/hdiff_02.txt	                        (rev 0)
+++ packages/libhdf4/branches/upstream/current/mfhdf/hdiff/testfiles/hdiff_02.txt	2007-05-15 09:53:05 UTC (rev 831)
@@ -0,0 +1,8 @@
+#############################
+Expected output for 'hdiff -g hdifftst1.hdf hdifftst2.hdf'
+#############################
+
+---------------------------
+Attr Name: File_contents
+< "Storm_track_data1"
+> "Storm_track_data2"

Added: packages/libhdf4/branches/upstream/current/mfhdf/hdiff/testfiles/hdiff_03.txt
===================================================================
--- packages/libhdf4/branches/upstream/current/mfhdf/hdiff/testfiles/hdiff_03.txt	                        (rev 0)
+++ packages/libhdf4/branches/upstream/current/mfhdf/hdiff/testfiles/hdiff_03.txt	2007-05-15 09:53:05 UTC (rev 831)
@@ -0,0 +1,10 @@
+#############################
+Expected output for 'hdiff -s hdifftst1.hdf hdifftst2.hdf'
+#############################
+
+---------------------------
+dset1:Valid_range = 
+<<<<
+1.f, 1.f ;
+>>>>
+1.f, 2.f ;

Added: packages/libhdf4/branches/upstream/current/mfhdf/hdiff/testfiles/hdiff_04.txt
===================================================================
--- packages/libhdf4/branches/upstream/current/mfhdf/hdiff/testfiles/hdiff_04.txt	                        (rev 0)
+++ packages/libhdf4/branches/upstream/current/mfhdf/hdiff/testfiles/hdiff_04.txt	2007-05-15 09:53:05 UTC (rev 831)
@@ -0,0 +1,13 @@
+#############################
+Expected output for 'hdiff -d hdifftst1.hdf hdifftst2.hdf'
+#############################
+position        dset1           dset1           difference          
+------------------------------------------------------------
+[ 0 1 ]          1               2               1              
+[ 1 0 ]          1               3               2              
+[ 1 1 ]          1               4               3              
+position        dset2           dset2           difference          
+------------------------------------------------------------
+[ 0 1 ]          1               2               1              
+[ 1 0 ]          1               3               2              
+[ 1 1 ]          1               4               3              

Added: packages/libhdf4/branches/upstream/current/mfhdf/hdiff/testfiles/hdiff_05.txt
===================================================================
--- packages/libhdf4/branches/upstream/current/mfhdf/hdiff/testfiles/hdiff_05.txt	                        (rev 0)
+++ packages/libhdf4/branches/upstream/current/mfhdf/hdiff/testfiles/hdiff_05.txt	2007-05-15 09:53:05 UTC (rev 831)
@@ -0,0 +1,18 @@
+#############################
+Expected output for 'hdiff -D hdifftst1.hdf hdifftst2.hdf'
+#############################
+
+---------------------------
+Vdata Name: vdata1 (Data record comparison)
+> 0: V
+< 0: X
+
+---------------------------
+Vdata Name: vdata2 (Data record comparison)
+> 0: 1 2 3 4 
+< 0: 1 1 1 1 
+
+---------------------------
+Vdata Name: vdata3 (Data record comparison)
+> 0: 1.000000 2.000000 3.000000 4.000000 5.000000 6.000000 
+< 0: 1.000000 1.000000 1.000000 1.000000 1.000000 1.000000 

Added: packages/libhdf4/branches/upstream/current/mfhdf/hdiff/testfiles/hdiff_06.txt
===================================================================
--- packages/libhdf4/branches/upstream/current/mfhdf/hdiff/testfiles/hdiff_06.txt	                        (rev 0)
+++ packages/libhdf4/branches/upstream/current/mfhdf/hdiff/testfiles/hdiff_06.txt	2007-05-15 09:53:05 UTC (rev 831)
@@ -0,0 +1,21 @@
+#############################
+Expected output for 'hdiff -d -S hdifftst1.hdf hdifftst2.hdf'
+#############################
+position        dset1           dset1           difference          
+------------------------------------------------------------
+[ 0 1 ]          1               2               1              
+[ 1 0 ]          1               3               2              
+[ 1 1 ]          1               4               3              
+Type: Integer4  Npts: 6  Ndiff: 3 (50.000000%)
+Avg Diff: 1.000000e+00   Max. Diff: 3
+Range File1: 1/6  File2: 1/6
+Regression  N: 6  Slope: 6.727273e-01  Intercept: 1.818182e+00  R: 8.433083e-01
+position        dset2           dset2           difference          
+------------------------------------------------------------
+[ 0 1 ]          1               2               1              
+[ 1 0 ]          1               3               2              
+[ 1 1 ]          1               4               3              
+Type: Integer4  Npts: 6  Ndiff: 3 (50.000000%)
+Avg Diff: 1.000000e+00   Max. Diff: 3
+Range File1: 1/6  File2: 1/6
+Regression  N: 6  Slope: 6.727273e-01  Intercept: 1.818182e+00  R: 8.433083e-01

Added: packages/libhdf4/branches/upstream/current/mfhdf/hdiff/testfiles/hdiff_07.txt
===================================================================
--- packages/libhdf4/branches/upstream/current/mfhdf/hdiff/testfiles/hdiff_07.txt	                        (rev 0)
+++ packages/libhdf4/branches/upstream/current/mfhdf/hdiff/testfiles/hdiff_07.txt	2007-05-15 09:53:05 UTC (rev 831)
@@ -0,0 +1,8 @@
+#############################
+Expected output for 'hdiff -d -v dset1 hdifftst1.hdf hdifftst2.hdf'
+#############################
+position        dset1           dset1           difference          
+------------------------------------------------------------
+[ 0 1 ]          1               2               1              
+[ 1 0 ]          1               3               2              
+[ 1 1 ]          1               4               3              

Added: packages/libhdf4/branches/upstream/current/mfhdf/hdiff/testfiles/hdiff_08.txt
===================================================================
--- packages/libhdf4/branches/upstream/current/mfhdf/hdiff/testfiles/hdiff_08.txt	                        (rev 0)
+++ packages/libhdf4/branches/upstream/current/mfhdf/hdiff/testfiles/hdiff_08.txt	2007-05-15 09:53:05 UTC (rev 831)
@@ -0,0 +1,8 @@
+#############################
+Expected output for 'hdiff -D -u vdata1 hdifftst1.hdf hdifftst2.hdf'
+#############################
+
+---------------------------
+Vdata Name: vdata1 (Data record comparison)
+> 0: V
+< 0: X

Added: packages/libhdf4/branches/upstream/current/mfhdf/hdiff/testfiles/hdiff_09.txt
===================================================================
--- packages/libhdf4/branches/upstream/current/mfhdf/hdiff/testfiles/hdiff_09.txt	                        (rev 0)
+++ packages/libhdf4/branches/upstream/current/mfhdf/hdiff/testfiles/hdiff_09.txt	2007-05-15 09:53:05 UTC (rev 831)
@@ -0,0 +1,11 @@
+#############################
+Expected output for 'hdiff -d -e 2 hdifftst1.hdf hdifftst2.hdf'
+#############################
+position        dset1           dset1           difference          
+------------------------------------------------------------
+[ 0 1 ]          1               2               1              
+[ 1 0 ]          1               3               2              
+position        dset2           dset2           difference          
+------------------------------------------------------------
+[ 0 1 ]          1               2               1              
+[ 1 0 ]          1               3               2              

Added: packages/libhdf4/branches/upstream/current/mfhdf/hdiff/testfiles/hdiff_10.txt
===================================================================
--- packages/libhdf4/branches/upstream/current/mfhdf/hdiff/testfiles/hdiff_10.txt	                        (rev 0)
+++ packages/libhdf4/branches/upstream/current/mfhdf/hdiff/testfiles/hdiff_10.txt	2007-05-15 09:53:05 UTC (rev 831)
@@ -0,0 +1,9 @@
+#############################
+Expected output for 'hdiff -d -t 2 hdifftst1.hdf hdifftst2.hdf'
+#############################
+position        dset1           dset1           difference          
+------------------------------------------------------------
+[ 1 1 ]          1               4               3              
+position        dset2           dset2           difference          
+------------------------------------------------------------
+[ 1 1 ]          1               4               3              

Added: packages/libhdf4/branches/upstream/current/mfhdf/hdiff/testfiles/hdiff_11.txt
===================================================================
--- packages/libhdf4/branches/upstream/current/mfhdf/hdiff/testfiles/hdiff_11.txt	                        (rev 0)
+++ packages/libhdf4/branches/upstream/current/mfhdf/hdiff/testfiles/hdiff_11.txt	2007-05-15 09:53:05 UTC (rev 831)
@@ -0,0 +1,40 @@
+#############################
+Expected output for 'hdiff hdifftst1.hdf hdifftst2.hdf'
+#############################
+position        dset1           dset1           difference          
+------------------------------------------------------------
+[ 0 1 ]          1               2               1              
+[ 1 0 ]          1               3               2              
+[ 1 1 ]          1               4               3              
+
+---------------------------
+dset1:Valid_range = 
+<<<<
+1.f, 1.f ;
+>>>>
+1.f, 2.f ;
+position        dset2           dset2           difference          
+------------------------------------------------------------
+[ 0 1 ]          1               2               1              
+[ 1 0 ]          1               3               2              
+[ 1 1 ]          1               4               3              
+
+---------------------------
+Vdata Name: vdata1 (Data record comparison)
+> 0: V
+< 0: X
+
+---------------------------
+Vdata Name: vdata2 (Data record comparison)
+> 0: 1 2 3 4 
+< 0: 1 1 1 1 
+
+---------------------------
+Vdata Name: vdata3 (Data record comparison)
+> 0: 1.000000 2.000000 3.000000 4.000000 5.000000 6.000000 
+< 0: 1.000000 1.000000 1.000000 1.000000 1.000000 1.000000 
+
+---------------------------
+Attr Name: File_contents
+< "Storm_track_data1"
+> "Storm_track_data2"

Added: packages/libhdf4/branches/upstream/current/mfhdf/hdiff/testfiles/hdifftst1.hdf
===================================================================
(Binary files differ)


Property changes on: packages/libhdf4/branches/upstream/current/mfhdf/hdiff/testfiles/hdifftst1.hdf
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: packages/libhdf4/branches/upstream/current/mfhdf/hdiff/testfiles/hdifftst2.hdf
===================================================================
(Binary files differ)


Property changes on: packages/libhdf4/branches/upstream/current/mfhdf/hdiff/testfiles/hdifftst2.hdf
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Added: packages/libhdf4/branches/upstream/current/mfhdf/hdiff/testhdiff.sh
===================================================================
--- packages/libhdf4/branches/upstream/current/mfhdf/hdiff/testhdiff.sh	                        (rev 0)
+++ packages/libhdf4/branches/upstream/current/mfhdf/hdiff/testhdiff.sh	2007-05-15 09:53:05 UTC (rev 831)
@@ -0,0 +1,171 @@
+#! /bin/sh
+# Tests for the hdiff tool
+
+HDIFF=hdiff               # The tool name
+HDIFF_BIN=`pwd`/$HDIFF    # The path of the tool binary
+
+CMP='cmp -s'
+DIFF='diff -c'
+
+nerrors=0
+verbose=yes
+
+# The build (current) directory might be different than the source directory.
+if test -z "$srcdir"; then
+   srcdir=.
+fi
+
+test -d testfiles || mkdir testfiles
+
+# Print message with formats according to message level ($1)
+MESG() {
+  level=$1
+  shift
+  case $level in
+    0)
+      echo '============================='
+      echo $*
+      echo '============================='
+      ;;
+    3)
+      echo '-----------------------------'
+      echo $*
+      echo '-----------------------------'
+      ;;
+    6)
+      echo "*** $* ***"
+      ;;
+    *)
+      echo "MESG(): Unknown level ($level)"
+      exit 1
+      ;;
+  esac
+}
+
+
+# Report the result and exit
+FINISH()
+{
+    if [ $nerrors -eq 0 ]
+    then
+	MESG 0 "All hdiff tests passed"
+    else
+	MESG 0 "hdiff tests failed: $nerrors"
+    fi
+    exit $nerrors
+}
+
+# Print a line-line message left justified in a field of 70 characters
+# beginning with the word "Testing".
+#
+TESTING() {
+   SPACES="                                                               "
+   echo "Testing $* $SPACES" | cut -c1-70 | tr -d '\012'
+}
+
+# Run a test and print PASS or *FAIL*.  If a test fails then increment
+# the `nerrors' global variable and (if $verbose is set) display the
+# difference between the actual output and the expected output. The
+# expected output is given as the first argument to this function and
+# the actual output file is calculated by replacing the `.ddl' with
+# `.out'.  The actual output is not removed if $HDF5_NOCLEANUP has a
+# non-zero value.
+#
+TOOLTEST() {
+   expect="$srcdir/testfiles/$1"
+   actual="testfiles/`basename $1 .txt`.out"
+   actual_err="testfiles/`basename $1 .txt`.err"
+   shift
+
+   # Run test.
+   # Tflops interprets "$@" as "" when no parameter is given (e.g., the
+   # case of missing file name).  Changed it to use $@ till Tflops fixes it.
+   TESTING $HDIFF $@
+   (
+      echo "#############################"
+      echo "Expected output for '$HDIFF $@'" 
+      echo "#############################"
+      cd $srcdir/testfiles
+      if [ "`uname -s`" = "TFLOPS O/S" ]; then
+        $RUNSERIAL $HDIFF_BIN $@
+      else
+        $RUNSERIAL $HDIFF_BIN "$@"
+      fi
+   ) >$actual 2>$actual_err
+   cat $actual_err >> $actual
+
+ 
+   # Used only to create the output file; uncomment to create
+   #   if [ ! -f $expect ]; then
+   # Create the expected file if it doesn't yet exist.
+   #   echo " CREATED"
+   #   cp $actual $expect
+   #   elif
+   if $CMP $expect $actual; then
+      echo " PASSED"
+   else
+      echo "*FAILED*"
+      echo "    Expected result (*.txt) differs from actual result (*.out)"
+      nerrors="`expr $nerrors + 1`"
+      test yes = "$verbose" && $DIFF $expect $actual |sed 's/^/    /'
+   fi
+
+   # Clean up output file
+     if test -z "$HDF4_NOCLEANUP"; then
+     rm -f $actual $actual_err
+     fi
+}
+
+
+
+
+RUN() {
+
+# help message
+TOOLTEST hdiff_01.txt 
+
+# Compare global attributes only
+TOOLTEST hdiff_02.txt -g hdifftst1.hdf hdifftst2.hdf
+
+# Compare SD local attributes only
+TOOLTEST hdiff_03.txt -s hdifftst1.hdf hdifftst2.hdf
+
+# Compare SD data only
+TOOLTEST hdiff_04.txt -d hdifftst1.hdf hdifftst2.hdf
+
+# Compare Vdata data only
+TOOLTEST hdiff_05.txt -D hdifftst1.hdf hdifftst2.hdf
+
+# Print statistics
+TOOLTEST hdiff_06.txt -d -S hdifftst1.hdf hdifftst2.hdf
+
+# Compare SD data on variable(s)
+TOOLTEST hdiff_07.txt -d -v dset1 hdifftst1.hdf hdifftst2.hdf
+
+# Compare vdata on variable(s) 
+TOOLTEST hdiff_08.txt -D -u vdata1 hdifftst1.hdf hdifftst2.hdf
+
+# Print difference up to count number
+TOOLTEST hdiff_09.txt -d -e 2 hdifftst1.hdf hdifftst2.hdf
+
+# Print difference when it is greater than limit
+TOOLTEST hdiff_10.txt -d -t 2 hdifftst1.hdf hdifftst2.hdf
+
+# no options
+TOOLTEST hdiff_11.txt hdifftst1.hdf hdifftst2.hdf
+
+}
+
+
+##############################################################################
+###			  T H E   T E S T S                                            ###
+##############################################################################
+
+# Print a beginning banner
+MESG 0 "Running hdiff tests"
+
+# compare output
+RUN
+
+# End of test, return exit code
+FINISH


Property changes on: packages/libhdf4/branches/upstream/current/mfhdf/hdiff/testhdiff.sh
___________________________________________________________________
Name: svn:executable
   + *

Added: packages/libhdf4/branches/upstream/current/mfhdf/hrepack/Makefile.am
===================================================================
--- packages/libhdf4/branches/upstream/current/mfhdf/hrepack/Makefile.am	                        (rev 0)
+++ packages/libhdf4/branches/upstream/current/mfhdf/hrepack/Makefile.am	2007-05-15 09:53:05 UTC (rev 831)
@@ -0,0 +1,60 @@
+#############################################################################
+##                      Setup for building programs                        ##
+#############################################################################
+
+## Setup the different includes and preprocessor #defines we need.
+INCLUDES=-I$(top_srcdir)/hdf/src        \
+         -I$(top_srcdir)/mfhdf/hdiff    \
+         -I$(top_srcdir)/mfhdf/libsrc   \
+         -I$(top_srcdir)/mfhdf/port     \
+         -I../libsrc
+DEFINES=-DNDEBUG -DHDF
+AM_CPPFLAGS=$(INCLUDES) $(DEFINES)
+
+#############################################################################
+##                          Programs to build                              ##
+#############################################################################
+
+bin_PROGRAMS = hrepack
+
+hrepack_SOURCES = hrepack.c hrepack_an.c hrepack_cmp.c hrepack_gr.c         \
+                  hrepack_list.c hrepack_lsttable.c hrepack_main.c          \
+                  hrepack_opttable.c hrepack_pal.c hrepack_parse.c          \
+                  hrepack_sds.c hrepack_sdutil.c hrepack_utils.c            \
+                  hrepack_vg.c hrepack_vs.c
+hrepack_LDADD = ../libsrc/libmfhdf.a $(top_builddir)/hdf/src/libdf.a
+hrepack_DEPENDENCIES = $(top_builddir)/hdf/src/libdf.a ../libsrc/libmfhdf.a
+
+#############################################################################
+##                   Testing -- Here there be dragons.                     ##
+#############################################################################
+
+check_PROGRAMS = hrepack_check test_hrepack
+check_SCRIPTS = test_hrepack.sh
+
+test_hrepack_SOURCES = hrepack.c hrepack_an.c hrepack_cmp.c hrepack_gr.c    \
+                       hrepack_list.c hrepack_lsttable.c hrepack_opttable.c \
+                       hrepack_pal.c hrepack_parse.c hrepack_sds.c          \
+                       hrepack_sdutil.c hrepack_utils.c hrepack_vg.c        \
+                       hrepack_vs.c test_hrepack_add.c test_hrepack_main.c  \
+                       test_hrepack_verify.c ../hdiff/hdiff.c               \
+                       ../hdiff/hdiff_array.c ../hdiff/hdiff_gattr.c        \
+                       ../hdiff/hdiff_gr.c ../hdiff/hdiff_list.c            \
+                       ../hdiff/hdiff_mattbl.c ../hdiff/hdiff_misc.c        \
+                       ../hdiff/hdiff_sds.c ../hdiff/hdiff_table.c          \
+                       ../hdiff/hdiff_vs.c
+test_hrepack_LDADD = ../libsrc/libmfhdf.a $(top_builddir)/hdf/src/libdf.a
+test_hrepack_DEPENDENCIES = $(top_builddir)/hdf/src/libdf.a ../libsrc/libmfhdf.a
+
+hrepack_check_SOURCES = hrepack_check.c
+hrepack_check_LDADD = ../libsrc/libmfhdf.a $(top_builddir)/hdf/src/libdf.a
+hrepack_check_DEPENDENCIES = $(top_builddir)/hdf/src/libdf.a ../libsrc/libmfhdf.a
+
+check: test_hrepack
+	@srcdir="$(srcdir)" $(SHELL) $(srcdir)/test_hrepack.sh
+
+#############################################################################
+##                          And the cleanup                                ##
+#############################################################################
+
+DISTCLEANFILES = *.hdf

Added: packages/libhdf4/branches/upstream/current/mfhdf/hrepack/Makefile.in
===================================================================
--- packages/libhdf4/branches/upstream/current/mfhdf/hrepack/Makefile.in	                        (rev 0)
+++ packages/libhdf4/branches/upstream/current/mfhdf/hrepack/Makefile.in	2007-05-15 09:53:05 UTC (rev 831)
@@ -0,0 +1,780 @@
+# Makefile.in generated by automake 1.7.7 from Makefile.am.
+# @configure_input@
+
+# Copyright 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003
+# 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.
+
+ at SET_MAKE@
+
+#############################################################################
+#############################################################################
+
+srcdir = @srcdir@
+top_srcdir = @top_srcdir@
+VPATH = @srcdir@
+pkgdatadir = $(datadir)/@PACKAGE@
+pkglibdir = $(libdir)/@PACKAGE@
+pkgincludedir = $(includedir)/@PACKAGE@
+top_builddir = ../..
+
+am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
+INSTALL = @INSTALL@
+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 = :
+host_triplet = @host@
+ACLOCAL = @ACLOCAL@
+AMDEP_FALSE = @AMDEP_FALSE@
+AMDEP_TRUE = @AMDEP_TRUE@
+AMTAR = @AMTAR@
+AR = @AR@
+AUTOCONF = @AUTOCONF@
+AUTOHEADER = @AUTOHEADER@
+AUTOMAKE = @AUTOMAKE@
+AWK = @AWK@
+CC = @CC@
+CCDEPMODE = @CCDEPMODE@
+CFLAGS = @CFLAGS@
+CPP = @CPP@
+CPPFLAGS = @CPPFLAGS@
+CXX = @CXX@
+CXXCPP = @CXXCPP@
+CXXDEPMODE = @CXXDEPMODE@
+CXXFLAGS = @CXXFLAGS@
+CYGPATH_W = @CYGPATH_W@
+DEFS = @DEFS@
+DEPDIR = @DEPDIR@
+DIFF = @DIFF@
+ECHO_C = @ECHO_C@
+ECHO_N = @ECHO_N@
+ECHO_T = @ECHO_T@
+EGREP = @EGREP@
+EXEEXT = @EXEEXT@
+F77 = @F77@
+FFLAGS = @FFLAGS@
+HDF_BUILD_FORTRAN_FALSE = @HDF_BUILD_FORTRAN_FALSE@
+HDF_BUILD_FORTRAN_TRUE = @HDF_BUILD_FORTRAN_TRUE@
+HDF_BUILD_XDR_FALSE = @HDF_BUILD_XDR_FALSE@
+HDF_BUILD_XDR_TRUE = @HDF_BUILD_XDR_TRUE@
+INSTALL_DATA = @INSTALL_DATA@
+INSTALL_PROGRAM = @INSTALL_PROGRAM@
+INSTALL_SCRIPT = @INSTALL_SCRIPT@
+INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
+LDFLAGS = @LDFLAGS@
+LEX = @LEX@
+LEXLIB = @LEXLIB@
+LEX_OUTPUT_ROOT = @LEX_OUTPUT_ROOT@
+LIBOBJS = @LIBOBJS@
+LIBS = @LIBS@
+LN_S = @LN_S@
+LTLIBOBJS = @LTLIBOBJS@
+MAINT = @MAINT@
+MAINTAINER_MODE_FALSE = @MAINTAINER_MODE_FALSE@
+MAINTAINER_MODE_TRUE = @MAINTAINER_MODE_TRUE@
+MAKEINFO = @MAKEINFO@
+NEQN = @NEQN@
+OBJEXT = @OBJEXT@
+PACKAGE = @PACKAGE@
+PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
+PACKAGE_NAME = @PACKAGE_NAME@
+PACKAGE_STRING = @PACKAGE_STRING@
+PACKAGE_TARNAME = @PACKAGE_TARNAME@
+PACKAGE_VERSION = @PACKAGE_VERSION@
+PATH_SEPARATOR = @PATH_SEPARATOR@
+RANLIB = @RANLIB@
+SET_MAKE = @SET_MAKE@
+SHELL = @SHELL@
+STRIP = @STRIP@
+TBL = @TBL@
+VERSION = @VERSION@
+YACC = @YACC@
+ac_ct_CC = @ac_ct_CC@
+ac_ct_CXX = @ac_ct_CXX@
+ac_ct_F77 = @ac_ct_F77@
+ac_ct_RANLIB = @ac_ct_RANLIB@
+ac_ct_STRIP = @ac_ct_STRIP@
+am__fastdepCC_FALSE = @am__fastdepCC_FALSE@
+am__fastdepCC_TRUE = @am__fastdepCC_TRUE@
+am__fastdepCXX_FALSE = @am__fastdepCXX_FALSE@
+am__fastdepCXX_TRUE = @am__fastdepCXX_TRUE@
+am__include = @am__include@
+am__leading_dot = @am__leading_dot@
+am__quote = @am__quote@
+bindir = @bindir@
+build = @build@
+build_alias = @build_alias@
+build_cpu = @build_cpu@
+build_os = @build_os@
+build_vendor = @build_vendor@
+datadir = @datadir@
+exec_prefix = @exec_prefix@
+host = @host@
+host_alias = @host_alias@
+host_cpu = @host_cpu@
+host_os = @host_os@
+host_vendor = @host_vendor@
+includedir = @includedir@
+infodir = @infodir@
+install_sh = @install_sh@
+libdir = @libdir@
+libexecdir = @libexecdir@
+localstatedir = @localstatedir@
+mandir = @mandir@
+oldincludedir = @oldincludedir@
+prefix = @prefix@
+program_transform_name = @program_transform_name@
+sbindir = @sbindir@
+sharedstatedir = @sharedstatedir@
+sysconfdir = @sysconfdir@
+target_alias = @target_alias@
+
+INCLUDES = -I$(top_srcdir)/hdf/src        \
+         -I$(top_srcdir)/mfhdf/hdiff    \
+         -I$(top_srcdir)/mfhdf/libsrc   \
+         -I$(top_srcdir)/mfhdf/port     \
+         -I../libsrc
+
+DEFINES = -DNDEBUG -DHDF
+AM_CPPFLAGS = $(INCLUDES) $(DEFINES)
+
+
+#############################################################################
+#############################################################################
+bin_PROGRAMS = hrepack
+
+hrepack_SOURCES = hrepack.c hrepack_an.c hrepack_cmp.c hrepack_gr.c         \
+                  hrepack_list.c hrepack_lsttable.c hrepack_main.c          \
+                  hrepack_opttable.c hrepack_pal.c hrepack_parse.c          \
+                  hrepack_sds.c hrepack_sdutil.c hrepack_utils.c            \
+                  hrepack_vg.c hrepack_vs.c
+
+hrepack_LDADD = ../libsrc/libmfhdf.a $(top_builddir)/hdf/src/libdf.a
+hrepack_DEPENDENCIES = $(top_builddir)/hdf/src/libdf.a ../libsrc/libmfhdf.a
+
+
+#############################################################################
+#############################################################################
+check_PROGRAMS = hrepack_check test_hrepack
+check_SCRIPTS = test_hrepack.sh
+
+test_hrepack_SOURCES = hrepack.c hrepack_an.c hrepack_cmp.c hrepack_gr.c    \
+                       hrepack_list.c hrepack_lsttable.c hrepack_opttable.c \
+                       hrepack_pal.c hrepack_parse.c hrepack_sds.c          \
+                       hrepack_sdutil.c hrepack_utils.c hrepack_vg.c        \
+                       hrepack_vs.c test_hrepack_add.c test_hrepack_main.c  \
+                       test_hrepack_verify.c ../hdiff/hdiff.c               \
+                       ../hdiff/hdiff_array.c ../hdiff/hdiff_gattr.c        \
+                       ../hdiff/hdiff_gr.c ../hdiff/hdiff_list.c            \
+                       ../hdiff/hdiff_mattbl.c ../hdiff/hdiff_misc.c        \
+                       ../hdiff/hdiff_sds.c ../hdiff/hdiff_table.c          \
+                       ../hdiff/hdiff_vs.c
+
+test_hrepack_LDADD = ../libsrc/libmfhdf.a $(top_builddir)/hdf/src/libdf.a
+test_hrepack_DEPENDENCIES = $(top_builddir)/hdf/src/libdf.a ../libsrc/libmfhdf.a
+
+hrepack_check_SOURCES = hrepack_check.c
+hrepack_check_LDADD = ../libsrc/libmfhdf.a $(top_builddir)/hdf/src/libdf.a
+hrepack_check_DEPENDENCIES = $(top_builddir)/hdf/src/libdf.a ../libsrc/libmfhdf.a
+
+
+#############################################################################
+#############################################################################
+DISTCLEANFILES = *.hdf
+subdir = mfhdf/hrepack
+ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
+mkinstalldirs = $(SHELL) $(top_srcdir)/bin/mkinstalldirs
+CONFIG_HEADER = $(top_builddir)/hdf/src/h4config.h
+CONFIG_CLEAN_FILES =
+bin_PROGRAMS = hrepack$(EXEEXT)
+check_PROGRAMS = hrepack_check$(EXEEXT) test_hrepack$(EXEEXT)
+PROGRAMS = $(bin_PROGRAMS)
+
+am_hrepack_OBJECTS = hrepack.$(OBJEXT) hrepack_an.$(OBJEXT) \
+	hrepack_cmp.$(OBJEXT) hrepack_gr.$(OBJEXT) \
+	hrepack_list.$(OBJEXT) hrepack_lsttable.$(OBJEXT) \
+	hrepack_main.$(OBJEXT) hrepack_opttable.$(OBJEXT) \
+	hrepack_pal.$(OBJEXT) hrepack_parse.$(OBJEXT) \
+	hrepack_sds.$(OBJEXT) hrepack_sdutil.$(OBJEXT) \
+	hrepack_utils.$(OBJEXT) hrepack_vg.$(OBJEXT) \
+	hrepack_vs.$(OBJEXT)
+hrepack_OBJECTS = $(am_hrepack_OBJECTS)
+hrepack_LDFLAGS =
+am_hrepack_check_OBJECTS = hrepack_check.$(OBJEXT)
+hrepack_check_OBJECTS = $(am_hrepack_check_OBJECTS)
+hrepack_check_LDFLAGS =
+am_test_hrepack_OBJECTS = hrepack.$(OBJEXT) hrepack_an.$(OBJEXT) \
+	hrepack_cmp.$(OBJEXT) hrepack_gr.$(OBJEXT) \
+	hrepack_list.$(OBJEXT) hrepack_lsttable.$(OBJEXT) \
+	hrepack_opttable.$(OBJEXT) hrepack_pal.$(OBJEXT) \
+	hrepack_parse.$(OBJEXT) hrepack_sds.$(OBJEXT) \
+	hrepack_sdutil.$(OBJEXT) hrepack_utils.$(OBJEXT) \
+	hrepack_vg.$(OBJEXT) hrepack_vs.$(OBJEXT) \
+	test_hrepack_add.$(OBJEXT) test_hrepack_main.$(OBJEXT) \
+	test_hrepack_verify.$(OBJEXT) hdiff.$(OBJEXT) \
+	hdiff_array.$(OBJEXT) hdiff_gattr.$(OBJEXT) hdiff_gr.$(OBJEXT) \
+	hdiff_list.$(OBJEXT) hdiff_mattbl.$(OBJEXT) \
+	hdiff_misc.$(OBJEXT) hdiff_sds.$(OBJEXT) hdiff_table.$(OBJEXT) \
+	hdiff_vs.$(OBJEXT)
+test_hrepack_OBJECTS = $(am_test_hrepack_OBJECTS)
+test_hrepack_LDFLAGS =
+
+DEFAULT_INCLUDES =  -I. -I$(srcdir) -I$(top_builddir)/hdf/src
+depcomp = $(SHELL) $(top_srcdir)/bin/depcomp
+am__depfiles_maybe = depfiles
+ at AMDEP_TRUE@DEP_FILES = ./$(DEPDIR)/hdiff.Po ./$(DEPDIR)/hdiff_array.Po \
+ at AMDEP_TRUE@	./$(DEPDIR)/hdiff_gattr.Po ./$(DEPDIR)/hdiff_gr.Po \
+ at AMDEP_TRUE@	./$(DEPDIR)/hdiff_list.Po \
+ at AMDEP_TRUE@	./$(DEPDIR)/hdiff_mattbl.Po \
+ at AMDEP_TRUE@	./$(DEPDIR)/hdiff_misc.Po ./$(DEPDIR)/hdiff_sds.Po \
+ at AMDEP_TRUE@	./$(DEPDIR)/hdiff_table.Po ./$(DEPDIR)/hdiff_vs.Po \
+ at AMDEP_TRUE@	./$(DEPDIR)/hrepack.Po ./$(DEPDIR)/hrepack_an.Po \
+ at AMDEP_TRUE@	./$(DEPDIR)/hrepack_check.Po \
+ at AMDEP_TRUE@	./$(DEPDIR)/hrepack_cmp.Po \
+ at AMDEP_TRUE@	./$(DEPDIR)/hrepack_gr.Po \
+ at AMDEP_TRUE@	./$(DEPDIR)/hrepack_list.Po \
+ at AMDEP_TRUE@	./$(DEPDIR)/hrepack_lsttable.Po \
+ at AMDEP_TRUE@	./$(DEPDIR)/hrepack_main.Po \
+ at AMDEP_TRUE@	./$(DEPDIR)/hrepack_opttable.Po \
+ at AMDEP_TRUE@	./$(DEPDIR)/hrepack_pal.Po \
+ at AMDEP_TRUE@	./$(DEPDIR)/hrepack_parse.Po \
+ at AMDEP_TRUE@	./$(DEPDIR)/hrepack_sds.Po \
+ at AMDEP_TRUE@	./$(DEPDIR)/hrepack_sdutil.Po \
+ at AMDEP_TRUE@	./$(DEPDIR)/hrepack_utils.Po \
+ at AMDEP_TRUE@	./$(DEPDIR)/hrepack_vg.Po ./$(DEPDIR)/hrepack_vs.Po \
+ at AMDEP_TRUE@	./$(DEPDIR)/test_hrepack_add.Po \
+ at AMDEP_TRUE@	./$(DEPDIR)/test_hrepack_main.Po \
+ at AMDEP_TRUE@	./$(DEPDIR)/test_hrepack_verify.Po
+COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \
+	$(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
+CCLD = $(CC)
+LINK = $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@
+DIST_SOURCES = $(hrepack_SOURCES) $(hrepack_check_SOURCES) \
+	$(test_hrepack_SOURCES)
+DIST_COMMON = $(srcdir)/Makefile.in Makefile.am
+SOURCES = $(hrepack_SOURCES) $(hrepack_check_SOURCES) $(test_hrepack_SOURCES)
+
+all: all-am
+
+.SUFFIXES:
+.SUFFIXES: .c .o .obj
+$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ Makefile.am  $(top_srcdir)/configure.ac $(ACLOCAL_M4)
+	cd $(top_srcdir) && \
+	  $(AUTOMAKE) --foreign  mfhdf/hrepack/Makefile
+Makefile: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.in  $(top_builddir)/config.status
+	cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)
+binPROGRAMS_INSTALL = $(INSTALL_PROGRAM)
+install-binPROGRAMS: $(bin_PROGRAMS)
+	@$(NORMAL_INSTALL)
+	$(mkinstalldirs) $(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-checkPROGRAMS:
+	-test -z "$(check_PROGRAMS)" || rm -f $(check_PROGRAMS)
+hrepack$(EXEEXT): $(hrepack_OBJECTS) $(hrepack_DEPENDENCIES) 
+	@rm -f hrepack$(EXEEXT)
+	$(LINK) $(hrepack_LDFLAGS) $(hrepack_OBJECTS) $(hrepack_LDADD) $(LIBS)
+hrepack_check$(EXEEXT): $(hrepack_check_OBJECTS) $(hrepack_check_DEPENDENCIES) 
+	@rm -f hrepack_check$(EXEEXT)
+	$(LINK) $(hrepack_check_LDFLAGS) $(hrepack_check_OBJECTS) $(hrepack_check_LDADD) $(LIBS)
+test_hrepack$(EXEEXT): $(test_hrepack_OBJECTS) $(test_hrepack_DEPENDENCIES) 
+	@rm -f test_hrepack$(EXEEXT)
+	$(LINK) $(test_hrepack_LDFLAGS) $(test_hrepack_OBJECTS) $(test_hrepack_LDADD) $(LIBS)
+
+mostlyclean-compile:
+	-rm -f *.$(OBJEXT) core *.core
+
+distclean-compile:
+	-rm -f *.tab.c
+
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/hdiff.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/hdiff_array.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/hdiff_gattr.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/hdiff_gr.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/hdiff_list.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/hdiff_mattbl.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/hdiff_misc.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/hdiff_sds.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/hdiff_table.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/hdiff_vs.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/hrepack.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/hrepack_an.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/hrepack_check.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/hrepack_cmp.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/hrepack_gr.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/hrepack_list.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/hrepack_lsttable.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/hrepack_main.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/hrepack_opttable.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/hrepack_pal.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/hrepack_parse.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/hrepack_sds.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/hrepack_sdutil.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/hrepack_utils.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/hrepack_vg.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/hrepack_vs.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/test_hrepack_add.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/test_hrepack_main.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/test_hrepack_verify.Po at am__quote@
+
+.c.o:
+ at am__fastdepCC_TRUE@	if $(COMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" \
+ at am__fastdepCC_TRUE@	  -c -o $@ `test -f '$<' || echo '$(srcdir)/'`$<; \
+ at am__fastdepCC_TRUE@	then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; \
+ at am__fastdepCC_TRUE@	else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; \
+ at am__fastdepCC_TRUE@	fi
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	depfile='$(DEPDIR)/$*.Po' tmpdepfile='$(DEPDIR)/$*.TPo' @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	$(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCC_FALSE@	$(COMPILE) -c `test -f '$<' || echo '$(srcdir)/'`$<
+
+.c.obj:
+ at am__fastdepCC_TRUE@	if $(COMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" \
+ at am__fastdepCC_TRUE@	  -c -o $@ `if test -f '$<'; then $(CYGPATH_W) '$<'; else $(CYGPATH_W) '$(srcdir)/$<'; fi`; \
+ at am__fastdepCC_TRUE@	then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; \
+ at am__fastdepCC_TRUE@	else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; \
+ at am__fastdepCC_TRUE@	fi
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	depfile='$(DEPDIR)/$*.Po' tmpdepfile='$(DEPDIR)/$*.TPo' @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	$(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCC_FALSE@	$(COMPILE) -c `if test -f '$<'; then $(CYGPATH_W) '$<'; else $(CYGPATH_W) '$(srcdir)/$<'; fi`
+
+hdiff.o: ../hdiff/hdiff.c
+ at am__fastdepCC_TRUE@	if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT hdiff.o -MD -MP -MF "$(DEPDIR)/hdiff.Tpo" \
+ at am__fastdepCC_TRUE@	  -c -o hdiff.o `test -f '../hdiff/hdiff.c' || echo '$(srcdir)/'`../hdiff/hdiff.c; \
+ at am__fastdepCC_TRUE@	then mv -f "$(DEPDIR)/hdiff.Tpo" "$(DEPDIR)/hdiff.Po"; \
+ at am__fastdepCC_TRUE@	else rm -f "$(DEPDIR)/hdiff.Tpo"; exit 1; \
+ at am__fastdepCC_TRUE@	fi
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='../hdiff/hdiff.c' object='hdiff.o' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	depfile='$(DEPDIR)/hdiff.Po' tmpdepfile='$(DEPDIR)/hdiff.TPo' @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	$(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCC_FALSE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o hdiff.o `test -f '../hdiff/hdiff.c' || echo '$(srcdir)/'`../hdiff/hdiff.c
+
+hdiff.obj: ../hdiff/hdiff.c
+ at am__fastdepCC_TRUE@	if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT hdiff.obj -MD -MP -MF "$(DEPDIR)/hdiff.Tpo" \
+ at am__fastdepCC_TRUE@	  -c -o hdiff.obj `if test -f '../hdiff/hdiff.c'; then $(CYGPATH_W) '../hdiff/hdiff.c'; else $(CYGPATH_W) '$(srcdir)/../hdiff/hdiff.c'; fi`; \
+ at am__fastdepCC_TRUE@	then mv -f "$(DEPDIR)/hdiff.Tpo" "$(DEPDIR)/hdiff.Po"; \
+ at am__fastdepCC_TRUE@	else rm -f "$(DEPDIR)/hdiff.Tpo"; exit 1; \
+ at am__fastdepCC_TRUE@	fi
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='../hdiff/hdiff.c' object='hdiff.obj' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	depfile='$(DEPDIR)/hdiff.Po' tmpdepfile='$(DEPDIR)/hdiff.TPo' @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	$(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCC_FALSE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o hdiff.obj `if test -f '../hdiff/hdiff.c'; then $(CYGPATH_W) '../hdiff/hdiff.c'; else $(CYGPATH_W) '$(srcdir)/../hdiff/hdiff.c'; fi`
+
+hdiff_array.o: ../hdiff/hdiff_array.c
+ at am__fastdepCC_TRUE@	if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT hdiff_array.o -MD -MP -MF "$(DEPDIR)/hdiff_array.Tpo" \
+ at am__fastdepCC_TRUE@	  -c -o hdiff_array.o `test -f '../hdiff/hdiff_array.c' || echo '$(srcdir)/'`../hdiff/hdiff_array.c; \
+ at am__fastdepCC_TRUE@	then mv -f "$(DEPDIR)/hdiff_array.Tpo" "$(DEPDIR)/hdiff_array.Po"; \
+ at am__fastdepCC_TRUE@	else rm -f "$(DEPDIR)/hdiff_array.Tpo"; exit 1; \
+ at am__fastdepCC_TRUE@	fi
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='../hdiff/hdiff_array.c' object='hdiff_array.o' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	depfile='$(DEPDIR)/hdiff_array.Po' tmpdepfile='$(DEPDIR)/hdiff_array.TPo' @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	$(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCC_FALSE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o hdiff_array.o `test -f '../hdiff/hdiff_array.c' || echo '$(srcdir)/'`../hdiff/hdiff_array.c
+
+hdiff_array.obj: ../hdiff/hdiff_array.c
+ at am__fastdepCC_TRUE@	if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT hdiff_array.obj -MD -MP -MF "$(DEPDIR)/hdiff_array.Tpo" \
+ at am__fastdepCC_TRUE@	  -c -o hdiff_array.obj `if test -f '../hdiff/hdiff_array.c'; then $(CYGPATH_W) '../hdiff/hdiff_array.c'; else $(CYGPATH_W) '$(srcdir)/../hdiff/hdiff_array.c'; fi`; \
+ at am__fastdepCC_TRUE@	then mv -f "$(DEPDIR)/hdiff_array.Tpo" "$(DEPDIR)/hdiff_array.Po"; \
+ at am__fastdepCC_TRUE@	else rm -f "$(DEPDIR)/hdiff_array.Tpo"; exit 1; \
+ at am__fastdepCC_TRUE@	fi
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='../hdiff/hdiff_array.c' object='hdiff_array.obj' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	depfile='$(DEPDIR)/hdiff_array.Po' tmpdepfile='$(DEPDIR)/hdiff_array.TPo' @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	$(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCC_FALSE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o hdiff_array.obj `if test -f '../hdiff/hdiff_array.c'; then $(CYGPATH_W) '../hdiff/hdiff_array.c'; else $(CYGPATH_W) '$(srcdir)/../hdiff/hdiff_array.c'; fi`
+
+hdiff_gattr.o: ../hdiff/hdiff_gattr.c
+ at am__fastdepCC_TRUE@	if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT hdiff_gattr.o -MD -MP -MF "$(DEPDIR)/hdiff_gattr.Tpo" \
+ at am__fastdepCC_TRUE@	  -c -o hdiff_gattr.o `test -f '../hdiff/hdiff_gattr.c' || echo '$(srcdir)/'`../hdiff/hdiff_gattr.c; \
+ at am__fastdepCC_TRUE@	then mv -f "$(DEPDIR)/hdiff_gattr.Tpo" "$(DEPDIR)/hdiff_gattr.Po"; \
+ at am__fastdepCC_TRUE@	else rm -f "$(DEPDIR)/hdiff_gattr.Tpo"; exit 1; \
+ at am__fastdepCC_TRUE@	fi
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='../hdiff/hdiff_gattr.c' object='hdiff_gattr.o' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	depfile='$(DEPDIR)/hdiff_gattr.Po' tmpdepfile='$(DEPDIR)/hdiff_gattr.TPo' @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	$(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCC_FALSE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o hdiff_gattr.o `test -f '../hdiff/hdiff_gattr.c' || echo '$(srcdir)/'`../hdiff/hdiff_gattr.c
+
+hdiff_gattr.obj: ../hdiff/hdiff_gattr.c
+ at am__fastdepCC_TRUE@	if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT hdiff_gattr.obj -MD -MP -MF "$(DEPDIR)/hdiff_gattr.Tpo" \
+ at am__fastdepCC_TRUE@	  -c -o hdiff_gattr.obj `if test -f '../hdiff/hdiff_gattr.c'; then $(CYGPATH_W) '../hdiff/hdiff_gattr.c'; else $(CYGPATH_W) '$(srcdir)/../hdiff/hdiff_gattr.c'; fi`; \
+ at am__fastdepCC_TRUE@	then mv -f "$(DEPDIR)/hdiff_gattr.Tpo" "$(DEPDIR)/hdiff_gattr.Po"; \
+ at am__fastdepCC_TRUE@	else rm -f "$(DEPDIR)/hdiff_gattr.Tpo"; exit 1; \
+ at am__fastdepCC_TRUE@	fi
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='../hdiff/hdiff_gattr.c' object='hdiff_gattr.obj' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	depfile='$(DEPDIR)/hdiff_gattr.Po' tmpdepfile='$(DEPDIR)/hdiff_gattr.TPo' @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	$(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCC_FALSE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o hdiff_gattr.obj `if test -f '../hdiff/hdiff_gattr.c'; then $(CYGPATH_W) '../hdiff/hdiff_gattr.c'; else $(CYGPATH_W) '$(srcdir)/../hdiff/hdiff_gattr.c'; fi`
+
+hdiff_gr.o: ../hdiff/hdiff_gr.c
+ at am__fastdepCC_TRUE@	if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT hdiff_gr.o -MD -MP -MF "$(DEPDIR)/hdiff_gr.Tpo" \
+ at am__fastdepCC_TRUE@	  -c -o hdiff_gr.o `test -f '../hdiff/hdiff_gr.c' || echo '$(srcdir)/'`../hdiff/hdiff_gr.c; \
+ at am__fastdepCC_TRUE@	then mv -f "$(DEPDIR)/hdiff_gr.Tpo" "$(DEPDIR)/hdiff_gr.Po"; \
+ at am__fastdepCC_TRUE@	else rm -f "$(DEPDIR)/hdiff_gr.Tpo"; exit 1; \
+ at am__fastdepCC_TRUE@	fi
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='../hdiff/hdiff_gr.c' object='hdiff_gr.o' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	depfile='$(DEPDIR)/hdiff_gr.Po' tmpdepfile='$(DEPDIR)/hdiff_gr.TPo' @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	$(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCC_FALSE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o hdiff_gr.o `test -f '../hdiff/hdiff_gr.c' || echo '$(srcdir)/'`../hdiff/hdiff_gr.c
+
+hdiff_gr.obj: ../hdiff/hdiff_gr.c
+ at am__fastdepCC_TRUE@	if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT hdiff_gr.obj -MD -MP -MF "$(DEPDIR)/hdiff_gr.Tpo" \
+ at am__fastdepCC_TRUE@	  -c -o hdiff_gr.obj `if test -f '../hdiff/hdiff_gr.c'; then $(CYGPATH_W) '../hdiff/hdiff_gr.c'; else $(CYGPATH_W) '$(srcdir)/../hdiff/hdiff_gr.c'; fi`; \
+ at am__fastdepCC_TRUE@	then mv -f "$(DEPDIR)/hdiff_gr.Tpo" "$(DEPDIR)/hdiff_gr.Po"; \
+ at am__fastdepCC_TRUE@	else rm -f "$(DEPDIR)/hdiff_gr.Tpo"; exit 1; \
+ at am__fastdepCC_TRUE@	fi
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='../hdiff/hdiff_gr.c' object='hdiff_gr.obj' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	depfile='$(DEPDIR)/hdiff_gr.Po' tmpdepfile='$(DEPDIR)/hdiff_gr.TPo' @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	$(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCC_FALSE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o hdiff_gr.obj `if test -f '../hdiff/hdiff_gr.c'; then $(CYGPATH_W) '../hdiff/hdiff_gr.c'; else $(CYGPATH_W) '$(srcdir)/../hdiff/hdiff_gr.c'; fi`
+
+hdiff_list.o: ../hdiff/hdiff_list.c
+ at am__fastdepCC_TRUE@	if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT hdiff_list.o -MD -MP -MF "$(DEPDIR)/hdiff_list.Tpo" \
+ at am__fastdepCC_TRUE@	  -c -o hdiff_list.o `test -f '../hdiff/hdiff_list.c' || echo '$(srcdir)/'`../hdiff/hdiff_list.c; \
+ at am__fastdepCC_TRUE@	then mv -f "$(DEPDIR)/hdiff_list.Tpo" "$(DEPDIR)/hdiff_list.Po"; \
+ at am__fastdepCC_TRUE@	else rm -f "$(DEPDIR)/hdiff_list.Tpo"; exit 1; \
+ at am__fastdepCC_TRUE@	fi
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='../hdiff/hdiff_list.c' object='hdiff_list.o' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	depfile='$(DEPDIR)/hdiff_list.Po' tmpdepfile='$(DEPDIR)/hdiff_list.TPo' @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	$(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCC_FALSE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o hdiff_list.o `test -f '../hdiff/hdiff_list.c' || echo '$(srcdir)/'`../hdiff/hdiff_list.c
+
+hdiff_list.obj: ../hdiff/hdiff_list.c
+ at am__fastdepCC_TRUE@	if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT hdiff_list.obj -MD -MP -MF "$(DEPDIR)/hdiff_list.Tpo" \
+ at am__fastdepCC_TRUE@	  -c -o hdiff_list.obj `if test -f '../hdiff/hdiff_list.c'; then $(CYGPATH_W) '../hdiff/hdiff_list.c'; else $(CYGPATH_W) '$(srcdir)/../hdiff/hdiff_list.c'; fi`; \
+ at am__fastdepCC_TRUE@	then mv -f "$(DEPDIR)/hdiff_list.Tpo" "$(DEPDIR)/hdiff_list.Po"; \
+ at am__fastdepCC_TRUE@	else rm -f "$(DEPDIR)/hdiff_list.Tpo"; exit 1; \
+ at am__fastdepCC_TRUE@	fi
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='../hdiff/hdiff_list.c' object='hdiff_list.obj' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	depfile='$(DEPDIR)/hdiff_list.Po' tmpdepfile='$(DEPDIR)/hdiff_list.TPo' @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	$(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCC_FALSE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o hdiff_list.obj `if test -f '../hdiff/hdiff_list.c'; then $(CYGPATH_W) '../hdiff/hdiff_list.c'; else $(CYGPATH_W) '$(srcdir)/../hdiff/hdiff_list.c'; fi`
+
+hdiff_mattbl.o: ../hdiff/hdiff_mattbl.c
+ at am__fastdepCC_TRUE@	if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT hdiff_mattbl.o -MD -MP -MF "$(DEPDIR)/hdiff_mattbl.Tpo" \
+ at am__fastdepCC_TRUE@	  -c -o hdiff_mattbl.o `test -f '../hdiff/hdiff_mattbl.c' || echo '$(srcdir)/'`../hdiff/hdiff_mattbl.c; \
+ at am__fastdepCC_TRUE@	then mv -f "$(DEPDIR)/hdiff_mattbl.Tpo" "$(DEPDIR)/hdiff_mattbl.Po"; \
+ at am__fastdepCC_TRUE@	else rm -f "$(DEPDIR)/hdiff_mattbl.Tpo"; exit 1; \
+ at am__fastdepCC_TRUE@	fi
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='../hdiff/hdiff_mattbl.c' object='hdiff_mattbl.o' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	depfile='$(DEPDIR)/hdiff_mattbl.Po' tmpdepfile='$(DEPDIR)/hdiff_mattbl.TPo' @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	$(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCC_FALSE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o hdiff_mattbl.o `test -f '../hdiff/hdiff_mattbl.c' || echo '$(srcdir)/'`../hdiff/hdiff_mattbl.c
+
+hdiff_mattbl.obj: ../hdiff/hdiff_mattbl.c
+ at am__fastdepCC_TRUE@	if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT hdiff_mattbl.obj -MD -MP -MF "$(DEPDIR)/hdiff_mattbl.Tpo" \
+ at am__fastdepCC_TRUE@	  -c -o hdiff_mattbl.obj `if test -f '../hdiff/hdiff_mattbl.c'; then $(CYGPATH_W) '../hdiff/hdiff_mattbl.c'; else $(CYGPATH_W) '$(srcdir)/../hdiff/hdiff_mattbl.c'; fi`; \
+ at am__fastdepCC_TRUE@	then mv -f "$(DEPDIR)/hdiff_mattbl.Tpo" "$(DEPDIR)/hdiff_mattbl.Po"; \
+ at am__fastdepCC_TRUE@	else rm -f "$(DEPDIR)/hdiff_mattbl.Tpo"; exit 1; \
+ at am__fastdepCC_TRUE@	fi
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='../hdiff/hdiff_mattbl.c' object='hdiff_mattbl.obj' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	depfile='$(DEPDIR)/hdiff_mattbl.Po' tmpdepfile='$(DEPDIR)/hdiff_mattbl.TPo' @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	$(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCC_FALSE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o hdiff_mattbl.obj `if test -f '../hdiff/hdiff_mattbl.c'; then $(CYGPATH_W) '../hdiff/hdiff_mattbl.c'; else $(CYGPATH_W) '$(srcdir)/../hdiff/hdiff_mattbl.c'; fi`
+
+hdiff_misc.o: ../hdiff/hdiff_misc.c
+ at am__fastdepCC_TRUE@	if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT hdiff_misc.o -MD -MP -MF "$(DEPDIR)/hdiff_misc.Tpo" \
+ at am__fastdepCC_TRUE@	  -c -o hdiff_misc.o `test -f '../hdiff/hdiff_misc.c' || echo '$(srcdir)/'`../hdiff/hdiff_misc.c; \
+ at am__fastdepCC_TRUE@	then mv -f "$(DEPDIR)/hdiff_misc.Tpo" "$(DEPDIR)/hdiff_misc.Po"; \
+ at am__fastdepCC_TRUE@	else rm -f "$(DEPDIR)/hdiff_misc.Tpo"; exit 1; \
+ at am__fastdepCC_TRUE@	fi
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='../hdiff/hdiff_misc.c' object='hdiff_misc.o' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	depfile='$(DEPDIR)/hdiff_misc.Po' tmpdepfile='$(DEPDIR)/hdiff_misc.TPo' @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	$(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCC_FALSE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o hdiff_misc.o `test -f '../hdiff/hdiff_misc.c' || echo '$(srcdir)/'`../hdiff/hdiff_misc.c
+
+hdiff_misc.obj: ../hdiff/hdiff_misc.c
+ at am__fastdepCC_TRUE@	if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT hdiff_misc.obj -MD -MP -MF "$(DEPDIR)/hdiff_misc.Tpo" \
+ at am__fastdepCC_TRUE@	  -c -o hdiff_misc.obj `if test -f '../hdiff/hdiff_misc.c'; then $(CYGPATH_W) '../hdiff/hdiff_misc.c'; else $(CYGPATH_W) '$(srcdir)/../hdiff/hdiff_misc.c'; fi`; \
+ at am__fastdepCC_TRUE@	then mv -f "$(DEPDIR)/hdiff_misc.Tpo" "$(DEPDIR)/hdiff_misc.Po"; \
+ at am__fastdepCC_TRUE@	else rm -f "$(DEPDIR)/hdiff_misc.Tpo"; exit 1; \
+ at am__fastdepCC_TRUE@	fi
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='../hdiff/hdiff_misc.c' object='hdiff_misc.obj' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	depfile='$(DEPDIR)/hdiff_misc.Po' tmpdepfile='$(DEPDIR)/hdiff_misc.TPo' @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	$(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCC_FALSE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o hdiff_misc.obj `if test -f '../hdiff/hdiff_misc.c'; then $(CYGPATH_W) '../hdiff/hdiff_misc.c'; else $(CYGPATH_W) '$(srcdir)/../hdiff/hdiff_misc.c'; fi`
+
+hdiff_sds.o: ../hdiff/hdiff_sds.c
+ at am__fastdepCC_TRUE@	if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT hdiff_sds.o -MD -MP -MF "$(DEPDIR)/hdiff_sds.Tpo" \
+ at am__fastdepCC_TRUE@	  -c -o hdiff_sds.o `test -f '../hdiff/hdiff_sds.c' || echo '$(srcdir)/'`../hdiff/hdiff_sds.c; \
+ at am__fastdepCC_TRUE@	then mv -f "$(DEPDIR)/hdiff_sds.Tpo" "$(DEPDIR)/hdiff_sds.Po"; \
+ at am__fastdepCC_TRUE@	else rm -f "$(DEPDIR)/hdiff_sds.Tpo"; exit 1; \
+ at am__fastdepCC_TRUE@	fi
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='../hdiff/hdiff_sds.c' object='hdiff_sds.o' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	depfile='$(DEPDIR)/hdiff_sds.Po' tmpdepfile='$(DEPDIR)/hdiff_sds.TPo' @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	$(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCC_FALSE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o hdiff_sds.o `test -f '../hdiff/hdiff_sds.c' || echo '$(srcdir)/'`../hdiff/hdiff_sds.c
+
+hdiff_sds.obj: ../hdiff/hdiff_sds.c
+ at am__fastdepCC_TRUE@	if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT hdiff_sds.obj -MD -MP -MF "$(DEPDIR)/hdiff_sds.Tpo" \
+ at am__fastdepCC_TRUE@	  -c -o hdiff_sds.obj `if test -f '../hdiff/hdiff_sds.c'; then $(CYGPATH_W) '../hdiff/hdiff_sds.c'; else $(CYGPATH_W) '$(srcdir)/../hdiff/hdiff_sds.c'; fi`; \
+ at am__fastdepCC_TRUE@	then mv -f "$(DEPDIR)/hdiff_sds.Tpo" "$(DEPDIR)/hdiff_sds.Po"; \
+ at am__fastdepCC_TRUE@	else rm -f "$(DEPDIR)/hdiff_sds.Tpo"; exit 1; \
+ at am__fastdepCC_TRUE@	fi
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='../hdiff/hdiff_sds.c' object='hdiff_sds.obj' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	depfile='$(DEPDIR)/hdiff_sds.Po' tmpdepfile='$(DEPDIR)/hdiff_sds.TPo' @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	$(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCC_FALSE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o hdiff_sds.obj `if test -f '../hdiff/hdiff_sds.c'; then $(CYGPATH_W) '../hdiff/hdiff_sds.c'; else $(CYGPATH_W) '$(srcdir)/../hdiff/hdiff_sds.c'; fi`
+
+hdiff_table.o: ../hdiff/hdiff_table.c
+ at am__fastdepCC_TRUE@	if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT hdiff_table.o -MD -MP -MF "$(DEPDIR)/hdiff_table.Tpo" \
+ at am__fastdepCC_TRUE@	  -c -o hdiff_table.o `test -f '../hdiff/hdiff_table.c' || echo '$(srcdir)/'`../hdiff/hdiff_table.c; \
+ at am__fastdepCC_TRUE@	then mv -f "$(DEPDIR)/hdiff_table.Tpo" "$(DEPDIR)/hdiff_table.Po"; \
+ at am__fastdepCC_TRUE@	else rm -f "$(DEPDIR)/hdiff_table.Tpo"; exit 1; \
+ at am__fastdepCC_TRUE@	fi
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='../hdiff/hdiff_table.c' object='hdiff_table.o' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	depfile='$(DEPDIR)/hdiff_table.Po' tmpdepfile='$(DEPDIR)/hdiff_table.TPo' @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	$(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCC_FALSE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o hdiff_table.o `test -f '../hdiff/hdiff_table.c' || echo '$(srcdir)/'`../hdiff/hdiff_table.c
+
+hdiff_table.obj: ../hdiff/hdiff_table.c
+ at am__fastdepCC_TRUE@	if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT hdiff_table.obj -MD -MP -MF "$(DEPDIR)/hdiff_table.Tpo" \
+ at am__fastdepCC_TRUE@	  -c -o hdiff_table.obj `if test -f '../hdiff/hdiff_table.c'; then $(CYGPATH_W) '../hdiff/hdiff_table.c'; else $(CYGPATH_W) '$(srcdir)/../hdiff/hdiff_table.c'; fi`; \
+ at am__fastdepCC_TRUE@	then mv -f "$(DEPDIR)/hdiff_table.Tpo" "$(DEPDIR)/hdiff_table.Po"; \
+ at am__fastdepCC_TRUE@	else rm -f "$(DEPDIR)/hdiff_table.Tpo"; exit 1; \
+ at am__fastdepCC_TRUE@	fi
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='../hdiff/hdiff_table.c' object='hdiff_table.obj' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	depfile='$(DEPDIR)/hdiff_table.Po' tmpdepfile='$(DEPDIR)/hdiff_table.TPo' @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	$(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCC_FALSE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o hdiff_table.obj `if test -f '../hdiff/hdiff_table.c'; then $(CYGPATH_W) '../hdiff/hdiff_table.c'; else $(CYGPATH_W) '$(srcdir)/../hdiff/hdiff_table.c'; fi`
+
+hdiff_vs.o: ../hdiff/hdiff_vs.c
+ at am__fastdepCC_TRUE@	if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT hdiff_vs.o -MD -MP -MF "$(DEPDIR)/hdiff_vs.Tpo" \
+ at am__fastdepCC_TRUE@	  -c -o hdiff_vs.o `test -f '../hdiff/hdiff_vs.c' || echo '$(srcdir)/'`../hdiff/hdiff_vs.c; \
+ at am__fastdepCC_TRUE@	then mv -f "$(DEPDIR)/hdiff_vs.Tpo" "$(DEPDIR)/hdiff_vs.Po"; \
+ at am__fastdepCC_TRUE@	else rm -f "$(DEPDIR)/hdiff_vs.Tpo"; exit 1; \
+ at am__fastdepCC_TRUE@	fi
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='../hdiff/hdiff_vs.c' object='hdiff_vs.o' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	depfile='$(DEPDIR)/hdiff_vs.Po' tmpdepfile='$(DEPDIR)/hdiff_vs.TPo' @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	$(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCC_FALSE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o hdiff_vs.o `test -f '../hdiff/hdiff_vs.c' || echo '$(srcdir)/'`../hdiff/hdiff_vs.c
+
+hdiff_vs.obj: ../hdiff/hdiff_vs.c
+ at am__fastdepCC_TRUE@	if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT hdiff_vs.obj -MD -MP -MF "$(DEPDIR)/hdiff_vs.Tpo" \
+ at am__fastdepCC_TRUE@	  -c -o hdiff_vs.obj `if test -f '../hdiff/hdiff_vs.c'; then $(CYGPATH_W) '../hdiff/hdiff_vs.c'; else $(CYGPATH_W) '$(srcdir)/../hdiff/hdiff_vs.c'; fi`; \
+ at am__fastdepCC_TRUE@	then mv -f "$(DEPDIR)/hdiff_vs.Tpo" "$(DEPDIR)/hdiff_vs.Po"; \
+ at am__fastdepCC_TRUE@	else rm -f "$(DEPDIR)/hdiff_vs.Tpo"; exit 1; \
+ at am__fastdepCC_TRUE@	fi
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='../hdiff/hdiff_vs.c' object='hdiff_vs.obj' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	depfile='$(DEPDIR)/hdiff_vs.Po' tmpdepfile='$(DEPDIR)/hdiff_vs.TPo' @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	$(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCC_FALSE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o hdiff_vs.obj `if test -f '../hdiff/hdiff_vs.c'; then $(CYGPATH_W) '../hdiff/hdiff_vs.c'; else $(CYGPATH_W) '$(srcdir)/../hdiff/hdiff_vs.c'; fi`
+uninstall-info-am:
+
+ETAGS = etags
+ETAGSFLAGS =
+
+CTAGS = ctags
+CTAGSFLAGS =
+
+tags: TAGS
+
+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; } \
+	       END { for (i in files) print i; }'`; \
+	mkid -fID $$unique
+
+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; } \
+	       END { for (i in files) print i; }'`; \
+	test -z "$(ETAGS_ARGS)$$tags$$unique" \
+	  || $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
+	     $$tags $$unique
+
+ctags: CTAGS
+CTAGS:  $(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; } \
+	       END { 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
+DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
+
+top_distdir = ../..
+distdir = $(top_distdir)/$(PACKAGE)-$(VERSION)
+
+distdir: $(DISTFILES)
+	@srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \
+	topsrcdirstrip=`echo "$(top_srcdir)" | sed 's|.|.|g'`; \
+	list='$(DISTFILES)'; for file in $$list; do \
+	  case $$file in \
+	    $(srcdir)/*) file=`echo "$$file" | sed "s|^$$srcdirstrip/||"`;; \
+	    $(top_srcdir)/*) file=`echo "$$file" | sed "s|^$$topsrcdirstrip/|$(top_builddir)/|"`;; \
+	  esac; \
+	  if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
+	  dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \
+	  if test "$$dir" != "$$file" && test "$$dir" != "."; then \
+	    dir="/$$dir"; \
+	    $(mkinstalldirs) "$(distdir)$$dir"; \
+	  else \
+	    dir=''; \
+	  fi; \
+	  if test -d $$d/$$file; then \
+	    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
+	$(MAKE) $(AM_MAKEFLAGS) $(check_PROGRAMS) $(check_SCRIPTS)
+check: check-am
+all-am: Makefile $(PROGRAMS)
+
+installdirs:
+	$(mkinstalldirs) $(DESTDIR)$(bindir)
+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_STRIP_FLAG=-s \
+	  `test -z '$(STRIP)' || \
+	    echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
+mostlyclean-generic:
+
+clean-generic:
+
+distclean-generic:
+	-rm -f $(CONFIG_CLEAN_FILES)
+	-test -z "$(DISTCLEANFILES)" || rm -f $(DISTCLEANFILES)
+
+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-checkPROGRAMS clean-generic \
+	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:
+
+info: info-am
+
+info-am:
+
+install-data-am:
+
+install-exec-am: install-binPROGRAMS
+
+install-info: install-info-am
+
+install-man:
+
+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 uninstall-info-am
+
+.PHONY: CTAGS GTAGS all all-am check check-am clean clean-binPROGRAMS \
+	clean-checkPROGRAMS clean-generic ctags distclean \
+	distclean-compile distclean-generic distclean-tags distdir dvi \
+	dvi-am info info-am install install-am install-binPROGRAMS \
+	install-data install-data-am install-exec install-exec-am \
+	install-info install-info-am install-man 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 uninstall-info-am
+
+
+check: test_hrepack
+	@srcdir="$(srcdir)" $(SHELL) $(srcdir)/test_hrepack.sh
+# 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:

Added: packages/libhdf4/branches/upstream/current/mfhdf/hrepack/hrepack.c
===================================================================
--- packages/libhdf4/branches/upstream/current/mfhdf/hrepack/hrepack.c	                        (rev 0)
+++ packages/libhdf4/branches/upstream/current/mfhdf/hrepack/hrepack.c	2007-05-15 09:53:05 UTC (rev 831)
@@ -0,0 +1,425 @@
+/****************************************************************************
+ * NCSA HDF                                                                 *
+ * Software Development Group                                               *
+ * National Center for Supercomputing Applications                          *
+ * University of Illinois at Urbana-Champaign                               *
+ * 605 E. Springfield, Champaign IL 61820                                   *
+ *                                                                          *
+ * For conditions of distribution and use, see the accompanying             *
+ * hdf/COPYING file.                                                        *
+ *                                                                          *
+ ****************************************************************************/
+
+
+#include "hdf.h"
+#include "mfhdf.h"
+#include "hrepack.h"
+#include "hrepack_parse.h"
+#include "hrepack_opttable.h"
+
+
+void print_options(options_t *options);
+
+/*-------------------------------------------------------------------------
+ * Function: hrepack
+ *
+ * Purpose: locate all high-level HDF objects in the file 
+ *  and compress/chunk them using options
+ *
+ * Algorythm: 2 traversals are made to the file; the 1st builds a list of
+ *  the high-level objects, the 2nd makes a copy of them, using the options;
+ *  the reason for the 1st traversal is to check for invalid object name requests
+ *
+ * Return: void
+ *
+ * Programmer: Pedro Vicente, pvn at ncsa.uiuc.edu
+ *
+ * Date: July 10, 2003
+ *
+ *-------------------------------------------------------------------------
+ */
+int hrepack(const char* infile, 
+            const char* outfile, 
+            options_t *options)
+{
+ options->trip=0;
+ 
+ /* also checks input */
+ print_options(options);
+ 
+ /* first check for objects in input that are in the file */
+ if (list(infile,outfile,options)<0)
+  return FAIL;
+ 
+ /* the real deal now */
+ options->trip=1;
+ 
+ if (options->verbose)
+  printf("Making new file %s...\n",outfile);
+ 
+ /* this can fail for different reasons */
+ if (list(infile,outfile,options)<0)
+  return FAIL;
+
+ return SUCCESS;
+}
+
+
+/*-------------------------------------------------------------------------
+ * Function: hrepack_addcomp
+ *
+ * Purpose: add a compression -t option to table 
+ *   Example: -t "*:GZIP 6" , STR = "*:GZIP 6"
+ *
+ * Return: void
+ *
+ * Programmer: Pedro Vicente, pvn at ncsa.uiuc.edu
+ *
+ * Date: July 23, 2003
+ *
+ *-------------------------------------------------------------------------
+ */
+
+void hrepack_addcomp(const char* str, options_t *options)
+{
+ 
+ obj_list_t      *obj_list=NULL; /*one object list for the -t and -c option entry */
+ comp_info_t     comp;           /*compression info for the current -t option entry */
+ int             n_objs;         /*number of objects in the current -t or -c option entry */
+ int             i;
+
+ if (options->all_comp==1){
+  printf("Error: Invalid compression input: '*' is present with other objects <%s>\n",str);
+  exit(1);
+ }
+
+ /* initialize parse struct to FAIL */
+ memset(&comp,FAIL,sizeof(comp_info_t));
+
+ /* parse the -t option */
+ obj_list=parse_comp(str,&n_objs,&comp);
+
+  /* searh for the "*" all objects character */
+ for (i = 0; i < n_objs; i++) 
+ {
+  if (strcmp("*",obj_list[i].obj)==0)
+  {
+   /* if we are compressing all set the global comp type */
+   options->all_comp=1;
+   options->comp_g=comp;
+  }
+ }
+
+ if (i>1)
+ {
+  printf("\nError: '*' cannot be with other objects, <%s>. Exiting...\n",str);
+  free(obj_list);
+  options_table_free(options->op_tbl);
+  exit(1);
+ }
+
+ if (options->all_comp==0)
+  options_add_comp(obj_list,n_objs,comp,options->op_tbl);
+
+}
+
+
+/*-------------------------------------------------------------------------
+ * Function: hrepack_addchunk
+ *
+ * Purpose: add a chunk -c option to table 
+ *   Example: -c "*:2x2" , STR = "*:2x2"
+ *
+ * Return: void
+ *
+ * Programmer: Pedro Vicente, pvn at ncsa.uiuc.edu
+ *
+ * Date: July 23, 2003
+ *
+ *-------------------------------------------------------------------------
+ */
+
+
+void hrepack_addchunk(const char* str, options_t *options)
+{
+ 
+ obj_list_t  *obj_list=NULL;     /*one object list for the -t and -c option entry */
+ int         n_objs;             /*number of objects in the current -t or -c option entry */
+ int32       chunk_lengths[MAX_VAR_DIMS]; /* chunk lengths along each dimension */
+ int         chunk_rank;         /*global rank for chunks */
+ int         i, j;
+
+ if (options->all_chunk==1){
+  printf("Error: Invalid chunking input: '*' is present with other objects <%s>\n",str);
+  exit(1);
+ }
+ 
+ /* parse the -c option */
+ obj_list=parse_chunk(str,&n_objs,chunk_lengths,&chunk_rank);
+
+  /* searh for the "*" all objects character */
+ for (i = 0; i < n_objs; i++) 
+ {
+  if (strcmp("*",obj_list[i].obj)==0)
+  {
+   /* if we are chunking all set the global chunking type */
+   options->all_chunk=1;
+   options->chunk_g.rank=chunk_rank;
+   for (j = 0; j < chunk_rank; j++) 
+    options->chunk_g.chunk_lengths[j] = chunk_lengths[j];
+  }
+ }
+
+ if (i>1)
+ {
+  printf("\nError: '*' cannot be with other objects, <%s>. Exiting...\n",str);
+  free(obj_list);
+  options_table_free(options->op_tbl);
+  exit(1);
+ }
+
+ if (options->all_chunk==0)
+  options_add_chunk(obj_list,n_objs,chunk_lengths,chunk_rank,options->op_tbl);
+
+ free(obj_list);
+  
+}
+
+
+/*-------------------------------------------------------------------------
+ * Function: hrepack_init
+ *
+ * Purpose: initialize options
+ *
+ *-------------------------------------------------------------------------
+ */
+
+void hrepack_init (options_t *options, int verbose)
+{
+ memset(options,0,sizeof(options_t));
+ options->threshold = 1024;
+ options->verbose   = verbose;
+ options_table_init(&(options->op_tbl));
+}
+
+/*-------------------------------------------------------------------------
+ * Function: hrepack_end
+ *
+ * Purpose: free options table
+ *
+ *-------------------------------------------------------------------------
+ */
+
+void hrepack_end  (options_t *options)
+{
+ options_table_free(options->op_tbl);
+}
+
+/*-------------------------------------------------------------------------
+ * Function: print_options
+ *
+ * Purpose: print options
+ *
+ * Return: void
+ *
+ * Programmer: Pedro Vicente, pvn at ncsa.uiuc.edu
+ *
+ * Date: July 25, 2003
+ *
+ *-------------------------------------------------------------------------
+ */
+void print_options(options_t *options)
+{
+ int   i, k, j, has_cp=0, has_ck=0;
+
+/*-------------------------------------------------------------------------
+ * objects to chunk
+ *-------------------------------------------------------------------------
+ */
+ if (options->verbose) 
+ {
+  printf("Objects to chunk are...\n");
+  if (options->all_chunk==1)  {
+   printf("\tChunk all with dimension [");
+   for ( j = 0; j < options->chunk_g.rank; j++)  
+    printf("%d ", options->chunk_g.chunk_lengths[j]);
+   printf("]\n");
+  }
+ }/* verbose */
+
+ for ( i = 0; i < options->op_tbl->nelems; i++) 
+ {
+  char* obj_name=options->op_tbl->objs[i].path;
+  
+  if (options->op_tbl->objs[i].chunk.rank>0)
+  {
+   if (options->verbose){
+    printf("\t%s ",obj_name); 
+    for ( k = 0; k < options->op_tbl->objs[i].chunk.rank; k++) 
+     printf("%d ",options->op_tbl->objs[i].chunk.chunk_lengths[k]);
+    printf("\n");
+   }
+   has_ck=1;
+  }
+  else if (options->op_tbl->objs[i].chunk.rank==-2)
+  {
+   if (options->verbose)
+    printf("\t%s %s\n",obj_name,"NONE"); 
+   has_ck=1;
+  }
+ }
+ 
+ if (options->all_chunk==1 && has_ck){
+  printf("Error: Invalid chunking input: '*' is present with other objects\n");
+  exit(1);
+ }
+ 
+/*-------------------------------------------------------------------------
+ * objects to compress/uncompress
+ *-------------------------------------------------------------------------
+ */
+ 
+ if (options->verbose) 
+ {
+  printf("Objects to compress are...\n");
+  if (options->all_comp==1) 
+  {
+   switch (options->comp_g.type)
+   {
+   default:
+    break;
+   case COMP_CODE_RLE:
+   case COMP_CODE_SZIP:
+     printf("\tCompress all with %s compression\n",
+      get_scomp(options->comp_g.type));
+    break;
+   case COMP_CODE_SKPHUFF:
+   case COMP_CODE_DEFLATE:
+   case COMP_CODE_JPEG:
+     printf("\tCompress all with %s compression, parameter %d\n",
+      get_scomp(options->comp_g.type),
+      options->comp_g.info);
+    break;
+   };
+  }
+ } /* verbose */
+
+ for ( i = 0; i < options->op_tbl->nelems; i++) 
+ {
+  pack_info_t obj=options->op_tbl->objs[i];
+  if (obj.comp.type>0)
+  {
+   char* obj_name=obj.path;
+   if (options->verbose) {
+    printf("\t%s     \t %s compression, parameter %d\n",
+     obj_name,
+     get_scomp(obj.comp.type),
+     obj.comp.info);
+   }
+   has_cp=1;
+  }
+ }
+ 
+ if (options->all_comp==1 && has_cp){
+  printf("Error: Invalid compression input: * is present with other objects\n");
+  exit(1);
+ }
+}
+
+/*-------------------------------------------------------------------------
+ * Function: read_info
+ *
+ * Purpose: read comp and chunk options from file
+ *
+ * Return: void
+ *
+ * Programmer: Pedro Vicente, pvn at ncsa.uiuc.edu
+ *
+ * Date: July 30, 2003
+ *
+ *-------------------------------------------------------------------------
+ */
+
+void read_info(const char *filename,options_t *options) 
+{
+ char stype[10];
+ char comp_info[1024];
+ FILE *fp;
+ char c;
+ int  i, rc=1;
+
+ 
+ if ((fp = fopen(filename, "r")) == (FILE *)NULL) {
+  printf( "Cannot open options file %s", filename);
+  exit(1);
+ }
+
+ /* Cycle until end of file reached */
+ while( 1 )
+ {
+  rc=fscanf(fp, "%s", stype);
+  if (rc==-1)
+   break;
+   
+ /*-------------------------------------------------------------------------
+  * comp
+  *-------------------------------------------------------------------------
+  */
+  if (strcmp(stype,"-t") == 0) { 
+
+   /* find begining of info */
+   i=0; c='0';
+   while( c!='"' )
+   {
+    fscanf(fp, "%c", &c);
+   }
+   c='0';
+   /* go until end */
+   while( c!='"' )
+   {
+    fscanf(fp, "%c", &c);
+    comp_info[i]=c;
+    i++;
+   }
+   comp_info[i-1]='\0'; /*cut the last " */    
+
+   hrepack_addcomp(comp_info,options);
+  }
+ /*-------------------------------------------------------------------------
+  * chunk
+  *-------------------------------------------------------------------------
+  */
+  else if (strcmp(stype,"-c") == 0) { 
+   
+   /* find begining of info */
+   i=0; c='0';
+   while( c!='"' )
+   {
+    fscanf(fp, "%c", &c);
+   }
+   c='0';
+   /* go until end */
+   while( c!='"' )
+   {
+    fscanf(fp, "%c", &c);
+    comp_info[i]=c;
+    i++;
+   }
+   comp_info[i-1]='\0'; /*cut the last " */    
+
+   hrepack_addchunk(comp_info,options);
+  }
+ /*-------------------------------------------------------------------------
+  * not valid
+  *-------------------------------------------------------------------------
+  */
+  else {
+   printf( "Bad file format for %s", filename);
+   exit(1);
+  }
+ }
+
+ fclose(fp);
+ return;
+}
+

Added: packages/libhdf4/branches/upstream/current/mfhdf/hrepack/hrepack.h
===================================================================
--- packages/libhdf4/branches/upstream/current/mfhdf/hrepack/hrepack.h	                        (rev 0)
+++ packages/libhdf4/branches/upstream/current/mfhdf/hrepack/hrepack.h	2007-05-15 09:53:05 UTC (rev 831)
@@ -0,0 +1,106 @@
+/****************************************************************************
+ * NCSA HDF                                                                 *
+ * Software Development Group                                               *
+ * National Center for Supercomputing Applications                          *
+ * University of Illinois at Urbana-Champaign                               *
+ * 605 E. Springfield, Champaign IL 61820                                   *
+ *                                                                          *
+ * For conditions of distribution and use, see the accompanying             *
+ * hdf/COPYING file.                                                        *
+ *                                                                          *
+ ****************************************************************************/
+
+
+#ifndef REPACK_H_
+#define REPACK_H_
+
+#include "hrepack_lsttable.h"
+
+#ifdef H4_HAVE_LIBSZ
+#include "szlib.h"
+#endif
+
+
+#define TAG_GRP_IMAGE DFTAG_RIG
+#define TAG_GRP_DSET  DFTAG_NDG
+
+#ifndef SUCCESS
+#define SUCCESS 0
+#endif
+
+#ifndef FAIL
+#define FAIL -1
+#endif
+
+
+#if 0
+#define HZIP_DEBUG
+#endif
+
+
+/* a list of names */
+typedef struct {
+ char obj[MAX_NC_NAME];
+} obj_list_t;
+
+/* the type of compression and additional parameter */
+typedef struct {
+ comp_coder_t type; /* compression enum type */
+ int info;          /* numerical parameter for several types of compression */
+ int szip_mode;     /* NN_MODE or EC_MODE */
+} comp_info_t;
+
+/* chunk lengths along each dimension and rank */
+typedef struct {
+ int32   chunk_lengths[MAX_VAR_DIMS]; 
+ int     rank;
+} chunk_info_t;
+
+/* information for one object, contains PATH, CHUNK info and COMP info */
+typedef struct {
+ char         path[MAX_NC_NAME];            /* name of object */
+ comp_info_t  comp;                         /* compression information */
+ chunk_info_t chunk;                        /* chunk information */
+} pack_info_t;
+
+/* store a list of all objects */
+typedef struct {
+ int        size;
+ int        nelems;
+ pack_info_t *objs;
+} options_table_t;
+
+
+/* all the above, ready to go to the hrepack call */
+typedef struct {
+ options_table_t *op_tbl;     /*table with all -c and -t options */
+ int             all_chunk;   /*chunk all objects, input of "*" */
+ int             all_comp;    /*comp all objects, input of "*" */
+ comp_info_t     comp_g;      /*global compress INFO for the ALL case */
+ chunk_info_t    chunk_g;     /*global chunk INFO for the ALL case */
+ int verbose;                 /*verbose mode */
+ int trip;                    /*which cycle are we in */
+ int threshold;               /*minimum size to compress, in bytes */
+} options_t;
+
+
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+int  hrepack         (const char* infname, const char* outfname, options_t *options);
+void hrepack_addcomp (const char* str, options_t *options);
+void hrepack_addchunk(const char* str, options_t *options);
+void hrepack_init    (options_t *options, int verbose);
+void hrepack_end     (options_t *options);
+
+int  list(const char* infname,const char* outfname,options_t *options);
+void read_info(const char *filename,options_t *options); 
+
+#ifdef __cplusplus
+}
+#endif
+
+
+#endif  /* REPACK_H_ */

Added: packages/libhdf4/branches/upstream/current/mfhdf/hrepack/hrepack_all.sh
===================================================================
--- packages/libhdf4/branches/upstream/current/mfhdf/hrepack/hrepack_all.sh	                        (rev 0)
+++ packages/libhdf4/branches/upstream/current/mfhdf/hrepack/hrepack_all.sh	2007-05-15 09:53:05 UTC (rev 831)
@@ -0,0 +1,10 @@
+#!/bin/sh
+
+for i in ./*.hdf
+do
+	echo "--------------------------------------------------"
+	echo $i
+	echo "--------------------------------------------------"
+	../hrepack -v -i $i -o ${i}.output.hdf -t "*:GZIP 1"
+done
+ls -l


Property changes on: packages/libhdf4/branches/upstream/current/mfhdf/hrepack/hrepack_all.sh
___________________________________________________________________
Name: svn:executable
   + *

Added: packages/libhdf4/branches/upstream/current/mfhdf/hrepack/hrepack_an.c
===================================================================
--- packages/libhdf4/branches/upstream/current/mfhdf/hrepack/hrepack_an.c	                        (rev 0)
+++ packages/libhdf4/branches/upstream/current/mfhdf/hrepack/hrepack_an.c	2007-05-15 09:53:05 UTC (rev 831)
@@ -0,0 +1,287 @@
+/****************************************************************************
+ * NCSA HDF                                                                 *
+ * Software Development Group                                               *
+ * National Center for Supercomputing Applications                          *
+ * University of Illinois at Urbana-Champaign                               *
+ * 605 E. Springfield, Champaign IL 61820                                   *
+ *                                                                          *
+ * For conditions of distribution and use, see the accompanying             *
+ * hdf/COPYING file.                                                        *
+ *                                                                          *
+ ****************************************************************************/
+
+
+#include "hdf.h"
+#include "mfhdf.h"
+
+#include "hrepack_an.h"
+
+/*-------------------------------------------------------------------------
+ * Function: copy_vg_an
+ *
+ * Purpose: copy Vgroup ANs
+ *
+ * Return: ok, 1, -1 not ok 
+ *
+ *-------------------------------------------------------------------------
+ */
+
+int copy_vg_an(int32 infile_id,
+               int32 outfile_id,
+               int32 vgroup_id,
+               int32 vgroup_id_out, 
+               char *path,
+               options_t *options) 
+{
+ int32 ref_in,
+       tag_in,
+       ref_out,
+       tag_out;
+
+ if ( options->trip==0 ) 
+ {
+  return 1;
+ }
+
+ if ((ref_in = VQueryref(vgroup_id))==FAIL){
+  printf( "Failed to get ref for <%s>\n", path);
+  return-1;
+ }
+ if ((tag_in = VQuerytag(vgroup_id))==FAIL){
+  printf( "Failed to get tag for <%s>\n", path);
+  return-1;
+ }
+ if ((ref_out = VQueryref(vgroup_id_out))==FAIL){
+  printf( "Failed to get ref for <%s>\n", path);
+  return-1;
+ }
+ if ((tag_out = VQuerytag(vgroup_id_out))==FAIL){
+  printf( "Failed to get tag for <%s>\n", path);
+  return-1;
+ }
+
+ if (copy_an(infile_id,
+  outfile_id,
+  ref_in,
+  tag_in,
+  ref_out,
+  tag_out, 
+  path,
+  options)<0)
+   return FAIL;
+
+ return SUCCESS;
+}
+
+
+/*-------------------------------------------------------------------------
+ * Function: copy_vs_an
+ *
+ * Purpose: copy Vdata ANs
+ *
+ * Return: ok, 1, -1 not ok 
+ *
+ *-------------------------------------------------------------------------
+ */
+
+int copy_vs_an(int32 infile_id,
+               int32 outfile_id,
+               int32 vdata_id,
+               int32 vdata_id_out, 
+               char *path,
+               options_t *options) 
+{
+ int32 ref_in,
+       tag_in,
+       ref_out,
+       tag_out;
+
+ if ( options->trip==0 ) 
+ {
+  return 1;
+ }
+
+ if ((ref_in = VSQueryref(vdata_id))==FAIL){
+  printf( "Failed to get ref for <%s>\n", path);
+  return-1;
+ }
+ if ((tag_in = VSQuerytag(vdata_id))==FAIL){
+  printf( "Failed to get tag for <%s>\n", path);
+  return-1;
+ }
+ if ((ref_out = VSQueryref(vdata_id_out))==FAIL){
+  printf( "Failed to get ref for <%s>\n", path);
+  return-1;
+ }
+ if ((tag_out = VSQuerytag(vdata_id_out))==FAIL){
+  printf( "Failed to get tag for <%s>\n", path);
+  return-1;
+ }
+
+ if (copy_an(infile_id,
+  outfile_id,
+  ref_in,
+  tag_in,
+  ref_out,
+  tag_out, 
+  path,
+  options)<0)
+   return FAIL;
+
+ return 1;
+}
+
+
+/*-------------------------------------------------------------------------
+ * Function: copy_an_data
+ *
+ * Purpose: copy DATA ANs
+ *
+ * Return: ok, 1, -1 not ok 
+ *
+ *-------------------------------------------------------------------------
+ */
+
+int copy_an_data(int32 infile_id,
+                 int32 outfile_id,
+                 int32 ref_in, 
+                 int32 tag_in,
+                 int32 ref_out, 
+                 int32 tag_out,
+                 ann_type type, 
+                 char *path, 
+                 options_t *options) 
+{
+ int32 an_id,         /* AN interface identifier */
+       an_out,        /* AN interface identifier */
+       ann_id,        /* an annotation identifier */
+       ann_out,       /* an annotation identifier */
+       i,             /* position of an annotation */
+       ann_length,    /* length of the text in an annotation */
+       n_anno;
+       
+ char *buf;           /* buffer to hold the read annotation */
+ int  is_label= (type==AN_DATA_LABEL)?1:0;
+ int  ret=0;
+
+ if ( options->trip==0 ) 
+ {
+  return 1;
+ }
+ 
+ /* Initialize the AN interface  */
+ an_id  = ANstart (infile_id);
+ an_out = ANstart (outfile_id);
+
+ /* Get the number of ANs in this object  */
+ if((n_anno = ANnumann(an_id,type,(uint16)tag_in,(uint16)ref_in))==FAIL) {
+  printf( "Failed to get annotations for <%s>\n", path);
+  return-1;
+ }
+ 
+ for (i = 0; i < n_anno; i++) 
+ {
+ /*-------------------------------------------------------------------------
+  * read
+  *-------------------------------------------------------------------------
+  */ 
+  if((ann_id = ANselect(an_id,i,type))==FAIL) {
+   printf( "Failed to select AN %d of <%s>\n", i, path);
+   continue;
+  }
+  if((ann_length = ANannlen(ann_id))==FAIL) {
+   printf( "Failed to get AN %d lenght of <%s>\n", i, path);
+   continue;
+  }
+  
+ /*
+  * Read the data label.  Note that the size of the buffer,
+  * i.e., the third parameter, is 1 character more than the length of
+  * the data label; that is for the null character.  It is not the case
+  * when a description is retrieved because the description does not 
+  * necessarily end with a null character.
+  * 
+  */
+  if (is_label)
+   ann_length++;
+
+  if ((buf = (char *)malloc((ann_length)*sizeof(int8)))==NULL ) {
+   printf( "Failed to get memory for AN %d of <%s>\n", i, path);
+   continue;
+  }
+  if(ANreadann(ann_id,buf,ann_length)==FAIL){
+   printf( "Failed to read AN %d of <%s>\n", i, path);
+   if (buf) free(buf);
+   continue;
+  }
+  if(ANendaccess(ann_id)==FAIL){
+   printf( "Failed to end AN %d of <%s>\n", i, path);
+   if (buf) free(buf);
+   continue;
+  }
+ /*-------------------------------------------------------------------------
+  * write
+  *-------------------------------------------------------------------------
+  */  
+ /* Create the data label for the vgroup identified by its tag and ref number */
+  if((ann_out = ANcreate(an_out,(uint16)tag_out,(uint16)ref_out,type))==FAIL) {
+   printf( "Failed to create AN %d of <%s>\n", i, path);
+   continue;
+  }
+  /* Write the annotation  */
+  if (ANwriteann (ann_out,buf,ann_length)==FAIL){
+   printf( "Failed to write AN %d of <%s>\n", i, path);
+  }
+  if(ANendaccess(ann_out)==FAIL){
+   printf( "Failed to end AN %d of <%s>\n", i, path);
+   if (buf) free(buf);
+   continue;
+  }
+  if (buf) free(buf);
+ }
+ 
+ /* Terminate access to the AN interface */
+ if (ANend (an_id)==FAIL){
+  printf( "Failed close AN for <%s>\n", path);
+  ret=-1;
+ }
+ if (ANend (an_out)==FAIL){
+  printf( "Failed close AN for <%s>\n", path);
+  ret=-1;
+ }
+ return ret;
+}
+
+
+/*-------------------------------------------------------------------------
+ * Function: copy_an
+ *
+ * Purpose: copy DATA ANs (AN_DATA_LABEL and AN_DATA_DESC)
+ *
+ * Return: ok, 1, -1 not ok 
+ *
+ *-------------------------------------------------------------------------
+ */
+
+int copy_an(int32 infile_id,
+            int32 outfile_id,
+            int32 ref_in, 
+            int32 tag_in,
+            int32 ref_out, 
+            int32 tag_out,
+            char *path, 
+            options_t *options) 
+{
+ 
+ if (copy_an_data(infile_id,outfile_id,
+  ref_in,tag_in,ref_out,tag_out, 
+  AN_DATA_LABEL,path,options)<0)
+  return FAIL;
+ if (copy_an_data(infile_id,outfile_id,
+  ref_in,tag_in,ref_out,tag_out,
+  AN_DATA_DESC,path,options)<0)
+  return FAIL;
+ 
+ return SUCCESS;
+}
+

Added: packages/libhdf4/branches/upstream/current/mfhdf/hrepack/hrepack_an.h
===================================================================
--- packages/libhdf4/branches/upstream/current/mfhdf/hrepack/hrepack_an.h	                        (rev 0)
+++ packages/libhdf4/branches/upstream/current/mfhdf/hrepack/hrepack_an.h	2007-05-15 09:53:05 UTC (rev 831)
@@ -0,0 +1,62 @@
+/****************************************************************************
+ * NCSA HDF                                                                 *
+ * Software Development Group                                               *
+ * National Center for Supercomputing Applications                          *
+ * University of Illinois at Urbana-Champaign                               *
+ * 605 E. Springfield, Champaign IL 61820                                   *
+ *                                                                          *
+ * For conditions of distribution and use, see the accompanying             *
+ * hdf/COPYING file.                                                        *
+ *                                                                          *
+ ****************************************************************************/
+
+
+#ifndef REPACK_AN_H_
+#define REPACK_AN_H_
+
+#include "hrepack.h"
+
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+
+int copy_an(int32 infile_id,int32 outfile_id,
+            int32 ref_in, int32 tag_in,
+            int32 ref_out, int32 tag_out,
+            char *path, options_t *options);
+
+
+int copy_vg_an(int32 infile_id,
+               int32 outfile_id,
+               int32 vgroup_id,
+               int32 vgroup_id_out, 
+               char *path,
+               options_t *options);
+
+int copy_vs_an(int32 infile_id,
+               int32 outfile_id,
+               int32 vdata_id,
+               int32 vdata_id_out, 
+               char *path,
+               options_t *options);
+
+int copy_an_data(int32 infile_id,
+                 int32 outfile_id,
+                 int32 ref_in, 
+                 int32 tag_in,
+                 int32 ref_out, 
+                 int32 tag_out,
+                 ann_type type, 
+                 char *path, 
+                 options_t *options);
+
+
+
+#ifdef __cplusplus
+}
+#endif
+
+
+#endif  /* REPACK_AN_H_ */

Added: packages/libhdf4/branches/upstream/current/mfhdf/hrepack/hrepack_check.c
===================================================================
--- packages/libhdf4/branches/upstream/current/mfhdf/hrepack/hrepack_check.c	                        (rev 0)
+++ packages/libhdf4/branches/upstream/current/mfhdf/hrepack/hrepack_check.c	2007-05-15 09:53:05 UTC (rev 831)
@@ -0,0 +1,299 @@
+/****************************************************************************
+ * NCSA HDF                                                                 *
+ * Software Development Group                                               *
+ * National Center for Supercomputing Applications                          *
+ * University of Illinois at Urbana-Champaign                               *
+ * 605 E. Springfield, Champaign IL 61820                                   *
+ *                                                                          *
+ * For conditions of distribution and use, see the accompanying             *
+ * hdf/COPYING file.                                                        *
+ *                                                                          *
+ ****************************************************************************/
+
+
+#include "hdf.h"
+#include "mfhdf.h"
+
+static void usage();
+static int sds_get_compck(char *fname, char *sds_name);
+static int sds_get_all(char *fname);
+static const char* get_schunk(int32 flags);
+static const char* get_scomp(comp_coder_t code);
+
+
+int main(int argc, char **argv)
+{
+ if (argc==3)
+  sds_get_compck(argv[1], argv[2]);
+ else if (argc==2)
+  sds_get_all(argv[1]);
+ else {
+  usage();
+  return 1;
+ }
+ 
+ return 0;
+}
+
+
+/*-------------------------------------------------------------------------
+ * Function: sds_get_compck
+ *
+ * Purpose: utility function to verify chunking and compressing for  SDS_NAME
+ *
+ * Return: void
+ *
+ * Programmer: Pedro Vicente, pvn at ncsa.uiuc.edu
+ *
+ * Date: August 3, 2003
+ *
+ *-------------------------------------------------------------------------
+ */
+
+static
+int sds_get_compck(char *fname, char *sds_name)
+{
+ HDF_CHUNK_DEF chunk_def;    /* chunk defintion read */ 
+ comp_coder_t  comp_type;    /* to retrieve compression type into */
+ comp_info     comp_info;    /* compression structure */ 
+ int32         chunk_flags;  /* chunking flag */ 
+ int32         sd_id,
+               sds_id, 
+               sds_index,
+               dimsizes[MAX_VAR_DIMS],/* dimensional size of SDS */
+               nattrs,                /* number of SDS attributes */
+               dtype,                 /* SDS data type */
+               rank;                  /* rank of SDS */
+ int           i;
+
+ if ((sd_id = SDstart (fname, DFACC_RDONLY))==FAIL) {
+  printf("Error: cannot open file <%s>\n", fname);
+  return -1;
+ }
+ sds_index = SDnametoindex(sd_id, sds_name);
+ if ((sds_id = SDselect(sd_id, sds_index))==FAIL) {
+  printf("Error: cannot open sds <%s>\n", sds_name);
+  SDend (sd_id);
+  return -1;
+ }
+ SDgetchunkinfo (sds_id, &chunk_def, &chunk_flags);
+
+ /*obtain name,rank,dimsizes,datatype and num of attributes of sds */
+ SDgetinfo(sds_id,sds_name,&rank,dimsizes,&dtype,&nattrs);
+
+/*-------------------------------------------------------------------------
+ * print the dimensions
+ *-------------------------------------------------------------------------
+ */
+ 
+ printf("dimensions:  [");
+ for (i = 0; i < rank; i++)
+ {
+  printf("%d ", dimsizes[i]);
+ }
+ printf("]\n");
+
+/*-------------------------------------------------------------------------
+ * print the chunk info
+ *-------------------------------------------------------------------------
+ */
+
+ printf("chunk flags:  %s \n", get_schunk(chunk_flags));
+ if (HDF_NONE != chunk_flags )
+ {
+  printf("chunk dimension:  [");
+  for (i = 0; i < rank; i++)
+  {
+   printf("%d ", chunk_def.chunk_lengths[i]);
+  }
+  printf("]\n");
+ }
+
+
+/*-------------------------------------------------------------------------
+ * retrieve the compression info
+ *-------------------------------------------------------------------------
+ */
+ 
+ comp_type = COMP_CODE_NONE;  /* reset variables before retrieving info */
+ HDmemset(&comp_info, 0, sizeof(comp_info)) ;
+ SDgetcompress(sds_id, &comp_type, &comp_info);
+ 
+ printf("compression type:  %s \n", get_scomp(comp_type));
+ if (COMP_CODE_NONE != comp_type )
+ {
+  switch (comp_type)
+  {
+  default:
+   break;
+  case COMP_CODE_RLE:
+   break;
+  case COMP_CODE_SKPHUFF:
+   printf("skipping factor:  %d \n", comp_info.skphuff.skp_size);
+   break;
+  case COMP_CODE_DEFLATE:
+   printf("level:  %d \n", comp_info.deflate.level);
+   break;
+  case COMP_CODE_JPEG:
+   printf("quality factor:  %d \n", comp_info.jpeg.quality);
+   break;
+  case COMP_CODE_SZIP:
+   printf("pixels per block:  %d \n", comp_info.szip.pixels_per_block);
+   break;
+  };
+ }
+
+ /* terminate access to the sds */
+ SDendaccess (sds_id);
+ 
+ /* terminate access to the sd interface */
+ SDend (sd_id);
+ 
+ return 0;
+ 
+}
+
+/*-------------------------------------------------------------------------
+ * Function: sds_get_all
+ *
+ * Purpose: utility function to ptint all SDSs names
+ *
+ * Return: void
+ *
+ * Programmer: Pedro Vicente, pvn at ncsa.uiuc.edu
+ *
+ * Date: August 3, 2003
+ *
+ *-------------------------------------------------------------------------
+ */
+
+static
+int sds_get_all(char *fname)
+{
+ int32         sd_id,
+               sds_id, 
+               sds_index,
+               n_datasets,   /* number of datasets in the file */
+               n_file_attrs, /* number of file attributes */
+               data_type,              /* number type  */
+               rrank,                  /* read rank */
+               n_attrs,                /* number of attributes */
+               dim_sizes[MAX_VAR_DIMS];/* dimensions of an image */
+ char          name[MAX_GR_NAME];      /* name of dataset */
+
+ /* initialize the sd interface */
+  if ((sd_id = SDstart (fname, DFACC_RDONLY))==FAIL) {
+  printf("Error: cannot open file <%s>\n", fname);
+  return -1;
+ }
+ 
+ /* determine the number of data sets in the file */
+ if (SDfileinfo (sd_id, &n_datasets, &n_file_attrs)==FAIL) {
+  printf("Error: Cannot get file information\n");
+  SDend (sd_id);
+  return -1;
+ }
+ 
+ printf("List of sds:\n");
+ for (sds_index = 0; sds_index < n_datasets; sds_index++)
+ {
+  sds_id   = SDselect (sd_id, sds_index);
+  
+  /* skip dimension scales */
+  if ( SDiscoordvar(sds_id) ) {
+   SDendaccess(sds_id);
+   continue;
+  }
+
+  SDgetinfo(sds_id, name, &rrank, dim_sizes, &data_type, &n_attrs);
+ 
+  printf("    %s\n", name);
+ 
+  /* terminate access to the current dataset */
+  SDendaccess (sds_id);
+ }
+ 
+ /* terminate access to the sd interface */
+ SDend (sd_id);
+ 
+ return 0;
+}
+
+
+/*-------------------------------------------------------------------------
+ * Function: get_scomp
+ *
+ * Purpose: return the compression type as a string
+ *
+ * Return: void
+ *
+ *-------------------------------------------------------------------------
+ */
+
+static
+const char* get_scomp(comp_coder_t code)
+{
+ if (code==COMP_CODE_RLE)
+  return "RLE";
+ else if (code==COMP_CODE_SKPHUFF)
+  return "HUFF";
+ else if (code==COMP_CODE_DEFLATE)
+  return "GZIP";
+ else if (code==COMP_CODE_JPEG)
+  return "JPEG";
+ if (code==COMP_CODE_SZIP)
+  return "SZIP";
+ else if (code==COMP_CODE_NONE)
+  return "NONE";
+ else {
+  printf("Input Error in compression type\n");
+  exit(1);
+ }
+ /* not reached */
+ return NULL;
+} 
+
+
+/*-------------------------------------------------------------------------
+ * Function: get_schunk
+ *
+ * Purpose: return the chunking flags as a string
+ *
+ * Return: void
+ *
+ *-------------------------------------------------------------------------
+ */
+
+static
+const char* get_schunk(int32 flags)
+{
+ if (flags==(HDF_CHUNK | HDF_COMP))
+  return "HDF_CHUNK | HDF_COMP";
+ else if (flags==(HDF_CHUNK))
+  return "HDF_CHUNK";
+ else if (flags==(HDF_COMP))
+  return "HDF_COMP";
+ else if (flags==(HDF_NONE))
+  return "HDF_NONE";
+ else
+  return "Invalid chunk flags";
+} 
+
+
+/*-------------------------------------------------------------------------
+ * Function: usage
+ *
+ * Purpose: print usage
+ *
+ * Return: void
+ *
+ *-------------------------------------------------------------------------
+ */
+
+static 
+void usage()
+{
+ printf("hrepack_check file_name <sds_name>\n");
+ printf("    file_name   HDF File\n");
+ printf("    sds_name    SDS name (if no name, a list of all names is printed)\n");
+}

Added: packages/libhdf4/branches/upstream/current/mfhdf/hrepack/hrepack_cmp.c
===================================================================
--- packages/libhdf4/branches/upstream/current/mfhdf/hrepack/hrepack_cmp.c	                        (rev 0)
+++ packages/libhdf4/branches/upstream/current/mfhdf/hrepack/hrepack_cmp.c	2007-05-15 09:53:05 UTC (rev 831)
@@ -0,0 +1,230 @@
+/****************************************************************************
+ * NCSA HDF                                                                 *
+ * Software Development Group                                               *
+ * National Center for Supercomputing Applications                          *
+ * University of Illinois at Urbana-Champaign                               *
+ * 605 E. Springfield, Champaign IL 61820                                   *
+ *                                                                          *
+ * For conditions of distribution and use, see the accompanying             *
+ * hdf/COPYING file.                                                        *
+ *                                                                          *
+ ****************************************************************************/
+
+
+#include "hdf.h"
+#include "mfhdf.h"
+#include "hrepack.h"
+
+
+int cmp_grs(char* file1_name,char* file2_name);
+int cmp_gr(int32 ri1_id, int32 ri2_id);
+
+
+
+/*-------------------------------------------------------------------------
+ * Function: cmp_grs
+ *
+ * Purpose: compare all GR images in 2 files, assumed to be identical
+ *
+ * Return: same as memcmp
+ *
+ * Programmer: Pedro Vicente, pvn at ncsa.uiuc.edu
+ *
+ * Date: September 03, 2003
+ *
+ *-------------------------------------------------------------------------
+ */
+
+int cmp_grs(char* file1_name,char* file2_name)
+{
+ int32 file1_id,          /* file identifier */
+       file2_id,          /* file identifier */
+       gr1_id,            /* GR interface identifier */
+       gr2_id,            /* GR interface identifier */
+       ri1_id,            /* raster image identifier */
+       ri2_id,            /* raster image identifier */
+       n_rimages,         /* number of raster images in the file */
+       n_file_attrs,      /* number of file attributes */
+       ri_index;          /* index of a image */
+ int   cmp=-1;
+
+ /* open the files for read  */
+ file1_id = Hopen (file1_name,DFACC_READ,0);
+ file2_id = Hopen (file2_name,DFACC_READ,0);
+ 
+ /* initialize the GR interface */
+ gr1_id = GRstart (file1_id);
+ gr2_id = GRstart (file2_id);
+ 
+ /* determine the contents of the file */
+ if (GRfileinfo (gr1_id, &n_rimages, &n_file_attrs)==FAIL){
+  printf("Error: Cannot get GR info\n");
+  goto out;
+ }
+  
+ for (ri_index = 0; ri_index < n_rimages; ri_index++)
+ {
+  ri1_id = GRselect (gr1_id, ri_index);
+  ri2_id = GRselect (gr2_id, ri_index);
+  
+  /* compare GR  */
+  cmp = cmp_gr(ri1_id,ri2_id);
+
+  /* terminate access to the current raster image */
+  GRendaccess (ri1_id);
+  GRendaccess (ri2_id);
+ }
+ 
+out:
+ /* terminate access to the GR interface */
+ GRend (gr2_id);
+ GRend (gr2_id);
+ /* close the HDF files */
+ if (Hclose (file1_id)== FAIL )
+  printf( "Failed to close file <%s>\n", file1_name);
+ if (Hclose (file2_id)== FAIL )
+  printf( "Failed to close file <%s>\n", file2_name);
+
+ return cmp;
+
+}
+
+
+/*-------------------------------------------------------------------------
+ * Function: cmp_gr
+ *
+ * Purpose: compare 2 GR images in 2 files, assumed to be identical
+ *
+ * Return: same as memcmp
+ *
+ * Programmer: Pedro Vicente, pvn at ncsa.uiuc.edu
+ *
+ * Date: September 03, 2003
+ *
+ *-------------------------------------------------------------------------
+ */
+
+int  cmp_gr(int32 ri1_id, int32 ri2_id)
+{
+ int32         dimsizes[2],   /* dimensions of an image */
+               n_comps,       /* number of components an image contains */
+               interlace_mode1,/* interlace mode of an image */ 
+               dtype,         /* number type of an image */
+               n_attrs;       /* number of attributes belong to an image */
+ int32         interlace_mode2;        
+ char          gr_name[MAX_GR_NAME]; 
+ int           j, rank=2;
+ int32         start[2],       /* read start */
+               edges[2],       /* read edges */
+               numtype,        /* number type */
+               eltsz,          /* element size */
+               nelms,          /* number of elements */
+               data_size;
+ VOIDP         buf1=NULL, buf2=NULL;
+ int           cmp=-1;
+
+ GRgetiminfo(ri1_id,gr_name,&n_comps,&dtype,&interlace_mode1,dimsizes,&n_attrs);
+ GRgetiminfo(ri2_id,gr_name,&n_comps,&dtype,&interlace_mode2,dimsizes,&n_attrs);
+
+ printf( "Comparing GR <%s>: ", gr_name);
+
+ 
+/*-------------------------------------------------------------------------
+ * match interlace 
+ * NOTE: GR images are always stored as pixel_interlace (0) on disk
+ *       that does not happen with images saved with the 
+ *       DF24 - Single-file 24-Bit Raster Image Interface,
+ *       where the interlace mode on disk can be 0, 1 or 2
+ *-------------------------------------------------------------------------
+ */
+ if ( interlace_mode1 != interlace_mode2 )
+ {
+  printf("Warning: different interlace mode: <%d> and <%d>", 
+   interlace_mode1,interlace_mode2);
+  interlace_mode1=interlace_mode2;
+ }
+
+/*-------------------------------------------------------------------------
+ * check for data size before printing
+ *-------------------------------------------------------------------------
+ */
+
+ /* compute the number of the bytes for each value. */
+ numtype = dtype & DFNT_MASK;
+ eltsz = DFKNTsize(numtype | DFNT_NATIVE);
+
+ /* set edges of GR */
+ nelms=1;
+ for (j = 0; j < rank; j++) {
+  nelms   *= dimsizes[j];
+  edges[j] = dimsizes[j];
+  start[j] = 0;
+ }
+
+ data_size = dimsizes[0]*dimsizes[1]*n_comps*eltsz;
+
+/*-------------------------------------------------------------------------
+ * read gr 1
+ *-------------------------------------------------------------------------
+ */
+
+ /* alloc */
+ if ((buf1 = (VOIDP) HDmalloc(data_size)) == NULL) {
+  printf( "Failed to allocate %d elements of size %d\n", nelms, eltsz);
+  goto out;
+ }
+
+
+ /* set the interlace for reading  */
+ if ( GRreqimageil(ri1_id, interlace_mode1) == FAIL ){
+  printf( "Could not set interlace for GR\n");
+  goto out;
+ }
+ 
+ /* read data */
+ if (GRreadimage (ri1_id, start, NULL, edges, buf1) == FAIL) {
+  printf( "Could not read GR\n");
+  goto out;
+ }
+
+/*-------------------------------------------------------------------------
+ * read gr 2
+ *-------------------------------------------------------------------------
+ */
+
+ /* alloc */
+ if ((buf2 = (VOIDP) HDmalloc(data_size)) == NULL) {
+  printf( "Failed to allocate %d elements of size %d\n", nelms, eltsz);
+  goto out;
+ }
+
+ /* set the interlace for reading  */
+ if ( GRreqimageil(ri2_id, interlace_mode2 /*interlace_mode1*/) == FAIL ){
+  printf( "Could not set interlace for GR\n");
+  goto out;
+ }
+ 
+ /* read data */
+ if (GRreadimage (ri2_id, start, NULL, edges, buf2) == FAIL) {
+  printf( "Could not read GR\n");
+  goto out;
+ }
+ 
+ cmp = HDmemcmp(buf1,buf2,data_size);
+ if (cmp!=0)
+  printf("Differences found\n");
+ else
+  printf("\n");
+
+out:
+ /* terminate access to the GRs */
+ GRendaccess(ri1_id);
+ GRendaccess(ri2_id);
+ if (buf1)
+  free(buf1);
+ if (buf2)
+  free(buf2);
+ return cmp;
+ 
+}
+

Added: packages/libhdf4/branches/upstream/current/mfhdf/hrepack/hrepack_gr.c
===================================================================
--- packages/libhdf4/branches/upstream/current/mfhdf/hrepack/hrepack_gr.c	                        (rev 0)
+++ packages/libhdf4/branches/upstream/current/mfhdf/hrepack/hrepack_gr.c	2007-05-15 09:53:05 UTC (rev 831)
@@ -0,0 +1,640 @@
+/****************************************************************************
+ * NCSA HDF                                                                 *
+ * Software Development Group                                               *
+ * National Center for Supercomputing Applications                          *
+ * University of Illinois at Urbana-Champaign                               *
+ * 605 E. Springfield, Champaign IL 61820                                   *
+ *                                                                          *
+ * For conditions of distribution and use, see the accompanying             *
+ * hdf/COPYING file.                                                        *
+ *                                                                          *
+ ****************************************************************************/
+
+
+
+#include <assert.h>
+#include "hdf.h"
+#include "mfhdf.h"
+
+#include "hrepack_gr.h"
+#include "hrepack_utils.h"
+#include "hrepack_sdutil.h"
+#include "hrepack_an.h"
+#include "hrepack_parse.h"
+#include "hrepack_opttable.h"
+
+
+/*-------------------------------------------------------------------------
+ * Function: copy_gr
+ *
+ * Purpose: copy a GR from input file to output file and compress it 
+ *  using options
+ *
+ * Return: 0 ok, -1 not ok
+ *
+ * Programmer: Pedro Vicente, pvn at ncsa.uiuc.edu
+ *
+ * Date: July 11, 2003
+ *
+ *-------------------------------------------------------------------------
+ */
+
+int  copy_gr(int32 infile_id,
+             int32 outfile_id,
+             int32 gr_in,
+             int32 gr_out,
+             int32 tag,               /* tag of input GR */
+             int32 ref,               /* ref of input GR */
+             int32 vgroup_id_out_par, /* output parent group ID */
+             char*path_name,          /* absolute path for input group name */
+             options_t *options,
+             table_t *table)
+{
+ int32         ri_id,         /* raster image identifier */
+               ri_out,        /* raster image identifier */
+               ri_index,      /* index of a image */
+               dimsizes[2],   /* dimensions of an image */
+               n_comps,       /* number of components an image contains */
+               interlace_mode,/* interlace mode of an image */ 
+               dtype,         /* number type of an image */
+               n_attrs,       /* number of attributes belong to an image */
+               gr_ref,        /* reference number of the output data set */
+               pal_id,        /* palette identifier */
+               pal_out,       /* palette identifier */
+               pal_ref,
+               r_num_entries, 
+               r_data_type, 
+               r_ncomp, 
+               r_interlace_mode; 
+ char          gr_name[MAX_GR_NAME]; 
+ char          *path=NULL;
+ int           info;           /* temporary int compression information */
+ int           szip_mode;      /* szip mode, EC, NN */
+ comp_coder_t  comp_type;      /* compression type requested  */
+ comp_coder_t  comp_type_in;   /* compression type original  */
+ comp_info     c_info;         /* compression information requested  */
+ comp_info     c_info_in;      /* compression information original  */
+ HDF_CHUNK_DEF chunk_def;      /* chunk definition */
+ HDF_CHUNK_DEF chunk_def_in;   /* chunk definition original */
+ int32         chunk_flags;    /* chunk flags */ 
+ int32         chunk_flags_in; /* chunk flags original*/ 
+ int           i, j, ret=0, rank=2, have_info,stat;
+ int           has_pal = 0;
+ int32         start[2],       /* read start */
+               edges[2],       /* read edges */
+               numtype,        /* number type */
+               eltsz,          /* element size */
+               nelms,          /* number of elements */
+               data_size;
+ VOIDP         buf=NULL;
+ uint8         pal_data[256*3];
+
+
+ ri_index = GRreftoindex(gr_in,(uint16)ref);
+ ri_id    = GRselect(gr_in,ri_index);
+ 
+ if (GRgetiminfo(ri_id,gr_name,&n_comps,&dtype,&interlace_mode,dimsizes,&n_attrs)==FAIL){
+  printf( "Could not information for GR\n");
+  GRendaccess(ri_id);
+  return-1;
+ }
+ 
+ /* initialize path */
+ path=get_path(path_name,gr_name);
+
+ /* add object to table */
+ table_add(table,tag,ref,path);
+ 
+#if defined(HZIP_DEBUG)
+ printf ("\t%s %d\n", path, ref); 
+#endif
+
+/*-------------------------------------------------------------------------
+ * get the original compression/chunk information from the object 
+ *-------------------------------------------------------------------------
+ */
+ 
+ comp_type_in = COMP_CODE_NONE;  /* reset variables before retrieving information */
+ HDmemset(&c_info_in, 0, sizeof(comp_info)) ;
+ stat=GRgetcompress(ri_id, &comp_type_in, &c_info_in);
+ if (stat==FAIL && comp_type_in>0){
+  printf( "Could not get compress information for GR <%s>\n",path);
+  GRendaccess(ri_id);
+  return-1;
+ }
+
+ /* get chunk lengths */
+ if (GRgetchunkinfo(ri_id, &chunk_def_in, &chunk_flags_in)==FAIL){
+  printf( "Could not get chunk information for GR <%s>\n",path);
+  GRendaccess(ri_id);
+  return-1;
+ }
+
+ /* retrieve the compress information if so */
+ if ( (HDF_CHUNK | HDF_COMP) == chunk_flags_in )
+ {
+  chunk_def_in.comp.comp_type=comp_type_in;
+  switch (comp_type_in)
+  {
+   case COMP_CODE_NONE:
+   break;
+  case COMP_CODE_SZIP:
+#ifdef H4_GR_SZIP
+   chunk_def_in.comp.comp_type              = COMP_CODE_SZIP;
+   chunk_def_in.comp.cinfo.szip             = c_info_in.szip;
+#endif
+   chunk_def_in.comp.comp_type              = COMP_CODE_NONE;
+   printf("Warning: SZIP compression not supported for GR\n");
+   break;
+  case COMP_CODE_RLE:
+   chunk_def_in.comp.comp_type              = COMP_CODE_RLE;
+   break;
+  case COMP_CODE_SKPHUFF:
+   chunk_def_in.comp.comp_type              = COMP_CODE_SKPHUFF;
+   chunk_def_in.comp.cinfo.skphuff          = c_info_in.skphuff;
+   break;
+  case COMP_CODE_DEFLATE:
+   chunk_def_in.comp.comp_type              = COMP_CODE_DEFLATE;
+   chunk_def_in.comp.cinfo.deflate          = c_info_in.deflate;
+   break;
+  case COMP_CODE_JPEG:
+   chunk_def_in.comp.comp_type              = COMP_CODE_JPEG;
+   chunk_def_in.comp.cinfo.jpeg             = c_info_in.jpeg;
+   break;
+  default:
+   printf("Error: Unrecognized compression code <%d> in <%s>\n",comp_type_in,path);
+   break;
+  };
+ }
+
+/*-------------------------------------------------------------------------
+ * set the default values to the ones read from the object
+ *-------------------------------------------------------------------------
+ */
+
+ comp_type   = comp_type_in;
+ switch (comp_type_in)
+  {
+ default:
+  break;
+  case COMP_CODE_SZIP:
+#ifdef H4_GR_SZIP
+   info  = c_info_in.szip.pixels_per_block;
+#ifdef H4_HAVE_LIBSZ
+ if (c_info_in.szip.options_mask & SZ_EC_OPTION_MASK) {
+  szip_mode = EC_MODE;
+ } else if (c_info_in.szip.options_mask & SZ_NN_OPTION_MASK) {
+  szip_mode = NN_MODE;
+ }
+#else
+  szip_mode = 0; /* irrelevant */
+#endif
+#endif
+  szip_mode = 0; /* irrelevant */
+   break;
+  case COMP_CODE_RLE:
+   break;
+  case COMP_CODE_SKPHUFF:
+   info  = c_info_in.skphuff.skp_size;
+   break;
+  case COMP_CODE_DEFLATE:
+   info  = c_info_in.deflate.level;
+   break;
+  case COMP_CODE_JPEG:
+   info  = c_info_in.jpeg.quality;
+   break;
+  };
+ chunk_flags = chunk_flags_in;
+ if ( (HDF_CHUNK) == chunk_flags )
+ {
+  for (i = 0; i < rank; i++) 
+   chunk_def.chunk_lengths[i]      = chunk_def_in.chunk_lengths[i];
+ }
+ else if ( (HDF_CHUNK | HDF_COMP) == chunk_flags )
+ {
+  for (i = 0; i < rank; i++) {
+   chunk_def.chunk_lengths[i]      = chunk_def_in.chunk_lengths[i];
+   chunk_def.comp.chunk_lengths[i] = chunk_def_in.chunk_lengths[i];
+  }
+  chunk_def.comp.comp_type=comp_type_in;
+  switch (comp_type_in)
+  {
+   case COMP_CODE_NONE:
+   break;
+  case COMP_CODE_SZIP:
+#ifdef H4_GR_SZIP
+   chunk_def.comp.comp_type              = COMP_CODE_SZIP;
+   chunk_def.comp.cinfo.szip             = c_info_in.szip;
+#endif
+   chunk_def.comp.comp_type              = COMP_CODE_NONE;
+   printf("Warning: SZIP not supported for GR\n");
+   break;
+  case COMP_CODE_RLE:
+   chunk_def.comp.comp_type              = COMP_CODE_RLE;
+   break;
+  case COMP_CODE_SKPHUFF:
+   chunk_def.comp.comp_type              = COMP_CODE_SKPHUFF;
+   chunk_def.comp.cinfo.skphuff          = c_info_in.skphuff;
+   break;
+  case COMP_CODE_DEFLATE:
+   chunk_def.comp.comp_type              = COMP_CODE_DEFLATE;
+   chunk_def.comp.cinfo.deflate          = c_info_in.deflate;
+   break;
+  case COMP_CODE_JPEG:
+   chunk_def.comp.comp_type              = COMP_CODE_JPEG;
+   chunk_def.comp.cinfo.jpeg             = c_info_in.jpeg;
+   break;
+  default:
+   printf("Error: Unrecognized compression code <%d> in <%s>\n",comp_type_in,path);
+   break;
+  };
+ }
+
+
+/*-------------------------------------------------------------------------
+ * get the compression/chunk information of this object from the table
+ * translate to usable information
+ * this is done ONLY for the second trip inspection 
+ *-------------------------------------------------------------------------
+ */
+ 
+ /* check inspection mode */
+ have_info = 0;
+ if ( options->trip>0 ) 
+ {
+  have_info = 
+  options_get_info(options,      /* global options */
+                   &chunk_flags, /* chunk flags OUT */
+                   &chunk_def,   /* chunk definition OUT */
+                   &info,        /* compression information OUT */
+                   &szip_mode,   /* compression information OUT */
+                   &comp_type,   /* compression type OUT  */
+                   rank,         /* rank of object IN */
+                   path,         /* path of object IN */
+                   n_comps,      /* number of GR image planes (for SZIP), IN */
+                   dimsizes,     /* dimensions (for SZIP), IN */
+                   dtype         /* numeric type ( for SZIP), IN */
+                   );
+  if (have_info==FAIL)
+   comp_type=COMP_CODE_NONE;
+ } /* check inspection mode */
+
+
+/*-------------------------------------------------------------------------
+ * check for data size before printing
+ *-------------------------------------------------------------------------
+ */
+
+ /* compute the number of the bytes for each value. */
+ numtype = dtype & DFNT_MASK;
+ eltsz = DFKNTsize(numtype | DFNT_NATIVE);
+
+ /* set edges of GR */
+ nelms=1;
+ for (j = 0; j < rank; j++) {
+  nelms   *= dimsizes[j];
+  edges[j] = dimsizes[j];
+  start[j] = 0;
+ }
+
+ data_size = dimsizes[0]*dimsizes[1]*n_comps*eltsz;
+
+/*-------------------------------------------------------------------------
+ * check for objects too small
+ *-------------------------------------------------------------------------
+ */
+ if ( have_info && options->trip>0  && nelms*eltsz<options->threshold )
+ {
+  /* reset to the original values . we don't want to uncompress if it was */
+  chunk_flags=chunk_flags_in;
+  comp_type=comp_type_in;
+  if (options->verbose) {
+   printf("Warning: object size smaller than %d bytes. Not compressing <%s>\n",
+    options->threshold,path);
+  }
+ }
+ 
+/*-------------------------------------------------------------------------
+ * print the PATH, COMP and CHUNK information
+ *-------------------------------------------------------------------------
+ */ 
+ 
+ if (options->verbose)
+ {
+  int pr_comp_type=0;
+  if (comp_type>0)
+  {
+   pr_comp_type=comp_type;
+  }
+  else
+  {
+   if (chunk_flags== (HDF_CHUNK | HDF_COMP))
+   {
+    pr_comp_type=chunk_def.comp.comp_type;
+   }
+  }
+  printf(PFORMAT,
+   (chunk_flags>0)?"chunk":"",                    /*chunk information*/
+   (pr_comp_type>0)?get_scomp(pr_comp_type):"",   /*compression information*/
+   path);                                         /*name*/
+ }
+
+/*-------------------------------------------------------------------------
+ * if we are in first trip inspection mode, exit, after printing the information
+ *-------------------------------------------------------------------------
+ */ 
+ 
+ /* check inspection mode */
+ if ( options->trip==0 ) {
+  if (path) free(path);
+  if (GRendaccess(ri_id)==FAIL){
+   printf( "Could not close GR <%s>\n",path);
+   return-1;
+  }
+  return 0;
+ }
+/*-------------------------------------------------------------------------
+ * read gr and create new one
+ *-------------------------------------------------------------------------
+ */
+
+ /* alloc */
+ if ((buf = (VOIDP) HDmalloc(data_size)) == NULL) {
+  printf( "Failed to allocate %d elements of size %d\n", nelms, eltsz);
+  GRendaccess(ri_id);
+  if (path) free(path);
+  return-1;
+ }
+
+
+ /* set the interlace for reading  */
+ if ( GRreqimageil(ri_id, interlace_mode) == FAIL ){
+  printf( "Could not set interlace for GR <%s>\n", path);
+  GRendaccess(ri_id);
+  if (path) free(path);
+  return-1;
+ }
+ 
+ /* read data */
+ if (GRreadimage (ri_id, start, NULL, edges, buf) == FAIL) {
+  printf( "Could not read GR <%s>\n", path);
+  GRendaccess(ri_id);
+  if (path) free(path);
+  return-1;
+ }
+ 
+ /* create output GR */
+ if ((ri_out = GRcreate(gr_out,gr_name,n_comps,dtype,interlace_mode,dimsizes)) == FAIL) {
+  printf( "Failed to create new GR <%s>\n", path);
+  ret=-1;
+  goto out;
+ }
+
+/*-------------------------------------------------------------------------
+ * set chunk 
+ *
+ * Chunked                  -> flags = HDF_CHUNK
+ * Chunked and compressed   -> flags = HDF_CHUNK | HDF_COMP 
+ * Non-chunked              -> flags = HDF_NONE
+ *-------------------------------------------------------------------------
+ */
+
+ /* set chunk */
+ if ( (chunk_flags == HDF_CHUNK) || (chunk_flags == (HDF_CHUNK | HDF_COMP)) )
+ {
+  if (GRsetchunk (ri_out, chunk_def, chunk_flags)==FAIL)
+  {
+   printf( "Error: Failed to set chunk dimensions for <%s>\n", path);
+   ret=-1;
+   goto out;
+  }
+ }
+
+/*-------------------------------------------------------------------------
+ * set compression
+ *
+ * COMP_CODE_RLE       -> simple RLE encoding
+ * COMP_CODE_SKPHUFF   -> Skipping huffman encoding
+ * COMP_CODE_DEFLATE   -> gzip 'deflate' encoding
+ *-------------------------------------------------------------------------
+ */
+   
+ /* use compress without chunk-in */
+ else if ( chunk_flags==HDF_NONE && comp_type>COMP_CODE_NONE)  
+ {
+ if ( have_info && options->trip>0  && nelms*eltsz<options->threshold )
+ {
+  /* reset to the original values . we don't want to uncompress if it was */
+  comp_type=COMP_CODE_NONE;
+  if (options->verbose) {
+   printf("Warning: object size smaller than %d bytes. Not compressing <%s>\n",
+    options->threshold,path);
+  }
+ } else {
+  /* setup compression factors */
+  switch(comp_type) 
+  {
+   case COMP_CODE_SZIP:
+#ifdef H4_GR_SZIP
+/* not supported */
+   if (set_szip (info,szip_mode,&c_info)==FAIL)
+   {
+    comp_type=COMP_CODE_NONE;
+   }
+#endif
+   printf("Warning: SZIP not supported for GR\n");
+   break;
+  case COMP_CODE_RLE:         
+   break;
+  case COMP_CODE_SKPHUFF:     
+   c_info.skphuff.skp_size    = info;
+   break;
+  case COMP_CODE_DEFLATE:
+   c_info.deflate.level       = info;
+   break;
+  case COMP_CODE_JPEG:
+   c_info.jpeg.quality        = info;
+   c_info.jpeg.force_baseline = 1;
+   break;
+  default:
+   printf( "Error: Unrecognized compression code %d\n", comp_type);
+  }
+
+  if (GRsetcompress (ri_out, comp_type, &c_info)==FAIL)
+  {
+   printf( "Error: Failed to set compression for <%s>\n", path);
+   ret=-1;
+   goto out;
+  }
+ }
+ }
+ 
+ /* write the data */
+ if (GRwriteimage(ri_out, start, NULL, edges, buf) == FAIL) {
+  printf( "Failed to write to new GR <%s>\n", path);
+  ret=-1;
+  goto out;
+ }
+
+/*-------------------------------------------------------------------------
+ * copy attributes
+ *-------------------------------------------------------------------------
+ */ 
+ 
+ if( copy_gr_attrs(ri_id,ri_out,n_attrs,options)==FAIL) {
+  ret=-1;
+  goto out;
+ }
+
+/*-------------------------------------------------------------------------
+ * check for palette
+ *-------------------------------------------------------------------------
+ */ 
+
+ pal_id = GRgetlutid(ri_id, 0);
+ GRgetlutinfo(pal_id,&r_ncomp,&r_data_type,&r_interlace_mode,&r_num_entries);
+
+ /*check if there is palette data */
+ has_pal=((r_ncomp == 0) || (r_interlace_mode < 0) || (r_num_entries == 0))?0:1;
+
+ if ( has_pal==1 )
+ {
+  GRreqlutil(ri_id, r_interlace_mode);    
+  if (GRreadlut(pal_id, pal_data)==FAIL) {
+   printf( "Failed to get palette data for <%s>\n", path);
+  }
+  
+  if ((pal_ref=GRluttoref(pal_id))== FAIL) {
+   printf( "Failed to get palette ref for <%s>\n", path);
+  }
+  /* add palette to table; we want to later check for lone palettes */
+  table_add(table,DFTAG_IP8,pal_ref,"palette");
+  
+  /* Get the id for the new palette */
+  if ((pal_out = GRgetlutid(ri_out, 0)) == FAIL) {
+   printf( "Failed to get palette ID for <%s>\n", path);
+  }
+  
+  /* Write the palette to file. */
+  if (GRwritelut(pal_out,r_ncomp,r_data_type,r_interlace_mode,r_num_entries, 
+   (VOIDP)pal_data)== FAIL) {
+   printf( "Failed to write palette for <%s>\n", path);
+  }
+ } /* has_pal==1 */
+
+ 
+ /* obtain the reference number of the new SDS using its identifier */
+ if ((gr_ref = GRidtoref (ri_out)) == FAIL) {
+  printf( "Failed to get new GR reference in <%s>\n", path);
+ }
+
+/*-------------------------------------------------------------------------
+ * add GR to group, if needed
+ *-------------------------------------------------------------------------
+ */ 
+ if (vgroup_id_out_par) 
+ {
+  /* add the GR to the vgroup. the tag DFTAG_RIG is used */
+  if (Vaddtagref (vgroup_id_out_par, TAG_GRP_IMAGE, gr_ref)==FAIL) {
+   printf( "Failed to add new GR to group <%s>\n", path);
+  }
+ }
+
+/*-------------------------------------------------------------------------
+ * copy ANs
+ *-------------------------------------------------------------------------
+ */ 
+ 
+ if (copy_an(infile_id,outfile_id,
+  ref,DFTAG_RIG,gr_ref,DFTAG_RIG, 
+  path,options)<0) {
+  ret=-1;
+  goto out;
+ }
+ if (copy_an(infile_id,outfile_id,
+  ref,DFTAG_RI,gr_ref,DFTAG_RI,
+  path,options)<0) {
+  ret=-1;
+  goto out;
+ }
+
+out:
+ 
+ /* terminate access to the GRs */
+ if (GRendaccess(ri_id)== FAIL )
+  printf( "Failed to close SDS <%s>\n", path);
+ if (GRendaccess(ri_out)== FAIL )
+  printf( "Failed to close SDS <%s>\n", path);
+    
+ if (path)
+  free(path);
+ if (buf)
+  free(buf);
+
+ return ret;
+ 
+}
+
+
+/*-------------------------------------------------------------------------
+ * Function: copy_gr_attrs
+ *
+ * Purpose: copy GR attributes from input file to output file 
+ *
+ * Return: 1, for success, -1 for error 
+ *
+ * Programmer: Pedro Vicente, pvn at ncsa.uiuc.edu
+ *
+ * Date: July 28, 2003
+ *
+ *-------------------------------------------------------------------------
+ */
+
+int copy_gr_attrs(int32 ri_id,
+                  int32 ri_out,
+                  int32 nattrs,          
+                  options_t *options)
+{
+ int32 dtype,                 /* SDS data type */
+       numtype,               /* number type */
+       eltsz,                 /* element size */
+       nelms;                 /* number of elements */
+ char  attr_name[MAX_NC_NAME];
+ VOIDP attr_buf=NULL;
+ int   i;
+
+ /* loop through attributes in input GR */
+ for (i = 0; i < nattrs; i++) 
+ {
+  if (GRattrinfo (ri_id, i, attr_name, &dtype, &nelms) == FAIL) {
+   printf( "Cannot get information for attribute number %d\n", i);
+   return-1;
+  }
+  /* compute the number of the bytes for each value. */
+  numtype = dtype & DFNT_MASK;
+  eltsz   = DFKNTsize(numtype | DFNT_NATIVE);
+  if ((attr_buf = (VOIDP) HDmalloc(nelms * eltsz)) == NULL) {
+   printf( "Error allocating %d values of size %d for attribute %s",
+    nelms, numtype, attr_name);
+   return-1;
+  }
+  /* read attributes from input GR */
+  if (GRgetattr(ri_id, i, attr_buf) == FAIL) {
+   printf( "Cannot read attribute %s\n", attr_name);
+   return-1;
+  }
+  /* put attributes into output GR */
+  if (GRsetattr(ri_out, attr_name, dtype, nelms, attr_buf) == FAIL) {
+   printf( "Cannot write attribute %s\n", attr_name);
+   return-1;
+  }
+
+  if (attr_buf)
+   free(attr_buf);
+ }
+
+ return 1;
+}
+
+
+

Added: packages/libhdf4/branches/upstream/current/mfhdf/hrepack/hrepack_gr.h
===================================================================
--- packages/libhdf4/branches/upstream/current/mfhdf/hrepack/hrepack_gr.h	                        (rev 0)
+++ packages/libhdf4/branches/upstream/current/mfhdf/hrepack/hrepack_gr.h	2007-05-15 09:53:05 UTC (rev 831)
@@ -0,0 +1,48 @@
+/****************************************************************************
+ * NCSA HDF                                                                 *
+ * Software Development Group                                               *
+ * National Center for Supercomputing Applications                          *
+ * University of Illinois at Urbana-Champaign                               *
+ * 605 E. Springfield, Champaign IL 61820                                   *
+ *                                                                          *
+ * For conditions of distribution and use, see the accompanying             *
+ * hdf/COPYING file.                                                        *
+ *                                                                          *
+ ****************************************************************************/
+
+
+#ifndef REPACK_GR_H_
+#define REPACK_GR_H_
+
+#include "hrepack.h"
+#include "hrepack_lsttable.h"
+
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+int  copy_gr(int32 infile_id,
+             int32 outfile_id,
+             int32 gr_in,
+             int32 gr_out,
+             int32 tag,               /* tag of input GR */
+             int32 ref,               /* ref of input GR */
+             int32 vgroup_id_out_par, /* output parent group ID */
+             char*path_name,          /* absolute path for input group name */
+             options_t *options,
+             table_t *table);
+
+
+int copy_gr_attrs(int32 ri_id,
+                  int32 ri_out,
+                  int32 nattrs,          
+                  options_t *options);
+
+
+#ifdef __cplusplus
+}
+#endif
+
+
+#endif  /* REPACK_GR_H_ */

Added: packages/libhdf4/branches/upstream/current/mfhdf/hrepack/hrepack_list.c
===================================================================
--- packages/libhdf4/branches/upstream/current/mfhdf/hrepack/hrepack_list.c	                        (rev 0)
+++ packages/libhdf4/branches/upstream/current/mfhdf/hrepack/hrepack_list.c	2007-05-15 09:53:05 UTC (rev 831)
@@ -0,0 +1,1156 @@
+/****************************************************************************
+ * NCSA HDF                                                                 *
+ * Software Development Group                                               *
+ * National Center for Supercomputing Applications                          *
+ * University of Illinois at Urbana-Champaign                               *
+ * 605 E. Springfield, Champaign IL 61820                                   *
+ *                                                                          *
+ * For conditions of distribution and use, see the accompanying             *
+ * hdf/COPYING file.                                                        *
+ *                                                                          *
+ ****************************************************************************/
+
+
+#include "hdf.h"
+#include "mfhdf.h"
+#include "hrepack.h"
+#include "hrepack_utils.h"
+#include "hrepack_parse.h"
+#include "hrepack_opttable.h"
+#include "hrepack_sdutil.h"
+#include "hrepack_sds.h"
+#include "hrepack_gr.h"
+#include "hrepack_vs.h"
+#include "hrepack_an.h"
+#include "hrepack_vg.h"
+
+int list_vg (const char* infname,const char* outfname,int32 infile_id,int32 outfile_id,int32 sd_id,int32 sd_out,int32 gr_id,int32 gr_out,table_t *table,options_t *options);
+int list_gr (const char* infname,const char* outfname,int32 infile_id,int32 outfile_id,int32 gr_id,int32 gr_out,table_t *table,options_t *options);
+int list_sds(const char* infname,const char* outfname,int32 infile_id,int32 outfile_id,int32 sd_id, int32 sd_out,table_t *table,options_t *options);
+int list_vs (const char* infname,const char* outfname,int32 infile_id,int32 outfile_id,table_t *table,options_t *options);
+int list_glb(const char* infname,const char* outfname,int32 infile_id,int32 outfile_id,int32 sd_id,int32 sd_out,int32 gr_id,int32 gr_out,table_t *table,options_t *options);
+int list_pal(const char* infname,const char* outfname,int32 infile_id,int32 outfile_id,table_t *table,options_t *options);
+int list_an (const char* infname,const char* outfname,int32 infile_id,int32 outfile_id,options_t *options);
+
+
+/*-------------------------------------------------------------------------
+ * Function: list
+ *
+ * Purpose: locate all HDF objects in the file and compress them using options
+ *
+ * Return: 0, ok, -1 no
+ *
+ * Programmer: Pedro Vicente, pvn at ncsa.uiuc.edu
+ *
+ * Date: July 10, 2003
+ *
+ * Description:
+ *
+ * A main loop is used to locate all the objects in the file. This loop preserves the 
+ * hierarchy of the file. The algorithm used is 
+ * 1) Obtain the number of lone VGroups in the HDF file. 
+ * 2) Do a loop for each one of these groups. In each iteration a table is updated 
+ *    with the tag/reference pair of an object. 
+ *    2.1) Obtain the pairs of tag/references for the group 
+ *    2.2) Switch between the tag of the current object. Four cases are possible: 
+ *         1) Object is a group: recursively repeat the process (obtain the pairs of
+ *            tag/references for this group and do another tag switch). 
+ *            Add the object to the table. 
+ *         2) Object is a dataset: Add the object to the table.
+ *         3) Object is an image: Add the object to the table.  
+ *         4) Object is a vdata: Add the object to the table. 
+ * 3) Read all the HDF interfaces (SDS, GR and VS), checking for objects that are 
+ *    already in the table (meaning they belong to a previous inspected group, 
+ *    and should not be added).  These objects belong to a root group. 
+ * 4) Read all global attributes and annotations. 
+ *
+ *-------------------------------------------------------------------------
+ */
+
+
+int list(const char* infname,
+         const char* outfname, 
+         options_t *options)
+{
+ table_t      *table=NULL;
+ int32        sd_id,        /* SD interface identifier */
+              sd_out,       /* SD interface identifier */
+              gr_id,        /* GR interface identifier */
+              gr_out,       /* Gr interface identifier */
+              infile_id,
+              outfile_id;
+ int          i;
+ const char*  err;
+
+ /* init table */
+ table_init(&table);
+
+ /* open the input file for read and create the output file */
+ infile_id  = Hopen (infname,DFACC_READ,0);
+ outfile_id = Hopen (outfname,DFACC_CREATE,0);
+
+ if (infile_id==FAIL )
+ {
+  table_free(table);
+  printf("Cannot open file <%s>\n",infname);
+  return FAIL;
+ }
+ if (outfile_id==FAIL )
+ {
+  table_free(table);
+  printf("Cannot create file <%s>\n",outfname);
+  return FAIL;
+ }
+
+  /* initialize the SD interface */
+ if ((sd_id  = SDstart (infname, DFACC_READ))==FAIL){
+  printf( "Could not start SD for <%s>\n",infname);
+  return FAIL;
+ }
+
+ if ((sd_out = SDstart (outfname, DFACC_WRITE))==FAIL){
+  printf( "Could not start GR for <%s>\n",outfname);
+  return FAIL;
+ }
+
+ /* initialize the GR interface */
+ if ((gr_id  = GRstart (infile_id))==FAIL){
+  printf( "Could not start GR for <%s>\n",infname);
+  return FAIL;
+ }
+ if ((gr_out = GRstart (outfile_id))==FAIL){
+  printf( "Could not start GR for <%s>\n",outfname);
+  GRend (gr_id);
+  return FAIL;
+ }
+
+ if (options->verbose && options->trip==0)
+  printf("Building list of objects in %s...\n",infname);
+
+ /* iterate tru HDF interfaces */
+ if (list_vg (infname,outfname,infile_id,outfile_id,sd_id,sd_out,gr_id,gr_out,table,options)<0) 
+  goto out;
+ if (list_gr (infname,outfname,infile_id,outfile_id,gr_id,gr_out,table,options)<0) 
+  goto out;
+ if (list_sds(infname,outfname,infile_id,outfile_id,sd_id,sd_out,table,options)<0) 
+  goto out;
+ if (list_vs (infname,outfname,infile_id,outfile_id,table,options)<0) 
+  goto out;
+ if (list_glb(infname,outfname,infile_id,outfile_id,sd_id,sd_out,gr_id,gr_out,table,options)<0) 
+  goto out;
+ if (list_pal(infname,outfname,infile_id,outfile_id,table,options)<0) 
+  goto out;
+ if (list_an (infname,outfname,infile_id,outfile_id,options)<0) 
+  goto out;
+
+ 
+ if (GRend (gr_id)==FAIL)
+  printf( "Failed to close GR interface <%s>\n", infname);
+ if (GRend (gr_out)==FAIL)
+  printf( "Failed to close GR interface <%s>\n", outfname);
+ 
+ if (SDend (sd_id)==FAIL)
+  printf( "Failed to close SD interface <%s>\n", infname);
+ if (SDend (sd_out)==FAIL)
+  printf( "Failed to close SD interface <%s>\n", outfname);
+
+ /* close the HDF files */
+ if (Hclose (infile_id)==FAIL)
+  printf( "Failed to close file <%s>\n", infname);
+ if (Hclose (outfile_id)==FAIL)
+  printf( "Failed to close file <%s>\n", outfname);
+ 
+ /* 
+ check for objects in the file table:
+ 1) the input object names are present in the file
+ 2) they are valid objects (SDS or GR)
+ check only if selected objects are given (all==0)
+ */
+ if ( options->trip==0 ) 
+ {
+  if (options->verbose)
+   printf("Searching for objects to modify...\n");
+   
+  for ( i = 0; i < options->op_tbl->nelems; i++) 
+  {
+   char* obj_name=options->op_tbl->objs[i].path;
+   if (options->verbose)
+    printf(PFORMAT1,"","",obj_name);
+   
+   /* the input object names are present in the file and are valid */
+   err=table_check(table,obj_name);
+   if (err!=NULL)
+   {
+    printf("\nError: <%s> %s in file <%s>. Exiting...\n",obj_name,err,infname);
+    table_free(table);
+    exit(1);
+   }
+   if (options->verbose)
+    printf("...Found\n");
+  }
+ }
+
+ /* free table */
+ table_free(table);
+ return 0;
+
+out:
+ 
+ /* free table */
+ table_free(table);
+ if (GRend (gr_id)==FAIL)
+  printf( "Failed to close GR interface <%s>\n", infname);
+ if (GRend (gr_out)==FAIL)
+  printf( "Failed to close GR interface <%s>\n", outfname);
+ if (SDend (sd_id)==FAIL)
+  printf( "Failed to close file <%s>\n", infname);
+ if (SDend (sd_out)==FAIL)
+  printf( "Failed to close file <%s>\n", outfname);
+ /* close the HDF files */
+ if (Hclose (infile_id)==FAIL)
+  printf( "Failed to close file <%s>\n", infname);
+ if (Hclose (outfile_id)==FAIL)
+  printf( "Failed to close file <%s>\n", outfname);
+
+ return FAIL;
+
+}
+
+
+
+/*-------------------------------------------------------------------------
+ * Function: list_vg
+ *
+ * Purpose: locate all lone Vgroups in the file
+ *
+ * Return: void
+ *
+ *-------------------------------------------------------------------------
+ */
+
+
+int list_vg(const char* infname,
+            const char* outfname,
+            int32 infile_id,
+            int32 outfile_id,
+            int32 sd_id,
+            int32 sd_out,
+            int32 gr_id,
+            int32 gr_out,
+            table_t *table,
+            options_t *options)
+{
+ int32 vgroup_id,      /* vgroup identifier */
+       nlones = 0,     /* number of lone vgroups */
+       ntagrefs,       /* number of tag/ref pairs in a vgroup */
+       *ref_array=NULL,/* buffer to hold the ref numbers of lone vgroups   */
+       *tags,          /* buffer to hold the tag numbers of vgroups   */
+       *refs,          /* buffer to hold the ref numbers of vgroups   */
+       vgroup_id_out,  /* vgroup identifier */
+       ref_vg,
+       tag_vg;
+ char  vgroup_name[VGNAMELENMAX], vgroup_class[VGNAMELENMAX];
+ int   i;
+
+ /* initialize the V interface for both files */
+ Vstart (infile_id);
+ Vstart (outfile_id);
+
+/*
+ * get and print the names and class names of all the lone vgroups.
+ * first, call Vlone with nlones set to 0 to get the number of
+ * lone vgroups in the file, but not to get their reference numbers.
+ */
+ nlones = Vlone (infile_id, NULL, nlones );
+
+ if (nlones > 0)
+ {
+ /*
+  * use the nlones returned to allocate sufficient space for the
+  * buffer ref_array to hold the reference numbers of all lone vgroups,
+  */
+  ref_array = (int32 *) malloc(sizeof(int32) * nlones);
+  
+ /*
+  * and call Vlone again to retrieve the reference numbers into 
+  * the buffer ref_array.
+  */
+  nlones = Vlone (infile_id, ref_array, nlones);
+  
+ /*
+  * iterate tru each lone vgroup.
+  */
+  for (i = 0; i < nlones; i++)
+  {
+  /*
+   * attach to the current vgroup then get its
+   * name and class. note: the current vgroup must be detached before
+   * moving to the next.
+   */
+   vgroup_id = Vattach (infile_id, ref_array[i], "r");
+   if (Vgetname (vgroup_id, vgroup_name)==FAIL){
+    printf( "Could not get name for group\n");
+    return FAIL;
+
+   }
+   if (Vgetclass (vgroup_id, vgroup_class)==FAIL){
+    printf( "Could not get class for group\n");
+    return FAIL;
+   }
+   
+   /* ignore reserved HDF groups/vdatas */
+   if( is_reserved(vgroup_class)){
+    if (Vdetach (vgroup_id)==FAIL){
+     printf( "Could not detach group\n");
+     return FAIL;
+    }
+    continue;
+   }
+   if(vgroup_name != NULL) 
+    if(strcmp(vgroup_name,GR_NAME)==0) {
+     if (Vdetach (vgroup_id)==FAIL){
+      printf( "Could not detach group\n");
+      return FAIL;
+     }
+     continue;
+    }
+       
+    if ((ref_vg = VQueryref(vgroup_id))==FAIL){
+     printf( "Failed to get ref for <%s>\n", vgroup_name);
+     return FAIL;
+    }
+    if ((tag_vg = VQuerytag(vgroup_id))==FAIL){
+     printf( "Failed to get tag for <%s>\n", vgroup_name);
+     return FAIL;
+    }
+
+     /* add object to table */
+    table_add(table,tag_vg,ref_vg,vgroup_name);
+
+    if (options->verbose)
+    printf(PFORMAT,"","",vgroup_name);    
+      
+   /* 
+    * create the group in the output file.  the vgroup reference number is set
+    * to -1 for creating and the access mode is "w" for writing 
+    */
+    vgroup_id_out = Vattach (outfile_id, -1, "w");
+    if (Vsetname (vgroup_id_out, vgroup_name)==FAIL){
+     printf("Error: Could not create group <%s>\n", vgroup_name);
+     return FAIL;
+    }
+    if (Vsetclass (vgroup_id_out, vgroup_class)==FAIL){
+     printf("Error: Could not create group <%s>\n", vgroup_name);
+     return FAIL;
+    }
+
+    copy_vgroup_attrs(vgroup_id,vgroup_id_out,vgroup_name,options);
+    copy_vg_an(infile_id,outfile_id,vgroup_id,vgroup_id_out,vgroup_name,options);
+       
+    /* insert objects for this group */
+    ntagrefs = Vntagrefs(vgroup_id);
+    if ( ntagrefs > 0 )
+    {
+     tags = (int32 *) malloc(sizeof(int32) * ntagrefs);
+     refs = (int32 *) malloc(sizeof(int32) * ntagrefs);
+     Vgettagrefs(vgroup_id, tags, refs, ntagrefs);
+     
+     if (vgroup_insert(infname,
+      outfname,
+      infile_id,
+      outfile_id,
+      sd_id,
+      sd_out,
+      gr_id,
+      gr_out,
+      vgroup_id_out,
+      vgroup_name,
+      tags,
+      refs,
+      ntagrefs,
+      table,
+      options)<0) {
+      free (tags);
+      free (refs);
+      return FAIL;
+     }
+     
+     free (tags);
+     free (refs);
+    }
+    
+    if(Vdetach (vgroup_id)==FAIL){
+     printf("Error: Could not detach group <%s>\n", vgroup_name);
+     return FAIL;
+    }
+    if (Vdetach (vgroup_id_out)==FAIL){
+     printf("Error: Could not detach group <%s>\n", vgroup_name);
+     return FAIL;
+    }
+
+  } /* for */
+  
+  
+  /* free the space allocated */
+  if (ref_array) 
+   free (ref_array);
+ } /* if */
+ 
+
+ /* terminate access to the V interface */
+ if (Vend (infile_id)==FAIL){
+  printf("Error: Could not end group interface in <%s>\n", vgroup_name);
+  return FAIL;
+ }
+ if (Vend (outfile_id)==FAIL){
+  printf("Error: Could not end group interface in <%s>\n", vgroup_name);
+  return FAIL;
+ }
+ 
+ return SUCCESS;
+}
+
+/*-------------------------------------------------------------------------
+ * Function: vgroup_insert
+ *
+ * Purpose: recursive function to locate objects in lone Vgroups
+ *
+ * Return: void
+ *
+ *-------------------------------------------------------------------------
+ */
+
+int vgroup_insert(const char* infname,
+                   const char* outfname,
+                   int32 infile_id,
+                   int32 outfile_id,
+                   int32 sd_id,             /* SD interface identifier */
+                   int32 sd_out,            /* SD interface identifier */
+                   int32 gr_id,             /* GR interface identifier */
+                   int32 gr_out,            /* GR interface identifier */
+                   int32 vgroup_id_out_par, /* output parent group ID */
+                   char*path_name,          /* absolute path for input group name */          
+                   int32* in_tags,          /* tag list for parent group */
+                   int32* in_refs,          /* ref list for parent group */
+                   int npairs,              /* number tag/ref pairs for parent group */
+                   table_t *table,
+                   options_t *options)
+{
+ int32 vgroup_id,             /* vgroup identifier */
+       ntagrefs,              /* number of tag/ref pairs in a vgroup */
+       tag,                   /* temporary tag */
+       ref,                   /* temporary ref */
+       *tags,                 /* buffer to hold the tag numbers of vgroups   */
+       *refs,                 /* buffer to hold the ref numbers of vgroups   */
+       vgroup_id_out;         /* vgroup identifier */
+       
+ char  vgroup_name[VGNAMELENMAX], vgroup_class[VGNAMELENMAX];
+ char  *path=NULL;
+ int   i;
+ 
+ for ( i = 0; i < npairs; i++ ) 
+ {
+  tag = in_tags[i];
+  ref = in_refs[i];
+  
+  switch(tag) 
+  {
+/*-------------------------------------------------------------------------
+ * VG
+ *-------------------------------------------------------------------------
+ */
+  case DFTAG_VG: 
+   
+   vgroup_id = Vattach (infile_id, ref, "r");
+   if (Vgetname (vgroup_id, vgroup_name)==FAIL){
+    printf( "Could not get name for VG\n");
+    return FAIL;
+   }
+   if (Vgetclass (vgroup_id, vgroup_class)==FAIL){
+    printf( "Could not get class for VG\n");
+    return FAIL;
+   }
+   
+   /* ignore reserved HDF groups/vdatas */
+   if( is_reserved(vgroup_class)){
+    if (Vdetach (vgroup_id)==FAIL){
+     printf( "Could not detach VG\n");
+     return FAIL;
+    }
+    break;
+   }
+   if(vgroup_name != NULL) 
+    if(strcmp(vgroup_name,GR_NAME)==0) {
+     if (Vdetach (vgroup_id)==FAIL){
+      printf( "Could not detach VG\n");
+      return FAIL;
+     }
+     break;
+    }
+
+   /* initialize path */
+   path=get_path(path_name,vgroup_name);
+
+   /* add object to table */
+   table_add(table,tag,ref,path);
+
+   if (options->verbose)
+    printf(PFORMAT,"","",path);    
+     
+#if defined(HZIP_DEBUG)
+   printf ("\t%s %d\n", path, ref); 
+#endif
+   
+   if ( options->trip==0 ) 
+   {
+    /*we must go to other groups always */
+   }
+   
+  /* 
+   * create the group in the output file.  the vgroup reference number is set
+   * to -1 for creating and the access mode is "w" for writing 
+   */
+   vgroup_id_out = Vattach (outfile_id, -1, "w");
+   if (Vsetname (vgroup_id_out, vgroup_name)==FAIL){
+    printf("Error: Could not create group <%s>\n", vgroup_name);
+    return FAIL;
+   }
+   if (Vsetclass (vgroup_id_out, vgroup_class)==FAIL){
+    printf("Error: Could not create group <%s>\n", vgroup_name);
+    return FAIL;
+   }
+
+   copy_vgroup_attrs(vgroup_id, vgroup_id_out,path,options);
+   copy_vg_an(infile_id,outfile_id,vgroup_id,vgroup_id_out,path,options);
+   
+   /* insert the created vgroup into its parent */
+   if (Vinsert (vgroup_id_out_par, vgroup_id_out)==FAIL){
+    printf("Could not insert group <%s>\n", vgroup_name);
+    return FAIL;
+   }
+    
+   /* insert objects for this group */
+   ntagrefs  = Vntagrefs(vgroup_id);
+   if ( ntagrefs > 0 )
+   {
+    tags = (int32 *) malloc(sizeof(int32) * ntagrefs);
+    refs = (int32 *) malloc(sizeof(int32) * ntagrefs);
+    Vgettagrefs(vgroup_id, tags, refs, ntagrefs);
+    /* recurse */
+    if (vgroup_insert(infname,
+     outfname,
+     infile_id,
+     outfile_id,
+     sd_id,
+     sd_out,
+     gr_id,
+     gr_out,
+     vgroup_id_out,
+     path,
+     tags,
+     refs,
+     ntagrefs,
+     table,
+     options)<0) {
+     free (tags);
+     free (refs);
+     return FAIL;
+    }
+    free (tags);
+    free (refs);
+   } /* ntagrefs > 0 */
+   if(Vdetach (vgroup_id)==FAIL)
+   {
+    printf("Error: Could not detach group <%s>\n", vgroup_name);
+    return FAIL;
+   }
+   if (Vdetach (vgroup_id_out)==FAIL)
+   {
+    printf("Error: Could not detach group <%s>\n", vgroup_name);
+    return FAIL;
+   }
+   if (path)
+    free(path);
+
+   break;
+   
+
+/*-------------------------------------------------------------------------
+ * SDS
+ *-------------------------------------------------------------------------
+ */   
+   
+  case DFTAG_SD:  /* Scientific Data */
+  case DFTAG_SDG: /* Scientific Data Group */
+  case DFTAG_NDG: /* Numeric Data Group */
+   /* copy dataset */
+   if (copy_sds(sd_id,
+    sd_out,
+    tag,ref,
+    vgroup_id_out_par,
+    path_name,
+    options,
+    table,
+    infile_id,
+    outfile_id)<0)
+    return FAIL;
+    
+   break;
+   
+/*-------------------------------------------------------------------------
+ * Image
+ *-------------------------------------------------------------------------
+ */   
+   
+  case DFTAG_RI:  /* Raster Image */
+  case DFTAG_CI:  /* Compressed Image */
+  case DFTAG_RIG: /* Raster Image Group */
+  case DFTAG_RI8:  /* Raster-8 image */
+  case DFTAG_CI8:  /* RLE compressed 8-bit image */
+  case DFTAG_II8:  /* IMCOMP compressed 8-bit image */
+   /* copy GR  */
+   if (copy_gr(infile_id,
+    outfile_id,
+    gr_id,
+    gr_out,
+    tag,
+    ref,
+    vgroup_id_out_par,
+    path_name,
+    options,
+    table)<0)
+    return FAIL;
+   break;
+
+/*-------------------------------------------------------------------------
+ * Vdata
+ *-------------------------------------------------------------------------
+ */   
+   
+  case DFTAG_VH:  /* Vdata Header */
+   if (copy_vs(infile_id,
+    outfile_id,
+    tag,
+    ref,
+    vgroup_id_out_par,
+    path_name,
+    options,
+    table,
+    0)<0)
+    return FAIL;
+   break;
+  } /* switch */
+  
+ } /* i */
+ 
+ return SUCCESS;
+}
+
+
+/*-------------------------------------------------------------------------
+ * Function: list_gr
+ *
+ * Purpose: get top level GR image list
+ *
+ * Return: void
+ *
+ *-------------------------------------------------------------------------
+ */
+
+int list_gr(const char* infname,
+            const char* outfname,
+            int32 infile_id,
+            int32 outfile_id,
+            int32 gr_id,             /* GR interface identifier */
+            int32 gr_out,            /* GR interface identifier */
+            table_t *table,
+            options_t *options)
+{
+ int32 ri_id,             /* raster image identifier */
+       n_rimages,         /* number of raster images in the file */
+       n_file_attrs,      /* number of file attributes */
+       ri_index,          /* index of a image */
+       gr_ref,            /* reference number of the GR image */
+       dim_sizes[2],      /* dimensions of an image */
+       n_comps,           /* number of components an image contains */
+       interlace_mode,    /* interlace mode of an image */ 
+       data_type,         /* number type of an image */
+       n_attrs;           /* number of attributes belong to an image */
+ char  name[MAX_GR_NAME]; /* name of an image */
+ 
+ /* determine the contents of the file */
+ if (GRfileinfo (gr_id, &n_rimages, &n_file_attrs)==FAIL){
+  printf( "Could not get info for GR\n");
+  return FAIL;
+ }
+  
+ for (ri_index = 0; ri_index < n_rimages; ri_index++)
+ {
+  ri_id = GRselect (gr_id, ri_index);
+  if (GRgetiminfo (ri_id, name, &n_comps, &data_type, &interlace_mode, 
+   dim_sizes, &n_attrs)==FAIL){
+   printf("Could not get GR info\n");
+  }
+
+  gr_ref = GRidtoref(ri_id);
+
+  /* check if already inserted in Vgroup; search all image tags */
+  if ( table_search(table,DFTAG_RI,gr_ref)>=0 ||
+       table_search(table,DFTAG_CI,gr_ref)>=0 ||
+       table_search(table,DFTAG_RIG,gr_ref)>=0 ||
+       table_search(table,DFTAG_RI8,gr_ref)>=0 ||
+       table_search(table,DFTAG_CI8,gr_ref)>=0 ||
+       table_search(table,DFTAG_II8,gr_ref)>=0 )
+  {
+   if (GRendaccess (ri_id)==FAIL){
+    printf("Could not close GR\n");
+   }
+   continue;
+  }
+
+  /* copy GR  */
+  copy_gr(infile_id,outfile_id,gr_id,gr_out,DFTAG_RI,gr_ref,0,NULL,options,table);
+
+  /* terminate access to the current raster image */
+  if (GRendaccess (ri_id)==FAIL){
+   printf( "Could not end GR\n");
+  }
+ }
+
+ return SUCCESS;
+}
+
+
+/*-------------------------------------------------------------------------
+ * Function: list_sds
+ *
+ * Purpose: get top level SDS
+ *
+ * Return: void
+ *
+ *-------------------------------------------------------------------------
+ */
+
+int list_sds(const char* infname,
+             const char* outfname,
+             int32 infile_id,
+             int32 outfile_id,
+             int32 sd_id,
+             int32 sd_out,
+             table_t *table,
+             options_t *options)
+{
+ int32 sds_id,                 /* dataset identifier */
+       n_datasets,             /* number of datasets in the file */
+       n_file_attrs,           /* number of file attributes */
+       index,                  /* index of a dataset */
+       sds_ref,                /* reference number */
+       dim_sizes[MAX_VAR_DIMS],/* dimensions of an image */
+       data_type,              /* number type  */
+       rank,                   /* rank */
+       n_attrs;                /* number of attributes */
+ char  name[MAX_GR_NAME];      /* name of dataset */
+  
+ /* determine the number of data sets in the file and the number of file attributes */
+ if (SDfileinfo (sd_id, &n_datasets, &n_file_attrs)==FAIL){
+  printf("Could not get SDS info\n");
+  return FAIL;
+ }
+
+ for (index = 0; index < n_datasets; index++)
+ {
+  sds_id  = SDselect (sd_id, index);
+  SDgetinfo(sds_id, name, &rank, dim_sizes, &data_type, &n_attrs);
+  sds_ref = SDidtoref(sds_id);
+
+  /* check if already inserted in Vgroup; search all SDS tags */
+  if ( table_search(table,DFTAG_SD,sds_ref)>=0 ||
+       table_search(table,DFTAG_SDG,sds_ref)>=0 ||
+       table_search(table,DFTAG_NDG,sds_ref)>=0 )
+  {
+   SDendaccess (sds_id);
+   continue;
+  }
+
+  /* copy SDS  */
+  if (copy_sds(sd_id,sd_out,TAG_GRP_DSET,sds_ref,0,NULL,options,table,
+               infile_id,outfile_id)<0) goto out;
+     
+  /* terminate access to the current dataset */
+  SDendaccess (sds_id);
+ }
+ 
+ return 0;
+
+out:
+ SDendaccess (sds_id);
+ return FAIL;
+}
+
+/*-------------------------------------------------------------------------
+ * Function: list_vs
+ *
+ * Purpose: get top level VS
+ *
+ * Return: void
+ *
+ *-------------------------------------------------------------------------
+ */
+
+
+int list_vs(const char* infname,
+            const char* outfname,
+            int32 infile_id,
+            int32 outfile_id,
+            table_t *table,
+            options_t *options)
+{
+ int32 nlones = 0,   /* number of lone vdatas */
+       *ref_array,   /* buffer to hold the ref numbers of lone vdatas   */
+       ref;          /* temporary ref number  */
+ int   i;
+
+ /* initialize the V interface */
+ Vstart (infile_id);
+ Vstart (outfile_id);
+
+/*
+ * get and print the names and class names of all the lone vdatas.
+ * first, call Vlone with nlones set to 0 to get the number of
+ * lone vdatas in the file, but not to get their reference numbers.
+ */
+ nlones = VSlone (infile_id, NULL, nlones );
+
+ if (nlones > 0)
+ {
+ /*
+  * use the nlones returned to allocate sufficient space for the
+  * buffer ref_array to hold the reference numbers of all lone vgroups,
+  */
+  ref_array = (int32 *) malloc(sizeof(int32) * nlones);
+  
+ /*
+  * and call VSlone again to retrieve the reference numbers into 
+  * the buffer ref_array.
+  */
+  nlones = VSlone (infile_id, ref_array, nlones);
+
+ /*
+  * iterate tru each lone vdata.
+  */
+  for (i = 0; i < nlones; i++)
+  {
+  /*
+   * attach to the current vdata then get its
+   * name and class. note: the current vdata must be detached before
+   * moving to the next.
+   */
+   ref = ref_array[i];
+
+   /* check if already inserted in Vgroup; search all VS tags */
+   if ( table_search(table,DFTAG_VH,ref)>=0 ) {
+    continue;
+   }
+
+   /* copy VS */
+   if (copy_vs(infile_id,outfile_id,DFTAG_VH,ref,0,NULL,options,table,1)<0)
+   {
+    if (ref_array) free (ref_array);
+    return FAIL;
+   }
+ 
+  } /* for */
+
+  
+  /* free the space allocated */
+  if (ref_array) free (ref_array);
+ } /* if */
+
+ /* terminate access to the VS interface */
+ if (Vend (infile_id)==FAIL||
+  Vend (outfile_id)==FAIL){
+  printf( "Could not end VG\n");
+  return FAIL;
+ }
+
+
+ return SUCCESS;
+}
+
+
+
+/*-------------------------------------------------------------------------
+ * Function: list_glb
+ *
+ * Purpose: list/copy global SDS attributes, global GR atrributes
+ *
+ * Return: void
+ *
+ *-------------------------------------------------------------------------
+ */
+
+int list_glb(const char* infname,
+             const char* outfname,
+             int32 infile_id,
+              int32 outfile_id,
+              int32 sd_id,
+              int32 sd_out,
+              int32 gr_id,
+              int32 gr_out,
+              table_t *table,
+              options_t *options)
+{
+ int32 n_datasets,             /* number of datasets in the file */
+       n_file_attrs;           /* number of file attributes */
+ 
+ if ( options->trip==0 ) 
+ {
+  return SUCCESS;
+ }
+     
+/*-------------------------------------------------------------------------
+ * copy SDS global attributes
+ *-------------------------------------------------------------------------
+ */ 
+ /* determine the number of data sets in the file and the number of file attributes */
+ if (SDfileinfo (sd_id, &n_datasets, &n_file_attrs)==FAIL){
+  printf("Could not get SDS info\n");
+  return FAIL;
+ }
+ 
+ if (copy_sds_attrs(sd_id,sd_out,n_file_attrs,options)<0)
+  return FAIL;
+
+/*-------------------------------------------------------------------------
+ * copy GR global attributes
+ *-------------------------------------------------------------------------
+ */ 
+ /* determine the number of data sets in the file and the number of file attributes */
+ if (GRfileinfo (gr_id, &n_datasets, &n_file_attrs)==FAIL){
+  printf("Could not get GR info\n");
+  return FAIL;
+ }
+ if (copy_gr_attrs(gr_id,gr_out,n_file_attrs,options)<0)
+  return FAIL;
+
+ return SUCCESS;
+}
+
+
+/*-------------------------------------------------------------------------
+ * Function: list_an
+ *
+ * Purpose: list/copy AN FILE objects
+ *
+ * Return: void
+ *
+ *-------------------------------------------------------------------------
+ */
+
+int list_an(const char* infname,
+             const char* outfname,
+             int32 infile_id,
+             int32 outfile_id,
+             options_t *options)
+{
+ int32 an_id,         /* AN interface identifier */
+       ann_id,        /* an annotation identifier */
+       i,             /* position of an annotation in all of the same type*/
+       ann_length,    /* length of the text in an annotation */
+       an_out,        /* AN interface identifier */
+       file_label_id, /* file label identifier */
+       file_desc_id,  /* file description identifier */
+       n_file_labels, n_file_descs, n_data_labels, n_data_descs;
+ char *ann_buf;       /* buffer to hold the read annotation */
+
+ if ( options->trip==0 ) 
+ {
+  return SUCCESS;
+ }
+ ann_buf=NULL;
+ 
+ /* Initialize the AN interface  */
+ an_id  = ANstart (infile_id);
+ an_out = ANstart (outfile_id);
+ 
+/*
+ * Get the annotation information, e.g., the numbers of file labels, file
+ * descriptions, data labels, and data descriptions.
+ */
+ if (ANfileinfo (an_id, &n_file_labels, &n_file_descs, 
+  &n_data_labels, &n_data_descs)==FAIL){
+  printf( "Could not get AN info\n");
+  goto out;
+ }
+ 
+
+/*-------------------------------------------------------------------------
+ * AN_FILE_LABEL
+ *-------------------------------------------------------------------------
+ */ 
+
+
+ for (i = 0; i < n_file_labels; i++)
+ {
+ /* Get the identifier of the current data label */
+  ann_id = ANselect (an_id, i, AN_FILE_LABEL);
+  
+  /* Get the length of the data label */
+  ann_length = ANannlen (ann_id);
+  
+  /* Allocate space for the buffer to hold the data label text */
+  ann_buf = malloc ((ann_length+1) * sizeof (char));
+  
+ /*
+  * Read and display the file label.  Note that the size of the buffer,
+  * i.e., the third parameter, is 1 character more than the length of
+  * the data label; that is for the null character.  It is not the case
+  * when a description is retrieved because the description does not 
+  * necessarily end with a null character.
+  * 
+  */
+  if (ANreadann (ann_id, ann_buf, ann_length+1)==FAIL){
+   printf( "Could not read AN\n");
+   goto out;
+  }
+
+  /* Create the file label */
+  file_label_id = ANcreatef (an_out, AN_FILE_LABEL);
+
+  /* Write the annotations  */
+  if (ANwriteann (file_label_id, ann_buf, ann_length)==FAIL) {
+   printf("Failed to write file label %d\n", i);
+   goto out;
+  }
+  
+  /* Terminate access to the current data label */
+  if (ANendaccess (ann_id)==FAIL||
+      ANendaccess (file_label_id)==FAIL){
+   printf( "Could not end AN\n");
+   goto out;
+  }
+
+  
+  /* Free the space allocated for the annotation buffer */
+  if (ann_buf)
+   free (ann_buf);
+ }
+
+/*-------------------------------------------------------------------------
+ * AN_FILE_DESC
+ *-------------------------------------------------------------------------
+ */ 
+
+ for (i = 0; i < n_file_descs; i++)
+ {
+ /* Get the identifier of the current data label */
+  ann_id = ANselect (an_id, i, AN_FILE_DESC);
+  
+  /* Get the length of the data label */
+  ann_length = ANannlen (ann_id);
+  
+  /* Allocate space for the buffer to hold the data label text */
+  ann_buf = malloc ((ann_length+1) * sizeof (char));
+ 
+  if (ANreadann (ann_id, ann_buf, ann_length+1)==FAIL){
+   printf( "Could not read AN\n");
+   goto out;
+  }
+
+   /* Create the label */
+  file_desc_id = ANcreatef (an_out, AN_FILE_DESC);
+
+  /* Write the annotations  */
+  if (ANwriteann (file_desc_id, ann_buf, ann_length)==FAIL){
+   printf("Failed to write file description %d\n", i);
+   goto out;
+  }
+  
+  /* Terminate access to the current data label */
+  if (ANendaccess (ann_id)==FAIL||
+      ANendaccess (file_desc_id)==FAIL){
+   printf( "Could not read AN\n");
+   goto out;
+  }
+ 
+  /* Free the space allocated for the annotation buffer */
+  if (ann_buf)
+   free (ann_buf);
+ }
+
+ return SUCCESS;
+ 
+ /* Terminate access to the AN interface */
+out:
+ if (ANend (an_id)==FAIL||
+  ANend (an_out)==FAIL){
+  printf( "Could not end AN\n");
+ }
+ if (ann_buf)
+   free (ann_buf);
+
+ return FAIL;
+ 
+}
+
+
+
+
+/*-------------------------------------------------------------------------
+ * Function: list_pal
+ *
+ * Purpose: list/copy lone palettes
+ *
+ * Return: void
+ *
+ *-------------------------------------------------------------------------
+ */
+
+int list_pal(const char* infname,
+              const char* outfname,
+              int32 infile_id,
+              int32 outfile_id,
+              table_t *table,
+              options_t *options)
+{
+ uint8  palette_data[256*3];
+ intn   nPals, j;
+ uint16 ref;
+ 
+ if ( options->trip==0 ) 
+ {
+  return SUCCESS;
+ }
+
+ DFPrestart();
+ 
+ if((nPals = DFPnpals (infname))==FAIL ) {
+  printf( "Failed to get palettes in <%s>\n", infname);
+  return FAIL;
+ }
+ 
+ for ( j = 0; j < nPals; j++) 
+ {
+  if (DFPgetpal(infname, (VOIDP)palette_data)==FAIL ) {
+   printf( "Failed to read palette <%d> in <%s>\n", j, infname);
+   continue;
+  }
+  
+  ref=DFPlastref();
+  
+  /* check if already inserted in image */
+  if ( table_search(table,DFTAG_IP8,ref)>=0 ){
+   continue;
+  }
+  
+  if (DFPaddpal(outfname,palette_data)==FAIL){
+   printf( "Failed to write palette in <%s>\n", outfname);
+   return FAIL;
+  }
+  
+ }
+ 
+ return SUCCESS;
+}
+
+

Added: packages/libhdf4/branches/upstream/current/mfhdf/hrepack/hrepack_lsttable.c
===================================================================
--- packages/libhdf4/branches/upstream/current/mfhdf/hrepack/hrepack_lsttable.c	                        (rev 0)
+++ packages/libhdf4/branches/upstream/current/mfhdf/hrepack/hrepack_lsttable.c	2007-05-15 09:53:05 UTC (rev 831)
@@ -0,0 +1,206 @@
+/****************************************************************************
+ * NCSA HDF                                                                 *
+ * Software Development Group                                               *
+ * National Center for Supercomputing Applications                          *
+ * University of Illinois at Urbana-Champaign                               *
+ * 605 E. Springfield, Champaign IL 61820                                   *
+ *                                                                          *
+ * For conditions of distribution and use, see the accompanying             *
+ * hdf/COPYING file.                                                        *
+ *                                                                          *
+ ****************************************************************************/
+
+#include <stdio.h>
+#include <stdlib.h>
+
+#include "hrepack_lsttable.h"
+
+/*-------------------------------------------------------------------------
+ * Function: table_search
+ *
+ * Purpose: linear search the table for tag and ref
+ *
+ * Return: index on success, -1 on failure
+ *
+ * Programmer: Pedro Vicente, pvn at ncsa.uiuc.edu
+ *
+ * Date: July 3, 2003
+ *
+ *-------------------------------------------------------------------------
+ */
+
+int table_search(table_t *table, int tag, int ref )
+{
+ int i;
+ 
+ for (i = 0; i < table->nobjs; i++) {
+  if (table->objs[i].tag == tag && table->objs[i].ref == ref)
+   return i;
+ }
+  
+  return -1;
+}
+
+
+/*-------------------------------------------------------------------------
+ * Function: table_add
+ *
+ * Purpose: add pair tag/ref and object path to table
+ *
+ * Return: void
+ *
+ * Programmer: Pedro Vicente, pvn at ncsa.uiuc.edu
+ *
+ * Date: July 3, 2003
+ *
+ *-------------------------------------------------------------------------
+ */
+
+void table_add(table_t *table, int tag, int ref, char* path)
+{
+ int i;
+ 
+ if (table->nobjs == table->size) {
+  table->size *= 2;
+  table->objs = (obj_info_t*)realloc(table->objs, table->size * sizeof(obj_info_t));
+  
+  for (i = table->nobjs; i < table->size; i++) {
+   table->objs[i].tag = table->objs[i].ref = -1;
+   table->objs[i].flags[0] = table->objs[i].flags[1] = -1;
+  }
+ }
+ 
+ i = table->nobjs++;
+ table->objs[i].tag = tag;
+ table->objs[i].ref = ref;
+ strcpy(table->objs[i].obj_name,path);
+ table->objs[i].flags[0] = table->objs[i].flags[1] = -1;
+}
+
+
+
+/*-------------------------------------------------------------------------
+ * Function: table_init
+ *
+ * Purpose: initialize table
+ *
+ * Return: void
+ *
+ * Programmer: Pedro Vicente, pvn at ncsa.uiuc.edu
+ *
+ * Date: July 3, 2003
+ *
+ *-------------------------------------------------------------------------
+ */
+
+void table_init( table_t **tbl )
+{
+ int i;
+ table_t* table = (table_t*) malloc(sizeof(table_t));
+ 
+ table->size = 20;
+ table->nobjs = 0;
+ table->objs = (obj_info_t*) malloc(table->size * sizeof(obj_info_t));
+ 
+ for (i = 0; i < table->size; i++) {
+  table->objs[i].tag = table->objs[i].ref = -1;
+  table->objs[i].flags[0] = table->objs[i].flags[1] = -1;
+ }
+ 
+ *tbl = table;
+}
+
+/*-------------------------------------------------------------------------
+ * Function: table_free
+ *
+ * Purpose: free table memory
+ *
+ * Return: void
+ *
+ * Programmer: Pedro Vicente, pvn at ncsa.uiuc.edu
+ *
+ * Date: July 3, 2003
+ *
+ *-------------------------------------------------------------------------
+ */
+
+void table_free( table_t *table )
+{
+ free(table->objs);
+ free(table);
+}
+
+
+/*-------------------------------------------------------------------------
+ * Function: table_check
+ *
+ * Purpose: search the table for valid objects
+ *
+ * Return: error string or NULL for success
+ *
+ * Programmer: Pedro Vicente, pvn at ncsa.uiuc.edu
+ *
+ * Date: July 3, 2003
+ *
+ *-------------------------------------------------------------------------
+ */
+
+const char* table_check(table_t *table, char*obj_name)
+{
+ int   i;
+ int32 tag;
+ 
+ for (i = 0; i < table->nobjs; i++)
+ {
+  if (strcmp(table->objs[i].obj_name,obj_name)==0)
+  {
+   /* found the name; check if it is an SDS or Image */
+   tag=table->objs[i].tag;
+   if (tag==DFTAG_SD  ||
+       tag==DFTAG_SDG ||
+       tag==DFTAG_NDG ||
+       tag==DFTAG_RI  ||
+       tag==DFTAG_CI  ||
+       tag==DFTAG_RIG ||
+       tag==DFTAG_RI8 ||
+       tag==DFTAG_CI8 ||
+       tag==DFTAG_II8 ) return NULL; 
+   else return "not compressible/chunk object";
+  }
+ }
+  
+  return "not found";
+}
+
+
+/*-------------------------------------------------------------------------
+ * Function: table_print
+ *
+ * Purpose: print object list
+ *
+ * Return: void
+ *
+ * Programmer: Pedro Vicente, pvn at ncsa.uiuc.edu
+ *
+ * Date: August 25, 2003
+ *
+ *-------------------------------------------------------------------------
+ */
+
+void table_print(table_t *table)
+{
+ int i;
+
+ printf("---------------------------------------\n");
+ printf("%5s %6s    %-15s\n", "Tag", "Ref", "Name");
+ printf("---------------------------------------\n");
+
+ for (i = 0; i < table->nobjs; i++)
+ {
+  printf("%5d %6d    %-15s\n", 
+   table->objs[i].tag, 
+   table->objs[i].ref, 
+   table->objs[i].obj_name);
+ }
+
+}

Added: packages/libhdf4/branches/upstream/current/mfhdf/hrepack/hrepack_lsttable.h
===================================================================
--- packages/libhdf4/branches/upstream/current/mfhdf/hrepack/hrepack_lsttable.h	                        (rev 0)
+++ packages/libhdf4/branches/upstream/current/mfhdf/hrepack/hrepack_lsttable.h	2007-05-15 09:53:05 UTC (rev 831)
@@ -0,0 +1,66 @@
+/****************************************************************************
+ * NCSA HDF                                                                 *
+ * Software Development Group                                               *
+ * National Center for Supercomputing Applications                          *
+ * University of Illinois at Urbana-Champaign                               *
+ * 605 E. Springfield, Champaign IL 61820                                   *
+ *                                                                          *
+ * For conditions of distribution and use, see the accompanying             *
+ * hdf/COPYING file.                                                        *
+ *                                                                          *
+ ****************************************************************************/
+
+
+#ifndef REPACK_LSTTABLE_H_
+#define REPACK_LSTTABLE_H_
+
+
+#include "hdf.h"
+#include "mfhdf.h"
+
+#define PFORMAT  "  %-7s %-7s %-7s\n" /*chunk info, compression info, name*/
+#define PFORMAT1 "  %-7s %-7s %-7s"   /*chunk info, compression info, name*/
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+
+/*struct to store the tag/ref and path of an object 
+ the pair tag/ref uniquely identifies an HDF object */
+typedef struct obj_info_t {
+ int   tag;
+ int   ref;
+ char  obj_name[MAX_NC_NAME];
+ int   flags[2];     
+ /*flags that store matching object information
+   between the 2 files 
+   object exists in file = 1
+   does not exist        = 0
+ */
+} obj_info_t;
+
+/*struct that stores all objects */
+typedef struct table_t {
+ int        size;
+ int        nobjs;
+ obj_info_t *objs;
+} table_t;
+
+
+/* table methods */
+void  table_init(table_t **table);
+void  table_free(table_t *table);
+int   table_search(table_t *table, int tag, int ref );
+void  table_add(table_t *table, int tag, int ref, char* obj_name);
+const char* table_check(table_t *table, char*obj_name);
+void  table_print(table_t *table);
+
+
+
+#ifdef __cplusplus
+}
+#endif
+
+
+#endif  /* REPACK_LSTTABLE_H_ */

Added: packages/libhdf4/branches/upstream/current/mfhdf/hrepack/hrepack_main.c
===================================================================
--- packages/libhdf4/branches/upstream/current/mfhdf/hrepack/hrepack_main.c	                        (rev 0)
+++ packages/libhdf4/branches/upstream/current/mfhdf/hrepack/hrepack_main.c	2007-05-15 09:53:05 UTC (rev 831)
@@ -0,0 +1,174 @@
+/****************************************************************************
+ * NCSA HDF                                                                 *
+ * Software Development Group                                               *
+ * National Center for Supercomputing Applications                          *
+ * University of Illinois at Urbana-Champaign                               *
+ * 605 E. Springfield, Champaign IL 61820                                   *
+ *                                                                          *
+ * For conditions of distribution and use, see the accompanying             *
+ * hdf/COPYING file.                                                        *
+ *                                                                          *
+ ****************************************************************************/
+
+
+#include "hdf.h"
+#include "mfhdf.h"
+#include "hrepack.h"
+#include "hrepack_parse.h"
+#include "hrepack_opttable.h"
+
+static void usage();
+
+
+/*
+Examples of use:
+-v -i hziptst.hdf -o hziptst_out.hdf -t "dataset:GZIP 6" -c "dataset:2x2"
+-v -i hziptst.hdf -o hziptst_out.hdf -f info.txt
+*/
+
+
+int main(int argc, char **argv)
+{
+ char        *infile  = NULL;
+ char        *outfile = NULL;
+ options_t   options;            /*the global options */
+ int         i;
+ int         ret;
+
+
+ /* initialize options  */
+ hrepack_init (&options,0);
+
+ for ( i = 1; i < argc; i++) 
+ {
+  if (strcmp(argv[i], "-i") == 0) {
+   infile = argv[++i];
+  }
+  else if (strcmp(argv[i], "-o") == 0) {       
+   outfile = argv[++i]; 
+  }
+  else if (strcmp(argv[i], "-v") == 0) {       
+   options.verbose = 1;
+  }
+  else if (strcmp(argv[i], "-t") == 0) {  
+   
+   /* add the -t option */
+   hrepack_addcomp(argv[i+1],&options);
+
+   /* jump to next */
+   ++i;
+  }
+  else if (strcmp(argv[i], "-c") == 0) {       
+   
+   /* parse the -c option */
+   hrepack_addchunk(argv[i+1],&options);
+   
+   /* jump to next */
+   ++i;
+  }
+
+  else if (strcmp(argv[i], "-m") == 0) {       
+   
+   options.threshold = parse_number(argv[i+1]);
+   if (options.threshold==-1) {
+    printf("Error: Invalid treshold size <%s>\n",argv[i+1]);
+    exit(1);
+   }
+   ++i;
+  }
+  
+  else if (strcmp(argv[i], "-f") == 0) {       
+   read_info(argv[++i],&options);
+  }
+  
+  else if (argv[i][0] == '-') {
+   usage();
+  }
+ }
+
+ if (infile == NULL || outfile == NULL) 
+  usage();
+ 
+ /* zip it */
+ ret=hrepack(infile,outfile,&options);
+ 
+ /* free tables */
+ hrepack_end(&options);
+
+ /* unix error return code */
+ if (ret==-1)
+  return 1;
+ else
+  return 0;
+
+}
+
+
+/*-------------------------------------------------------------------------
+ * Function: usage
+ *
+ * Purpose: print usage
+ *
+ * Return: void
+ *
+ *-------------------------------------------------------------------------
+ */
+
+static 
+void usage()
+{
+
+ printf(
+  "hrepack -i input -o output [-h] [-v] [-t 'comp_info'] [-c 'chunk_info'] [-f comp_file] [-m number]\n");
+ printf("  -i input          Input HDF File\n");
+ printf("  -o output         Output HDF File\n");
+ printf("  [-h]              Print usage message\n");
+ printf("  [-t 'comp_info']  Compression type: 'comp_info' is a string with the format\n");
+ printf("\t\t     <object list>:<type of compression><parameters>\n");
+ printf("\t\t     <object list> is a comma separated list of object names\n");
+ printf("\t\t        meaning apply compression only to those objects\n");
+ printf("\t\t        '*' means all objects\n");
+ printf("\t\t     <type of compression> can be:\n");
+ printf("\t\t       RLE, for RLE compression\n");
+ printf("\t\t       HUFF, for Huffman\n");
+ printf("\t\t       GZIP, for gzip\n");
+ printf("\t\t       JPEG, for JPEG (for images only)\n");
+ printf("\t\t       SZIP, for szip\n");
+ printf("\t\t       NONE, to uncompress\n");
+ printf("\t\t     <parameters> is optional compression info\n");
+ printf("\t\t       RLE, no parameter\n");
+ printf("\t\t       HUFF, the skip-size\n");
+ printf("\t\t       GZIP, the deflation level\n");
+ printf("\t\t       JPEG, the quality factor\n");
+ printf("\t\t       SZIP, pixels per block, compression mode (NN or EC)\n");
+ printf("  [-c 'chunk_info'] Apply chunking. 'chunk_info' is a string with the format\n");
+ printf("\t\t     <object list>:<chunk information>\n");
+ printf("\t\t       <object list> is a comma separated list of object names\n");
+ printf("\t\t         meaning apply chunking only to those objects\n");
+ printf("\t\t         '*' means all objects\n");
+ printf("\t\t       <chunk information> is the chunk size of each dimension:\n");
+ printf("\t\t        <dim_1 x dim_2 x ... dim_n> or\n");
+ printf("\t\t        NONE, to unchunk a previous chunked object\n");
+ printf("  -f comp_file      File with compression info in it (instead of the two above options)\n");
+ printf("  -m number         Do not compress objects wich size in bytes is smaller than number\n");
+ printf("                    A default minimum of 1024 bytes is used\n");
+ printf("\n");
+ printf("Examples:\n");
+ printf("\n");
+ printf("1)$hrepack -v -i file1.hdf -o file2.hdf -t '*:RLE'\n");
+ printf("  compresses all objects in the file file1.hdf, using RLE compression\n");
+ printf("\n");
+ printf("2)$hrepack -v -i file1.hdf -o file2.hdf -t 'A,B,C:HUFF 1' -t 'D,E:RLE' -c 'D,E:10x10'\n");
+ printf("  applies Skipping Huffman compression with skip factor of 1, for objects A, B and C\n");
+ printf("  applies RLE compression for objects D and E.\n");
+ printf("  applies chunking to objects D and E using a chunk size of 10 for the 2 dimensions\n");
+ printf("\n");
+ printf("3)$hrepack -v -i file1.hdf -o file2.hdf -t 'A:NONE'\n");
+ printf("  uncompresses object A\n");
+ printf("4)$hrepack -v -i file1.hdf -o file2.hdf -t 'A:SZIP 8,NN'\n");
+ printf("  applies SZIP compression to object A, with parameters 8 and NN\n");
+ printf("\n");
+ printf("Note: the use of the verbose option -v is recommended\n");
+ exit(1);
+}
+

Added: packages/libhdf4/branches/upstream/current/mfhdf/hrepack/hrepack_opttable.c
===================================================================
--- packages/libhdf4/branches/upstream/current/mfhdf/hrepack/hrepack_opttable.c	                        (rev 0)
+++ packages/libhdf4/branches/upstream/current/mfhdf/hrepack/hrepack_opttable.c	2007-05-15 09:53:05 UTC (rev 831)
@@ -0,0 +1,269 @@
+/****************************************************************************
+ * NCSA HDF                                                                 *
+ * Software Development Group                                               *
+ * National Center for Supercomputing Applications                          *
+ * University of Illinois at Urbana-Champaign                               *
+ * 605 E. Springfield, Champaign IL 61820                                   *
+ *                                                                          *
+ * For conditions of distribution and use, see the accompanying             *
+ * hdf/COPYING file.                                                        *
+ *                                                                          *
+ ****************************************************************************/
+
+
+#include <string.h>
+#include <stdio.h>
+
+#include "hrepack_opttable.h"
+
+
+
+/*-------------------------------------------------------------------------
+ * Function: options_table_init
+ *
+ * Purpose: init options table
+ *
+ * Return: void
+ *
+ *-------------------------------------------------------------------------
+ */
+
+void options_table_init( options_table_t **tbl )
+{
+ int i;
+ options_table_t* table = (options_table_t*) malloc(sizeof(options_table_t));
+ 
+ table->size   = 3;
+ table->nelems = 0;
+ table->objs   = (pack_info_t*) malloc(table->size * sizeof(pack_info_t));
+ 
+ for (i = 0; i < table->size; i++) {
+   strcpy(table->objs[i].path,"\0");
+   table->objs[i].comp.info  = -1;
+   table->objs[i].comp.type  = COMP_CODE_NONE;
+   table->objs[i].chunk.rank = -1;
+  }
+ 
+ *tbl = table;
+}
+
+/*-------------------------------------------------------------------------
+ * Function: options_table_free
+ *
+ * Purpose: free table memory
+ *
+ * Return: void
+ *
+ *-------------------------------------------------------------------------
+ */
+
+void options_table_free( options_table_t *table )
+{
+ free(table->objs);
+ free(table);
+}
+
+/*-------------------------------------------------------------------------
+ * Function: options_add_chunk
+ *
+ * Purpose: add a chunking -c option to the option list
+ *
+ * Return: 
+ *
+ *-------------------------------------------------------------------------
+ */
+
+int options_add_chunk(obj_list_t *obj_list,int n_objs,int32 *chunk_lengths,
+                      int chunk_rank,options_table_t *table )
+{
+ int i, j, k, I, added=0, found=0;
+ 
+ if (table->nelems+n_objs >= table->size) {
+  table->size += n_objs;
+  table->objs = (pack_info_t*)realloc(table->objs, table->size * sizeof(pack_info_t));
+  for (i = table->nelems; i < table->size; i++) {
+   strcpy(table->objs[i].path,"\0");
+   table->objs[i].comp.info  = -1;
+   table->objs[i].comp.type  = COMP_CODE_NONE;
+   table->objs[i].chunk.rank = -1;
+  }
+ }
+ 
+ /* search if this object is already in the table; "path" is the key */
+ if (table->nelems>0)
+ {
+  /* go tru the supplied list of names */
+  for (j = 0; j < n_objs; j++) 
+  {
+   /* linear table search */
+   for (i = 0; i < table->nelems; i++) 
+   {
+    /*already on the table */
+    if (strcmp(obj_list[j].obj,table->objs[i].path)==0)
+    {
+     /* already chunk info inserted for this one; exit */
+     if (table->objs[i].chunk.rank>0)
+     {
+      printf("Input Error: chunk information already inserted for <%s>\n",obj_list[j].obj);
+      exit(1);
+     }
+     /* insert the chunk info */
+     else
+     {
+      table->objs[i].chunk.rank = chunk_rank;
+      for (k = 0; k < chunk_rank; k++) 
+       table->objs[i].chunk.chunk_lengths[k] = chunk_lengths[k];
+      found=1;
+      break;
+     }
+    } /* if */
+   } /* i */
+   
+   if (found==0)
+   {
+    /* keep the grow in a temp var */
+    I = table->nelems + added;  
+    added++;
+    strcpy(table->objs[I].path,obj_list[j].obj);
+    table->objs[I].chunk.rank = chunk_rank;
+    for (k = 0; k < chunk_rank; k++) 
+     table->objs[I].chunk.chunk_lengths[k] = chunk_lengths[k];
+   }
+  } /* j */ 
+ }
+ 
+ /* first time insertion */
+ else
+ {
+  /* go tru the supplied list of names */
+  for (j = 0; j < n_objs; j++) 
+  {
+   I = table->nelems + added;  
+   added++;
+   strcpy(table->objs[I].path,obj_list[j].obj);
+   table->objs[I].chunk.rank = chunk_rank;
+   for (k = 0; k < chunk_rank; k++) 
+    table->objs[I].chunk.chunk_lengths[k] = chunk_lengths[k];
+  }
+ }
+ 
+ table->nelems+= added;
+ 
+ return 0;
+}
+
+
+
+/*-------------------------------------------------------------------------
+ * Function: options_add_comp
+ *
+ * Purpose: add a compression -t option to the option list
+ *
+ * Return: 
+ *
+ *-------------------------------------------------------------------------
+ */
+
+int options_add_comp(obj_list_t *obj_list,int n_objs,comp_info_t comp,
+                     options_table_t *table )
+{
+ 
+ int i, j, I, added=0, found=0;
+ 
+ if (table->nelems+n_objs >= table->size) {
+  table->size += n_objs;
+  table->objs = (pack_info_t*)realloc(table->objs, table->size * sizeof(pack_info_t));
+  for (i = table->nelems; i < table->size; i++) {
+   strcpy(table->objs[i].path,"\0");
+   table->objs[i].comp.info  = -1;
+   table->objs[i].comp.type  = COMP_CODE_NONE;
+   table->objs[i].chunk.rank = -1;
+  }
+ }
+ 
+ /* search if this object is already in the table; "path" is the key */
+ if (table->nelems>0)
+ {
+  /* go tru the supplied list of names */
+  for (j = 0; j < n_objs; j++) 
+  {
+   /* linear table search */
+   for (i = 0; i < table->nelems; i++) 
+   {
+    /*already on the table */
+    if (strcmp(obj_list[j].obj,table->objs[i].path)==0)
+    {
+     /* already COMP info inserted for this one; exit */
+     if (table->objs[i].comp.type>0)
+     {
+      printf("Input Error: compression information already inserted for <%s>\n",obj_list[j].obj);
+      exit(1);
+     }
+     /* insert the comp info */
+     else
+     {
+      table->objs[i].comp = comp;
+      found=1;
+      break;
+     }
+    } /* if */
+   } /* i */
+   
+   if (found==0)
+   {
+    /* keep the grow in a temp var */
+    I = table->nelems + added;  
+    added++;
+    strcpy(table->objs[I].path,obj_list[j].obj);
+    table->objs[I].comp = comp;
+   }
+  } /* j */ 
+ }
+ 
+ /* first time insertion */
+ else
+ {
+  /* go tru the supplied list of names */
+  for (j = 0; j < n_objs; j++) 
+  {
+   I = table->nelems + added;  
+   added++;
+   strcpy(table->objs[I].path,obj_list[j].obj);
+   table->objs[I].comp = comp;
+  }
+ }
+ 
+ table->nelems+= added;
+ 
+ return 0;
+}
+
+/*-------------------------------------------------------------------------
+ * Function: options_get_object
+ *
+ * Purpose: get object from table; "path" is the key
+ *
+ * Return: 
+ *
+ *-------------------------------------------------------------------------
+ */
+
+pack_info_t* options_get_object(char *path,options_table_t *table)
+{
+ int i;
+ 
+ for ( i = 0; i < table->nelems; i++) 
+ {
+  /* found it */
+  if (strcmp(table->objs[i].path,path)==0)
+  {
+   return (&table->objs[i]);
+  }
+ }
+ 
+ return NULL;
+}
+
+
+
+

Added: packages/libhdf4/branches/upstream/current/mfhdf/hrepack/hrepack_opttable.h
===================================================================
--- packages/libhdf4/branches/upstream/current/mfhdf/hrepack/hrepack_opttable.h	                        (rev 0)
+++ packages/libhdf4/branches/upstream/current/mfhdf/hrepack/hrepack_opttable.h	2007-05-15 09:53:05 UTC (rev 831)
@@ -0,0 +1,42 @@
+/****************************************************************************
+ * NCSA HDF                                                                 *
+ * Software Development Group                                               *
+ * National Center for Supercomputing Applications                          *
+ * University of Illinois at Urbana-Champaign                               *
+ * 605 E. Springfield, Champaign IL 61820                                   *
+ *                                                                          *
+ * For conditions of distribution and use, see the accompanying             *
+ * hdf/COPYING file.                                                        *
+ *                                                                          *
+ ****************************************************************************/
+
+
+#ifndef REPACK_OPTTABLE_H_
+#define REPACK_OPTTABLE_H_
+
+#include "hdf.h"
+#include "mfhdf.h"
+
+#include "hrepack.h"
+
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+
+void options_table_init( options_table_t **tbl );
+void options_table_free( options_table_t *table );
+int options_add_chunk(obj_list_t *obj_list,int n_objs,int32 *chunk_lengths,
+                      int chunk_rank,options_table_t *table );
+int options_add_comp(obj_list_t *obj_list,int n_objs,comp_info_t comp,
+                     options_table_t *table );
+pack_info_t* options_get_object(char *path,options_table_t *table);
+
+
+#ifdef __cplusplus
+}
+#endif
+
+
+#endif  /* REPACK_OPTTABLE_H_ */

Added: packages/libhdf4/branches/upstream/current/mfhdf/hrepack/hrepack_pal.c
===================================================================
--- packages/libhdf4/branches/upstream/current/mfhdf/hrepack/hrepack_pal.c	                        (rev 0)
+++ packages/libhdf4/branches/upstream/current/mfhdf/hrepack/hrepack_pal.c	2007-05-15 09:53:05 UTC (rev 831)
@@ -0,0 +1,71 @@
+/****************************************************************************
+ * NCSA HDF                                                                 *
+ * Software Development Group                                               *
+ * National Center for Supercomputing Applications                          *
+ * University of Illinois at Urbana-Champaign                               *
+ * 605 E. Springfield, Champaign IL 61820                                   *
+ *                                                                          *
+ * For conditions of distribution and use, see the accompanying             *
+ * hdf/COPYING file.                                                        *
+ *                                                                          *
+ ****************************************************************************/
+
+
+#include "hdf.h"
+#include "mfhdf.h"
+#include "hrepack_pal.h"
+
+
+
+/*-------------------------------------------------------------------------
+ * Function: copy_pal
+ *
+ * Purpose: list/copy lone palettes
+ *
+ *-------------------------------------------------------------------------
+ */
+
+int copy_pal(char* infname,char* outfname,int32 infile_id,int32 outfile_id,
+              table_t *table,options_t *options)
+{
+ uint8  palette_data[256*3];
+ intn   nPals, j;
+ uint16 ref;
+ 
+ if ( options->trip==0 ) 
+ {
+  return SUCCESS;
+ }
+
+ DFPrestart();
+ 
+ if((nPals = DFPnpals (infname))==FAIL ) {
+  printf( "Failed to get palettes in <%s>\n", infname);
+  return FAIL;
+ }
+ 
+ for ( j = 0; j < nPals; j++) 
+ {
+  if (DFPgetpal(infname, (VOIDP)palette_data)==FAIL ) {
+   printf( "Failed to read palette <%d> in <%s>\n", j, infname);
+   continue;
+  }
+  
+  ref=DFPlastref();
+  
+  /* check if already inserted in image */
+  if ( table_search(table,DFTAG_IP8,ref)>=0 ){
+   continue;
+  }
+  
+  if (DFPaddpal(outfname,palette_data)==FAIL){
+   printf( "Failed to write palette in <%s>\n", outfname);
+   return FAIL;
+  }
+  
+ }
+ 
+ return SUCCESS;
+}
+
+

Added: packages/libhdf4/branches/upstream/current/mfhdf/hrepack/hrepack_pal.h
===================================================================
--- packages/libhdf4/branches/upstream/current/mfhdf/hrepack/hrepack_pal.h	                        (rev 0)
+++ packages/libhdf4/branches/upstream/current/mfhdf/hrepack/hrepack_pal.h	2007-05-15 09:53:05 UTC (rev 831)
@@ -0,0 +1,37 @@
+/****************************************************************************
+ * NCSA HDF                                                                 *
+ * Software Development Group                                               *
+ * National Center for Supercomputing Applications                          *
+ * University of Illinois at Urbana-Champaign                               *
+ * 605 E. Springfield, Champaign IL 61820                                   *
+ *                                                                          *
+ * For conditions of distribution and use, see the accompanying             *
+ * hdf/COPYING file.                                                        *
+ *                                                                          *
+ ****************************************************************************/
+
+
+#ifndef REPACK_PAL_H_
+#define REPACK_PAL_H_
+
+#include "hrepack.h"
+#include "hrepack_lsttable.h"
+
+
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+
+int copy_pal(char* infname,char* outfname,int32 infile_id,int32 outfile_id,
+              table_t *table,options_t *options);
+
+
+
+#ifdef __cplusplus
+}
+#endif
+
+
+#endif  /* REPACK_PAL_H_ */

Added: packages/libhdf4/branches/upstream/current/mfhdf/hrepack/hrepack_parse.c
===================================================================
--- packages/libhdf4/branches/upstream/current/mfhdf/hrepack/hrepack_parse.c	                        (rev 0)
+++ packages/libhdf4/branches/upstream/current/mfhdf/hrepack/hrepack_parse.c	2007-05-15 09:53:05 UTC (rev 831)
@@ -0,0 +1,520 @@
+/****************************************************************************
+ * NCSA HDF                                                                 *
+ * Software Development Group                                               *
+ * National Center for Supercomputing Applications                          *
+ * University of Illinois at Urbana-Champaign                               *
+ * 605 E. Springfield, Champaign IL 61820                                   *
+ *                                                                          *
+ * For conditions of distribution and use, see the accompanying             *
+ * hdf/COPYING file.                                                        *
+ *                                                                          *
+ ****************************************************************************/
+
+
+#include <string.h>
+#include <stdio.h>
+#include <ctype.h> /*isdigit*/
+
+#include "hrepack_parse.h"
+
+#ifdef H4_HAVE_LIBSZ
+#include "szlib.h"
+#endif
+
+/*-------------------------------------------------------------------------
+ * Function: parse_comp
+ *
+ * Purpose: read compression info
+ *
+ * Return: a list of names, the number of names and its compression type
+ *
+ * Examples: 
+ * "AA,B,CDE:RLE" 
+ * "*:GZIP 6"
+ * "A,B:NONE"
+ *
+ * Programmer: Pedro Vicente, pvn at ncsa.uiuc.edu
+ *
+ * Date: July 15, 2003
+ *
+ *-------------------------------------------------------------------------
+ */
+
+
+obj_list_t* parse_comp(const char *str, 
+                       int *n_objs, 
+                       comp_info_t *comp)
+{
+ unsigned    i, u;
+ char        c;
+ size_t      len=strlen(str);
+ int         j, m, n, k, end_obj=-1, no_param=0, l;
+ char        obj[MAX_NC_NAME]; 
+ char        scomp[10];
+ char        stype[5];
+ char        smask[3]; 
+ obj_list_t* obj_list=NULL;
+
+ /* check for the end of object list and number of objects */
+ for ( i=0, n=0; i<len; i++)
+ {
+  c = str[i];
+  if ( c==':' )
+  {
+   end_obj=i;
+  }
+  if ( c==',' )
+  {
+   n++;
+  }
+ }
+
+ if (end_obj==-1) { /* missing : */
+  printf("Input Error: Invalid compression input in <%s>\n",str);
+  exit(1);
+ }
+  
+ n++;
+ obj_list=HDmalloc(n*sizeof(obj_list_t));
+ *n_objs=n;
+
+ /* get object list */
+ for ( j=0, k=0, n=0; j<end_obj; j++,k++)
+ {
+  c = str[j];
+  obj[k]=c;
+  if ( c==',' || j==end_obj-1) 
+  {
+   if ( c==',') obj[k]='\0'; else obj[k+1]='\0';
+   strcpy(obj_list[n].obj,obj);
+   memset(obj,0,sizeof(obj));
+   n++;
+   k=-1;
+  }
+ }
+ /* nothing after : */
+ if (end_obj+1==(int)len)
+ {
+  if (obj_list) free(obj_list);
+  printf("Input Error: Invalid compression type in <%s>\n",str);
+  exit(1);
+ }
+
+
+ /* get compression type */
+ m=0;
+ for ( i=end_obj+1, k=0; i<len; i++,k++)
+ {
+  c = str[i];
+  scomp[k]=c;
+  if ( c==' ' || i==len-1) 
+  {
+   if ( c==' ')  /*one more parameter */
+   {     
+    scomp[k]='\0';     /*cut space */
+   
+   /*
+     SZIP is a special case , it can be
+     SZIP=8,EC
+     SZIP=8,NN
+    */
+    
+    if (strcmp(scomp,"SZIP")==0)
+    {
+     l=-1; /* mask index check */
+     for ( m=0,u=i+1; u<len; u++,m++) 
+     {
+      if (str[u]==',')
+      {
+       stype[m]='\0'; /* end digit of szip */
+       l=0;  /* start EC or NN search */
+       u++;  /* skip ',' */
+      }
+      c = str[u];
+      if (!isdigit(c) && l==-1){
+       if (obj_list) free(obj_list);
+       printf("Input Error: Compression parameter not digit in <%s>\n",str);
+       exit(1);
+      }
+      if (l==-1)
+       stype[m]=c;
+      else 
+      {
+       smask[l]=c;
+       l++;
+       if (l==2)
+       {
+        smask[l]='\0';
+        i=len-1; /* end */
+        (*n_objs)--; /* we counted an extra ',' */
+        if (strcmp(smask,"NN")==0) 
+         comp->szip_mode=NN_MODE;
+        else if (strcmp(smask,"EC")==0)
+         comp->szip_mode=EC_MODE;
+        else
+        {
+         printf("Input Error: szip mask must be 'NN' or 'EC' \n");
+         exit(1);
+        }
+       }
+      }
+     }  /* u */
+    } /* SZIP */
+    
+    else
+     
+    {
+     /* here we could have 1, 2 or 3 digits (2 and 3 in the JPEG case) */
+     for ( m=0,u=i+1; u<len; u++,m++) 
+     {
+      c = str[u];
+      if (!isdigit(c)){
+       printf("Input Error: Compression parameter not digit in <%s>\n",str);
+       exit(1);
+      }
+      stype[m]=c;
+     } /* m */
+     
+    } /* else , no SZIP */
+    
+    
+    /* set return value of the compression parameter */
+    stype[m]='\0';
+    comp->info=atoi(stype);
+    i+=m; /* jump */
+    
+    
+   } /* if c==' ' */
+
+
+   else if (i==len-1) { /*no more parameters */
+    scomp[k+1]='\0';
+    no_param=1;
+   }
+
+   if (HDstrcmp(scomp,"NONE")==0)
+    comp->type=COMP_CODE_NONE;
+   else if (HDstrcmp(scomp,"RLE")==0)
+   {
+    comp->type=COMP_CODE_RLE;
+    if (m>0){ /*RLE does not have parameter */
+     if (obj_list) free(obj_list);
+     printf("Input Error: Extra compression parameter in RLE <%s>\n",str);
+     exit(1);
+    }
+   }
+   else if (HDstrcmp(scomp,"HUFF")==0)
+   {
+    comp->type=COMP_CODE_SKPHUFF;
+    if (no_param) { /*no more parameters, HUFF must have parameter */
+     if (obj_list) free(obj_list);
+     printf("Input Error: Missing compression parameter in <%s>\n",str);
+     exit(1);
+    }
+   }
+   else if (HDstrcmp(scomp,"GZIP")==0)
+   {
+    comp->type=COMP_CODE_DEFLATE;
+    if (no_param) { /*no more parameters, GZIP must have parameter */
+     if (obj_list) free(obj_list);
+     printf("Input Error: Missing compression parameter in <%s>\n",str);
+     exit(1);
+    }
+   }
+   else if (HDstrcmp(scomp,"JPEG")==0)
+   {
+    comp->type=COMP_CODE_JPEG;
+    if (no_param) { /*no more parameters, JPEG must have parameter */
+     if (obj_list) free(obj_list);
+     printf("Input Error: Missing compression parameter in <%s>\n",str);
+     exit(1);
+    }
+   }
+   else if (HDstrcmp(scomp,"SZIP")==0)
+   {
+#ifdef H4_HAVE_LIBSZ
+    if (SZ_encoder_enabled()) {
+       comp->type=COMP_CODE_SZIP;
+       if (no_param) { /*no more parameters, SZIP must have parameter */
+        if (obj_list) free(obj_list);
+        printf("Input Error: Missing compression parameter in <%s>\n",str);
+        exit(1);
+       }
+	if (comp->szip_mode==FAIL) {
+		printf("Input Error: SZIP compression mode must be NN_MODE or EC_MODE");
+	     exit(1);
+	}
+    } else {
+     printf("Input Error: SZIP encoder is not available\n");
+     exit(1);
+    }
+#else
+     printf("Input Error: SZIP compression is not available\n");
+     exit(1);
+#endif
+   }
+   else {
+    if (obj_list) free(obj_list);
+    printf("Input Error: Invalid compression type in <%s>\n",str);
+    exit(1);
+   }
+  }
+ } /*i*/
+
+
+ /* check valid parameters */
+ switch (comp->type)
+  {
+  default:
+   break;
+  case COMP_CODE_RLE:
+   break;
+  case COMP_CODE_SKPHUFF:
+   if (comp->info<=0 ){
+    if (obj_list) free(obj_list);
+    printf("Input Error: Invalid compression parameter in <%s>\n",str);
+    exit(1);
+   }
+   break;
+  case COMP_CODE_DEFLATE:
+   if (comp->info<0 || comp->info>9 ){
+    if (obj_list) free(obj_list);
+    printf("Input Error: Invalid compression parameter in <%s>\n",str);
+    exit(1);
+   }
+   break;
+  case COMP_CODE_JPEG:
+   if (comp->info<0 || comp->info>100 ){
+    if (obj_list) free(obj_list);
+    printf("Input Error: Invalid compression parameter in <%s>\n",str);
+    exit(1);
+   }
+   break;
+  case COMP_CODE_SZIP:
+#ifdef H4_HAVE_LIBSZ
+    if ( (comp->info<=1 || comp->info > SZ_MAX_PIXELS_PER_BLOCK) || 
+         (comp->info%2!=0)  ){
+    if (obj_list) free(obj_list);
+    printf("Input Error: Invalid compression parameter in <%s>. \
+     Pixels per block must be an even number < %d\n",str,SZ_MAX_PIXELS_PER_BLOCK);
+    exit(1);
+   }
+#else 
+    if (obj_list) free(obj_list);
+    printf("Input Error: Invalid compression method in <%s>. \
+     SZIP is not available < %d\n",str);
+    exit(1);
+#endif
+   break;
+  };
+
+ return obj_list;
+}
+
+
+/*-------------------------------------------------------------------------
+ * Function: get_scomp
+ *
+ * Purpose: return the compression type as a string
+ *
+ * Return: void
+ *
+ *-------------------------------------------------------------------------
+ */
+
+const char* get_scomp(comp_coder_t code)
+{
+ if (code==COMP_CODE_RLE)
+  return "RLE";
+ else if (code==COMP_CODE_NBIT)
+  return "COMP_CODE_NBIT";
+ else if (code==COMP_CODE_SKPHUFF)
+  return "HUFF";
+ else if (code==COMP_CODE_DEFLATE)
+  return "GZIP";
+ else if (code==COMP_CODE_JPEG)
+  return "JPEG";
+ else if (code==COMP_CODE_SZIP)
+  return "SZIP";
+ else if (code==COMP_CODE_NONE)
+  return "NONE";
+ else if (code==COMP_CODE_INVALID)
+  return "COMP_CODE_INVALID";
+ else {
+  printf("Input Error in compression type\n");
+  exit(1);
+ }
+ return NULL;
+} 
+
+
+
+
+/*-------------------------------------------------------------------------
+ * Function: parse_chunk
+ *
+ * Purpose: read chunkink info
+ *
+ * Return: a list of names, the number of names and its chunking info
+ *
+ * Examples: 
+ * "AA,B,CDE:10X10 
+ * "*:10X10"
+ *
+ * Programmer: Pedro Vicente, pvn at ncsa.uiuc.edu
+ *
+ * Date: July 17, 2003
+ *
+ *-------------------------------------------------------------------------
+ */
+
+
+obj_list_t* parse_chunk(const char *str, 
+                        int *n_objs, 
+                        int32 *chunk_lengths, 
+                        int *chunk_rank)
+{
+ obj_list_t* obj_list=NULL;
+ unsigned    i;
+ char        c;
+ size_t      len=strlen(str);
+ int         j, n, k, end_obj=-1, c_index;
+ char        obj[MAX_NC_NAME]; 
+ char        sdim[10];
+ 
+ /* check for the end of object list and number of objects */
+ for ( i=0, n=0; i<len; i++)
+ {
+  c = str[i];
+  if ( c==':' )
+  {
+   end_obj=i;
+  }
+  if ( c==',' )
+  {
+   n++;
+  }
+ }
+
+ if (end_obj==-1) { /* missing : */
+  printf("Input Error: Invalid chunking input in <%s>\n",str);
+  exit(1);
+ }
+  
+ n++;
+ obj_list=HDmalloc(n*sizeof(obj_list_t));
+ *n_objs=n;
+
+ /* get object list */
+ for ( j=0, k=0, n=0; j<end_obj; j++,k++)
+ {
+  c = str[j];
+  obj[k]=c;
+  if ( c==',' || j==end_obj-1) 
+  {
+   if ( c==',') obj[k]='\0'; else obj[k+1]='\0';
+   strcpy(obj_list[n].obj,obj);
+   memset(obj,0,sizeof(obj));
+   n++;
+   k=-1;
+  }
+ }
+
+ /* nothing after : */
+ if (end_obj+1==(int)len)
+ {
+  if (obj_list) free(obj_list);
+  printf("Input Error: Invalid chunking in <%s>\n",str);
+  exit(1);
+ }
+
+ /* get chunk info */
+ k=0; 
+ for ( i=end_obj+1, c_index=0; i<len; i++)
+ {
+  c = str[i];
+  sdim[k]=c;
+  k++; /*increment sdim index */
+
+  if (!isdigit(c) && c!='x' && c!='N' && c!='O' && c!='N' && c!='E'){
+   if (obj_list) free(obj_list);
+   printf("Input Error: Invalid chunking in <%s>\n",str);
+   exit(1);
+  }
+
+  if ( c=='x' || i==len-1) 
+  {
+   if ( c=='x') {  
+    sdim[k-1]='\0';  
+    k=0;
+    chunk_lengths[c_index]=atoi(sdim);
+    if (chunk_lengths[c_index]==0) {
+      if (obj_list) free(obj_list);
+      printf("Input Error: Invalid chunking in <%s>\n",str);
+      exit(1);
+     }
+    c_index++;
+   }
+   else if (i==len-1) { /*no more parameters */
+    sdim[k]='\0';  
+    k=0;
+    if (strcmp(sdim,"NONE")==0)
+    {
+     *chunk_rank=-2;
+    }
+    else
+    {
+     chunk_lengths[c_index]=atoi(sdim);
+     if (chunk_lengths[c_index]==0){
+      if (obj_list) free(obj_list);
+      printf("Input Error: Invalid chunking in <%s>\n",str);
+      exit(1);
+     }
+     *chunk_rank=c_index+1;
+    }
+   } /*if */
+  } /*if c=='x' || i==len-1 */
+ } /*i*/
+
+ return obj_list;
+}
+
+
+
+/*-------------------------------------------------------------------------
+ * Function: parse_number
+ *
+ * Purpose: read a number from command line argument
+ *
+ * Return: number, -1 for FAIL
+ *
+ * Programmer: Pedro Vicente, pvn at ncsa.uiuc.edu
+ *
+ * Date: July 31, 2003
+ *
+ *-------------------------------------------------------------------------
+ */
+
+
+int parse_number(char *str)
+{
+ unsigned    i;
+ int         n;
+ char        c;
+ size_t      len=strlen(str);
+  
+ for ( i=0; i<len; i++)
+ {
+  c = str[i];
+  if (!isdigit(c)){
+   return -1;
+  }
+ }
+ str[i]='\0';     
+ n=atoi(str);
+ return n;
+}
+
+
+
+

Added: packages/libhdf4/branches/upstream/current/mfhdf/hrepack/hrepack_parse.h
===================================================================
--- packages/libhdf4/branches/upstream/current/mfhdf/hrepack/hrepack_parse.h	                        (rev 0)
+++ packages/libhdf4/branches/upstream/current/mfhdf/hrepack/hrepack_parse.h	2007-05-15 09:53:05 UTC (rev 831)
@@ -0,0 +1,46 @@
+/****************************************************************************
+ * NCSA HDF                                                                 *
+ * Software Development Group                                               *
+ * National Center for Supercomputing Applications                          *
+ * University of Illinois at Urbana-Champaign                               *
+ * 605 E. Springfield, Champaign IL 61820                                   *
+ *                                                                          *
+ * For conditions of distribution and use, see the accompanying             *
+ * hdf/COPYING file.                                                        *
+ *                                                                          *
+ ****************************************************************************/
+
+
+#ifndef REPACK_PARSE_H_
+#define REPACK_PARSE_H_
+
+#include "hdf.h"
+#include "mfhdf.h"
+#include "hrepack.h"
+
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+int parse_number(char *str);
+
+
+/* compression */
+
+obj_list_t* parse_comp(const char *str, int *n_objs, comp_info_t *comp);
+const char*       get_scomp(comp_coder_t code);
+
+/* chunking */
+
+obj_list_t* parse_chunk(const char *str, int *n_objs, int32 *chunk_lengths, int *chunk_rank);
+
+
+#ifdef __cplusplus
+}
+#endif
+
+#define NN_MODE 0
+#define EC_MODE 1
+
+#endif  /* REPACK_PARSE_H_ */

Added: packages/libhdf4/branches/upstream/current/mfhdf/hrepack/hrepack_sds.c
===================================================================
--- packages/libhdf4/branches/upstream/current/mfhdf/hrepack/hrepack_sds.c	                        (rev 0)
+++ packages/libhdf4/branches/upstream/current/mfhdf/hrepack/hrepack_sds.c	2007-05-15 09:53:05 UTC (rev 831)
@@ -0,0 +1,720 @@
+/****************************************************************************
+ * NCSA HDF                                                                 *
+ * Software Development Group                                               *
+ * National Center for Supercomputing Applications                          *
+ * University of Illinois at Urbana-Champaign                               *
+ * 605 E. Springfield, Champaign IL 61820                                   *
+ *                                                                          *
+ * For conditions of distribution and use, see the accompanying             *
+ * hdf/COPYING file.                                                        *
+ *                                                                          *
+ ****************************************************************************/
+
+
+
+#include <assert.h>
+#include "hdf.h"
+#include "mfhdf.h"
+
+#include "hrepack_sdutil.h"
+#include "hrepack_sds.h"
+#include "hrepack_an.h"
+#include "hrepack_utils.h"
+#include "hrepack_parse.h"
+#include "hrepack_opttable.h"
+
+
+
+/*-------------------------------------------------------------------------
+ * Function: copy_sds
+ *
+ * Purpose: copy an SDS from input file to output file and compress it 
+ *  using options
+ *
+ * Return: 0, -1 for error 
+ *
+ * Programmer: Pedro Vicente, pvn at ncsa.uiuc.edu
+ *
+ * Date: July 10, 2003
+ *
+ *-------------------------------------------------------------------------
+ */
+
+int copy_sds(int32 sd_in,
+             int32 sd_out,
+             int32 tag,               /* tag of input SDS */
+             int32 ref,               /* ref of input SDS */
+             int32 vgroup_id_out_par, /* output parent group ID */
+             char*path_name,          /* absolute path for input group name */
+             options_t *options,
+             table_t *table,
+             int32 infile_id,
+             int32 outfile_id)
+{
+ int32 sds_id,                /* data set identifier */
+       sds_out,               /* data set identifier */
+       sds_index,             /* index number of the data set */
+       dtype,                 /* SDS data type */
+       dimsizes[MAX_VAR_DIMS],/* dimensional size of SDS */
+       start[MAX_VAR_DIMS],   /* read start */
+       edges[MAX_VAR_DIMS],   /* read edges */
+       nattrs,                /* number of SDS attributes */
+       rank,                  /* rank of SDS */
+       sds_ref,               /* reference number of the output data set */
+       numtype,               /* number type */
+       eltsz,                 /* element size */
+       nelms,                 /* number of elements */
+       dim_size,              /* dimension size */
+       dim_id,                /* dimension ID */
+       dim_out;               /* dimension ID */
+ char             sds_name[MAX_NC_NAME]; 
+ char             dim_name[MAX_NC_NAME];
+ char             *path=NULL;
+ VOIDP            buf=NULL;
+ VOIDP            dim_buf=NULL;
+ int              i, j, ret=1,stat;
+ int              info;           /* temporary int compression information */
+ comp_coder_t     comp_type;      /* compression type requested  */
+ comp_coder_t     comp_type_in;   /* compression type original  */
+ comp_info        c_info;         /* compression information requested  */
+ comp_info        c_info_in;      /* compression information original  */
+ HDF_CHUNK_DEF    chunk_def;      /* chunk definition */
+ HDF_CHUNK_DEF    chunk_def_in;   /* chunk definition original */
+ int32            chunk_flags;    /* chunk flags */ 
+ int32            chunk_flags_in; /* chunk flags original*/ 
+ int              szip_mode;      /* szip mode, EC, NN */
+ intn             empty_sds;
+ int              have_info=0;
+
+ sds_out=FAIL;
+
+ sds_index = SDreftoindex(sd_in,ref);
+ sds_id    = SDselect(sd_in,sds_index);
+ 
+ /*obtain name,rank,dimsizes,datatype and num of attributes of sds */
+ if (SDgetinfo(sds_id,sds_name,&rank,dimsizes,&dtype,&nattrs)==FAIL){
+  printf( "Could not get information for SDS\n");
+  SDendaccess(sds_id);
+  return -1;
+ }
+
+ /* check if the given SDS is a dimension scale, return 0 for no table add */
+ if ( SDiscoordvar(sds_id) ) {
+  SDendaccess(sds_id);
+  return 0;
+ }
+ 
+ /* initialize path */
+ path=get_path(path_name,sds_name);
+ 
+ /* add object to table */
+ table_add(table,tag,ref,path);
+
+#if defined(HZIP_DEBUG)
+ printf ("\t%s %d\n", path, ref); 
+#endif
+ 
+/*-------------------------------------------------------------------------
+ * get the original compression/chunk information from the object 
+ *-------------------------------------------------------------------------
+ */
+ 
+ comp_type_in = COMP_CODE_NONE;  /* reset variables before retrieving information */
+ HDmemset(&c_info_in, 0, sizeof(comp_info)) ;
+ stat=SDgetcompress(sds_id, &comp_type_in, &c_info_in);
+ if (stat==FAIL && comp_type_in>0){
+  printf( "Could not get compression information for SDS <%s>\n",path);
+  SDendaccess(sds_id);
+  return -1;
+ }
+
+ /* get chunk lengths */
+ stat=SDgetchunkinfo(sds_id, &chunk_def_in, &chunk_flags_in);
+ if (stat==FAIL){
+  printf( "Could not get chunking information for SDS <%s>\n",path);
+  SDendaccess(sds_id);
+  return -1;
+ }
+
+ /* retrieve the compress information if so */
+ if ( (HDF_CHUNK | HDF_COMP) == chunk_flags_in )
+ {
+  chunk_def_in.comp.comp_type=comp_type_in;
+  switch (comp_type_in)
+  {
+  case COMP_CODE_RLE:
+   chunk_def_in.comp.comp_type              = COMP_CODE_RLE;
+   break;
+  case COMP_CODE_SKPHUFF:
+   chunk_def_in.comp.comp_type              = COMP_CODE_SKPHUFF;
+   chunk_def_in.comp.cinfo.skphuff          = c_info_in.skphuff;
+   break;
+  case COMP_CODE_DEFLATE:
+   chunk_def_in.comp.comp_type              = COMP_CODE_DEFLATE;
+   chunk_def_in.comp.cinfo.deflate          = c_info_in.deflate;
+   break;
+  case COMP_CODE_SZIP:
+#ifdef H4_HAVE_LIBSZ
+   chunk_def_in.comp.comp_type              = COMP_CODE_SZIP;
+   chunk_def_in.comp.cinfo.szip             = c_info_in.szip;
+#else
+   printf("Error: SZIP compression is not available <%s>\n",path);
+  SDendaccess(sds_id);
+  return -1;
+#endif
+   break;
+  default:
+   printf("Error: Unrecognized compression code in %d <%s>\n",comp_type_in,path);
+  };
+ }
+
+/*-------------------------------------------------------------------------
+ * set the default values to the ones read from the object
+ *-------------------------------------------------------------------------
+ */
+
+ comp_type   = comp_type_in;
+ switch (comp_type_in)
+  {
+
+  case COMP_CODE_NBIT:
+   printf("Nbit compression not supported in this version <%s>\n",path);
+   break;
+  case COMP_CODE_NONE:
+   break;
+  case COMP_CODE_RLE:
+   break;
+  case COMP_CODE_SZIP:
+#ifdef H4_HAVE_LIBSZ
+   info      = c_info_in.szip.pixels_per_block;
+ if (c_info_in.szip.options_mask & SZ_EC_OPTION_MASK) {
+  szip_mode = EC_MODE;
+ } else if (c_info_in.szip.options_mask & SZ_NN_OPTION_MASK) {
+  szip_mode = NN_MODE;
+ }
+#else
+   printf("SZIP compression not supported in this version <%s>\n",path);
+#endif
+   break;
+  case COMP_CODE_SKPHUFF:
+   info  = c_info_in.skphuff.skp_size;
+   break;
+  case COMP_CODE_DEFLATE:
+   info  = c_info_in.deflate.level;
+   break;
+  default:
+   printf("Error: Unrecognized compression code in %d <%s>\n",comp_type,path);
+   break;
+  };
+ chunk_flags = chunk_flags_in;
+ if ( (HDF_CHUNK) == chunk_flags )
+ {
+  for (i = 0; i < rank; i++) 
+   chunk_def.chunk_lengths[i]      = chunk_def_in.chunk_lengths[i];
+ }
+ else if ( (HDF_CHUNK | HDF_COMP) == chunk_flags )
+ {
+  for (i = 0; i < rank; i++) {
+   chunk_def.chunk_lengths[i]      = chunk_def_in.chunk_lengths[i];
+   chunk_def.comp.chunk_lengths[i] = chunk_def_in.chunk_lengths[i];
+  }
+  chunk_def.comp.comp_type=comp_type_in;
+  switch (comp_type_in)
+  {
+  case COMP_CODE_RLE:
+   chunk_def.comp.comp_type              = COMP_CODE_RLE;
+   break;
+  case COMP_CODE_SKPHUFF:
+   chunk_def.comp.comp_type              = COMP_CODE_SKPHUFF;
+   chunk_def.comp.cinfo.skphuff          = c_info_in.skphuff;
+   break;
+  case COMP_CODE_DEFLATE:
+   chunk_def.comp.comp_type              = COMP_CODE_DEFLATE;
+   chunk_def.comp.cinfo.deflate         = c_info_in.deflate;
+   break;
+  case COMP_CODE_SZIP:
+#ifdef H4_HAVE_LIBSZ
+   chunk_def.comp.comp_type              = COMP_CODE_SZIP;
+   chunk_def.comp.cinfo.szip             = c_info_in.szip;
+#else
+   printf("Error: SZIP compression not available in %d <%s>\n",comp_type_in,path);
+#endif
+   break;
+  default:
+   printf("Error: Unrecognized compression code in %d <%s>\n",comp_type_in,path);
+  };
+ }
+
+/*-------------------------------------------------------------------------
+ * get the compression/chunk information of this object from the table
+ * translate to usable information
+ * this is done ONLY for the second trip inspection 
+ *-------------------------------------------------------------------------
+ */
+ 
+ /* check inspection mode */
+ if ( options->trip>0 ) 
+ {
+  have_info = 
+  options_get_info(options,      /* global options */
+                   &chunk_flags, /* chunk flags OUT */
+                   &chunk_def,   /* chunk definition OUT */
+                   &info,        /* compression information OUT */
+                   &szip_mode,   /* compression information OUT */
+                   &comp_type,   /* compression type OUT  */
+                   rank,         /* rank of object IN */
+                   path,         /* path of object IN */
+                   1,            /* number of GR image planes (for SZIP), IN */
+                   dimsizes,     /* dimensions (for SZIP), IN */
+                   dtype         /* numeric type ( for SZIP), IN */
+                    );
+  if (have_info==FAIL)
+   comp_type=COMP_CODE_NONE;
+ } /* check inspection mode */
+
+
+/*-------------------------------------------------------------------------
+ * get size before printing
+ *-------------------------------------------------------------------------
+ */
+
+ /* compute the number of the bytes for each value. */
+ numtype = dtype & DFNT_MASK;
+ eltsz = DFKNTsize(numtype | DFNT_NATIVE);
+
+ /* set edges of SDS */
+ nelms=1;
+ for (j = 0; j < rank; j++) {
+  nelms   *= dimsizes[j];
+  edges[j] = dimsizes[j];
+  start[j] = 0;
+ }
+
+/*-------------------------------------------------------------------------
+ * check for maximum number of chunks treshold
+ *-------------------------------------------------------------------------
+ */
+ if ( options->trip>0 ) 
+ {
+  int count=1, nchunks;
+  int maxchunk=INT_MAX;
+  if ( (chunk_flags == HDF_CHUNK) || (chunk_flags == (HDF_CHUNK | HDF_COMP)) )
+  {
+   for (j = 0; j < rank; j++) {
+    count   *= chunk_def.chunk_lengths[j];
+   }
+   nchunks=nelms/count;
+   if (nchunks>maxchunk){
+    printf("Warning: number of chunks is %d (greater than %d). Not chunking <%s>\n",
+    nchunks,maxchunk,path);
+    chunk_flags=HDF_NONE;
+   }
+  }
+ }
+
+
+/*-------------------------------------------------------------------------
+ * check for objects too small
+ *-------------------------------------------------------------------------
+ */
+ if ( have_info==1 && options->trip>0  && nelms*eltsz<options->threshold )
+ {
+  /* reset to the original values . we don't want to uncompress if it was */
+  chunk_flags=chunk_flags_in;
+  comp_type=comp_type_in;
+  if (options->verbose) {
+   printf("Warning: object size smaller than %d bytes. Not compressing <%s>\n",
+    options->threshold,path);
+  }
+ }
+
+/*-------------------------------------------------------------------------
+ * print the PATH, COMP and CHUNK information
+ *-------------------------------------------------------------------------
+ */ 
+ 
+ if (options->verbose)
+ {
+  int pr_comp_type=0;
+  if (comp_type>0)
+  {
+   pr_comp_type=comp_type;
+  }
+  else
+  {
+   if (chunk_flags== (HDF_CHUNK | HDF_COMP))
+   {
+    pr_comp_type=chunk_def.comp.comp_type;
+   }
+  }
+  printf(PFORMAT,
+   (chunk_flags>0)?"chunk":"",                    /*chunk information*/
+   (pr_comp_type>0)?get_scomp(pr_comp_type):"",   /*compression information*/
+   path);                                         /*name*/
+ }
+
+/*-------------------------------------------------------------------------
+ * check if the requested compression is valid
+ * SDSs do not support JPEG
+ *-------------------------------------------------------------------------
+ */
+ 
+ /* check inspection mode */
+ if ( options->trip>0 ) 
+ {
+  switch(comp_type)
+  {
+  case COMP_CODE_NONE:
+  case COMP_CODE_RLE:
+  case COMP_CODE_SKPHUFF:
+  case COMP_CODE_DEFLATE:
+  case COMP_CODE_SZIP:
+  case COMP_CODE_NBIT:
+   break;
+  case COMP_CODE_JPEG:
+   printf("Error: JPEG compression is not available for <%s>\n",path);
+   ret=FAIL;
+   goto out;
+   break;
+  default:
+   printf("Error: Unrecognized compression code %d in <%s>\n",comp_type_in,path);
+   ret=FAIL;
+   goto out;
+  }
+ } /* check inspection mode */
+
+
+
+ 
+
+/*-------------------------------------------------------------------------
+ * if we are in first trip inspection mode, exit, after printing the information
+ *-------------------------------------------------------------------------
+ */ 
+ 
+ /* check inspection mode */
+ if ( options->trip==0 ) {
+  SDendaccess(sds_id);
+  if (path) free(path);
+  return 0;
+ }
+
+/*-------------------------------------------------------------------------
+ * create new SDS
+ *-------------------------------------------------------------------------
+ */
+
+ if ((sds_out = SDcreate(sd_out,sds_name,dtype,rank,dimsizes)) == FAIL) {
+  printf( "Failed to create new SDS <%s>\n", path);
+  ret=-1;
+  goto out;
+ }
+
+
+/*-------------------------------------------------------------------------
+ * set chunk 
+ *
+ * Chunked                  -> flags = HDF_CHUNK
+ * Chunked and compressed   -> flags = HDF_CHUNK | HDF_COMP 
+ * Non-chunked              -> flags = HDF_NONE
+ *-------------------------------------------------------------------------
+ */
+
+ /* set chunk */
+ if ( (chunk_flags == HDF_CHUNK) || (chunk_flags == (HDF_CHUNK | HDF_COMP)) )
+ {
+  if (SDsetchunk (sds_out, chunk_def, chunk_flags)==FAIL)
+  {
+   printf( "Error: Failed to set chunk dimensions for <%s>\n", path);
+   ret=-1;
+   goto out;
+  }
+
+ }
+
+/*-------------------------------------------------------------------------
+ * set compression
+ *
+ * COMP_CODE_RLE       -> simple RLE encoding
+ * COMP_CODE_SKPHUFF   -> Skipping huffman encoding
+ * COMP_CODE_DEFLATE   -> gzip 'deflate' encoding
+ *-------------------------------------------------------------------------
+ */
+   
+ /* use compress without chunk-in */
+ else if ( chunk_flags==HDF_NONE && comp_type>COMP_CODE_NONE)  
+ {
+ if ( nelms*eltsz<options->threshold )
+ {
+  /* reset to the original values . we don't want to uncompress if it was */
+    comp_type=COMP_CODE_NONE;
+  if (options->verbose) {
+   printf("Warning: object size smaller than %d bytes. Not compressing <%s>\n",
+    options->threshold,path);
+  } 
+  } else  {
+
+  /* setup compression factors */
+  switch(comp_type) 
+  {
+  case COMP_CODE_SZIP:
+   if (set_szip (info,szip_mode,&c_info)==FAIL)
+   {
+    comp_type=COMP_CODE_NONE;
+   }
+   break;
+  case COMP_CODE_RLE:         
+   break;
+  case COMP_CODE_SKPHUFF:     
+   c_info.skphuff.skp_size = info;
+   break;
+  case COMP_CODE_DEFLATE:
+   c_info.deflate.level = info;
+   break;
+  case COMP_CODE_NBIT:
+   comp_type = COMP_CODE_NONE;  /* not supported in this version */
+   break;
+  default:
+   printf( "Error: Unrecognized compression code %d\n", comp_type);
+  }
+
+  if (SDsetcompress (sds_out, comp_type, &c_info)==FAIL)
+  {
+   printf( "Error: Failed to set compression for <%s>\n", path);
+   ret=-1;
+   goto out;
+  }
+  }
+ }
+
+
+/*-------------------------------------------------------------------------
+ * check if the input SDS is empty. if so , do not read its data and write to new one
+ *-------------------------------------------------------------------------
+ */ 
+ if (SDcheckempty( sds_id, &empty_sds ) == FAIL) {
+  printf( "Failed to check empty SDS <%s>\n", path);
+  ret=-1;
+  goto out;
+ }
+/*-------------------------------------------------------------------------
+ * read sds and write new one
+ *-------------------------------------------------------------------------
+ */
+ if (empty_sds==0 )
+ {
+  /* alloc */
+  if ((buf = (VOIDP) HDmalloc(nelms * eltsz)) == NULL) {
+   printf( "Failed to allocate %d elements of size %d\n", nelms, eltsz);
+   ret=-1;
+   goto out;
+  }
+  
+  /* read data */
+  if (SDreaddata (sds_id, start, NULL, edges, buf) == FAIL) {
+   printf( "Could not read SDS <%s>\n", path);
+   ret=-1;
+   goto out;
+  }
+  
+  /* write the data */
+  if (SDwritedata(sds_out, start, NULL, edges, buf) == FAIL) {
+   printf( "Failed to write to new SDS <%s>\n", path);
+   ret=-1;
+   goto out;
+  }
+ } /* empty_sds */
+
+/*-------------------------------------------------------------------------
+ * copy attributes
+ *-------------------------------------------------------------------------
+ */ 
+ 
+ if( copy_sds_attrs(sds_id,sds_out,nattrs,options)==FAIL) {
+  ret=-1;
+  goto out;
+ }
+ 
+/*-------------------------------------------------------------------------
+ * copy dimension scales
+ *-------------------------------------------------------------------------
+ */ 
+ 
+ /* loop through each dimension up to rank of SDS */
+ for (i = 0; i < rank; i++) 
+ {
+  /* get dimension handle for input dimension */
+  if ((dim_id = SDgetdimid(sds_id, i)) == FAIL) {
+   printf( "Failed to get dimension %d of SDS <%s>\n", i, path);
+   ret=-1;
+   goto out;
+  }
+  /* get dimension handle for output dimension */
+  if ((dim_out = SDgetdimid(sds_out, i)) == FAIL) {
+   printf( "Failed to get dim_id for dimension %d of SDS <%s>\n", i, path);
+   ret=-1;
+   goto out;
+  }
+  /* get dimension information for input dimension */
+  if (SDdiminfo(dim_id, dim_name, &dim_size, &dtype, &nattrs) == FAIL) {
+   printf( "Failed to get information for dimension %d of SDS <%s>\n", i, path);
+   ret=-1;
+   goto out;
+  }
+  /* set output dimension name */
+  if (SDsetdimname(dim_out, dim_name) == FAIL) {
+   printf( "Failed to set dimension name %d of SDS <%s>\n", i, path);
+   ret=-1;
+   goto out;
+  }
+  /* copy attributes */
+  if (nattrs && copy_sds_attrs(dim_id, dim_out, nattrs, options) == FAIL) {
+   printf( "Failed to copy attributes for dimension %d of of SDS <%s>\n", i, path);
+   ret=-1;
+   goto out;
+  }
+  /* copy scale information over */
+  if (dtype != 0) 
+  {
+   intn okdim;
+
+   /* compute the number of the bytes for each value. */
+   numtype = dtype & DFNT_MASK;
+   eltsz = DFKNTsize(numtype | DFNT_NATIVE);
+
+   if ((dim_buf = (VOIDP) HDmalloc(dim_size * eltsz)) == NULL) {
+    printf( "Failed to alloc %d for dimension scale\n", dim_size);
+    ret=-1;
+    goto out;
+   }
+   if ((okdim=SDgetdimscale(dim_id, dim_buf)) == FAIL) {
+    printf( "Warning: Failed to get scale information for %s\n", dim_name);
+    /* SDgetdimscale incorrectly returns FAIL when
+       the associated SDS has the same name as the dimension.
+       we avoid returning FAIL, allowing for the rest of the file
+       to be processed */
+   }
+   if (okdim!=FAIL && SDsetdimscale(dim_out, dim_size, dtype, dim_buf) == FAIL) {
+    printf( "Failed to set scale information for %s\n", dim_name);
+    ret=-1;
+    goto out;
+   }
+   free(dim_buf);
+  }
+ }
+
+ /* obtain the reference number of the new SDS using its identifier */
+ if ((sds_ref = SDidtoref (sds_out)) == FAIL) {
+  printf( "Failed to get new SDS reference in <%s>\n", path);
+  ret=-1;
+  goto out;
+ }
+
+/*-------------------------------------------------------------------------
+ * add SDS to group
+ *-------------------------------------------------------------------------
+ */ 
+ 
+ /* add it to group, if present */
+ if (vgroup_id_out_par) 
+ {
+  /* add the SDS to the vgroup. the tag DFTAG_NDG is used */
+  if (Vaddtagref (vgroup_id_out_par, TAG_GRP_DSET, sds_ref)==FAIL) {
+   printf( "Failed to add new SDS to group <%s>\n", path);
+   ret=-1;
+   goto out;
+  }
+ }
+
+/*-------------------------------------------------------------------------
+ * copy ANs
+ *-------------------------------------------------------------------------
+ */ 
+ 
+ if (copy_an(infile_id,outfile_id,
+  ref,tag,sds_ref,tag, 
+  path,options)<0) {
+  ret=-1;
+  goto out;
+ }
+
+out:
+ /* terminate access to the SDSs */
+ if (SDendaccess(sds_id)== FAIL )
+  printf( "Failed to close SDS <%s>\n", path);
+ if (sds_out!=FAIL) {
+  if (SDendaccess (sds_out)== FAIL )
+   printf( "Failed to close SDS <%s>\n", path);
+ }
+   
+ if (path)
+  free(path);
+ if (buf)
+  free(buf);
+
+ return ret;
+ 
+}
+
+
+/*-------------------------------------------------------------------------
+ * Function: copy_sds_attrs
+ *
+ * Purpose: copy SD attributes from input file to output file 
+ *   used for global, dataset and dimension attributes
+ *
+ * Return: 1, for success, -1 for error 
+ *
+ * Programmer: Pedro Vicente, pvn at ncsa.uiuc.edu
+ *
+ * Date: July 30, 2003
+ *
+ *-------------------------------------------------------------------------
+ */
+
+int copy_sds_attrs(int32 id_in,
+                   int32 id_out,
+                   int32 nattrs,          
+                   options_t *options)
+{
+ int32 dtype,                 /* SDS data type */
+       numtype,               /* number type */
+       eltsz,                 /* element size */
+       nelms;                 /* number of elements */
+ char  attr_name[MAX_NC_NAME];
+ VOIDP attr_buf=NULL;
+ int   i;
+
+ /* loop through attributes in input SDS */
+ for (i = 0; i < nattrs; i++) 
+ {
+  if (SDattrinfo (id_in, i, attr_name, &dtype, &nelms) == FAIL) {
+   printf( "Cannot get information for attribute number %d\n", i);
+   return-1;
+  }
+  /* compute the number of the bytes for each value. */
+  numtype = dtype & DFNT_MASK;
+  eltsz   = DFKNTsize(numtype | DFNT_NATIVE);
+  if ((attr_buf = (VOIDP) HDmalloc(nelms * eltsz)) == NULL) {
+   printf( "Error allocating %d values of size %d for attribute %s",
+    nelms, numtype, attr_name);
+   return-1;
+  }
+  /* read attributes from input SDS */
+  if (SDreadattr(id_in, i, attr_buf) == FAIL) {
+   printf( "Cannot read attribute %s\n", attr_name);
+   return-1;
+  }
+  /* put attributes into output SDS */
+  if (SDsetattr(id_out, attr_name, dtype, nelms, attr_buf) == FAIL) {
+   printf( "Cannot write attribute %s\n", attr_name);
+   return-1;
+  }
+
+  if (attr_buf)
+   free(attr_buf);
+ }
+
+ return 1;
+}
+

Added: packages/libhdf4/branches/upstream/current/mfhdf/hrepack/hrepack_sds.h
===================================================================
--- packages/libhdf4/branches/upstream/current/mfhdf/hrepack/hrepack_sds.h	                        (rev 0)
+++ packages/libhdf4/branches/upstream/current/mfhdf/hrepack/hrepack_sds.h	2007-05-15 09:53:05 UTC (rev 831)
@@ -0,0 +1,51 @@
+/****************************************************************************
+ * NCSA HDF                                                                 *
+ * Software Development Group                                               *
+ * National Center for Supercomputing Applications                          *
+ * University of Illinois at Urbana-Champaign                               *
+ * 605 E. Springfield, Champaign IL 61820                                   *
+ *                                                                          *
+ * For conditions of distribution and use, see the accompanying             *
+ * hdf/COPYING file.                                                        *
+ *                                                                          *
+ ****************************************************************************/
+
+
+#ifndef REPACK_SDS_H_
+#define REPACK_SDS_H_
+
+#include "hrepack.h"
+#include "hrepack_lsttable.h"
+
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+
+int  copy_sds(int32 sd_in,
+              int32 sd_out,
+              int32 tag,
+              int32 ref,
+              int32 vgroup_id_out_par,
+              char*group_name,
+              options_t *options,
+              table_t *table,
+              int32 infile_id,
+              int32 outfile_id);
+
+
+
+int copy_sds_attrs(int32 sds_id,
+                   int32 sds_out,
+                   int32 nattrs,          
+                   options_t *options);
+
+
+
+#ifdef __cplusplus
+}
+#endif
+
+
+#endif  /* REPACK_SDS_H_ */

Added: packages/libhdf4/branches/upstream/current/mfhdf/hrepack/hrepack_sdutil.c
===================================================================
--- packages/libhdf4/branches/upstream/current/mfhdf/hrepack/hrepack_sdutil.c	                        (rev 0)
+++ packages/libhdf4/branches/upstream/current/mfhdf/hrepack/hrepack_sdutil.c	2007-05-15 09:53:05 UTC (rev 831)
@@ -0,0 +1,477 @@
+/****************************************************************************
+ * NCSA HDF                                                                 *
+ * Software Development Group                                               *
+ * National Center for Supercomputing Applications                          *
+ * University of Illinois at Urbana-Champaign                               *
+ * 605 E. Springfield, Champaign IL 61820                                   *
+ *                                                                          *
+ * For conditions of distribution and use, see the accompanying             *
+ * hdf/COPYING file.                                                        *
+ *                                                                          *
+ ****************************************************************************/
+
+
+
+#include <assert.h>
+#include "hdf.h"
+#include "mfhdf.h"
+#ifdef H4_HAVE_LIBSZ
+#include "szlib.h"
+#endif
+
+
+#include "hrepack_sdutil.h"
+#include "hrepack_parse.h"
+#include "hrepack_opttable.h"
+
+int check_szip_params( int bits_per_pixel, 
+                       int pixels_per_block, 
+                       int pixels_per_scanline, 
+                       long image_pixels);
+
+
+/*-------------------------------------------------------------------------
+ * Function: options_get_info
+ *
+ * Purpose: get COMP and CHUNK information from options
+ *
+ * Return: 0 if no information for this PATH, 1 otherwise
+ *
+ * Programmer: Pedro Vicente, pvn at ncsa.uiuc.edu
+ *
+ * Date: July 28, 2003
+ *
+ *-------------------------------------------------------------------------
+ */
+
+
+int  options_get_info(options_t      *options,     /* global options */
+                      int32          *chunk_flags, /* chunk flags OUT */
+                      HDF_CHUNK_DEF  *chunk_def,   /* chunk definition OUT */
+                      int            *info,        /* compression information OUT */
+                      int            *szip_mode,   /* compression information OUT */
+                      comp_coder_t   *comp_type,   /* compression type OUT  */
+                      int            rank,         /* rank of object IN */
+                      char           *path,        /* path of object IN */
+                      int            ncomps,       /* number of GR image planes (for SZIP), IN */
+                      int32          *dimsizes,    /* dimensions (for SZIP), IN */
+                      int32          dtype         /* numeric type (for SZIP), IN */
+                      )
+{
+
+ pack_info_t *obj=NULL; /* check if we have information for this object */
+ int         i;
+ comp_info   c_info; /* for SZIP default values */
+ 
+/*-------------------------------------------------------------------------
+ * CASE 1: chunk==ALL comp==SELECTED 
+ *-------------------------------------------------------------------------
+ */
+ 
+ if (options->all_chunk==1 && options->all_comp==0)
+ {
+  /* NONE option */
+  if (options->chunk_g.rank==-2)
+  {
+   chunk_flags = HDF_NONE;
+  }
+  
+  /*check if the input rank is correct (warn this one cannot be chunked) */
+  else if (options->chunk_g.rank!=rank)
+  {
+   if ( options->verbose ) 
+    printf("Warning: chunk rank does not apply to <%s>\n",path);
+  }
+  else
+  {
+   *chunk_flags = HDF_CHUNK;
+   for (i = 0; i < rank; i++) 
+    chunk_def->chunk_lengths[i] = options->chunk_g.chunk_lengths[i];
+  }
+  
+  obj = options_get_object(path,options->op_tbl);
+  
+  if (obj!=NULL )
+  {
+   
+   /* 0 is the NONE option */
+   *comp_type   = obj->comp.type;
+   *info        = obj->comp.info;
+   *szip_mode   = obj->comp.szip_mode;
+   
+   /* chunk and compress */
+   if (*chunk_flags == HDF_CHUNK && *comp_type>0 )
+   {
+    /* assign the object CHUNK information   */
+    *chunk_flags              = HDF_CHUNK | HDF_COMP;
+    chunk_def->comp.comp_type = obj->comp.type;
+    switch (obj->comp.type)
+    {
+    case COMP_CODE_NONE:
+     break;
+     
+    case COMP_CODE_SZIP:
+     if (set_szip (obj->comp.info,obj->comp.szip_mode,&c_info)==FAIL)
+     {
+      return -1;
+     }
+     chunk_def->comp.cinfo = c_info;
+ 
+     break;
+    case COMP_CODE_RLE:
+     break;
+    case COMP_CODE_SKPHUFF:
+     chunk_def->comp.cinfo.skphuff.skp_size = obj->comp.info;
+     break;
+    case COMP_CODE_DEFLATE:
+     chunk_def->comp.cinfo.deflate.level    = obj->comp.info;
+     break;
+    case COMP_CODE_JPEG:
+     chunk_def->comp.cinfo.jpeg.quality        = obj->comp.info;
+     chunk_def->comp.cinfo.jpeg.force_baseline = 1;
+     break;
+    default:
+      printf("Error: Unrecognized compression code in %d <%s>\n",obj->comp.type,path);
+     break;
+    }; /*switch */
+    for (i = 0; i < rank; i++) 
+    {
+     /* To use chunking with RLE, Skipping Huffman, and GZIP compression */
+     chunk_def->comp.chunk_lengths[i] = options->chunk_g.chunk_lengths[i];
+    }
+   } /* chunk_flags */
+  } /* obj */
+ }
+ 
+/*-------------------------------------------------------------------------
+ * CASE 2: chunk==SELECTED comp==SELECTED 
+ *-------------------------------------------------------------------------
+ */
+ else if (options->all_chunk==0 && options->all_comp==0)
+ {
+  obj = options_get_object(path,options->op_tbl);
+  
+  if (obj!=NULL)
+  {
+   /* NONE option */
+   if (obj->chunk.rank==-2)
+   {
+    *chunk_flags = HDF_NONE;
+   }
+   /* check if we have CHUNK information inserted for this one  */
+   else if (obj->chunk.rank>0)
+   {
+    /*check if the input rank is correct (just here, better later than never) */
+    if (obj->chunk.rank!=rank)
+    {
+     printf("Error: chunk rank does not match for <%s>\n",path);
+     exit(1);
+    }
+    *chunk_flags = HDF_CHUNK;
+    for (i = 0; i < rank; i++) 
+     chunk_def->chunk_lengths[i] = obj->chunk.chunk_lengths[i];
+    
+   }
+   /* check if we have COMP information; 0 is the NONE option */
+   if (obj->comp.type>=0)
+   {
+    *comp_type   = obj->comp.type;
+    *info        = obj->comp.info;
+    *szip_mode   = obj->comp.szip_mode;
+    /* check if we have also CHUNK info  */
+    if (obj->chunk.rank>0)
+    {
+     *chunk_flags              = HDF_CHUNK | HDF_COMP;
+     chunk_def->comp.comp_type = *comp_type;
+     switch (*comp_type)
+     {
+     case COMP_CODE_NONE:
+      break;
+
+     case COMP_CODE_SZIP:
+      if (set_szip (obj->comp.info,obj->comp.szip_mode,&c_info)==FAIL)
+      {
+       return -1;
+      }
+      chunk_def->comp.cinfo = c_info;
+      
+      break;
+     case COMP_CODE_RLE:
+      break;
+     case COMP_CODE_SKPHUFF:
+      chunk_def->comp.cinfo.skphuff.skp_size = obj->comp.info;
+      break;
+     case COMP_CODE_DEFLATE:
+      chunk_def->comp.cinfo.deflate.level    = obj->comp.info;
+      break; 
+     case COMP_CODE_JPEG:
+      chunk_def->comp.cinfo.jpeg.quality        = obj->comp.info;
+      chunk_def->comp.cinfo.jpeg.force_baseline = 1;
+     break;
+     default:
+      printf("Error: Unrecognized compression code in %d <%s>\n",*comp_type,path);
+     break;
+     };
+    }
+   } /* comp.type */
+  } /* obj */
+ } /* else if */
+ 
+ /*-------------------------------------------------------------------------
+  * CASE 3: chunk==SELECTED comp==ALL 
+  *-------------------------------------------------------------------------
+  */
+ else if (options->all_chunk==0 && options->all_comp==1)
+ {
+  obj = options_get_object(path,options->op_tbl);
+  
+  if (obj!=NULL)
+  {
+   
+   /* NONE option */
+   if (obj->chunk.rank==-2)
+   {
+    *chunk_flags = HDF_NONE;
+   }
+   
+   /* check if we have CHUNK information inserted for this one  */
+   else if (obj->chunk.rank>0)
+   {
+    /*check if the input rank is correct (just here, better later than never) */
+    if (obj->chunk.rank!=rank)
+    {
+     printf("Error: chunk rank does not match for <%s>\n",path);
+     exit(1);
+    }
+    *chunk_flags = HDF_CHUNK;
+    for (i = 0; i < rank; i++) 
+     chunk_def->chunk_lengths[i] = obj->chunk.chunk_lengths[i];
+   }
+  } /* obj */
+  
+  /* we must have COMP information */
+  
+  *comp_type   = options->comp_g.type;
+  *info        = options->comp_g.info;
+  *szip_mode   = options->comp_g.szip_mode;
+  /* check if we have also CHUNK information  */
+  if ( (*chunk_flags==HDF_CHUNK) || (*chunk_flags==(HDF_CHUNK|HDF_COMP)))
+  {
+   *chunk_flags              = HDF_CHUNK | HDF_COMP;
+   chunk_def->comp.comp_type = *comp_type;
+   switch (*comp_type)
+   {
+   case COMP_CODE_NONE:
+    break;
+    
+   case COMP_CODE_SZIP:
+    if (set_szip (options->comp_g.info,options->comp_g.szip_mode,&c_info)==FAIL)
+    {
+     return -1;
+    }
+    chunk_def->comp.cinfo = c_info;
+    
+   case COMP_CODE_RLE:
+    break;
+   case COMP_CODE_SKPHUFF:
+    chunk_def->comp.cinfo.skphuff.skp_size = *info;
+    break;
+   case COMP_CODE_DEFLATE:
+    chunk_def->comp.cinfo.deflate.level    = *info;
+    break;
+   case COMP_CODE_JPEG:
+    chunk_def->comp.cinfo.jpeg.quality        = *info;;
+    chunk_def->comp.cinfo.jpeg.force_baseline = 1;
+    break;
+   default:
+    printf("Error: Unrecognized compression code in %d <%s>\n",*comp_type,path);
+    break;
+   };
+  }
+ } /* else if */
+ 
+ /*-------------------------------------------------------------------------
+  * CASE 4: chunk==ALL comp==ALL 
+  *-------------------------------------------------------------------------
+  */
+ else if (options->all_chunk==1 && options->all_comp==1)
+ {
+  /* NONE option */
+  if (options->chunk_g.rank==-2)
+  {
+   *chunk_flags = HDF_NONE;
+  }
+  
+  /*check if this object rank is the same as input (warn this one cannot be chunked) */
+  else if (options->chunk_g.rank!=rank)
+  {
+   if ( options->verbose ) 
+    printf("Warning: chunk rank does not apply to <%s>\n",path);
+  }
+  else
+  {
+   *chunk_flags = HDF_CHUNK;
+   for (i = 0; i < rank; i++) 
+    chunk_def->chunk_lengths[i] = options->chunk_g.chunk_lengths[i];
+  }
+  
+  /* we must have COMP information */
+  *comp_type   = options->comp_g.type;
+  *info        = options->comp_g.info;
+  *szip_mode   = options->comp_g.szip_mode;
+  /* check if we can aplly CHUNK */
+  if (options->chunk_g.rank==rank)
+  {
+   *chunk_flags              = HDF_CHUNK | HDF_COMP;
+   chunk_def->comp.comp_type = *comp_type;
+   switch (*comp_type)
+   {
+   case COMP_CODE_NONE:
+    break;
+    
+   case COMP_CODE_SZIP:
+    if (set_szip (options->comp_g.info,options->comp_g.szip_mode,&c_info)==FAIL)
+    {
+     return -1;
+    }
+    chunk_def->comp.cinfo = c_info;
+
+   case COMP_CODE_RLE:
+    break;
+   case COMP_CODE_SKPHUFF:
+    chunk_def->comp.cinfo.skphuff.skp_size = *info;
+    break;
+   case COMP_CODE_DEFLATE:
+    chunk_def->comp.cinfo.deflate.level    = *info;
+    break;
+   case COMP_CODE_JPEG:
+    chunk_def->comp.cinfo.jpeg.quality        = *info;;
+    chunk_def->comp.cinfo.jpeg.force_baseline = 1;
+    break;
+   default:
+    printf("Error: Unrecognized compression code in %d <%s>\n",*comp_type,path);
+    break;
+   };
+  }
+ } /* else if */
+
+ return (obj==NULL) ? 0 : 1;
+ 
+}
+
+
+
+/*-------------------------------------------------------------------------
+ * Function: set_szip
+ *
+ * Purpose: utility to set SZIP parameters
+ *
+ * SZIP compresses data block by block, with a user-tunable block size. 
+ * This block size is passed in the parameter pixels_per_block and must be even, 
+ * with typical values being 8, 10, 16, and 32. The more pixel values vary, 
+ * the smaller this number should be. For optimal performance, the number of 
+ * pixels per scan line (i.e., the size of the fastest-changing dimension in the chunk) 
+ * should be an even multiple of the number of pixels per block. 
+ *
+ * Return: 0 for OK, -1 otherwise
+ *
+ * Programmer: Pedro Vicente, pvn at ncsa.uiuc.edu
+ *
+ * Date: August 11, 2003
+ *
+ *-------------------------------------------------------------------------
+ */
+
+int set_szip( int   pixels_per_block, /*in */
+              int   compression_mode, /* in */
+              comp_info *c_info/*out*/)
+{
+ int   ppb=pixels_per_block;
+
+#ifdef H4_HAVE_LIBSZ
+
+ if (SZ_encoder_enabled() == 0) {
+  printf("Warning: SZIP encoder is not enabled\n");
+  return -1;
+ }
+
+ if ( (compression_mode!=NN_MODE) && (compression_mode!=EC_MODE))
+ {
+  printf("SZIP compression mode must be NN_MODE or EC_MODE");
+  return -1;
+ }
+
+ /* 
+  pixels_per_block must be an even number, and <= pixels_per_scanline 
+  and <= SZ_MAX_PIXELS_PER_BLOCK
+  */
+
+ if (pixels_per_block & 1)
+ {
+  printf("Pixels per block must be even.\n");
+  return -1;
+ }
+ if (ppb < 2 || ppb > 32) {
+  printf("Pixels per block must be 2-32.\n");
+  return -1;
+ }
+ c_info->szip.pixels_per_block = ppb;
+ 
+/* set according to input value */
+ c_info->szip.options_mask = SZ_EC_OPTION_MASK;
+ if (compression_mode == EC_MODE) {
+     c_info->szip.options_mask = SZ_EC_OPTION_MASK;
+ } else if (compression_mode == NN_MODE) {
+     c_info->szip.options_mask = SZ_NN_OPTION_MASK;
+ }
+ c_info->szip.options_mask |= SZ_RAW_OPTION_MASK;
+
+ return 0;
+#else
+  printf("Warning: SZIP compression is not available\n");
+  return -1;
+#endif
+
+}
+
+/*-------------------------------------------------------------------------
+ * Function: cache
+ *
+ * Purpose: Checks chunk size
+ *
+ *-------------------------------------------------------------------------
+ */
+
+int cache(
+HDF_CHUNK_DEF    chunk_def,
+int32 eltsz,
+int32 rank,
+int32 *dimsize)
+{
+int32 targetbytes;
+int32 chunkrow;
+int32 chunkcnt;
+int32 chunksizes[32];
+int i;
+int32 cntr;
+
+ for (i = 0; i < rank; i++) {
+  chunkcnt = 1;
+  targetbytes = dimsize[i] * eltsz;
+  chunkrow = eltsz * chunk_def.chunk_lengths[i];
+  cntr = chunkrow;
+  while( cntr < targetbytes) {
+   cntr += chunkrow;
+   chunkcnt++;
+  }
+  chunksizes[i] = chunkcnt;
+ }
+ chunkcnt = 1;
+ for (i = 0; i < rank; i++) {
+  chunkcnt *= chunksizes[i];
+ }
+ printf("total chunks is %d\n",chunkcnt);
+ return 0;
+}
+
+

Added: packages/libhdf4/branches/upstream/current/mfhdf/hrepack/hrepack_sdutil.h
===================================================================
--- packages/libhdf4/branches/upstream/current/mfhdf/hrepack/hrepack_sdutil.h	                        (rev 0)
+++ packages/libhdf4/branches/upstream/current/mfhdf/hrepack/hrepack_sdutil.h	2007-05-15 09:53:05 UTC (rev 831)
@@ -0,0 +1,48 @@
+/****************************************************************************
+ * NCSA HDF                                                                 *
+ * Software Development Group                                               *
+ * National Center for Supercomputing Applications                          *
+ * University of Illinois at Urbana-Champaign                               *
+ * 605 E. Springfield, Champaign IL 61820                                   *
+ *                                                                          *
+ * For conditions of distribution and use, see the accompanying             *
+ * hdf/COPYING file.                                                        *
+ *                                                                          *
+ ****************************************************************************/
+
+
+#ifndef REPACK_SDUTIL_H_
+#define REPACK_SDUTIL_H_
+
+#include "hrepack.h"
+#include "hrepack_parse.h"
+
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+int  options_get_info(options_t      *options,     /* global options */
+                      int32          *chunk_flags, /* chunk flags OUT */
+                      HDF_CHUNK_DEF  *chunk_def,   /* chunk definition OUT */
+                      int            *info,        /* compression info OUT */
+                      int            *szip_mode,   /* compression information OUT */
+                      comp_coder_t   *comp_type,   /* compression type OUT  */
+                      int            rank,         /* rank of object IN */
+                      char           *path,        /* path of object IN */
+                      int            ncomps,       /* number of GR image planes (for SZIP), IN */
+                      int32          *dimsizes,    /* dimensions (for SZIP), IN */
+                      int32          dtype         /* numeric type (for SZIP), IN */
+                      );
+
+int set_szip( int   pixels_per_block, /*in */
+             int   compression_mode, /* in */
+             comp_info *c_info/*out*/);
+
+
+#ifdef __cplusplus
+}
+#endif
+
+
+#endif  /* REPACK_SDUTIL_H_ */

Added: packages/libhdf4/branches/upstream/current/mfhdf/hrepack/hrepack_utils.c
===================================================================
--- packages/libhdf4/branches/upstream/current/mfhdf/hrepack/hrepack_utils.c	                        (rev 0)
+++ packages/libhdf4/branches/upstream/current/mfhdf/hrepack/hrepack_utils.c	2007-05-15 09:53:05 UTC (rev 831)
@@ -0,0 +1,98 @@
+/****************************************************************************
+ * NCSA HDF                                                                 *
+ * Software Development Group                                               *
+ * National Center for Supercomputing Applications                          *
+ * University of Illinois at Urbana-Champaign                               *
+ * 605 E. Springfield, Champaign IL 61820                                   *
+ *                                                                          *
+ * For conditions of distribution and use, see the accompanying             *
+ * hdf/COPYING file.                                                        *
+ *                                                                          *
+ ****************************************************************************/
+
+
+
+#include "hdf.h"
+#include "mfhdf.h"
+#include "hrepack_utils.h"
+
+
+/*-------------------------------------------------------------------------
+ * Function: is_reserved
+ *
+ * Purpose: check for reserved Vgroup/Vdata class/names
+ *
+ * Return: 1 if reserved, 0 if not
+ *
+ * Programmer: Pedro Vicente, pvn at ncsa.uiuc.edu
+ *
+ * Date: August 22, 2003
+ *
+ *-------------------------------------------------------------------------
+ */
+
+int is_reserved(char*vgroup_class)
+{
+ int ret=0;
+ 
+ /* ignore reserved HDF groups/vdatas */
+ if(vgroup_class != NULL) {
+  if( (strcmp(vgroup_class,_HDF_ATTRIBUTE)==0) ||
+   (strcmp(vgroup_class,_HDF_VARIABLE) ==0) || 
+   (strcmp(vgroup_class,_HDF_DIMENSION)==0) ||
+   (strcmp(vgroup_class,_HDF_UDIMENSION)==0) ||
+   (strcmp(vgroup_class,DIM_VALS)==0) ||
+   (strcmp(vgroup_class,DIM_VALS01)==0) ||
+   (strcmp(vgroup_class,_HDF_CDF)==0) ||
+   (strcmp(vgroup_class,GR_NAME)==0) ||
+   (strcmp(vgroup_class,RI_NAME)==0) || 
+   (strcmp(vgroup_class,RIGATTRNAME)==0) ||
+   (strcmp(vgroup_class,RIGATTRCLASS)==0) ){
+   ret=1;
+  }
+
+  /* class and name(partial) for chunk table i.e. Vdata */
+  if( (strncmp(vgroup_class,"_HDF_CHK_TBL_",13)==0)){
+   ret=1;
+  }
+
+ }
+ 
+ return ret;
+}
+
+
+
+/*-------------------------------------------------------------------------
+ * Function: get_path
+ *
+ * Purpose: return absolute path for an object
+ *
+ * Return: path
+ *
+ * Programmer: Pedro Vicente, pvn at ncsa.uiuc.edu
+ *
+ * Date: July 11, 2003
+ *
+ *-------------------------------------------------------------------------
+ */
+
+char *get_path(char*path_name, char*obj_name) 
+{
+ char *path=NULL;
+ /* initialize path */
+ if (path_name!=NULL) 
+ {
+  path = (char*) malloc(strlen(path_name) + strlen(obj_name) + 2);
+  strcpy( path, path_name );
+  strcat( path, "/" );
+  strcat( path, obj_name ); 
+ }
+ else
+ {
+  path = (char*) malloc(strlen(obj_name) + 1);
+  strcpy( path, obj_name ); 
+ }
+ return path;
+}
+

Added: packages/libhdf4/branches/upstream/current/mfhdf/hrepack/hrepack_utils.h
===================================================================
--- packages/libhdf4/branches/upstream/current/mfhdf/hrepack/hrepack_utils.h	                        (rev 0)
+++ packages/libhdf4/branches/upstream/current/mfhdf/hrepack/hrepack_utils.h	2007-05-15 09:53:05 UTC (rev 831)
@@ -0,0 +1,33 @@
+/****************************************************************************
+ * NCSA HDF                                                                 *
+ * Software Development Group                                               *
+ * National Center for Supercomputing Applications                          *
+ * University of Illinois at Urbana-Champaign                               *
+ * 605 E. Springfield, Champaign IL 61820                                   *
+ *                                                                          *
+ * For conditions of distribution and use, see the accompanying             *
+ * hdf/COPYING file.                                                        *
+ *                                                                          *
+ ****************************************************************************/
+
+
+#ifndef REPACK_UTILS_H_
+#define REPACK_UTILS_H_
+
+
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+
+int is_reserved(char*vgroup_class);
+char *get_path(char*path_name, char*obj_name);
+
+
+#ifdef __cplusplus
+}
+#endif
+
+
+#endif  /* REPACK_UTILS_H_ */

Added: packages/libhdf4/branches/upstream/current/mfhdf/hrepack/hrepack_vg.c
===================================================================
--- packages/libhdf4/branches/upstream/current/mfhdf/hrepack/hrepack_vg.c	                        (rev 0)
+++ packages/libhdf4/branches/upstream/current/mfhdf/hrepack/hrepack_vg.c	2007-05-15 09:53:05 UTC (rev 831)
@@ -0,0 +1,218 @@
+/****************************************************************************
+ * NCSA HDF                                                                 *
+ * Software Development Group                                               *
+ * National Center for Supercomputing Applications                          *
+ * University of Illinois at Urbana-Champaign                               *
+ * 605 E. Springfield, Champaign IL 61820                                   *
+ *                                                                          *
+ * For conditions of distribution and use, see the accompanying             *
+ * hdf/COPYING file.                                                        *
+ *                                                                          *
+ ****************************************************************************/
+
+
+
+#include <assert.h>
+#include "hdf.h"
+#include "mfhdf.h"
+
+#include "hrepack_vg.h"
+#include "hrepack_utils.h"
+#include "hrepack_an.h"
+
+
+/*-------------------------------------------------------------------------
+ * Function: copy_vgroup_attrs
+ *
+ * Purpose: copy VG attributes
+ *
+ * Return: 1 
+ *
+ *-------------------------------------------------------------------------
+ */
+
+int copy_vgroup_attrs(int32 vg_in, int32 vg_out, char *path,options_t *options) 
+{
+ int    n_attrs;
+ int32  data_type, size,  n_values;
+ char   attr_name[MAX_NC_NAME];
+ int    i;
+ char   *buf=NULL;
+
+ if ( options->trip==0 ) 
+ {
+  return 1;
+ }
+
+ /* Get the number of attributes attached to this vgroup.  */
+ if((n_attrs = Vnattrs (vg_in))==FAIL) {
+  printf( "Failed to get attributes for <%s>\n", path);
+  return-1;
+ }
+ 
+ for (i = 0; i < n_attrs; i++) 
+ {
+  if((Vattrinfo (vg_in, i, attr_name, &data_type, &n_values, &size))==FAIL) {
+   printf( "Failed to get attribute %d of <%s>\n", i, path);
+   continue;
+  }
+  if ((buf = (char *)malloc(size * n_values))==NULL ) {
+   printf( "Failed to get memory for attribute %d of <%s>\n", i, path);
+   continue;
+  }
+  if((Vgetattr (vg_in, i, buf))==FAIL){
+   printf( "Failed to get attribute %d of <%s>\n", i, path);
+   if (buf) free(buf);
+   continue;
+  }
+  if((Vsetattr(vg_out, attr_name, data_type, n_values, buf))==FAIL){
+   printf( "Failed to set attribute %d of <%s>\n", i, path);
+  }
+  if (buf) free(buf);
+ }
+ return 1;
+}
+
+
+
+
+/*-------------------------------------------------------------------------
+ * Function: copy_vg
+ *
+ * Purpose: copy a VG from input file to output file
+ *
+ * Return: void
+ *
+ * Programmer: Pedro Vicente, pvn at ncsa.uiuc.edu
+ *
+ * Date: July 11, 2003
+ *
+ *-------------------------------------------------------------------------
+ */
+
+int  copy_vg(char* infname,
+             char* outfname,
+             int32 infile_id,
+             int32 outfile_id,
+             int32 sd_id,             /* SD interface identifier */
+             int32 sd_out,            /* SD interface identifier */
+             int32 gr_id,             /* GR interface identifier */
+             int32 gr_out,            /* GR interface identifier */
+             int32 tag,               /* tag of input VS */
+             int32 ref,               /* ref of input VS */
+             int32 vgroup_id_out_par, /* output parent group ID */
+             char*path_name,          /* absolute path for input group name */
+             options_t *options,
+             table_t *table)
+{
+ int32 vgroup_id,             /* vg identifier */
+       vgroup_id_out,         /* vg identifier */
+       ntagrefs,              /* number of tag/ref pairs in a vgroup */
+       *tags,                 /* buffer to hold the tag numbers of vgroups   */
+       *refs;                 /* buffer to hold the ref numbers of vgroups   */
+ char  vgroup_name [VGNAMELENMAX], vgroup_class[VGNAMELENMAX];
+ char  *path=NULL;
+ 
+/*
+ * attach to the current vgroup then get its
+ * name and class. note: the current vgroup must be detached before
+ * moving to the next.
+ */
+
+ vgroup_id = Vattach (infile_id, ref, "r");
+ if (Vgetname (vgroup_id, vgroup_name)==FAIL){
+  printf( "Could not get group name\n");
+  return FAIL;
+ }
+ if (Vgetclass (vgroup_id, vgroup_class)==FAIL){
+  printf( "Could not get group class\n");
+  return FAIL;
+ }
+ 
+ /* ignore reserved HDF groups/vdatas */
+ if( is_reserved(vgroup_class)){
+  if (Vdetach (vgroup_id)==FAIL){
+   printf( "Could not dettach group\n");
+   return FAIL;
+  }
+  return SUCCESS;
+ }
+ if(vgroup_name != NULL) 
+  if(strcmp(vgroup_name,GR_NAME)==0) {
+   if (Vdetach (vgroup_id)==FAIL){
+    printf( "Could not dettach group\n");
+    return FAIL;
+   }
+   return SUCCESS;
+  }
+  
+ /* initialize path */
+ path=get_path(path_name,vgroup_name);
+ 
+ /* add object to table */
+ table_add(table,tag,ref,path);
+  
+#if defined(HZIP_DEBUG)
+ printf ("\t%s %d\n", path, ref); 
+#endif
+  
+ if ( options->trip==0 ) 
+ {
+  /*we must go to other groups always */
+ }
+ 
+/* 
+ * create the group in the output file.  the vgroup reference number is set
+ * to -1 for creating and the access mode is "w" for writing 
+ */
+ vgroup_id_out = Vattach (outfile_id, -1, "w");
+ if (Vsetname (vgroup_id_out, vgroup_name)==FAIL){
+  printf( "Could not set group name for <%s>\n",path);
+  return FAIL;
+ }
+ if (Vsetclass (vgroup_id_out, vgroup_class)==FAIL){
+  printf( "Could not set group class for <%s>\n",path);
+  return FAIL;
+ }
+ 
+ /* insert the created vgroup into its parent */
+ if (Vinsert (vgroup_id_out_par, vgroup_id_out)==FAIL){
+  printf( "Could not insert group\n");
+  return FAIL;
+ }
+ 
+ /* insert objects for this group */
+ ntagrefs  = Vntagrefs(vgroup_id);
+ if ( ntagrefs > 0 )
+ {
+  tags = (int32 *) malloc(sizeof(int32) * ntagrefs);
+  refs = (int32 *) malloc(sizeof(int32) * ntagrefs);
+  Vgettagrefs(vgroup_id, tags, refs, ntagrefs);
+  /* recurse */
+  if (vgroup_insert(infname,outfname,infile_id,outfile_id,
+   sd_id,sd_out,gr_id,gr_out,
+   vgroup_id_out,
+   path,tags,refs,ntagrefs,table,options)<0) {
+   free (tags);
+   free (refs);
+   return FAIL;
+  }
+  free (tags);
+  free (refs);
+ }
+ if (Vdetach (vgroup_id)==FAIL){
+  printf( "Could not detach group\n");
+  return FAIL;
+ }
+ if (Vdetach (vgroup_id_out)==FAIL){
+  printf( "Could not detach group\n");
+  return FAIL;
+ }
+ 
+ if (path)
+  free(path);
+  
+ return SUCCESS;
+}
+
+

Added: packages/libhdf4/branches/upstream/current/mfhdf/hrepack/hrepack_vg.h
===================================================================
--- packages/libhdf4/branches/upstream/current/mfhdf/hrepack/hrepack_vg.h	                        (rev 0)
+++ packages/libhdf4/branches/upstream/current/mfhdf/hrepack/hrepack_vg.h	2007-05-15 09:53:05 UTC (rev 831)
@@ -0,0 +1,53 @@
+/****************************************************************************
+ * NCSA HDF                                                                 *
+ * Software Development Group                                               *
+ * National Center for Supercomputing Applications                          *
+ * University of Illinois at Urbana-Champaign                               *
+ * 605 E. Springfield, Champaign IL 61820                                   *
+ *                                                                          *
+ * For conditions of distribution and use, see the accompanying             *
+ * hdf/COPYING file.                                                        *
+ *                                                                          *
+ ****************************************************************************/
+
+
+#ifndef REPACK_VG_H_
+#define REPACK_VG_H_
+
+#include "hrepack.h"
+#include "hrepack_lsttable.h"
+
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+
+int copy_vgroup_attrs(int32 vg_in, 
+                      int32 vg_out, 
+                      char *path,
+                      options_t *options);
+
+int vgroup_insert(const char* infname,
+                   const char* outfname,
+                   int32 infile_id,
+                   int32 outfile_id,
+                   int32 sd_id,             /* SD interface identifier */
+                   int32 sd_out,            /* SD interface identifier */
+                   int32 gr_id,             /* GR interface identifier */
+                   int32 gr_out,            /* GR interface identifier */
+                   int32 vgroup_id_out_par, /* output parent group ID */
+                   char*path_name,          /* absolute path for input group name */          
+                   int32* in_tags,          /* tag list for parent group */
+                   int32* in_refs,          /* ref list for parent group */
+                   int npairs,              /* number tag/ref pairs for parent group */
+                   table_t *table,
+                   options_t *options);
+
+
+#ifdef __cplusplus
+}
+#endif
+
+
+#endif  /* REPACK_VG_H_ */

Added: packages/libhdf4/branches/upstream/current/mfhdf/hrepack/hrepack_vs.c
===================================================================
--- packages/libhdf4/branches/upstream/current/mfhdf/hrepack/hrepack_vs.c	                        (rev 0)
+++ packages/libhdf4/branches/upstream/current/mfhdf/hrepack/hrepack_vs.c	2007-05-15 09:53:05 UTC (rev 831)
@@ -0,0 +1,348 @@
+/****************************************************************************
+ * NCSA HDF                                                                 *
+ * Software Development Group                                               *
+ * National Center for Supercomputing Applications                          *
+ * University of Illinois at Urbana-Champaign                               *
+ * 605 E. Springfield, Champaign IL 61820                                   *
+ *                                                                          *
+ * For conditions of distribution and use, see the accompanying             *
+ * hdf/COPYING file.                                                        *
+ *                                                                          *
+ ****************************************************************************/
+
+
+
+#include <assert.h>
+#include "hdf.h"
+#include "mfhdf.h"
+
+#include "hrepack_vs.h"
+#include "hrepack_utils.h"
+#include "hrepack_an.h"
+
+
+/*-------------------------------------------------------------------------
+ * Function: copy_vs
+ *
+ * Purpose: copy a VS from input file to output file
+ *
+ * Return: 0, -1 for error 
+ *
+ * Programmer: Pedro Vicente, pvn at ncsa.uiuc.edu
+ *
+ * Date: July 11, 2003
+ *
+ *-------------------------------------------------------------------------
+ */
+
+int copy_vs( int32 infile_id,
+             int32 outfile_id,
+             int32 tag,               /* tag of input VS */
+             int32 ref,               /* ref of input VS */
+             int32 vgroup_id_out_par, /* output parent group ID */
+             char*path_name,          /* absolute path for input group name */
+             options_t *options,
+             table_t *table,
+             int   is_lone)
+{
+ int32 vdata_id,              /* vdata identifier */
+       vdata_out,             /* vdata identifier */
+       vdata_ref,             /* reference number of the vdata */
+       n_records,             /* number of records */
+       vdata_size, 
+       interlace_mode,
+       field_type, 
+       field_order;
+ int   n_fields, n_attrs;
+ char  vdata_name [VSNAMELENMAX], vdata_class[VSNAMELENMAX];
+ char  fieldname_list[VSFIELDMAX*FIELDNAMELENMAX];
+ char  *path=NULL;
+ char  *field_name;
+ uint8 *buf=NULL;
+ int   i, j, ret=1;
+
+/*-------------------------------------------------------------------------
+ * attach the vdata, gets its name and class
+ *-------------------------------------------------------------------------
+ */ 
+
+ if ((vdata_id  = VSattach (infile_id, ref, "r")) == FAIL ){
+  printf( "Failed to attach vdata ref %d\n", ref);
+  return-1;
+ }
+ if (VSgetname  (vdata_id, vdata_name)==FAIL){
+  printf( "Failed to name for vdata ref %d\n", ref);
+  return-1;
+ }
+ if (VSgetclass (vdata_id, vdata_class)==FAIL){
+  printf( "Failed to name for vdata ref %d\n", ref);
+  return-1;
+ }
+ 
+ /* ignore reserved HDF groups/vdatas; they are lone ones */
+ if( is_lone==1 && vdata_class != NULL) {
+  if( is_reserved(vdata_class)){
+   if (VSdetach (vdata_id)== FAIL )
+    printf( "Failed to detach vdata <%s>\n", path_name);
+   return 0;
+  }
+ }
+ 
+ /* initialize path */
+ path=get_path(path_name,vdata_name);
+ 
+ /* add object to table */
+ table_add(table,tag,ref,path);
+ 
+#if defined(HZIP_DEBUG)
+ printf ("\t%s %d\n", path, ref); 
+#endif
+ 
+ if (options->verbose)
+ {
+  printf(PFORMAT,"","",path);    
+ }
+ 
+ /* check inspection mode */
+ if ( options->trip==0 ) {
+  if (VSdetach (vdata_id)==FAIL)
+   printf( "Failed to detach vdata <%s>\n", path_name);
+  if (path) free(path);
+  return 0;
+ }
+ 
+ 
+/*-------------------------------------------------------------------------
+ * get vdata info
+ *-------------------------------------------------------------------------
+ */ 
+ 
+ if (VSinquire(vdata_id, &n_records, &interlace_mode, fieldname_list, 
+  &vdata_size, vdata_name) == FAIL) {
+  printf( "Failed to get info for vdata ref %d\n", ref);
+  if (path) free(path);
+  return-1;
+ }
+ 
+#if defined( HZIP_DEBUG)
+ printf( 
+  "Transferring vdata %s: class=%s, %d recs, interlace=%d, size=%d\n\tfields='%s'\n",
+  vdata_name, vdata_class, n_records, interlace_mode, vdata_size, 
+  fieldname_list);
+#endif
+ 
+ 
+ /*-------------------------------------------------------------------------
+  * create the VS in the output file.  the vdata reference number is set
+  * to -1 for creating and the access mode is "w" for writing 
+  *-------------------------------------------------------------------------
+  */ 
+ 
+ if ((vdata_out  = VSattach (outfile_id, -1, "w")) == FAIL) {
+  printf( "Failed to create new VS <%s>\n", path);
+  VSdetach (vdata_id);
+  if (path) free(path);
+  return -1;
+ }
+ if (VSsetname (vdata_out, vdata_name)== FAIL) {
+  printf( "Failed to set name for new VS <%s>\n", path);
+  ret=-1;
+  goto out;
+ }
+ if (VSsetclass(vdata_out, vdata_class)== FAIL) {
+  printf( "Failed to set class for new VS <%s>\n", path);
+  ret=-1;
+  goto out;
+ }
+ if (VSsetinterlace(vdata_out, interlace_mode) == FAIL) {
+  printf( "Failed to set interlace mode for output vdata\n");
+  ret=-1;
+  goto out;
+ }
+
+
+/*-------------------------------------------------------------------------
+ * define the fields for vdata_out
+ *-------------------------------------------------------------------------
+ */ 
+ 
+ if ((n_fields = VFnfields(vdata_id)) == FAIL ){
+  printf( "Failed getting fields for VS <%s>\n", path);
+  ret=-1;
+  goto out;
+ }
+ 
+ for (i = 0; i < n_fields; i++) {
+  field_name = VFfieldname(vdata_id, i);
+  field_type = VFfieldtype(vdata_id, i);
+  field_order = VFfieldorder(vdata_id, i);
+  if (VSfdefine(vdata_out, field_name, field_type, field_order) == FAIL) {
+   printf( "Error: cannot define fields for VS <%s>\n", path);
+   ret=-1;
+   goto out;
+  }
+ }
+ 
+ /* Set fields */
+ if (VSsetfields(vdata_out, fieldname_list)==FAIL) {
+  printf( "Error: cannot define fields for VS <%s>\n", path);
+  ret=-1;
+  goto out;
+ }
+
+ 
+/*-------------------------------------------------------------------------
+ * read, write vdata
+ *-------------------------------------------------------------------------
+ */ 
+
+ /* Set fields for reading */
+ if (VSsetfields(vdata_id, fieldname_list)== FAIL) {
+   printf( "Error: cannot define fields for VS <%s>\n", path);
+   ret=-1;
+   goto out;
+  }
+ if (n_records>0)
+ {
+  if ((buf = (uint8 *)malloc( (size_t)(n_records * vdata_size))) == NULL ){
+   printf( "Failed to get memory for new VS <%s>\n", path);
+   ret=-1;
+   goto out;
+  }
+  if (VSread(vdata_id, buf, n_records, interlace_mode) == FAIL) {
+   printf( "Error reading vdata <%s>\n", path);
+   ret=-1;
+   goto out;
+  }
+  if (VSwrite(vdata_out, buf, n_records, interlace_mode) == FAIL) {
+   printf( "Error writing vdata <%s>\n", path);
+   ret=-1;
+   goto out;
+  }
+ }
+ 
+
+/*-------------------------------------------------------------------------
+ * read, write attributes
+ *-------------------------------------------------------------------------
+ */ 
+ 
+ if ((n_attrs = VSfnattrs( vdata_id, -1 )) == FAIL ){
+  printf( "Failed getting attributes for VS <%s>\n", path);
+  ret=-1;
+  goto out;
+ }
+ for (i = 0; i < n_attrs; i++) {
+  copy_vdata_attribute(vdata_id, vdata_out, -1, i);
+ }
+ 
+/*-------------------------------------------------------------------------
+ * read, write field attributes
+ *-------------------------------------------------------------------------
+ */ 
+  
+ for (i = 0; i < n_fields; i++) {
+  if ((n_attrs = VSfnattrs(vdata_id, i)) == FAIL ){
+   printf( "Failed getting fields for VS <%s>\n", path);
+   ret=-1;
+   goto out;
+  }
+  for (j = 0; j < n_attrs; j++) {
+   copy_vdata_attribute(vdata_id, vdata_out, i, j);
+  }
+ }
+  
+/*-------------------------------------------------------------------------
+ * add VS to group, if needed
+ *-------------------------------------------------------------------------
+ */ 
+ if (vgroup_id_out_par) 
+ {
+  /* obtain the reference number of the new VS  */
+  if ((vdata_ref=VSQueryref(vdata_out)) == 0) {
+   printf( "Failed to get new VS reference in <%s>\n", path);
+  }
+  
+  /* add the VS to the vgroup. the INPUT TAG is used */
+  if (Vaddtagref (vgroup_id_out_par, tag, vdata_ref)== FAIL) {
+   printf( "Failed to add new VS to group <%s>\n", path);
+  }
+ }
+
+/*-------------------------------------------------------------------------
+ * copy ANs
+ *-------------------------------------------------------------------------
+ */ 
+
+ if (copy_vs_an(infile_id,outfile_id,vdata_id,vdata_out,path,options)<0) {
+  ret=-1;
+  goto out;
+ }
+ 
+out:
+ /* terminate access to the VSs */
+ if (VSdetach (vdata_id)==FAIL||
+     VSdetach (vdata_out)==FAIL){
+  printf( "Could not detach VG in <%s>\n", path);
+ }
+ 
+ if (path)
+  free(path);
+ if (buf)
+  free(buf);
+ 
+ return ret;
+}
+
+
+/*-------------------------------------------------------------------------
+ * Function: copy_vdata_attribute
+ *
+ * Purpose: copy VS attributes from input file to output file 
+ *
+ * Return: 1, for success, -1 for error 
+ *
+ * Programmer: Pedro Vicente, pvn at ncsa.uiuc.edu
+ *
+ * Date: July 28, 2003
+ *
+ *-------------------------------------------------------------------------
+ */
+
+int copy_vdata_attribute(int32 in, int32 out, int32 findex, intn attrindex)
+{
+ char   attr_name[MAX_NC_NAME];
+ int32  n_values, attr_size, attr_type;
+ VOIDP  *values=NULL;
+
+ /* Get attribute information */
+ VSattrinfo(in, findex, attrindex, attr_name, &attr_type, &n_values, &attr_size);
+
+ /* Allocate space for attribute values */
+ if ((values = (VOIDP)malloc((size_t)(attr_size * n_values))) == NULL) {
+  printf( "Cannot allocate %d values of size %d for attribute %s",
+   n_values, attr_size, attr_name);
+  return-1;
+ }
+
+ /* Read attribute from input object */
+ if (VSgetattr(in, findex, attrindex, values) == FAIL) {
+  printf( "Cannot read attribute %s\n", attr_name);
+  if (values) free(values);
+  return-1;
+ }
+
+ /* Write attribute to output object */
+ if (VSsetattr(out, findex, attr_name, attr_type, n_values, values) == FAIL) {
+  printf( "Cannot write attribute %s\n", attr_name);
+  if (values) free(values);
+  return-1;
+ }
+
+ if (values) free(values);
+
+ return 1;
+}
+
+
+

Added: packages/libhdf4/branches/upstream/current/mfhdf/hrepack/hrepack_vs.h
===================================================================
--- packages/libhdf4/branches/upstream/current/mfhdf/hrepack/hrepack_vs.h	                        (rev 0)
+++ packages/libhdf4/branches/upstream/current/mfhdf/hrepack/hrepack_vs.h	2007-05-15 09:53:05 UTC (rev 831)
@@ -0,0 +1,51 @@
+/****************************************************************************
+ * NCSA HDF                                                                 *
+ * Software Development Group                                               *
+ * National Center for Supercomputing Applications                          *
+ * University of Illinois at Urbana-Champaign                               *
+ * 605 E. Springfield, Champaign IL 61820                                   *
+ *                                                                          *
+ * For conditions of distribution and use, see the accompanying             *
+ * hdf/COPYING file.                                                        *
+ *                                                                          *
+ ****************************************************************************/
+
+
+#ifndef REPACK_VS_H_
+#define REPACK_VS_H_
+
+#include "hrepack.h"
+#include "hrepack_lsttable.h"
+
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+
+int  copy_vdata_attribute(int32 in, int32 out, int32 findex, intn attrindex);
+
+
+int  copy_vs( int32 infile_id,
+              int32 outfile_id,
+              int32 tag,
+              int32 ref,               /* ref of input VS */
+              int32 vgroup_id_out_par, /* output parent group ID */
+              char*path_name,          /* absolute path for input group name */
+              options_t *options,
+              table_t *table,
+              int   is_lone);
+
+int copy_vgroup_attrs(int32 vg_in, 
+                      int32 vg_out, 
+                      char *path,
+                      options_t *options);
+
+
+
+#ifdef __cplusplus
+}
+#endif
+
+
+#endif  /* REPACK_VS_H_ */

Added: packages/libhdf4/branches/upstream/current/mfhdf/hrepack/image24pixel.txt
===================================================================
--- packages/libhdf4/branches/upstream/current/mfhdf/hrepack/image24pixel.txt	                        (rev 0)
+++ packages/libhdf4/branches/upstream/current/mfhdf/hrepack/image24pixel.txt	2007-05-15 09:53:05 UTC (rev 831)
@@ -0,0 +1,101475 @@
+components
+3
+height
+149
+width
+227
+48
+47
+45
+48
+47
+45
+49
+48
+46
+50
+49
+47
+53
+49
+46
+53
+49
+46
+54
+50
+47
+54
+50
+47
+56
+51
+47
+56
+51
+47
+58
+51
+45
+58
+51
+45
+58
+51
+45
+58
+51
+45
+58
+51
+45
+58
+51
+45
+58
+50
+47
+57
+49
+46
+57
+49
+46
+56
+48
+45
+56
+48
+45
+57
+49
+46
+57
+49
+46
+58
+50
+47
+56
+48
+45
+56
+48
+45
+56
+48
+45
+56
+48
+45
+56
+48
+45
+56
+48
+45
+56
+48
+45
+56
+48
+45
+54
+46
+43
+54
+46
+43
+54
+46
+43
+53
+45
+42
+53
+45
+42
+52
+44
+41
+52
+44
+41
+52
+44
+41
+52
+44
+41
+52
+44
+41
+52
+44
+41
+52
+44
+41
+52
+44
+41
+52
+44
+41
+52
+44
+41
+50
+45
+41
+47
+42
+36
+47
+44
+37
+47
+44
+37
+48
+45
+38
+49
+46
+39
+50
+47
+40
+51
+48
+41
+51
+48
+41
+54
+51
+44
+54
+51
+44
+55
+52
+45
+56
+53
+46
+56
+53
+46
+57
+54
+47
+58
+55
+48
+58
+55
+46
+65
+58
+48
+66
+60
+48
+68
+62
+50
+70
+64
+52
+73
+65
+52
+74
+66
+53
+75
+67
+54
+75
+67
+54
+77
+68
+53
+77
+68
+53
+79
+67
+51
+78
+66
+50
+79
+67
+51
+79
+67
+51
+80
+68
+52
+82
+69
+53
+82
+63
+49
+89
+63
+50
+98
+64
+52
+110
+66
+53
+125
+69
+54
+139
+72
+56
+153
+71
+57
+163
+70
+55
+175
+71
+58
+184
+71
+57
+190
+69
+58
+197
+71
+59
+199
+71
+62
+202
+71
+63
+203
+72
+64
+208
+69
+64
+231
+70
+76
+237
+67
+76
+235
+68
+75
+235
+69
+73
+238
+67
+73
+239
+66
+68
+241
+62
+66
+244
+61
+65
+248
+59
+65
+247
+58
+64
+244
+58
+63
+240
+60
+63
+233
+63
+64
+226
+64
+62
+215
+63
+60
+203
+65
+55
+187
+61
+47
+181
+64
+46
+181
+64
+46
+180
+63
+45
+180
+63
+45
+179
+64
+45
+178
+63
+45
+175
+64
+45
+173
+64
+44
+170
+65
+44
+166
+65
+45
+162
+66
+44
+159
+64
+42
+155
+65
+41
+152
+64
+42
+150
+65
+44
+148
+62
+45
+146
+63
+47
+146
+63
+47
+145
+62
+46
+145
+62
+44
+144
+61
+43
+146
+60
+43
+146
+60
+43
+148
+63
+43
+148
+63
+43
+148
+61
+42
+148
+61
+42
+148
+61
+42
+149
+62
+43
+150
+63
+44
+150
+64
+47
+150
+63
+54
+149
+62
+53
+151
+61
+50
+159
+63
+49
+169
+66
+51
+179
+68
+51
+188
+68
+52
+191
+68
+52
+185
+63
+48
+181
+65
+50
+172
+70
+56
+158
+72
+59
+135
+72
+57
+111
+65
+50
+84
+56
+42
+67
+51
+38
+61
+53
+50
+57
+53
+52
+57
+53
+52
+55
+51
+50
+55
+49
+49
+54
+48
+48
+53
+48
+45
+53
+48
+45
+55
+50
+47
+55
+50
+47
+55
+50
+47
+54
+49
+46
+54
+49
+45
+53
+48
+44
+53
+48
+44
+52
+49
+44
+47
+47
+45
+46
+48
+45
+47
+47
+45
+47
+47
+45
+48
+47
+45
+48
+47
+45
+50
+46
+45
+50
+46
+45
+53
+44
+45
+52
+43
+44
+52
+42
+43
+51
+41
+42
+55
+40
+43
+61
+46
+49
+69
+54
+57
+80
+58
+60
+106
+66
+67
+124
+73
+72
+141
+77
+77
+149
+79
+79
+159
+87
+91
+170
+100
+110
+170
+111
+131
+159
+116
+144
+148
+123
+163
+135
+127
+174
+128
+134
+186
+126
+136
+189
+115
+121
+173
+96
+97
+145
+84
+75
+118
+80
+68
+104
+83
+74
+103
+79
+71
+94
+77
+72
+94
+84
+81
+98
+102
+100
+111
+124
+125
+130
+141
+145
+144
+153
+158
+152
+163
+169
+159
+162
+168
+154
+158
+160
+147
+143
+146
+129
+123
+124
+108
+102
+103
+85
+88
+87
+69
+81
+78
+69
+85
+82
+91
+85
+81
+98
+85
+81
+98
+48
+47
+45
+48
+47
+45
+49
+48
+46
+49
+48
+46
+52
+48
+45
+53
+49
+46
+54
+50
+47
+54
+50
+47
+56
+51
+47
+56
+51
+47
+58
+51
+45
+58
+51
+45
+58
+51
+45
+58
+51
+45
+58
+51
+45
+58
+51
+45
+57
+49
+46
+57
+49
+46
+56
+48
+45
+56
+48
+45
+56
+48
+45
+56
+48
+45
+57
+49
+46
+57
+49
+46
+56
+48
+45
+56
+48
+45
+56
+48
+45
+56
+48
+45
+56
+48
+45
+56
+48
+45
+56
+48
+45
+56
+48
+45
+54
+46
+43
+54
+46
+43
+53
+45
+42
+53
+45
+42
+53
+45
+42
+52
+44
+41
+52
+44
+41
+52
+44
+41
+53
+45
+42
+53
+45
+42
+53
+45
+42
+53
+45
+42
+53
+45
+42
+53
+45
+42
+53
+45
+42
+51
+46
+42
+48
+43
+37
+48
+45
+38
+48
+45
+38
+49
+46
+39
+50
+47
+40
+51
+48
+41
+52
+49
+42
+52
+49
+42
+54
+51
+44
+54
+51
+44
+55
+52
+45
+55
+52
+45
+56
+53
+46
+57
+54
+47
+58
+55
+48
+58
+55
+46
+64
+57
+47
+65
+59
+47
+67
+61
+49
+69
+63
+51
+72
+64
+51
+73
+65
+52
+74
+66
+53
+74
+66
+53
+76
+67
+52
+76
+67
+52
+77
+65
+49
+77
+65
+49
+77
+65
+49
+78
+66
+50
+79
+67
+51
+81
+68
+52
+80
+62
+48
+85
+63
+49
+94
+65
+51
+106
+67
+52
+120
+68
+54
+132
+69
+52
+146
+69
+53
+156
+67
+51
+167
+67
+52
+175
+65
+52
+181
+65
+52
+188
+66
+55
+192
+68
+58
+196
+69
+60
+197
+70
+61
+205
+67
+64
+225
+69
+73
+231
+66
+73
+232
+67
+73
+234
+68
+72
+237
+68
+71
+239
+66
+68
+243
+64
+67
+246
+63
+67
+248
+59
+65
+247
+58
+64
+244
+58
+63
+240
+60
+63
+233
+63
+64
+224
+65
+62
+213
+64
+60
+202
+64
+54
+185
+62
+47
+181
+64
+46
+180
+63
+45
+180
+63
+45
+180
+63
+45
+178
+63
+44
+176
+63
+45
+175
+64
+45
+173
+64
+44
+169
+64
+43
+166
+65
+45
+161
+65
+43
+159
+64
+42
+155
+65
+41
+152
+64
+42
+150
+65
+44
+148
+62
+45
+146
+63
+47
+145
+62
+46
+145
+62
+46
+145
+62
+44
+144
+61
+43
+146
+60
+43
+146
+60
+43
+148
+63
+43
+147
+62
+42
+148
+61
+42
+148
+61
+42
+148
+61
+42
+149
+62
+43
+150
+63
+44
+150
+64
+47
+148
+64
+53
+149
+62
+53
+152
+62
+51
+160
+62
+49
+171
+65
+51
+181
+68
+52
+189
+67
+52
+191
+68
+53
+187
+65
+50
+183
+67
+54
+172
+70
+56
+156
+73
+59
+133
+71
+58
+108
+64
+51
+83
+57
+42
+66
+52
+41
+62
+54
+51
+58
+54
+53
+57
+53
+52
+56
+52
+51
+56
+50
+50
+55
+49
+49
+54
+49
+46
+54
+49
+46
+55
+50
+47
+55
+50
+47
+55
+50
+47
+54
+49
+46
+54
+49
+45
+53
+48
+44
+53
+48
+44
+52
+49
+44
+47
+47
+45
+46
+48
+45
+47
+47
+45
+47
+47
+45
+48
+47
+45
+48
+47
+45
+50
+46
+45
+50
+46
+45
+51
+45
+45
+53
+44
+45
+52
+42
+43
+51
+41
+42
+53
+41
+43
+60
+45
+48
+67
+52
+55
+78
+56
+58
+100
+62
+61
+118
+69
+65
+134
+74
+73
+143
+78
+76
+154
+84
+86
+164
+97
+106
+165
+108
+125
+157
+114
+142
+145
+123
+162
+134
+128
+174
+127
+133
+185
+123
+132
+187
+111
+117
+169
+91
+91
+141
+81
+72
+117
+79
+67
+105
+79
+70
+101
+79
+71
+95
+80
+72
+95
+82
+78
+95
+91
+89
+102
+110
+111
+116
+131
+135
+136
+148
+153
+149
+153
+158
+151
+154
+160
+148
+153
+157
+143
+143
+145
+131
+126
+127
+111
+106
+107
+89
+93
+91
+76
+86
+83
+74
+88
+83
+90
+86
+82
+97
+88
+81
+97
+47
+46
+44
+47
+46
+44
+48
+47
+45
+49
+48
+46
+52
+48
+45
+52
+48
+45
+53
+49
+46
+53
+49
+46
+55
+50
+46
+55
+50
+46
+55
+50
+46
+55
+50
+46
+57
+50
+44
+57
+50
+44
+57
+50
+44
+57
+50
+44
+57
+49
+46
+56
+48
+46
+55
+47
+45
+55
+47
+45
+55
+47
+45
+55
+47
+45
+56
+48
+46
+57
+49
+47
+56
+48
+46
+56
+48
+46
+56
+48
+46
+56
+48
+46
+56
+48
+46
+56
+48
+46
+56
+48
+46
+56
+48
+46
+54
+46
+44
+53
+45
+43
+53
+45
+43
+53
+45
+43
+52
+44
+42
+52
+44
+42
+52
+44
+42
+52
+44
+42
+53
+45
+43
+53
+45
+43
+53
+45
+43
+53
+45
+43
+53
+45
+43
+53
+45
+43
+53
+45
+43
+51
+46
+42
+50
+45
+39
+49
+46
+39
+50
+47
+40
+51
+48
+41
+51
+48
+41
+52
+49
+42
+52
+49
+42
+53
+50
+43
+54
+51
+44
+54
+51
+44
+54
+51
+44
+55
+52
+45
+56
+53
+46
+57
+54
+47
+57
+54
+47
+58
+55
+46
+63
+56
+46
+64
+58
+46
+66
+60
+48
+68
+62
+50
+71
+63
+52
+72
+64
+53
+72
+64
+51
+72
+64
+51
+73
+64
+49
+73
+64
+49
+75
+63
+49
+75
+63
+49
+75
+63
+47
+76
+64
+48
+77
+65
+49
+78
+66
+50
+77
+65
+49
+81
+65
+49
+89
+66
+50
+100
+67
+50
+113
+67
+51
+124
+67
+50
+135
+66
+50
+146
+65
+48
+152
+60
+45
+160
+58
+43
+167
+59
+46
+175
+61
+50
+181
+64
+54
+186
+68
+58
+191
+70
+61
+197
+68
+62
+217
+67
+69
+225
+64
+70
+227
+66
+71
+231
+66
+70
+234
+68
+70
+240
+67
+69
+244
+65
+68
+248
+63
+68
+250
+59
+64
+249
+58
+63
+245
+59
+64
+240
+61
+64
+232
+64
+64
+220
+65
+61
+209
+64
+59
+198
+64
+53
+183
+61
+46
+179
+64
+45
+179
+64
+45
+178
+63
+44
+178
+63
+45
+176
+63
+45
+175
+62
+44
+173
+64
+44
+170
+63
+45
+167
+64
+45
+165
+64
+44
+161
+65
+43
+157
+65
+44
+154
+63
+42
+152
+64
+42
+149
+64
+43
+148
+62
+45
+145
+62
+46
+145
+62
+46
+145
+62
+46
+144
+61
+43
+144
+61
+43
+144
+61
+43
+144
+61
+43
+145
+62
+44
+145
+62
+44
+146
+60
+43
+146
+60
+43
+147
+61
+44
+147
+61
+44
+148
+63
+43
+149
+63
+46
+149
+65
+54
+150
+63
+53
+154
+62
+51
+163
+62
+50
+175
+65
+52
+185
+67
+53
+191
+68
+53
+193
+67
+53
+192
+68
+56
+184
+70
+59
+174
+73
+61
+153
+74
+61
+129
+71
+59
+104
+64
+52
+81
+58
+44
+66
+53
+44
+63
+55
+52
+61
+55
+55
+60
+54
+54
+58
+52
+52
+57
+52
+49
+56
+51
+48
+55
+50
+47
+55
+50
+47
+54
+50
+47
+54
+50
+47
+54
+50
+47
+53
+49
+46
+53
+50
+45
+52
+49
+44
+52
+49
+44
+50
+49
+44
+46
+48
+45
+44
+49
+45
+46
+48
+45
+46
+48
+45
+47
+47
+45
+47
+47
+45
+48
+47
+45
+50
+46
+45
+53
+47
+47
+52
+46
+46
+53
+44
+45
+52
+42
+43
+52
+42
+43
+57
+45
+47
+62
+50
+52
+73
+53
+54
+91
+57
+55
+108
+63
+57
+124
+69
+64
+134
+73
+68
+144
+79
+77
+152
+91
+96
+155
+102
+118
+148
+109
+136
+140
+119
+158
+131
+125
+173
+125
+130
+185
+117
+126
+183
+102
+109
+164
+84
+86
+137
+77
+69
+118
+76
+65
+107
+77
+65
+101
+79
+70
+99
+81
+72
+99
+77
+72
+94
+78
+75
+92
+91
+91
+101
+113
+116
+121
+133
+137
+136
+135
+140
+134
+138
+143
+136
+141
+144
+133
+134
+138
+124
+120
+122
+108
+102
+105
+88
+90
+91
+77
+86
+83
+76
+90
+85
+91
+90
+84
+96
+91
+83
+96
+46
+45
+43
+47
+46
+44
+47
+46
+44
+48
+47
+45
+51
+47
+44
+52
+48
+45
+52
+48
+45
+52
+48
+45
+54
+49
+45
+54
+49
+45
+54
+49
+45
+54
+49
+45
+56
+49
+43
+56
+49
+43
+56
+49
+43
+56
+49
+43
+55
+47
+45
+55
+47
+45
+54
+46
+44
+54
+46
+44
+54
+46
+44
+54
+46
+44
+55
+47
+45
+55
+47
+45
+56
+48
+46
+56
+48
+46
+56
+48
+46
+56
+48
+46
+56
+48
+46
+56
+48
+46
+56
+48
+46
+56
+48
+46
+53
+45
+43
+53
+45
+43
+53
+45
+43
+52
+44
+42
+52
+44
+42
+52
+44
+42
+51
+43
+41
+51
+43
+41
+54
+46
+44
+54
+46
+44
+54
+46
+44
+54
+46
+44
+54
+46
+44
+54
+46
+44
+54
+46
+44
+52
+47
+44
+51
+48
+43
+51
+48
+41
+51
+48
+41
+52
+49
+42
+52
+49
+42
+53
+50
+43
+53
+50
+43
+53
+50
+43
+53
+50
+43
+53
+50
+43
+54
+51
+44
+55
+52
+45
+56
+53
+46
+56
+53
+46
+57
+54
+47
+57
+54
+45
+62
+55
+45
+63
+57
+45
+64
+58
+46
+66
+60
+48
+69
+61
+50
+69
+61
+50
+70
+62
+49
+70
+62
+49
+71
+61
+49
+71
+62
+47
+72
+60
+46
+73
+61
+47
+73
+61
+47
+74
+62
+46
+76
+64
+48
+74
+65
+48
+75
+68
+50
+78
+69
+52
+85
+68
+52
+94
+68
+51
+105
+68
+50
+115
+66
+49
+126
+65
+47
+134
+63
+45
+140
+57
+41
+148
+57
+39
+157
+57
+42
+163
+60
+45
+172
+64
+51
+179
+69
+56
+184
+72
+60
+193
+70
+62
+210
+68
+67
+218
+65
+67
+222
+66
+67
+226
+68
+67
+231
+67
+68
+236
+66
+67
+243
+64
+67
+247
+63
+65
+250
+59
+64
+249
+58
+63
+245
+59
+64
+238
+62
+64
+229
+65
+64
+218
+66
+61
+205
+64
+57
+194
+64
+51
+181
+61
+45
+176
+64
+44
+176
+64
+44
+176
+64
+44
+175
+62
+44
+174
+63
+44
+174
+63
+44
+172
+63
+43
+169
+64
+45
+166
+63
+44
+163
+64
+43
+160
+64
+42
+156
+64
+43
+152
+64
+42
+150
+64
+41
+148
+63
+42
+145
+62
+44
+145
+62
+46
+145
+62
+46
+144
+61
+45
+144
+61
+43
+144
+61
+43
+143
+60
+42
+143
+60
+42
+144
+61
+43
+144
+61
+43
+143
+60
+42
+143
+60
+42
+146
+60
+43
+145
+62
+44
+148
+62
+45
+146
+63
+45
+149
+65
+54
+150
+63
+53
+156
+62
+50
+166
+64
+52
+178
+66
+54
+188
+67
+56
+193
+67
+55
+194
+66
+55
+194
+70
+60
+186
+74
+63
+172
+76
+64
+151
+75
+62
+124
+70
+58
+98
+64
+52
+76
+58
+46
+65
+55
+45
+64
+56
+53
+62
+57
+54
+61
+55
+55
+60
+55
+52
+58
+53
+50
+57
+52
+49
+56
+51
+48
+56
+51
+48
+54
+50
+47
+54
+50
+47
+54
+50
+47
+51
+50
+46
+53
+50
+45
+50
+49
+44
+50
+49
+44
+49
+50
+45
+45
+50
+46
+45
+50
+46
+47
+49
+46
+47
+49
+46
+48
+48
+46
+48
+48
+46
+49
+48
+46
+49
+48
+46
+53
+49
+48
+54
+48
+48
+53
+47
+47
+53
+44
+45
+52
+43
+44
+54
+44
+45
+58
+48
+49
+68
+50
+50
+84
+55
+49
+99
+59
+51
+113
+65
+55
+123
+69
+59
+130
+72
+68
+137
+82
+85
+141
+95
+108
+139
+105
+130
+131
+115
+152
+125
+121
+171
+120
+125
+181
+111
+119
+181
+96
+102
+162
+81
+82
+139
+76
+69
+121
+76
+64
+112
+76
+64
+104
+80
+69
+103
+81
+70
+102
+76
+67
+94
+71
+66
+86
+77
+76
+90
+94
+94
+102
+106
+110
+113
+117
+121
+120
+120
+125
+119
+122
+128
+118
+119
+122
+111
+107
+111
+97
+96
+98
+84
+87
+89
+76
+84
+84
+76
+93
+87
+89
+93
+86
+93
+93
+86
+94
+45
+45
+45
+45
+45
+45
+46
+45
+43
+47
+46
+44
+48
+47
+45
+49
+48
+46
+51
+47
+44
+52
+48
+45
+51
+47
+44
+51
+47
+44
+52
+47
+43
+52
+47
+43
+52
+47
+43
+52
+47
+43
+54
+47
+41
+54
+47
+41
+52
+47
+44
+52
+47
+44
+51
+46
+43
+51
+46
+43
+51
+46
+43
+51
+46
+43
+52
+47
+44
+52
+47
+44
+53
+48
+45
+53
+48
+45
+53
+48
+45
+53
+48
+45
+53
+48
+45
+53
+48
+45
+53
+48
+45
+53
+48
+45
+51
+46
+43
+51
+46
+43
+50
+45
+42
+50
+45
+42
+50
+45
+42
+49
+44
+41
+49
+44
+41
+49
+44
+41
+52
+47
+44
+52
+47
+44
+52
+47
+44
+52
+47
+44
+52
+47
+44
+52
+47
+44
+52
+47
+44
+52
+47
+44
+52
+49
+44
+52
+49
+44
+52
+49
+44
+52
+49
+44
+52
+49
+44
+53
+50
+45
+53
+50
+45
+53
+50
+45
+53
+50
+45
+53
+50
+45
+54
+51
+46
+54
+51
+46
+55
+52
+47
+56
+53
+48
+57
+54
+49
+57
+54
+47
+60
+53
+45
+61
+54
+44
+63
+56
+46
+64
+57
+47
+66
+58
+47
+67
+59
+48
+67
+59
+48
+67
+59
+46
+68
+58
+46
+68
+58
+46
+70
+58
+46
+71
+59
+45
+72
+60
+46
+73
+61
+47
+74
+62
+48
+73
+64
+49
+74
+71
+54
+77
+72
+53
+82
+71
+53
+89
+70
+53
+98
+69
+51
+106
+68
+49
+117
+66
+47
+125
+62
+44
+130
+59
+41
+139
+58
+41
+147
+58
+42
+154
+61
+44
+163
+66
+50
+172
+70
+56
+178
+74
+61
+187
+73
+63
+204
+71
+66
+212
+68
+67
+216
+68
+66
+221
+69
+66
+226
+66
+66
+233
+65
+65
+240
+61
+64
+244
+60
+62
+249
+58
+63
+248
+58
+60
+244
+60
+62
+237
+63
+62
+225
+66
+62
+211
+67
+58
+197
+65
+53
+185
+63
+48
+178
+63
+45
+174
+63
+44
+174
+63
+44
+174
+63
+44
+173
+62
+45
+172
+62
+45
+172
+62
+45
+170
+63
+45
+168
+62
+46
+164
+63
+45
+160
+63
+44
+158
+63
+43
+154
+63
+44
+151
+63
+43
+149
+62
+42
+147
+62
+42
+145
+62
+44
+144
+63
+46
+143
+62
+45
+143
+62
+45
+143
+62
+45
+142
+61
+44
+142
+61
+44
+142
+61
+44
+142
+61
+44
+142
+61
+44
+142
+61
+44
+142
+61
+44
+143
+60
+44
+143
+62
+45
+145
+62
+46
+144
+63
+46
+148
+66
+52
+151
+65
+52
+157
+64
+49
+168
+64
+51
+182
+65
+55
+191
+67
+57
+197
+66
+56
+196
+65
+55
+190
+67
+59
+183
+72
+63
+166
+76
+67
+144
+74
+64
+116
+69
+59
+90
+62
+50
+69
+57
+45
+60
+53
+43
+64
+57
+51
+64
+56
+53
+63
+55
+53
+62
+54
+51
+61
+53
+50
+60
+52
+49
+57
+52
+48
+56
+51
+47
+54
+50
+47
+52
+51
+47
+52
+51
+47
+50
+51
+46
+51
+50
+46
+49
+50
+45
+49
+50
+45
+48
+50
+45
+45
+50
+46
+44
+50
+46
+45
+50
+46
+45
+50
+46
+47
+49
+46
+47
+49
+46
+48
+48
+46
+49
+48
+46
+51
+50
+48
+53
+49
+48
+53
+49
+48
+52
+46
+46
+50
+44
+44
+52
+43
+44
+55
+46
+47
+61
+47
+46
+78
+53
+46
+89
+57
+46
+101
+61
+49
+110
+64
+51
+115
+66
+59
+121
+75
+75
+128
+90
+101
+131
+103
+128
+127
+112
+151
+122
+120
+170
+117
+123
+183
+107
+115
+180
+95
+100
+166
+84
+84
+148
+79
+71
+131
+76
+66
+119
+78
+65
+109
+78
+66
+104
+77
+65
+101
+74
+65
+96
+71
+66
+89
+71
+70
+88
+75
+75
+87
+77
+80
+85
+93
+99
+99
+96
+102
+98
+98
+105
+97
+96
+102
+92
+90
+96
+84
+87
+91
+77
+85
+88
+77
+88
+88
+80
+94
+89
+86
+96
+87
+88
+96
+87
+90
+44
+44
+44
+44
+44
+44
+46
+45
+43
+46
+45
+43
+47
+46
+44
+48
+47
+45
+51
+47
+44
+51
+47
+44
+50
+46
+43
+50
+46
+43
+51
+46
+42
+51
+46
+42
+51
+46
+42
+51
+46
+42
+53
+46
+40
+53
+45
+42
+51
+46
+43
+51
+46
+43
+50
+45
+42
+49
+44
+41
+49
+44
+41
+50
+45
+42
+51
+46
+43
+51
+46
+43
+51
+46
+43
+51
+46
+43
+51
+46
+43
+51
+46
+43
+51
+46
+43
+51
+46
+43
+51
+46
+43
+51
+46
+43
+50
+45
+42
+50
+45
+42
+50
+45
+42
+50
+45
+42
+49
+44
+41
+49
+44
+41
+49
+44
+41
+48
+43
+40
+51
+46
+43
+51
+46
+43
+51
+46
+43
+51
+46
+43
+51
+46
+43
+51
+46
+43
+51
+46
+43
+51
+46
+43
+52
+49
+44
+52
+49
+44
+52
+49
+44
+52
+49
+44
+52
+49
+44
+52
+49
+44
+52
+49
+44
+52
+49
+44
+52
+49
+44
+53
+50
+45
+53
+50
+45
+54
+51
+46
+55
+52
+47
+56
+53
+48
+56
+53
+48
+56
+53
+46
+59
+52
+44
+60
+53
+43
+61
+54
+44
+62
+55
+45
+64
+55
+46
+65
+57
+46
+65
+57
+46
+65
+57
+46
+67
+57
+47
+67
+57
+45
+69
+57
+45
+70
+58
+46
+71
+59
+47
+72
+60
+46
+74
+62
+48
+72
+65
+49
+74
+71
+54
+73
+72
+54
+78
+71
+53
+86
+70
+54
+92
+69
+51
+100
+67
+50
+110
+64
+48
+118
+62
+45
+123
+60
+43
+130
+59
+41
+140
+59
+42
+148
+61
+44
+156
+64
+49
+163
+70
+53
+170
+74
+58
+180
+74
+61
+196
+72
+64
+204
+69
+65
+209
+70
+65
+214
+69
+64
+222
+67
+65
+228
+64
+62
+236
+62
+63
+241
+58
+60
+247
+59
+60
+244
+58
+59
+240
+60
+61
+233
+64
+61
+220
+67
+61
+205
+67
+56
+190
+64
+50
+177
+62
+44
+174
+63
+44
+171
+64
+44
+170
+63
+43
+170
+63
+43
+170
+63
+45
+169
+62
+44
+169
+62
+44
+168
+63
+44
+165
+62
+45
+162
+63
+44
+160
+63
+44
+155
+62
+44
+151
+63
+43
+149
+62
+42
+147
+62
+41
+145
+63
+42
+143
+62
+43
+143
+62
+45
+143
+62
+45
+143
+62
+45
+142
+61
+44
+142
+61
+44
+142
+61
+44
+141
+60
+43
+142
+61
+44
+139
+60
+43
+141
+60
+43
+139
+60
+43
+139
+60
+45
+140
+61
+44
+141
+62
+47
+142
+63
+46
+148
+66
+52
+151
+65
+50
+160
+64
+50
+172
+66
+53
+185
+67
+57
+194
+67
+58
+197
+66
+58
+194
+65
+59
+186
+65
+57
+177
+73
+64
+163
+78
+71
+141
+78
+69
+111
+71
+61
+83
+63
+52
+65
+59
+47
+57
+54
+45
+64
+57
+51
+65
+55
+53
+63
+55
+52
+62
+54
+51
+60
+52
+49
+57
+52
+48
+56
+51
+47
+55
+52
+47
+52
+51
+47
+52
+51
+47
+51
+52
+47
+50
+51
+46
+50
+51
+46
+48
+50
+45
+48
+50
+45
+46
+51
+45
+45
+51
+47
+45
+51
+47
+46
+51
+47
+46
+51
+47
+48
+50
+47
+48
+50
+47
+49
+49
+47
+49
+49
+47
+50
+49
+47
+51
+50
+48
+51
+50
+48
+52
+48
+47
+50
+46
+45
+49
+45
+44
+52
+46
+46
+56
+46
+44
+71
+52
+45
+79
+52
+41
+88
+56
+43
+96
+60
+48
+101
+63
+54
+109
+71
+70
+121
+89
+100
+130
+107
+133
+128
+117
+159
+124
+124
+178
+119
+124
+188
+110
+117
+187
+100
+104
+175
+91
+91
+161
+82
+77
+143
+76
+66
+126
+79
+65
+114
+76
+64
+104
+73
+61
+99
+72
+62
+96
+72
+66
+94
+69
+67
+88
+64
+66
+79
+59
+64
+70
+66
+71
+74
+68
+77
+74
+74
+81
+74
+74
+81
+73
+73
+81
+70
+75
+81
+69
+79
+85
+73
+86
+87
+79
+94
+89
+83
+96
+89
+83
+96
+88
+85
+43
+43
+43
+43
+43
+43
+44
+44
+44
+45
+45
+45
+47
+46
+44
+47
+46
+44
+48
+47
+45
+48
+47
+45
+49
+45
+42
+49
+45
+42
+49
+45
+42
+49
+45
+42
+50
+45
+41
+50
+45
+41
+50
+45
+41
+50
+45
+41
+50
+45
+42
+50
+44
+44
+49
+43
+43
+49
+43
+43
+49
+43
+43
+49
+43
+43
+50
+44
+44
+50
+44
+44
+49
+43
+43
+49
+43
+43
+49
+43
+43
+49
+43
+43
+49
+43
+43
+49
+43
+43
+49
+43
+43
+49
+43
+43
+50
+44
+44
+50
+44
+44
+50
+44
+44
+49
+43
+43
+49
+43
+43
+49
+43
+43
+48
+42
+42
+48
+42
+42
+51
+45
+45
+51
+45
+45
+51
+45
+45
+51
+45
+45
+51
+45
+45
+51
+45
+45
+51
+45
+45
+51
+46
+43
+52
+49
+44
+52
+49
+44
+52
+49
+44
+51
+48
+43
+51
+48
+43
+51
+48
+43
+51
+48
+43
+51
+48
+43
+52
+49
+44
+52
+49
+44
+53
+50
+45
+54
+51
+46
+55
+52
+47
+55
+52
+47
+56
+53
+48
+56
+53
+46
+58
+51
+43
+59
+52
+44
+60
+53
+45
+61
+54
+46
+63
+54
+47
+63
+54
+45
+63
+54
+45
+63
+55
+44
+66
+56
+46
+66
+56
+46
+69
+56
+47
+69
+57
+45
+71
+59
+47
+72
+60
+48
+74
+62
+50
+72
+64
+51
+72
+69
+54
+71
+70
+52
+75
+69
+53
+81
+68
+52
+88
+67
+50
+95
+66
+50
+102
+63
+46
+110
+61
+44
+118
+61
+44
+124
+58
+42
+133
+57
+41
+140
+59
+42
+147
+61
+46
+155
+66
+50
+162
+70
+55
+172
+70
+56
+187
+70
+60
+194
+70
+62
+201
+70
+62
+208
+69
+62
+217
+68
+64
+226
+67
+63
+234
+64
+64
+240
+62
+62
+242
+58
+58
+241
+59
+58
+236
+60
+60
+228
+65
+60
+214
+67
+59
+198
+68
+54
+181
+64
+47
+170
+61
+41
+170
+63
+45
+169
+64
+45
+169
+64
+45
+168
+63
+44
+168
+62
+46
+168
+62
+46
+167
+61
+45
+165
+62
+45
+163
+61
+46
+160
+63
+46
+158
+63
+45
+154
+63
+45
+150
+63
+44
+147
+62
+42
+145
+63
+42
+143
+62
+41
+143
+62
+43
+141
+62
+45
+141
+62
+45
+140
+61
+44
+140
+61
+46
+140
+61
+46
+139
+60
+45
+139
+60
+45
+139
+60
+45
+138
+61
+45
+138
+59
+44
+137
+60
+44
+138
+60
+47
+139
+62
+46
+139
+61
+48
+140
+63
+47
+146
+67
+50
+152
+66
+49
+161
+65
+49
+174
+66
+54
+188
+67
+58
+194
+67
+60
+196
+67
+61
+192
+67
+61
+185
+70
+65
+178
+81
+74
+165
+88
+82
+143
+88
+81
+115
+82
+73
+87
+73
+62
+67
+67
+55
+60
+63
+54
+62
+57
+51
+64
+55
+50
+62
+55
+49
+61
+54
+48
+58
+53
+47
+57
+52
+46
+56
+51
+47
+54
+51
+46
+52
+51
+46
+52
+51
+46
+51
+52
+47
+49
+51
+46
+49
+51
+46
+46
+51
+45
+46
+51
+45
+46
+51
+45
+45
+51
+47
+45
+51
+47
+45
+51
+47
+45
+51
+47
+46
+51
+47
+46
+51
+47
+48
+50
+47
+48
+50
+47
+48
+48
+46
+49
+49
+47
+50
+50
+48
+50
+49
+47
+48
+47
+45
+47
+46
+44
+50
+46
+45
+52
+47
+44
+63
+48
+43
+68
+48
+41
+75
+51
+41
+84
+56
+45
+90
+60
+52
+100
+70
+70
+117
+93
+106
+131
+115
+141
+137
+128
+171
+133
+132
+190
+126
+131
+199
+116
+122
+198
+109
+112
+189
+99
+101
+175
+86
+83
+154
+76
+67
+130
+75
+63
+113
+73
+60
+103
+71
+59
+99
+69
+62
+95
+70
+66
+93
+68
+66
+87
+63
+65
+78
+59
+63
+72
+58
+66
+69
+62
+72
+71
+68
+77
+72
+71
+81
+73
+71
+81
+72
+74
+82
+71
+78
+86
+75
+85
+88
+77
+94
+90
+79
+97
+89
+78
+97
+88
+79
+43
+43
+43
+43
+43
+43
+44
+44
+44
+44
+44
+44
+46
+44
+45
+47
+46
+44
+48
+47
+45
+48
+47
+45
+49
+45
+42
+49
+45
+42
+49
+45
+42
+49
+45
+42
+50
+45
+41
+50
+45
+41
+50
+45
+41
+50
+45
+42
+50
+44
+44
+49
+43
+43
+49
+43
+43
+48
+42
+42
+48
+42
+42
+49
+43
+43
+49
+43
+43
+50
+44
+44
+48
+42
+42
+48
+42
+42
+48
+42
+42
+48
+42
+42
+48
+42
+42
+48
+42
+42
+48
+42
+42
+48
+42
+42
+50
+44
+44
+50
+44
+44
+50
+44
+44
+49
+43
+43
+49
+43
+43
+48
+42
+42
+48
+42
+42
+48
+42
+42
+50
+44
+44
+50
+44
+44
+50
+44
+44
+50
+44
+44
+50
+44
+44
+50
+44
+44
+50
+44
+44
+50
+44
+44
+51
+47
+44
+51
+48
+43
+51
+48
+43
+51
+48
+43
+51
+48
+43
+51
+48
+43
+51
+48
+43
+51
+48
+43
+52
+49
+44
+52
+49
+44
+53
+50
+45
+54
+51
+46
+54
+51
+46
+55
+52
+47
+56
+53
+48
+56
+53
+48
+57
+50
+44
+58
+51
+43
+59
+52
+44
+60
+53
+45
+62
+53
+46
+62
+53
+46
+62
+53
+46
+62
+53
+44
+66
+56
+47
+66
+56
+46
+69
+56
+47
+69
+56
+47
+71
+58
+49
+73
+61
+49
+74
+62
+50
+73
+63
+51
+70
+67
+52
+70
+67
+52
+74
+66
+53
+79
+65
+52
+84
+65
+50
+92
+64
+50
+98
+62
+48
+106
+60
+45
+113
+60
+46
+119
+57
+42
+125
+56
+41
+133
+56
+40
+140
+58
+44
+149
+61
+47
+155
+66
+52
+164
+66
+53
+178
+70
+58
+186
+69
+59
+193
+70
+62
+202
+71
+63
+212
+71
+64
+222
+70
+65
+231
+67
+65
+238
+66
+64
+237
+59
+59
+235
+59
+59
+231
+62
+59
+223
+66
+59
+209
+68
+58
+191
+68
+52
+175
+64
+45
+164
+62
+40
+166
+65
+45
+166
+65
+45
+165
+64
+44
+165
+64
+46
+165
+64
+46
+164
+63
+45
+164
+63
+45
+164
+62
+47
+162
+62
+46
+159
+64
+46
+156
+63
+46
+152
+63
+45
+149
+62
+43
+145
+63
+42
+143
+62
+41
+143
+62
+43
+141
+62
+45
+141
+62
+45
+141
+62
+45
+140
+61
+44
+140
+61
+46
+139
+60
+45
+139
+60
+45
+138
+61
+45
+138
+61
+45
+136
+60
+46
+136
+60
+46
+136
+60
+46
+136
+60
+47
+135
+62
+47
+136
+62
+49
+139
+63
+49
+145
+68
+50
+150
+67
+49
+162
+66
+52
+173
+67
+54
+186
+67
+59
+193
+68
+62
+193
+68
+62
+187
+69
+65
+185
+80
+76
+178
+91
+84
+165
+101
+92
+145
+102
+93
+117
+95
+84
+91
+85
+73
+71
+77
+65
+67
+73
+63
+60
+57
+50
+63
+56
+50
+62
+55
+49
+59
+54
+48
+57
+52
+46
+55
+52
+45
+54
+51
+46
+52
+51
+46
+52
+51
+46
+51
+52
+46
+50
+52
+47
+49
+51
+46
+47
+52
+46
+46
+51
+45
+46
+51
+45
+46
+51
+45
+45
+51
+47
+45
+51
+47
+45
+51
+47
+45
+51
+47
+46
+51
+47
+46
+51
+47
+48
+50
+47
+48
+50
+47
+47
+47
+45
+48
+48
+46
+50
+50
+48
+50
+50
+48
+49
+48
+46
+48
+47
+45
+48
+47
+45
+51
+47
+44
+56
+44
+44
+59
+44
+41
+67
+48
+42
+75
+55
+48
+83
+60
+54
+94
+73
+72
+116
+98
+110
+135
+122
+148
+144
+138
+182
+140
+141
+198
+132
+136
+207
+122
+128
+204
+114
+120
+198
+105
+107
+182
+87
+87
+159
+73
+68
+132
+69
+61
+110
+71
+60
+100
+68
+60
+97
+67
+62
+94
+67
+65
+89
+64
+67
+86
+64
+68
+80
+62
+69
+75
+71
+81
+82
+75
+87
+85
+81
+94
+87
+85
+96
+88
+83
+95
+85
+82
+94
+84
+84
+94
+83
+89
+95
+83
+94
+91
+76
+97
+90
+74
+97
+90
+74
+44
+45
+47
+44
+45
+47
+44
+45
+47
+44
+46
+45
+45
+45
+45
+45
+45
+45
+46
+45
+43
+46
+45
+43
+47
+46
+44
+47
+46
+44
+49
+45
+42
+48
+44
+41
+48
+44
+41
+48
+44
+41
+47
+43
+40
+47
+43
+40
+47
+43
+42
+47
+43
+42
+47
+43
+42
+47
+43
+42
+47
+43
+42
+47
+43
+42
+47
+43
+42
+48
+44
+43
+47
+43
+42
+47
+43
+42
+47
+43
+42
+47
+43
+42
+47
+43
+42
+47
+43
+42
+47
+43
+42
+47
+43
+42
+47
+43
+42
+47
+43
+42
+47
+43
+42
+48
+44
+43
+48
+44
+43
+49
+45
+44
+49
+45
+44
+50
+46
+45
+49
+45
+44
+49
+45
+44
+49
+45
+44
+49
+45
+44
+49
+45
+44
+49
+45
+44
+49
+45
+44
+49
+45
+44
+48
+44
+41
+49
+45
+42
+50
+46
+43
+51
+47
+44
+51
+47
+44
+51
+47
+44
+51
+47
+44
+51
+47
+44
+51
+47
+44
+51
+47
+44
+51
+47
+44
+51
+47
+44
+52
+48
+45
+53
+49
+46
+54
+50
+47
+55
+52
+47
+56
+48
+45
+57
+50
+44
+58
+51
+45
+59
+52
+46
+61
+52
+47
+62
+53
+46
+62
+53
+46
+62
+53
+46
+63
+52
+46
+63
+53
+44
+66
+53
+45
+67
+54
+46
+68
+55
+47
+70
+57
+48
+71
+58
+49
+70
+60
+50
+71
+63
+52
+72
+64
+53
+74
+64
+54
+80
+63
+53
+84
+62
+51
+88
+60
+49
+94
+57
+48
+98
+54
+43
+109
+57
+46
+116
+56
+45
+124
+56
+43
+131
+57
+44
+141
+59
+47
+147
+61
+48
+152
+63
+49
+158
+62
+48
+167
+65
+51
+173
+65
+52
+181
+67
+56
+190
+69
+58
+202
+71
+61
+212
+71
+62
+222
+69
+63
+229
+67
+64
+232
+64
+63
+234
+66
+65
+230
+68
+65
+218
+69
+62
+200
+68
+56
+183
+66
+49
+170
+65
+46
+162
+66
+44
+162
+65
+46
+161
+64
+45
+162
+63
+44
+162
+62
+46
+161
+61
+45
+161
+61
+45
+162
+62
+46
+160
+63
+47
+156
+60
+44
+154
+61
+44
+152
+60
+45
+149
+62
+45
+147
+61
+44
+144
+61
+43
+142
+61
+42
+140
+62
+42
+139
+60
+43
+139
+60
+43
+138
+61
+45
+137
+60
+44
+137
+60
+44
+137
+60
+44
+136
+58
+45
+135
+59
+45
+137
+61
+47
+134
+60
+47
+134
+60
+47
+135
+61
+48
+136
+62
+51
+136
+64
+50
+137
+65
+53
+139
+65
+52
+145
+69
+53
+151
+68
+52
+163
+69
+57
+177
+73
+62
+186
+71
+64
+187
+68
+62
+187
+69
+65
+184
+77
+71
+180
+90
+82
+175
+102
+95
+163
+113
+102
+145
+115
+104
+126
+114
+100
+106
+106
+94
+86
+94
+83
+73
+81
+70
+76
+76
+66
+74
+70
+61
+66
+62
+53
+60
+56
+47
+57
+53
+44
+55
+52
+43
+54
+51
+44
+51
+51
+43
+52
+51
+46
+51
+52
+46
+49
+52
+45
+49
+52
+45
+48
+50
+45
+47
+49
+44
+44
+49
+43
+44
+49
+43
+45
+50
+46
+45
+50
+46
+45
+50
+46
+45
+50
+46
+47
+49
+46
+47
+49
+46
+47
+49
+46
+47
+49
+46
+48
+50
+47
+48
+50
+47
+49
+49
+47
+49
+49
+47
+49
+49
+47
+49
+49
+47
+49
+49
+47
+52
+48
+47
+52
+43
+48
+59
+47
+51
+65
+51
+50
+67
+52
+47
+74
+59
+54
+93
+79
+79
+121
+109
+121
+139
+133
+159
+147
+144
+187
+148
+150
+207
+144
+149
+217
+131
+137
+211
+116
+122
+198
+106
+110
+183
+95
+98
+167
+90
+91
+148
+76
+73
+116
+72
+66
+100
+65
+62
+93
+62
+62
+88
+63
+66
+85
+65
+73
+86
+76
+85
+92
+85
+96
+98
+98
+113
+110
+110
+125
+120
+118
+134
+124
+114
+127
+117
+108
+121
+111
+103
+117
+104
+95
+107
+95
+87
+95
+80
+91
+90
+70
+96
+90
+68
+99
+93
+71
+44
+45
+47
+44
+45
+47
+44
+45
+47
+44
+45
+47
+45
+45
+45
+45
+45
+45
+46
+44
+45
+46
+45
+43
+47
+46
+44
+46
+45
+43
+48
+44
+41
+48
+44
+41
+47
+43
+40
+47
+43
+40
+47
+43
+40
+47
+43
+40
+46
+42
+41
+46
+42
+41
+46
+42
+41
+46
+42
+41
+47
+43
+42
+47
+43
+42
+47
+43
+42
+47
+43
+42
+47
+43
+42
+47
+43
+42
+47
+43
+42
+47
+43
+42
+47
+43
+42
+47
+43
+42
+47
+43
+42
+47
+43
+42
+47
+43
+42
+47
+43
+42
+47
+43
+42
+48
+44
+43
+48
+44
+43
+48
+44
+43
+49
+45
+44
+49
+45
+44
+49
+45
+44
+49
+45
+44
+49
+45
+44
+49
+45
+44
+49
+45
+44
+49
+45
+44
+49
+45
+44
+49
+45
+44
+48
+44
+43
+48
+44
+41
+49
+45
+42
+50
+46
+43
+51
+47
+44
+51
+47
+44
+50
+46
+43
+50
+46
+43
+50
+46
+43
+50
+46
+43
+50
+46
+43
+50
+46
+43
+51
+47
+44
+52
+48
+45
+53
+49
+46
+54
+50
+47
+56
+48
+46
+57
+49
+46
+58
+50
+47
+59
+52
+46
+61
+52
+47
+62
+53
+48
+62
+53
+48
+61
+52
+45
+63
+52
+46
+63
+52
+46
+65
+52
+46
+66
+53
+45
+67
+54
+46
+69
+56
+48
+71
+58
+50
+72
+59
+51
+72
+62
+53
+72
+62
+53
+76
+61
+54
+79
+62
+54
+81
+61
+52
+86
+59
+50
+90
+57
+48
+95
+55
+47
+104
+55
+48
+112
+55
+46
+119
+55
+45
+129
+57
+45
+137
+57
+46
+144
+60
+49
+150
+60
+49
+155
+61
+49
+162
+64
+51
+167
+65
+51
+172
+66
+53
+180
+68
+56
+190
+69
+58
+201
+70
+60
+212
+69
+61
+219
+68
+61
+223
+68
+64
+224
+69
+64
+222
+70
+65
+212
+71
+62
+196
+70
+56
+178
+67
+50
+165
+66
+45
+158
+66
+45
+159
+67
+46
+158
+66
+45
+159
+64
+46
+158
+63
+45
+158
+63
+45
+158
+63
+45
+158
+62
+46
+158
+62
+46
+154
+61
+44
+153
+62
+44
+150
+61
+45
+148
+61
+44
+144
+61
+43
+143
+62
+43
+140
+62
+42
+140
+61
+44
+139
+60
+43
+138
+61
+43
+137
+60
+44
+137
+60
+44
+137
+60
+44
+135
+59
+43
+135
+59
+45
+133
+60
+45
+134
+60
+47
+133
+61
+47
+133
+61
+49
+131
+61
+49
+132
+62
+50
+134
+64
+54
+135
+65
+55
+136
+66
+54
+147
+71
+57
+151
+69
+55
+163
+71
+60
+175
+74
+64
+184
+73
+66
+184
+71
+65
+183
+76
+70
+179
+84
+78
+177
+100
+92
+170
+113
+102
+159
+126
+111
+144
+127
+111
+127
+124
+109
+109
+115
+101
+90
+102
+90
+78
+88
+77
+76
+78
+65
+75
+73
+61
+69
+67
+55
+64
+61
+52
+61
+58
+49
+56
+56
+46
+52
+52
+44
+49
+49
+41
+50
+51
+45
+50
+51
+45
+48
+51
+44
+47
+50
+43
+47
+49
+44
+46
+48
+43
+46
+48
+43
+46
+48
+43
+47
+49
+46
+45
+50
+46
+47
+49
+46
+47
+49
+46
+47
+49
+46
+47
+49
+46
+47
+49
+46
+47
+49
+46
+48
+50
+47
+48
+50
+47
+49
+49
+47
+49
+49
+47
+49
+49
+47
+49
+49
+47
+49
+49
+47
+50
+48
+49
+53
+43
+52
+57
+45
+55
+60
+50
+51
+63
+53
+51
+72
+63
+58
+94
+86
+84
+120
+114
+124
+138
+136
+158
+147
+147
+185
+148
+151
+202
+144
+150
+212
+132
+139
+207
+121
+129
+194
+113
+121
+184
+107
+116
+173
+104
+110
+158
+92
+95
+128
+88
+90
+113
+83
+85
+106
+82
+87
+106
+84
+94
+104
+90
+103
+109
+102
+118
+118
+114
+130
+127
+116
+136
+127
+126
+146
+135
+131
+149
+137
+126
+142
+129
+118
+134
+121
+114
+128
+113
+102
+116
+101
+90
+101
+84
+89
+88
+67
+94
+88
+62
+97
+91
+67
+44
+45
+47
+44
+45
+47
+44
+45
+47
+44
+45
+47
+44
+45
+47
+44
+46
+45
+45
+45
+45
+45
+45
+45
+46
+45
+43
+46
+45
+43
+46
+45
+43
+45
+44
+42
+47
+43
+40
+46
+42
+39
+46
+42
+39
+46
+42
+39
+44
+43
+41
+44
+42
+43
+44
+42
+43
+44
+42
+43
+43
+41
+42
+43
+41
+42
+43
+41
+42
+43
+41
+42
+45
+43
+44
+45
+43
+44
+45
+43
+44
+45
+43
+44
+45
+43
+44
+45
+43
+44
+45
+43
+44
+45
+43
+44
+44
+42
+43
+44
+42
+43
+45
+43
+44
+45
+43
+44
+45
+43
+44
+46
+44
+45
+46
+44
+45
+46
+44
+45
+46
+44
+45
+46
+44
+45
+46
+44
+45
+47
+45
+46
+47
+45
+46
+47
+45
+46
+47
+45
+46
+47
+46
+44
+48
+44
+43
+48
+44
+43
+49
+45
+44
+50
+46
+45
+50
+46
+45
+50
+46
+45
+50
+46
+45
+49
+45
+44
+49
+45
+44
+49
+45
+44
+49
+45
+44
+49
+45
+44
+50
+46
+45
+51
+47
+46
+52
+48
+47
+53
+49
+46
+56
+48
+46
+57
+49
+46
+58
+50
+47
+59
+51
+48
+61
+51
+49
+61
+52
+47
+61
+52
+47
+61
+52
+47
+63
+52
+48
+63
+52
+46
+65
+52
+46
+65
+52
+46
+67
+54
+48
+68
+55
+49
+70
+57
+51
+71
+58
+52
+72
+59
+53
+74
+59
+54
+75
+60
+55
+78
+61
+54
+80
+59
+54
+83
+58
+53
+86
+55
+50
+91
+54
+46
+99
+54
+48
+107
+54
+46
+116
+53
+44
+125
+55
+47
+135
+57
+47
+141
+59
+48
+148
+60
+48
+150
+60
+49
+157
+63
+51
+160
+64
+52
+162
+64
+51
+168
+64
+51
+177
+67
+54
+186
+68
+56
+197
+69
+58
+205
+68
+58
+213
+70
+64
+215
+72
+64
+212
+73
+66
+204
+73
+63
+190
+69
+58
+174
+67
+51
+161
+66
+46
+156
+65
+46
+157
+66
+47
+156
+65
+46
+156
+63
+46
+155
+62
+45
+155
+62
+45
+155
+62
+45
+155
+62
+47
+155
+63
+48
+152
+60
+45
+150
+61
+45
+148
+60
+46
+147
+61
+46
+143
+62
+45
+140
+61
+44
+139
+60
+43
+138
+61
+43
+137
+60
+42
+137
+60
+42
+137
+60
+44
+135
+59
+43
+135
+59
+45
+133
+60
+45
+132
+58
+45
+131
+59
+45
+132
+60
+48
+130
+60
+48
+130
+60
+50
+130
+62
+51
+131
+63
+52
+133
+65
+56
+135
+67
+58
+136
+68
+57
+148
+74
+61
+151
+72
+59
+160
+72
+62
+172
+75
+68
+178
+75
+70
+179
+76
+71
+178
+83
+77
+174
+96
+86
+173
+115
+103
+166
+129
+113
+157
+140
+122
+145
+142
+123
+130
+137
+119
+115
+128
+111
+99
+113
+98
+88
+99
+85
+78
+82
+68
+77
+78
+64
+72
+73
+59
+68
+68
+56
+64
+64
+52
+57
+59
+46
+52
+54
+43
+47
+49
+38
+48
+49
+41
+48
+49
+41
+47
+48
+42
+47
+48
+42
+46
+47
+42
+46
+47
+42
+47
+47
+45
+47
+47
+45
+47
+47
+45
+46
+48
+45
+47
+47
+45
+47
+47
+45
+47
+47
+45
+47
+47
+45
+47
+47
+45
+47
+47
+45
+48
+48
+46
+48
+48
+46
+48
+48
+46
+48
+48
+46
+48
+48
+46
+48
+48
+46
+48
+48
+46
+49
+47
+50
+54
+43
+57
+55
+43
+57
+56
+47
+52
+59
+54
+51
+72
+69
+62
+95
+94
+89
+122
+122
+124
+139
+141
+154
+144
+148
+177
+146
+151
+191
+143
+149
+199
+132
+142
+195
+125
+137
+187
+123
+137
+182
+124
+139
+178
+125
+140
+171
+125
+136
+154
+119
+131
+143
+113
+126
+135
+110
+125
+130
+110
+126
+126
+111
+130
+126
+121
+142
+133
+131
+153
+141
+139
+161
+148
+145
+168
+152
+144
+165
+148
+136
+157
+138
+131
+150
+131
+124
+141
+123
+106
+123
+105
+92
+104
+84
+86
+86
+62
+91
+87
+58
+93
+89
+62
+45
+46
+48
+45
+46
+48
+45
+46
+48
+45
+46
+48
+45
+46
+48
+45
+46
+48
+46
+46
+46
+46
+46
+46
+46
+45
+43
+46
+45
+43
+45
+44
+42
+45
+44
+42
+46
+42
+39
+46
+42
+39
+46
+42
+39
+46
+42
+41
+44
+42
+43
+43
+41
+42
+43
+41
+42
+43
+41
+42
+43
+41
+42
+42
+40
+41
+42
+40
+41
+42
+40
+41
+44
+42
+43
+44
+42
+43
+44
+42
+43
+44
+42
+43
+44
+42
+43
+44
+42
+43
+44
+42
+43
+44
+42
+43
+44
+42
+43
+44
+42
+43
+44
+42
+43
+44
+42
+43
+44
+42
+43
+45
+43
+44
+45
+43
+44
+45
+43
+44
+45
+43
+44
+46
+44
+45
+46
+44
+45
+46
+44
+45
+46
+44
+45
+47
+45
+46
+47
+45
+46
+47
+45
+46
+47
+43
+42
+48
+44
+43
+49
+45
+44
+49
+45
+44
+49
+45
+44
+49
+45
+44
+48
+44
+43
+48
+44
+43
+48
+44
+43
+48
+44
+43
+48
+44
+43
+48
+44
+43
+49
+45
+44
+50
+46
+45
+51
+47
+46
+52
+48
+47
+57
+49
+47
+58
+50
+48
+59
+51
+49
+60
+52
+49
+61
+51
+49
+61
+51
+49
+61
+51
+49
+61
+52
+47
+62
+51
+47
+62
+51
+47
+64
+50
+47
+64
+51
+45
+65
+52
+46
+67
+54
+48
+68
+55
+49
+69
+56
+50
+70
+57
+51
+72
+57
+52
+73
+58
+53
+74
+59
+54
+76
+58
+54
+78
+57
+52
+81
+56
+51
+84
+53
+48
+94
+55
+50
+101
+54
+48
+111
+54
+47
+120
+56
+47
+130
+57
+48
+138
+58
+47
+144
+60
+49
+148
+62
+49
+153
+63
+52
+155
+63
+52
+155
+63
+50
+159
+63
+49
+165
+65
+50
+174
+66
+53
+184
+68
+55
+191
+69
+58
+199
+71
+62
+203
+72
+64
+202
+74
+65
+195
+73
+62
+182
+70
+58
+170
+66
+53
+158
+65
+48
+153
+64
+46
+153
+65
+45
+153
+65
+45
+152
+63
+45
+151
+62
+44
+151
+62
+44
+153
+62
+44
+153
+61
+46
+151
+62
+46
+149
+60
+44
+148
+61
+44
+147
+61
+46
+144
+61
+45
+142
+61
+44
+138
+61
+43
+138
+61
+45
+137
+60
+44
+136
+59
+41
+136
+59
+41
+135
+59
+43
+135
+59
+43
+132
+59
+44
+132
+59
+44
+131
+59
+45
+128
+59
+44
+129
+59
+47
+128
+60
+49
+128
+60
+49
+129
+62
+53
+131
+64
+55
+131
+67
+58
+135
+68
+60
+136
+69
+60
+148
+76
+64
+150
+72
+60
+158
+71
+62
+167
+74
+67
+174
+76
+73
+174
+81
+76
+173
+93
+86
+170
+106
+94
+167
+128
+111
+161
+143
+121
+154
+154
+130
+143
+155
+131
+134
+149
+128
+122
+139
+120
+109
+123
+106
+98
+109
+93
+83
+90
+74
+81
+85
+70
+75
+79
+64
+69
+73
+58
+64
+68
+54
+59
+61
+48
+53
+55
+44
+49
+51
+40
+48
+49
+41
+47
+48
+40
+46
+47
+41
+46
+45
+40
+46
+45
+41
+46
+45
+41
+47
+46
+44
+48
+47
+45
+47
+46
+44
+47
+46
+44
+47
+46
+44
+47
+46
+44
+47
+46
+44
+46
+46
+44
+47
+46
+44
+46
+46
+44
+48
+47
+45
+47
+47
+45
+48
+47
+45
+47
+47
+45
+47
+47
+45
+47
+47
+45
+47
+47
+45
+50
+45
+49
+55
+44
+58
+54
+42
+56
+51
+45
+49
+57
+54
+49
+72
+74
+63
+98
+102
+88
+123
+128
+122
+139
+144
+147
+141
+147
+163
+143
+150
+176
+140
+149
+182
+131
+144
+178
+129
+144
+175
+133
+153
+178
+141
+164
+182
+146
+168
+179
+147
+168
+171
+144
+164
+163
+140
+160
+158
+135
+158
+152
+130
+153
+143
+125
+152
+137
+129
+156
+139
+136
+163
+144
+148
+176
+154
+152
+177
+155
+148
+173
+151
+139
+163
+141
+133
+155
+132
+127
+146
+124
+107
+124
+105
+88
+102
+79
+83
+86
+59
+89
+85
+56
+90
+86
+57
+43
+47
+50
+43
+47
+50
+43
+47
+50
+43
+47
+50
+45
+46
+48
+45
+46
+48
+46
+46
+46
+46
+46
+46
+45
+45
+45
+45
+45
+45
+46
+45
+43
+45
+44
+42
+45
+44
+42
+44
+43
+41
+44
+43
+41
+44
+43
+41
+44
+42
+43
+44
+42
+43
+44
+42
+43
+43
+41
+42
+43
+41
+42
+42
+40
+41
+42
+40
+41
+42
+40
+41
+44
+42
+43
+44
+42
+43
+44
+42
+43
+44
+42
+43
+44
+42
+43
+44
+42
+43
+44
+42
+43
+44
+42
+43
+44
+42
+43
+44
+42
+43
+44
+42
+43
+44
+42
+43
+44
+42
+43
+43
+41
+42
+43
+41
+42
+43
+41
+42
+44
+42
+43
+45
+43
+44
+45
+43
+44
+46
+44
+45
+46
+44
+45
+47
+45
+46
+47
+45
+46
+47
+45
+46
+47
+43
+42
+48
+44
+43
+48
+44
+43
+48
+44
+43
+48
+44
+43
+48
+44
+43
+47
+43
+42
+46
+42
+41
+47
+43
+42
+47
+43
+42
+47
+43
+42
+47
+43
+42
+48
+44
+43
+49
+45
+44
+51
+47
+46
+52
+48
+47
+57
+48
+49
+58
+50
+48
+59
+51
+49
+60
+52
+50
+61
+51
+50
+61
+51
+49
+60
+50
+48
+60
+50
+48
+61
+50
+48
+61
+50
+46
+63
+49
+46
+63
+49
+46
+64
+50
+47
+65
+51
+48
+66
+53
+47
+67
+54
+48
+68
+54
+51
+67
+56
+52
+68
+57
+53
+69
+58
+54
+71
+57
+54
+72
+57
+52
+75
+56
+52
+78
+53
+48
+88
+55
+50
+95
+54
+48
+105
+55
+48
+114
+55
+47
+125
+58
+49
+134
+60
+49
+140
+62
+50
+144
+62
+50
+151
+64
+54
+151
+63
+53
+151
+63
+53
+151
+63
+51
+156
+64
+51
+163
+67
+53
+171
+67
+54
+179
+69
+56
+186
+69
+59
+189
+71
+61
+190
+72
+62
+185
+71
+61
+176
+68
+56
+166
+65
+53
+155
+63
+48
+151
+64
+47
+151
+64
+45
+151
+64
+45
+150
+63
+46
+149
+62
+45
+148
+61
+44
+149
+60
+44
+150
+61
+47
+150
+61
+47
+149
+60
+46
+147
+59
+45
+146
+60
+47
+142
+60
+46
+139
+60
+45
+137
+60
+44
+137
+60
+44
+136
+60
+44
+135
+59
+43
+134
+58
+42
+134
+58
+42
+134
+58
+42
+131
+58
+43
+131
+58
+43
+130
+58
+44
+128
+58
+46
+128
+58
+48
+128
+60
+49
+128
+61
+52
+127
+63
+54
+130
+66
+57
+131
+68
+61
+135
+70
+64
+136
+72
+63
+145
+75
+65
+146
+72
+61
+154
+71
+63
+163
+76
+69
+168
+80
+76
+168
+88
+81
+169
+102
+93
+166
+118
+104
+162
+140
+119
+155
+153
+128
+149
+164
+135
+140
+163
+135
+134
+157
+131
+126
+145
+125
+116
+130
+113
+106
+117
+101
+92
+101
+82
+86
+95
+76
+78
+85
+67
+69
+76
+58
+63
+70
+54
+60
+64
+50
+55
+58
+47
+54
+56
+45
+48
+49
+41
+48
+48
+40
+46
+45
+40
+47
+44
+39
+47
+43
+40
+47
+43
+42
+49
+45
+44
+50
+46
+45
+49
+45
+44
+49
+45
+44
+49
+45
+44
+49
+45
+44
+49
+45
+44
+47
+46
+44
+49
+45
+44
+47
+46
+44
+50
+46
+45
+48
+47
+45
+50
+46
+45
+48
+47
+45
+48
+47
+45
+48
+47
+45
+48
+47
+45
+50
+45
+49
+56
+44
+58
+53
+41
+53
+49
+43
+43
+54
+54
+44
+71
+76
+56
+96
+104
+81
+122
+131
+112
+136
+146
+135
+141
+151
+150
+143
+154
+160
+141
+153
+165
+134
+150
+163
+135
+155
+162
+144
+170
+169
+155
+185
+177
+160
+192
+179
+152
+183
+168
+154
+182
+167
+155
+183
+168
+152
+183
+165
+145
+177
+156
+137
+171
+146
+137
+171
+144
+144
+177
+148
+146
+179
+150
+149
+180
+149
+144
+173
+143
+136
+162
+133
+132
+155
+129
+123
+146
+120
+103
+122
+100
+84
+98
+73
+81
+84
+57
+85
+84
+56
+86
+85
+57
+44
+48
+51
+44
+48
+51
+44
+48
+51
+44
+48
+51
+46
+47
+49
+46
+47
+49
+47
+47
+47
+47
+47
+47
+46
+46
+46
+46
+46
+46
+47
+46
+44
+46
+45
+43
+46
+45
+43
+46
+45
+43
+45
+44
+42
+45
+44
+42
+45
+43
+44
+45
+43
+44
+45
+43
+44
+44
+42
+43
+43
+41
+42
+42
+40
+41
+42
+40
+41
+42
+40
+41
+43
+41
+42
+43
+41
+42
+43
+41
+42
+43
+41
+42
+43
+41
+42
+43
+41
+42
+43
+41
+42
+43
+41
+42
+44
+42
+43
+44
+42
+43
+43
+41
+42
+43
+41
+42
+43
+41
+42
+42
+40
+41
+42
+40
+41
+42
+40
+41
+44
+42
+43
+44
+42
+43
+44
+42
+43
+45
+43
+44
+46
+44
+45
+46
+44
+45
+47
+45
+46
+47
+45
+46
+47
+43
+42
+47
+43
+42
+48
+44
+43
+48
+44
+43
+47
+43
+42
+47
+43
+42
+46
+42
+41
+45
+41
+40
+48
+44
+43
+48
+44
+43
+47
+43
+42
+48
+44
+43
+49
+45
+44
+50
+46
+45
+51
+47
+46
+52
+48
+47
+58
+49
+50
+58
+49
+50
+59
+51
+49
+60
+52
+50
+61
+51
+50
+60
+50
+49
+60
+50
+48
+59
+49
+47
+61
+50
+48
+60
+49
+47
+62
+48
+45
+62
+48
+45
+63
+49
+46
+64
+50
+47
+65
+52
+46
+63
+52
+46
+64
+53
+49
+64
+55
+50
+64
+57
+51
+65
+58
+52
+66
+57
+52
+67
+56
+52
+70
+55
+52
+72
+53
+47
+81
+53
+49
+88
+53
+47
+97
+54
+47
+108
+56
+45
+117
+57
+46
+128
+60
+47
+134
+62
+48
+139
+61
+49
+147
+63
+53
+149
+62
+53
+147
+63
+53
+147
+63
+52
+149
+66
+52
+154
+66
+52
+160
+67
+52
+165
+68
+52
+172
+66
+53
+176
+68
+56
+180
+69
+58
+177
+69
+59
+170
+66
+55
+161
+63
+52
+154
+62
+49
+150
+62
+48
+149
+63
+46
+148
+63
+43
+147
+61
+44
+147
+61
+44
+147
+60
+43
+147
+60
+43
+148
+60
+46
+148
+60
+46
+147
+59
+45
+146
+60
+45
+143
+60
+46
+141
+59
+45
+138
+59
+44
+137
+60
+44
+135
+59
+43
+135
+59
+43
+134
+58
+42
+134
+58
+42
+133
+57
+41
+131
+58
+41
+131
+58
+43
+129
+57
+42
+127
+57
+45
+127
+57
+45
+128
+60
+49
+127
+60
+51
+127
+63
+54
+128
+65
+56
+130
+67
+60
+133
+70
+63
+136
+73
+66
+138
+73
+67
+142
+74
+65
+144
+71
+62
+151
+72
+67
+159
+78
+74
+167
+86
+82
+167
+96
+90
+169
+112
+101
+164
+131
+114
+156
+148
+125
+150
+161
+131
+143
+168
+138
+136
+167
+136
+131
+160
+132
+126
+150
+126
+121
+136
+117
+112
+123
+106
+100
+112
+92
+93
+105
+83
+82
+94
+74
+74
+83
+64
+66
+75
+58
+62
+69
+53
+58
+64
+50
+57
+60
+49
+51
+52
+44
+50
+50
+42
+49
+46
+41
+47
+44
+39
+47
+41
+41
+48
+42
+42
+49
+43
+43
+50
+44
+44
+49
+43
+43
+49
+43
+43
+49
+43
+43
+49
+43
+43
+49
+43
+43
+48
+44
+43
+48
+44
+43
+48
+44
+43
+49
+45
+44
+49
+45
+44
+49
+45
+44
+49
+45
+44
+47
+46
+44
+47
+46
+44
+47
+46
+44
+50
+44
+46
+56
+42
+55
+53
+40
+49
+51
+43
+40
+53
+54
+38
+69
+75
+49
+92
+103
+71
+117
+130
+100
+134
+147
+121
+142
+155
+138
+145
+158
+148
+144
+159
+154
+139
+158
+152
+141
+165
+151
+151
+180
+158
+162
+197
+165
+169
+206
+173
+165
+201
+173
+166
+202
+176
+167
+203
+177
+164
+200
+172
+151
+190
+159
+139
+179
+145
+136
+176
+141
+141
+178
+144
+142
+178
+142
+144
+178
+143
+141
+172
+138
+132
+161
+130
+128
+153
+123
+119
+142
+114
+100
+120
+93
+81
+95
+69
+77
+81
+54
+81
+81
+53
+82
+81
+53
+44
+48
+51
+44
+48
+51
+44
+48
+51
+44
+48
+51
+46
+47
+49
+46
+47
+49
+46
+47
+49
+46
+47
+49
+47
+47
+47
+47
+47
+47
+47
+47
+47
+47
+47
+47
+47
+46
+44
+47
+46
+44
+46
+45
+43
+46
+45
+43
+47
+45
+46
+46
+44
+45
+46
+44
+45
+45
+43
+44
+44
+42
+43
+43
+41
+42
+43
+41
+42
+42
+40
+41
+43
+41
+42
+43
+41
+42
+43
+41
+42
+43
+41
+42
+43
+41
+42
+43
+41
+42
+43
+41
+42
+43
+41
+42
+43
+41
+42
+43
+41
+42
+43
+41
+42
+42
+40
+41
+42
+40
+41
+42
+40
+41
+41
+39
+40
+41
+39
+40
+43
+41
+42
+43
+41
+42
+44
+42
+43
+45
+43
+44
+46
+44
+45
+46
+44
+45
+47
+45
+46
+47
+45
+46
+47
+43
+42
+47
+43
+42
+47
+43
+42
+47
+43
+42
+47
+43
+42
+46
+42
+41
+45
+41
+40
+44
+40
+39
+48
+44
+43
+48
+44
+43
+48
+44
+43
+48
+44
+43
+49
+45
+44
+50
+46
+45
+52
+48
+47
+52
+48
+47
+58
+49
+50
+59
+50
+51
+59
+50
+51
+60
+51
+52
+61
+51
+50
+60
+50
+49
+60
+50
+49
+59
+49
+48
+60
+49
+47
+60
+49
+47
+62
+48
+47
+61
+47
+46
+62
+48
+45
+62
+48
+45
+63
+49
+46
+62
+51
+47
+61
+54
+48
+59
+54
+48
+59
+56
+51
+60
+57
+52
+61
+58
+53
+62
+57
+51
+64
+55
+50
+67
+54
+48
+71
+52
+46
+79
+52
+43
+89
+52
+43
+100
+53
+43
+110
+56
+44
+120
+58
+45
+127
+59
+46
+133
+59
+46
+143
+60
+52
+145
+60
+53
+144
+62
+51
+143
+64
+51
+144
+65
+50
+147
+66
+49
+151
+65
+50
+153
+64
+48
+160
+62
+49
+166
+64
+52
+170
+66
+55
+170
+66
+57
+165
+64
+54
+159
+62
+53
+151
+61
+50
+149
+63
+50
+146
+63
+45
+146
+63
+45
+145
+62
+44
+144
+61
+43
+145
+59
+42
+145
+59
+42
+146
+60
+45
+146
+60
+45
+145
+59
+46
+145
+59
+46
+142
+59
+45
+141
+59
+45
+138
+59
+46
+136
+58
+45
+134
+58
+44
+132
+59
+44
+133
+57
+41
+133
+57
+41
+131
+58
+41
+130
+57
+40
+130
+57
+42
+129
+57
+42
+126
+56
+44
+126
+56
+44
+128
+60
+49
+128
+61
+52
+128
+64
+55
+129
+66
+57
+132
+69
+62
+133
+73
+65
+136
+75
+70
+140
+77
+70
+140
+73
+65
+142
+72
+64
+152
+74
+70
+161
+83
+79
+168
+93
+88
+169
+104
+98
+169
+123
+110
+164
+142
+121
+153
+156
+129
+146
+167
+134
+137
+172
+139
+130
+170
+136
+128
+161
+132
+127
+153
+128
+126
+139
+119
+120
+129
+110
+106
+120
+97
+100
+114
+91
+90
+104
+81
+81
+93
+73
+73
+84
+67
+67
+76
+59
+62
+68
+54
+60
+63
+52
+54
+55
+47
+52
+52
+44
+51
+48
+43
+48
+43
+39
+49
+40
+41
+49
+40
+41
+50
+41
+42
+52
+43
+44
+50
+41
+42
+50
+41
+42
+50
+41
+42
+50
+41
+42
+50
+41
+42
+48
+42
+42
+48
+42
+42
+48
+42
+42
+49
+43
+43
+49
+43
+43
+48
+44
+43
+48
+44
+43
+48
+44
+43
+48
+44
+43
+48
+44
+43
+49
+43
+45
+54
+41
+50
+53
+41
+45
+52
+45
+37
+52
+54
+33
+65
+72
+38
+87
+99
+59
+113
+128
+87
+130
+146
+109
+141
+156
+125
+144
+160
+134
+144
+162
+140
+139
+161
+138
+141
+168
+137
+149
+184
+142
+160
+200
+148
+164
+208
+157
+169
+211
+171
+168
+210
+174
+167
+209
+173
+161
+203
+165
+147
+189
+151
+133
+175
+135
+130
+172
+132
+135
+176
+134
+136
+174
+133
+140
+177
+136
+139
+171
+134
+129
+159
+123
+123
+148
+116
+113
+136
+107
+95
+115
+87
+77
+93
+66
+73
+79
+51
+74
+77
+48
+76
+76
+48
+46
+47
+49
+44
+48
+49
+46
+47
+49
+46
+47
+49
+46
+48
+47
+46
+48
+47
+46
+48
+47
+47
+47
+47
+48
+48
+46
+48
+48
+46
+48
+48
+46
+48
+47
+45
+48
+47
+45
+48
+47
+43
+47
+46
+44
+49
+45
+44
+50
+46
+45
+49
+45
+44
+49
+45
+44
+48
+44
+43
+47
+43
+44
+44
+42
+43
+43
+41
+42
+43
+41
+42
+43
+41
+42
+43
+41
+42
+43
+41
+42
+43
+41
+42
+43
+41
+42
+43
+41
+42
+43
+41
+44
+43
+41
+42
+43
+41
+44
+43
+41
+42
+45
+40
+44
+42
+40
+41
+44
+40
+41
+41
+39
+40
+41
+39
+40
+40
+38
+39
+42
+40
+41
+43
+41
+42
+44
+42
+43
+44
+43
+41
+45
+43
+44
+46
+45
+43
+47
+46
+44
+47
+46
+44
+45
+44
+42
+45
+44
+42
+47
+43
+42
+47
+43
+42
+46
+42
+41
+45
+41
+40
+44
+40
+39
+44
+40
+39
+49
+45
+44
+50
+45
+42
+50
+45
+42
+50
+45
+42
+51
+46
+43
+52
+47
+44
+53
+48
+45
+54
+49
+46
+59
+51
+49
+59
+51
+49
+60
+52
+50
+60
+52
+50
+61
+51
+49
+60
+50
+48
+59
+49
+47
+59
+49
+47
+60
+49
+47
+60
+49
+47
+61
+47
+46
+61
+47
+46
+61
+47
+44
+62
+48
+45
+63
+49
+46
+61
+50
+46
+62
+51
+45
+61
+54
+46
+60
+55
+49
+57
+57
+49
+57
+58
+50
+58
+58
+50
+59
+56
+49
+63
+54
+47
+67
+50
+43
+74
+49
+44
+84
+50
+41
+94
+51
+42
+104
+54
+43
+111
+57
+45
+118
+60
+46
+123
+59
+47
+135
+61
+50
+139
+61
+51
+139
+63
+50
+140
+64
+50
+142
+64
+51
+143
+64
+49
+146
+63
+49
+149
+61
+47
+152
+60
+47
+156
+62
+50
+162
+66
+54
+161
+67
+55
+158
+66
+55
+153
+63
+52
+150
+62
+50
+148
+62
+49
+148
+62
+47
+147
+61
+46
+144
+61
+45
+142
+61
+44
+142
+61
+44
+140
+61
+44
+140
+61
+46
+141
+62
+47
+142
+60
+46
+142
+60
+46
+139
+60
+47
+138
+59
+46
+136
+58
+45
+135
+59
+45
+132
+59
+44
+132
+59
+44
+130
+58
+43
+128
+59
+43
+127
+58
+42
+126
+59
+42
+126
+59
+43
+124
+58
+42
+124
+58
+44
+124
+58
+46
+128
+62
+50
+129
+62
+53
+128
+64
+54
+130
+67
+58
+133
+70
+61
+133
+74
+66
+136
+77
+69
+139
+79
+71
+140
+73
+67
+142
+73
+68
+147
+80
+74
+152
+92
+84
+157
+104
+96
+157
+117
+105
+158
+135
+117
+157
+153
+128
+147
+162
+133
+143
+170
+137
+137
+172
+139
+129
+169
+135
+127
+162
+132
+125
+155
+127
+122
+144
+121
+116
+136
+111
+103
+126
+98
+98
+121
+93
+92
+112
+85
+85
+103
+79
+78
+93
+72
+71
+82
+65
+64
+73
+56
+61
+65
+51
+56
+56
+46
+56
+53
+46
+53
+48
+44
+51
+43
+41
+50
+40
+41
+50
+40
+41
+51
+41
+42
+52
+42
+43
+50
+41
+44
+48
+42
+42
+48
+42
+44
+50
+41
+42
+50
+41
+44
+50
+41
+44
+50
+41
+44
+50
+41
+44
+51
+42
+45
+51
+42
+45
+49
+43
+45
+49
+43
+45
+48
+44
+45
+48
+44
+45
+48
+44
+45
+49
+43
+47
+52
+41
+47
+52
+42
+43
+52
+45
+37
+52
+54
+33
+63
+70
+37
+84
+96
+56
+109
+124
+81
+129
+144
+103
+137
+153
+116
+141
+158
+122
+141
+161
+126
+136
+161
+122
+138
+167
+123
+145
+182
+130
+155
+196
+136
+159
+203
+144
+159
+201
+153
+158
+199
+157
+157
+198
+154
+152
+193
+149
+140
+183
+138
+130
+173
+128
+133
+174
+130
+140
+181
+137
+132
+171
+127
+137
+174
+133
+137
+169
+130
+126
+156
+120
+118
+143
+111
+108
+131
+102
+90
+110
+83
+74
+90
+63
+70
+76
+50
+70
+74
+47
+70
+72
+48
+47
+48
+43
+46
+48
+43
+47
+48
+43
+48
+49
+44
+48
+49
+44
+48
+49
+44
+49
+50
+45
+50
+49
+45
+51
+50
+46
+52
+51
+47
+52
+51
+47
+54
+50
+47
+53
+49
+46
+52
+49
+44
+51
+47
+44
+52
+47
+44
+53
+48
+45
+53
+48
+45
+52
+47
+44
+51
+46
+43
+50
+44
+44
+49
+45
+44
+48
+44
+43
+48
+44
+43
+46
+44
+45
+46
+44
+45
+45
+45
+47
+45
+45
+47
+44
+44
+46
+43
+43
+45
+42
+41
+46
+41
+41
+43
+46
+41
+47
+46
+41
+45
+47
+40
+47
+46
+41
+45
+47
+41
+45
+46
+41
+45
+46
+42
+43
+46
+42
+43
+47
+43
+42
+47
+43
+42
+45
+44
+42
+46
+45
+41
+45
+45
+43
+45
+46
+41
+46
+47
+42
+46
+47
+42
+45
+45
+45
+45
+45
+45
+46
+44
+45
+47
+45
+46
+47
+46
+44
+48
+47
+45
+50
+46
+43
+50
+46
+43
+50
+45
+42
+52
+44
+41
+53
+45
+42
+54
+46
+43
+56
+47
+42
+58
+49
+44
+58
+49
+42
+59
+50
+43
+61
+52
+45
+61
+52
+45
+62
+53
+48
+62
+53
+48
+62
+53
+48
+61
+52
+47
+60
+51
+46
+59
+50
+45
+61
+50
+46
+60
+49
+45
+60
+49
+47
+59
+48
+46
+61
+47
+46
+62
+48
+47
+62
+48
+47
+64
+49
+46
+66
+47
+41
+66
+49
+41
+60
+51
+42
+57
+54
+45
+53
+56
+45
+52
+55
+46
+54
+54
+46
+59
+50
+45
+64
+45
+41
+71
+41
+39
+79
+39
+39
+86
+41
+38
+91
+46
+40
+97
+53
+44
+102
+60
+48
+109
+63
+48
+121
+65
+48
+127
+64
+47
+134
+65
+49
+139
+66
+51
+143
+64
+51
+147
+61
+48
+147
+59
+47
+146
+56
+45
+147
+59
+47
+147
+61
+46
+148
+65
+49
+149
+66
+50
+148
+67
+50
+146
+65
+48
+145
+62
+46
+145
+59
+44
+151
+59
+48
+151
+58
+50
+146
+59
+49
+140
+61
+48
+136
+63
+48
+132
+63
+47
+130
+63
+46
+130
+63
+46
+136
+64
+49
+136
+63
+48
+138
+62
+49
+137
+61
+48
+136
+60
+47
+135
+59
+46
+132
+58
+45
+131
+59
+45
+123
+57
+43
+126
+64
+51
+118
+60
+46
+112
+56
+41
+118
+62
+45
+118
+62
+45
+118
+59
+45
+125
+63
+50
+125
+59
+47
+131
+63
+52
+136
+68
+57
+139
+72
+63
+138
+76
+65
+135
+77
+66
+133
+79
+67
+135
+78
+69
+144
+76
+73
+149
+84
+80
+147
+99
+89
+142
+113
+97
+138
+125
+106
+134
+138
+113
+135
+151
+124
+136
+159
+130
+139
+166
+135
+138
+167
+137
+139
+168
+138
+138
+168
+140
+132
+165
+136
+124
+161
+130
+114
+155
+123
+110
+151
+117
+104
+142
+105
+97
+133
+95
+91
+122
+88
+89
+116
+85
+90
+110
+83
+86
+101
+78
+79
+88
+69
+73
+75
+61
+66
+63
+54
+64
+57
+51
+58
+48
+46
+53
+43
+42
+51
+39
+41
+51
+39
+43
+51
+39
+43
+49
+38
+42
+47
+41
+45
+45
+41
+42
+45
+40
+44
+45
+39
+41
+47
+38
+43
+49
+38
+44
+51
+38
+45
+51
+38
+45
+52
+39
+46
+52
+39
+46
+51
+40
+48
+50
+40
+48
+48
+41
+49
+47
+42
+49
+47
+42
+49
+47
+42
+48
+47
+41
+45
+49
+43
+43
+48
+45
+40
+47
+47
+35
+60
+63
+42
+86
+92
+64
+112
+122
+88
+127
+139
+103
+141
+156
+117
+139
+157
+115
+140
+161
+118
+140
+166
+119
+138
+168
+118
+137
+170
+117
+142
+180
+123
+153
+191
+134
+159
+193
+143
+157
+190
+143
+150
+186
+138
+143
+179
+131
+136
+174
+125
+133
+171
+124
+131
+170
+123
+133
+170
+126
+131
+168
+125
+131
+166
+126
+128
+158
+124
+121
+148
+117
+114
+137
+109
+104
+124
+99
+89
+107
+85
+77
+90
+70
+74
+82
+61
+68
+73
+51
+62
+65
+46
+47
+48
+42
+48
+49
+43
+48
+49
+43
+48
+49
+43
+49
+50
+44
+49
+50
+44
+50
+49
+44
+51
+50
+45
+52
+51
+46
+52
+51
+46
+55
+52
+47
+55
+52
+47
+54
+51
+46
+53
+50
+45
+53
+48
+44
+53
+48
+44
+55
+47
+44
+55
+47
+44
+54
+46
+44
+54
+46
+44
+51
+46
+43
+50
+45
+42
+48
+44
+43
+48
+44
+43
+48
+44
+45
+47
+45
+46
+47
+45
+48
+45
+45
+47
+45
+44
+49
+43
+42
+47
+41
+42
+46
+41
+40
+45
+46
+41
+47
+47
+40
+47
+47
+40
+47
+47
+40
+47
+47
+41
+45
+47
+41
+45
+46
+42
+43
+46
+42
+43
+47
+43
+42
+47
+43
+42
+46
+45
+41
+46
+45
+41
+46
+47
+42
+46
+47
+42
+46
+47
+41
+46
+47
+42
+46
+46
+46
+46
+46
+48
+46
+46
+46
+46
+46
+46
+47
+46
+44
+47
+46
+44
+49
+45
+42
+51
+46
+43
+53
+45
+42
+53
+46
+40
+55
+46
+41
+56
+47
+40
+58
+47
+41
+59
+48
+42
+60
+50
+41
+61
+51
+42
+62
+53
+44
+62
+53
+44
+62
+53
+46
+62
+53
+46
+62
+53
+46
+61
+52
+45
+60
+51
+46
+60
+51
+46
+61
+50
+46
+60
+49
+45
+59
+48
+46
+59
+48
+46
+61
+47
+46
+61
+47
+46
+62
+48
+47
+64
+49
+46
+68
+47
+42
+70
+47
+41
+67
+50
+43
+64
+51
+43
+61
+52
+45
+60
+51
+44
+59
+50
+45
+62
+48
+45
+65
+44
+43
+70
+42
+41
+75
+41
+40
+80
+42
+39
+86
+45
+41
+92
+51
+45
+97
+57
+49
+103
+61
+47
+112
+65
+47
+120
+65
+45
+128
+65
+48
+136
+64
+50
+143
+63
+52
+145
+61
+51
+147
+58
+50
+147
+59
+49
+141
+57
+46
+139
+60
+47
+139
+62
+46
+140
+64
+48
+141
+65
+49
+141
+65
+49
+142
+65
+47
+145
+63
+49
+149
+59
+50
+149
+59
+50
+144
+60
+50
+139
+61
+48
+134
+62
+48
+131
+64
+47
+129
+63
+47
+129
+64
+46
+133
+64
+49
+134
+62
+47
+135
+61
+48
+136
+60
+46
+133
+59
+46
+132
+59
+44
+130
+58
+44
+127
+60
+44
+119
+57
+44
+119
+61
+49
+112
+59
+45
+109
+57
+43
+114
+63
+46
+114
+63
+46
+113
+57
+42
+117
+58
+44
+127
+61
+49
+132
+64
+53
+138
+68
+58
+140
+72
+61
+138
+74
+64
+135
+77
+65
+133
+79
+67
+136
+77
+69
+144
+74
+72
+149
+84
+82
+145
+102
+93
+138
+119
+102
+131
+135
+112
+127
+147
+119
+128
+159
+127
+131
+166
+134
+134
+167
+136
+139
+168
+138
+143
+167
+141
+143
+167
+141
+136
+165
+137
+127
+160
+131
+117
+156
+125
+109
+153
+118
+100
+147
+105
+94
+139
+96
+89
+130
+90
+89
+123
+88
+90
+119
+88
+88
+111
+83
+82
+97
+74
+77
+86
+67
+69
+73
+59
+65
+65
+55
+59
+56
+51
+53
+48
+45
+51
+42
+43
+50
+41
+42
+49
+40
+43
+46
+40
+42
+49
+40
+43
+48
+39
+44
+48
+39
+44
+48
+39
+44
+49
+38
+44
+51
+38
+45
+52
+39
+48
+52
+39
+48
+52
+39
+48
+51
+40
+48
+50
+40
+49
+48
+41
+49
+47
+42
+49
+45
+42
+51
+44
+43
+51
+44
+43
+49
+50
+45
+49
+50
+46
+45
+48
+44
+41
+45
+45
+37
+56
+58
+44
+83
+88
+66
+111
+120
+93
+128
+139
+105
+135
+150
+111
+134
+153
+108
+134
+158
+110
+136
+163
+112
+134
+164
+112
+132
+165
+112
+138
+173
+119
+147
+182
+128
+153
+185
+135
+150
+182
+132
+147
+179
+129
+140
+174
+123
+134
+171
+120
+130
+168
+119
+130
+168
+121
+131
+168
+124
+131
+166
+124
+130
+164
+127
+127
+157
+123
+120
+146
+117
+113
+136
+110
+104
+123
+101
+89
+106
+87
+77
+90
+72
+70
+77
+59
+64
+68
+51
+59
+62
+45
+49
+50
+44
+49
+50
+44
+49
+50
+44
+49
+50
+44
+50
+51
+45
+50
+51
+45
+52
+51
+46
+52
+51
+46
+53
+52
+47
+53
+52
+47
+56
+53
+48
+56
+53
+48
+56
+53
+48
+55
+52
+47
+55
+50
+46
+54
+49
+45
+56
+48
+45
+56
+48
+45
+55
+47
+44
+54
+46
+43
+52
+47
+44
+51
+46
+43
+50
+44
+44
+49
+45
+44
+49
+45
+46
+47
+45
+46
+48
+46
+49
+47
+45
+48
+45
+45
+47
+44
+44
+46
+43
+42
+47
+43
+41
+46
+47
+40
+47
+49
+39
+47
+47
+41
+45
+47
+41
+45
+47
+41
+45
+47
+41
+45
+46
+42
+43
+46
+42
+43
+48
+44
+43
+48
+44
+43
+47
+46
+42
+47
+46
+42
+47
+46
+41
+48
+47
+42
+48
+47
+42
+48
+47
+43
+47
+47
+45
+47
+47
+47
+48
+46
+47
+48
+46
+47
+48
+47
+45
+47
+46
+44
+49
+45
+42
+50
+45
+42
+54
+46
+43
+55
+48
+42
+57
+48
+43
+58
+49
+42
+60
+49
+43
+61
+51
+42
+62
+52
+43
+63
+53
+44
+63
+54
+45
+63
+54
+45
+64
+55
+46
+64
+55
+46
+63
+54
+47
+62
+53
+46
+61
+52
+45
+61
+52
+45
+61
+50
+46
+60
+49
+45
+59
+48
+46
+59
+48
+46
+59
+48
+46
+59
+48
+46
+60
+49
+47
+63
+49
+46
+68
+49
+43
+71
+47
+43
+74
+46
+43
+76
+44
+45
+79
+43
+47
+78
+42
+46
+74
+42
+47
+71
+42
+46
+68
+44
+44
+65
+46
+42
+66
+45
+40
+70
+45
+40
+79
+46
+41
+89
+48
+42
+99
+50
+45
+105
+52
+44
+107
+58
+44
+111
+59
+45
+119
+59
+48
+129
+61
+52
+135
+60
+54
+140
+60
+53
+141
+58
+52
+141
+58
+52
+138
+60
+50
+135
+61
+50
+134
+62
+50
+133
+63
+51
+134
+65
+50
+137
+65
+51
+140
+66
+53
+143
+67
+53
+142
+63
+50
+143
+61
+47
+140
+62
+49
+138
+62
+46
+135
+62
+47
+133
+62
+44
+134
+61
+46
+134
+61
+44
+137
+59
+46
+137
+60
+44
+136
+58
+45
+134
+58
+42
+132
+59
+44
+128
+60
+41
+126
+61
+43
+122
+61
+43
+124
+62
+49
+120
+60
+49
+117
+59
+47
+116
+60
+47
+118
+65
+49
+118
+65
+49
+117
+61
+46
+118
+59
+45
+127
+63
+53
+132
+65
+56
+138
+70
+61
+140
+72
+63
+138
+74
+65
+137
+74
+65
+136
+78
+67
+140
+77
+70
+147
+73
+72
+153
+83
+81
+151
+101
+92
+146
+117
+101
+138
+132
+110
+131
+144
+116
+129
+156
+123
+130
+164
+131
+134
+168
+135
+138
+169
+137
+143
+169
+140
+145
+168
+140
+144
+164
+137
+138
+158
+131
+130
+153
+125
+122
+151
+120
+107
+149
+109
+97
+146
+101
+92
+139
+97
+92
+134
+96
+93
+130
+96
+91
+124
+93
+85
+114
+86
+80
+104
+80
+70
+89
+69
+66
+80
+63
+58
+68
+57
+51
+58
+50
+46
+51
+44
+42
+47
+41
+40
+45
+41
+43
+42
+40
+50
+38
+40
+53
+36
+42
+53
+36
+42
+53
+36
+42
+52
+37
+42
+53
+38
+43
+51
+40
+46
+51
+42
+47
+48
+42
+46
+47
+42
+46
+44
+43
+48
+43
+44
+48
+41
+45
+48
+40
+45
+49
+38
+46
+49
+40
+45
+48
+49
+47
+50
+51
+47
+46
+46
+42
+39
+42
+42
+34
+53
+55
+42
+80
+85
+65
+109
+118
+91
+124
+138
+105
+128
+144
+107
+126
+147
+106
+127
+153
+106
+131
+159
+110
+128
+160
+110
+126
+160
+109
+128
+165
+113
+135
+172
+120
+141
+175
+124
+139
+173
+122
+136
+170
+120
+132
+169
+118
+129
+167
+118
+127
+167
+117
+127
+166
+119
+127
+166
+121
+127
+164
+121
+128
+162
+125
+125
+155
+121
+119
+145
+116
+112
+135
+109
+104
+124
+99
+89
+107
+85
+77
+90
+70
+69
+73
+58
+62
+64
+50
+57
+58
+44
+50
+51
+45
+50
+51
+45
+51
+52
+46
+51
+52
+46
+51
+52
+46
+52
+53
+47
+53
+52
+47
+53
+52
+47
+54
+53
+48
+55
+54
+49
+57
+54
+49
+58
+55
+50
+58
+55
+50
+57
+54
+49
+57
+52
+48
+57
+52
+48
+58
+50
+47
+57
+49
+46
+57
+49
+46
+56
+48
+45
+53
+48
+45
+52
+47
+44
+52
+46
+46
+52
+46
+46
+51
+47
+48
+51
+47
+48
+49
+47
+48
+49
+47
+50
+48
+46
+49
+46
+46
+48
+45
+45
+47
+45
+43
+46
+48
+41
+48
+50
+41
+46
+48
+42
+46
+48
+42
+46
+48
+42
+46
+48
+42
+44
+47
+43
+44
+47
+43
+42
+49
+45
+44
+49
+45
+44
+48
+47
+43
+48
+47
+43
+49
+48
+43
+49
+48
+43
+49
+48
+43
+49
+48
+44
+49
+49
+47
+49
+49
+49
+49
+47
+48
+49
+48
+46
+49
+48
+46
+50
+46
+43
+51
+46
+43
+51
+46
+42
+57
+50
+44
+57
+50
+44
+59
+50
+43
+60
+51
+44
+62
+52
+43
+64
+54
+45
+64
+54
+45
+65
+55
+46
+66
+56
+47
+65
+56
+47
+66
+57
+48
+65
+56
+47
+65
+56
+49
+64
+55
+48
+62
+53
+46
+62
+53
+46
+61
+50
+46
+61
+50
+46
+60
+49
+47
+59
+48
+46
+59
+48
+46
+60
+49
+47
+61
+50
+48
+63
+49
+46
+66
+51
+46
+70
+49
+46
+77
+45
+46
+84
+41
+48
+88
+38
+47
+87
+37
+46
+81
+38
+47
+75
+40
+46
+68
+47
+46
+62
+49
+43
+60
+50
+41
+64
+50
+41
+72
+47
+40
+84
+47
+41
+96
+45
+42
+101
+46
+41
+105
+57
+47
+107
+59
+47
+117
+60
+51
+125
+60
+54
+133
+59
+56
+137
+59
+57
+138
+59
+55
+136
+58
+54
+137
+62
+56
+134
+64
+56
+134
+66
+57
+133
+66
+57
+133
+67
+55
+134
+66
+55
+135
+65
+55
+137
+65
+53
+137
+64
+49
+137
+64
+47
+136
+63
+46
+136
+63
+46
+135
+62
+45
+136
+60
+44
+136
+59
+43
+137
+58
+43
+138
+56
+42
+138
+56
+42
+136
+57
+42
+133
+57
+41
+130
+59
+41
+125
+60
+40
+122
+61
+40
+120
+62
+42
+127
+64
+49
+122
+55
+46
+120
+56
+46
+120
+60
+49
+117
+59
+45
+118
+62
+47
+123
+65
+51
+123
+64
+50
+128
+66
+55
+132
+68
+58
+135
+71
+61
+137
+73
+63
+136
+73
+64
+138
+75
+66
+138
+78
+68
+140
+80
+72
+144
+81
+74
+147
+90
+81
+148
+101
+91
+143
+114
+98
+137
+125
+103
+132
+136
+109
+131
+147
+118
+131
+156
+124
+135
+165
+131
+136
+167
+135
+139
+168
+137
+143
+168
+138
+143
+163
+135
+139
+158
+130
+136
+152
+126
+127
+150
+121
+114
+148
+111
+108
+146
+105
+104
+142
+103
+102
+140
+101
+103
+139
+103
+100
+134
+101
+96
+125
+95
+92
+118
+91
+81
+103
+80
+76
+93
+74
+66
+80
+63
+57
+68
+54
+50
+58
+47
+46
+52
+42
+44
+47
+40
+45
+42
+37
+53
+37
+38
+56
+35
+40
+56
+35
+40
+55
+36
+40
+52
+37
+40
+51
+39
+43
+50
+41
+44
+48
+44
+45
+44
+42
+43
+43
+43
+45
+42
+43
+45
+40
+44
+45
+39
+44
+47
+39
+44
+47
+37
+45
+47
+40
+44
+45
+46
+42
+43
+49
+43
+43
+48
+43
+39
+46
+43
+34
+56
+56
+44
+80
+85
+65
+105
+113
+89
+118
+132
+99
+123
+140
+104
+121
+143
+104
+124
+150
+105
+127
+156
+108
+125
+159
+109
+121
+158
+107
+122
+160
+109
+127
+165
+114
+130
+167
+116
+128
+165
+113
+125
+163
+112
+125
+163
+112
+125
+165
+115
+126
+165
+118
+126
+165
+120
+125
+164
+120
+124
+161
+120
+125
+159
+122
+122
+153
+119
+117
+144
+113
+110
+135
+106
+101
+124
+98
+87
+107
+82
+78
+91
+71
+69
+71
+57
+63
+61
+48
+57
+55
+42
+52
+53
+47
+52
+53
+47
+52
+53
+47
+53
+54
+48
+53
+54
+48
+53
+54
+48
+55
+54
+49
+55
+54
+49
+56
+55
+50
+56
+55
+50
+59
+56
+51
+60
+57
+52
+60
+57
+52
+60
+57
+52
+60
+55
+51
+60
+55
+51
+60
+52
+49
+60
+52
+49
+59
+51
+48
+59
+51
+48
+56
+51
+48
+55
+50
+47
+54
+49
+46
+54
+49
+46
+53
+49
+48
+54
+50
+49
+54
+50
+49
+51
+49
+50
+50
+48
+49
+49
+47
+48
+48
+46
+47
+49
+45
+46
+50
+44
+48
+52
+43
+46
+52
+43
+46
+52
+43
+46
+50
+44
+46
+50
+44
+44
+50
+44
+44
+50
+44
+44
+51
+47
+46
+51
+47
+44
+51
+47
+44
+51
+47
+44
+50
+49
+44
+50
+49
+44
+51
+50
+45
+51
+50
+46
+51
+50
+48
+51
+50
+48
+51
+50
+48
+51
+50
+48
+53
+49
+48
+53
+49
+46
+54
+49
+46
+54
+49
+45
+59
+52
+46
+60
+53
+47
+61
+52
+45
+63
+54
+45
+65
+55
+46
+66
+56
+47
+69
+56
+47
+67
+57
+47
+68
+58
+49
+68
+58
+49
+69
+59
+50
+68
+58
+49
+67
+57
+48
+66
+56
+47
+64
+53
+47
+64
+53
+47
+62
+51
+47
+62
+51
+47
+61
+50
+46
+61
+50
+46
+61
+50
+48
+61
+50
+48
+62
+51
+49
+62
+51
+49
+66
+52
+49
+70
+50
+49
+78
+48
+50
+85
+44
+52
+90
+40
+51
+89
+39
+50
+83
+40
+49
+76
+44
+49
+68
+50
+48
+60
+53
+45
+57
+55
+43
+60
+54
+42
+68
+51
+41
+78
+49
+41
+90
+47
+41
+94
+47
+41
+102
+58
+49
+106
+59
+51
+115
+60
+55
+122
+61
+58
+130
+60
+58
+134
+60
+59
+135
+59
+59
+134
+58
+58
+130
+59
+55
+129
+62
+56
+129
+65
+56
+129
+66
+57
+131
+67
+58
+131
+67
+58
+133
+64
+57
+132
+64
+55
+132
+66
+50
+132
+67
+49
+133
+64
+48
+134
+62
+47
+136
+60
+46
+137
+59
+46
+139
+57
+45
+140
+56
+45
+138
+54
+43
+137
+55
+43
+135
+56
+43
+131
+58
+43
+127
+60
+43
+122
+61
+42
+119
+62
+42
+120
+62
+42
+127
+57
+45
+122
+48
+39
+129
+56
+47
+131
+63
+52
+117
+53
+43
+113
+53
+42
+124
+66
+54
+125
+67
+55
+127
+69
+58
+129
+71
+60
+131
+73
+62
+132
+74
+63
+133
+74
+66
+135
+76
+68
+138
+79
+71
+137
+85
+74
+130
+94
+78
+129
+102
+81
+134
+109
+89
+135
+114
+93
+136
+121
+98
+137
+131
+105
+141
+144
+117
+141
+154
+124
+138
+159
+126
+136
+163
+130
+136
+167
+133
+137
+168
+134
+135
+166
+132
+132
+162
+128
+129
+156
+125
+127
+151
+119
+125
+144
+112
+125
+142
+108
+123
+140
+108
+120
+139
+107
+120
+139
+109
+117
+136
+108
+112
+131
+103
+108
+126
+100
+99
+113
+88
+92
+104
+82
+83
+90
+72
+73
+75
+61
+66
+64
+52
+61
+54
+44
+57
+47
+38
+55
+42
+36
+57
+39
+39
+57
+37
+39
+54
+38
+39
+52
+38
+38
+49
+39
+38
+46
+40
+40
+44
+43
+41
+44
+44
+42
+41
+43
+40
+41
+43
+42
+41
+43
+42
+41
+43
+42
+42
+42
+44
+42
+42
+44
+43
+41
+44
+45
+41
+42
+44
+35
+36
+50
+42
+39
+53
+48
+42
+56
+54
+42
+66
+67
+53
+85
+90
+70
+102
+112
+87
+110
+125
+94
+116
+136
+101
+113
+138
+98
+117
+144
+101
+120
+152
+105
+119
+155
+107
+115
+153
+104
+116
+154
+105
+119
+159
+107
+122
+162
+110
+120
+160
+108
+119
+159
+109
+120
+160
+110
+121
+163
+115
+123
+165
+117
+123
+165
+119
+124
+163
+119
+121
+158
+117
+122
+156
+119
+119
+150
+116
+115
+142
+111
+109
+134
+104
+100
+123
+95
+87
+107
+80
+78
+92
+69
+68
+69
+55
+62
+58
+47
+56
+52
+41
+53
+54
+48
+53
+54
+48
+54
+55
+49
+54
+55
+49
+55
+56
+50
+55
+56
+50
+56
+55
+50
+56
+55
+50
+57
+56
+51
+58
+57
+52
+61
+58
+53
+62
+59
+54
+62
+59
+54
+62
+59
+54
+62
+57
+53
+62
+57
+53
+63
+55
+52
+63
+55
+52
+62
+54
+51
+61
+53
+50
+59
+54
+51
+58
+53
+50
+57
+52
+49
+57
+52
+49
+56
+52
+49
+56
+52
+51
+57
+53
+52
+56
+52
+51
+55
+51
+50
+52
+51
+49
+53
+49
+50
+52
+48
+47
+54
+45
+48
+54
+45
+46
+54
+45
+48
+54
+45
+46
+52
+46
+46
+52
+46
+46
+52
+46
+46
+52
+47
+44
+52
+48
+45
+52
+48
+45
+52
+48
+45
+53
+49
+46
+51
+50
+45
+51
+50
+45
+52
+51
+46
+52
+51
+46
+52
+51
+47
+52
+51
+49
+53
+52
+50
+53
+52
+48
+56
+52
+49
+56
+53
+48
+57
+52
+48
+58
+53
+47
+61
+54
+48
+62
+55
+47
+64
+55
+46
+65
+56
+47
+67
+57
+48
+68
+58
+48
+71
+58
+49
+72
+59
+50
+70
+60
+51
+70
+60
+51
+70
+60
+51
+70
+60
+51
+69
+59
+50
+67
+57
+48
+66
+55
+49
+65
+54
+48
+64
+53
+49
+64
+53
+49
+63
+52
+48
+62
+51
+47
+62
+51
+49
+63
+52
+50
+64
+53
+51
+64
+53
+51
+65
+54
+50
+68
+53
+50
+75
+50
+53
+81
+49
+54
+86
+46
+54
+85
+45
+53
+82
+47
+53
+75
+49
+50
+68
+53
+50
+63
+56
+48
+61
+57
+45
+63
+57
+43
+67
+55
+41
+73
+54
+40
+83
+50
+41
+88
+50
+41
+93
+50
+43
+100
+51
+44
+108
+53
+48
+118
+54
+52
+125
+55
+55
+130
+56
+55
+131
+55
+55
+130
+54
+54
+126
+55
+53
+125
+58
+52
+125
+60
+54
+125
+62
+53
+128
+63
+57
+131
+64
+56
+134
+63
+57
+133
+65
+56
+131
+65
+51
+131
+65
+49
+132
+65
+49
+132
+63
+48
+136
+60
+47
+136
+58
+46
+137
+57
+46
+138
+56
+45
+135
+55
+44
+134
+56
+44
+131
+57
+44
+128
+59
+44
+126
+60
+44
+124
+61
+44
+121
+62
+44
+126
+60
+44
+133
+53
+42
+138
+51
+44
+160
+77
+69
+166
+89
+81
+138
+65
+56
+124
+57
+48
+130
+70
+59
+128
+75
+61
+123
+71
+58
+122
+74
+60
+124
+76
+62
+125
+77
+63
+127
+77
+66
+130
+80
+69
+137
+85
+74
+134
+92
+76
+119
+105
+79
+117
+112
+82
+130
+114
+88
+141
+117
+93
+150
+117
+98
+159
+124
+105
+166
+135
+115
+167
+145
+122
+157
+147
+122
+150
+153
+124
+146
+160
+127
+143
+165
+129
+139
+165
+130
+134
+161
+126
+130
+156
+121
+131
+150
+118
+134
+143
+112
+136
+141
+111
+134
+140
+112
+131
+142
+112
+129
+142
+112
+126
+141
+112
+122
+138
+109
+118
+134
+107
+109
+125
+98
+104
+116
+92
+96
+104
+83
+87
+90
+71
+80
+77
+62
+72
+64
+51
+66
+54
+42
+64
+47
+39
+61
+43
+39
+60
+42
+40
+56
+42
+39
+53
+42
+40
+50
+42
+39
+47
+44
+39
+44
+45
+39
+43
+45
+40
+43
+45
+40
+44
+45
+40
+45
+44
+42
+47
+43
+42
+51
+41
+42
+52
+40
+42
+54
+39
+42
+54
+40
+40
+51
+40
+36
+60
+51
+44
+69
+62
+52
+73
+71
+56
+81
+82
+64
+93
+98
+75
+103
+113
+86
+106
+121
+90
+110
+130
+93
+107
+132
+92
+108
+137
+93
+112
+145
+98
+113
+149
+101
+111
+149
+100
+111
+151
+101
+114
+154
+102
+117
+159
+109
+114
+156
+106
+113
+155
+105
+116
+158
+110
+120
+162
+114
+122
+164
+118
+121
+162
+118
+121
+159
+118
+118
+154
+116
+119
+153
+118
+117
+148
+114
+111
+141
+107
+106
+133
+102
+99
+124
+94
+85
+108
+79
+78
+92
+69
+67
+68
+54
+64
+57
+47
+58
+51
+41
+54
+55
+49
+55
+56
+50
+55
+56
+50
+55
+56
+50
+56
+57
+51
+56
+57
+51
+57
+56
+51
+58
+57
+52
+58
+57
+52
+59
+58
+53
+62
+59
+54
+63
+60
+55
+63
+60
+55
+63
+60
+55
+64
+59
+55
+64
+59
+55
+66
+58
+55
+66
+58
+55
+65
+57
+54
+64
+56
+53
+61
+56
+52
+61
+56
+52
+60
+55
+51
+60
+55
+51
+60
+55
+51
+60
+55
+52
+60
+55
+52
+60
+55
+52
+59
+54
+51
+57
+53
+50
+57
+51
+51
+56
+51
+48
+56
+47
+48
+57
+47
+46
+56
+47
+48
+56
+48
+46
+56
+48
+46
+56
+48
+46
+54
+49
+46
+54
+49
+45
+54
+49
+45
+54
+49
+45
+53
+50
+45
+53
+50
+45
+54
+51
+46
+54
+51
+46
+55
+52
+47
+55
+52
+47
+53
+52
+48
+53
+52
+48
+56
+52
+49
+57
+53
+50
+58
+54
+51
+60
+57
+52
+61
+56
+52
+64
+57
+51
+64
+55
+48
+65
+56
+47
+67
+57
+48
+68
+58
+48
+71
+58
+49
+72
+60
+48
+73
+61
+49
+73
+61
+49
+74
+61
+52
+74
+61
+52
+74
+61
+52
+73
+60
+51
+70
+60
+51
+68
+58
+49
+66
+56
+47
+65
+55
+46
+65
+56
+49
+64
+55
+48
+64
+55
+50
+63
+54
+49
+63
+54
+49
+64
+55
+50
+64
+55
+50
+65
+56
+51
+64
+54
+52
+65
+55
+53
+67
+56
+54
+70
+56
+55
+72
+57
+54
+74
+56
+54
+74
+56
+54
+72
+57
+52
+69
+56
+48
+69
+56
+47
+69
+57
+45
+70
+56
+43
+73
+57
+44
+73
+57
+42
+76
+57
+43
+82
+54
+42
+90
+47
+38
+100
+47
+39
+110
+51
+45
+122
+54
+51
+131
+57
+56
+137
+59
+57
+139
+59
+58
+139
+61
+59
+139
+65
+62
+135
+64
+58
+130
+61
+54
+127
+60
+51
+127
+58
+51
+130
+60
+52
+136
+61
+55
+138
+64
+55
+133
+63
+53
+132
+64
+51
+132
+62
+50
+134
+62
+50
+134
+60
+49
+133
+59
+48
+132
+58
+47
+131
+59
+47
+128
+58
+46
+127
+59
+46
+126
+60
+46
+127
+61
+47
+127
+61
+47
+128
+60
+47
+129
+59
+47
+135
+57
+47
+144
+49
+43
+160
+61
+56
+203
+108
+102
+216
+127
+121
+171
+91
+84
+138
+68
+60
+136
+76
+65
+127
+78
+64
+117
+73
+60
+114
+77
+61
+113
+80
+63
+114
+81
+64
+118
+83
+64
+124
+85
+68
+132
+90
+74
+128
+100
+79
+113
+113
+79
+116
+120
+85
+138
+118
+91
+156
+115
+95
+173
+109
+99
+186
+107
+102
+194
+111
+107
+195
+116
+111
+191
+128
+119
+183
+137
+122
+173
+148
+126
+163
+156
+128
+154
+159
+129
+145
+159
+126
+139
+154
+121
+137
+151
+118
+140
+143
+114
+142
+142
+114
+139
+144
+114
+135
+146
+114
+132
+147
+114
+128
+147
+115
+122
+146
+112
+119
+144
+112
+112
+137
+105
+107
+130
+101
+103
+119
+92
+94
+107
+81
+88
+93
+71
+80
+79
+59
+72
+67
+48
+67
+58
+43
+65
+50
+43
+64
+49
+44
+59
+48
+42
+56
+47
+42
+52
+47
+41
+50
+47
+40
+46
+47
+39
+46
+47
+41
+48
+47
+42
+51
+46
+42
+54
+44
+43
+58
+42
+43
+62
+40
+43
+65
+38
+43
+69
+36
+43
+67
+38
+40
+70
+53
+45
+76
+67
+52
+86
+81
+62
+91
+89
+68
+96
+98
+74
+103
+109
+81
+105
+119
+86
+106
+123
+87
+108
+130
+91
+103
+130
+87
+102
+134
+87
+108
+142
+92
+111
+148
+97
+110
+148
+97
+110
+150
+98
+114
+154
+102
+115
+157
+107
+111
+155
+106
+111
+153
+105
+114
+156
+110
+119
+160
+116
+121
+162
+120
+120
+158
+119
+117
+155
+118
+115
+151
+115
+117
+151
+118
+115
+146
+114
+110
+139
+108
+105
+132
+99
+98
+123
+91
+84
+109
+77
+77
+93
+67
+72
+73
+59
+69
+60
+51
+63
+54
+45
+55
+56
+50
+55
+56
+50
+56
+57
+51
+56
+57
+51
+56
+57
+51
+57
+58
+52
+58
+57
+52
+58
+57
+52
+59
+58
+53
+60
+59
+54
+63
+60
+55
+64
+61
+56
+64
+61
+56
+64
+61
+56
+65
+60
+56
+65
+60
+56
+67
+59
+56
+67
+59
+56
+67
+59
+56
+66
+58
+55
+63
+58
+54
+62
+57
+53
+62
+57
+53
+61
+56
+52
+62
+57
+53
+62
+57
+53
+62
+57
+53
+62
+57
+53
+61
+56
+53
+60
+55
+51
+58
+53
+49
+59
+51
+48
+58
+48
+46
+58
+48
+46
+57
+49
+46
+57
+49
+46
+57
+49
+47
+57
+49
+46
+57
+49
+46
+55
+50
+46
+54
+49
+45
+54
+49
+45
+54
+51
+46
+54
+51
+46
+54
+51
+46
+55
+52
+47
+55
+52
+47
+55
+52
+47
+53
+52
+48
+54
+53
+49
+57
+53
+50
+59
+56
+51
+60
+57
+52
+63
+58
+52
+66
+59
+53
+66
+59
+51
+65
+56
+47
+66
+58
+47
+67
+57
+47
+69
+59
+47
+72
+60
+48
+73
+61
+49
+74
+62
+50
+74
+62
+50
+75
+62
+53
+75
+62
+53
+74
+61
+52
+74
+61
+52
+70
+60
+51
+69
+59
+50
+67
+57
+48
+66
+56
+47
+66
+57
+50
+66
+57
+50
+65
+56
+51
+64
+55
+50
+64
+55
+50
+65
+56
+51
+66
+57
+52
+66
+57
+52
+63
+56
+50
+64
+57
+51
+66
+59
+53
+69
+60
+55
+71
+60
+54
+73
+60
+54
+77
+60
+53
+78
+59
+52
+77
+54
+46
+78
+54
+44
+81
+54
+43
+81
+54
+43
+81
+55
+42
+82
+56
+43
+80
+57
+41
+86
+54
+39
+103
+53
+42
+114
+54
+44
+126
+59
+51
+137
+64
+57
+149
+68
+64
+155
+72
+68
+159
+74
+71
+159
+76
+70
+160
+81
+74
+153
+76
+68
+142
+68
+59
+133
+59
+48
+132
+55
+45
+133
+55
+45
+140
+57
+49
+143
+60
+52
+139
+60
+53
+138
+61
+55
+137
+60
+54
+136
+59
+53
+136
+59
+53
+132
+59
+52
+128
+60
+51
+125
+61
+51
+122
+62
+51
+122
+62
+51
+122
+62
+51
+125
+61
+51
+129
+59
+51
+134
+57
+51
+139
+54
+51
+146
+51
+49
+150
+41
+38
+176
+63
+59
+234
+125
+122
+252
+150
+146
+195
+104
+99
+149
+72
+64
+137
+75
+64
+120
+72
+58
+112
+76
+60
+106
+81
+61
+104
+83
+62
+106
+86
+62
+111
+86
+64
+118
+90
+69
+128
+95
+76
+130
+102
+80
+124
+113
+81
+134
+118
+85
+160
+115
+92
+183
+107
+94
+203
+95
+95
+214
+84
+92
+218
+81
+91
+218
+82
+92
+230
+111
+117
+219
+121
+120
+207
+133
+124
+195
+142
+126
+184
+147
+128
+174
+148
+125
+165
+145
+120
+162
+142
+118
+159
+137
+114
+159
+137
+116
+156
+140
+117
+152
+142
+117
+148
+144
+117
+141
+144
+115
+137
+143
+115
+133
+144
+114
+127
+137
+110
+124
+133
+106
+119
+121
+97
+112
+110
+87
+105
+97
+78
+98
+82
+66
+87
+68
+53
+83
+59
+47
+79
+52
+45
+77
+49
+45
+73
+48
+44
+68
+47
+42
+64
+47
+40
+59
+46
+38
+55
+46
+39
+54
+47
+39
+57
+48
+41
+58
+47
+41
+61
+46
+43
+65
+44
+43
+70
+41
+43
+72
+40
+43
+75
+39
+43
+72
+41
+39
+84
+66
+52
+89
+81
+60
+100
+94
+70
+103
+101
+76
+105
+108
+79
+110
+117
+86
+109
+123
+88
+108
+126
+88
+107
+132
+90
+103
+132
+86
+103
+135
+86
+109
+143
+93
+112
+149
+98
+113
+150
+98
+114
+153
+100
+117
+157
+105
+116
+155
+108
+111
+153
+107
+111
+150
+106
+114
+153
+109
+119
+157
+118
+121
+159
+120
+119
+154
+121
+116
+150
+117
+115
+148
+117
+117
+148
+117
+115
+144
+113
+111
+138
+107
+105
+132
+101
+97
+124
+91
+84
+109
+77
+77
+93
+66
+78
+79
+63
+76
+67
+58
+69
+60
+51
+57
+58
+52
+57
+58
+52
+57
+58
+52
+57
+58
+52
+57
+58
+52
+58
+59
+53
+61
+60
+55
+61
+60
+55
+61
+60
+55
+61
+60
+55
+64
+61
+56
+64
+61
+56
+65
+62
+57
+66
+63
+58
+68
+63
+59
+68
+63
+59
+69
+64
+60
+69
+64
+60
+69
+64
+58
+68
+63
+57
+68
+63
+57
+67
+62
+56
+69
+62
+56
+68
+61
+55
+66
+59
+53
+66
+59
+53
+66
+59
+53
+66
+59
+53
+66
+58
+55
+66
+59
+53
+65
+58
+52
+65
+58
+52
+65
+56
+51
+65
+56
+51
+65
+56
+51
+64
+55
+50
+64
+54
+52
+62
+55
+49
+62
+55
+49
+62
+55
+49
+60
+55
+49
+60
+55
+49
+59
+54
+48
+58
+53
+47
+56
+53
+46
+56
+53
+46
+55
+52
+47
+55
+52
+47
+57
+54
+49
+57
+54
+49
+57
+54
+49
+58
+55
+48
+60
+55
+49
+61
+56
+50
+65
+58
+50
+66
+59
+49
+67
+58
+49
+68
+60
+49
+70
+60
+50
+74
+62
+50
+75
+63
+51
+76
+64
+50
+78
+64
+51
+78
+64
+53
+78
+64
+55
+78
+64
+55
+76
+63
+54
+75
+62
+53
+73
+60
+51
+72
+59
+50
+69
+59
+50
+69
+59
+50
+66
+57
+48
+65
+56
+47
+64
+57
+49
+63
+56
+48
+63
+56
+48
+63
+56
+48
+64
+57
+51
+64
+57
+51
+60
+53
+47
+77
+68
+61
+77
+64
+58
+75
+58
+51
+84
+64
+57
+82
+54
+50
+81
+48
+43
+95
+60
+54
+91
+52
+45
+94
+54
+46
+95
+52
+43
+92
+48
+39
+94
+47
+37
+101
+54
+44
+109
+61
+49
+114
+60
+48
+137
+73
+61
+143
+71
+59
+151
+73
+63
+159
+75
+65
+159
+70
+62
+155
+62
+55
+154
+61
+54
+158
+68
+59
+166
+78
+68
+164
+80
+69
+168
+86
+74
+171
+89
+75
+165
+79
+66
+153
+65
+53
+151
+59
+48
+156
+62
+54
+148
+57
+56
+146
+56
+56
+143
+53
+53
+137
+51
+50
+136
+55
+52
+135
+62
+56
+127
+63
+54
+117
+60
+49
+117
+65
+52
+115
+63
+50
+116
+59
+48
+121
+57
+48
+133
+54
+50
+142
+50
+51
+149
+44
+49
+155
+38
+44
+198
+72
+73
+229
+99
+97
+194
+70
+68
+202
+89
+85
+224
+122
+118
+171
+86
+79
+134
+70
+60
+132
+86
+70
+109
+82
+61
+105
+91
+65
+105
+98
+70
+107
+100
+72
+107
+95
+69
+111
+94
+68
+125
+99
+76
+141
+106
+84
+145
+99
+76
+177
+110
+93
+208
+111
+104
+218
+89
+93
+222
+59
+76
+229
+45
+69
+241
+44
+72
+243
+49
+76
+243
+65
+89
+233
+74
+92
+227
+91
+101
+226
+111
+114
+224
+124
+124
+218
+129
+125
+216
+133
+127
+215
+138
+130
+196
+126
+118
+192
+128
+119
+189
+131
+120
+185
+133
+120
+181
+135
+120
+175
+136
+119
+171
+138
+121
+167
+138
+120
+157
+128
+112
+157
+125
+110
+154
+121
+106
+150
+110
+98
+145
+98
+90
+135
+85
+78
+127
+72
+67
+123
+65
+63
+117
+58
+60
+103
+47
+50
+100
+48
+50
+97
+49
+49
+79
+39
+39
+71
+37
+35
+76
+48
+45
+77
+53
+49
+72
+51
+46
+69
+50
+44
+68
+49
+45
+70
+49
+46
+70
+46
+44
+71
+43
+42
+75
+45
+45
+81
+54
+47
+89
+72
+52
+96
+87
+58
+102
+95
+66
+103
+100
+69
+107
+111
+78
+117
+124
+90
+117
+132
+93
+111
+129
+89
+108
+131
+87
+108
+135
+90
+112
+141
+93
+114
+146
+97
+115
+149
+98
+117
+151
+100
+119
+153
+102
+118
+155
+104
+114
+150
+106
+115
+152
+111
+115
+151
+113
+113
+149
+111
+115
+149
+116
+119
+153
+120
+122
+152
+124
+121
+150
+122
+120
+149
+121
+115
+141
+114
+109
+135
+106
+107
+132
+102
+105
+130
+100
+97
+122
+90
+84
+109
+77
+79
+95
+68
+79
+80
+64
+84
+75
+66
+82
+73
+64
+57
+58
+52
+57
+58
+52
+57
+58
+52
+57
+58
+52
+58
+59
+53
+59
+60
+54
+62
+61
+56
+63
+62
+57
+62
+61
+56
+62
+61
+56
+65
+62
+57
+65
+62
+57
+66
+63
+58
+67
+64
+59
+68
+63
+59
+68
+63
+59
+70
+65
+61
+69
+64
+60
+69
+64
+58
+69
+64
+58
+68
+63
+57
+68
+63
+57
+69
+62
+56
+69
+62
+56
+69
+62
+56
+69
+62
+56
+69
+62
+56
+68
+61
+53
+67
+60
+54
+67
+60
+52
+68
+59
+52
+67
+58
+49
+66
+57
+50
+66
+57
+50
+66
+57
+50
+66
+57
+50
+65
+56
+51
+65
+56
+51
+64
+57
+51
+64
+57
+51
+62
+55
+49
+60
+55
+49
+59
+54
+48
+59
+54
+48
+57
+54
+47
+56
+53
+46
+55
+52
+47
+55
+52
+47
+57
+54
+49
+57
+54
+47
+57
+54
+47
+58
+55
+48
+60
+55
+49
+62
+58
+49
+65
+58
+48
+66
+60
+48
+67
+59
+48
+69
+59
+47
+73
+61
+49
+74
+62
+48
+76
+64
+50
+76
+64
+50
+78
+64
+51
+78
+64
+51
+78
+64
+53
+78
+64
+55
+77
+63
+54
+74
+61
+52
+73
+60
+51
+72
+59
+50
+69
+59
+50
+69
+59
+50
+67
+58
+49
+66
+57
+48
+64
+57
+49
+64
+57
+49
+64
+57
+49
+64
+57
+49
+65
+58
+52
+65
+58
+50
+67
+58
+51
+73
+56
+49
+75
+47
+43
+86
+46
+44
+106
+55
+54
+116
+58
+57
+123
+59
+59
+133
+69
+67
+129
+68
+63
+131
+72
+64
+132
+73
+65
+132
+72
+62
+141
+74
+66
+152
+79
+72
+161
+80
+76
+162
+79
+71
+147
+68
+55
+148
+66
+52
+154
+66
+54
+159
+67
+56
+160
+62
+51
+156
+55
+45
+156
+55
+45
+159
+61
+48
+163
+67
+53
+155
+63
+48
+153
+64
+48
+160
+69
+51
+164
+71
+54
+167
+70
+54
+174
+72
+58
+182
+78
+69
+181
+75
+77
+176
+71
+76
+167
+64
+68
+155
+56
+59
+147
+55
+56
+142
+61
+58
+133
+62
+56
+121
+61
+51
+114
+60
+48
+124
+72
+59
+135
+75
+65
+133
+62
+56
+133
+43
+43
+149
+40
+46
+181
+57
+68
+211
+75
+87
+219
+76
+78
+221
+79
+77
+199
+64
+61
+190
+65
+63
+208
+96
+92
+179
+89
+81
+132
+64
+53
+130
+84
+68
+121
+97
+73
+101
+91
+64
+96
+92
+63
+107
+104
+73
+117
+108
+79
+119
+102
+74
+127
+99
+75
+150
+99
+78
+185
+102
+88
+210
+97
+91
+224
+88
+90
+231
+67
+78
+238
+46
+69
+249
+39
+68
+255
+40
+72
+255
+42
+73
+255
+48
+78
+243
+53
+78
+236
+63
+82
+234
+76
+90
+230
+82
+94
+224
+84
+93
+222
+85
+93
+221
+90
+98
+219
+98
+105
+216
+101
+108
+214
+105
+110
+213
+108
+113
+208
+112
+114
+206
+116
+116
+204
+118
+119
+201
+120
+119
+204
+124
+125
+203
+121
+123
+203
+118
+121
+202
+113
+117
+202
+107
+115
+201
+101
+111
+199
+97
+108
+197
+95
+108
+195
+97
+110
+177
+84
+95
+163
+76
+85
+153
+72
+81
+141
+68
+75
+132
+70
+73
+107
+55
+57
+72
+28
+27
+84
+49
+45
+77
+48
+42
+72
+49
+43
+74
+54
+47
+75
+56
+49
+75
+58
+50
+79
+62
+54
+85
+69
+56
+91
+79
+53
+99
+90
+57
+103
+97
+65
+105
+102
+69
+110
+114
+79
+122
+130
+93
+122
+137
+98
+116
+134
+94
+114
+137
+95
+112
+137
+95
+112
+139
+96
+113
+142
+96
+117
+146
+100
+119
+148
+100
+119
+148
+100
+119
+148
+102
+115
+146
+105
+120
+150
+114
+122
+151
+120
+121
+150
+120
+126
+152
+125
+131
+157
+132
+133
+157
+135
+131
+155
+133
+129
+153
+131
+122
+146
+122
+114
+137
+111
+109
+132
+104
+104
+129
+100
+96
+121
+91
+84
+109
+77
+78
+97
+69
+82
+83
+67
+86
+80
+68
+86
+79
+69
+56
+57
+51
+56
+57
+51
+56
+57
+51
+57
+58
+52
+59
+60
+54
+60
+61
+55
+63
+62
+57
+64
+63
+58
+64
+63
+58
+64
+63
+58
+67
+64
+59
+67
+64
+59
+67
+64
+59
+67
+64
+59
+68
+63
+59
+68
+63
+59
+70
+65
+59
+70
+65
+59
+70
+65
+59
+69
+64
+58
+69
+64
+58
+69
+64
+58
+71
+64
+56
+70
+63
+55
+74
+65
+58
+73
+64
+57
+72
+63
+56
+71
+62
+53
+70
+61
+54
+69
+60
+51
+70
+60
+51
+69
+59
+49
+68
+58
+49
+68
+58
+49
+68
+58
+49
+68
+58
+49
+68
+59
+52
+68
+59
+52
+68
+59
+52
+67
+60
+52
+63
+56
+48
+63
+56
+48
+60
+55
+49
+59
+54
+48
+58
+53
+47
+58
+53
+47
+57
+52
+46
+57
+52
+46
+57
+54
+47
+57
+54
+47
+58
+53
+47
+59
+55
+46
+62
+55
+47
+64
+57
+47
+66
+57
+48
+67
+59
+48
+69
+59
+49
+70
+60
+48
+73
+61
+49
+75
+63
+49
+77
+63
+50
+77
+64
+48
+78
+65
+49
+77
+64
+48
+80
+63
+53
+77
+63
+52
+76
+62
+51
+75
+61
+50
+73
+60
+51
+72
+59
+50
+69
+59
+49
+68
+58
+48
+67
+58
+49
+67
+58
+49
+65
+58
+48
+65
+58
+48
+63
+59
+50
+64
+60
+51
+64
+60
+51
+68
+59
+52
+83
+69
+60
+82
+51
+46
+105
+51
+51
+142
+65
+71
+173
+76
+87
+193
+86
+96
+203
+93
+102
+196
+96
+98
+154
+66
+62
+150
+73
+63
+149
+77
+65
+155
+79
+66
+171
+82
+74
+190
+85
+82
+203
+80
+83
+196
+76
+75
+163
+65
+52
+157
+66
+48
+160
+64
+48
+165
+63
+49
+165
+59
+46
+163
+55
+43
+164
+56
+43
+167
+61
+47
+171
+69
+54
+161
+62
+43
+152
+55
+36
+157
+58
+39
+165
+62
+45
+172
+65
+47
+178
+67
+50
+184
+67
+58
+167
+48
+50
+177
+57
+66
+185
+68
+76
+190
+75
+82
+186
+77
+82
+173
+75
+76
+150
+65
+62
+130
+55
+49
+123
+56
+47
+118
+54
+44
+122
+49
+42
+133
+48
+45
+156
+51
+55
+186
+60
+71
+215
+70
+87
+232
+77
+91
+225
+71
+73
+206
+54
+51
+205
+60
+57
+187
+52
+49
+198
+79
+75
+198
+99
+93
+148
+74
+63
+140
+91
+74
+125
+99
+76
+106
+95
+67
+104
+99
+69
+117
+111
+79
+128
+111
+81
+130
+103
+74
+143
+103
+78
+177
+104
+89
+224
+100
+98
+239
+84
+90
+238
+71
+81
+239
+58
+73
+248
+52
+74
+255
+52
+78
+255
+50
+77
+254
+46
+72
+255
+53
+79
+245
+51
+75
+240
+53
+74
+239
+56
+76
+237
+55
+77
+233
+54
+75
+236
+54
+76
+239
+57
+80
+241
+65
+88
+239
+67
+91
+239
+70
+93
+237
+73
+97
+236
+77
+99
+234
+81
+101
+233
+84
+104
+232
+86
+107
+228
+84
+107
+229
+83
+106
+228
+80
+106
+228
+78
+105
+233
+78
+109
+238
+81
+112
+242
+83
+115
+244
+87
+118
+252
+105
+133
+237
+99
+124
+225
+93
+116
+210
+87
+108
+203
+90
+108
+199
+101
+114
+166
+83
+93
+114
+45
+50
+93
+39
+39
+88
+49
+44
+87
+58
+52
+81
+63
+53
+66
+58
+45
+58
+56
+41
+63
+66
+49
+76
+78
+57
+86
+79
+51
+97
+86
+54
+101
+95
+63
+104
+101
+68
+113
+117
+84
+127
+134
+101
+126
+140
+105
+119
+136
+100
+120
+140
+105
+117
+139
+101
+114
+139
+100
+114
+139
+99
+118
+140
+101
+121
+143
+104
+122
+144
+105
+122
+144
+106
+128
+149
+118
+132
+155
+126
+138
+158
+133
+141
+160
+138
+146
+163
+144
+151
+168
+150
+152
+169
+153
+150
+166
+153
+145
+162
+146
+135
+152
+134
+122
+141
+121
+112
+131
+109
+103
+126
+98
+94
+119
+89
+84
+109
+77
+80
+99
+71
+82
+87
+67
+88
+85
+70
+89
+85
+73
+55
+56
+50
+55
+56
+50
+56
+57
+51
+57
+58
+52
+59
+60
+54
+61
+62
+56
+64
+63
+58
+65
+64
+59
+66
+65
+60
+66
+65
+60
+68
+65
+60
+68
+65
+60
+68
+65
+60
+68
+65
+60
+69
+64
+60
+69
+64
+60
+71
+66
+60
+71
+66
+60
+71
+66
+60
+70
+65
+59
+70
+65
+59
+70
+66
+57
+72
+65
+57
+72
+65
+57
+76
+67
+60
+75
+66
+57
+74
+65
+56
+73
+64
+55
+72
+62
+53
+71
+61
+51
+70
+60
+50
+69
+59
+49
+68
+58
+48
+68
+58
+48
+69
+59
+49
+69
+59
+50
+68
+59
+50
+69
+60
+51
+69
+60
+53
+69
+60
+53
+64
+57
+49
+63
+56
+48
+61
+56
+50
+60
+55
+49
+59
+54
+48
+58
+53
+47
+58
+53
+47
+58
+53
+47
+57
+54
+47
+57
+54
+45
+59
+55
+46
+59
+55
+44
+63
+56
+46
+64
+58
+46
+67
+59
+48
+68
+60
+47
+70
+60
+48
+70
+61
+46
+74
+62
+48
+75
+63
+47
+77
+64
+48
+77
+64
+48
+77
+64
+47
+77
+64
+48
+79
+63
+50
+79
+62
+52
+76
+62
+51
+75
+61
+50
+74
+60
+51
+71
+58
+49
+69
+59
+49
+68
+58
+48
+68
+59
+50
+68
+59
+50
+66
+59
+49
+64
+60
+49
+64
+60
+51
+65
+61
+52
+66
+62
+53
+70
+60
+51
+81
+56
+49
+88
+43
+38
+135
+59
+63
+189
+85
+96
+216
+85
+101
+228
+86
+102
+226
+86
+99
+201
+75
+79
+157
+52
+48
+148
+58
+47
+144
+62
+48
+152
+66
+51
+173
+70
+61
+196
+74
+71
+212
+67
+72
+203
+63
+64
+177
+66
+55
+167
+70
+53
+169
+66
+51
+172
+64
+51
+175
+63
+51
+176
+62
+51
+179
+66
+52
+180
+68
+54
+178
+71
+53
+169
+66
+47
+163
+60
+41
+164
+59
+40
+169
+60
+40
+171
+58
+40
+174
+54
+38
+173
+51
+40
+182
+57
+55
+186
+57
+61
+187
+56
+62
+186
+55
+60
+190
+61
+66
+197
+74
+76
+196
+84
+83
+190
+88
+83
+153
+63
+55
+139
+52
+42
+135
+45
+37
+157
+54
+49
+195
+72
+75
+219
+80
+87
+224
+66
+81
+218
+52
+64
+221
+59
+57
+204
+47
+42
+209
+57
+52
+198
+56
+52
+197
+70
+64
+200
+93
+85
+167
+88
+75
+144
+87
+70
+119
+87
+64
+120
+100
+73
+126
+112
+83
+130
+111
+81
+133
+102
+74
+145
+99
+75
+172
+109
+91
+213
+117
+105
+234
+85
+87
+246
+70
+80
+242
+62
+74
+242
+60
+73
+249
+64
+78
+253
+67
+81
+249
+61
+76
+243
+55
+72
+253
+66
+83
+248
+60
+77
+244
+55
+75
+246
+54
+75
+248
+52
+74
+249
+50
+73
+255
+51
+78
+255
+56
+83
+255
+51
+84
+252
+53
+86
+252
+54
+87
+249
+56
+87
+247
+58
+90
+248
+61
+92
+246
+63
+94
+245
+64
+97
+247
+67
+102
+245
+67
+103
+244
+64
+101
+245
+63
+103
+247
+65
+105
+252
+67
+109
+255
+71
+115
+255
+74
+115
+255
+81
+117
+253
+84
+117
+250
+87
+118
+239
+85
+113
+228
+86
+110
+226
+99
+120
+213
+102
+118
+180
+89
+98
+124
+49
+53
+104
+48
+47
+88
+49
+42
+80
+56
+44
+71
+62
+47
+63
+64
+46
+59
+68
+47
+65
+70
+47
+81
+74
+46
+95
+84
+56
+103
+96
+67
+111
+107
+78
+124
+124
+96
+136
+142
+114
+135
+145
+118
+125
+139
+113
+122
+141
+113
+124
+143
+115
+124
+143
+115
+122
+141
+111
+122
+138
+109
+125
+140
+111
+131
+146
+117
+136
+151
+122
+149
+163
+138
+156
+169
+149
+163
+174
+157
+166
+177
+161
+172
+180
+167
+177
+185
+174
+176
+183
+176
+171
+181
+173
+161
+171
+162
+148
+160
+148
+131
+145
+130
+115
+132
+113
+104
+124
+99
+93
+116
+88
+83
+108
+78
+80
+100
+72
+80
+88
+67
+86
+87
+69
+87
+88
+72
+54
+55
+49
+54
+55
+49
+55
+56
+50
+56
+57
+51
+58
+59
+53
+60
+61
+55
+63
+62
+57
+64
+63
+58
+66
+65
+60
+66
+65
+60
+68
+65
+60
+68
+65
+60
+68
+65
+60
+69
+66
+61
+70
+65
+61
+70
+65
+61
+70
+67
+60
+70
+67
+60
+71
+66
+60
+72
+67
+61
+72
+68
+59
+72
+68
+59
+74
+67
+59
+74
+67
+57
+76
+67
+58
+75
+66
+57
+75
+65
+56
+74
+64
+54
+74
+61
+52
+73
+61
+49
+72
+60
+48
+71
+59
+47
+69
+59
+47
+69
+59
+47
+69
+59
+47
+69
+59
+49
+69
+59
+49
+69
+59
+49
+68
+59
+50
+68
+59
+50
+64
+57
+47
+64
+57
+47
+64
+57
+49
+63
+56
+48
+60
+55
+49
+59
+54
+48
+59
+54
+48
+58
+53
+47
+59
+55
+46
+59
+55
+46
+59
+55
+46
+60
+56
+45
+63
+56
+46
+65
+59
+47
+67
+59
+48
+68
+60
+47
+71
+61
+49
+71
+62
+47
+75
+63
+49
+77
+64
+48
+77
+64
+48
+78
+65
+48
+79
+63
+47
+79
+63
+48
+79
+63
+50
+78
+61
+51
+78
+61
+51
+74
+60
+49
+73
+59
+48
+71
+59
+47
+68
+58
+48
+68
+58
+48
+68
+60
+49
+68
+60
+49
+66
+59
+49
+64
+60
+49
+65
+61
+50
+65
+63
+51
+66
+63
+54
+75
+61
+52
+91
+54
+46
+116
+52
+50
+172
+77
+83
+218
+94
+105
+229
+78
+95
+226
+65
+81
+213
+55
+69
+182
+39
+43
+167
+50
+41
+156
+56
+40
+145
+58
+38
+149
+61
+41
+171
+65
+51
+193
+69
+61
+211
+63
+63
+204
+60
+59
+177
+63
+53
+168
+66
+52
+170
+64
+50
+173
+63
+50
+178
+64
+53
+184
+67
+57
+188
+72
+59
+187
+74
+60
+172
+62
+47
+170
+63
+47
+168
+61
+43
+166
+59
+41
+170
+57
+41
+176
+58
+44
+183
+59
+47
+187
+61
+49
+200
+71
+65
+204
+69
+65
+206
+64
+63
+205
+57
+57
+211
+56
+60
+220
+67
+69
+223
+77
+78
+218
+83
+79
+193
+68
+62
+195
+77
+67
+203
+84
+76
+209
+85
+77
+215
+75
+74
+218
+64
+66
+223
+53
+62
+224
+51
+55
+217
+52
+46
+215
+57
+46
+205
+51
+43
+206
+59
+52
+190
+57
+52
+178
+65
+57
+181
+91
+80
+150
+85
+67
+123
+78
+57
+130
+98
+73
+136
+106
+80
+133
+96
+70
+147
+90
+70
+176
+100
+84
+206
+112
+100
+232
+109
+104
+231
+70
+75
+237
+60
+68
+230
+59
+67
+227
+62
+68
+227
+68
+72
+227
+73
+75
+228
+74
+76
+229
+73
+77
+240
+76
+83
+239
+68
+77
+239
+58
+73
+242
+55
+72
+245
+52
+71
+248
+49
+70
+254
+52
+76
+255
+58
+82
+255
+57
+86
+253
+58
+88
+252
+59
+88
+250
+59
+90
+251
+60
+93
+252
+63
+95
+253
+65
+98
+252
+67
+101
+253
+69
+105
+251
+69
+107
+250
+68
+108
+250
+68
+109
+250
+67
+111
+249
+68
+111
+249
+68
+113
+250
+67
+111
+255
+72
+112
+255
+66
+104
+255
+74
+109
+253
+79
+112
+238
+75
+104
+230
+80
+107
+226
+93
+114
+216
+99
+115
+186
+91
+99
+140
+64
+68
+96
+38
+36
+81
+43
+34
+86
+64
+51
+86
+79
+61
+74
+76
+55
+65
+67
+45
+82
+74
+51
+101
+89
+67
+117
+106
+86
+128
+123
+103
+142
+141
+121
+153
+156
+139
+149
+156
+140
+136
+147
+131
+130
+142
+128
+137
+151
+136
+143
+155
+141
+140
+153
+136
+135
+146
+130
+138
+147
+130
+151
+158
+142
+164
+168
+153
+178
+182
+167
+184
+188
+174
+191
+193
+182
+192
+193
+185
+194
+195
+189
+197
+198
+193
+195
+195
+195
+190
+190
+190
+176
+181
+177
+162
+169
+162
+141
+151
+140
+121
+135
+118
+105
+123
+101
+92
+115
+89
+84
+109
+79
+82
+102
+74
+80
+90
+66
+84
+89
+67
+86
+91
+71
+53
+54
+48
+53
+54
+48
+54
+55
+49
+55
+56
+50
+56
+57
+51
+58
+59
+53
+61
+60
+55
+62
+61
+56
+64
+63
+58
+64
+63
+58
+67
+64
+59
+68
+65
+60
+69
+66
+61
+69
+66
+61
+71
+66
+62
+71
+66
+62
+71
+68
+61
+71
+68
+61
+72
+67
+61
+73
+68
+62
+73
+69
+60
+73
+69
+60
+75
+68
+58
+76
+69
+59
+76
+67
+58
+75
+67
+56
+76
+66
+56
+75
+65
+53
+76
+64
+52
+75
+63
+51
+74
+62
+50
+73
+61
+49
+71
+61
+49
+71
+61
+49
+70
+60
+48
+70
+60
+48
+69
+59
+49
+69
+59
+49
+68
+59
+50
+67
+58
+49
+65
+58
+48
+65
+58
+48
+64
+57
+49
+64
+57
+49
+61
+56
+50
+60
+55
+49
+59
+54
+48
+59
+54
+48
+59
+55
+46
+59
+55
+46
+59
+55
+44
+60
+56
+45
+63
+57
+45
+65
+59
+47
+68
+60
+47
+69
+61
+48
+72
+63
+48
+74
+62
+48
+76
+63
+47
+77
+64
+48
+78
+65
+48
+78
+65
+48
+79
+63
+47
+79
+63
+47
+79
+63
+50
+78
+61
+51
+77
+60
+50
+76
+59
+49
+73
+59
+48
+71
+59
+47
+70
+57
+48
+67
+57
+47
+67
+59
+48
+66
+60
+48
+66
+59
+49
+64
+60
+49
+64
+62
+50
+65
+63
+51
+66
+63
+54
+78
+59
+52
+106
+57
+52
+149
+71
+69
+195
+90
+95
+218
+88
+98
+220
+68
+81
+219
+57
+70
+209
+52
+59
+188
+44
+43
+172
+50
+39
+159
+56
+37
+150
+58
+33
+148
+58
+32
+161
+61
+38
+179
+64
+46
+193
+59
+50
+189
+56
+49
+167
+55
+44
+162
+58
+45
+165
+57
+45
+167
+55
+44
+175
+58
+49
+184
+66
+56
+186
+69
+59
+183
+69
+58
+174
+62
+50
+173
+63
+48
+167
+60
+44
+164
+54
+39
+170
+54
+41
+182
+62
+48
+195
+68
+59
+202
+71
+61
+188
+58
+45
+203
+65
+54
+221
+70
+63
+232
+68
+66
+239
+63
+65
+239
+59
+62
+231
+52
+55
+218
+48
+48
+216
+57
+53
+222
+73
+66
+229
+85
+76
+224
+80
+71
+216
+63
+57
+214
+50
+48
+224
+48
+50
+231
+55
+55
+216
+49
+40
+221
+61
+47
+202
+46
+34
+205
+56
+49
+189
+52
+44
+174
+55
+47
+200
+104
+92
+184
+108
+92
+142
+87
+67
+135
+90
+67
+132
+86
+63
+139
+81
+61
+170
+91
+76
+209
+106
+97
+226
+103
+98
+229
+83
+84
+240
+69
+75
+239
+62
+70
+226
+60
+64
+216
+62
+62
+209
+66
+62
+209
+72
+66
+219
+80
+77
+233
+87
+87
+235
+79
+82
+238
+68
+77
+239
+59
+71
+245
+54
+70
+246
+50
+70
+246
+47
+68
+249
+50
+71
+253
+55
+78
+251
+57
+83
+248
+58
+84
+248
+58
+86
+249
+59
+87
+254
+61
+92
+255
+63
+97
+255
+67
+101
+255
+68
+107
+251
+60
+101
+251
+62
+104
+250
+63
+106
+247
+64
+108
+247
+64
+110
+244
+62
+110
+241
+61
+108
+241
+60
+105
+255
+74
+114
+251
+61
+97
+251
+66
+100
+255
+78
+110
+251
+77
+110
+243
+80
+109
+236
+86
+111
+224
+91
+110
+231
+114
+130
+194
+97
+106
+150
+74
+76
+116
+58
+56
+93
+53
+45
+82
+56
+43
+82
+66
+50
+87
+76
+58
+94
+81
+65
+114
+101
+85
+136
+124
+110
+149
+141
+130
+159
+157
+145
+166
+167
+159
+161
+166
+159
+150
+156
+152
+149
+158
+155
+158
+167
+164
+166
+175
+172
+166
+172
+168
+162
+167
+163
+166
+168
+163
+181
+180
+176
+194
+193
+188
+204
+201
+192
+209
+206
+197
+213
+208
+204
+213
+208
+205
+212
+206
+206
+213
+207
+209
+209
+203
+207
+203
+198
+202
+191
+189
+192
+176
+178
+175
+152
+159
+152
+128
+140
+126
+109
+126
+107
+96
+116
+91
+87
+110
+82
+86
+106
+78
+83
+95
+71
+86
+96
+72
+87
+95
+72
+53
+54
+48
+53
+54
+48
+53
+54
+48
+53
+54
+48
+54
+55
+49
+56
+57
+51
+58
+57
+52
+59
+58
+53
+61
+60
+55
+62
+61
+56
+65
+62
+57
+67
+64
+59
+68
+65
+60
+70
+67
+62
+72
+67
+63
+72
+67
+63
+71
+68
+61
+72
+69
+62
+73
+68
+62
+73
+68
+62
+74
+70
+61
+74
+70
+61
+77
+70
+60
+77
+70
+60
+77
+69
+58
+76
+68
+57
+77
+67
+57
+77
+67
+55
+78
+66
+54
+77
+65
+51
+78
+64
+51
+77
+65
+51
+74
+65
+50
+74
+65
+50
+73
+64
+49
+72
+63
+48
+71
+61
+49
+70
+60
+48
+68
+60
+49
+68
+60
+49
+67
+58
+49
+67
+58
+49
+65
+58
+50
+64
+57
+49
+63
+56
+50
+63
+56
+50
+60
+55
+49
+60
+55
+49
+60
+56
+47
+60
+56
+45
+60
+56
+45
+60
+56
+45
+64
+58
+46
+65
+59
+47
+68
+60
+47
+69
+61
+48
+72
+63
+48
+75
+63
+49
+77
+64
+48
+78
+65
+48
+80
+64
+48
+80
+64
+48
+79
+64
+45
+79
+63
+47
+79
+61
+49
+79
+61
+49
+77
+61
+48
+76
+60
+47
+73
+59
+48
+70
+58
+46
+69
+56
+47
+67
+57
+47
+66
+58
+47
+65
+59
+47
+65
+58
+48
+63
+59
+48
+63
+61
+49
+64
+62
+50
+64
+64
+52
+78
+58
+49
+111
+50
+47
+165
+75
+75
+190
+84
+86
+186
+63
+68
+188
+49
+54
+193
+48
+51
+191
+49
+47
+183
+50
+41
+167
+50
+33
+162
+57
+35
+155
+61
+33
+150
+61
+31
+152
+61
+32
+158
+63
+35
+164
+59
+37
+162
+55
+37
+158
+54
+41
+160
+56
+45
+162
+54
+44
+165
+52
+44
+173
+56
+49
+183
+64
+58
+184
+67
+60
+178
+64
+54
+177
+66
+55
+173
+65
+52
+168
+60
+47
+166
+56
+43
+175
+58
+48
+188
+67
+56
+195
+68
+61
+196
+65
+55
+193
+64
+45
+203
+64
+45
+213
+55
+43
+221
+44
+38
+232
+36
+37
+245
+39
+43
+253
+44
+49
+252
+49
+52
+233
+44
+42
+227
+48
+43
+220
+53
+44
+217
+55
+44
+220
+53
+44
+223
+52
+44
+229
+50
+45
+228
+51
+43
+215
+52
+37
+212
+55
+38
+207
+51
+38
+206
+55
+44
+196
+55
+46
+187
+63
+55
+199
+97
+85
+210
+127
+113
+166
+101
+83
+143
+86
+66
+139
+76
+58
+164
+86
+73
+203
+100
+91
+224
+99
+95
+232
+82
+84
+233
+66
+73
+246
+69
+77
+238
+63
+68
+225
+62
+63
+213
+64
+60
+202
+63
+56
+200
+63
+55
+211
+69
+65
+229
+77
+76
+240
+74
+78
+245
+63
+75
+251
+56
+72
+255
+54
+72
+254
+53
+72
+249
+50
+69
+249
+54
+71
+250
+59
+77
+247
+58
+80
+246
+58
+82
+246
+56
+82
+249
+56
+85
+251
+56
+88
+254
+59
+93
+255
+61
+97
+255
+63
+103
+255
+64
+106
+255
+64
+108
+255
+65
+112
+255
+67
+115
+251
+68
+116
+249
+67
+116
+247
+67
+115
+244
+67
+111
+251
+73
+109
+245
+68
+97
+249
+72
+101
+252
+77
+106
+250
+77
+107
+255
+88
+116
+255
+97
+122
+242
+94
+116
+240
+107
+126
+229
+113
+126
+211
+111
+119
+175
+93
+97
+132
+67
+65
+104
+54
+47
+105
+65
+55
+115
+85
+74
+121
+101
+92
+140
+125
+118
+163
+150
+144
+173
+163
+161
+178
+174
+171
+182
+182
+182
+178
+182
+185
+170
+175
+179
+176
+183
+189
+182
+189
+197
+189
+193
+202
+192
+195
+202
+195
+194
+202
+201
+198
+205
+213
+206
+214
+221
+215
+219
+226
+218
+216
+231
+221
+219
+233
+221
+221
+230
+218
+220
+229
+216
+223
+228
+215
+224
+224
+212
+222
+217
+207
+216
+202
+197
+203
+186
+186
+186
+162
+167
+163
+136
+146
+135
+116
+130
+113
+101
+120
+98
+92
+115
+87
+91
+111
+83
+92
+106
+80
+92
+105
+79
+94
+104
+79
+53
+54
+49
+53
+54
+49
+53
+54
+49
+53
+54
+48
+53
+54
+49
+54
+55
+49
+56
+55
+50
+57
+56
+51
+60
+59
+54
+61
+60
+55
+64
+61
+56
+66
+63
+58
+68
+65
+60
+70
+67
+60
+71
+68
+61
+72
+69
+62
+72
+69
+62
+72
+69
+62
+72
+69
+60
+74
+70
+61
+74
+70
+59
+75
+71
+59
+75
+71
+59
+78
+72
+58
+77
+71
+59
+77
+71
+59
+77
+69
+58
+77
+68
+59
+77
+68
+59
+77
+68
+61
+78
+67
+63
+78
+67
+61
+77
+67
+55
+77
+68
+53
+75
+66
+51
+74
+65
+50
+72
+62
+50
+71
+61
+49
+69
+61
+50
+68
+59
+50
+67
+58
+49
+67
+58
+51
+65
+58
+50
+65
+58
+52
+64
+57
+51
+63
+55
+52
+60
+55
+51
+60
+55
+49
+62
+55
+47
+62
+55
+47
+60
+56
+47
+61
+57
+48
+62
+58
+49
+65
+58
+50
+67
+60
+50
+68
+61
+51
+72
+64
+53
+73
+63
+51
+76
+64
+50
+77
+65
+49
+78
+65
+48
+80
+64
+48
+79
+64
+45
+79
+63
+47
+76
+62
+49
+76
+62
+51
+75
+61
+50
+76
+59
+51
+74
+57
+49
+73
+56
+49
+70
+55
+48
+67
+56
+50
+65
+56
+47
+62
+58
+47
+61
+59
+47
+60
+61
+47
+63
+61
+48
+64
+62
+47
+66
+63
+48
+83
+57
+44
+134
+61
+55
+193
+93
+91
+200
+90
+89
+174
+56
+54
+170
+47
+42
+177
+50
+43
+171
+47
+37
+171
+51
+35
+170
+58
+38
+171
+67
+42
+169
+71
+44
+163
+70
+39
+160
+66
+38
+161
+66
+38
+161
+61
+35
+158
+58
+35
+160
+57
+42
+163
+59
+48
+166
+58
+48
+166
+55
+46
+173
+60
+52
+182
+67
+60
+183
+69
+59
+176
+64
+53
+171
+61
+48
+168
+60
+47
+169
+59
+46
+172
+60
+48
+187
+69
+57
+198
+76
+65
+197
+69
+60
+188
+56
+44
+188
+55
+36
+201
+60
+40
+218
+61
+46
+227
+53
+44
+238
+44
+42
+246
+42
+43
+249
+40
+43
+247
+39
+39
+246
+44
+42
+241
+48
+43
+236
+52
+44
+232
+54
+44
+227
+53
+42
+226
+52
+41
+225
+51
+40
+222
+52
+37
+222
+59
+42
+207
+50
+31
+219
+63
+48
+205
+55
+41
+199
+57
+45
+194
+63
+53
+179
+65
+54
+209
+108
+96
+191
+103
+89
+165
+82
+66
+170
+78
+65
+205
+98
+90
+232
+103
+98
+231
+81
+82
+235
+64
+70
+246
+65
+74
+237
+60
+68
+227
+58
+61
+215
+59
+60
+207
+62
+57
+195
+61
+52
+185
+54
+44
+187
+52
+46
+199
+56
+52
+229
+71
+72
+234
+63
+69
+242
+58
+68
+249
+57
+72
+252
+57
+73
+250
+55
+71
+250
+58
+73
+251
+63
+78
+252
+67
+85
+251
+65
+86
+250
+63
+84
+249
+59
+84
+251
+58
+85
+253
+58
+90
+255
+59
+94
+255
+60
+99
+255
+64
+104
+255
+63
+107
+255
+63
+110
+251
+63
+111
+247
+64
+112
+245
+65
+113
+245
+64
+115
+243
+66
+112
+244
+68
+106
+252
+79
+109
+255
+86
+115
+243
+76
+104
+231
+66
+96
+249
+86
+115
+255
+105
+133
+255
+102
+130
+246
+94
+119
+238
+96
+120
+231
+104
+123
+220
+112
+125
+199
+112
+120
+170
+102
+103
+143
+92
+88
+126
+89
+81
+153
+126
+119
+171
+152
+146
+190
+176
+173
+197
+187
+186
+198
+194
+195
+200
+199
+204
+199
+199
+207
+195
+195
+207
+203
+202
+216
+204
+202
+216
+209
+202
+218
+215
+206
+223
+221
+213
+228
+230
+219
+233
+232
+224
+235
+237
+227
+235
+239
+229
+230
+242
+232
+230
+244
+232
+232
+240
+228
+230
+238
+225
+232
+237
+224
+233
+234
+221
+231
+228
+216
+226
+209
+202
+209
+193
+191
+194
+171
+171
+169
+145
+150
+143
+122
+134
+120
+108
+123
+104
+98
+117
+95
+96
+114
+90
+100
+114
+89
+100
+112
+88
+100
+110
+86
+50
+49
+47
+51
+50
+48
+52
+51
+49
+54
+53
+49
+56
+55
+53
+57
+56
+52
+57
+56
+52
+57
+56
+52
+59
+58
+53
+60
+59
+54
+61
+61
+53
+63
+63
+55
+65
+65
+57
+67
+67
+57
+69
+69
+59
+69
+69
+59
+72
+72
+64
+72
+72
+62
+72
+72
+60
+74
+72
+59
+75
+74
+56
+76
+75
+55
+77
+76
+56
+78
+75
+56
+77
+74
+57
+74
+70
+58
+71
+68
+59
+74
+70
+67
+78
+73
+77
+78
+73
+80
+71
+68
+79
+68
+63
+69
+78
+69
+62
+76
+67
+52
+74
+64
+52
+75
+65
+53
+77
+67
+57
+76
+66
+56
+70
+61
+52
+66
+57
+48
+69
+60
+53
+67
+58
+53
+64
+57
+51
+63
+55
+52
+64
+56
+53
+63
+55
+53
+60
+55
+52
+60
+52
+50
+67
+58
+53
+66
+57
+52
+65
+57
+54
+62
+57
+53
+63
+58
+55
+62
+58
+55
+63
+59
+56
+64
+60
+57
+66
+63
+58
+68
+64
+55
+71
+64
+54
+74
+64
+52
+76
+64
+48
+79
+64
+45
+79
+64
+43
+76
+63
+44
+70
+64
+50
+69
+62
+52
+72
+59
+51
+74
+56
+52
+75
+54
+53
+77
+52
+55
+75
+55
+57
+72
+58
+58
+67
+62
+58
+55
+56
+48
+55
+59
+45
+62
+66
+49
+62
+64
+43
+58
+56
+35
+67
+59
+36
+101
+66
+46
+189
+106
+92
+183
+75
+65
+166
+55
+44
+164
+54
+41
+167
+55
+43
+164
+54
+39
+163
+56
+38
+168
+61
+43
+162
+57
+36
+165
+60
+38
+169
+64
+42
+171
+65
+41
+172
+61
+41
+172
+57
+38
+174
+54
+37
+170
+55
+37
+164
+54
+39
+161
+55
+41
+162
+56
+42
+166
+60
+46
+170
+64
+50
+172
+66
+52
+172
+66
+50
+172
+65
+49
+169
+62
+44
+171
+61
+44
+173
+60
+44
+179
+61
+47
+189
+67
+52
+196
+70
+56
+192
+62
+49
+184
+50
+38
+199
+57
+43
+203
+57
+42
+207
+57
+43
+213
+57
+45
+219
+55
+45
+225
+54
+46
+231
+52
+47
+237
+50
+45
+240
+46
+44
+242
+47
+45
+242
+49
+44
+239
+50
+44
+234
+53
+42
+227
+55
+41
+221
+58
+41
+218
+59
+40
+219
+58
+38
+212
+51
+31
+207
+52
+32
+206
+56
+39
+197
+56
+39
+190
+54
+40
+194
+66
+53
+207
+83
+73
+200
+78
+67
+207
+83
+75
+225
+92
+87
+238
+93
+90
+240
+80
+82
+237
+62
+67
+243
+56
+63
+248
+63
+71
+235
+64
+70
+225
+67
+68
+214
+64
+65
+201
+62
+57
+187
+60
+51
+179
+58
+47
+177
+59
+47
+180
+59
+48
+202
+76
+64
+212
+75
+67
+222
+70
+67
+226
+62
+63
+235
+60
+65
+248
+63
+71
+254
+62
+73
+249
+59
+71
+253
+69
+81
+250
+68
+81
+253
+68
+82
+255
+68
+85
+253
+64
+86
+250
+60
+85
+254
+61
+90
+255
+66
+100
+255
+70
+107
+255
+65
+106
+249
+59
+103
+245
+58
+103
+244
+61
+109
+248
+68
+115
+253
+73
+121
+255
+75
+122
+255
+78
+121
+255
+78
+117
+249
+81
+116
+239
+82
+113
+229
+79
+106
+229
+79
+106
+247
+90
+119
+255
+103
+135
+255
+93
+128
+240
+69
+105
+245
+86
+118
+232
+94
+120
+198
+91
+109
+194
+117
+125
+140
+92
+92
+145
+114
+109
+171
+143
+132
+189
+167
+156
+212
+195
+187
+222
+213
+208
+221
+220
+218
+220
+219
+224
+222
+220
+231
+226
+219
+235
+231
+216
+237
+235
+216
+238
+241
+217
+241
+244
+220
+242
+245
+227
+243
+245
+231
+244
+243
+236
+244
+244
+239
+243
+248
+243
+240
+248
+243
+239
+248
+240
+238
+245
+236
+237
+242
+231
+235
+237
+226
+232
+232
+221
+227
+229
+220
+225
+214
+208
+212
+205
+201
+202
+187
+186
+184
+163
+165
+160
+139
+144
+137
+121
+131
+120
+114
+125
+111
+112
+123
+107
+123
+132
+115
+119
+128
+109
+118
+125
+107
+48
+46
+47
+49
+47
+48
+51
+50
+48
+53
+52
+50
+54
+53
+51
+55
+54
+50
+56
+55
+51
+56
+55
+50
+58
+57
+52
+59
+58
+53
+61
+61
+53
+63
+63
+55
+65
+65
+55
+67
+67
+57
+68
+68
+56
+69
+69
+59
+72
+72
+62
+72
+72
+62
+72
+72
+60
+74
+72
+57
+75
+74
+54
+76
+75
+54
+77
+77
+53
+78
+77
+56
+75
+74
+56
+75
+73
+61
+75
+74
+69
+80
+80
+82
+87
+85
+96
+89
+88
+106
+86
+84
+106
+82
+79
+96
+79
+73
+75
+77
+68
+63
+72
+63
+58
+70
+61
+56
+71
+62
+57
+72
+63
+58
+70
+61
+56
+66
+59
+53
+68
+58
+56
+65
+57
+54
+63
+55
+52
+63
+55
+52
+64
+56
+53
+64
+56
+53
+61
+56
+53
+59
+54
+50
+61
+52
+47
+61
+52
+47
+61
+53
+50
+60
+55
+52
+61
+57
+54
+62
+58
+57
+61
+60
+58
+62
+61
+57
+66
+63
+58
+68
+63
+57
+71
+64
+54
+74
+64
+52
+77
+64
+48
+79
+64
+45
+80
+63
+43
+76
+63
+44
+65
+64
+46
+63
+64
+50
+69
+60
+53
+72
+57
+54
+74
+54
+55
+74
+52
+55
+70
+51
+55
+67
+52
+55
+65
+60
+57
+60
+59
+54
+61
+61
+49
+69
+63
+49
+74
+58
+42
+80
+54
+37
+100
+65
+46
+133
+74
+58
+176
+80
+66
+171
+59
+45
+160
+50
+35
+161
+54
+38
+163
+58
+39
+158
+55
+36
+158
+57
+37
+163
+62
+42
+161
+59
+37
+167
+60
+40
+174
+63
+43
+179
+64
+45
+182
+61
+44
+183
+57
+42
+184
+54
+40
+181
+55
+41
+170
+57
+41
+165
+58
+42
+164
+57
+41
+165
+59
+43
+168
+62
+46
+171
+65
+49
+171
+66
+47
+171
+64
+46
+174
+63
+44
+171
+58
+40
+177
+60
+43
+191
+69
+54
+198
+72
+57
+193
+63
+49
+188
+56
+43
+192
+54
+41
+203
+55
+43
+207
+55
+44
+208
+57
+46
+209
+59
+45
+212
+60
+47
+216
+58
+46
+224
+56
+47
+231
+52
+45
+238
+49
+45
+244
+46
+43
+244
+46
+43
+241
+48
+43
+234
+52
+41
+225
+55
+40
+215
+58
+39
+213
+58
+36
+222
+60
+39
+217
+54
+35
+213
+56
+37
+212
+61
+42
+204
+59
+42
+193
+53
+38
+196
+58
+47
+207
+70
+60
+209
+70
+63
+218
+73
+68
+233
+79
+77
+243
+80
+81
+244
+71
+73
+240
+59
+64
+245
+58
+65
+248
+67
+72
+229
+66
+69
+218
+68
+67
+210
+66
+65
+197
+62
+56
+183
+59
+49
+174
+58
+45
+170
+60
+45
+171
+61
+46
+182
+69
+53
+198
+76
+63
+212
+78
+69
+220
+71
+67
+227
+63
+62
+239
+63
+66
+250
+63
+70
+254
+64
+74
+248
+67
+74
+247
+67
+76
+250
+68
+80
+255
+70
+84
+253
+66
+83
+249
+62
+83
+252
+62
+88
+255
+66
+97
+255
+70
+104
+255
+67
+105
+252
+63
+105
+249
+64
+106
+249
+66
+112
+252
+70
+118
+254
+74
+122
+255
+75
+123
+255
+72
+120
+255
+71
+115
+244
+74
+111
+242
+82
+116
+243
+93
+122
+246
+96
+123
+247
+88
+118
+247
+79
+112
+250
+70
+107
+248
+68
+107
+238
+68
+104
+220
+73
+102
+203
+92
+111
+182
+106
+116
+115
+71
+72
+150
+121
+115
+180
+148
+137
+206
+176
+165
+229
+209
+200
+239
+226
+220
+235
+231
+230
+233
+232
+237
+236
+230
+242
+237
+226
+243
+246
+227
+249
+251
+225
+250
+255
+227
+253
+255
+230
+253
+255
+236
+254
+255
+242
+253
+254
+247
+254
+252
+250
+251
+253
+249
+246
+252
+249
+244
+251
+246
+243
+249
+244
+241
+247
+238
+239
+243
+234
+237
+240
+231
+236
+238
+229
+234
+230
+221
+224
+220
+214
+216
+202
+198
+197
+179
+178
+174
+158
+161
+154
+142
+147
+140
+137
+143
+133
+136
+144
+131
+142
+148
+134
+137
+144
+128
+134
+140
+126
+47
+46
+44
+48
+47
+45
+49
+48
+46
+50
+49
+47
+52
+51
+47
+53
+52
+48
+55
+54
+50
+55
+54
+49
+58
+57
+52
+58
+58
+50
+60
+60
+52
+62
+62
+54
+64
+64
+54
+66
+66
+56
+67
+67
+57
+68
+68
+58
+73
+70
+61
+73
+71
+59
+74
+72
+59
+76
+73
+56
+77
+74
+55
+78
+76
+55
+78
+76
+55
+79
+76
+57
+75
+73
+58
+78
+75
+66
+84
+82
+83
+95
+94
+102
+105
+104
+120
+109
+109
+133
+108
+107
+138
+107
+104
+131
+96
+89
+105
+89
+81
+92
+79
+71
+82
+72
+64
+75
+72
+62
+71
+71
+61
+69
+69
+60
+65
+64
+58
+60
+67
+58
+59
+63
+58
+55
+60
+55
+52
+60
+55
+51
+61
+56
+50
+62
+57
+51
+62
+58
+49
+61
+57
+48
+56
+51
+45
+57
+52
+46
+59
+54
+48
+60
+57
+50
+61
+58
+51
+62
+59
+52
+63
+60
+53
+64
+60
+51
+69
+62
+52
+71
+63
+52
+73
+63
+51
+76
+64
+48
+79
+63
+48
+80
+63
+47
+80
+63
+45
+76
+63
+44
+60
+59
+39
+58
+61
+42
+62
+60
+47
+65
+58
+48
+66
+55
+51
+67
+53
+52
+63
+52
+50
+60
+50
+49
+63
+55
+52
+68
+57
+53
+75
+56
+50
+82
+49
+44
+92
+43
+39
+111
+46
+44
+139
+58
+57
+164
+69
+67
+165
+58
+48
+162
+50
+36
+159
+49
+32
+164
+57
+39
+165
+60
+41
+158
+55
+36
+158
+56
+34
+162
+60
+38
+164
+59
+38
+170
+61
+41
+177
+65
+45
+182
+65
+47
+185
+62
+46
+187
+60
+45
+190
+58
+45
+190
+60
+47
+178
+60
+46
+172
+60
+46
+169
+57
+43
+169
+57
+43
+171
+60
+43
+173
+62
+45
+173
+62
+45
+173
+60
+44
+178
+63
+45
+176
+56
+40
+185
+62
+46
+203
+76
+61
+203
+71
+58
+188
+54
+42
+186
+50
+38
+201
+57
+46
+208
+54
+44
+212
+54
+43
+212
+56
+44
+214
+58
+46
+216
+58
+47
+220
+56
+46
+227
+54
+47
+232
+51
+44
+240
+48
+45
+244
+46
+43
+244
+46
+43
+240
+49
+41
+231
+50
+39
+221
+54
+38
+212
+56
+34
+210
+55
+33
+221
+56
+36
+220
+53
+35
+218
+57
+39
+218
+62
+47
+211
+61
+46
+200
+54
+41
+197
+57
+44
+203
+65
+55
+201
+60
+53
+205
+62
+56
+217
+69
+65
+229
+75
+73
+234
+74
+74
+233
+67
+67
+236
+63
+65
+235
+67
+67
+222
+67
+65
+213
+68
+63
+205
+66
+61
+194
+61
+52
+182
+58
+46
+174
+56
+42
+171
+58
+42
+172
+59
+43
+172
+56
+41
+192
+68
+56
+212
+78
+69
+221
+73
+69
+224
+64
+64
+232
+62
+65
+247
+66
+73
+255
+72
+80
+244
+65
+71
+244
+64
+73
+249
+67
+79
+253
+71
+84
+254
+69
+85
+250
+64
+85
+251
+63
+88
+254
+65
+95
+255
+68
+102
+255
+67
+105
+255
+67
+107
+255
+70
+112
+255
+73
+119
+255
+75
+123
+255
+76
+124
+255
+74
+122
+255
+66
+116
+255
+68
+116
+254
+72
+113
+250
+78
+116
+252
+91
+124
+255
+98
+128
+250
+87
+118
+236
+69
+99
+248
+77
+109
+254
+86
+119
+218
+64
+92
+203
+71
+94
+218
+121
+132
+187
+121
+123
+103
+64
+59
+151
+123
+112
+178
+140
+129
+215
+177
+166
+245
+216
+208
+253
+234
+228
+250
+240
+239
+250
+245
+249
+249
+243
+253
+244
+236
+251
+251
+233
+255
+255
+233
+255
+255
+234
+255
+255
+237
+255
+255
+242
+255
+255
+246
+255
+255
+251
+255
+255
+254
+252
+255
+253
+250
+255
+252
+248
+255
+249
+247
+255
+247
+245
+254
+244
+245
+252
+242
+243
+250
+239
+243
+248
+239
+242
+240
+231
+234
+229
+223
+225
+211
+207
+206
+190
+189
+185
+173
+174
+168
+162
+165
+158
+157
+163
+153
+157
+163
+151
+163
+171
+158
+157
+165
+150
+153
+161
+148
+47
+46
+44
+47
+46
+44
+48
+47
+45
+49
+48
+44
+50
+49
+45
+51
+50
+46
+53
+52
+47
+54
+53
+48
+56
+56
+48
+57
+57
+49
+59
+59
+51
+61
+61
+53
+63
+63
+53
+65
+65
+55
+66
+66
+56
+67
+67
+57
+72
+69
+60
+74
+70
+59
+75
+72
+57
+77
+74
+57
+80
+75
+56
+79
+77
+56
+81
+76
+56
+79
+76
+59
+76
+74
+62
+81
+80
+76
+94
+93
+98
+109
+108
+122
+122
+122
+146
+129
+130
+161
+128
+130
+168
+128
+128
+166
+123
+117
+151
+114
+107
+138
+101
+95
+123
+89
+83
+109
+84
+76
+100
+77
+69
+90
+71
+64
+80
+66
+60
+72
+68
+63
+70
+64
+59
+63
+60
+56
+55
+59
+54
+51
+59
+54
+48
+60
+56
+47
+61
+57
+46
+59
+56
+47
+58
+55
+48
+57
+57
+49
+59
+59
+51
+62
+59
+50
+63
+61
+49
+64
+60
+49
+63
+59
+47
+65
+59
+45
+70
+63
+47
+72
+63
+46
+75
+63
+47
+77
+64
+47
+79
+63
+48
+79
+63
+47
+80
+62
+48
+76
+63
+47
+66
+61
+42
+63
+62
+44
+64
+61
+46
+65
+58
+48
+65
+58
+50
+64
+57
+51
+62
+57
+53
+60
+57
+52
+61
+56
+52
+70
+56
+53
+80
+52
+49
+88
+44
+43
+107
+41
+43
+135
+48
+54
+161
+55
+65
+174
+61
+65
+167
+54
+46
+165
+55
+40
+165
+58
+40
+170
+63
+45
+168
+63
+44
+160
+57
+38
+161
+56
+35
+164
+59
+38
+165
+58
+38
+171
+60
+41
+179
+62
+44
+185
+64
+47
+189
+62
+47
+193
+61
+48
+197
+61
+49
+196
+62
+50
+189
+63
+51
+182
+61
+50
+178
+57
+46
+174
+56
+42
+175
+57
+43
+176
+58
+44
+178
+58
+44
+179
+57
+42
+182
+59
+44
+185
+59
+45
+196
+66
+52
+203
+69
+57
+200
+62
+51
+190
+49
+39
+192
+50
+40
+205
+57
+47
+214
+53
+43
+216
+52
+42
+218
+54
+45
+219
+55
+45
+222
+55
+46
+225
+54
+44
+230
+51
+44
+236
+49
+42
+243
+48
+44
+244
+46
+43
+244
+47
+41
+239
+48
+40
+228
+50
+38
+219
+52
+36
+210
+54
+32
+208
+53
+31
+215
+50
+30
+218
+48
+31
+218
+52
+36
+220
+60
+46
+214
+61
+47
+208
+57
+46
+205
+61
+50
+210
+68
+58
+196
+53
+45
+197
+54
+48
+202
+59
+53
+216
+68
+64
+226
+77
+73
+229
+75
+73
+222
+67
+63
+214
+61
+56
+211
+64
+57
+206
+65
+56
+199
+62
+52
+190
+60
+47
+181
+58
+43
+176
+56
+42
+175
+57
+43
+177
+59
+45
+172
+52
+38
+189
+63
+51
+209
+72
+64
+217
+72
+67
+221
+66
+64
+229
+64
+68
+243
+70
+76
+253
+78
+85
+240
+63
+69
+240
+63
+69
+246
+66
+77
+254
+72
+85
+254
+72
+87
+252
+66
+87
+250
+64
+88
+252
+65
+94
+255
+65
+99
+255
+67
+102
+255
+70
+109
+255
+73
+114
+255
+77
+121
+255
+79
+124
+255
+76
+123
+255
+72
+121
+255
+63
+113
+255
+74
+122
+255
+79
+122
+252
+73
+112
+246
+77
+110
+252
+87
+117
+252
+87
+117
+243
+79
+106
+239
+75
+102
+236
+78
+103
+206
+62
+85
+220
+98
+113
+251
+156
+164
+211
+141
+141
+104
+57
+51
+113
+75
+64
+166
+119
+109
+210
+163
+155
+247
+210
+202
+255
+231
+226
+255
+242
+241
+255
+251
+254
+255
+250
+255
+249
+241
+254
+250
+237
+255
+252
+237
+255
+255
+237
+255
+255
+240
+255
+255
+242
+253
+255
+246
+254
+254
+250
+251
+255
+251
+250
+255
+252
+249
+255
+251
+247
+255
+249
+247
+255
+248
+246
+255
+245
+246
+254
+244
+245
+254
+243
+247
+253
+242
+246
+246
+235
+239
+236
+227
+228
+218
+213
+210
+201
+198
+193
+186
+185
+180
+179
+180
+172
+177
+180
+169
+176
+182
+170
+183
+191
+180
+175
+183
+172
+169
+177
+166
+49
+48
+44
+49
+48
+44
+48
+47
+43
+48
+47
+43
+49
+48
+44
+50
+49
+44
+52
+51
+46
+53
+52
+47
+55
+55
+47
+56
+56
+48
+57
+57
+49
+59
+59
+51
+61
+61
+51
+63
+63
+53
+65
+65
+55
+68
+65
+56
+73
+69
+58
+76
+70
+58
+78
+72
+58
+80
+74
+58
+82
+75
+57
+82
+77
+58
+83
+76
+58
+81
+75
+61
+79
+74
+68
+86
+84
+85
+102
+100
+113
+119
+120
+141
+134
+134
+168
+141
+144
+185
+143
+147
+195
+143
+144
+198
+142
+139
+192
+135
+131
+182
+123
+119
+169
+112
+109
+154
+105
+100
+141
+95
+91
+126
+85
+80
+110
+78
+74
+97
+75
+71
+88
+69
+66
+77
+63
+61
+66
+59
+55
+56
+57
+53
+50
+57
+54
+47
+56
+53
+44
+56
+53
+44
+54
+55
+49
+55
+56
+51
+56
+57
+49
+59
+59
+49
+62
+60
+47
+63
+60
+43
+66
+61
+42
+67
+60
+41
+71
+63
+44
+74
+63
+43
+75
+64
+44
+76
+65
+47
+77
+64
+48
+77
+63
+50
+76
+64
+52
+76
+62
+51
+77
+63
+52
+76
+62
+53
+73
+58
+51
+67
+56
+50
+63
+56
+50
+60
+57
+52
+56
+59
+52
+55
+60
+53
+57
+60
+51
+64
+57
+49
+72
+51
+46
+90
+49
+47
+119
+55
+56
+149
+62
+68
+167
+61
+71
+169
+56
+60
+170
+59
+48
+170
+60
+43
+171
+64
+46
+172
+65
+47
+169
+64
+45
+165
+60
+41
+166
+59
+39
+171
+62
+42
+167
+56
+36
+173
+58
+39
+181
+60
+43
+188
+61
+46
+193
+60
+45
+197
+59
+46
+202
+60
+48
+202
+61
+51
+197
+63
+54
+190
+62
+51
+186
+58
+47
+183
+55
+44
+183
+55
+44
+184
+56
+43
+186
+56
+43
+186
+56
+43
+187
+55
+43
+199
+65
+53
+205
+67
+56
+197
+56
+46
+193
+49
+38
+198
+51
+41
+203
+55
+45
+207
+53
+43
+219
+52
+43
+223
+51
+41
+225
+52
+45
+226
+54
+44
+227
+53
+44
+231
+53
+43
+236
+49
+42
+240
+47
+42
+245
+47
+44
+246
+47
+42
+242
+47
+41
+236
+48
+39
+226
+50
+35
+217
+52
+33
+208
+53
+31
+207
+52
+30
+214
+49
+30
+217
+47
+30
+216
+50
+34
+216
+54
+41
+215
+57
+45
+212
+58
+48
+214
+63
+54
+216
+69
+61
+214
+70
+62
+205
+64
+55
+201
+60
+53
+203
+64
+57
+214
+75
+68
+217
+78
+71
+210
+69
+62
+197
+59
+49
+197
+61
+49
+194
+60
+48
+192
+60
+47
+186
+59
+44
+183
+57
+42
+180
+58
+43
+182
+60
+45
+185
+63
+48
+181
+57
+45
+191
+60
+50
+201
+64
+58
+210
+67
+63
+219
+67
+66
+227
+68
+72
+237
+74
+79
+246
+79
+86
+236
+63
+69
+237
+62
+67
+242
+66
+76
+251
+73
+85
+255
+74
+89
+253
+70
+88
+250
+67
+89
+251
+67
+93
+251
+64
+95
+251
+66
+100
+255
+69
+108
+255
+74
+115
+255
+78
+122
+255
+79
+124
+255
+76
+121
+255
+72
+118
+255
+68
+114
+255
+78
+124
+255
+80
+122
+251
+72
+111
+245
+74
+108
+253
+86
+116
+254
+87
+115
+243
+81
+105
+231
+71
+95
+224
+72
+93
+226
+88
+104
+255
+147
+158
+255
+178
+184
+239
+155
+155
+140
+72
+69
+108
+47
+42
+166
+106
+98
+206
+149
+142
+243
+198
+192
+255
+225
+220
+255
+240
+239
+255
+251
+253
+255
+253
+255
+251
+246
+253
+252
+246
+255
+253
+245
+255
+255
+245
+255
+255
+246
+255
+255
+248
+255
+255
+250
+254
+255
+252
+251
+255
+252
+249
+255
+251
+247
+255
+250
+247
+255
+248
+247
+255
+247
+246
+255
+245
+247
+255
+244
+246
+255
+243
+247
+255
+243
+247
+253
+241
+243
+243
+233
+234
+228
+220
+218
+214
+209
+205
+205
+202
+195
+201
+201
+191
+202
+202
+192
+202
+205
+194
+201
+208
+200
+190
+200
+191
+182
+192
+183
+54
+53
+49
+52
+51
+46
+51
+50
+46
+49
+48
+43
+49
+48
+43
+50
+49
+44
+51
+50
+45
+52
+51
+46
+54
+54
+46
+55
+55
+47
+56
+56
+48
+58
+58
+50
+60
+60
+50
+62
+62
+52
+64
+64
+54
+66
+64
+52
+74
+68
+56
+77
+69
+56
+79
+72
+56
+82
+75
+59
+84
+75
+58
+84
+77
+59
+83
+76
+60
+82
+75
+65
+81
+76
+73
+90
+87
+94
+108
+105
+124
+127
+126
+157
+140
+143
+184
+150
+153
+204
+153
+158
+216
+154
+158
+222
+153
+152
+218
+148
+145
+212
+140
+138
+201
+134
+133
+191
+129
+126
+181
+120
+118
+167
+110
+107
+150
+102
+101
+135
+93
+90
+119
+86
+84
+105
+77
+75
+89
+68
+65
+74
+62
+60
+63
+59
+58
+56
+59
+55
+52
+55
+54
+50
+53
+53
+53
+52
+53
+55
+54
+54
+52
+56
+55
+50
+60
+58
+46
+63
+60
+43
+67
+62
+42
+70
+64
+42
+71
+63
+42
+72
+64
+43
+73
+65
+44
+73
+66
+48
+73
+65
+52
+72
+66
+54
+72
+65
+57
+72
+63
+58
+76
+61
+58
+76
+58
+58
+71
+55
+55
+64
+54
+53
+58
+54
+53
+53
+55
+52
+49
+56
+49
+47
+57
+48
+55
+60
+53
+55
+52
+43
+67
+48
+41
+93
+56
+50
+126
+66
+65
+149
+71
+71
+157
+63
+64
+158
+52
+52
+167
+59
+47
+170
+60
+43
+170
+63
+45
+170
+63
+45
+169
+62
+44
+169
+62
+42
+172
+63
+43
+176
+63
+45
+171
+56
+37
+178
+57
+40
+185
+58
+43
+191
+57
+45
+195
+57
+44
+200
+58
+46
+205
+58
+48
+207
+60
+52
+203
+62
+53
+198
+59
+52
+194
+57
+49
+193
+56
+46
+193
+56
+46
+194
+57
+47
+194
+56
+46
+195
+54
+44
+197
+55
+45
+209
+67
+57
+208
+64
+55
+195
+48
+38
+195
+44
+35
+208
+55
+47
+214
+60
+52
+211
+50
+42
+224
+51
+44
+228
+50
+40
+231
+50
+43
+232
+51
+42
+234
+51
+43
+237
+50
+43
+240
+47
+42
+243
+45
+42
+246
+47
+42
+245
+46
+41
+241
+48
+41
+236
+49
+40
+225
+52
+36
+218
+53
+34
+209
+54
+32
+208
+53
+31
+216
+55
+35
+217
+51
+35
+214
+51
+36
+213
+51
+38
+213
+53
+41
+212
+56
+44
+212
+60
+49
+214
+63
+54
+236
+89
+81
+225
+82
+74
+211
+72
+65
+204
+67
+59
+202
+69
+60
+204
+73
+63
+200
+69
+59
+192
+62
+49
+188
+58
+42
+188
+59
+40
+188
+58
+42
+185
+58
+41
+183
+58
+40
+184
+58
+43
+188
+62
+48
+191
+65
+51
+193
+65
+54
+193
+60
+51
+197
+60
+54
+207
+65
+61
+215
+69
+69
+221
+71
+72
+228
+73
+77
+235
+76
+80
+232
+66
+70
+234
+64
+67
+240
+67
+73
+249
+75
+84
+254
+78
+89
+252
+74
+90
+252
+70
+92
+252
+70
+95
+248
+65
+95
+249
+66
+97
+253
+69
+105
+255
+74
+112
+255
+78
+119
+255
+79
+122
+255
+78
+120
+255
+76
+118
+254
+77
+119
+255
+79
+118
+252
+77
+116
+250
+79
+115
+255
+87
+121
+255
+95
+123
+252
+85
+111
+233
+71
+94
+243
+86
+107
+231
+83
+99
+240
+100
+113
+255
+144
+154
+254
+137
+145
+236
+130
+134
+194
+95
+98
+165
+77
+76
+179
+104
+101
+206
+141
+137
+240
+187
+183
+255
+219
+215
+255
+238
+237
+255
+247
+247
+255
+250
+253
+251
+249
+254
+253
+250
+255
+252
+251
+255
+253
+250
+255
+255
+250
+255
+255
+250
+254
+255
+251
+252
+253
+252
+250
+255
+251
+248
+255
+251
+247
+255
+251
+248
+255
+250
+249
+255
+250
+249
+255
+247
+249
+255
+245
+247
+254
+242
+246
+252
+240
+242
+249
+237
+239
+242
+230
+230
+231
+221
+219
+223
+216
+210
+219
+215
+206
+221
+219
+207
+224
+222
+210
+223
+225
+214
+221
+228
+220
+207
+216
+211
+197
+206
+201
+60
+57
+52
+59
+56
+49
+56
+53
+48
+53
+50
+43
+52
+49
+42
+52
+49
+42
+53
+50
+43
+54
+51
+44
+55
+52
+45
+56
+53
+46
+57
+54
+47
+59
+56
+49
+61
+58
+49
+63
+60
+51
+65
+62
+53
+67
+63
+52
+74
+66
+55
+77
+67
+55
+80
+71
+56
+83
+74
+59
+87
+75
+59
+85
+76
+61
+85
+75
+63
+83
+74
+67
+83
+74
+75
+93
+87
+99
+110
+108
+130
+130
+130
+166
+145
+149
+197
+154
+160
+218
+159
+166
+234
+162
+169
+241
+161
+165
+239
+158
+160
+235
+153
+155
+229
+149
+152
+221
+148
+149
+214
+144
+145
+202
+137
+137
+189
+130
+131
+177
+122
+121
+161
+114
+113
+145
+102
+99
+126
+88
+86
+107
+80
+78
+92
+73
+71
+82
+70
+67
+76
+67
+66
+74
+63
+63
+75
+61
+61
+71
+59
+58
+64
+59
+57
+58
+60
+57
+52
+63
+59
+47
+67
+61
+45
+69
+64
+44
+70
+64
+42
+70
+65
+43
+69
+66
+47
+69
+67
+52
+67
+67
+55
+66
+67
+59
+65
+67
+62
+65
+65
+65
+69
+59
+67
+71
+61
+70
+71
+64
+72
+71
+68
+75
+70
+71
+76
+67
+72
+75
+63
+72
+71
+62
+71
+66
+67
+72
+65
+65
+61
+52
+75
+58
+48
+102
+70
+59
+128
+80
+70
+138
+74
+64
+140
+63
+53
+146
+56
+45
+164
+62
+47
+169
+62
+44
+171
+62
+42
+172
+63
+43
+173
+64
+44
+175
+64
+45
+176
+63
+45
+177
+60
+42
+177
+56
+39
+182
+56
+41
+189
+57
+42
+195
+57
+44
+200
+56
+45
+204
+56
+46
+210
+57
+49
+212
+59
+53
+207
+58
+52
+205
+58
+51
+203
+56
+49
+203
+56
+49
+204
+57
+50
+205
+58
+50
+204
+55
+48
+203
+54
+47
+211
+60
+53
+213
+62
+53
+210
+57
+49
+204
+50
+40
+206
+52
+42
+216
+59
+50
+218
+60
+51
+215
+51
+42
+228
+49
+42
+233
+49
+39
+236
+49
+42
+238
+50
+41
+240
+49
+41
+242
+47
+41
+244
+45
+40
+246
+44
+40
+247
+45
+41
+244
+47
+41
+240
+49
+41
+233
+51
+40
+226
+53
+39
+217
+54
+37
+210
+55
+33
+207
+55
+32
+212
+57
+37
+213
+56
+37
+211
+54
+37
+209
+52
+37
+210
+52
+40
+211
+55
+43
+210
+56
+46
+208
+55
+47
+227
+78
+71
+232
+88
+80
+231
+90
+83
+218
+81
+73
+204
+71
+62
+196
+68
+57
+191
+64
+55
+185
+62
+47
+185
+60
+42
+185
+60
+38
+185
+60
+40
+185
+58
+39
+184
+57
+40
+186
+59
+42
+192
+62
+48
+195
+65
+52
+201
+68
+59
+198
+64
+55
+201
+64
+58
+209
+70
+67
+213
+73
+72
+214
+72
+71
+216
+71
+74
+223
+73
+75
+230
+70
+72
+232
+66
+68
+237
+68
+73
+245
+76
+83
+252
+81
+90
+251
+79
+93
+251
+76
+93
+251
+75
+96
+246
+68
+94
+247
+68
+97
+249
+70
+102
+253
+73
+108
+255
+78
+117
+255
+79
+120
+255
+79
+120
+255
+80
+119
+246
+85
+119
+242
+84
+117
+244
+84
+118
+250
+89
+120
+255
+93
+123
+255
+92
+119
+247
+83
+107
+236
+74
+95
+246
+89
+106
+239
+87
+102
+227
+79
+93
+239
+94
+107
+218
+78
+89
+223
+86
+96
+222
+86
+96
+210
+89
+96
+191
+99
+100
+199
+128
+124
+230
+169
+166
+255
+208
+207
+255
+233
+231
+255
+241
+240
+255
+246
+247
+254
+252
+253
+251
+252
+255
+249
+253
+255
+248
+252
+255
+250
+251
+253
+250
+250
+252
+249
+249
+249
+250
+249
+247
+252
+248
+245
+255
+250
+246
+255
+250
+247
+255
+251
+250
+255
+250
+249
+255
+247
+247
+254
+242
+242
+252
+237
+240
+249
+234
+237
+240
+225
+228
+233
+221
+221
+228
+217
+213
+226
+217
+210
+230
+223
+213
+235
+231
+219
+241
+237
+225
+241
+241
+229
+236
+243
+236
+220
+231
+227
+208
+219
+215
+64
+61
+54
+61
+58
+51
+58
+55
+48
+55
+52
+45
+53
+50
+43
+53
+50
+43
+53
+50
+43
+54
+51
+44
+55
+52
+45
+55
+52
+45
+57
+54
+47
+59
+56
+49
+61
+58
+49
+63
+60
+51
+64
+61
+52
+66
+62
+51
+74
+66
+55
+77
+67
+55
+82
+70
+56
+86
+74
+58
+87
+75
+59
+88
+76
+60
+87
+75
+63
+84
+73
+67
+83
+74
+77
+94
+88
+102
+112
+109
+136
+130
+132
+171
+145
+151
+203
+156
+164
+227
+163
+173
+245
+167
+176
+253
+170
+177
+255
+166
+172
+250
+161
+167
+243
+160
+164
+238
+159
+163
+234
+157
+161
+225
+153
+155
+214
+149
+150
+204
+146
+146
+196
+137
+136
+180
+121
+121
+159
+106
+105
+139
+96
+93
+124
+88
+85
+112
+82
+80
+104
+79
+77
+101
+78
+74
+99
+75
+71
+94
+70
+66
+83
+64
+61
+72
+63
+58
+62
+63
+58
+54
+64
+60
+49
+65
+62
+47
+67
+64
+47
+67
+66
+48
+66
+67
+51
+66
+68
+55
+63
+68
+61
+62
+68
+64
+60
+69
+68
+59
+66
+72
+65
+67
+82
+71
+72
+92
+80
+81
+99
+89
+91
+106
+95
+97
+110
+99
+99
+109
+99
+98
+104
+101
+95
+97
+102
+88
+87
+95
+74
+69
+106
+72
+63
+130
+83
+73
+146
+88
+76
+143
+76
+60
+142
+65
+49
+150
+63
+46
+167
+66
+48
+174
+64
+47
+174
+65
+45
+175
+64
+45
+176
+65
+46
+180
+65
+47
+178
+61
+43
+176
+55
+38
+181
+55
+40
+188
+56
+43
+194
+56
+43
+200
+56
+45
+205
+54
+45
+209
+55
+47
+213
+56
+49
+216
+59
+52
+210
+55
+50
+208
+55
+50
+208
+55
+50
+209
+56
+50
+212
+57
+52
+212
+57
+52
+211
+56
+51
+211
+54
+47
+222
+65
+58
+213
+56
+47
+209
+51
+42
+214
+56
+47
+222
+61
+53
+222
+61
+53
+218
+57
+49
+220
+53
+44
+231
+50
+41
+235
+48
+39
+239
+48
+40
+241
+48
+41
+244
+47
+41
+247
+45
+41
+247
+44
+40
+247
+44
+40
+247
+45
+41
+244
+47
+41
+238
+50
+41
+233
+52
+41
+225
+53
+39
+218
+55
+38
+212
+55
+36
+207
+56
+35
+206
+55
+34
+207
+56
+37
+206
+55
+36
+207
+54
+38
+208
+55
+41
+210
+57
+43
+209
+55
+43
+206
+52
+42
+203
+52
+43
+227
+78
+71
+243
+100
+92
+235
+96
+89
+213
+79
+70
+196
+65
+55
+186
+59
+50
+181
+57
+45
+184
+62
+41
+184
+62
+39
+185
+60
+38
+185
+59
+37
+186
+57
+38
+189
+57
+42
+192
+60
+47
+196
+62
+50
+202
+68
+57
+202
+65
+57
+206
+69
+63
+213
+75
+72
+211
+76
+73
+206
+71
+68
+205
+69
+69
+214
+72
+71
+227
+73
+73
+230
+67
+68
+232
+69
+72
+242
+77
+83
+248
+83
+90
+249
+82
+92
+247
+79
+94
+250
+79
+97
+244
+72
+94
+245
+71
+96
+248
+71
+100
+251
+73
+105
+255
+78
+114
+255
+81
+120
+255
+82
+121
+255
+84
+122
+239
+84
+116
+239
+90
+119
+249
+96
+126
+253
+96
+125
+249
+86
+113
+242
+78
+103
+245
+81
+105
+253
+90
+109
+251
+93
+108
+255
+102
+116
+235
+80
+94
+243
+88
+102
+238
+83
+97
+246
+90
+104
+237
+79
+94
+223
+83
+94
+190
+92
+93
+188
+114
+111
+216
+152
+150
+249
+198
+195
+255
+226
+225
+255
+235
+233
+254
+242
+242
+255
+255
+253
+252
+255
+255
+251
+255
+255
+248
+255
+255
+249
+255
+253
+249
+253
+252
+250
+252
+249
+252
+251
+247
+253
+249
+246
+253
+248
+244
+255
+248
+245
+255
+249
+248
+255
+249
+248
+255
+245
+245
+251
+239
+239
+247
+232
+235
+243
+229
+229
+235
+221
+221
+232
+218
+217
+228
+217
+211
+232
+222
+213
+240
+232
+221
+249
+243
+229
+255
+250
+236
+254
+254
+242
+244
+250
+246
+227
+237
+236
+214
+224
+223
+66
+62
+53
+65
+61
+52
+64
+60
+51
+62
+58
+49
+60
+56
+47
+58
+54
+45
+56
+52
+43
+55
+51
+42
+54
+50
+41
+54
+50
+41
+55
+51
+42
+56
+52
+43
+59
+54
+48
+62
+57
+51
+65
+60
+54
+69
+62
+54
+73
+64
+55
+77
+67
+55
+82
+70
+56
+85
+73
+57
+87
+74
+58
+88
+75
+59
+90
+76
+65
+91
+78
+72
+84
+73
+77
+88
+82
+96
+103
+100
+129
+124
+126
+167
+141
+146
+202
+151
+160
+227
+158
+170
+246
+165
+176
+255
+170
+179
+255
+171
+178
+255
+172
+180
+255
+172
+178
+252
+170
+177
+249
+170
+175
+243
+168
+172
+236
+169
+171
+232
+159
+161
+218
+153
+154
+210
+141
+141
+193
+129
+127
+177
+116
+114
+161
+104
+101
+146
+93
+90
+135
+88
+82
+126
+88
+81
+122
+89
+81
+118
+86
+79
+110
+77
+72
+95
+67
+63
+77
+63
+58
+64
+63
+59
+58
+66
+63
+56
+62
+62
+52
+64
+66
+53
+66
+69
+58
+63
+68
+61
+60
+66
+62
+58
+67
+66
+62
+70
+72
+65
+75
+84
+70
+85
+106
+85
+101
+126
+101
+113
+137
+108
+114
+136
+119
+117
+139
+131
+119
+139
+132
+111
+126
+128
+95
+106
+137
+91
+101
+144
+88
+91
+157
+87
+87
+164
+87
+81
+162
+78
+68
+154
+65
+51
+151
+58
+40
+158
+59
+40
+167
+60
+42
+172
+61
+42
+174
+63
+44
+177
+64
+46
+179
+64
+45
+180
+63
+45
+182
+61
+44
+185
+59
+44
+186
+54
+39
+190
+54
+40
+196
+54
+42
+203
+55
+45
+209
+55
+45
+214
+56
+47
+218
+57
+49
+218
+56
+51
+215
+56
+52
+216
+57
+53
+217
+58
+54
+216
+57
+51
+216
+54
+49
+216
+54
+49
+218
+56
+51
+221
+58
+51
+230
+67
+60
+224
+61
+54
+218
+55
+48
+227
+64
+55
+254
+91
+82
+255
+108
+99
+255
+93
+84
+231
+63
+54
+229
+51
+41
+237
+50
+41
+241
+50
+42
+244
+47
+41
+244
+42
+38
+245
+40
+37
+248
+40
+38
+248
+43
+40
+247
+45
+43
+243
+48
+44
+237
+50
+43
+227
+49
+39
+218
+48
+35
+212
+49
+34
+212
+52
+36
+211
+58
+40
+204
+59
+38
+202
+60
+40
+205
+60
+41
+207
+60
+42
+210
+58
+44
+210
+57
+43
+210
+56
+44
+209
+55
+45
+218
+64
+56
+207
+56
+49
+220
+71
+65
+244
+99
+94
+229
+88
+81
+203
+66
+60
+197
+64
+59
+183
+52
+42
+183
+58
+38
+182
+60
+36
+185
+60
+38
+186
+60
+38
+189
+58
+40
+191
+58
+43
+196
+60
+48
+198
+62
+50
+199
+62
+52
+204
+67
+59
+217
+80
+74
+223
+88
+82
+212
+79
+74
+195
+63
+58
+192
+63
+58
+207
+72
+68
+222
+72
+71
+226
+71
+69
+230
+74
+75
+239
+80
+84
+241
+82
+87
+239
+78
+86
+237
+75
+88
+241
+76
+92
+249
+82
+102
+248
+79
+102
+247
+75
+101
+247
+74
+102
+252
+77
+108
+255
+81
+115
+255
+82
+118
+253
+82
+118
+245
+88
+119
+239
+89
+118
+243
+89
+117
+251
+92
+120
+255
+93
+120
+255
+91
+115
+254
+88
+110
+252
+86
+106
+255
+101
+117
+247
+89
+103
+253
+95
+109
+252
+94
+108
+234
+73
+88
+235
+73
+88
+251
+84
+101
+233
+88
+101
+198
+102
+103
+173
+103
+101
+203
+142
+139
+232
+181
+178
+249
+209
+207
+255
+234
+231
+254
+238
+238
+252
+248
+247
+246
+250
+249
+247
+255
+253
+247
+255
+254
+246
+255
+252
+248
+254
+252
+253
+255
+252
+253
+252
+248
+251
+247
+244
+255
+250
+246
+255
+250
+246
+255
+247
+244
+253
+243
+241
+255
+244
+244
+255
+243
+243
+246
+232
+232
+231
+217
+217
+228
+214
+213
+223
+209
+206
+225
+214
+208
+241
+231
+222
+252
+244
+231
+253
+247
+231
+255
+251
+232
+255
+255
+243
+249
+254
+248
+231
+240
+239
+218
+227
+226
+67
+63
+54
+66
+62
+51
+65
+61
+52
+63
+59
+50
+61
+57
+48
+59
+55
+46
+58
+54
+45
+57
+53
+44
+55
+51
+42
+55
+51
+42
+55
+51
+42
+56
+52
+43
+58
+53
+47
+61
+56
+50
+64
+59
+53
+68
+61
+53
+72
+63
+54
+76
+66
+54
+81
+69
+55
+84
+72
+56
+86
+73
+56
+87
+74
+57
+89
+75
+62
+90
+77
+69
+85
+74
+78
+87
+81
+95
+101
+98
+127
+121
+123
+164
+138
+143
+201
+148
+157
+226
+155
+166
+245
+163
+174
+254
+171
+180
+255
+172
+181
+255
+174
+182
+255
+175
+183
+255
+176
+183
+255
+175
+182
+252
+175
+180
+248
+175
+178
+245
+169
+170
+235
+162
+163
+227
+152
+152
+216
+140
+138
+201
+128
+127
+187
+117
+113
+174
+105
+101
+160
+99
+94
+152
+96
+87
+142
+96
+86
+136
+93
+84
+127
+86
+80
+116
+77
+73
+98
+70
+67
+84
+66
+65
+73
+65
+65
+67
+60
+60
+58
+65
+66
+61
+70
+69
+65
+67
+68
+63
+65
+63
+64
+68
+66
+69
+79
+77
+82
+88
+86
+99
+102
+103
+131
+116
+116
+150
+130
+125
+157
+138
+125
+155
+149
+124
+154
+160
+124
+150
+165
+113
+136
+164
+96
+117
+172
+89
+107
+180
+87
+98
+185
+81
+88
+181
+73
+71
+173
+64
+57
+168
+60
+47
+168
+61
+41
+169
+63
+41
+167
+56
+37
+168
+55
+37
+171
+56
+38
+174
+57
+40
+176
+56
+39
+178
+57
+40
+181
+55
+40
+184
+54
+40
+187
+51
+37
+194
+52
+40
+202
+55
+45
+211
+58
+50
+217
+60
+51
+222
+61
+53
+223
+60
+53
+223
+60
+53
+225
+62
+57
+223
+60
+55
+223
+60
+55
+225
+62
+57
+229
+66
+61
+232
+67
+61
+231
+66
+60
+230
+65
+59
+229
+64
+58
+230
+66
+57
+228
+64
+55
+220
+56
+47
+213
+49
+40
+216
+54
+43
+235
+73
+62
+255
+91
+79
+241
+64
+54
+238
+54
+44
+234
+43
+35
+238
+41
+35
+248
+45
+41
+255
+47
+45
+254
+44
+43
+246
+40
+40
+250
+48
+46
+245
+52
+47
+239
+54
+49
+231
+54
+46
+222
+51
+41
+214
+50
+38
+212
+50
+37
+207
+54
+38
+203
+58
+39
+200
+59
+39
+202
+60
+40
+205
+58
+40
+207
+57
+42
+208
+55
+41
+209
+53
+41
+208
+52
+40
+211
+57
+47
+207
+53
+45
+212
+61
+54
+229
+80
+74
+229
+84
+81
+219
+76
+72
+205
+66
+63
+183
+49
+40
+188
+59
+40
+187
+61
+38
+189
+60
+39
+190
+59
+39
+190
+57
+40
+192
+56
+40
+194
+58
+44
+196
+58
+47
+200
+62
+52
+203
+66
+56
+213
+79
+70
+220
+87
+80
+210
+82
+73
+195
+68
+61
+191
+67
+59
+204
+72
+67
+219
+76
+72
+223
+74
+70
+229
+77
+76
+235
+83
+82
+237
+84
+87
+235
+80
+86
+233
+78
+86
+236
+79
+90
+247
+86
+102
+248
+85
+104
+249
+83
+105
+250
+82
+107
+252
+82
+109
+255
+83
+113
+255
+83
+116
+254
+83
+117
+241
+76
+108
+245
+84
+115
+255
+92
+121
+255
+96
+123
+255
+91
+117
+253
+85
+110
+250
+82
+105
+249
+84
+101
+249
+87
+102
+242
+84
+98
+249
+93
+104
+249
+93
+104
+236
+82
+94
+241
+87
+99
+247
+93
+105
+217
+86
+94
+182
+96
+95
+153
+92
+87
+185
+127
+125
+218
+169
+165
+239
+199
+197
+254
+224
+222
+251
+233
+233
+253
+248
+245
+248
+250
+247
+247
+255
+253
+247
+255
+254
+245
+255
+252
+248
+254
+252
+253
+255
+252
+254
+253
+251
+252
+248
+245
+253
+250
+245
+254
+249
+245
+252
+247
+243
+252
+244
+241
+255
+245
+244
+255
+244
+244
+245
+233
+233
+234
+220
+219
+229
+215
+212
+222
+209
+203
+223
+213
+204
+239
+229
+219
+252
+245
+229
+255
+249
+231
+255
+252
+232
+255
+255
+239
+248
+253
+246
+232
+241
+238
+221
+227
+225
+69
+65
+54
+69
+65
+53
+67
+63
+52
+65
+61
+50
+63
+59
+48
+61
+57
+46
+60
+56
+45
+59
+55
+44
+56
+52
+43
+56
+52
+43
+55
+51
+42
+56
+52
+43
+58
+53
+47
+61
+56
+50
+63
+58
+52
+67
+60
+52
+71
+62
+53
+74
+66
+55
+78
+68
+56
+82
+70
+54
+84
+71
+54
+87
+71
+55
+89
+73
+60
+89
+74
+67
+87
+75
+75
+88
+80
+93
+98
+94
+121
+115
+117
+156
+133
+138
+194
+144
+153
+220
+152
+164
+240
+160
+171
+250
+170
+179
+254
+173
+181
+254
+175
+183
+255
+177
+185
+255
+179
+186
+255
+180
+187
+255
+181
+185
+255
+181
+185
+255
+175
+178
+249
+172
+172
+244
+163
+163
+235
+153
+151
+224
+142
+141
+211
+131
+128
+199
+120
+117
+188
+115
+109
+179
+107
+96
+162
+105
+93
+155
+99
+90
+145
+93
+87
+133
+86
+82
+119
+78
+75
+104
+69
+68
+86
+64
+64
+76
+56
+53
+60
+65
+60
+64
+75
+65
+66
+76
+64
+66
+81
+62
+66
+90
+69
+74
+112
+87
+93
+130
+99
+115
+152
+115
+149
+165
+122
+165
+175
+127
+167
+178
+123
+162
+184
+118
+154
+192
+112
+147
+194
+99
+131
+192
+84
+110
+193
+71
+94
+207
+76
+92
+207
+73
+82
+195
+61
+62
+183
+54
+48
+180
+58
+43
+178
+61
+41
+173
+61
+39
+175
+60
+41
+176
+59
+41
+178
+58
+41
+180
+59
+42
+183
+60
+44
+187
+60
+45
+192
+60
+45
+196
+60
+46
+196
+54
+42
+203
+56
+46
+211
+60
+49
+217
+63
+53
+223
+65
+56
+225
+62
+55
+224
+60
+51
+223
+58
+52
+220
+55
+49
+217
+52
+46
+216
+51
+45
+222
+57
+51
+230
+65
+59
+236
+69
+63
+233
+66
+60
+228
+61
+53
+227
+60
+52
+219
+52
+44
+216
+52
+43
+219
+55
+45
+212
+50
+39
+204
+44
+32
+214
+54
+42
+233
+71
+58
+245
+75
+62
+242
+64
+54
+239
+52
+45
+240
+45
+41
+246
+44
+42
+250
+44
+44
+252
+44
+44
+248
+42
+44
+240
+42
+41
+236
+47
+43
+232
+50
+46
+227
+53
+46
+220
+52
+43
+216
+49
+40
+213
+49
+39
+209
+51
+39
+205
+55
+40
+203
+58
+41
+205
+58
+40
+208
+58
+41
+210
+59
+42
+211
+58
+42
+212
+56
+43
+212
+56
+44
+209
+52
+43
+214
+60
+52
+213
+58
+53
+213
+60
+55
+229
+79
+78
+237
+89
+87
+217
+69
+69
+194
+51
+47
+192
+59
+44
+191
+60
+40
+192
+59
+42
+191
+58
+41
+193
+57
+41
+192
+56
+40
+192
+56
+42
+192
+56
+44
+198
+61
+51
+199
+65
+54
+207
+74
+65
+216
+85
+75
+210
+82
+71
+198
+71
+62
+192
+68
+58
+199
+71
+62
+214
+75
+68
+216
+73
+67
+221
+76
+73
+228
+83
+80
+229
+83
+84
+226
+80
+83
+226
+77
+83
+229
+78
+87
+242
+88
+100
+246
+90
+104
+253
+91
+112
+254
+90
+114
+252
+86
+110
+250
+82
+108
+251
+81
+108
+255
+81
+112
+248
+70
+106
+255
+79
+116
+255
+89
+123
+255
+90
+121
+255
+86
+113
+252
+84
+107
+254
+87
+107
+255
+92
+109
+250
+89
+104
+247
+91
+104
+248
+98
+109
+242
+98
+107
+231
+96
+103
+234
+105
+110
+229
+106
+109
+197
+94
+95
+160
+93
+87
+126
+77
+70
+155
+108
+102
+195
+151
+148
+223
+185
+182
+241
+211
+209
+244
+224
+223
+255
+245
+244
+249
+249
+247
+249
+255
+253
+247
+255
+255
+245
+255
+252
+248
+254
+252
+253
+255
+254
+255
+252
+253
+252
+248
+247
+252
+249
+244
+252
+249
+242
+250
+247
+242
+251
+246
+242
+255
+247
+244
+255
+246
+244
+249
+238
+236
+239
+228
+226
+230
+219
+215
+220
+209
+203
+221
+211
+201
+238
+228
+216
+253
+246
+228
+255
+251
+232
+255
+253
+231
+255
+255
+236
+248
+251
+242
+233
+239
+235
+224
+229
+225
+73
+69
+57
+72
+68
+56
+70
+66
+54
+68
+64
+52
+66
+62
+51
+64
+60
+49
+63
+59
+48
+62
+58
+47
+58
+54
+45
+57
+53
+44
+57
+53
+44
+57
+53
+44
+58
+53
+47
+60
+55
+49
+62
+57
+51
+64
+59
+53
+69
+62
+54
+73
+64
+55
+76
+68
+55
+79
+70
+53
+82
+69
+52
+85
+69
+53
+87
+71
+56
+87
+73
+62
+88
+77
+75
+88
+78
+87
+94
+90
+113
+112
+112
+150
+128
+134
+186
+140
+150
+212
+149
+161
+233
+157
+169
+245
+168
+176
+249
+169
+177
+249
+173
+179
+253
+176
+183
+255
+177
+183
+255
+178
+185
+255
+180
+184
+255
+180
+184
+255
+175
+177
+252
+171
+173
+248
+165
+167
+242
+159
+158
+234
+151
+150
+226
+140
+139
+215
+130
+129
+205
+125
+121
+197
+117
+109
+182
+112
+103
+170
+102
+96
+158
+95
+90
+144
+89
+88
+132
+81
+81
+117
+71
+71
+99
+65
+62
+81
+61
+53
+68
+72
+56
+66
+84
+61
+67
+96
+64
+69
+110
+67
+74
+128
+79
+85
+150
+93
+100
+170
+103
+120
+189
+108
+141
+201
+110
+153
+203
+111
+152
+201
+105
+143
+198
+97
+131
+199
+88
+120
+198
+73
+103
+196
+59
+85
+197
+51
+72
+216
+65
+80
+223
+69
+79
+208
+60
+60
+195
+56
+49
+194
+64
+50
+186
+65
+44
+175
+59
+36
+173
+54
+34
+173
+53
+36
+174
+53
+36
+179
+53
+38
+182
+55
+40
+188
+56
+43
+195
+59
+45
+200
+60
+47
+211
+64
+54
+215
+64
+55
+218
+64
+54
+220
+63
+54
+222
+61
+53
+222
+57
+51
+221
+54
+46
+219
+52
+44
+211
+46
+40
+210
+45
+39
+211
+46
+40
+216
+51
+45
+225
+58
+52
+227
+60
+52
+225
+56
+49
+220
+53
+45
+220
+53
+45
+208
+44
+34
+205
+41
+31
+217
+55
+44
+226
+66
+54
+220
+63
+48
+208
+52
+37
+203
+46
+31
+233
+70
+55
+243
+73
+60
+253
+72
+63
+252
+60
+55
+244
+45
+42
+241
+35
+37
+245
+39
+41
+251
+47
+50
+241
+45
+46
+235
+47
+46
+228
+50
+46
+222
+51
+44
+218
+49
+42
+215
+48
+42
+214
+47
+41
+211
+48
+39
+211
+55
+42
+210
+57
+43
+214
+58
+43
+216
+60
+45
+218
+62
+47
+219
+63
+48
+220
+64
+51
+220
+64
+51
+210
+54
+42
+230
+76
+66
+229
+74
+69
+206
+53
+48
+223
+71
+70
+243
+90
+92
+223
+73
+75
+213
+65
+63
+200
+60
+47
+196
+59
+43
+195
+58
+42
+195
+58
+42
+194
+58
+42
+194
+58
+42
+193
+57
+43
+190
+57
+42
+194
+60
+48
+194
+62
+50
+200
+70
+57
+207
+79
+66
+206
+80
+68
+198
+72
+60
+191
+67
+55
+193
+67
+55
+206
+72
+63
+209
+70
+63
+213
+74
+69
+219
+80
+75
+221
+82
+79
+217
+77
+76
+218
+75
+77
+220
+75
+80
+235
+88
+96
+243
+91
+103
+252
+97
+113
+255
+97
+117
+250
+88
+109
+245
+79
+103
+245
+77
+103
+253
+78
+107
+255
+76
+112
+255
+79
+116
+255
+83
+115
+255
+82
+110
+250
+84
+108
+252
+90
+111
+255
+99
+117
+255
+105
+120
+255
+102
+117
+250
+98
+111
+244
+98
+109
+236
+101
+108
+224
+103
+108
+212
+106
+106
+200
+106
+104
+177
+104
+97
+141
+94
+84
+104
+70
+60
+130
+93
+85
+172
+135
+129
+206
+171
+169
+229
+199
+197
+239
+218
+217
+255
+243
+243
+251
+247
+246
+249
+253
+252
+248
+255
+255
+245
+255
+254
+248
+254
+254
+255
+255
+255
+255
+251
+255
+254
+248
+248
+251
+250
+245
+250
+250
+242
+249
+248
+243
+253
+250
+245
+255
+251
+247
+255
+250
+247
+253
+243
+241
+247
+236
+232
+235
+224
+218
+223
+213
+204
+222
+212
+202
+237
+230
+214
+254
+247
+228
+255
+254
+232
+255
+254
+229
+255
+254
+233
+247
+249
+238
+234
+239
+232
+228
+231
+224
+78
+72
+58
+77
+71
+57
+76
+70
+56
+74
+68
+54
+72
+66
+54
+70
+64
+52
+68
+61
+51
+67
+60
+50
+63
+56
+48
+62
+55
+47
+61
+54
+46
+61
+54
+46
+61
+54
+48
+62
+55
+49
+64
+57
+51
+63
+58
+52
+67
+62
+56
+69
+65
+56
+75
+67
+56
+78
+69
+54
+81
+68
+51
+82
+69
+50
+86
+70
+54
+86
+72
+59
+90
+77
+71
+86
+77
+82
+91
+87
+104
+108
+107
+139
+126
+130
+177
+138
+147
+206
+146
+159
+227
+154
+166
+238
+166
+174
+247
+169
+175
+249
+173
+176
+253
+175
+179
+253
+176
+179
+255
+176
+180
+254
+176
+179
+255
+175
+179
+253
+171
+174
+251
+168
+171
+248
+164
+167
+244
+160
+162
+239
+154
+156
+233
+147
+149
+226
+138
+140
+217
+134
+133
+209
+131
+127
+201
+123
+117
+187
+109
+107
+172
+100
+101
+158
+95
+97
+146
+89
+91
+132
+82
+81
+115
+78
+72
+98
+87
+70
+89
+95
+67
+81
+109
+66
+76
+129
+69
+77
+152
+77
+84
+172
+85
+93
+188
+91
+98
+202
+90
+104
+214
+84
+112
+223
+83
+118
+222
+84
+117
+215
+80
+110
+208
+74
+99
+203
+67
+89
+198
+57
+74
+194
+47
+63
+211
+57
+69
+225
+68
+77
+228
+72
+75
+215
+63
+60
+205
+62
+54
+203
+71
+58
+194
+73
+52
+182
+63
+41
+183
+62
+43
+184
+61
+45
+186
+60
+45
+189
+62
+47
+195
+63
+48
+202
+66
+52
+208
+68
+55
+213
+69
+58
+217
+69
+57
+218
+66
+55
+219
+62
+53
+217
+59
+50
+217
+54
+45
+217
+53
+44
+218
+51
+43
+215
+51
+42
+212
+49
+42
+215
+52
+45
+218
+55
+46
+221
+57
+48
+223
+56
+48
+222
+55
+47
+221
+54
+46
+220
+53
+44
+214
+47
+38
+217
+53
+43
+215
+55
+43
+207
+50
+35
+205
+49
+34
+210
+57
+41
+213
+62
+45
+212
+59
+41
+216
+60
+45
+230
+68
+55
+248
+74
+65
+253
+68
+63
+249
+54
+52
+245
+42
+45
+246
+42
+45
+247
+47
+50
+247
+54
+55
+237
+53
+53
+226
+51
+48
+218
+49
+44
+215
+48
+42
+215
+47
+44
+217
+48
+45
+217
+48
+43
+227
+56
+49
+228
+57
+49
+226
+58
+49
+226
+59
+50
+224
+60
+48
+223
+61
+48
+220
+63
+48
+218
+62
+49
+209
+55
+43
+239
+87
+76
+248
+97
+90
+211
+59
+54
+209
+59
+58
+230
+80
+81
+220
+70
+72
+230
+80
+81
+207
+60
+52
+202
+58
+47
+198
+56
+44
+197
+57
+44
+196
+58
+45
+196
+60
+46
+195
+59
+45
+192
+59
+44
+190
+58
+45
+190
+60
+46
+195
+65
+51
+199
+72
+57
+199
+73
+59
+194
+68
+54
+190
+64
+50
+188
+62
+48
+201
+70
+60
+202
+69
+60
+206
+73
+66
+213
+80
+73
+215
+82
+77
+213
+78
+75
+211
+75
+75
+215
+76
+79
+233
+90
+96
+240
+94
+104
+252
+102
+114
+255
+104
+120
+252
+93
+113
+242
+80
+101
+243
+77
+101
+252
+79
+107
+255
+83
+117
+255
+82
+116
+254
+81
+111
+244
+82
+106
+243
+92
+111
+250
+103
+119
+253
+105
+119
+249
+101
+115
+253
+101
+116
+245
+94
+109
+239
+94
+107
+236
+106
+114
+221
+115
+117
+192
+107
+102
+168
+101
+92
+156
+110
+97
+127
+101
+86
+89
+71
+57
+110
+86
+74
+150
+123
+114
+190
+159
+156
+223
+193
+193
+238
+214
+214
+254
+238
+239
+254
+245
+246
+252
+252
+252
+249
+255
+255
+246
+255
+254
+249
+253
+254
+255
+255
+255
+255
+251
+255
+254
+248
+250
+253
+254
+248
+250
+253
+244
+250
+251
+245
+254
+253
+248
+255
+255
+250
+255
+253
+249
+255
+250
+244
+255
+246
+241
+242
+233
+226
+229
+221
+210
+225
+217
+204
+240
+233
+215
+255
+250
+228
+255
+255
+230
+255
+254
+229
+255
+254
+233
+246
+248
+234
+237
+240
+231
+232
+233
+225
+81
+75
+61
+80
+74
+60
+79
+73
+59
+77
+71
+57
+75
+69
+57
+73
+67
+55
+71
+64
+54
+71
+64
+54
+66
+59
+51
+65
+58
+50
+64
+57
+49
+63
+56
+48
+63
+56
+50
+63
+56
+50
+65
+58
+52
+64
+59
+53
+66
+63
+56
+69
+66
+57
+75
+69
+57
+77
+70
+54
+80
+69
+51
+82
+69
+50
+85
+70
+51
+85
+72
+55
+89
+76
+67
+85
+75
+76
+90
+83
+99
+105
+105
+133
+124
+129
+171
+137
+147
+200
+147
+158
+222
+154
+164
+235
+166
+172
+248
+169
+172
+251
+172
+173
+253
+173
+176
+255
+174
+177
+255
+174
+177
+254
+173
+176
+253
+173
+176
+253
+169
+172
+249
+167
+170
+247
+164
+168
+242
+162
+166
+240
+159
+163
+237
+154
+158
+232
+149
+153
+227
+146
+148
+222
+146
+146
+218
+137
+138
+205
+124
+128
+192
+115
+120
+178
+111
+117
+169
+109
+112
+157
+105
+103
+142
+106
+95
+125
+121
+95
+120
+130
+87
+106
+142
+80
+95
+163
+79
+92
+187
+83
+92
+205
+84
+93
+214
+80
+87
+218
+72
+83
+224
+65
+83
+228
+65
+84
+224
+69
+85
+217
+69
+81
+210
+69
+77
+204
+65
+70
+199
+59
+60
+198
+54
+54
+227
+74
+76
+229
+73
+74
+224
+66
+65
+211
+56
+52
+206
+57
+50
+206
+65
+55
+200
+68
+53
+190
+63
+46
+195
+69
+54
+195
+69
+54
+197
+70
+55
+201
+69
+56
+206
+70
+56
+209
+71
+58
+215
+71
+60
+218
+71
+61
+214
+62
+51
+213
+59
+49
+214
+56
+47
+213
+52
+44
+214
+51
+42
+216
+52
+43
+219
+52
+44
+218
+54
+45
+219
+56
+49
+221
+60
+52
+224
+61
+52
+223
+60
+51
+221
+57
+48
+220
+53
+45
+220
+53
+44
+219
+55
+45
+210
+46
+36
+221
+59
+48
+218
+61
+46
+205
+49
+34
+198
+45
+29
+206
+55
+38
+210
+61
+41
+205
+58
+38
+204
+57
+39
+212
+56
+41
+226
+58
+47
+243
+61
+57
+255
+64
+64
+255
+60
+62
+254
+51
+55
+243
+44
+47
+234
+44
+46
+225
+43
+42
+216
+42
+41
+212
+43
+40
+215
+47
+44
+222
+52
+52
+228
+56
+56
+233
+57
+57
+239
+55
+53
+240
+55
+52
+238
+55
+51
+232
+55
+49
+227
+55
+45
+220
+54
+42
+215
+53
+40
+209
+53
+38
+205
+53
+40
+231
+80
+69
+255
+109
+99
+219
+72
+65
+200
+52
+50
+215
+67
+67
+211
+62
+66
+234
+86
+86
+217
+65
+60
+210
+62
+52
+203
+56
+46
+198
+54
+43
+198
+58
+45
+198
+60
+47
+195
+62
+47
+193
+61
+46
+187
+57
+43
+187
+60
+45
+190
+63
+48
+192
+65
+50
+191
+65
+50
+189
+64
+46
+188
+61
+46
+187
+60
+45
+195
+67
+54
+196
+68
+57
+200
+72
+63
+208
+80
+71
+211
+82
+76
+208
+79
+73
+210
+78
+76
+213
+79
+78
+233
+94
+99
+238
+97
+103
+251
+105
+116
+255
+110
+122
+255
+100
+117
+245
+86
+106
+245
+81
+105
+254
+86
+111
+255
+86
+115
+255
+86
+113
+245
+87
+110
+238
+93
+110
+241
+109
+120
+247
+117
+127
+240
+106
+115
+227
+87
+98
+243
+95
+109
+245
+94
+109
+241
+96
+111
+241
+114
+125
+238
+135
+138
+206
+128
+124
+169
+117
+104
+151
+122
+106
+117
+106
+88
+82
+77
+58
+97
+85
+71
+132
+112
+103
+177
+149
+146
+221
+191
+191
+239
+213
+216
+253
+233
+235
+254
+244
+245
+252
+250
+251
+250
+254
+255
+248
+254
+254
+252
+253
+255
+255
+254
+255
+255
+250
+255
+255
+249
+253
+255
+255
+251
+248
+254
+244
+250
+253
+246
+255
+255
+250
+255
+255
+250
+255
+255
+248
+255
+252
+246
+255
+253
+245
+250
+241
+232
+238
+230
+219
+234
+226
+213
+245
+240
+221
+255
+251
+229
+255
+254
+229
+255
+254
+226
+255
+255
+231
+249
+250
+234
+242
+244
+231
+238
+240
+229
+83
+77
+61
+82
+76
+60
+81
+75
+61
+79
+73
+59
+77
+71
+57
+75
+69
+55
+74
+68
+56
+73
+67
+55
+69
+62
+52
+68
+61
+51
+66
+59
+51
+65
+58
+50
+64
+57
+51
+65
+58
+52
+65
+57
+54
+64
+59
+55
+65
+64
+59
+67
+67
+59
+73
+69
+57
+77
+71
+55
+79
+71
+50
+82
+70
+48
+85
+70
+49
+85
+72
+53
+87
+75
+63
+82
+72
+70
+88
+82
+94
+106
+103
+130
+125
+129
+167
+137
+147
+196
+146
+158
+218
+152
+162
+231
+164
+167
+246
+166
+167
+250
+171
+169
+252
+171
+172
+254
+172
+173
+255
+173
+174
+254
+172
+174
+251
+172
+174
+251
+168
+172
+246
+166
+170
+244
+164
+168
+241
+163
+167
+240
+161
+168
+238
+160
+167
+237
+157
+164
+232
+155
+162
+230
+153
+158
+226
+146
+154
+219
+139
+147
+210
+134
+143
+202
+131
+141
+194
+132
+136
+183
+131
+129
+168
+136
+121
+154
+143
+109
+136
+154
+99
+122
+169
+88
+105
+187
+81
+95
+207
+77
+89
+224
+73
+82
+232
+65
+73
+232
+62
+65
+228
+62
+62
+222
+65
+60
+216
+69
+61
+210
+74
+60
+202
+75
+60
+194
+71
+53
+191
+68
+50
+195
+65
+49
+226
+86
+73
+223
+72
+63
+217
+60
+55
+216
+54
+51
+218
+56
+53
+216
+59
+54
+210
+57
+52
+200
+56
+48
+192
+58
+46
+190
+60
+46
+191
+59
+46
+192
+58
+46
+194
+56
+43
+195
+55
+42
+198
+52
+39
+198
+50
+38
+206
+52
+42
+208
+51
+42
+209
+51
+40
+212
+51
+41
+214
+51
+42
+217
+53
+44
+221
+54
+46
+220
+56
+47
+222
+61
+51
+219
+61
+50
+220
+59
+49
+219
+56
+47
+219
+55
+45
+218
+54
+44
+216
+52
+42
+215
+51
+41
+213
+51
+38
+211
+51
+37
+208
+52
+37
+207
+54
+38
+210
+61
+41
+209
+62
+42
+202
+57
+36
+192
+50
+28
+200
+58
+38
+202
+52
+37
+213
+49
+39
+231
+53
+49
+250
+60
+60
+255
+61
+64
+255
+55
+61
+247
+51
+55
+234
+45
+49
+225
+45
+46
+217
+45
+45
+215
+47
+46
+220
+52
+51
+227
+57
+58
+233
+59
+61
+240
+57
+61
+246
+50
+54
+248
+48
+51
+244
+48
+49
+237
+49
+47
+228
+49
+42
+222
+50
+40
+213
+49
+37
+207
+51
+36
+201
+49
+36
+209
+61
+49
+250
+106
+95
+228
+84
+76
+200
+57
+53
+208
+64
+63
+203
+58
+61
+228
+82
+83
+228
+74
+72
+220
+67
+61
+209
+58
+51
+201
+54
+46
+198
+56
+46
+197
+59
+48
+194
+60
+48
+191
+61
+47
+186
+59
+42
+188
+63
+45
+189
+64
+46
+188
+63
+45
+186
+59
+42
+186
+59
+40
+189
+59
+43
+190
+60
+44
+188
+62
+48
+188
+62
+50
+192
+68
+56
+200
+76
+66
+204
+80
+72
+202
+78
+70
+204
+76
+73
+208
+78
+76
+232
+97
+101
+236
+97
+102
+248
+104
+114
+255
+111
+123
+255
+104
+120
+247
+90
+107
+247
+85
+106
+253
+91
+114
+249
+91
+114
+244
+95
+115
+233
+98
+113
+227
+107
+116
+234
+125
+128
+242
+133
+136
+234
+118
+121
+222
+92
+100
+246
+101
+116
+255
+107
+124
+247
+98
+117
+238
+106
+119
+249
+144
+149
+239
+161
+159
+196
+148
+138
+163
+140
+124
+106
+105
+85
+73
+81
+60
+88
+85
+70
+117
+103
+92
+165
+140
+136
+220
+190
+190
+242
+213
+217
+249
+227
+230
+255
+242
+245
+255
+249
+251
+252
+253
+255
+249
+253
+255
+252
+253
+255
+255
+253
+255
+255
+251
+255
+255
+248
+253
+254
+255
+251
+247
+253
+243
+247
+253
+243
+253
+255
+247
+255
+255
+248
+255
+253
+246
+255
+251
+245
+255
+255
+246
+255
+250
+240
+246
+240
+226
+242
+236
+220
+251
+246
+226
+255
+252
+230
+254
+252
+227
+254
+253
+225
+255
+255
+230
+253
+254
+236
+248
+249
+235
+246
+246
+234
+86
+79
+63
+84
+78
+62
+83
+75
+62
+80
+74
+60
+79
+71
+58
+76
+70
+56
+76
+68
+55
+74
+68
+56
+72
+64
+53
+70
+64
+52
+69
+60
+51
+66
+59
+49
+66
+57
+50
+65
+58
+50
+67
+58
+51
+65
+60
+54
+67
+64
+57
+68
+68
+58
+74
+70
+58
+77
+71
+55
+79
+71
+50
+81
+70
+48
+84
+72
+50
+85
+72
+53
+85
+73
+61
+81
+71
+69
+87
+81
+93
+106
+104
+128
+126
+130
+168
+140
+148
+197
+147
+157
+216
+153
+162
+231
+159
+160
+242
+164
+160
+247
+166
+163
+250
+169
+166
+253
+169
+169
+255
+169
+171
+254
+169
+172
+253
+169
+172
+251
+165
+171
+245
+163
+170
+242
+163
+167
+238
+162
+167
+235
+164
+169
+237
+165
+170
+238
+165
+168
+237
+163
+167
+238
+152
+161
+230
+150
+161
+227
+148
+159
+221
+148
+159
+213
+149
+155
+203
+152
+150
+190
+158
+141
+175
+168
+132
+160
+164
+102
+127
+178
+93
+114
+193
+82
+99
+206
+74
+88
+218
+66
+78
+228
+62
+72
+235
+60
+67
+235
+61
+62
+231
+64
+58
+223
+67
+55
+216
+70
+55
+209
+74
+55
+199
+74
+52
+191
+71
+47
+189
+67
+44
+193
+64
+45
+225
+83
+69
+221
+68
+60
+221
+57
+55
+230
+62
+61
+236
+68
+67
+230
+64
+64
+219
+56
+57
+207
+53
+51
+205
+67
+57
+200
+68
+56
+201
+67
+56
+199
+65
+53
+198
+62
+50
+195
+57
+44
+194
+54
+41
+194
+50
+39
+198
+50
+40
+203
+51
+40
+206
+52
+42
+211
+53
+44
+216
+53
+46
+217
+52
+46
+219
+52
+46
+219
+52
+44
+228
+66
+55
+222
+60
+49
+218
+54
+44
+218
+54
+44
+223
+57
+45
+223
+57
+45
+219
+53
+41
+213
+49
+37
+216
+56
+40
+206
+49
+32
+202
+49
+33
+208
+57
+40
+206
+56
+39
+199
+52
+34
+202
+55
+37
+212
+67
+48
+200
+55
+38
+206
+56
+42
+215
+54
+44
+222
+53
+46
+230
+51
+47
+238
+53
+51
+246
+58
+57
+251
+63
+62
+255
+76
+75
+250
+72
+70
+242
+66
+66
+236
+62
+61
+234
+60
+61
+231
+55
+58
+229
+50
+54
+230
+44
+49
+244
+43
+49
+248
+41
+47
+244
+44
+46
+239
+47
+46
+232
+49
+43
+224
+52
+42
+217
+53
+41
+211
+55
+40
+198
+48
+33
+192
+46
+31
+244
+100
+89
+235
+93
+83
+207
+64
+58
+212
+68
+67
+203
+59
+59
+223
+77
+77
+234
+82
+81
+224
+72
+69
+211
+59
+54
+201
+54
+47
+198
+56
+46
+198
+57
+47
+195
+59
+45
+190
+58
+43
+190
+60
+44
+193
+64
+45
+192
+65
+46
+187
+60
+41
+183
+56
+37
+184
+57
+38
+189
+60
+41
+190
+63
+46
+181
+55
+41
+179
+55
+43
+184
+62
+49
+193
+71
+58
+197
+75
+64
+197
+73
+65
+200
+73
+66
+203
+74
+69
+229
+97
+95
+230
+94
+96
+241
+100
+106
+254
+110
+119
+254
+107
+117
+243
+93
+105
+240
+88
+101
+246
+94
+109
+248
+97
+116
+241
+100
+116
+229
+104
+112
+223
+110
+114
+233
+127
+127
+249
+141
+139
+247
+131
+132
+239
+110
+115
+253
+112
+121
+255
+120
+134
+245
+97
+113
+223
+88
+102
+246
+136
+145
+255
+180
+180
+211
+173
+162
+164
+153
+135
+96
+104
+80
+69
+81
+57
+82
+84
+63
+107
+97
+85
+156
+136
+129
+220
+192
+191
+244
+215
+217
+246
+224
+227
+255
+241
+244
+255
+248
+251
+253
+253
+255
+251
+252
+255
+252
+253
+255
+255
+253
+255
+255
+252
+255
+254
+249
+253
+250
+255
+249
+242
+254
+240
+242
+252
+241
+249
+255
+244
+253
+255
+247
+250
+252
+241
+254
+251
+242
+255
+255
+244
+255
+255
+243
+252
+246
+232
+248
+242
+226
+254
+249
+229
+255
+253
+231
+253
+251
+226
+253
+252
+224
+255
+255
+233
+255
+255
+241
+252
+252
+240
+251
+251
+239
+88
+79
+64
+87
+80
+64
+87
+78
+63
+85
+78
+62
+84
+75
+60
+82
+75
+59
+82
+73
+58
+80
+72
+59
+77
+67
+55
+75
+67
+54
+75
+65
+53
+72
+64
+51
+72
+62
+50
+71
+63
+50
+72
+62
+50
+70
+64
+52
+71
+67
+58
+71
+69
+57
+74
+71
+56
+78
+73
+54
+82
+74
+53
+85
+74
+52
+85
+74
+52
+86
+75
+57
+88
+78
+68
+85
+76
+77
+90
+84
+98
+107
+104
+131
+123
+126
+167
+137
+143
+195
+145
+153
+215
+152
+159
+231
+166
+162
+246
+167
+161
+249
+165
+160
+252
+164
+161
+252
+162
+163
+255
+163
+167
+255
+164
+170
+255
+164
+173
+252
+161
+170
+245
+161
+169
+241
+161
+168
+236
+164
+169
+237
+167
+170
+239
+172
+170
+243
+174
+170
+246
+171
+170
+246
+161
+168
+246
+156
+166
+238
+149
+160
+222
+152
+159
+211
+166
+164
+203
+180
+160
+188
+180
+135
+155
+179
+105
+120
+186
+78
+93
+205
+70
+84
+219
+65
+77
+227
+61
+73
+228
+61
+71
+227
+62
+69
+223
+64
+69
+223
+64
+68
+226
+61
+65
+221
+61
+61
+219
+70
+66
+200
+59
+52
+202
+68
+59
+202
+69
+60
+186
+49
+41
+219
+74
+69
+230
+75
+73
+233
+67
+69
+235
+62
+66
+232
+59
+63
+230
+60
+63
+225
+61
+62
+219
+59
+59
+212
+60
+57
+207
+66
+59
+200
+63
+55
+202
+68
+59
+209
+77
+65
+205
+75
+62
+191
+61
+48
+184
+54
+41
+189
+57
+44
+191
+55
+43
+195
+54
+44
+200
+53
+45
+203
+50
+42
+209
+47
+42
+212
+47
+43
+219
+50
+47
+224
+53
+46
+231
+65
+53
+224
+56
+43
+219
+49
+36
+222
+50
+38
+230
+57
+43
+231
+59
+45
+225
+55
+38
+215
+50
+31
+209
+50
+31
+206
+51
+31
+203
+52
+33
+201
+51
+34
+201
+51
+34
+203
+51
+37
+206
+53
+39
+207
+53
+41
+202
+48
+38
+207
+50
+41
+209
+53
+41
+210
+54
+42
+210
+52
+40
+213
+51
+38
+215
+51
+39
+220
+52
+41
+224
+50
+41
+230
+51
+46
+235
+53
+50
+235
+51
+51
+233
+47
+50
+231
+45
+50
+232
+45
+52
+237
+46
+53
+246
+45
+51
+246
+43
+47
+239
+43
+44
+236
+47
+45
+234
+53
+46
+227
+57
+44
+217
+55
+40
+208
+52
+37
+195
+45
+28
+196
+51
+34
+231
+88
+72
+233
+89
+78
+203
+59
+51
+223
+78
+73
+197
+52
+49
+218
+72
+72
+225
+79
+80
+220
+74
+74
+212
+67
+64
+204
+59
+54
+200
+56
+48
+198
+56
+44
+199
+57
+43
+200
+60
+43
+197
+60
+42
+194
+59
+40
+190
+57
+38
+188
+59
+40
+187
+60
+41
+186
+61
+41
+186
+61
+43
+183
+60
+44
+180
+56
+44
+181
+59
+48
+185
+61
+49
+187
+63
+51
+187
+63
+51
+190
+64
+52
+192
+64
+53
+196
+65
+55
+239
+106
+97
+245
+112
+105
+234
+99
+95
+244
+109
+106
+251
+113
+113
+236
+97
+100
+244
+103
+109
+255
+112
+121
+255
+107
+122
+251
+104
+120
+234
+103
+111
+226
+101
+105
+229
+103
+106
+237
+109
+110
+243
+110
+111
+245
+109
+111
+255
+119
+123
+255
+126
+133
+241
+95
+108
+241
+105
+119
+214
+103
+112
+248
+174
+175
+189
+167
+154
+133
+141
+117
+97
+112
+81
+74
+89
+58
+77
+81
+56
+115
+110
+90
+165
+149
+136
+205
+182
+176
+237
+213
+211
+255
+238
+240
+255
+244
+245
+255
+245
+249
+252
+247
+251
+251
+251
+253
+253
+254
+255
+254
+255
+255
+255
+254
+255
+251
+255
+254
+239
+255
+243
+229
+252
+232
+231
+249
+233
+240
+254
+237
+248
+255
+245
+252
+255
+244
+253
+255
+242
+255
+253
+240
+255
+253
+241
+255
+251
+238
+255
+250
+234
+255
+250
+230
+254
+249
+227
+252
+250
+225
+252
+250
+225
+251
+250
+229
+253
+253
+241
+255
+255
+250
+255
+255
+250
+89
+80
+65
+88
+79
+64
+88
+79
+64
+86
+77
+62
+85
+76
+61
+84
+75
+60
+83
+74
+59
+82
+73
+58
+78
+69
+54
+77
+68
+53
+76
+67
+52
+75
+66
+51
+74
+65
+50
+74
+65
+50
+74
+65
+50
+73
+65
+52
+71
+67
+56
+72
+68
+57
+76
+70
+56
+79
+72
+54
+82
+74
+53
+83
+75
+52
+86
+75
+55
+84
+75
+58
+88
+78
+69
+85
+76
+77
+89
+85
+99
+107
+104
+131
+123
+125
+166
+134
+140
+192
+141
+149
+211
+150
+154
+225
+161
+156
+236
+163
+155
+241
+161
+157
+244
+161
+158
+249
+160
+161
+253
+160
+165
+255
+162
+170
+255
+161
+172
+251
+160
+172
+244
+160
+171
+237
+158
+167
+232
+161
+166
+232
+164
+164
+234
+166
+164
+237
+166
+162
+238
+163
+160
+237
+163
+166
+243
+160
+164
+235
+160
+160
+220
+165
+155
+205
+177
+153
+189
+188
+143
+166
+189
+115
+130
+191
+87
+98
+204
+70
+77
+220
+63
+70
+230
+59
+67
+233
+58
+65
+230
+59
+67
+225
+62
+67
+219
+64
+68
+218
+65
+70
+224
+60
+67
+218
+57
+63
+218
+65
+68
+203
+59
+59
+204
+66
+63
+202
+64
+61
+193
+51
+49
+229
+79
+80
+230
+67
+70
+232
+63
+68
+234
+59
+66
+231
+56
+63
+226
+56
+59
+219
+56
+57
+213
+58
+56
+207
+59
+55
+212
+69
+63
+198
+61
+53
+197
+60
+52
+204
+71
+62
+204
+76
+65
+193
+67
+53
+184
+58
+44
+183
+57
+43
+185
+55
+42
+191
+55
+43
+198
+54
+45
+203
+52
+45
+209
+50
+46
+216
+51
+47
+225
+53
+51
+228
+56
+52
+229
+61
+50
+226
+58
+45
+225
+53
+41
+225
+52
+38
+228
+52
+39
+226
+53
+39
+221
+51
+34
+213
+50
+31
+211
+56
+36
+205
+56
+34
+201
+56
+37
+200
+58
+38
+204
+58
+43
+206
+58
+44
+207
+55
+44
+208
+51
+42
+213
+51
+46
+214
+53
+45
+211
+55
+43
+207
+55
+41
+201
+54
+38
+199
+52
+34
+203
+52
+33
+207
+52
+34
+216
+50
+36
+222
+50
+38
+227
+48
+43
+230
+46
+44
+230
+44
+45
+230
+44
+47
+230
+45
+50
+232
+46
+51
+236
+43
+46
+237
+44
+45
+236
+48
+46
+232
+50
+46
+224
+52
+42
+219
+53
+39
+213
+56
+39
+210
+57
+39
+213
+63
+46
+187
+42
+25
+214
+68
+53
+208
+62
+49
+217
+70
+62
+235
+86
+80
+218
+66
+63
+216
+66
+65
+231
+85
+86
+226
+82
+82
+220
+75
+72
+212
+67
+62
+205
+61
+53
+201
+57
+46
+200
+57
+43
+199
+56
+40
+200
+59
+42
+196
+59
+40
+191
+58
+39
+189
+60
+41
+189
+62
+43
+186
+63
+45
+185
+64
+47
+182
+62
+46
+178
+58
+44
+180
+59
+48
+183
+61
+48
+184
+62
+49
+186
+63
+48
+189
+63
+49
+193
+66
+51
+197
+67
+53
+235
+105
+92
+242
+109
+100
+231
+98
+91
+240
+107
+102
+245
+111
+108
+232
+98
+97
+241
+107
+108
+254
+115
+120
+255
+111
+126
+255
+110
+124
+242
+107
+114
+228
+97
+102
+228
+92
+96
+239
+99
+102
+253
+110
+112
+255
+119
+120
+253
+117
+119
+255
+121
+126
+235
+89
+100
+237
+99
+112
+215
+99
+110
+242
+168
+169
+178
+162
+147
+118
+134
+107
+94
+114
+79
+78
+95
+59
+83
+90
+59
+117
+115
+92
+169
+157
+141
+214
+196
+184
+246
+225
+220
+255
+245
+241
+255
+248
+248
+255
+248
+249
+253
+249
+250
+251
+251
+251
+250
+254
+253
+251
+255
+254
+250
+254
+255
+246
+255
+250
+237
+255
+242
+227
+255
+232
+227
+251
+229
+235
+254
+234
+244
+255
+240
+249
+255
+241
+252
+255
+241
+255
+255
+240
+255
+253
+239
+255
+253
+237
+255
+251
+233
+254
+247
+229
+249
+244
+224
+248
+243
+221
+250
+245
+223
+250
+247
+228
+249
+249
+239
+251
+252
+246
+254
+253
+249
+92
+80
+66
+91
+79
+65
+91
+79
+65
+89
+77
+63
+88
+76
+62
+87
+75
+61
+86
+74
+60
+86
+74
+60
+83
+71
+57
+82
+70
+56
+81
+69
+55
+79
+67
+53
+79
+67
+53
+79
+67
+53
+79
+67
+53
+77
+67
+55
+74
+67
+57
+74
+70
+59
+77
+71
+57
+80
+73
+55
+83
+75
+54
+86
+75
+53
+86
+75
+55
+84
+75
+58
+87
+77
+67
+86
+77
+78
+90
+87
+98
+107
+105
+129
+121
+123
+161
+133
+137
+185
+139
+145
+203
+146
+150
+214
+153
+152
+222
+155
+151
+227
+155
+152
+233
+155
+156
+238
+157
+159
+244
+158
+163
+247
+160
+167
+248
+160
+169
+244
+160
+170
+239
+157
+168
+232
+155
+165
+227
+156
+162
+224
+156
+160
+224
+157
+158
+225
+156
+154
+227
+155
+153
+226
+153
+154
+221
+158
+152
+214
+168
+147
+204
+178
+140
+189
+191
+131
+169
+198
+115
+145
+197
+91
+111
+194
+70
+81
+209
+68
+76
+218
+65
+68
+223
+63
+65
+225
+62
+63
+225
+62
+65
+225
+62
+67
+223
+62
+68
+223
+62
+70
+224
+60
+67
+215
+56
+61
+213
+63
+65
+207
+65
+64
+202
+67
+63
+195
+60
+56
+196
+57
+54
+233
+87
+87
+224
+66
+67
+228
+62
+66
+232
+59
+63
+227
+57
+60
+220
+54
+56
+214
+54
+54
+209
+57
+54
+204
+59
+54
+213
+72
+65
+196
+59
+49
+190
+53
+43
+197
+65
+53
+205
+75
+62
+198
+72
+58
+187
+61
+47
+183
+56
+41
+186
+54
+41
+191
+55
+41
+199
+55
+44
+207
+54
+46
+215
+53
+48
+222
+55
+49
+230
+57
+53
+233
+61
+57
+217
+50
+42
+218
+51
+42
+221
+53
+42
+223
+52
+42
+223
+52
+42
+222
+54
+41
+220
+57
+42
+217
+62
+44
+198
+51
+33
+192
+51
+31
+187
+52
+33
+186
+53
+34
+191
+55
+41
+191
+55
+41
+191
+50
+40
+193
+44
+37
+227
+64
+59
+229
+62
+56
+222
+61
+51
+213
+60
+46
+204
+57
+41
+200
+55
+36
+200
+55
+34
+204
+55
+35
+210
+55
+37
+213
+51
+36
+215
+47
+38
+217
+46
+39
+219
+46
+42
+220
+46
+45
+219
+47
+47
+220
+46
+47
+219
+44
+41
+223
+48
+43
+224
+53
+45
+220
+53
+44
+213
+51
+38
+208
+52
+37
+208
+57
+38
+209
+62
+42
+212
+65
+47
+194
+49
+32
+231
+83
+69
+210
+59
+48
+218
+65
+59
+222
+67
+63
+232
+74
+73
+240
+84
+85
+237
+85
+84
+231
+83
+81
+227
+79
+77
+221
+74
+67
+214
+67
+59
+207
+60
+50
+202
+56
+43
+197
+54
+38
+196
+55
+38
+192
+55
+37
+188
+55
+38
+185
+58
+39
+185
+60
+42
+183
+62
+45
+181
+61
+44
+178
+61
+44
+176
+58
+44
+177
+59
+47
+180
+60
+46
+181
+61
+47
+183
+61
+46
+185
+63
+48
+190
+67
+52
+195
+69
+55
+220
+92
+81
+234
+103
+93
+228
+97
+89
+240
+108
+103
+246
+112
+109
+231
+97
+96
+236
+102
+103
+245
+106
+113
+228
+80
+94
+240
+94
+107
+240
+106
+113
+235
+104
+109
+235
+99
+103
+242
+102
+105
+254
+111
+113
+255
+117
+119
+253
+114
+117
+252
+111
+117
+231
+81
+93
+232
+90
+104
+217
+97
+109
+237
+158
+161
+170
+152
+138
+108
+122
+96
+89
+109
+72
+79
+100
+61
+87
+96
+65
+119
+119
+93
+173
+165
+146
+225
+209
+194
+255
+238
+230
+255
+248
+241
+255
+251
+247
+255
+252
+248
+252
+253
+248
+250
+255
+251
+251
+255
+253
+251
+255
+253
+249
+255
+251
+244
+255
+246
+233
+255
+237
+222
+252
+226
+220
+246
+221
+225
+247
+224
+233
+251
+229
+239
+251
+231
+245
+252
+234
+252
+255
+236
+253
+250
+233
+255
+250
+234
+255
+248
+230
+249
+242
+224
+241
+234
+216
+239
+232
+213
+243
+236
+217
+247
+242
+223
+251
+248
+239
+252
+252
+244
+255
+254
+249
+92
+80
+66
+92
+80
+66
+91
+79
+65
+90
+78
+64
+89
+77
+63
+89
+77
+63
+88
+76
+62
+88
+76
+62
+85
+73
+59
+84
+72
+58
+83
+71
+57
+82
+70
+56
+82
+70
+56
+82
+70
+56
+82
+70
+56
+80
+70
+58
+76
+69
+59
+75
+71
+60
+79
+73
+59
+82
+75
+57
+84
+76
+55
+87
+76
+54
+87
+76
+56
+87
+75
+59
+86
+76
+66
+85
+77
+75
+92
+86
+96
+106
+104
+126
+121
+121
+155
+130
+133
+178
+138
+141
+194
+143
+148
+206
+148
+148
+210
+149
+148
+214
+149
+149
+219
+150
+152
+227
+152
+155
+232
+152
+158
+236
+155
+161
+237
+155
+163
+235
+156
+165
+232
+152
+162
+223
+150
+159
+218
+149
+155
+213
+147
+153
+213
+147
+151
+214
+146
+147
+214
+145
+144
+210
+136
+131
+189
+148
+130
+182
+168
+124
+175
+184
+115
+162
+199
+102
+143
+207
+88
+120
+210
+72
+97
+208
+62
+75
+217
+68
+74
+218
+68
+67
+218
+69
+65
+220
+68
+65
+222
+66
+67
+225
+64
+69
+229
+62
+70
+229
+62
+70
+227
+63
+70
+214
+58
+62
+209
+63
+64
+209
+69
+68
+198
+65
+60
+186
+54
+49
+197
+62
+58
+234
+90
+89
+221
+65
+66
+227
+64
+67
+230
+61
+64
+227
+58
+61
+219
+56
+57
+211
+57
+55
+208
+60
+56
+206
+65
+56
+207
+69
+59
+194
+58
+46
+187
+50
+40
+192
+60
+47
+199
+69
+55
+196
+69
+54
+189
+62
+47
+184
+57
+40
+189
+56
+41
+194
+57
+41
+203
+56
+46
+210
+58
+47
+217
+56
+48
+224
+57
+49
+232
+59
+55
+235
+62
+56
+217
+48
+43
+218
+49
+42
+222
+51
+44
+224
+51
+44
+225
+52
+45
+225
+54
+46
+220
+56
+46
+217
+59
+47
+202
+54
+40
+199
+58
+41
+195
+59
+43
+192
+59
+44
+192
+58
+46
+195
+58
+48
+198
+59
+54
+208
+56
+53
+236
+67
+64
+237
+64
+60
+228
+64
+55
+217
+61
+49
+207
+57
+42
+199
+57
+37
+200
+58
+38
+201
+59
+37
+207
+60
+40
+208
+55
+39
+207
+49
+37
+209
+49
+37
+212
+49
+40
+214
+51
+44
+212
+49
+44
+209
+47
+42
+211
+50
+42
+211
+53
+44
+211
+55
+43
+208
+55
+41
+205
+53
+39
+202
+55
+37
+204
+59
+40
+204
+62
+42
+204
+59
+40
+207
+60
+44
+244
+94
+80
+224
+70
+60
+210
+51
+47
+210
+46
+44
+230
+64
+64
+251
+87
+88
+255
+117
+115
+255
+114
+111
+255
+106
+103
+246
+94
+89
+231
+80
+71
+213
+65
+55
+199
+53
+40
+189
+46
+32
+196
+56
+39
+192
+56
+40
+187
+56
+38
+184
+59
+41
+183
+60
+44
+181
+61
+45
+178
+61
+44
+176
+60
+45
+175
+59
+46
+173
+60
+46
+176
+60
+47
+176
+60
+45
+177
+59
+45
+182
+62
+46
+188
+66
+51
+192
+70
+55
+203
+77
+65
+223
+96
+87
+226
+97
+91
+244
+112
+108
+248
+116
+114
+230
+96
+97
+228
+93
+97
+232
+93
+100
+218
+70
+84
+234
+88
+101
+239
+105
+114
+236
+107
+111
+240
+104
+108
+249
+109
+112
+255
+113
+118
+255
+115
+118
+254
+111
+115
+248
+103
+110
+229
+74
+88
+229
+82
+98
+218
+93
+107
+230
+148
+150
+168
+145
+131
+106
+116
+89
+85
+106
+67
+83
+104
+63
+92
+103
+69
+121
+124
+95
+176
+170
+148
+231
+220
+202
+255
+245
+232
+255
+249
+240
+255
+249
+239
+252
+252
+242
+251
+254
+245
+250
+255
+249
+249
+255
+250
+246
+255
+248
+242
+252
+243
+234
+251
+235
+219
+247
+222
+208
+241
+210
+205
+234
+204
+209
+235
+206
+217
+237
+210
+223
+239
+213
+233
+243
+219
+242
+247
+225
+244
+246
+225
+249
+246
+227
+251
+246
+227
+244
+237
+219
+234
+227
+209
+231
+222
+205
+235
+226
+209
+240
+233
+217
+251
+244
+234
+251
+246
+240
+254
+249
+243
+92
+80
+66
+92
+80
+66
+91
+79
+65
+91
+79
+65
+90
+78
+64
+89
+77
+63
+89
+77
+63
+89
+77
+63
+87
+75
+61
+86
+74
+60
+85
+73
+59
+85
+73
+59
+84
+72
+58
+85
+73
+59
+85
+73
+59
+83
+73
+61
+79
+71
+60
+79
+73
+61
+81
+73
+60
+83
+76
+58
+85
+77
+56
+88
+77
+55
+89
+76
+57
+88
+76
+60
+85
+75
+65
+85
+75
+73
+92
+85
+93
+104
+101
+120
+117
+116
+147
+124
+126
+165
+133
+135
+183
+140
+143
+194
+141
+144
+195
+142
+145
+200
+142
+146
+207
+144
+148
+212
+146
+149
+220
+147
+151
+224
+148
+152
+223
+147
+154
+222
+149
+157
+220
+146
+155
+214
+142
+148
+206
+137
+144
+199
+133
+139
+197
+129
+135
+195
+126
+130
+193
+129
+125
+184
+128
+115
+159
+145
+110
+150
+170
+102
+143
+193
+92
+134
+214
+78
+118
+225
+65
+101
+229
+59
+85
+230
+59
+75
+226
+67
+71
+220
+71
+67
+216
+73
+65
+216
+73
+65
+220
+71
+67
+227
+66
+71
+236
+62
+72
+237
+61
+72
+230
+66
+73
+215
+62
+64
+208
+64
+63
+208
+73
+69
+191
+62
+56
+179
+50
+44
+200
+67
+60
+224
+85
+80
+220
+68
+67
+225
+65
+67
+227
+63
+64
+225
+62
+63
+218
+63
+61
+212
+64
+60
+209
+68
+59
+207
+70
+60
+199
+61
+50
+192
+56
+42
+189
+53
+41
+189
+57
+42
+191
+61
+45
+191
+61
+45
+189
+59
+43
+189
+60
+41
+194
+58
+42
+199
+59
+42
+207
+59
+47
+213
+59
+47
+219
+56
+47
+224
+56
+47
+231
+56
+51
+235
+57
+53
+231
+56
+53
+230
+52
+50
+229
+49
+48
+232
+50
+49
+233
+51
+50
+231
+52
+48
+222
+49
+43
+214
+47
+39
+205
+48
+39
+205
+54
+45
+201
+57
+48
+197
+54
+46
+194
+51
+45
+196
+51
+48
+206
+57
+59
+222
+62
+64
+235
+56
+59
+237
+55
+54
+228
+55
+49
+216
+53
+44
+204
+52
+38
+198
+53
+34
+196
+55
+35
+197
+58
+37
+203
+61
+41
+203
+56
+38
+204
+52
+38
+206
+53
+39
+212
+56
+44
+212
+58
+48
+211
+57
+47
+208
+56
+45
+208
+62
+49
+202
+59
+45
+197
+56
+39
+196
+55
+37
+198
+57
+39
+199
+60
+41
+199
+60
+41
+199
+58
+40
+205
+62
+45
+205
+58
+42
+216
+62
+50
+225
+67
+58
+212
+47
+45
+228
+58
+58
+224
+50
+52
+223
+53
+54
+215
+53
+51
+214
+59
+54
+222
+67
+62
+229
+75
+67
+234
+81
+73
+234
+83
+72
+232
+84
+72
+228
+85
+71
+203
+63
+48
+196
+63
+46
+190
+60
+44
+184
+61
+45
+183
+62
+45
+180
+63
+46
+176
+63
+47
+174
+62
+48
+172
+60
+46
+172
+60
+46
+172
+60
+46
+172
+61
+44
+173
+60
+44
+177
+61
+46
+183
+65
+51
+186
+68
+54
+198
+76
+65
+222
+98
+88
+226
+99
+93
+240
+110
+108
+244
+114
+114
+229
+96
+99
+229
+96
+101
+232
+95
+103
+251
+105
+118
+254
+109
+122
+241
+110
+118
+229
+100
+104
+234
+98
+102
+252
+109
+113
+255
+117
+123
+255
+118
+124
+254
+107
+115
+245
+95
+106
+232
+71
+87
+228
+75
+93
+221
+90
+104
+226
+137
+141
+172
+142
+131
+115
+121
+93
+93
+114
+73
+94
+117
+73
+104
+119
+80
+129
+136
+102
+179
+178
+150
+232
+226
+204
+255
+250
+233
+255
+253
+237
+254
+252
+237
+251
+255
+240
+249
+255
+242
+247
+255
+243
+244
+255
+241
+237
+251
+234
+227
+241
+224
+218
+237
+215
+201
+232
+200
+191
+227
+189
+187
+221
+186
+192
+222
+188
+200
+224
+192
+207
+226
+196
+217
+230
+204
+227
+235
+211
+235
+239
+216
+243
+242
+222
+247
+242
+223
+242
+235
+217
+234
+225
+210
+231
+219
+205
+233
+221
+207
+238
+226
+214
+241
+231
+222
+240
+231
+224
+242
+233
+226
+91
+79
+65
+91
+79
+65
+91
+79
+65
+90
+78
+64
+90
+78
+64
+89
+77
+63
+89
+77
+63
+89
+77
+63
+88
+76
+62
+88
+76
+62
+87
+75
+61
+86
+74
+60
+86
+74
+60
+87
+75
+61
+87
+75
+61
+88
+76
+62
+81
+73
+62
+81
+73
+62
+83
+75
+62
+85
+76
+59
+88
+77
+57
+88
+77
+55
+89
+76
+57
+88
+77
+59
+87
+75
+63
+85
+76
+71
+89
+83
+87
+101
+94
+110
+110
+106
+131
+117
+116
+150
+126
+125
+165
+131
+134
+177
+133
+138
+180
+132
+139
+185
+135
+141
+193
+137
+142
+200
+139
+143
+207
+140
+143
+212
+141
+144
+213
+141
+144
+211
+144
+148
+211
+139
+144
+202
+131
+136
+192
+126
+129
+184
+120
+123
+178
+114
+116
+173
+108
+110
+171
+111
+104
+156
+131
+105
+140
+148
+98
+123
+175
+88
+120
+203
+79
+113
+227
+65
+102
+239
+56
+87
+243
+53
+78
+244
+58
+72
+235
+66
+69
+225
+72
+66
+217
+76
+66
+215
+77
+66
+222
+73
+69
+229
+69
+71
+240
+63
+73
+240
+62
+74
+228
+67
+72
+215
+67
+67
+204
+65
+62
+206
+73
+68
+186
+59
+52
+176
+52
+44
+201
+73
+64
+213
+76
+70
+216
+66
+65
+218
+63
+61
+219
+59
+59
+218
+60
+59
+216
+64
+61
+212
+69
+63
+205
+71
+60
+203
+71
+58
+192
+56
+42
+193
+56
+40
+192
+56
+42
+190
+57
+40
+188
+57
+39
+187
+56
+38
+189
+58
+40
+192
+59
+40
+196
+59
+41
+202
+61
+44
+210
+60
+46
+215
+59
+46
+220
+56
+46
+225
+54
+46
+228
+54
+47
+232
+53
+48
+234
+50
+50
+234
+46
+47
+234
+43
+48
+240
+47
+50
+246
+51
+55
+247
+54
+55
+240
+52
+53
+230
+50
+49
+219
+46
+42
+216
+51
+47
+215
+53
+50
+210
+50
+50
+209
+46
+49
+211
+46
+52
+220
+53
+61
+235
+58
+68
+237
+48
+54
+238
+48
+50
+230
+51
+47
+220
+51
+44
+209
+53
+41
+202
+55
+39
+200
+57
+40
+201
+60
+40
+198
+56
+36
+201
+54
+36
+206
+54
+40
+211
+58
+44
+218
+62
+50
+221
+65
+53
+221
+65
+53
+216
+65
+54
+211
+71
+56
+201
+65
+49
+194
+59
+40
+192
+57
+38
+195
+60
+41
+198
+61
+42
+197
+60
+42
+197
+56
+38
+204
+58
+43
+205
+55
+41
+205
+48
+39
+230
+67
+60
+219
+50
+47
+239
+63
+65
+227
+47
+50
+218
+42
+44
+213
+49
+47
+210
+53
+46
+213
+56
+49
+214
+57
+48
+210
+56
+46
+204
+53
+42
+198
+50
+38
+192
+49
+35
+206
+69
+53
+198
+65
+50
+188
+61
+46
+181
+58
+42
+177
+57
+41
+175
+57
+43
+171
+58
+44
+170
+58
+44
+171
+59
+47
+171
+61
+48
+172
+62
+47
+172
+60
+46
+171
+60
+43
+173
+60
+44
+178
+62
+47
+181
+65
+50
+201
+83
+71
+224
+103
+94
+224
+99
+95
+234
+106
+105
+238
+110
+111
+230
+99
+104
+240
+106
+113
+246
+110
+120
+255
+110
+123
+255
+114
+126
+241
+112
+117
+231
+102
+107
+240
+103
+110
+255
+116
+122
+255
+117
+126
+255
+110
+117
+253
+103
+112
+244
+90
+102
+237
+72
+89
+229
+72
+91
+222
+87
+102
+220
+128
+131
+180
+146
+134
+133
+136
+107
+113
+134
+93
+111
+137
+90
+121
+138
+96
+141
+151
+114
+182
+183
+152
+223
+222
+194
+249
+244
+222
+252
+250
+229
+255
+255
+239
+250
+255
+238
+244
+255
+238
+238
+255
+234
+230
+249
+227
+220
+239
+217
+208
+227
+205
+197
+222
+193
+178
+213
+173
+172
+211
+167
+172
+209
+168
+178
+210
+171
+185
+213
+175
+190
+214
+178
+201
+218
+186
+210
+223
+193
+224
+230
+204
+232
+234
+212
+240
+237
+218
+241
+234
+216
+236
+227
+212
+233
+221
+209
+232
+218
+207
+234
+220
+211
+232
+219
+211
+230
+217
+211
+229
+216
+210
+91
+78
+62
+91
+78
+62
+91
+78
+62
+91
+78
+62
+90
+77
+61
+90
+77
+61
+90
+77
+61
+90
+77
+61
+89
+76
+60
+89
+76
+60
+88
+75
+59
+88
+75
+59
+88
+75
+59
+89
+76
+60
+89
+76
+60
+89
+77
+63
+83
+73
+63
+84
+74
+62
+85
+76
+61
+88
+76
+60
+89
+78
+58
+90
+77
+58
+90
+77
+58
+89
+78
+60
+89
+77
+63
+85
+76
+69
+88
+79
+82
+95
+87
+98
+100
+95
+115
+106
+102
+129
+115
+111
+144
+121
+121
+157
+122
+128
+164
+122
+130
+169
+127
+131
+178
+130
+133
+188
+133
+134
+198
+135
+136
+203
+136
+137
+204
+136
+137
+202
+136
+136
+200
+131
+131
+191
+125
+124
+181
+121
+118
+173
+115
+112
+167
+110
+107
+164
+105
+101
+160
+111
+95
+142
+132
+94
+117
+151
+85
+97
+179
+78
+96
+210
+74
+98
+236
+64
+90
+246
+54
+79
+251
+52
+71
+252
+58
+69
+240
+64
+64
+231
+70
+62
+222
+74
+64
+219
+75
+66
+224
+72
+69
+231
+68
+71
+240
+63
+73
+239
+63
+74
+221
+65
+68
+212
+70
+68
+200
+65
+61
+201
+72
+66
+180
+58
+47
+177
+55
+44
+206
+79
+70
+201
+66
+60
+206
+61
+56
+208
+54
+52
+207
+49
+48
+208
+53
+49
+211
+62
+56
+207
+69
+59
+200
+70
+57
+195
+68
+53
+190
+57
+40
+195
+58
+40
+194
+58
+42
+191
+58
+39
+189
+56
+37
+190
+57
+38
+191
+58
+39
+193
+58
+38
+196
+57
+38
+203
+58
+41
+211
+58
+44
+217
+57
+43
+221
+55
+43
+225
+53
+43
+228
+51
+43
+234
+51
+45
+235
+42
+43
+241
+42
+45
+248
+45
+51
+253
+46
+52
+255
+49
+55
+255
+50
+55
+255
+51
+56
+253
+53
+56
+250
+55
+59
+246
+55
+60
+243
+57
+62
+243
+56
+65
+246
+56
+68
+247
+55
+70
+252
+53
+72
+254
+53
+69
+246
+42
+53
+244
+45
+50
+237
+49
+50
+227
+52
+47
+217
+54
+45
+208
+56
+42
+206
+59
+43
+206
+61
+44
+203
+53
+38
+209
+56
+42
+217
+59
+47
+223
+61
+50
+226
+62
+52
+228
+61
+52
+229
+62
+53
+223
+65
+54
+217
+74
+60
+207
+71
+55
+201
+65
+49
+196
+60
+44
+194
+57
+41
+194
+57
+39
+198
+56
+42
+200
+57
+41
+201
+50
+39
+211
+57
+47
+225
+64
+56
+235
+68
+62
+222
+48
+47
+224
+46
+46
+235
+52
+54
+232
+54
+54
+216
+51
+45
+213
+55
+46
+215
+57
+48
+215
+58
+49
+213
+59
+49
+210
+59
+48
+205
+58
+48
+201
+59
+47
+214
+76
+63
+204
+70
+58
+191
+64
+49
+180
+57
+42
+176
+54
+41
+172
+54
+40
+171
+55
+42
+169
+56
+42
+172
+59
+45
+173
+61
+47
+174
+62
+48
+173
+61
+47
+171
+60
+43
+171
+60
+43
+173
+60
+46
+177
+61
+48
+192
+75
+65
+218
+100
+90
+222
+99
+94
+232
+107
+105
+240
+111
+115
+234
+105
+110
+245
+114
+122
+253
+117
+127
+241
+101
+112
+248
+111
+121
+245
+116
+121
+237
+111
+115
+248
+111
+118
+255
+120
+127
+255
+116
+125
+255
+101
+111
+252
+98
+110
+242
+84
+98
+241
+72
+91
+231
+68
+89
+222
+81
+97
+217
+118
+123
+189
+149
+137
+152
+153
+122
+129
+150
+107
+123
+151
+102
+130
+149
+104
+145
+157
+117
+172
+178
+142
+203
+204
+173
+224
+224
+196
+233
+236
+209
+236
+244
+220
+227
+241
+215
+215
+235
+207
+205
+228
+199
+196
+221
+191
+187
+212
+182
+180
+203
+174
+172
+199
+164
+156
+193
+149
+152
+194
+144
+156
+195
+148
+163
+201
+154
+170
+203
+158
+175
+203
+162
+184
+206
+168
+194
+211
+177
+206
+217
+187
+216
+222
+196
+228
+227
+206
+235
+229
+213
+236
+226
+214
+233
+219
+210
+229
+212
+205
+226
+209
+202
+223
+205
+201
+218
+203
+198
+213
+198
+193
+91
+78
+62
+90
+77
+61
+90
+77
+61
+90
+77
+61
+90
+77
+61
+90
+77
+61
+89
+76
+60
+89
+76
+60
+90
+77
+61
+89
+76
+60
+89
+76
+60
+88
+75
+59
+88
+75
+59
+89
+76
+60
+90
+77
+61
+90
+76
+63
+86
+74
+62
+86
+74
+62
+88
+76
+62
+89
+78
+60
+90
+77
+60
+90
+77
+58
+90
+77
+58
+90
+77
+60
+91
+79
+65
+87
+77
+68
+87
+77
+76
+92
+82
+90
+94
+88
+102
+98
+93
+113
+106
+102
+127
+113
+113
+141
+116
+119
+150
+116
+122
+156
+120
+125
+167
+125
+128
+181
+129
+129
+191
+132
+131
+197
+133
+132
+200
+135
+132
+199
+130
+125
+191
+127
+121
+183
+125
+116
+173
+122
+111
+167
+122
+109
+165
+120
+105
+162
+116
+101
+160
+124
+95
+141
+133
+79
+93
+152
+72
+75
+178
+69
+75
+211
+71
+82
+237
+66
+82
+246
+58
+73
+252
+54
+67
+253
+58
+64
+244
+62
+61
+235
+66
+59
+228
+69
+63
+225
+70
+65
+227
+69
+66
+230
+67
+70
+237
+63
+72
+234
+64
+73
+214
+64
+65
+209
+71
+68
+197
+65
+60
+195
+71
+63
+178
+57
+46
+179
+58
+47
+209
+85
+75
+195
+62
+53
+201
+56
+51
+199
+47
+44
+197
+42
+38
+200
+47
+42
+205
+58
+51
+204
+67
+57
+195
+67
+54
+188
+62
+47
+192
+59
+42
+196
+59
+41
+195
+60
+41
+193
+58
+39
+194
+59
+40
+195
+60
+41
+194
+59
+39
+195
+56
+37
+196
+53
+36
+202
+55
+37
+212
+56
+41
+217
+55
+42
+221
+53
+42
+225
+51
+42
+229
+51
+41
+234
+50
+42
+245
+51
+51
+254
+54
+56
+255
+56
+60
+255
+52
+58
+255
+45
+50
+255
+40
+45
+255
+40
+45
+254
+43
+49
+254
+45
+51
+246
+41
+48
+242
+38
+49
+247
+41
+54
+255
+44
+63
+255
+42
+65
+252
+32
+57
+244
+25
+47
+246
+34
+48
+243
+40
+46
+237
+44
+49
+230
+48
+47
+218
+49
+44
+212
+51
+43
+209
+53
+41
+208
+54
+42
+212
+54
+43
+221
+57
+48
+230
+61
+54
+235
+62
+55
+235
+58
+52
+232
+55
+49
+232
+53
+48
+226
+57
+50
+223
+72
+61
+215
+75
+60
+211
+69
+55
+203
+61
+47
+196
+54
+40
+194
+51
+37
+200
+54
+41
+207
+56
+45
+206
+52
+42
+212
+54
+45
+230
+67
+60
+223
+56
+50
+224
+50
+49
+210
+32
+32
+236
+56
+57
+229
+54
+51
+213
+49
+40
+210
+52
+41
+210
+52
+41
+207
+53
+41
+206
+54
+43
+202
+54
+42
+200
+53
+43
+197
+55
+43
+227
+89
+78
+216
+82
+70
+202
+72
+59
+190
+64
+50
+183
+59
+47
+181
+59
+46
+181
+60
+49
+181
+60
+49
+175
+57
+45
+177
+59
+47
+177
+61
+48
+177
+61
+46
+175
+59
+44
+173
+57
+42
+173
+57
+44
+174
+58
+45
+177
+60
+50
+208
+89
+81
+220
+98
+93
+236
+112
+112
+244
+118
+121
+238
+109
+114
+245
+113
+124
+248
+114
+125
+255
+121
+131
+255
+127
+137
+250
+124
+128
+235
+109
+113
+241
+104
+112
+255
+114
+124
+255
+115
+127
+255
+105
+116
+250
+92
+106
+243
+80
+97
+245
+71
+94
+232
+64
+87
+220
+78
+94
+215
+112
+116
+196
+152
+139
+164
+163
+132
+134
+156
+110
+126
+154
+103
+129
+151
+104
+141
+156
+113
+161
+169
+130
+180
+186
+150
+200
+205
+173
+213
+220
+189
+202
+215
+185
+191
+210
+178
+176
+202
+167
+166
+193
+158
+157
+187
+151
+154
+182
+144
+150
+178
+140
+145
+176
+134
+140
+180
+130
+138
+181
+127
+143
+186
+133
+152
+192
+140
+158
+195
+144
+162
+196
+146
+170
+197
+154
+179
+201
+162
+190
+206
+170
+201
+210
+181
+216
+218
+196
+227
+224
+205
+232
+222
+210
+230
+216
+207
+223
+205
+201
+218
+199
+195
+211
+193
+189
+206
+188
+184
+200
+182
+180
+90
+77
+61
+90
+77
+61
+90
+77
+61
+90
+77
+61
+90
+77
+61
+90
+77
+61
+90
+77
+61
+90
+77
+61
+88
+75
+59
+88
+75
+59
+88
+75
+59
+89
+76
+60
+89
+76
+60
+90
+77
+61
+90
+77
+61
+90
+77
+61
+90
+76
+63
+90
+76
+63
+90
+77
+61
+91
+78
+61
+93
+77
+61
+94
+79
+60
+92
+79
+60
+92
+79
+62
+89
+77
+61
+87
+77
+67
+87
+76
+72
+88
+78
+79
+90
+80
+88
+93
+85
+98
+96
+89
+105
+96
+93
+114
+103
+103
+129
+106
+109
+142
+112
+114
+155
+114
+116
+167
+120
+119
+179
+129
+126
+193
+137
+131
+201
+138
+131
+199
+137
+126
+192
+140
+126
+188
+138
+120
+178
+135
+112
+168
+139
+112
+167
+145
+114
+171
+139
+106
+163
+137
+90
+132
+143
+71
+82
+161
+66
+60
+179
+65
+64
+202
+68
+67
+220
+64
+67
+231
+58
+62
+243
+60
+62
+254
+68
+69
+246
+62
+60
+241
+62
+58
+236
+62
+61
+233
+65
+64
+233
+67
+67
+233
+68
+72
+233
+66
+73
+226
+67
+72
+207
+63
+62
+197
+64
+57
+190
+63
+54
+183
+62
+51
+176
+60
+47
+178
+60
+48
+192
+68
+56
+210
+77
+68
+199
+54
+49
+212
+59
+54
+205
+50
+46
+204
+51
+46
+214
+67
+59
+199
+63
+51
+181
+54
+39
+187
+62
+44
+186
+55
+37
+193
+58
+39
+195
+60
+41
+194
+59
+40
+192
+57
+37
+194
+57
+38
+197
+58
+39
+199
+58
+40
+203
+58
+39
+208
+57
+40
+214
+54
+40
+216
+50
+36
+218
+46
+34
+224
+47
+37
+236
+55
+46
+245
+61
+53
+246
+57
+51
+247
+54
+49
+248
+49
+46
+249
+43
+43
+250
+40
+41
+252
+38
+40
+252
+38
+40
+252
+38
+40
+251
+38
+42
+247
+33
+41
+248
+34
+46
+255
+39
+55
+255
+41
+62
+255
+33
+59
+255
+24
+54
+255
+23
+49
+254
+37
+54
+238
+34
+43
+229
+34
+42
+227
+43
+45
+221
+45
+45
+211
+42
+39
+209
+44
+40
+218
+50
+47
+226
+54
+50
+232
+54
+52
+238
+54
+54
+242
+54
+53
+242
+49
+50
+239
+46
+47
+238
+44
+44
+229
+47
+44
+220
+57
+50
+209
+58
+49
+210
+57
+49
+236
+83
+75
+187
+34
+26
+196
+43
+35
+223
+70
+62
+200
+46
+38
+205
+46
+40
+222
+60
+55
+232
+69
+64
+226
+58
+55
+216
+47
+42
+218
+46
+42
+226
+53
+49
+229
+60
+55
+223
+62
+52
+213
+60
+46
+207
+53
+41
+203
+51
+38
+204
+53
+42
+205
+59
+46
+203
+59
+48
+197
+56
+46
+236
+98
+88
+224
+90
+79
+200
+67
+58
+185
+54
+44
+186
+58
+47
+184
+56
+45
+177
+51
+39
+180
+54
+42
+176
+48
+37
+176
+50
+38
+174
+50
+38
+175
+52
+37
+176
+54
+39
+178
+58
+42
+180
+60
+46
+179
+61
+49
+176
+58
+48
+186
+67
+59
+214
+92
+87
+236
+112
+112
+241
+115
+118
+246
+120
+124
+251
+121
+131
+245
+113
+124
+255
+122
+132
+253
+119
+128
+242
+117
+123
+244
+118
+122
+253
+116
+124
+255
+114
+124
+255
+107
+120
+255
+100
+115
+255
+94
+110
+241
+74
+92
+245
+69
+92
+239
+70
+91
+217
+70
+86
+208
+103
+107
+190
+144
+128
+158
+155
+122
+134
+156
+109
+125
+153
+102
+126
+148
+99
+135
+151
+106
+148
+159
+119
+158
+166
+129
+160
+168
+131
+156
+168
+132
+146
+163
+127
+138
+163
+124
+128
+159
+118
+122
+154
+113
+121
+154
+111
+124
+157
+114
+129
+160
+118
+131
+164
+117
+132
+172
+119
+134
+177
+121
+140
+183
+127
+147
+188
+132
+149
+190
+134
+152
+189
+135
+157
+189
+140
+162
+189
+144
+167
+188
+147
+175
+189
+154
+189
+195
+167
+206
+205
+185
+220
+212
+199
+224
+211
+202
+218
+200
+196
+211
+192
+188
+203
+185
+183
+192
+177
+174
+184
+168
+168
+90
+77
+61
+90
+77
+61
+90
+77
+61
+90
+77
+61
+90
+77
+61
+90
+77
+61
+90
+77
+61
+90
+77
+61
+88
+75
+59
+88
+75
+59
+88
+75
+59
+89
+76
+60
+89
+76
+60
+90
+77
+61
+90
+77
+61
+90
+77
+61
+90
+76
+63
+90
+77
+61
+92
+76
+61
+93
+77
+61
+93
+78
+59
+94
+79
+60
+92
+79
+60
+92
+79
+62
+93
+80
+64
+91
+79
+67
+91
+78
+70
+89
+78
+74
+90
+80
+81
+92
+83
+88
+95
+85
+94
+94
+88
+102
+97
+93
+116
+101
+100
+131
+107
+105
+145
+110
+108
+157
+117
+113
+172
+127
+122
+188
+135
+128
+196
+139
+128
+196
+143
+128
+193
+145
+125
+186
+143
+116
+171
+143
+108
+162
+154
+111
+164
+165
+115
+168
+158
+103
+158
+154
+86
+125
+156
+61
+69
+166
+55
+46
+175
+54
+46
+192
+61
+53
+208
+65
+59
+218
+63
+58
+231
+64
+58
+243
+65
+61
+245
+61
+61
+245
+59
+60
+244
+60
+62
+241
+62
+65
+236
+66
+69
+231
+66
+70
+225
+66
+70
+216
+66
+67
+199
+60
+55
+189
+61
+52
+182
+60
+49
+177
+59
+47
+171
+58
+44
+174
+58
+43
+189
+65
+53
+208
+74
+65
+218
+71
+64
+220
+65
+61
+212
+54
+51
+208
+53
+49
+213
+64
+57
+205
+67
+56
+187
+57
+43
+178
+53
+35
+189
+56
+39
+194
+59
+40
+196
+61
+42
+196
+61
+42
+196
+59
+40
+198
+59
+40
+199
+58
+40
+202
+57
+40
+207
+57
+40
+207
+54
+38
+212
+50
+37
+218
+50
+37
+227
+53
+42
+234
+56
+46
+239
+56
+48
+240
+57
+49
+231
+50
+39
+231
+49
+38
+235
+47
+38
+240
+45
+39
+246
+44
+40
+250
+45
+42
+254
+46
+44
+255
+46
+47
+251
+42
+45
+248
+37
+43
+250
+36
+46
+255
+39
+55
+255
+37
+59
+255
+29
+55
+255
+20
+51
+252
+19
+48
+244
+29
+47
+245
+45
+56
+244
+50
+59
+228
+41
+48
+218
+39
+43
+219
+45
+47
+221
+47
+49
+218
+42
+45
+241
+58
+62
+244
+55
+61
+247
+52
+58
+246
+50
+54
+246
+47
+52
+248
+48
+51
+249
+50
+53
+244
+56
+55
+219
+50
+45
+218
+59
+53
+215
+56
+50
+228
+69
+63
+228
+69
+63
+206
+47
+43
+209
+50
+46
+193
+34
+30
+212
+53
+49
+225
+63
+58
+232
+69
+64
+224
+61
+56
+216
+51
+45
+217
+50
+44
+221
+54
+48
+221
+58
+49
+212
+58
+46
+207
+57
+42
+201
+53
+39
+199
+53
+40
+200
+57
+43
+202
+60
+48
+202
+60
+50
+198
+57
+47
+237
+99
+89
+225
+88
+78
+201
+64
+56
+186
+52
+43
+194
+57
+49
+195
+58
+48
+191
+54
+44
+194
+57
+47
+191
+53
+43
+190
+52
+42
+189
+52
+42
+187
+53
+41
+184
+54
+41
+181
+53
+40
+180
+54
+40
+176
+54
+41
+180
+59
+48
+187
+66
+57
+211
+89
+84
+232
+108
+106
+239
+113
+116
+246
+120
+124
+254
+124
+132
+249
+117
+128
+255
+122
+132
+253
+119
+128
+244
+119
+125
+245
+118
+125
+254
+117
+125
+255
+111
+123
+255
+104
+118
+255
+97
+113
+255
+93
+110
+242
+75
+93
+246
+68
+92
+242
+70
+92
+221
+73
+89
+208
+102
+104
+183
+138
+119
+149
+146
+111
+127
+147
+98
+117
+146
+92
+120
+142
+93
+127
+144
+99
+138
+149
+107
+141
+152
+112
+139
+149
+112
+133
+148
+109
+112
+135
+93
+108
+137
+93
+104
+137
+92
+103
+141
+94
+107
+143
+95
+113
+149
+101
+121
+155
+105
+124
+158
+107
+132
+171
+116
+133
+177
+118
+139
+183
+124
+142
+186
+125
+146
+187
+127
+148
+187
+130
+151
+188
+134
+155
+187
+137
+155
+181
+134
+161
+179
+139
+172
+183
+151
+188
+190
+168
+205
+199
+183
+213
+200
+191
+212
+195
+188
+206
+188
+186
+197
+181
+181
+186
+172
+172
+177
+163
+163
+92
+76
+60
+92
+76
+60
+92
+76
+60
+92
+76
+60
+92
+76
+60
+92
+76
+60
+92
+76
+60
+92
+76
+60
+90
+74
+58
+90
+74
+58
+90
+74
+58
+91
+75
+59
+91
+75
+59
+92
+76
+60
+92
+76
+60
+92
+76
+60
+92
+76
+61
+92
+76
+61
+93
+75
+61
+93
+77
+61
+93
+78
+59
+94
+79
+60
+94
+79
+60
+92
+79
+60
+95
+82
+65
+93
+81
+65
+92
+80
+68
+91
+78
+70
+90
+79
+75
+91
+80
+78
+93
+81
+83
+92
+82
+90
+93
+84
+103
+98
+89
+118
+101
+95
+133
+105
+99
+145
+113
+108
+164
+125
+119
+181
+132
+126
+190
+137
+125
+189
+152
+132
+193
+155
+128
+183
+156
+118
+169
+160
+111
+158
+177
+115
+162
+189
+117
+165
+183
+104
+152
+177
+81
+118
+181
+61
+70
+186
+54
+49
+182
+54
+45
+189
+61
+50
+200
+68
+56
+210
+69
+59
+219
+66
+58
+228
+63
+57
+241
+61
+62
+247
+58
+62
+249
+58
+63
+247
+61
+66
+239
+64
+69
+229
+66
+69
+215
+65
+66
+205
+66
+63
+192
+59
+52
+184
+57
+48
+177
+57
+43
+173
+57
+42
+169
+56
+40
+173
+57
+42
+187
+63
+51
+207
+70
+60
+217
+68
+62
+215
+57
+54
+217
+55
+52
+218
+59
+55
+220
+67
+61
+221
+79
+69
+206
+72
+60
+181
+51
+35
+190
+57
+40
+193
+58
+39
+196
+59
+41
+198
+61
+43
+201
+61
+44
+200
+60
+43
+201
+58
+41
+204
+57
+41
+207
+55
+41
+207
+50
+35
+211
+47
+35
+223
+52
+42
+238
+61
+51
+244
+63
+54
+241
+57
+49
+233
+52
+43
+224
+54
+39
+221
+54
+38
+226
+50
+37
+230
+48
+37
+234
+46
+37
+238
+45
+38
+239
+44
+40
+242
+44
+41
+242
+44
+45
+239
+40
+43
+240
+39
+47
+247
+41
+54
+253
+37
+58
+252
+30
+55
+251
+22
+51
+248
+24
+51
+244
+37
+55
+241
+47
+58
+242
+52
+64
+239
+53
+64
+238
+57
+66
+238
+58
+67
+233
+53
+62
+229
+45
+55
+240
+50
+60
+243
+47
+59
+246
+46
+57
+246
+45
+55
+245
+46
+51
+245
+46
+49
+243
+47
+49
+237
+52
+50
+220
+48
+44
+226
+61
+57
+218
+54
+52
+223
+59
+57
+255
+109
+106
+229
+67
+65
+209
+47
+45
+206
+47
+44
+217
+58
+55
+223
+64
+60
+224
+65
+59
+219
+60
+54
+213
+55
+46
+214
+53
+45
+214
+53
+43
+210
+54
+42
+200
+54
+39
+195
+54
+37
+194
+54
+39
+196
+56
+41
+197
+59
+46
+198
+60
+49
+198
+60
+49
+197
+59
+49
+235
+96
+89
+225
+84
+77
+201
+60
+51
+191
+48
+40
+203
+59
+51
+209
+62
+54
+206
+59
+51
+210
+61
+54
+216
+61
+56
+215
+60
+55
+212
+61
+54
+207
+60
+50
+201
+59
+49
+195
+57
+46
+188
+54
+42
+182
+54
+41
+185
+59
+47
+188
+64
+54
+207
+84
+77
+227
+103
+101
+237
+111
+114
+248
+122
+126
+255
+129
+136
+253
+123
+131
+255
+122
+131
+252
+121
+129
+245
+122
+127
+246
+121
+127
+254
+117
+127
+255
+110
+124
+255
+99
+117
+255
+92
+111
+255
+89
+109
+242
+73
+94
+245
+65
+90
+242
+70
+92
+224
+76
+90
+203
+97
+97
+167
+122
+101
+130
+128
+90
+110
+130
+81
+104
+133
+79
+109
+131
+82
+116
+133
+88
+123
+136
+93
+125
+136
+94
+120
+132
+92
+113
+130
+88
+96
+122
+77
+95
+127
+80
+97
+133
+85
+101
+141
+89
+110
+149
+96
+117
+156
+103
+125
+160
+106
+128
+163
+109
+132
+171
+114
+135
+176
+116
+139
+180
+120
+142
+184
+121
+140
+184
+121
+143
+185
+122
+146
+186
+126
+148
+186
+129
+147
+177
+127
+149
+172
+128
+154
+170
+134
+168
+174
+146
+184
+181
+162
+196
+186
+174
+200
+185
+178
+198
+183
+180
+183
+171
+173
+169
+160
+165
+159
+150
+155
+91
+75
+59
+91
+75
+59
+91
+75
+59
+91
+75
+59
+91
+75
+59
+91
+75
+59
+91
+75
+59
+91
+75
+59
+90
+74
+58
+90
+74
+58
+90
+74
+58
+91
+75
+59
+91
+75
+59
+92
+76
+60
+92
+76
+60
+92
+76
+60
+93
+75
+61
+93
+75
+61
+93
+76
+60
+94
+77
+61
+94
+77
+59
+94
+79
+60
+94
+79
+60
+94
+79
+60
+94
+81
+64
+94
+81
+64
+93
+79
+66
+91
+79
+67
+92
+78
+69
+91
+78
+70
+92
+79
+73
+91
+79
+79
+94
+80
+95
+98
+84
+109
+100
+89
+123
+103
+94
+137
+111
+104
+156
+122
+117
+173
+132
+124
+183
+136
+123
+179
+155
+132
+186
+166
+133
+180
+175
+128
+170
+184
+122
+161
+200
+120
+159
+211
+116
+156
+204
+99
+140
+198
+77
+108
+216
+72
+82
+217
+67
+66
+209
+67
+63
+203
+70
+61
+201
+73
+60
+204
+72
+59
+211
+69
+59
+222
+65
+60
+238
+64
+65
+245
+60
+65
+251
+60
+68
+249
+62
+69
+240
+65
+72
+226
+66
+68
+209
+65
+64
+197
+64
+59
+191
+63
+54
+182
+60
+49
+175
+57
+43
+171
+58
+42
+170
+57
+41
+174
+56
+42
+188
+62
+48
+206
+68
+58
+213
+60
+55
+213
+51
+49
+224
+59
+57
+229
+65
+63
+225
+68
+63
+232
+83
+76
+223
+85
+74
+191
+58
+43
+193
+57
+41
+190
+55
+36
+192
+55
+37
+196
+59
+41
+201
+61
+44
+202
+61
+44
+203
+57
+42
+206
+56
+41
+205
+52
+38
+210
+50
+38
+217
+50
+41
+229
+57
+47
+241
+62
+55
+245
+62
+54
+240
+53
+46
+228
+47
+38
+222
+54
+41
+221
+55
+41
+224
+52
+42
+228
+50
+40
+231
+46
+41
+233
+46
+41
+236
+44
+41
+236
+44
+43
+232
+42
+44
+230
+39
+44
+234
+40
+49
+240
+42
+57
+245
+39
+60
+246
+34
+59
+250
+31
+61
+251
+37
+65
+253
+56
+74
+228
+40
+54
+229
+44
+58
+255
+77
+89
+255
+93
+105
+255
+78
+90
+242
+60
+73
+244
+58
+72
+232
+41
+56
+237
+42
+56
+241
+45
+57
+244
+48
+58
+241
+50
+55
+234
+48
+49
+225
+43
+42
+215
+40
+37
+216
+48
+45
+218
+55
+50
+212
+50
+47
+229
+67
+64
+255
+115
+112
+245
+86
+83
+221
+62
+59
+229
+71
+68
+219
+61
+58
+218
+60
+57
+213
+58
+53
+210
+56
+48
+209
+55
+45
+208
+54
+42
+205
+52
+38
+198
+51
+35
+190
+53
+35
+185
+54
+36
+187
+56
+38
+191
+59
+44
+192
+60
+47
+191
+57
+45
+192
+58
+47
+197
+60
+50
+229
+88
+81
+220
+77
+71
+202
+55
+48
+199
+48
+41
+215
+60
+55
+222
+65
+58
+218
+59
+53
+223
+60
+53
+231
+62
+57
+233
+61
+57
+230
+63
+57
+225
+64
+56
+217
+63
+53
+208
+60
+50
+200
+58
+46
+193
+57
+45
+187
+57
+44
+187
+61
+49
+203
+78
+72
+224
+99
+95
+236
+110
+111
+250
+124
+127
+255
+132
+136
+255
+125
+133
+252
+118
+127
+250
+119
+127
+245
+122
+127
+247
+122
+128
+255
+118
+128
+255
+109
+123
+255
+98
+116
+254
+91
+110
+250
+84
+104
+240
+71
+92
+241
+61
+86
+240
+68
+90
+225
+79
+92
+195
+91
+90
+146
+104
+82
+111
+109
+71
+95
+115
+66
+92
+121
+67
+100
+122
+73
+108
+125
+80
+116
+129
+86
+118
+131
+88
+114
+129
+88
+111
+129
+87
+109
+135
+90
+108
+142
+92
+111
+149
+98
+117
+157
+104
+123
+164
+108
+129
+168
+111
+132
+170
+113
+135
+170
+112
+134
+172
+113
+136
+176
+116
+139
+179
+117
+140
+182
+118
+138
+183
+118
+138
+183
+118
+139
+184
+119
+144
+184
+122
+145
+180
+124
+143
+171
+123
+144
+165
+124
+154
+165
+133
+170
+172
+150
+187
+180
+164
+197
+184
+175
+198
+184
+181
+177
+171
+175
+161
+158
+165
+151
+146
+153
+91
+75
+59
+91
+75
+59
+91
+75
+59
+91
+75
+59
+91
+75
+59
+91
+75
+59
+91
+75
+59
+91
+75
+59
+90
+74
+58
+90
+74
+58
+90
+74
+58
+91
+75
+59
+91
+75
+59
+92
+76
+60
+92
+76
+60
+92
+76
+60
+93
+76
+60
+94
+75
+60
+94
+75
+60
+94
+77
+61
+94
+77
+59
+95
+78
+60
+94
+79
+60
+94
+79
+60
+94
+79
+60
+94
+78
+62
+94
+78
+62
+92
+79
+63
+94
+78
+65
+93
+79
+66
+94
+80
+69
+94
+79
+74
+98
+78
+89
+99
+80
+100
+99
+84
+113
+101
+89
+125
+108
+101
+145
+120
+114
+162
+127
+119
+168
+131
+118
+164
+148
+125
+167
+172
+134
+171
+194
+137
+169
+206
+130
+158
+218
+119
+148
+223
+108
+137
+218
+89
+119
+216
+69
+95
+236
+70
+84
+242
+73
+78
+233
+77
+78
+219
+76
+72
+205
+71
+62
+202
+69
+60
+210
+69
+62
+219
+67
+62
+234
+66
+66
+242
+63
+67
+248
+63
+71
+246
+65
+74
+237
+68
+73
+222
+68
+70
+205
+66
+63
+192
+63
+57
+189
+65
+55
+181
+61
+47
+174
+58
+43
+171
+58
+42
+170
+57
+41
+174
+56
+42
+187
+59
+46
+204
+63
+54
+225
+70
+65
+226
+61
+59
+238
+66
+66
+235
+65
+65
+222
+59
+54
+227
+74
+66
+230
+88
+76
+213
+75
+62
+200
+64
+50
+192
+56
+40
+188
+51
+35
+193
+56
+40
+200
+60
+45
+201
+58
+42
+203
+55
+41
+208
+56
+43
+206
+48
+37
+215
+51
+41
+224
+56
+47
+233
+59
+52
+237
+58
+53
+237
+54
+48
+235
+48
+43
+229
+44
+39
+223
+48
+43
+223
+50
+44
+229
+49
+48
+235
+50
+48
+241
+51
+53
+244
+51
+54
+246
+53
+56
+244
+53
+58
+235
+46
+53
+232
+45
+54
+235
+47
+61
+240
+49
+67
+242
+46
+70
+245
+42
+71
+252
+44
+78
+255
+52
+82
+245
+58
+77
+229
+51
+63
+238
+62
+75
+255
+92
+105
+255
+104
+118
+255
+85
+100
+245
+67
+83
+247
+64
+82
+238
+51
+68
+237
+51
+65
+237
+51
+62
+233
+54
+60
+227
+57
+57
+219
+56
+51
+206
+52
+42
+199
+47
+36
+203
+50
+42
+199
+46
+40
+208
+55
+50
+242
+89
+84
+246
+92
+90
+242
+88
+86
+219
+65
+63
+226
+72
+70
+220
+66
+64
+212
+60
+55
+206
+55
+48
+205
+54
+45
+207
+56
+45
+207
+57
+43
+202
+55
+39
+194
+53
+35
+185
+56
+35
+179
+57
+36
+181
+58
+40
+184
+61
+45
+185
+59
+44
+182
+54
+41
+188
+55
+46
+198
+61
+53
+219
+78
+71
+217
+69
+65
+206
+53
+48
+208
+49
+45
+225
+62
+57
+231
+64
+58
+227
+56
+49
+231
+53
+49
+235
+50
+48
+238
+50
+49
+235
+53
+50
+231
+56
+51
+225
+58
+50
+216
+58
+47
+208
+57
+46
+200
+58
+46
+190
+54
+42
+186
+56
+43
+200
+73
+66
+220
+95
+89
+235
+110
+108
+251
+125
+128
+255
+133
+137
+255
+126
+131
+247
+116
+124
+248
+118
+126
+245
+122
+127
+248
+123
+129
+254
+116
+129
+255
+108
+124
+255
+97
+117
+255
+90
+112
+247
+81
+101
+241
+72
+93
+240
+62
+86
+238
+69
+90
+227
+83
+93
+188
+86
+82
+131
+91
+66
+98
+98
+60
+92
+112
+63
+91
+118
+67
+102
+121
+75
+110
+126
+81
+116
+129
+86
+120
+133
+90
+121
+136
+95
+119
+140
+97
+121
+149
+101
+120
+154
+104
+122
+160
+109
+124
+167
+113
+129
+170
+114
+132
+171
+114
+133
+171
+112
+134
+169
+111
+137
+172
+114
+139
+174
+116
+138
+178
+116
+138
+180
+116
+136
+181
+116
+135
+182
+114
+137
+184
+116
+139
+184
+119
+143
+183
+123
+140
+173
+120
+141
+164
+120
+151
+165
+130
+170
+174
+149
+191
+186
+167
+203
+193
+181
+207
+198
+193
+188
+186
+191
+168
+170
+182
+156
+156
+168
+90
+74
+58
+90
+74
+58
+90
+74
+58
+90
+74
+58
+90
+74
+58
+90
+74
+58
+90
+74
+58
+90
+74
+58
+90
+74
+58
+90
+74
+58
+90
+74
+58
+91
+75
+59
+91
+75
+59
+92
+76
+60
+92
+76
+60
+93
+76
+60
+94
+75
+60
+94
+75
+60
+94
+75
+60
+95
+76
+61
+94
+77
+59
+95
+78
+60
+94
+79
+60
+94
+79
+60
+93
+78
+59
+93
+78
+59
+94
+79
+60
+95
+79
+63
+95
+79
+63
+96
+80
+64
+97
+81
+65
+98
+80
+70
+101
+76
+80
+101
+77
+93
+97
+79
+101
+98
+85
+115
+104
+96
+133
+116
+111
+151
+123
+116
+157
+125
+113
+151
+143
+118
+150
+174
+131
+159
+203
+140
+161
+218
+131
+150
+227
+116
+133
+232
+101
+117
+230
+81
+100
+228
+63
+80
+242
+55
+72
+252
+64
+78
+244
+73
+81
+227
+71
+74
+209
+65
+64
+203
+66
+60
+209
+67
+63
+217
+67
+66
+230
+67
+70
+235
+64
+70
+239
+64
+71
+239
+66
+72
+231
+68
+73
+218
+68
+69
+201
+66
+62
+190
+63
+54
+186
+64
+53
+177
+59
+45
+169
+56
+40
+168
+57
+40
+170
+57
+41
+176
+56
+42
+188
+58
+45
+202
+59
+51
+232
+73
+69
+233
+63
+63
+235
+61
+62
+229
+55
+56
+218
+50
+47
+222
+65
+58
+238
+90
+80
+244
+104
+91
+218
+80
+67
+201
+65
+51
+190
+53
+37
+194
+54
+39
+199
+57
+43
+200
+57
+43
+203
+55
+43
+210
+56
+44
+209
+48
+38
+218
+54
+45
+230
+59
+52
+233
+59
+52
+234
+52
+48
+232
+47
+44
+234
+45
+43
+235
+45
+45
+241
+52
+56
+243
+52
+59
+247
+51
+61
+250
+50
+60
+251
+49
+61
+253
+49
+61
+250
+48
+60
+247
+49
+62
+244
+49
+65
+241
+50
+66
+242
+53
+75
+243
+53
+78
+242
+49
+78
+244
+46
+79
+254
+49
+88
+255
+62
+95
+230
+51
+72
+248
+78
+91
+255
+95
+108
+255
+92
+107
+252
+84
+99
+250
+79
+95
+244
+68
+88
+233
+56
+74
+243
+65
+81
+234
+58
+71
+221
+50
+58
+210
+47
+50
+202
+50
+45
+194
+56
+45
+189
+59
+43
+188
+58
+42
+196
+58
+47
+192
+50
+40
+217
+74
+66
+250
+107
+99
+221
+76
+71
+225
+80
+75
+207
+59
+57
+207
+59
+57
+224
+76
+74
+212
+64
+60
+202
+55
+48
+202
+55
+45
+206
+60
+47
+205
+60
+43
+203
+58
+41
+196
+59
+40
+180
+59
+38
+173
+58
+37
+175
+60
+41
+179
+62
+45
+177
+57
+41
+175
+51
+39
+186
+58
+47
+202
+68
+59
+214
+71
+65
+216
+67
+61
+212
+55
+50
+215
+50
+46
+231
+59
+55
+236
+58
+54
+232
+50
+46
+237
+50
+45
+242
+44
+45
+244
+44
+44
+242
+46
+47
+239
+51
+49
+232
+55
+49
+226
+58
+49
+218
+60
+49
+210
+62
+50
+194
+54
+41
+186
+52
+41
+197
+66
+58
+215
+88
+82
+231
+106
+104
+250
+124
+125
+255
+134
+137
+255
+127
+132
+248
+117
+125
+249
+119
+127
+246
+123
+128
+247
+122
+128
+252
+114
+127
+253
+105
+121
+255
+94
+115
+255
+89
+111
+245
+79
+99
+244
+75
+96
+242
+64
+88
+239
+70
+91
+229
+85
+95
+182
+83
+78
+121
+84
+58
+94
+96
+56
+96
+115
+69
+97
+124
+73
+110
+129
+83
+118
+134
+89
+123
+136
+93
+126
+139
+96
+129
+144
+103
+130
+151
+108
+128
+156
+108
+125
+159
+109
+124
+164
+111
+125
+168
+112
+128
+169
+111
+130
+170
+110
+131
+169
+108
+133
+169
+108
+137
+170
+113
+139
+173
+113
+137
+175
+114
+136
+178
+114
+133
+178
+111
+133
+180
+112
+135
+182
+114
+137
+184
+116
+139
+181
+118
+135
+173
+116
+140
+166
+119
+153
+169
+132
+175
+181
+153
+198
+196
+175
+213
+206
+190
+217
+210
+204
+194
+194
+202
+172
+178
+192
+155
+161
+175
+90
+75
+56
+90
+75
+56
+90
+75
+56
+90
+75
+56
+90
+75
+56
+90
+75
+56
+90
+75
+56
+90
+75
+56
+90
+75
+56
+90
+75
+56
+90
+75
+56
+91
+76
+57
+91
+76
+57
+92
+77
+58
+92
+77
+58
+93
+76
+58
+94
+75
+60
+96
+74
+60
+94
+75
+60
+95
+76
+61
+94
+77
+59
+95
+78
+60
+94
+79
+60
+94
+79
+60
+94
+79
+58
+95
+80
+59
+96
+79
+59
+97
+80
+62
+97
+80
+62
+97
+80
+62
+97
+80
+60
+100
+78
+65
+104
+75
+77
+103
+75
+87
+99
+78
+95
+98
+84
+109
+106
+97
+128
+118
+112
+146
+124
+118
+152
+128
+115
+145
+143
+117
+142
+173
+128
+148
+205
+134
+148
+222
+127
+135
+237
+113
+121
+246
+101
+108
+246
+82
+91
+244
+62
+75
+248
+47
+66
+255
+55
+75
+251
+65
+79
+235
+64
+73
+219
+63
+67
+214
+66
+66
+213
+67
+67
+215
+65
+66
+224
+65
+69
+227
+64
+69
+230
+63
+70
+228
+65
+70
+223
+67
+70
+212
+66
+66
+199
+64
+60
+189
+62
+53
+184
+62
+51
+175
+57
+43
+168
+55
+39
+169
+58
+41
+173
+60
+42
+180
+60
+44
+193
+61
+49
+207
+63
+55
+223
+61
+58
+229
+57
+57
+227
+48
+51
+226
+47
+50
+224
+52
+50
+219
+57
+52
+230
+77
+69
+252
+108
+97
+242
+104
+91
+217
+81
+67
+198
+60
+47
+198
+58
+45
+200
+58
+46
+201
+55
+42
+205
+54
+43
+213
+56
+47
+213
+52
+44
+222
+55
+47
+230
+57
+51
+232
+54
+50
+233
+49
+47
+232
+47
+44
+238
+49
+47
+245
+49
+53
+255
+50
+66
+255
+48
+68
+255
+45
+69
+255
+43
+65
+255
+38
+63
+255
+35
+60
+250
+32
+56
+244
+32
+55
+246
+39
+65
+243
+43
+69
+242
+47
+77
+242
+49
+80
+240
+44
+80
+243
+42
+84
+254
+51
+96
+255
+66
+104
+240
+67
+87
+255
+95
+108
+255
+103
+116
+247
+85
+100
+236
+74
+89
+239
+74
+90
+234
+65
+84
+217
+49
+66
+235
+64
+82
+221
+55
+67
+201
+45
+49
+186
+40
+40
+177
+46
+36
+171
+56
+38
+165
+63
+38
+168
+64
+39
+184
+63
+46
+188
+58
+44
+221
+89
+77
+225
+93
+81
+205
+71
+62
+205
+68
+62
+193
+54
+51
+201
+59
+55
+228
+85
+81
+213
+70
+64
+201
+57
+49
+200
+56
+45
+201
+58
+44
+200
+57
+40
+200
+57
+40
+196
+61
+41
+177
+63
+39
+166
+60
+38
+168
+59
+38
+172
+61
+42
+171
+55
+40
+172
+51
+40
+188
+61
+52
+211
+76
+70
+214
+71
+65
+221
+69
+64
+219
+57
+54
+220
+51
+48
+233
+55
+51
+236
+53
+49
+235
+48
+43
+244
+49
+45
+253
+44
+47
+255
+43
+45
+250
+46
+47
+244
+49
+47
+237
+52
+47
+230
+56
+49
+223
+59
+49
+216
+62
+50
+201
+57
+46
+189
+51
+40
+192
+59
+50
+207
+78
+72
+225
+97
+94
+247
+121
+122
+255
+136
+138
+255
+131
+135
+252
+121
+129
+252
+122
+130
+248
+124
+132
+247
+122
+130
+249
+111
+124
+249
+101
+117
+252
+90
+111
+252
+86
+108
+238
+75
+96
+242
+74
+97
+240
+64
+87
+236
+69
+89
+225
+84
+93
+174
+77
+71
+112
+77
+49
+92
+94
+54
+95
+114
+68
+102
+126
+78
+117
+136
+91
+127
+142
+99
+132
+144
+104
+134
+146
+106
+136
+151
+110
+137
+158
+115
+136
+164
+116
+132
+166
+116
+127
+167
+114
+125
+168
+112
+127
+168
+110
+129
+169
+109
+131
+169
+108
+134
+168
+108
+136
+167
+110
+138
+169
+110
+136
+172
+111
+134
+174
+111
+130
+175
+108
+130
+177
+107
+131
+181
+110
+133
+183
+114
+135
+179
+116
+134
+173
+116
+140
+168
+119
+155
+173
+133
+176
+185
+154
+199
+199
+175
+214
+207
+189
+215
+210
+204
+188
+192
+201
+165
+174
+189
+147
+156
+171
+91
+74
+56
+90
+75
+56
+91
+74
+56
+90
+75
+56
+91
+74
+56
+90
+75
+56
+91
+74
+56
+90
+75
+56
+91
+74
+56
+90
+75
+56
+91
+74
+56
+91
+76
+57
+92
+75
+57
+92
+77
+58
+93
+76
+58
+93
+76
+58
+94
+75
+60
+94
+75
+60
+94
+75
+60
+94
+77
+61
+94
+77
+61
+94
+79
+60
+94
+79
+60
+92
+79
+60
+96
+81
+62
+97
+82
+61
+97
+82
+63
+98
+81
+63
+98
+81
+63
+97
+80
+62
+97
+79
+59
+98
+76
+63
+107
+77
+75
+106
+76
+84
+101
+79
+92
+100
+87
+107
+107
+101
+127
+120
+117
+148
+125
+124
+156
+127
+120
+151
+145
+122
+148
+171
+129
+149
+198
+132
+144
+217
+126
+133
+238
+117
+122
+252
+109
+111
+253
+90
+91
+249
+70
+76
+247
+52
+69
+255
+58
+78
+251
+64
+81
+238
+63
+76
+229
+65
+74
+225
+69
+73
+221
+66
+70
+215
+60
+64
+222
+63
+68
+223
+62
+67
+225
+62
+67
+222
+64
+65
+218
+66
+65
+208
+65
+61
+197
+62
+56
+188
+61
+52
+181
+63
+49
+172
+59
+43
+169
+56
+40
+173
+60
+44
+180
+63
+46
+187
+64
+49
+202
+65
+55
+216
+67
+61
+217
+55
+52
+225
+56
+53
+222
+46
+46
+226
+51
+48
+230
+58
+54
+211
+48
+39
+207
+53
+41
+235
+85
+71
+255
+119
+106
+235
+91
+80
+209
+67
+55
+202
+60
+48
+203
+59
+48
+201
+55
+42
+205
+54
+43
+212
+58
+48
+218
+55
+48
+223
+56
+50
+229
+54
+51
+231
+51
+50
+234
+48
+49
+237
+49
+50
+244
+51
+54
+252
+53
+60
+252
+37
+53
+255
+35
+56
+255
+34
+56
+255
+33
+56
+255
+32
+55
+255
+31
+53
+251
+29
+52
+246
+30
+53
+237
+28
+50
+236
+32
+57
+237
+39
+66
+238
+41
+71
+237
+39
+74
+239
+41
+77
+253
+53
+92
+255
+70
+104
+255
+96
+115
+254
+94
+106
+247
+85
+98
+242
+80
+93
+242
+80
+93
+240
+75
+89
+227
+62
+76
+210
+48
+59
+218
+61
+70
+205
+54
+59
+187
+47
+46
+175
+46
+40
+168
+52
+39
+162
+59
+40
+155
+63
+38
+157
+61
+37
+170
+57
+39
+178
+56
+43
+210
+86
+74
+187
+59
+50
+196
+63
+56
+190
+52
+49
+189
+50
+47
+206
+67
+64
+229
+87
+83
+213
+72
+65
+200
+57
+49
+196
+54
+42
+197
+54
+40
+196
+53
+37
+198
+53
+36
+195
+58
+40
+177
+60
+40
+167
+58
+38
+168
+55
+37
+173
+57
+42
+172
+52
+38
+175
+49
+37
+194
+63
+53
+219
+82
+74
+217
+73
+65
+225
+72
+66
+222
+59
+54
+222
+50
+46
+234
+52
+49
+237
+49
+47
+239
+45
+43
+252
+50
+50
+254
+44
+47
+253
+43
+46
+249
+43
+45
+243
+43
+43
+237
+45
+42
+230
+49
+42
+223
+52
+44
+214
+56
+44
+209
+61
+49
+191
+50
+40
+188
+55
+46
+200
+73
+66
+217
+92
+88
+243
+119
+119
+255
+137
+139
+255
+134
+138
+253
+126
+133
+255
+125
+133
+252
+125
+134
+253
+119
+130
+252
+107
+122
+249
+96
+114
+249
+87
+108
+249
+83
+105
+234
+68
+92
+240
+71
+94
+236
+59
+85
+228
+65
+86
+215
+81
+90
+162
+73
+67
+102
+70
+45
+88
+93
+53
+90
+109
+63
+98
+125
+74
+116
+140
+92
+128
+150
+103
+135
+152
+108
+136
+155
+110
+138
+160
+114
+139
+165
+118
+140
+172
+122
+134
+171
+119
+129
+170
+114
+126
+167
+109
+124
+165
+105
+125
+165
+103
+129
+165
+103
+131
+165
+105
+131
+164
+107
+133
+166
+109
+132
+170
+109
+130
+172
+108
+128
+173
+104
+128
+175
+105
+129
+179
+106
+132
+182
+111
+137
+182
+115
+136
+176
+114
+140
+173
+120
+153
+176
+132
+172
+188
+152
+189
+198
+169
+201
+203
+181
+203
+205
+194
+182
+191
+196
+159
+171
+183
+140
+152
+164
+93
+75
+55
+92
+75
+55
+93
+75
+55
+92
+75
+55
+93
+75
+55
+92
+75
+55
+93
+75
+55
+92
+75
+55
+94
+76
+56
+93
+76
+56
+94
+76
+56
+93
+76
+56
+94
+76
+56
+93
+76
+56
+94
+76
+56
+93
+76
+58
+93
+74
+60
+93
+75
+61
+94
+76
+62
+92
+76
+60
+92
+76
+60
+91
+78
+61
+93
+80
+63
+94
+83
+65
+96
+83
+66
+95
+82
+63
+96
+80
+64
+98
+81
+65
+99
+82
+66
+100
+81
+66
+100
+78
+65
+100
+76
+66
+107
+75
+76
+104
+75
+80
+101
+79
+91
+102
+91
+108
+110
+107
+134
+120
+123
+156
+129
+133
+170
+137
+137
+173
+143
+132
+166
+165
+136
+166
+190
+136
+159
+208
+130
+144
+225
+121
+128
+240
+114
+115
+249
+106
+102
+255
+97
+96
+244
+77
+87
+237
+65
+79
+231
+61
+74
+233
+66
+76
+235
+69
+79
+231
+65
+75
+228
+61
+69
+229
+62
+70
+226
+59
+66
+224
+59
+63
+221
+58
+61
+217
+59
+58
+212
+60
+57
+204
+59
+54
+196
+58
+48
+185
+57
+44
+167
+54
+38
+175
+65
+48
+173
+60
+44
+172
+54
+40
+191
+65
+53
+204
+70
+61
+204
+61
+53
+208
+55
+50
+218
+56
+53
+220
+55
+49
+222
+53
+46
+222
+54
+45
+222
+56
+42
+221
+60
+42
+215
+58
+39
+211
+54
+37
+217
+59
+48
+240
+83
+76
+242
+90
+79
+217
+69
+57
+199
+56
+42
+205
+62
+46
+212
+66
+51
+210
+58
+45
+211
+50
+42
+240
+71
+66
+225
+47
+47
+239
+54
+59
+244
+55
+62
+239
+45
+56
+255
+66
+77
+240
+40
+51
+250
+38
+50
+255
+41
+50
+255
+41
+50
+249
+29
+39
+253
+34
+42
+255
+39
+47
+254
+39
+47
+240
+29
+38
+238
+31
+41
+248
+44
+55
+233
+33
+46
+235
+38
+55
+240
+44
+64
+227
+33
+57
+255
+86
+112
+229
+43
+66
+255
+92
+108
+255
+94
+105
+255
+89
+99
+251
+84
+92
+246
+79
+87
+236
+71
+77
+222
+62
+64
+208
+54
+52
+204
+61
+55
+197
+64
+55
+184
+62
+49
+167
+54
+38
+156
+49
+33
+154
+53
+35
+157
+58
+39
+160
+59
+41
+167
+56
+45
+174
+55
+47
+194
+69
+63
+191
+59
+55
+189
+51
+49
+196
+54
+52
+197
+53
+52
+212
+68
+67
+219
+76
+72
+218
+75
+69
+209
+68
+59
+200
+58
+48
+196
+52
+41
+199
+53
+40
+203
+52
+41
+197
+53
+42
+188
+60
+47
+179
+57
+44
+173
+47
+35
+171
+40
+30
+179
+45
+36
+195
+57
+47
+210
+67
+59
+216
+72
+63
+228
+80
+70
+223
+69
+61
+218
+55
+48
+221
+48
+42
+231
+48
+44
+242
+50
+49
+249
+49
+51
+253
+49
+52
+247
+47
+49
+246
+48
+49
+246
+48
+49
+243
+48
+46
+242
+48
+46
+237
+50
+45
+230
+53
+45
+221
+57
+47
+213
+61
+48
+190
+50
+37
+192
+62
+49
+185
+61
+51
+214
+95
+89
+233
+115
+113
+255
+143
+143
+251
+132
+134
+255
+135
+140
+255
+132
+141
+255
+120
+135
+253
+104
+123
+252
+95
+116
+254
+92
+115
+250
+86
+110
+243
+77
+101
+242
+72
+99
+235
+60
+89
+237
+62
+91
+224
+66
+89
+216
+94
+105
+141
+63
+59
+92
+67
+45
+83
+91
+54
+92
+116
+66
+103
+134
+77
+119
+150
+93
+125
+156
+99
+127
+157
+103
+128
+161
+106
+131
+166
+110
+130
+168
+111
+128
+167
+110
+127
+166
+109
+126
+165
+108
+125
+165
+105
+124
+164
+104
+125
+163
+102
+127
+163
+101
+127
+163
+102
+127
+165
+108
+127
+166
+109
+129
+171
+108
+127
+172
+107
+126
+173
+103
+127
+174
+102
+129
+177
+103
+131
+179
+105
+135
+181
+109
+139
+180
+114
+139
+177
+118
+142
+174
+124
+153
+180
+137
+167
+189
+153
+175
+194
+164
+178
+193
+174
+163
+175
+173
+141
+152
+158
+124
+135
+141
+93
+75
+55
+93
+75
+55
+93
+75
+55
+93
+75
+55
+93
+75
+55
+93
+75
+55
+93
+75
+55
+93
+75
+55
+94
+76
+56
+94
+76
+56
+94
+76
+56
+94
+76
+56
+94
+76
+56
+94
+76
+56
+94
+76
+56
+94
+75
+58
+92
+75
+59
+94
+76
+62
+95
+77
+63
+94
+78
+62
+91
+78
+61
+91
+78
+61
+92
+81
+63
+94
+82
+66
+95
+83
+67
+93
+81
+65
+93
+79
+66
+95
+79
+66
+96
+78
+68
+98
+80
+70
+99
+79
+72
+101
+77
+73
+105
+76
+78
+103
+78
+84
+101
+83
+97
+103
+95
+116
+110
+111
+142
+121
+126
+166
+128
+136
+183
+135
+139
+187
+158
+150
+199
+163
+140
+182
+171
+127
+160
+185
+120
+142
+211
+121
+133
+234
+124
+125
+244
+117
+111
+244
+105
+100
+245
+94
+99
+238
+81
+90
+233
+71
+82
+238
+74
+83
+243
+76
+86
+242
+71
+80
+238
+64
+74
+234
+60
+69
+228
+57
+63
+224
+58
+60
+220
+57
+58
+215
+60
+56
+210
+61
+55
+203
+60
+52
+196
+58
+47
+186
+59
+44
+171
+60
+43
+170
+63
+45
+169
+56
+40
+178
+58
+44
+193
+65
+54
+197
+60
+52
+199
+54
+49
+212
+60
+55
+210
+53
+48
+214
+53
+45
+215
+53
+42
+216
+52
+40
+217
+56
+38
+219
+58
+38
+219
+59
+37
+218
+57
+39
+221
+54
+46
+230
+65
+59
+235
+77
+68
+225
+73
+60
+208
+62
+47
+199
+56
+40
+202
+56
+41
+211
+59
+46
+221
+58
+51
+245
+73
+69
+228
+48
+49
+241
+55
+60
+246
+54
+65
+241
+46
+60
+255
+63
+77
+237
+37
+50
+243
+36
+44
+247
+37
+40
+251
+41
+44
+253
+43
+44
+252
+42
+43
+248
+40
+40
+246
+40
+40
+247
+43
+44
+239
+36
+39
+237
+37
+40
+234
+37
+44
+253
+59
+68
+216
+26
+38
+238
+50
+65
+250
+63
+80
+213
+35
+51
+255
+104
+117
+255
+97
+106
+255
+90
+97
+253
+86
+93
+247
+78
+83
+231
+65
+67
+218
+59
+56
+210
+61
+54
+193
+55
+44
+194
+66
+53
+188
+71
+54
+172
+61
+44
+154
+47
+31
+147
+39
+26
+146
+38
+25
+147
+39
+27
+158
+45
+37
+176
+58
+54
+209
+84
+80
+206
+72
+71
+195
+53
+52
+198
+52
+53
+209
+61
+61
+235
+87
+85
+216
+71
+66
+214
+71
+63
+208
+65
+57
+199
+57
+47
+198
+51
+41
+202
+54
+44
+208
+55
+47
+206
+55
+48
+199
+61
+51
+194
+57
+49
+194
+53
+46
+195
+50
+45
+201
+52
+46
+209
+56
+51
+216
+63
+57
+222
+69
+61
+228
+74
+64
+222
+65
+56
+218
+54
+45
+221
+48
+42
+231
+48
+44
+242
+50
+49
+251
+48
+51
+251
+48
+51
+244
+48
+50
+243
+49
+50
+244
+48
+49
+243
+47
+48
+243
+48
+46
+238
+49
+45
+231
+52
+45
+223
+57
+45
+215
+61
+49
+191
+51
+36
+190
+60
+47
+183
+61
+50
+211
+94
+87
+233
+118
+115
+255
+144
+144
+249
+133
+136
+253
+134
+140
+255
+128
+138
+255
+115
+132
+255
+100
+121
+255
+92
+116
+255
+89
+114
+252
+84
+110
+246
+76
+103
+243
+68
+97
+236
+61
+90
+236
+66
+95
+223
+74
+96
+194
+83
+92
+128
+61
+55
+88
+67
+46
+82
+92
+57
+91
+118
+67
+101
+135
+75
+115
+149
+89
+120
+156
+95
+119
+157
+98
+123
+161
+102
+125
+165
+105
+125
+166
+106
+124
+165
+105
+124
+165
+105
+124
+164
+104
+123
+163
+101
+123
+161
+100
+123
+161
+100
+125
+161
+99
+126
+162
+101
+124
+163
+106
+125
+166
+108
+125
+169
+108
+125
+170
+105
+124
+171
+101
+125
+173
+99
+127
+175
+99
+130
+177
+99
+133
+176
+104
+135
+178
+107
+136
+175
+112
+136
+171
+115
+139
+171
+124
+144
+172
+132
+144
+170
+135
+140
+162
+139
+118
+133
+126
+99
+111
+111
+83
+95
+95
+93
+76
+56
+93
+76
+56
+93
+76
+56
+93
+76
+56
+93
+76
+56
+93
+76
+56
+93
+76
+56
+93
+76
+56
+93
+76
+56
+93
+76
+56
+93
+76
+56
+93
+76
+56
+93
+76
+56
+93
+76
+56
+93
+76
+56
+93
+76
+56
+94
+75
+58
+95
+78
+62
+97
+80
+64
+96
+80
+64
+93
+80
+63
+92
+79
+62
+91
+79
+63
+91
+82
+67
+91
+81
+69
+91
+81
+71
+92
+79
+71
+92
+79
+73
+95
+80
+77
+99
+81
+79
+102
+84
+84
+103
+84
+86
+103
+84
+88
+103
+86
+96
+104
+92
+112
+108
+105
+134
+115
+118
+161
+124
+131
+185
+130
+138
+201
+138
+142
+206
+152
+146
+210
+160
+139
+196
+170
+131
+178
+185
+125
+159
+207
+128
+147
+228
+131
+138
+238
+126
+122
+242
+115
+109
+248
+102
+105
+242
+85
+92
+234
+73
+81
+237
+72
+79
+243
+73
+82
+245
+71
+81
+242
+65
+75
+238
+61
+69
+228
+55
+61
+224
+55
+58
+219
+56
+57
+213
+60
+55
+207
+63
+55
+201
+63
+52
+193
+61
+48
+184
+61
+45
+174
+61
+45
+170
+60
+43
+171
+58
+44
+184
+66
+54
+199
+72
+63
+192
+59
+50
+187
+48
+41
+202
+58
+50
+205
+54
+47
+208
+54
+46
+213
+55
+44
+216
+56
+44
+217
+55
+40
+217
+56
+38
+220
+57
+38
+224
+58
+42
+221
+52
+45
+219
+52
+46
+226
+65
+57
+233
+79
+67
+222
+72
+58
+200
+53
+37
+200
+50
+35
+217
+64
+50
+226
+62
+53
+245
+72
+68
+231
+48
+50
+242
+53
+59
+248
+54
+63
+245
+49
+61
+255
+66
+80
+244
+46
+59
+240
+41
+48
+235
+35
+38
+236
+36
+39
+249
+49
+51
+245
+45
+47
+239
+39
+39
+236
+38
+37
+245
+49
+50
+234
+40
+41
+245
+55
+57
+231
+42
+48
+225
+40
+48
+234
+50
+60
+255
+81
+93
+237
+59
+73
+255
+89
+101
+255
+94
+102
+242
+85
+92
+239
+78
+84
+241
+76
+82
+235
+69
+73
+222
+58
+59
+214
+55
+52
+214
+62
+57
+194
+53
+44
+194
+62
+50
+189
+65
+53
+181
+60
+49
+173
+55
+45
+168
+49
+41
+162
+43
+35
+157
+38
+32
+155
+36
+30
+169
+47
+42
+199
+69
+67
+194
+58
+58
+188
+44
+44
+200
+51
+53
+215
+65
+66
+244
+94
+93
+208
+63
+58
+210
+67
+59
+208
+65
+57
+203
+61
+51
+204
+57
+47
+212
+61
+52
+218
+64
+56
+219
+64
+59
+219
+64
+60
+216
+61
+59
+221
+62
+59
+227
+65
+63
+228
+62
+62
+224
+58
+58
+227
+63
+61
+235
+73
+68
+224
+66
+57
+221
+60
+52
+217
+53
+44
+221
+50
+43
+231
+49
+45
+240
+51
+49
+245
+49
+50
+248
+48
+50
+244
+48
+50
+244
+48
+50
+244
+48
+49
+243
+47
+48
+243
+48
+46
+238
+49
+45
+231
+52
+45
+223
+57
+45
+216
+62
+50
+192
+52
+37
+186
+56
+43
+181
+59
+48
+208
+91
+84
+237
+122
+119
+255
+147
+146
+251
+135
+138
+253
+129
+137
+255
+124
+137
+255
+113
+129
+253
+100
+120
+254
+90
+114
+255
+85
+111
+252
+79
+107
+250
+73
+102
+244
+65
+95
+238
+63
+92
+234
+71
+98
+223
+84
+103
+165
+64
+72
+117
+56
+51
+88
+70
+50
+85
+95
+60
+95
+119
+69
+102
+135
+78
+114
+147
+90
+117
+152
+94
+116
+154
+95
+120
+158
+99
+123
+163
+103
+123
+163
+103
+121
+162
+102
+121
+162
+102
+121
+161
+99
+120
+160
+98
+121
+159
+98
+121
+160
+97
+124
+160
+98
+122
+160
+99
+122
+162
+102
+123
+164
+104
+123
+167
+104
+123
+168
+101
+123
+169
+97
+123
+169
+96
+125
+171
+96
+127
+174
+96
+135
+178
+106
+138
+181
+110
+139
+178
+115
+137
+172
+116
+134
+166
+119
+130
+158
+117
+121
+147
+110
+111
+134
+108
+81
+99
+87
+64
+79
+76
+50
+65
+62
+94
+77
+57
+94
+77
+57
+94
+77
+57
+94
+77
+57
+94
+77
+57
+94
+77
+57
+94
+77
+57
+94
+77
+57
+94
+77
+57
+94
+77
+57
+94
+77
+57
+94
+77
+57
+94
+77
+57
+94
+77
+57
+94
+77
+57
+94
+77
+57
+94
+76
+56
+96
+78
+58
+97
+80
+60
+96
+81
+62
+93
+80
+63
+90
+78
+62
+89
+79
+67
+88
+80
+69
+88
+79
+72
+91
+81
+79
+95
+85
+84
+98
+88
+89
+101
+88
+95
+105
+89
+99
+108
+92
+102
+107
+94
+104
+108
+96
+108
+108
+99
+116
+111
+107
+134
+114
+116
+155
+121
+126
+181
+127
+135
+200
+133
+141
+214
+140
+143
+220
+142
+135
+212
+159
+139
+208
+173
+138
+194
+179
+129
+167
+189
+121
+144
+204
+123
+130
+222
+129
+124
+241
+130
+123
+254
+116
+116
+253
+100
+103
+244
+88
+92
+242
+79
+84
+242
+73
+80
+242
+68
+77
+240
+63
+71
+239
+60
+66
+229
+54
+59
+225
+55
+56
+219
+57
+55
+213
+60
+55
+206
+64
+54
+198
+64
+52
+191
+64
+49
+184
+63
+46
+173
+57
+42
+173
+62
+45
+177
+61
+48
+188
+70
+58
+204
+82
+71
+199
+72
+63
+186
+53
+46
+186
+49
+41
+200
+57
+49
+205
+56
+49
+211
+59
+48
+217
+61
+49
+219
+59
+45
+217
+54
+39
+220
+54
+38
+224
+56
+43
+224
+53
+45
+219
+50
+43
+224
+61
+52
+236
+78
+66
+227
+75
+61
+210
+58
+44
+209
+56
+42
+224
+66
+54
+222
+54
+45
+240
+62
+58
+233
+47
+48
+239
+48
+53
+245
+50
+58
+248
+52
+62
+255
+74
+86
+255
+70
+79
+253
+62
+69
+242
+51
+56
+226
+36
+38
+237
+47
+49
+234
+44
+44
+240
+50
+50
+232
+42
+42
+235
+47
+46
+241
+57
+57
+209
+26
+28
+229
+50
+54
+220
+43
+49
+231
+56
+63
+239
+68
+76
+255
+87
+98
+241
+75
+85
+217
+60
+67
+219
+64
+68
+225
+66
+70
+225
+62
+65
+222
+57
+61
+220
+56
+57
+218
+55
+56
+212
+57
+55
+201
+56
+51
+195
+56
+49
+190
+57
+50
+193
+64
+58
+206
+77
+72
+215
+85
+83
+210
+77
+78
+196
+66
+64
+178
+55
+50
+182
+57
+53
+207
+75
+73
+217
+77
+76
+227
+81
+82
+239
+89
+90
+234
+82
+81
+241
+89
+86
+201
+53
+49
+206
+62
+54
+210
+66
+57
+208
+64
+55
+211
+63
+53
+217
+66
+57
+224
+67
+60
+226
+64
+59
+233
+63
+64
+231
+56
+61
+236
+57
+61
+242
+63
+67
+239
+58
+63
+232
+53
+56
+236
+62
+61
+246
+77
+74
+222
+57
+51
+219
+54
+48
+218
+51
+43
+222
+51
+44
+229
+52
+46
+236
+51
+48
+242
+50
+49
+244
+48
+49
+244
+48
+50
+246
+47
+50
+246
+48
+49
+245
+47
+48
+245
+47
+46
+240
+48
+45
+233
+52
+45
+224
+56
+45
+217
+63
+51
+194
+54
+39
+183
+53
+40
+179
+57
+46
+203
+86
+79
+239
+124
+121
+255
+147
+146
+254
+135
+139
+255
+128
+137
+255
+121
+135
+252
+110
+126
+250
+99
+118
+250
+88
+111
+252
+80
+106
+251
+72
+102
+250
+67
+98
+242
+61
+92
+239
+66
+94
+229
+77
+100
+215
+90
+104
+136
+50
+53
+107
+57
+48
+92
+77
+56
+91
+101
+67
+99
+123
+75
+106
+137
+80
+115
+146
+89
+116
+149
+92
+117
+152
+94
+119
+157
+98
+121
+161
+101
+122
+162
+102
+119
+160
+100
+118
+160
+97
+119
+159
+97
+118
+158
+96
+120
+159
+96
+120
+159
+96
+123
+159
+97
+122
+160
+99
+122
+162
+102
+122
+163
+103
+122
+167
+102
+122
+167
+98
+122
+168
+96
+122
+168
+93
+124
+171
+93
+126
+173
+95
+134
+178
+103
+139
+180
+110
+140
+179
+116
+138
+173
+115
+134
+166
+117
+128
+157
+113
+116
+142
+105
+105
+128
+100
+80
+98
+84
+67
+82
+75
+56
+71
+64
+94
+77
+59
+94
+77
+59
+94
+77
+59
+94
+77
+59
+94
+77
+59
+94
+77
+59
+94
+77
+59
+94
+77
+59
+94
+77
+59
+94
+77
+59
+94
+77
+59
+94
+77
+59
+94
+77
+59
+94
+77
+59
+94
+77
+59
+94
+77
+57
+93
+75
+53
+95
+77
+53
+96
+80
+57
+95
+80
+59
+92
+79
+62
+90
+78
+64
+88
+79
+70
+88
+81
+75
+89
+80
+81
+96
+87
+92
+103
+96
+104
+110
+102
+115
+115
+104
+121
+115
+103
+123
+115
+103
+125
+113
+103
+127
+111
+108
+129
+112
+112
+138
+114
+118
+153
+118
+124
+172
+122
+130
+193
+127
+135
+208
+132
+139
+220
+138
+140
+225
+147
+142
+224
+157
+141
+214
+160
+132
+190
+158
+117
+159
+160
+108
+130
+172
+110
+115
+188
+117
+111
+210
+118
+107
+240
+115
+109
+253
+109
+108
+254
+104
+105
+251
+95
+96
+249
+83
+87
+244
+71
+77
+237
+60
+66
+234
+55
+61
+232
+53
+59
+227
+54
+56
+221
+57
+56
+215
+60
+55
+208
+64
+55
+199
+65
+53
+192
+65
+48
+185
+64
+47
+173
+55
+41
+180
+64
+51
+175
+58
+48
+176
+59
+49
+200
+82
+72
+213
+92
+81
+201
+77
+67
+187
+59
+48
+190
+57
+48
+193
+55
+45
+204
+57
+47
+214
+62
+51
+219
+61
+49
+218
+54
+42
+220
+52
+39
+226
+54
+42
+224
+51
+44
+226
+55
+48
+228
+61
+53
+229
+69
+57
+226
+70
+57
+222
+66
+51
+222
+65
+50
+226
+62
+50
+219
+48
+38
+234
+55
+50
+236
+48
+47
+238
+45
+48
+239
+44
+50
+246
+51
+59
+255
+76
+84
+255
+87
+94
+255
+90
+95
+255
+79
+83
+225
+46
+49
+227
+48
+51
+224
+44
+45
+247
+69
+69
+232
+54
+54
+220
+44
+44
+218
+44
+45
+234
+61
+63
+219
+49
+52
+216
+50
+54
+255
+98
+104
+224
+61
+66
+202
+41
+49
+202
+45
+52
+193
+38
+42
+213
+59
+61
+224
+65
+69
+218
+55
+58
+217
+51
+55
+223
+57
+61
+220
+55
+59
+205
+47
+48
+204
+52
+51
+205
+59
+59
+211
+71
+70
+221
+83
+83
+235
+96
+99
+245
+105
+108
+244
+101
+107
+234
+94
+97
+196
+64
+62
+198
+69
+64
+229
+94
+91
+248
+104
+103
+255
+111
+112
+255
+106
+106
+229
+75
+75
+215
+61
+59
+201
+52
+48
+209
+62
+55
+215
+68
+60
+214
+67
+59
+213
+62
+53
+213
+60
+52
+216
+58
+49
+220
+52
+49
+238
+53
+59
+241
+45
+55
+240
+44
+54
+242
+46
+56
+239
+44
+52
+235
+44
+51
+243
+57
+60
+254
+74
+75
+223
+51
+47
+220
+51
+46
+218
+51
+43
+220
+51
+44
+227
+53
+46
+234
+52
+48
+239
+52
+47
+242
+50
+49
+244
+48
+50
+246
+47
+50
+247
+47
+49
+246
+46
+48
+245
+47
+46
+240
+48
+45
+234
+51
+45
+226
+55
+45
+217
+63
+51
+198
+56
+42
+180
+50
+37
+178
+56
+45
+195
+78
+71
+239
+124
+121
+255
+146
+145
+255
+135
+140
+255
+126
+137
+255
+117
+132
+249
+108
+124
+246
+97
+116
+245
+85
+109
+247
+74
+102
+249
+64
+96
+249
+59
+93
+243
+58
+92
+237
+68
+97
+219
+80
+101
+193
+87
+97
+114
+46
+43
+98
+62
+48
+96
+84
+62
+99
+106
+73
+102
+124
+77
+107
+137
+83
+116
+146
+92
+117
+150
+95
+118
+153
+95
+120
+158
+99
+121
+161
+99
+120
+160
+98
+117
+159
+96
+117
+159
+96
+117
+157
+95
+118
+158
+95
+119
+158
+95
+120
+159
+96
+123
+159
+97
+122
+161
+98
+122
+162
+100
+123
+165
+101
+124
+166
+100
+124
+167
+96
+121
+167
+94
+121
+168
+90
+123
+170
+92
+125
+172
+94
+128
+172
+97
+133
+175
+103
+135
+174
+109
+135
+170
+112
+133
+165
+115
+131
+160
+114
+123
+149
+110
+114
+138
+106
+100
+119
+100
+91
+107
+94
+81
+97
+84
+95
+78
+60
+95
+78
+60
+95
+78
+60
+95
+78
+60
+95
+78
+60
+95
+78
+60
+95
+78
+60
+95
+78
+60
+95
+78
+60
+95
+78
+60
+95
+78
+60
+95
+78
+60
+95
+78
+60
+95
+78
+60
+95
+78
+60
+95
+78
+58
+94
+76
+52
+95
+78
+52
+96
+78
+56
+94
+79
+58
+91
+78
+62
+89
+79
+69
+90
+83
+77
+90
+84
+84
+95
+90
+97
+104
+98
+112
+114
+109
+129
+122
+117
+140
+123
+117
+145
+123
+113
+147
+122
+112
+147
+118
+112
+148
+113
+116
+149
+114
+119
+157
+116
+124
+170
+119
+128
+183
+122
+131
+196
+126
+134
+207
+132
+138
+216
+139
+141
+218
+150
+144
+218
+153
+139
+201
+155
+133
+180
+162
+131
+162
+170
+132
+145
+171
+126
+123
+159
+107
+93
+153
+82
+64
+186
+78
+66
+210
+82
+73
+225
+88
+82
+233
+88
+85
+239
+84
+82
+241
+75
+77
+236
+63
+67
+229
+52
+58
+235
+56
+60
+231
+57
+59
+226
+58
+57
+218
+61
+56
+211
+64
+56
+203
+65
+54
+195
+63
+48
+188
+62
+47
+179
+57
+44
+186
+65
+54
+171
+53
+43
+163
+46
+36
+190
+73
+63
+217
+103
+92
+217
+100
+90
+203
+85
+73
+184
+60
+50
+184
+54
+41
+192
+51
+41
+206
+58
+48
+217
+59
+48
+218
+54
+44
+222
+51
+41
+228
+54
+45
+223
+49
+42
+228
+55
+49
+227
+59
+50
+221
+57
+47
+222
+62
+48
+227
+70
+53
+228
+66
+51
+223
+57
+43
+222
+48
+39
+233
+52
+45
+240
+51
+49
+239
+45
+46
+236
+41
+45
+242
+47
+53
+255
+66
+71
+255
+82
+87
+255
+93
+98
+255
+92
+97
+226
+57
+60
+227
+57
+60
+213
+43
+44
+244
+74
+75
+226
+56
+57
+215
+47
+47
+217
+51
+53
+203
+39
+40
+202
+37
+41
+247
+87
+89
+220
+61
+65
+213
+57
+61
+209
+54
+58
+186
+31
+35
+196
+40
+43
+219
+61
+62
+229
+66
+69
+219
+53
+57
+215
+44
+50
+220
+49
+55
+217
+48
+53
+204
+41
+46
+208
+52
+55
+226
+76
+78
+244
+98
+101
+250
+105
+110
+247
+100
+108
+246
+96
+105
+248
+96
+108
+248
+98
+107
+214
+76
+76
+213
+78
+74
+234
+92
+90
+234
+86
+84
+231
+77
+77
+227
+72
+70
+207
+52
+50
+206
+51
+47
+217
+65
+60
+224
+75
+68
+228
+79
+72
+223
+74
+67
+217
+64
+56
+215
+58
+51
+215
+54
+46
+220
+46
+45
+245
+50
+58
+251
+45
+58
+248
+42
+55
+245
+39
+52
+245
+41
+52
+248
+48
+58
+255
+62
+67
+255
+74
+74
+224
+49
+46
+222
+51
+44
+220
+51
+44
+221
+53
+44
+225
+52
+45
+231
+52
+47
+237
+52
+47
+240
+51
+47
+244
+48
+50
+247
+47
+50
+249
+46
+49
+248
+45
+48
+246
+46
+46
+241
+47
+45
+235
+50
+45
+226
+55
+45
+217
+61
+49
+201
+59
+45
+179
+49
+36
+177
+55
+44
+186
+67
+61
+236
+121
+118
+255
+141
+141
+255
+136
+141
+255
+123
+135
+255
+113
+129
+246
+104
+120
+243
+96
+114
+243
+83
+107
+244
+69
+98
+249
+58
+92
+249
+55
+90
+243
+58
+92
+235
+72
+99
+205
+80
+96
+160
+74
+77
+102
+52
+43
+89
+66
+48
+95
+87
+64
+99
+106
+73
+102
+124
+78
+107
+136
+82
+116
+145
+91
+119
+149
+95
+120
+153
+96
+123
+158
+100
+122
+160
+99
+118
+158
+96
+115
+155
+93
+114
+156
+92
+115
+155
+92
+116
+156
+93
+118
+157
+94
+119
+158
+95
+123
+159
+97
+122
+161
+98
+121
+161
+98
+122
+164
+98
+124
+167
+98
+123
+166
+95
+120
+166
+91
+120
+167
+89
+122
+169
+89
+123
+170
+90
+126
+170
+95
+131
+173
+101
+133
+172
+107
+135
+169
+109
+137
+167
+115
+137
+165
+117
+132
+157
+115
+124
+148
+114
+117
+137
+112
+111
+128
+109
+103
+120
+102
+95
+80
+61
+95
+80
+61
+95
+80
+61
+95
+80
+61
+95
+80
+61
+95
+80
+61
+95
+80
+61
+95
+80
+61
+94
+79
+60
+94
+79
+60
+94
+79
+60
+94
+79
+60
+94
+79
+60
+94
+79
+60
+94
+79
+60
+95
+78
+58
+97
+80
+54
+97
+80
+54
+97
+79
+57
+94
+79
+60
+91
+79
+65
+91
+82
+75
+92
+86
+86
+95
+90
+97
+107
+103
+118
+115
+111
+134
+125
+122
+151
+130
+126
+161
+129
+124
+165
+125
+119
+163
+123
+117
+165
+120
+118
+167
+115
+121
+171
+115
+125
+178
+120
+129
+184
+123
+132
+191
+126
+134
+196
+132
+138
+200
+141
+142
+206
+148
+147
+205
+154
+147
+198
+160
+150
+187
+171
+156
+179
+188
+167
+176
+201
+173
+169
+197
+166
+148
+170
+136
+109
+154
+103
+76
+155
+70
+50
+173
+65
+52
+181
+65
+52
+194
+66
+57
+214
+72
+68
+232
+78
+78
+238
+74
+75
+236
+63
+67
+235
+61
+63
+233
+59
+61
+229
+59
+59
+224
+60
+58
+217
+64
+56
+210
+63
+53
+202
+62
+49
+194
+60
+48
+189
+58
+48
+190
+63
+54
+175
+52
+44
+167
+49
+39
+187
+73
+63
+209
+99
+86
+214
+104
+91
+213
+101
+87
+195
+79
+66
+186
+62
+50
+186
+52
+41
+199
+55
+44
+214
+57
+48
+217
+53
+44
+223
+50
+43
+231
+54
+48
+226
+48
+44
+227
+52
+47
+226
+55
+47
+222
+55
+46
+224
+62
+49
+229
+67
+52
+228
+62
+48
+222
+52
+37
+229
+51
+41
+232
+47
+42
+240
+51
+47
+240
+46
+46
+239
+45
+46
+241
+48
+51
+242
+54
+55
+244
+64
+67
+246
+77
+82
+252
+89
+94
+233
+70
+75
+246
+81
+87
+216
+51
+55
+235
+70
+74
+221
+56
+60
+230
+65
+69
+216
+53
+56
+204
+44
+46
+207
+46
+51
+226
+70
+73
+210
+55
+59
+208
+55
+58
+185
+35
+37
+213
+59
+61
+217
+57
+59
+226
+60
+62
+232
+62
+65
+230
+55
+60
+223
+46
+54
+219
+42
+50
+224
+50
+59
+228
+61
+68
+238
+77
+83
+250
+95
+101
+255
+109
+115
+255
+106
+115
+248
+97
+106
+245
+91
+103
+246
+90
+104
+246
+92
+102
+244
+100
+100
+232
+90
+86
+232
+87
+84
+216
+64
+61
+207
+49
+48
+212
+52
+52
+211
+51
+51
+225
+67
+64
+227
+74
+69
+233
+82
+75
+234
+83
+76
+225
+74
+65
+217
+63
+55
+216
+57
+51
+219
+56
+49
+227
+51
+51
+243
+46
+55
+255
+48
+62
+255
+48
+61
+250
+42
+55
+252
+46
+58
+255
+59
+69
+255
+67
+72
+251
+65
+66
+227
+49
+47
+223
+52
+45
+221
+52
+45
+221
+53
+44
+226
+52
+45
+230
+51
+44
+237
+52
+47
+241
+52
+48
+244
+48
+50
+247
+47
+50
+249
+46
+49
+248
+45
+48
+246
+46
+46
+241
+47
+45
+235
+50
+45
+227
+55
+45
+216
+58
+47
+205
+62
+48
+181
+49
+37
+177
+55
+44
+178
+59
+53
+233
+115
+113
+255
+138
+138
+255
+135
+141
+255
+116
+132
+253
+104
+124
+243
+97
+116
+241
+92
+112
+244
+82
+106
+245
+68
+97
+251
+55
+93
+252
+56
+94
+245
+61
+95
+232
+78
+102
+188
+81
+91
+125
+57
+54
+94
+60
+48
+81
+68
+49
+91
+86
+64
+93
+100
+69
+101
+119
+77
+106
+133
+82
+114
+142
+91
+118
+148
+94
+121
+154
+97
+123
+158
+100
+120
+158
+97
+115
+155
+93
+112
+152
+89
+112
+153
+87
+113
+154
+88
+113
+154
+88
+116
+155
+92
+117
+156
+93
+121
+157
+95
+120
+159
+96
+120
+161
+95
+121
+162
+94
+122
+165
+94
+121
+164
+92
+120
+164
+89
+120
+164
+87
+121
+165
+86
+123
+167
+88
+127
+169
+95
+130
+172
+100
+132
+171
+104
+134
+168
+108
+135
+165
+111
+134
+162
+113
+128
+154
+109
+120
+145
+106
+112
+132
+104
+108
+128
+101
+101
+121
+96
+95
+80
+61
+95
+80
+61
+95
+80
+61
+95
+80
+61
+95
+80
+61
+95
+80
+61
+95
+80
+61
+95
+80
+61
+94
+79
+60
+94
+79
+60
+94
+79
+60
+94
+79
+60
+94
+79
+60
+94
+79
+60
+94
+79
+60
+95
+78
+58
+99
+81
+57
+99
+81
+57
+97
+80
+60
+93
+80
+64
+90
+80
+71
+92
+84
+82
+95
+90
+97
+97
+95
+109
+116
+114
+138
+121
+120
+152
+129
+128
+168
+131
+129
+176
+126
+126
+176
+121
+121
+175
+121
+117
+176
+119
+119
+181
+119
+124
+190
+120
+127
+195
+125
+133
+196
+130
+136
+196
+133
+138
+193
+141
+143
+191
+151
+150
+190
+160
+157
+188
+172
+167
+187
+182
+172
+180
+190
+179
+175
+200
+184
+169
+208
+190
+166
+214
+193
+162
+209
+187
+150
+208
+172
+136
+175
+111
+84
+174
+92
+71
+164
+71
+53
+168
+62
+48
+194
+71
+63
+224
+87
+81
+239
+87
+86
+241
+78
+79
+233
+64
+67
+234
+61
+63
+230
+60
+61
+226
+61
+59
+223
+61
+58
+215
+61
+53
+207
+59
+49
+201
+57
+48
+193
+56
+48
+193
+60
+53
+185
+58
+51
+184
+61
+53
+193
+79
+69
+199
+88
+77
+199
+93
+79
+209
+101
+88
+211
+99
+85
+194
+76
+62
+188
+58
+45
+197
+56
+46
+210
+57
+49
+215
+52
+45
+223
+50
+44
+231
+54
+48
+230
+52
+48
+225
+50
+45
+224
+53
+46
+227
+60
+51
+231
+67
+55
+230
+67
+52
+226
+58
+45
+223
+51
+37
+233
+52
+43
+229
+45
+37
+240
+48
+45
+240
+48
+45
+241
+52
+50
+242
+54
+53
+232
+46
+47
+226
+50
+52
+231
+66
+70
+247
+88
+93
+246
+87
+92
+255
+111
+117
+229
+68
+74
+235
+72
+77
+224
+60
+67
+254
+91
+96
+255
+109
+115
+220
+59
+64
+255
+123
+128
+255
+108
+112
+234
+81
+84
+211
+61
+63
+198
+48
+50
+215
+59
+62
+241
+72
+75
+235
+59
+62
+237
+56
+63
+246
+62
+70
+240
+56
+66
+230
+46
+56
+241
+64
+74
+255
+95
+103
+255
+110
+119
+255
+107
+114
+254
+100
+110
+245
+94
+103
+247
+95
+107
+253
+99
+111
+253
+95
+110
+246
+90
+101
+241
+93
+93
+227
+80
+73
+226
+74
+71
+213
+55
+52
+210
+47
+48
+217
+53
+52
+210
+48
+46
+216
+57
+53
+223
+68
+63
+227
+74
+68
+226
+73
+65
+217
+64
+56
+211
+54
+47
+214
+52
+47
+220
+55
+49
+232
+54
+54
+234
+39
+47
+252
+48
+60
+254
+50
+61
+247
+43
+54
+249
+48
+58
+255
+62
+69
+253
+63
+65
+236
+52
+52
+226
+51
+46
+224
+53
+46
+222
+54
+45
+223
+52
+44
+225
+51
+42
+232
+51
+44
+239
+52
+47
+244
+52
+49
+246
+48
+49
+247
+47
+50
+249
+46
+49
+248
+45
+48
+248
+46
+46
+242
+47
+45
+235
+50
+45
+227
+55
+45
+215
+57
+46
+209
+63
+50
+182
+48
+37
+178
+54
+44
+176
+54
+49
+232
+112
+111
+255
+135
+136
+255
+134
+142
+255
+110
+128
+252
+99
+120
+241
+94
+113
+242
+90
+111
+245
+81
+106
+246
+67
+97
+253
+57
+95
+253
+59
+96
+242
+67
+98
+225
+84
+103
+174
+82
+87
+98
+48
+39
+89
+68
+51
+74
+69
+47
+85
+83
+60
+88
+93
+63
+99
+115
+76
+105
+129
+81
+113
+139
+91
+118
+146
+95
+122
+152
+98
+124
+157
+100
+120
+156
+95
+114
+153
+90
+110
+151
+85
+110
+151
+85
+110
+151
+85
+111
+152
+86
+114
+153
+90
+116
+155
+92
+119
+155
+93
+119
+158
+93
+119
+158
+91
+120
+161
+91
+121
+163
+91
+119
+163
+88
+118
+162
+87
+118
+162
+85
+119
+163
+84
+121
+165
+88
+122
+164
+90
+126
+166
+95
+129
+166
+99
+127
+161
+100
+126
+156
+102
+123
+151
+102
+114
+140
+93
+105
+130
+88
+95
+117
+81
+92
+113
+82
+86
+107
+76
+92
+76
+60
+94
+78
+62
+96
+80
+64
+96
+80
+64
+95
+79
+63
+95
+79
+63
+95
+79
+63
+97
+81
+65
+98
+82
+66
+95
+79
+63
+93
+77
+61
+93
+77
+61
+97
+81
+65
+99
+83
+67
+98
+82
+66
+96
+81
+62
+100
+83
+63
+97
+80
+62
+93
+80
+64
+94
+81
+73
+91
+81
+80
+90
+83
+90
+101
+97
+112
+115
+113
+137
+121
+120
+154
+122
+124
+165
+126
+128
+177
+128
+129
+185
+125
+127
+186
+120
+122
+183
+114
+115
+180
+108
+111
+182
+116
+119
+198
+118
+124
+202
+128
+131
+202
+139
+141
+198
+150
+151
+195
+164
+164
+190
+178
+176
+187
+188
+185
+180
+203
+197
+181
+211
+204
+176
+217
+207
+172
+219
+207
+165
+220
+207
+163
+221
+209
+161
+217
+203
+156
+217
+194
+152
+209
+168
+136
+184
+128
+103
+161
+93
+70
+203
+122
+103
+216
+116
+101
+189
+72
+63
+216
+81
+78
+247
+99
+99
+233
+75
+76
+229
+63
+65
+225
+57
+57
+227
+59
+58
+226
+58
+57
+219
+55
+53
+216
+54
+49
+214
+59
+54
+203
+56
+49
+192
+53
+46
+199
+66
+59
+187
+60
+51
+191
+73
+63
+198
+88
+75
+185
+79
+65
+206
+100
+86
+209
+99
+84
+204
+88
+73
+197
+71
+57
+196
+58
+47
+205
+54
+45
+216
+55
+47
+225
+54
+47
+227
+52
+47
+223
+48
+45
+223
+50
+44
+224
+55
+48
+228
+61
+52
+224
+60
+48
+221
+55
+41
+223
+53
+40
+229
+55
+44
+228
+47
+36
+234
+47
+38
+236
+47
+41
+238
+49
+45
+238
+50
+48
+235
+52
+48
+232
+53
+49
+226
+54
+52
+215
+55
+57
+230
+74
+78
+245
+89
+93
+237
+78
+83
+215
+56
+61
+215
+54
+60
+249
+88
+96
+255
+126
+132
+255
+120
+128
+255
+107
+113
+255
+99
+107
+255
+102
+109
+255
+101
+107
+245
+92
+97
+242
+89
+92
+252
+91
+96
+255
+87
+90
+255
+70
+75
+249
+58
+66
+248
+57
+65
+243
+51
+62
+235
+45
+57
+234
+50
+62
+238
+62
+72
+252
+85
+95
+255
+97
+105
+255
+104
+114
+254
+103
+112
+251
+100
+109
+254
+100
+110
+255
+97
+111
+251
+94
+103
+237
+83
+83
+223
+70
+64
+214
+56
+53
+214
+52
+49
+215
+49
+49
+215
+47
+46
+216
+51
+49
+219
+57
+52
+225
+68
+61
+220
+66
+58
+217
+63
+55
+214
+60
+52
+215
+57
+48
+219
+56
+49
+224
+57
+51
+230
+54
+54
+240
+55
+60
+243
+52
+59
+243
+52
+59
+246
+52
+60
+245
+54
+59
+242
+53
+57
+235
+51
+51
+227
+49
+47
+222
+51
+44
+222
+53
+46
+223
+55
+46
+224
+53
+43
+228
+51
+43
+233
+50
+44
+239
+50
+44
+245
+50
+48
+247
+49
+50
+248
+48
+51
+250
+47
+50
+249
+46
+49
+249
+47
+47
+243
+48
+46
+236
+51
+46
+229
+55
+46
+224
+63
+53
+204
+56
+44
+191
+54
+44
+175
+47
+38
+184
+59
+55
+210
+88
+87
+255
+152
+154
+254
+123
+131
+255
+109
+128
+255
+102
+124
+246
+93
+114
+239
+81
+104
+241
+72
+101
+249
+68
+101
+253
+61
+100
+245
+59
+96
+242
+79
+108
+209
+84
+100
+137
+61
+63
+80
+44
+32
+69
+58
+38
+68
+70
+46
+77
+77
+53
+90
+94
+67
+91
+105
+69
+99
+120
+77
+113
+136
+90
+120
+146
+98
+120
+150
+96
+116
+149
+92
+114
+150
+89
+113
+152
+89
+108
+149
+83
+109
+150
+82
+110
+151
+83
+111
+152
+84
+114
+153
+88
+116
+155
+90
+117
+156
+93
+117
+156
+91
+116
+155
+88
+116
+157
+87
+118
+160
+88
+119
+161
+87
+118
+162
+87
+118
+162
+85
+117
+161
+84
+116
+160
+83
+123
+165
+91
+123
+163
+93
+122
+158
+94
+117
+151
+91
+109
+139
+85
+98
+126
+77
+88
+114
+67
+83
+106
+62
+63
+85
+46
+63
+85
+47
+62
+84
+46
+91
+75
+59
+94
+78
+62
+96
+80
+64
+96
+80
+64
+96
+80
+64
+95
+79
+63
+96
+80
+64
+97
+81
+65
+98
+82
+66
+96
+80
+64
+95
+79
+63
+96
+80
+64
+98
+82
+66
+99
+83
+67
+98
+82
+66
+96
+80
+64
+102
+86
+71
+95
+81
+70
+92
+79
+71
+94
+84
+83
+97
+90
+97
+100
+96
+111
+109
+107
+131
+118
+119
+150
+119
+121
+162
+123
+125
+174
+125
+127
+184
+120
+124
+185
+113
+117
+181
+107
+112
+180
+108
+111
+182
+110
+113
+190
+117
+119
+206
+124
+126
+211
+137
+137
+209
+152
+152
+206
+168
+167
+199
+184
+182
+193
+201
+197
+186
+211
+206
+177
+219
+214
+172
+226
+219
+167
+231
+222
+167
+230
+221
+164
+228
+219
+164
+226
+216
+163
+219
+209
+158
+212
+199
+154
+212
+188
+154
+189
+155
+128
+170
+124
+100
+199
+138
+119
+202
+125
+109
+182
+86
+74
+211
+96
+91
+246
+114
+112
+236
+90
+91
+231
+75
+76
+226
+63
+64
+228
+62
+62
+233
+63
+64
+229
+59
+59
+224
+54
+54
+219
+54
+52
+214
+61
+56
+201
+56
+51
+202
+63
+56
+185
+54
+46
+184
+62
+51
+189
+75
+64
+182
+72
+59
+200
+93
+77
+221
+111
+96
+212
+96
+81
+198
+72
+58
+189
+53
+41
+196
+48
+38
+212
+54
+45
+220
+53
+45
+219
+48
+41
+226
+53
+49
+229
+57
+53
+228
+61
+55
+224
+60
+51
+220
+56
+46
+219
+53
+41
+223
+52
+42
+227
+53
+42
+236
+55
+46
+237
+53
+43
+237
+50
+43
+235
+48
+43
+231
+48
+44
+227
+50
+44
+225
+52
+46
+221
+53
+50
+214
+56
+55
+216
+62
+64
+228
+74
+76
+243
+87
+91
+250
+94
+98
+252
+92
+100
+254
+93
+101
+255
+97
+105
+240
+79
+87
+235
+74
+82
+238
+78
+86
+252
+92
+100
+255
+104
+111
+255
+101
+107
+244
+89
+95
+242
+79
+84
+236
+53
+58
+239
+45
+53
+241
+44
+54
+244
+47
+57
+238
+40
+53
+228
+34
+45
+227
+41
+54
+234
+57
+67
+251
+81
+90
+253
+92
+100
+255
+100
+108
+255
+101
+109
+255
+102
+110
+255
+101
+109
+252
+92
+104
+242
+82
+90
+229
+69
+69
+222
+60
+55
+219
+54
+52
+222
+54
+51
+223
+53
+53
+220
+51
+48
+218
+50
+47
+219
+54
+50
+224
+62
+57
+219
+62
+55
+216
+59
+52
+215
+58
+51
+219
+56
+49
+223
+56
+50
+229
+57
+53
+231
+58
+54
+233
+57
+59
+234
+55
+58
+235
+55
+58
+238
+55
+57
+238
+55
+57
+236
+54
+53
+229
+51
+49
+223
+50
+44
+220
+51
+44
+221
+54
+45
+223
+55
+44
+226
+54
+44
+229
+50
+43
+234
+49
+44
+242
+49
+44
+245
+50
+48
+247
+49
+50
+247
+48
+51
+250
+47
+50
+249
+46
+49
+247
+47
+47
+243
+48
+46
+236
+51
+46
+229
+55
+46
+223
+60
+51
+212
+61
+50
+194
+56
+46
+182
+49
+42
+183
+55
+52
+216
+90
+91
+255
+144
+147
+251
+115
+125
+254
+103
+122
+254
+94
+118
+247
+87
+111
+244
+80
+105
+246
+71
+102
+246
+65
+98
+250
+61
+99
+241
+66
+99
+227
+81
+104
+183
+76
+86
+119
+60
+56
+76
+50
+35
+62
+57
+35
+61
+65
+40
+71
+71
+47
+80
+83
+56
+88
+99
+65
+96
+114
+74
+110
+131
+88
+117
+143
+95
+118
+147
+93
+116
+147
+88
+113
+147
+86
+112
+148
+84
+107
+146
+79
+107
+148
+80
+108
+149
+81
+109
+150
+82
+112
+151
+86
+114
+153
+88
+115
+154
+91
+115
+154
+89
+116
+155
+88
+117
+157
+87
+117
+159
+87
+117
+159
+87
+116
+158
+84
+114
+158
+81
+113
+157
+82
+112
+156
+81
+110
+152
+80
+108
+148
+78
+104
+140
+76
+98
+129
+70
+88
+117
+63
+78
+105
+54
+70
+93
+47
+64
+87
+43
+64
+87
+45
+64
+87
+45
+64
+87
+45
+89
+76
+60
+91
+78
+62
+94
+81
+65
+94
+81
+65
+94
+81
+65
+94
+81
+65
+95
+82
+66
+96
+83
+67
+97
+84
+68
+96
+83
+67
+95
+82
+66
+96
+83
+67
+97
+84
+68
+97
+84
+68
+96
+83
+67
+94
+80
+67
+98
+85
+77
+92
+81
+77
+91
+81
+82
+99
+89
+98
+107
+100
+116
+113
+109
+132
+118
+117
+149
+121
+123
+164
+121
+123
+172
+121
+126
+182
+120
+124
+187
+110
+115
+181
+101
+105
+176
+96
+103
+175
+106
+110
+184
+114
+117
+196
+125
+125
+213
+135
+133
+217
+151
+148
+217
+169
+167
+216
+187
+185
+209
+203
+201
+202
+220
+215
+193
+229
+224
+184
+233
+228
+173
+237
+231
+169
+240
+232
+167
+237
+229
+166
+231
+225
+167
+226
+219
+165
+215
+207
+160
+203
+196
+154
+185
+174
+144
+170
+154
+129
+156
+130
+107
+171
+130
+112
+168
+110
+96
+158
+81
+71
+187
+93
+85
+222
+109
+105
+247
+117
+117
+238
+96
+95
+227
+74
+76
+226
+66
+68
+234
+65
+68
+235
+62
+64
+231
+57
+58
+224
+54
+54
+223
+61
+58
+212
+59
+54
+212
+65
+58
+194
+55
+48
+183
+55
+44
+183
+62
+51
+174
+61
+47
+182
+70
+56
+219
+106
+92
+223
+105
+91
+217
+91
+77
+202
+66
+54
+197
+50
+40
+209
+52
+43
+217
+54
+45
+217
+50
+44
+222
+53
+50
+233
+65
+62
+236
+71
+67
+224
+61
+54
+213
+50
+41
+213
+49
+39
+218
+50
+39
+222
+48
+37
+230
+52
+42
+232
+49
+41
+231
+46
+41
+230
+47
+41
+227
+50
+44
+226
+55
+47
+225
+61
+52
+224
+66
+57
+198
+45
+40
+202
+52
+51
+220
+68
+67
+240
+86
+88
+250
+94
+98
+247
+90
+97
+243
+83
+91
+241
+81
+91
+231
+69
+80
+232
+70
+81
+237
+77
+87
+251
+91
+101
+255
+107
+116
+255
+109
+115
+242
+87
+93
+225
+60
+66
+232
+47
+53
+242
+45
+52
+250
+50
+60
+251
+51
+62
+244
+44
+57
+236
+40
+52
+243
+55
+69
+255
+76
+87
+245
+74
+83
+244
+80
+87
+247
+87
+95
+252
+95
+102
+255
+100
+107
+255
+97
+105
+246
+82
+89
+232
+67
+73
+222
+57
+55
+222
+55
+49
+227
+55
+53
+233
+60
+56
+235
+59
+59
+230
+57
+53
+225
+53
+49
+221
+54
+48
+221
+58
+51
+217
+59
+50
+215
+57
+48
+215
+57
+48
+220
+55
+49
+225
+56
+51
+231
+58
+54
+233
+60
+56
+227
+57
+57
+227
+57
+57
+229
+57
+55
+231
+57
+56
+232
+56
+56
+230
+55
+52
+225
+52
+48
+219
+50
+43
+218
+54
+45
+219
+55
+45
+222
+56
+44
+226
+54
+44
+231
+50
+41
+235
+48
+41
+243
+48
+44
+247
+49
+48
+245
+49
+50
+245
+49
+51
+248
+48
+50
+247
+47
+49
+247
+47
+47
+242
+48
+46
+238
+51
+46
+231
+54
+46
+221
+57
+48
+220
+68
+57
+199
+56
+48
+187
+52
+46
+181
+47
+46
+228
+95
+98
+255
+131
+136
+248
+108
+119
+252
+99
+120
+251
+88
+115
+248
+81
+109
+251
+78
+108
+250
+69
+102
+243
+59
+93
+239
+61
+95
+233
+74
+102
+210
+85
+103
+155
+68
+74
+107
+60
+52
+79
+62
+44
+62
+60
+39
+59
+63
+40
+70
+68
+47
+72
+72
+48
+81
+92
+60
+89
+107
+69
+103
+124
+81
+114
+137
+91
+116
+143
+90
+113
+144
+85
+109
+143
+82
+107
+143
+79
+105
+144
+77
+105
+145
+75
+105
+146
+76
+107
+148
+80
+109
+150
+84
+110
+151
+85
+112
+151
+88
+113
+152
+87
+117
+156
+89
+117
+157
+87
+116
+156
+85
+114
+156
+84
+112
+154
+82
+109
+151
+77
+107
+149
+77
+106
+148
+76
+101
+141
+71
+97
+136
+69
+91
+127
+65
+85
+116
+59
+76
+105
+51
+69
+96
+45
+65
+88
+42
+62
+85
+39
+67
+93
+48
+68
+94
+49
+69
+95
+50
+87
+74
+58
+90
+77
+61
+92
+79
+63
+94
+81
+65
+93
+80
+64
+94
+81
+65
+95
+82
+66
+97
+84
+68
+96
+83
+67
+96
+83
+67
+96
+83
+67
+97
+84
+68
+97
+84
+68
+96
+83
+67
+95
+82
+66
+92
+80
+68
+90
+79
+77
+90
+81
+86
+98
+88
+99
+106
+99
+115
+113
+109
+134
+118
+117
+149
+120
+122
+163
+122
+124
+173
+119
+124
+180
+115
+121
+183
+109
+114
+180
+98
+105
+175
+93
+100
+172
+97
+103
+177
+108
+114
+190
+120
+123
+202
+137
+138
+221
+149
+146
+225
+164
+162
+225
+182
+181
+225
+199
+196
+217
+213
+209
+208
+225
+220
+198
+231
+227
+189
+235
+229
+179
+238
+233
+175
+238
+232
+174
+233
+226
+171
+227
+219
+170
+218
+211
+167
+203
+195
+158
+188
+182
+150
+166
+164
+139
+157
+152
+132
+150
+134
+118
+155
+127
+113
+155
+113
+99
+156
+98
+87
+181
+104
+96
+208
+113
+109
+251
+139
+137
+243
+118
+116
+232
+92
+93
+229
+76
+78
+229
+69
+71
+234
+65
+68
+234
+61
+63
+232
+60
+60
+223
+58
+56
+219
+60
+56
+222
+69
+63
+211
+67
+59
+195
+58
+48
+186
+58
+47
+176
+54
+41
+167
+49
+35
+191
+73
+59
+219
+97
+82
+234
+107
+92
+219
+83
+69
+201
+58
+44
+204
+52
+39
+212
+54
+43
+215
+52
+45
+217
+52
+50
+241
+77
+75
+254
+90
+88
+237
+75
+70
+217
+56
+48
+214
+51
+42
+219
+52
+43
+222
+50
+40
+223
+46
+38
+225
+44
+37
+225
+44
+37
+222
+45
+37
+220
+49
+41
+218
+54
+44
+217
+59
+48
+215
+63
+52
+194
+47
+39
+196
+52
+44
+206
+58
+54
+217
+67
+66
+223
+70
+72
+224
+69
+73
+228
+71
+78
+234
+77
+86
+241
+81
+93
+246
+86
+98
+247
+87
+97
+248
+91
+100
+255
+102
+111
+255
+107
+115
+241
+86
+94
+219
+56
+61
+233
+50
+55
+240
+47
+52
+241
+46
+54
+240
+43
+52
+235
+37
+50
+235
+41
+52
+249
+62
+73
+255
+83
+95
+237
+63
+73
+232
+65
+73
+234
+71
+76
+242
+81
+86
+255
+90
+96
+255
+88
+93
+244
+71
+77
+227
+54
+56
+225
+53
+51
+228
+55
+51
+234
+59
+56
+242
+64
+62
+244
+64
+63
+239
+61
+59
+230
+57
+53
+224
+55
+50
+221
+56
+50
+218
+57
+49
+217
+56
+48
+217
+56
+48
+220
+55
+49
+227
+55
+51
+232
+57
+54
+233
+58
+55
+226
+58
+55
+224
+59
+57
+227
+58
+55
+230
+58
+56
+231
+58
+54
+229
+56
+52
+224
+53
+46
+218
+51
+43
+218
+54
+44
+219
+55
+45
+222
+56
+44
+226
+54
+44
+231
+50
+41
+235
+48
+41
+242
+47
+43
+246
+48
+47
+244
+50
+50
+244
+50
+51
+247
+49
+50
+246
+48
+49
+246
+48
+47
+242
+48
+46
+238
+51
+46
+231
+54
+46
+220
+56
+47
+224
+70
+60
+201
+57
+49
+190
+51
+46
+182
+44
+44
+238
+102
+106
+255
+121
+128
+248
+103
+116
+253
+100
+121
+250
+86
+113
+251
+76
+107
+255
+72
+106
+252
+64
+99
+239
+55
+89
+232
+63
+94
+224
+82
+104
+195
+89
+101
+135
+67
+66
+101
+67
+55
+90
+79
+59
+72
+70
+49
+65
+67
+45
+76
+71
+51
+70
+68
+45
+76
+85
+54
+83
+99
+62
+98
+116
+76
+108
+131
+85
+112
+139
+88
+110
+141
+82
+107
+141
+80
+105
+142
+75
+103
+143
+73
+104
+144
+74
+104
+145
+75
+106
+147
+77
+107
+148
+80
+109
+150
+84
+111
+150
+87
+112
+151
+86
+116
+155
+88
+115
+155
+85
+113
+153
+83
+111
+151
+80
+106
+147
+77
+103
+144
+74
+101
+142
+72
+100
+141
+71
+96
+135
+68
+93
+129
+65
+87
+121
+61
+82
+113
+56
+77
+105
+54
+76
+102
+54
+78
+101
+55
+79
+102
+56
+77
+103
+56
+78
+104
+56
+79
+105
+58
+85
+72
+56
+87
+74
+58
+91
+78
+62
+92
+79
+63
+93
+80
+64
+93
+80
+64
+95
+82
+66
+97
+84
+68
+95
+82
+66
+96
+83
+67
+97
+84
+68
+97
+84
+68
+96
+83
+67
+95
+82
+66
+95
+82
+66
+94
+81
+73
+86
+77
+82
+95
+88
+104
+110
+102
+123
+116
+112
+137
+120
+116
+151
+120
+119
+161
+120
+122
+171
+121
+123
+180
+115
+121
+183
+106
+114
+179
+96
+103
+173
+91
+99
+171
+95
+103
+176
+106
+114
+187
+118
+124
+198
+128
+132
+206
+147
+149
+223
+158
+159
+224
+173
+174
+228
+187
+189
+228
+203
+201
+225
+212
+211
+217
+221
+218
+209
+225
+223
+202
+229
+224
+194
+230
+226
+191
+228
+222
+188
+224
+215
+182
+218
+208
+181
+206
+198
+175
+190
+182
+163
+174
+167
+151
+155
+153
+140
+143
+141
+128
+140
+132
+121
+141
+123
+113
+147
+117
+107
+157
+114
+105
+169
+109
+101
+188
+111
+105
+230
+137
+132
+237
+129
+126
+240
+116
+114
+240
+102
+100
+238
+88
+89
+237
+79
+78
+235
+69
+69
+233
+65
+64
+227
+58
+55
+224
+59
+55
+228
+66
+61
+222
+69
+63
+204
+60
+51
+198
+61
+51
+196
+66
+53
+175
+49
+35
+174
+48
+34
+199
+73
+59
+220
+88
+75
+214
+78
+64
+204
+61
+47
+206
+56
+42
+208
+54
+42
+209
+51
+42
+214
+52
+50
+245
+85
+85
+255
+107
+104
+250
+93
+88
+227
+68
+62
+220
+59
+51
+223
+59
+50
+227
+56
+48
+226
+52
+45
+227
+50
+44
+226
+49
+43
+221
+48
+41
+212
+48
+39
+205
+47
+36
+198
+47
+36
+194
+48
+35
+197
+57
+44
+192
+52
+39
+193
+51
+41
+203
+58
+53
+215
+67
+65
+219
+69
+71
+219
+66
+71
+218
+64
+72
+225
+69
+80
+236
+80
+91
+242
+86
+97
+242
+86
+97
+249
+93
+104
+255
+101
+109
+241
+87
+95
+222
+63
+68
+233
+59
+60
+237
+53
+55
+237
+51
+56
+239
+50
+56
+242
+50
+61
+247
+57
+67
+255
+72
+83
+255
+86
+95
+229
+53
+63
+222
+51
+59
+223
+54
+59
+234
+65
+68
+249
+74
+79
+253
+72
+77
+244
+59
+65
+233
+49
+51
+232
+53
+49
+235
+57
+53
+239
+60
+56
+242
+60
+57
+243
+59
+57
+240
+58
+55
+233
+55
+51
+226
+55
+48
+223
+59
+50
+220
+59
+49
+219
+58
+48
+220
+57
+48
+223
+56
+50
+228
+55
+51
+232
+54
+52
+233
+55
+53
+230
+58
+56
+228
+59
+56
+230
+58
+56
+232
+58
+57
+232
+59
+55
+230
+57
+53
+225
+54
+47
+220
+51
+44
+219
+55
+45
+220
+56
+46
+223
+57
+45
+225
+55
+42
+229
+51
+41
+233
+49
+41
+241
+48
+41
+244
+49
+45
+243
+51
+50
+241
+51
+51
+244
+50
+50
+244
+48
+49
+244
+49
+47
+242
+48
+46
+238
+51
+46
+231
+54
+46
+222
+55
+47
+224
+67
+58
+202
+55
+48
+192
+49
+45
+192
+49
+51
+247
+106
+112
+255
+113
+122
+249
+103
+116
+248
+95
+116
+246
+82
+109
+252
+68
+102
+255
+63
+100
+255
+59
+99
+242
+58
+94
+228
+71
+100
+216
+91
+109
+171
+86
+91
+119
+69
+62
+100
+74
+61
+97
+89
+70
+84
+79
+59
+75
+73
+52
+80
+73
+54
+71
+69
+46
+71
+80
+51
+76
+92
+56
+90
+108
+70
+102
+124
+78
+109
+133
+83
+109
+138
+82
+108
+140
+77
+104
+141
+74
+102
+142
+72
+103
+143
+72
+103
+145
+73
+105
+146
+76
+106
+147
+79
+108
+149
+83
+110
+149
+86
+111
+150
+85
+116
+153
+86
+115
+152
+85
+110
+149
+82
+106
+146
+76
+102
+143
+75
+99
+140
+72
+97
+138
+70
+95
+136
+70
+90
+129
+66
+88
+124
+63
+83
+116
+59
+80
+110
+56
+79
+107
+58
+82
+108
+61
+87
+110
+64
+90
+113
+67
+85
+111
+63
+85
+112
+61
+85
+111
+63
+82
+69
+53
+85
+72
+56
+88
+75
+59
+90
+77
+61
+91
+78
+62
+92
+79
+63
+94
+81
+65
+96
+83
+67
+96
+83
+67
+97
+84
+68
+97
+84
+68
+97
+84
+68
+96
+83
+67
+96
+83
+67
+98
+85
+69
+97
+86
+80
+94
+86
+99
+106
+101
+124
+121
+117
+144
+125
+121
+154
+122
+121
+161
+120
+121
+169
+118
+121
+176
+115
+119
+180
+106
+114
+179
+99
+106
+176
+91
+99
+171
+93
+101
+174
+104
+112
+185
+118
+126
+199
+129
+135
+209
+136
+141
+209
+153
+157
+220
+163
+166
+221
+175
+179
+226
+187
+191
+228
+198
+199
+227
+207
+206
+224
+212
+211
+219
+215
+213
+214
+217
+214
+209
+217
+213
+204
+215
+208
+198
+210
+201
+192
+204
+195
+190
+197
+186
+184
+180
+168
+168
+163
+155
+153
+141
+137
+134
+124
+121
+116
+124
+116
+113
+120
+107
+101
+130
+107
+101
+143
+110
+103
+144
+97
+91
+157
+96
+91
+192
+115
+109
+215
+122
+117
+237
+128
+123
+249
+126
+121
+253
+115
+112
+250
+100
+99
+243
+85
+84
+237
+73
+71
+237
+68
+63
+234
+62
+58
+225
+60
+54
+224
+65
+59
+209
+58
+49
+211
+67
+58
+221
+84
+74
+194
+62
+50
+184
+54
+41
+189
+57
+44
+194
+61
+46
+200
+63
+47
+207
+66
+49
+215
+67
+53
+214
+64
+49
+209
+55
+45
+208
+50
+47
+234
+76
+77
+250
+95
+93
+242
+87
+83
+223
+68
+63
+217
+58
+52
+219
+56
+49
+224
+55
+48
+230
+57
+51
+231
+57
+50
+231
+57
+50
+226
+58
+49
+218
+57
+47
+209
+57
+44
+202
+56
+43
+196
+56
+41
+176
+40
+24
+184
+51
+34
+200
+64
+50
+211
+73
+62
+210
+68
+64
+203
+59
+58
+204
+55
+59
+207
+58
+64
+211
+57
+67
+227
+73
+83
+237
+86
+95
+240
+89
+98
+244
+93
+102
+246
+95
+104
+232
+83
+89
+218
+63
+67
+229
+64
+62
+236
+63
+59
+243
+64
+67
+253
+70
+74
+255
+76
+84
+255
+81
+89
+255
+84
+93
+255
+85
+94
+226
+51
+58
+221
+46
+53
+221
+46
+51
+231
+55
+58
+245
+60
+65
+249
+58
+63
+248
+52
+56
+244
+48
+50
+237
+52
+50
+239
+57
+53
+240
+56
+54
+237
+52
+50
+235
+50
+48
+234
+50
+48
+231
+52
+48
+225
+52
+46
+227
+60
+52
+224
+61
+52
+223
+60
+51
+222
+59
+50
+225
+56
+51
+228
+55
+51
+232
+52
+51
+232
+52
+51
+232
+56
+56
+231
+57
+56
+232
+56
+56
+235
+57
+57
+235
+57
+55
+233
+55
+53
+226
+53
+47
+222
+51
+44
+219
+55
+45
+220
+56
+44
+221
+58
+43
+223
+55
+42
+227
+50
+40
+231
+48
+40
+239
+48
+40
+242
+49
+44
+241
+52
+50
+240
+52
+51
+243
+51
+50
+243
+49
+49
+243
+49
+47
+241
+49
+46
+236
+51
+46
+231
+54
+46
+224
+57
+49
+217
+60
+51
+204
+55
+49
+193
+48
+45
+209
+64
+67
+255
+110
+117
+253
+107
+117
+247
+99
+113
+237
+84
+105
+241
+74
+102
+250
+62
+97
+255
+55
+94
+255
+55
+98
+248
+64
+100
+227
+79
+105
+200
+92
+105
+139
+71
+70
+106
+70
+58
+93
+76
+60
+93
+86
+67
+88
+81
+62
+81
+74
+55
+79
+71
+52
+73
+68
+46
+68
+74
+46
+71
+85
+50
+83
+99
+62
+94
+115
+72
+103
+127
+77
+106
+135
+79
+106
+138
+75
+103
+140
+71
+103
+140
+70
+102
+142
+71
+102
+144
+72
+103
+144
+74
+105
+146
+78
+107
+148
+82
+109
+148
+85
+109
+148
+85
+113
+149
+85
+111
+148
+81
+106
+145
+78
+103
+142
+75
+99
+140
+72
+96
+137
+69
+95
+136
+70
+94
+134
+71
+92
+130
+69
+91
+126
+68
+87
+120
+65
+86
+114
+63
+85
+111
+64
+89
+112
+66
+93
+114
+71
+94
+117
+71
+90
+114
+66
+88
+115
+64
+88
+115
+64
+78
+66
+50
+81
+69
+53
+85
+73
+57
+87
+75
+59
+88
+76
+60
+90
+78
+62
+92
+80
+64
+94
+82
+66
+97
+85
+69
+98
+86
+70
+98
+86
+70
+97
+85
+69
+95
+83
+67
+97
+85
+69
+102
+90
+74
+104
+93
+89
+110
+103
+119
+117
+112
+142
+124
+120
+153
+123
+121
+160
+119
+120
+166
+118
+119
+173
+112
+117
+175
+106
+111
+175
+97
+104
+172
+94
+102
+174
+95
+103
+176
+101
+109
+182
+112
+120
+192
+125
+133
+205
+137
+144
+216
+143
+151
+214
+153
+161
+210
+161
+168
+210
+170
+178
+217
+180
+186
+222
+186
+191
+223
+192
+193
+224
+195
+195
+223
+199
+197
+221
+198
+194
+217
+197
+192
+212
+193
+186
+204
+188
+179
+196
+187
+176
+193
+181
+168
+186
+166
+153
+170
+150
+139
+153
+139
+132
+139
+117
+111
+113
+119
+110
+111
+115
+101
+101
+122
+102
+101
+137
+109
+106
+133
+94
+89
+150
+99
+95
+155
+90
+84
+183
+103
+96
+214
+117
+110
+237
+124
+118
+252
+125
+119
+255
+120
+115
+254
+106
+102
+249
+92
+87
+252
+83
+78
+245
+72
+66
+230
+61
+54
+231
+68
+61
+216
+59
+52
+219
+71
+61
+234
+92
+82
+197
+59
+48
+196
+60
+48
+189
+55
+43
+190
+54
+40
+199
+62
+46
+209
+68
+51
+212
+66
+51
+212
+65
+49
+215
+65
+51
+210
+56
+54
+216
+62
+62
+221
+67
+67
+220
+66
+64
+214
+61
+55
+213
+56
+49
+216
+55
+47
+222
+55
+47
+229
+58
+51
+230
+57
+51
+229
+58
+51
+226
+59
+51
+219
+62
+53
+213
+65
+53
+209
+69
+56
+204
+71
+54
+174
+45
+24
+188
+59
+37
+205
+74
+56
+209
+76
+61
+198
+61
+53
+187
+48
+43
+192
+48
+48
+202
+57
+62
+215
+65
+74
+226
+76
+85
+236
+86
+97
+240
+90
+101
+239
+92
+100
+236
+89
+97
+223
+76
+82
+212
+62
+64
+209
+52
+47
+218
+53
+47
+227
+57
+57
+237
+63
+64
+245
+66
+72
+247
+68
+74
+244
+64
+73
+239
+62
+70
+228
+51
+59
+225
+48
+54
+230
+49
+54
+240
+55
+60
+247
+54
+57
+249
+49
+52
+254
+45
+50
+253
+49
+52
+239
+50
+48
+240
+57
+53
+240
+55
+52
+236
+48
+46
+232
+44
+42
+231
+48
+44
+230
+51
+46
+224
+51
+44
+228
+61
+53
+224
+61
+52
+224
+61
+52
+224
+60
+51
+227
+58
+53
+230
+57
+53
+234
+54
+53
+236
+54
+53
+236
+53
+55
+236
+53
+55
+237
+53
+55
+238
+54
+56
+238
+54
+54
+235
+53
+52
+228
+50
+46
+222
+49
+43
+222
+55
+46
+221
+57
+45
+221
+58
+43
+223
+55
+42
+225
+52
+38
+230
+49
+38
+237
+49
+40
+241
+49
+44
+240
+52
+50
+238
+53
+51
+241
+52
+50
+242
+50
+49
+243
+49
+47
+241
+49
+46
+236
+51
+46
+231
+54
+46
+226
+59
+51
+210
+52
+43
+210
+58
+53
+198
+50
+48
+231
+85
+88
+255
+112
+120
+249
+99
+110
+241
+90
+105
+227
+75
+96
+239
+72
+102
+253
+58
+98
+255
+49
+93
+255
+54
+98
+253
+67
+104
+219
+77
+101
+177
+80
+89
+106
+53
+47
+94
+71
+55
+88
+75
+58
+85
+78
+59
+89
+81
+62
+85
+74
+56
+76
+64
+48
+73
+68
+48
+64
+70
+44
+65
+79
+46
+75
+91
+54
+88
+106
+64
+98
+120
+71
+102
+129
+74
+104
+136
+73
+102
+139
+70
+101
+138
+68
+99
+139
+66
+99
+141
+69
+101
+142
+72
+103
+144
+76
+104
+145
+79
+105
+145
+82
+107
+146
+83
+110
+146
+82
+108
+144
+80
+104
+143
+78
+100
+139
+74
+97
+138
+72
+95
+136
+70
+95
+135
+72
+95
+135
+72
+95
+133
+72
+95
+130
+72
+93
+126
+71
+93
+121
+70
+93
+119
+72
+96
+119
+75
+99
+120
+79
+99
+122
+78
+92
+116
+66
+90
+117
+64
+90
+117
+64
+74
+67
+51
+77
+70
+54
+81
+72
+57
+84
+75
+60
+87
+75
+61
+89
+77
+63
+92
+79
+63
+94
+81
+65
+100
+87
+70
+101
+88
+71
+100
+88
+72
+98
+86
+70
+95
+85
+73
+97
+87
+77
+103
+94
+85
+108
+99
+102
+119
+114
+137
+121
+117
+154
+120
+118
+158
+116
+115
+159
+114
+114
+164
+116
+117
+173
+108
+112
+175
+98
+103
+169
+90
+97
+169
+95
+101
+175
+102
+108
+184
+109
+115
+191
+118
+124
+200
+129
+135
+211
+143
+147
+221
+151
+156
+222
+155
+161
+211
+160
+167
+209
+169
+174
+216
+174
+179
+221
+177
+180
+223
+178
+179
+223
+180
+179
+223
+182
+179
+222
+181
+176
+217
+179
+172
+213
+174
+166
+203
+171
+161
+196
+170
+159
+193
+164
+153
+185
+153
+140
+170
+136
+126
+150
+126
+120
+132
+102
+97
+103
+108
+99
+102
+100
+88
+90
+108
+90
+88
+124
+99
+95
+123
+86
+80
+147
+98
+93
+140
+77
+70
+162
+85
+77
+187
+97
+88
+212
+108
+99
+238
+121
+114
+255
+129
+122
+255
+124
+119
+255
+112
+106
+254
+97
+92
+247
+84
+79
+233
+71
+66
+238
+79
+73
+221
+66
+61
+222
+71
+64
+234
+87
+79
+186
+44
+34
+190
+49
+39
+190
+52
+39
+199
+62
+46
+209
+69
+54
+203
+62
+45
+193
+50
+34
+202
+55
+39
+219
+69
+55
+222
+69
+63
+211
+57
+55
+204
+51
+46
+205
+53
+48
+212
+59
+53
+215
+61
+53
+221
+60
+52
+225
+61
+52
+228
+59
+52
+228
+57
+50
+222
+53
+46
+215
+52
+43
+207
+53
+41
+202
+56
+43
+197
+60
+44
+194
+63
+45
+212
+83
+62
+200
+71
+50
+189
+60
+41
+190
+58
+45
+195
+61
+50
+196
+59
+53
+194
+55
+52
+194
+52
+51
+220
+75
+78
+221
+76
+81
+225
+80
+85
+229
+84
+89
+232
+89
+93
+229
+86
+88
+220
+77
+79
+212
+67
+64
+203
+52
+43
+212
+54
+43
+218
+53
+47
+224
+52
+50
+228
+49
+52
+232
+49
+54
+233
+48
+56
+231
+46
+54
+238
+51
+62
+237
+50
+59
+244
+52
+63
+253
+56
+66
+255
+51
+62
+253
+41
+53
+255
+40
+51
+255
+46
+57
+248
+45
+51
+249
+53
+55
+249
+53
+57
+240
+46
+47
+235
+42
+43
+233
+48
+46
+232
+53
+49
+226
+53
+47
+227
+60
+52
+224
+61
+52
+224
+61
+52
+225
+61
+52
+228
+59
+54
+231
+58
+54
+235
+55
+54
+238
+54
+54
+236
+52
+54
+235
+51
+53
+236
+50
+53
+237
+51
+52
+237
+53
+53
+234
+52
+49
+227
+49
+45
+219
+48
+40
+222
+56
+44
+221
+58
+43
+221
+58
+43
+222
+56
+40
+224
+52
+38
+227
+51
+36
+233
+51
+38
+236
+52
+42
+238
+53
+48
+238
+53
+50
+240
+52
+50
+240
+51
+47
+242
+50
+47
+239
+50
+44
+235
+52
+44
+231
+54
+46
+228
+61
+52
+205
+47
+38
+215
+62
+57
+202
+52
+53
+249
+98
+103
+255
+112
+121
+246
+91
+105
+237
+80
+99
+228
+70
+93
+243
+72
+104
+255
+61
+101
+255
+50
+93
+255
+55
+97
+245
+71
+104
+201
+74
+93
+148
+66
+70
+83
+43
+35
+88
+72
+56
+84
+75
+58
+79
+72
+54
+89
+80
+63
+83
+74
+57
+69
+64
+45
+71
+70
+49
+61
+67
+39
+64
+74
+40
+73
+85
+49
+83
+100
+58
+95
+114
+69
+101
+125
+73
+103
+132
+74
+101
+136
+72
+99
+136
+67
+97
+137
+66
+98
+138
+67
+99
+141
+69
+101
+142
+72
+102
+143
+77
+104
+143
+80
+105
+144
+81
+108
+144
+80
+107
+144
+77
+102
+141
+74
+99
+138
+73
+97
+136
+71
+96
+135
+70
+96
+135
+72
+96
+134
+73
+94
+129
+71
+94
+127
+70
+95
+125
+71
+96
+124
+73
+97
+123
+75
+100
+123
+77
+102
+124
+78
+102
+126
+78
+93
+120
+67
+92
+121
+63
+93
+122
+66
+68
+66
+54
+70
+68
+56
+74
+70
+59
+80
+71
+62
+82
+72
+62
+87
+73
+62
+93
+77
+62
+95
+79
+63
+96
+81
+62
+97
+82
+63
+96
+83
+66
+95
+86
+71
+98
+89
+82
+103
+98
+95
+111
+106
+110
+115
+111
+126
+119
+113
+147
+122
+116
+160
+124
+121
+168
+121
+119
+169
+112
+112
+166
+103
+103
+163
+96
+97
+162
+92
+95
+164
+96
+98
+173
+102
+104
+181
+111
+112
+192
+121
+122
+204
+132
+130
+214
+141
+139
+223
+150
+146
+231
+156
+153
+232
+160
+158
+223
+161
+160
+218
+163
+162
+219
+164
+163
+220
+166
+163
+220
+165
+162
+219
+165
+160
+216
+164
+159
+213
+165
+158
+210
+163
+156
+207
+162
+154
+201
+162
+153
+198
+159
+150
+193
+153
+142
+184
+142
+131
+171
+131
+124
+155
+113
+111
+124
+104
+103
+108
+99
+95
+96
+102
+90
+90
+108
+89
+85
+115
+86
+80
+128
+85
+78
+143
+86
+79
+150
+82
+73
+169
+89
+80
+181
+88
+80
+192
+91
+83
+216
+107
+100
+235
+122
+114
+246
+131
+124
+255
+139
+134
+249
+117
+113
+255
+117
+115
+237
+95
+93
+223
+80
+76
+217
+69
+65
+239
+90
+84
+204
+55
+49
+197
+50
+42
+196
+54
+42
+195
+55
+40
+192
+55
+39
+195
+55
+38
+198
+57
+40
+202
+59
+43
+208
+60
+46
+213
+63
+49
+210
+56
+46
+214
+60
+50
+215
+63
+52
+211
+59
+48
+205
+53
+40
+205
+51
+39
+216
+58
+47
+226
+64
+53
+224
+57
+48
+225
+57
+48
+222
+55
+46
+215
+55
+43
+207
+55
+41
+201
+58
+42
+198
+63
+44
+196
+65
+47
+194
+61
+46
+198
+64
+52
+203
+69
+58
+205
+71
+60
+204
+67
+59
+197
+60
+52
+187
+50
+44
+182
+43
+38
+199
+60
+55
+208
+69
+66
+217
+79
+76
+224
+86
+83
+227
+89
+86
+225
+88
+82
+216
+79
+73
+208
+67
+58
+205
+58
+42
+213
+58
+40
+220
+56
+44
+227
+53
+46
+232
+46
+47
+237
+42
+50
+240
+40
+51
+244
+39
+54
+251
+44
+62
+250
+43
+63
+251
+42
+63
+253
+41
+63
+255
+39
+63
+255
+38
+63
+255
+36
+60
+255
+35
+60
+255
+35
+55
+255
+38
+56
+255
+42
+59
+254
+44
+57
+244
+44
+54
+237
+46
+53
+233
+53
+54
+232
+60
+58
+221
+56
+52
+221
+58
+51
+222
+59
+52
+224
+59
+53
+227
+58
+53
+230
+57
+53
+233
+55
+51
+235
+53
+52
+235
+51
+53
+236
+52
+54
+235
+53
+52
+233
+53
+52
+231
+53
+51
+226
+53
+47
+221
+53
+44
+219
+53
+41
+220
+56
+44
+219
+57
+42
+220
+57
+40
+222
+57
+38
+223
+56
+38
+226
+55
+37
+227
+54
+37
+230
+52
+38
+236
+53
+45
+237
+52
+47
+240
+53
+48
+241
+52
+46
+241
+53
+44
+237
+53
+43
+232
+54
+42
+228
+56
+44
+222
+58
+48
+212
+55
+46
+211
+58
+53
+215
+62
+64
+255
+109
+117
+255
+98
+113
+248
+85
+106
+241
+75
+99
+247
+79
+105
+236
+58
+90
+249
+57
+94
+255
+63
+103
+245
+64
+99
+230
+80
+107
+178
+73
+87
+97
+36
+35
+71
+43
+32
+65
+56
+39
+75
+68
+52
+82
+76
+60
+79
+73
+57
+66
+67
+49
+59
+68
+47
+60
+73
+47
+65
+72
+38
+69
+75
+37
+75
+83
+46
+83
+93
+56
+91
+107
+68
+97
+118
+75
+100
+126
+78
+100
+131
+74
+98
+134
+70
+96
+136
+66
+97
+137
+64
+99
+139
+66
+101
+141
+70
+104
+144
+74
+108
+144
+80
+109
+145
+81
+108
+145
+76
+105
+142
+72
+103
+140
+71
+102
+139
+72
+102
+138
+74
+101
+137
+73
+99
+133
+72
+97
+131
+71
+100
+131
+74
+100
+129
+73
+98
+127
+71
+99
+126
+71
+100
+127
+74
+100
+127
+72
+101
+126
+71
+97
+125
+67
+91
+123
+60
+92
+127
+61
+95
+130
+66
+61
+63
+52
+63
+65
+54
+70
+67
+60
+74
+69
+63
+80
+69
+63
+84
+71
+62
+91
+75
+62
+93
+77
+61
+96
+79
+59
+96
+81
+60
+94
+83
+65
+94
+86
+73
+99
+91
+88
+104
+99
+105
+110
+108
+121
+115
+111
+134
+116
+112
+149
+118
+112
+158
+116
+112
+162
+112
+109
+162
+103
+102
+159
+97
+97
+159
+93
+94
+161
+92
+92
+164
+101
+100
+176
+107
+106
+186
+116
+114
+197
+125
+123
+207
+134
+130
+217
+141
+137
+224
+148
+142
+230
+152
+147
+229
+155
+149
+221
+156
+151
+217
+157
+152
+218
+158
+153
+219
+158
+151
+218
+157
+150
+217
+156
+150
+214
+155
+149
+211
+158
+150
+210
+156
+148
+205
+156
+147
+200
+155
+147
+198
+154
+145
+192
+147
+138
+183
+136
+127
+170
+128
+121
+154
+115
+109
+123
+107
+101
+105
+100
+94
+94
+101
+91
+89
+107
+90
+83
+113
+86
+77
+124
+84
+74
+141
+84
+75
+157
+84
+75
+178
+91
+82
+187
+88
+82
+195
+88
+82
+211
+102
+97
+221
+114
+106
+224
+120
+111
+235
+126
+119
+251
+136
+133
+255
+135
+133
+247
+117
+115
+238
+103
+100
+227
+85
+83
+235
+90
+85
+199
+50
+44
+194
+47
+37
+197
+55
+41
+195
+55
+38
+192
+55
+37
+193
+56
+38
+196
+56
+39
+200
+59
+42
+207
+59
+45
+211
+61
+47
+213
+57
+44
+213
+57
+44
+211
+58
+44
+210
+58
+44
+209
+57
+43
+209
+57
+43
+212
+56
+43
+216
+56
+44
+223
+59
+49
+224
+57
+48
+220
+56
+46
+214
+56
+44
+207
+57
+42
+200
+57
+40
+193
+58
+38
+190
+57
+38
+190
+54
+42
+193
+56
+48
+198
+61
+53
+201
+64
+56
+202
+65
+57
+200
+63
+55
+197
+60
+52
+194
+57
+49
+191
+52
+45
+199
+62
+54
+209
+72
+64
+216
+79
+71
+218
+81
+73
+215
+78
+70
+204
+67
+59
+195
+55
+42
+202
+55
+37
+211
+56
+36
+221
+55
+41
+229
+52
+44
+237
+47
+47
+244
+43
+51
+249
+41
+55
+253
+40
+58
+255
+43
+64
+255
+42
+65
+255
+41
+65
+255
+38
+65
+255
+35
+64
+255
+33
+60
+255
+30
+61
+255
+29
+58
+255
+30
+57
+255
+31
+56
+255
+36
+58
+255
+41
+59
+247
+45
+57
+241
+50
+58
+234
+55
+58
+230
+60
+60
+220
+57
+52
+220
+58
+53
+222
+59
+52
+224
+59
+53
+227
+58
+53
+230
+57
+53
+233
+55
+51
+235
+53
+50
+235
+51
+53
+236
+52
+54
+235
+53
+52
+232
+54
+52
+228
+55
+49
+223
+54
+47
+220
+53
+44
+217
+53
+41
+219
+57
+42
+219
+57
+42
+220
+57
+40
+220
+57
+38
+222
+57
+38
+223
+56
+37
+225
+56
+37
+227
+54
+37
+231
+53
+43
+234
+51
+43
+235
+52
+44
+235
+53
+42
+235
+53
+42
+232
+54
+40
+228
+55
+41
+223
+55
+42
+221
+61
+49
+209
+52
+43
+207
+53
+51
+239
+84
+88
+255
+102
+114
+255
+91
+111
+241
+73
+98
+249
+76
+104
+248
+69
+99
+247
+64
+95
+244
+56
+91
+243
+62
+97
+239
+78
+109
+205
+76
+98
+139
+56
+64
+89
+41
+37
+69
+51
+39
+60
+54
+40
+62
+59
+44
+67
+64
+49
+67
+66
+48
+61
+64
+45
+56
+68
+46
+58
+73
+44
+60
+68
+29
+75
+80
+39
+92
+98
+60
+101
+111
+74
+104
+118
+82
+101
+122
+81
+100
+126
+79
+100
+130
+76
+97
+131
+70
+97
+134
+65
+97
+137
+64
+99
+140
+64
+103
+141
+68
+105
+142
+72
+107
+144
+77
+108
+145
+78
+108
+145
+75
+106
+144
+71
+104
+141
+72
+102
+139
+70
+103
+138
+74
+102
+137
+73
+102
+133
+74
+100
+131
+72
+102
+131
+75
+100
+129
+73
+100
+127
+72
+100
+128
+70
+101
+129
+71
+101
+129
+71
+102
+127
+69
+98
+126
+65
+93
+128
+62
+95
+132
+63
+98
+135
+66
+54
+57
+46
+58
+60
+49
+63
+63
+55
+68
+65
+58
+75
+66
+59
+79
+69
+60
+86
+72
+61
+89
+76
+60
+94
+79
+60
+92
+79
+60
+92
+83
+66
+94
+87
+77
+99
+93
+93
+104
+101
+108
+111
+109
+123
+115
+113
+137
+115
+111
+148
+113
+107
+153
+106
+102
+152
+99
+96
+149
+92
+91
+148
+90
+90
+152
+92
+93
+160
+92
+95
+166
+104
+106
+181
+110
+111
+191
+119
+120
+202
+127
+128
+210
+134
+132
+216
+138
+136
+220
+143
+139
+224
+145
+142
+221
+147
+144
+215
+147
+144
+211
+147
+144
+211
+147
+144
+211
+148
+142
+212
+147
+141
+211
+147
+140
+208
+146
+139
+206
+149
+140
+205
+147
+139
+199
+148
+139
+194
+148
+140
+191
+147
+139
+186
+140
+133
+175
+131
+123
+162
+126
+115
+145
+121
+103
+119
+115
+96
+102
+103
+91
+91
+100
+91
+86
+100
+91
+82
+104
+88
+75
+117
+85
+72
+135
+83
+72
+166
+89
+81
+190
+95
+89
+203
+91
+89
+208
+88
+87
+218
+100
+98
+222
+109
+105
+220
+113
+107
+226
+119
+113
+251
+138
+132
+255
+138
+134
+255
+133
+129
+255
+125
+121
+247
+110
+104
+238
+97
+88
+196
+52
+43
+192
+50
+38
+196
+56
+41
+193
+58
+39
+192
+57
+38
+192
+57
+37
+194
+57
+38
+198
+59
+40
+204
+58
+43
+208
+58
+44
+214
+58
+45
+211
+53
+41
+206
+53
+39
+208
+56
+42
+212
+62
+47
+212
+62
+47
+206
+54
+40
+203
+47
+34
+218
+58
+46
+218
+56
+45
+217
+55
+44
+214
+56
+44
+208
+58
+43
+201
+58
+41
+194
+57
+38
+190
+55
+36
+189
+53
+41
+192
+54
+44
+194
+56
+46
+196
+58
+48
+199
+61
+51
+202
+64
+54
+203
+65
+55
+204
+66
+56
+199
+58
+49
+202
+64
+54
+207
+69
+59
+208
+70
+60
+210
+72
+62
+209
+71
+61
+202
+64
+54
+197
+55
+43
+204
+54
+37
+214
+54
+38
+223
+55
+44
+231
+52
+47
+241
+48
+51
+246
+45
+53
+251
+43
+57
+255
+42
+60
+252
+39
+59
+252
+39
+61
+251
+37
+61
+249
+35
+59
+251
+33
+58
+250
+30
+55
+252
+28
+55
+254
+27
+54
+255
+29
+55
+255
+30
+53
+254
+35
+55
+253
+42
+59
+247
+50
+60
+242
+55
+62
+236
+57
+60
+229
+59
+59
+220
+57
+52
+220
+58
+53
+222
+59
+52
+224
+59
+53
+229
+57
+53
+231
+56
+53
+233
+55
+51
+235
+53
+50
+237
+51
+54
+238
+52
+55
+237
+53
+53
+234
+54
+53
+229
+54
+49
+225
+54
+47
+220
+53
+44
+216
+52
+40
+218
+56
+41
+217
+57
+41
+218
+57
+39
+219
+56
+37
+221
+56
+37
+222
+55
+36
+224
+55
+36
+225
+54
+37
+225
+53
+39
+226
+52
+41
+227
+53
+42
+227
+54
+40
+227
+54
+40
+225
+55
+40
+221
+55
+41
+218
+56
+43
+219
+61
+50
+204
+50
+42
+211
+56
+54
+255
+108
+112
+255
+93
+108
+249
+81
+104
+237
+62
+91
+255
+75
+108
+247
+59
+92
+255
+66
+100
+240
+56
+90
+233
+65
+98
+227
+87
+113
+171
+64
+82
+101
+34
+41
+81
+46
+42
+65
+52
+43
+52
+53
+39
+53
+54
+38
+58
+59
+41
+63
+62
+42
+62
+61
+40
+60
+64
+41
+62
+69
+38
+62
+70
+29
+88
+97
+52
+115
+126
+84
+128
+140
+100
+119
+135
+96
+104
+127
+83
+97
+125
+76
+97
+128
+71
+96
+131
+67
+96
+133
+63
+97
+137
+64
+99
+140
+64
+104
+142
+69
+106
+143
+74
+107
+144
+77
+108
+145
+78
+110
+147
+77
+107
+145
+72
+104
+141
+72
+103
+140
+71
+104
+139
+75
+104
+139
+75
+102
+136
+76
+100
+134
+74
+101
+132
+75
+100
+131
+74
+99
+128
+70
+100
+129
+71
+102
+130
+72
+102
+130
+71
+101
+129
+70
+98
+128
+66
+99
+134
+68
+101
+138
+69
+104
+141
+72
+50
+53
+42
+53
+56
+45
+59
+60
+52
+65
+62
+55
+71
+64
+58
+75
+66
+59
+82
+69
+60
+86
+74
+60
+88
+76
+60
+89
+77
+61
+89
+81
+68
+94
+87
+79
+99
+94
+98
+105
+103
+114
+111
+110
+128
+114
+111
+140
+114
+109
+149
+106
+103
+148
+96
+94
+143
+87
+87
+139
+84
+85
+142
+87
+88
+152
+92
+95
+162
+97
+99
+173
+108
+110
+187
+114
+115
+195
+123
+124
+206
+130
+131
+213
+136
+134
+217
+138
+136
+219
+140
+136
+220
+141
+138
+217
+143
+142
+212
+143
+140
+209
+143
+140
+209
+142
+139
+210
+143
+137
+211
+142
+136
+210
+142
+134
+209
+141
+133
+206
+143
+133
+202
+142
+133
+196
+143
+134
+191
+144
+136
+187
+143
+136
+180
+137
+131
+169
+128
+121
+154
+126
+112
+137
+127
+96
+112
+121
+90
+96
+107
+89
+89
+99
+92
+84
+96
+94
+81
+98
+91
+73
+109
+86
+70
+128
+82
+69
+161
+84
+76
+193
+91
+89
+209
+89
+91
+217
+88
+92
+228
+99
+103
+228
+108
+107
+224
+112
+108
+228
+121
+115
+236
+125
+118
+237
+122
+115
+254
+131
+126
+255
+134
+129
+255
+129
+123
+245
+107
+97
+201
+60
+50
+196
+56
+41
+194
+59
+40
+191
+58
+39
+191
+59
+38
+190
+58
+37
+193
+58
+38
+197
+58
+39
+200
+57
+41
+206
+56
+42
+216
+58
+46
+212
+54
+42
+206
+53
+39
+206
+56
+41
+209
+62
+46
+209
+62
+46
+203
+56
+40
+199
+47
+33
+210
+54
+41
+211
+53
+41
+210
+52
+40
+210
+54
+41
+209
+57
+43
+205
+60
+43
+200
+61
+42
+196
+59
+41
+196
+58
+45
+196
+58
+47
+198
+57
+48
+198
+57
+47
+199
+58
+49
+200
+59
+49
+201
+60
+51
+203
+61
+51
+211
+68
+60
+211
+69
+59
+208
+65
+57
+203
+61
+51
+203
+60
+52
+207
+65
+55
+207
+64
+56
+206
+59
+49
+206
+53
+39
+217
+53
+41
+226
+53
+46
+235
+51
+49
+242
+47
+53
+247
+43
+54
+249
+41
+55
+252
+41
+58
+249
+38
+57
+247
+38
+59
+247
+38
+59
+248
+39
+60
+251
+38
+60
+253
+37
+58
+255
+36
+58
+255
+35
+58
+255
+33
+54
+253
+34
+54
+250
+37
+55
+249
+44
+59
+247
+53
+62
+242
+57
+63
+233
+57
+59
+225
+57
+56
+220
+57
+52
+220
+58
+53
+222
+59
+52
+224
+59
+53
+229
+57
+53
+231
+56
+53
+233
+55
+51
+235
+53
+52
+238
+52
+55
+238
+52
+55
+238
+54
+54
+234
+54
+53
+230
+55
+50
+225
+54
+47
+220
+53
+44
+215
+53
+42
+216
+56
+42
+216
+56
+40
+216
+56
+40
+217
+56
+38
+218
+55
+38
+220
+55
+36
+221
+54
+36
+221
+54
+36
+219
+53
+37
+220
+54
+40
+221
+55
+39
+220
+57
+40
+220
+57
+40
+218
+59
+40
+215
+58
+41
+214
+58
+43
+213
+59
+49
+206
+51
+46
+231
+73
+74
+255
+111
+119
+254
+85
+104
+243
+69
+94
+243
+62
+95
+255
+67
+102
+251
+55
+91
+252
+60
+97
+240
+66
+99
+228
+79
+108
+196
+80
+101
+129
+47
+61
+78
+29
+33
+72
+48
+46
+54
+47
+39
+50
+52
+39
+56
+58
+44
+62
+65
+46
+65
+64
+43
+63
+61
+36
+65
+64
+36
+69
+70
+36
+84
+93
+48
+112
+126
+77
+143
+159
+114
+151
+168
+124
+131
+152
+109
+106
+132
+87
+95
+123
+74
+93
+126
+69
+95
+131
+67
+97
+134
+64
+98
+138
+65
+102
+143
+67
+107
+144
+74
+108
+145
+76
+109
+146
+79
+109
+146
+79
+111
+148
+78
+108
+146
+73
+105
+142
+73
+104
+141
+72
+105
+140
+76
+105
+140
+76
+104
+138
+78
+103
+137
+77
+102
+133
+76
+100
+131
+74
+100
+129
+71
+101
+130
+72
+103
+131
+72
+104
+132
+73
+102
+130
+71
+100
+130
+68
+103
+138
+72
+105
+142
+73
+108
+145
+76
+45
+51
+39
+51
+54
+43
+56
+57
+49
+60
+59
+54
+66
+61
+57
+71
+64
+58
+77
+68
+61
+81
+71
+61
+83
+73
+61
+83
+75
+62
+85
+78
+68
+90
+85
+81
+97
+94
+101
+105
+103
+117
+109
+107
+129
+108
+107
+138
+106
+104
+144
+98
+96
+143
+88
+86
+136
+80
+80
+134
+81
+81
+141
+88
+89
+154
+96
+99
+170
+102
+106
+180
+111
+114
+193
+117
+120
+201
+124
+127
+208
+130
+133
+214
+134
+135
+217
+135
+136
+216
+138
+137
+217
+139
+138
+214
+139
+139
+209
+139
+138
+206
+138
+136
+209
+137
+135
+210
+137
+133
+210
+136
+131
+211
+138
+131
+211
+137
+130
+207
+140
+132
+205
+139
+132
+199
+141
+133
+192
+141
+134
+185
+141
+134
+175
+135
+130
+162
+126
+120
+146
+127
+110
+129
+131
+90
+104
+125
+84
+90
+108
+87
+84
+99
+92
+82
+92
+96
+79
+91
+95
+72
+102
+90
+68
+122
+83
+66
+149
+74
+68
+187
+83
+82
+209
+83
+87
+219
+82
+89
+230
+93
+100
+231
+102
+106
+224
+108
+108
+227
+118
+113
+228
+117
+110
+226
+111
+104
+247
+126
+118
+255
+130
+123
+255
+135
+126
+244
+108
+96
+201
+63
+50
+193
+56
+40
+192
+59
+40
+191
+61
+39
+191
+61
+39
+192
+60
+39
+194
+59
+39
+197
+58
+39
+199
+56
+40
+205
+55
+41
+216
+58
+47
+217
+56
+46
+210
+56
+44
+207
+57
+43
+204
+58
+43
+201
+58
+42
+200
+57
+41
+201
+55
+40
+207
+57
+43
+209
+55
+43
+210
+56
+44
+209
+55
+43
+207
+55
+42
+204
+56
+42
+203
+60
+44
+203
+62
+45
+202
+60
+48
+201
+61
+48
+202
+60
+50
+201
+59
+47
+200
+58
+48
+198
+56
+44
+197
+55
+45
+197
+53
+42
+208
+64
+55
+208
+64
+53
+205
+61
+52
+201
+57
+46
+203
+56
+48
+206
+59
+49
+205
+58
+50
+204
+53
+44
+208
+47
+37
+217
+48
+41
+228
+50
+48
+236
+50
+53
+244
+47
+56
+249
+45
+57
+251
+43
+59
+252
+44
+60
+252
+45
+63
+251
+46
+63
+252
+47
+64
+252
+47
+64
+254
+47
+65
+255
+47
+63
+255
+45
+63
+255
+46
+64
+255
+40
+56
+251
+40
+55
+247
+43
+55
+245
+48
+58
+241
+54
+61
+237
+56
+61
+228
+56
+56
+221
+53
+52
+220
+57
+52
+220
+58
+53
+222
+59
+54
+226
+58
+55
+229
+57
+53
+231
+56
+53
+234
+54
+53
+236
+52
+52
+241
+52
+56
+241
+52
+56
+239
+53
+54
+237
+55
+54
+230
+55
+50
+225
+54
+47
+218
+54
+44
+215
+53
+42
+216
+56
+42
+214
+57
+40
+214
+57
+40
+216
+57
+38
+216
+57
+38
+217
+56
+38
+218
+55
+38
+217
+56
+38
+213
+56
+37
+213
+58
+38
+214
+59
+39
+213
+61
+40
+212
+61
+40
+211
+62
+42
+211
+61
+44
+211
+61
+46
+208
+55
+47
+215
+60
+56
+255
+93
+100
+255
+96
+111
+255
+80
+103
+240
+60
+89
+255
+66
+104
+250
+55
+95
+255
+55
+95
+242
+52
+88
+237
+78
+108
+215
+92
+113
+148
+64
+79
+91
+38
+46
+71
+40
+45
+63
+49
+48
+49
+46
+41
+52
+54
+43
+58
+62
+47
+60
+65
+43
+58
+61
+34
+62
+61
+30
+80
+74
+40
+94
+92
+53
+121
+133
+83
+144
+163
+108
+170
+190
+139
+168
+190
+141
+142
+165
+119
+111
+139
+91
+97
+127
+75
+94
+127
+70
+96
+132
+68
+99
+136
+66
+101
+141
+68
+106
+147
+71
+111
+148
+78
+112
+149
+80
+111
+147
+83
+111
+147
+83
+111
+148
+78
+108
+146
+73
+105
+142
+73
+103
+140
+71
+105
+140
+76
+105
+140
+76
+105
+139
+79
+104
+138
+78
+102
+133
+74
+101
+132
+73
+100
+131
+72
+101
+132
+73
+103
+133
+73
+104
+134
+72
+103
+133
+71
+101
+133
+68
+105
+142
+73
+105
+145
+75
+108
+148
+78
+43
+49
+37
+46
+52
+42
+52
+55
+48
+56
+57
+51
+62
+58
+55
+66
+61
+58
+72
+65
+59
+75
+68
+60
+78
+72
+60
+78
+71
+61
+79
+74
+68
+87
+83
+82
+95
+94
+102
+102
+101
+117
+103
+103
+127
+103
+102
+134
+98
+97
+137
+91
+89
+138
+81
+81
+133
+78
+79
+135
+82
+83
+147
+91
+94
+163
+101
+105
+179
+108
+111
+190
+117
+119
+202
+122
+124
+209
+127
+129
+214
+131
+133
+216
+134
+135
+217
+134
+135
+215
+136
+135
+213
+137
+136
+212
+135
+135
+205
+134
+134
+204
+134
+132
+205
+133
+130
+207
+133
+128
+210
+133
+128
+210
+135
+127
+212
+135
+128
+208
+141
+133
+210
+140
+133
+201
+141
+133
+192
+140
+134
+182
+139
+133
+169
+132
+128
+155
+123
+118
+138
+124
+106
+120
+129
+87
+97
+126
+81
+86
+109
+85
+81
+100
+94
+80
+92
+100
+77
+89
+97
+73
+99
+93
+69
+118
+87
+67
+146
+78
+69
+183
+85
+82
+209
+84
+90
+219
+82
+90
+231
+92
+99
+231
+98
+103
+228
+104
+106
+231
+113
+111
+236
+121
+114
+230
+113
+104
+247
+124
+116
+243
+115
+106
+254
+120
+109
+230
+92
+81
+196
+59
+43
+190
+53
+35
+194
+59
+39
+193
+61
+40
+193
+61
+40
+195
+60
+40
+196
+59
+40
+200
+59
+41
+203
+57
+42
+207
+55
+42
+214
+53
+43
+216
+55
+45
+212
+58
+46
+206
+58
+44
+199
+58
+41
+196
+56
+39
+198
+58
+41
+202
+61
+44
+207
+61
+46
+214
+64
+50
+217
+65
+52
+214
+62
+49
+206
+56
+42
+200
+52
+38
+202
+56
+41
+203
+60
+44
+201
+58
+44
+200
+58
+44
+201
+59
+47
+201
+59
+45
+202
+58
+47
+200
+57
+43
+200
+53
+43
+199
+53
+40
+202
+54
+44
+207
+59
+47
+210
+62
+52
+211
+63
+51
+214
+63
+54
+213
+62
+51
+206
+55
+46
+201
+44
+35
+210
+43
+37
+220
+45
+42
+231
+48
+50
+240
+51
+57
+246
+49
+59
+250
+48
+60
+253
+48
+63
+253
+48
+63
+249
+48
+64
+247
+49
+64
+247
+49
+64
+246
+48
+61
+247
+47
+60
+247
+45
+57
+250
+44
+57
+250
+42
+55
+252
+46
+59
+248
+46
+58
+245
+48
+58
+240
+51
+58
+237
+54
+59
+231
+55
+58
+224
+54
+54
+218
+53
+51
+220
+57
+52
+221
+58
+53
+223
+58
+54
+226
+58
+55
+229
+57
+53
+231
+56
+53
+234
+54
+53
+236
+52
+52
+242
+53
+57
+242
+53
+57
+240
+54
+55
+237
+55
+54
+230
+55
+52
+223
+54
+47
+218
+54
+45
+214
+54
+42
+213
+55
+43
+212
+56
+41
+212
+56
+41
+212
+57
+39
+213
+56
+39
+213
+56
+37
+215
+55
+39
+212
+57
+37
+208
+57
+36
+206
+60
+37
+207
+61
+38
+207
+63
+39
+206
+64
+40
+206
+64
+42
+206
+63
+46
+208
+60
+48
+208
+55
+49
+232
+72
+72
+255
+103
+113
+254
+78
+98
+255
+72
+100
+246
+56
+90
+255
+66
+108
+246
+49
+92
+255
+57
+96
+234
+55
+87
+221
+83
+106
+185
+87
+102
+107
+50
+57
+71
+41
+43
+71
+55
+58
+59
+50
+51
+56
+51
+48
+58
+55
+48
+57
+59
+45
+53
+58
+35
+51
+56
+24
+66
+68
+29
+102
+99
+58
+129
+131
+84
+159
+174
+119
+169
+193
+135
+181
+206
+151
+175
+199
+147
+146
+174
+125
+118
+148
+98
+101
+134
+81
+96
+130
+70
+96
+133
+66
+99
+136
+66
+103
+143
+70
+109
+150
+74
+114
+152
+79
+114
+151
+82
+113
+149
+85
+112
+148
+84
+111
+148
+78
+108
+145
+75
+104
+141
+72
+102
+139
+70
+104
+139
+75
+105
+140
+76
+105
+139
+78
+105
+139
+79
+103
+134
+75
+102
+133
+74
+101
+132
+73
+102
+133
+73
+104
+136
+73
+105
+137
+72
+105
+135
+71
+102
+134
+67
+106
+143
+74
+107
+147
+77
+110
+150
+80
+40
+48
+35
+43
+49
+39
+47
+52
+45
+51
+53
+48
+55
+54
+52
+60
+56
+53
+64
+61
+56
+67
+62
+56
+73
+69
+60
+72
+69
+60
+75
+72
+67
+82
+80
+81
+91
+91
+101
+97
+98
+116
+98
+98
+124
+96
+96
+130
+95
+94
+136
+90
+88
+138
+84
+84
+138
+84
+84
+144
+92
+93
+160
+103
+105
+179
+112
+115
+196
+118
+120
+205
+123
+127
+216
+126
+130
+219
+131
+132
+222
+132
+134
+221
+132
+133
+216
+131
+132
+214
+133
+132
+212
+134
+133
+209
+131
+134
+203
+130
+133
+202
+131
+131
+205
+130
+129
+207
+131
+127
+211
+133
+128
+212
+136
+128
+214
+136
+128
+211
+141
+133
+210
+139
+132
+200
+139
+131
+188
+139
+132
+176
+137
+130
+163
+129
+124
+146
+119
+113
+127
+117
+102
+109
+125
+86
+91
+121
+81
+81
+107
+87
+78
+101
+95
+79
+93
+101
+77
+91
+100
+73
+100
+96
+71
+116
+91
+69
+140
+82
+70
+176
+91
+84
+202
+89
+91
+214
+85
+90
+226
+91
+97
+230
+93
+100
+231
+98
+101
+237
+109
+108
+245
+122
+115
+237
+114
+106
+247
+120
+111
+222
+89
+80
+229
+91
+80
+210
+68
+56
+195
+53
+39
+199
+58
+41
+197
+58
+39
+196
+60
+38
+197
+61
+39
+200
+61
+40
+202
+59
+42
+205
+58
+42
+208
+56
+42
+212
+54
+42
+211
+48
+39
+212
+51
+41
+210
+56
+44
+205
+59
+44
+199
+59
+42
+194
+59
+40
+192
+59
+40
+195
+60
+41
+200
+59
+42
+213
+67
+52
+225
+75
+61
+222
+72
+58
+211
+61
+47
+202
+52
+38
+201
+53
+39
+205
+59
+44
+200
+57
+41
+200
+57
+41
+200
+57
+43
+200
+57
+41
+202
+56
+43
+202
+56
+41
+203
+55
+43
+203
+55
+41
+205
+54
+43
+210
+60
+46
+215
+63
+52
+216
+64
+51
+218
+64
+54
+219
+65
+53
+215
+58
+49
+210
+49
+41
+220
+48
+46
+229
+49
+52
+238
+52
+57
+245
+54
+62
+249
+52
+62
+249
+49
+62
+250
+48
+64
+248
+47
+63
+242
+46
+60
+239
+47
+60
+237
+47
+57
+237
+48
+55
+239
+45
+53
+239
+44
+50
+242
+43
+50
+241
+42
+49
+244
+49
+57
+244
+50
+58
+242
+53
+59
+236
+53
+57
+229
+53
+55
+225
+53
+53
+223
+55
+54
+221
+56
+54
+220
+56
+54
+221
+57
+55
+223
+58
+54
+227
+58
+55
+230
+56
+55
+233
+55
+55
+234
+54
+55
+236
+52
+54
+244
+53
+58
+244
+53
+58
+241
+55
+58
+238
+56
+55
+230
+55
+52
+224
+55
+48
+218
+54
+45
+212
+54
+42
+211
+55
+42
+209
+56
+42
+208
+56
+42
+208
+57
+40
+208
+57
+40
+208
+57
+38
+209
+56
+40
+208
+57
+38
+203
+57
+34
+200
+58
+34
+200
+62
+36
+199
+63
+37
+200
+64
+40
+200
+64
+42
+203
+62
+45
+206
+59
+49
+213
+58
+54
+250
+85
+91
+255
+94
+111
+255
+71
+97
+253
+62
+95
+254
+58
+96
+255
+56
+102
+250
+53
+98
+244
+58
+95
+230
+71
+99
+192
+80
+96
+135
+64
+72
+84
+50
+51
+67
+53
+52
+68
+57
+61
+62
+51
+55
+66
+51
+54
+64
+53
+49
+58
+56
+43
+54
+60
+34
+57
+67
+30
+80
+92
+46
+125
+132
+80
+159
+168
+113
+176
+197
+138
+175
+203
+142
+176
+204
+146
+166
+195
+141
+146
+174
+125
+123
+153
+101
+103
+136
+81
+95
+129
+69
+94
+131
+64
+99
+137
+64
+105
+143
+68
+111
+149
+74
+115
+153
+80
+115
+152
+83
+113
+149
+85
+111
+147
+83
+110
+147
+78
+107
+144
+74
+103
+140
+71
+101
+138
+69
+103
+138
+74
+104
+139
+75
+105
+139
+78
+105
+139
+78
+102
+136
+75
+100
+134
+73
+100
+134
+73
+101
+136
+72
+103
+138
+74
+104
+139
+73
+105
+137
+72
+102
+137
+69
+106
+146
+76
+108
+150
+78
+111
+153
+81
+38
+46
+33
+40
+48
+37
+45
+50
+43
+49
+51
+46
+51
+51
+49
+55
+54
+52
+58
+57
+53
+60
+59
+54
+71
+68
+61
+68
+68
+60
+71
+70
+66
+79
+79
+81
+90
+90
+100
+95
+97
+112
+94
+96
+121
+92
+92
+126
+96
+95
+137
+92
+90
+140
+89
+88
+145
+92
+92
+154
+103
+103
+173
+113
+115
+192
+122
+124
+209
+127
+128
+220
+129
+132
+225
+130
+133
+228
+133
+134
+227
+132
+133
+225
+131
+131
+219
+129
+130
+213
+131
+130
+210
+131
+130
+206
+132
+135
+204
+131
+134
+201
+132
+132
+204
+131
+130
+206
+133
+130
+211
+135
+130
+214
+138
+130
+215
+140
+131
+212
+141
+133
+208
+140
+131
+196
+139
+130
+183
+138
+130
+171
+133
+127
+155
+127
+120
+136
+115
+110
+117
+111
+99
+99
+117
+87
+85
+114
+84
+76
+105
+87
+75
+102
+95
+77
+99
+101
+77
+97
+100
+73
+102
+96
+70
+115
+93
+70
+125
+79
+63
+159
+89
+77
+184
+89
+83
+197
+83
+82
+215
+86
+90
+226
+87
+92
+233
+90
+96
+240
+100
+101
+247
+114
+109
+241
+110
+102
+247
+113
+104
+209
+68
+59
+212
+65
+55
+197
+49
+37
+200
+52
+38
+212
+67
+50
+199
+57
+37
+199
+58
+38
+201
+59
+39
+205
+60
+41
+208
+58
+43
+211
+58
+44
+216
+56
+44
+217
+55
+44
+207
+44
+35
+206
+48
+37
+206
+54
+41
+203
+60
+44
+199
+64
+45
+193
+62
+42
+190
+59
+39
+188
+55
+36
+192
+52
+35
+209
+66
+50
+227
+79
+65
+228
+78
+64
+216
+66
+52
+203
+55
+41
+203
+55
+41
+208
+62
+47
+202
+59
+43
+201
+58
+42
+199
+56
+40
+198
+55
+39
+200
+54
+39
+202
+54
+40
+206
+56
+42
+208
+56
+43
+211
+59
+46
+213
+59
+47
+213
+57
+45
+210
+54
+42
+213
+55
+44
+218
+60
+49
+221
+60
+50
+220
+55
+49
+232
+56
+56
+241
+56
+61
+247
+58
+65
+251
+57
+66
+250
+52
+65
+245
+47
+60
+242
+44
+59
+239
+44
+58
+237
+47
+59
+234
+49
+57
+234
+51
+56
+235
+52
+56
+237
+53
+55
+241
+53
+54
+244
+51
+54
+243
+53
+55
+239
+50
+54
+238
+53
+58
+236
+56
+59
+233
+54
+57
+226
+52
+53
+222
+52
+52
+223
+55
+54
+225
+60
+58
+221
+56
+54
+222
+57
+55
+225
+57
+54
+227
+58
+55
+230
+56
+55
+233
+55
+55
+234
+54
+55
+236
+52
+54
+244
+53
+58
+244
+53
+58
+241
+55
+58
+236
+56
+57
+230
+57
+53
+223
+56
+50
+216
+55
+47
+211
+55
+43
+208
+56
+43
+205
+58
+42
+205
+57
+43
+204
+59
+42
+205
+58
+42
+205
+58
+40
+205
+58
+42
+204
+59
+40
+197
+57
+34
+194
+58
+34
+195
+61
+36
+194
+62
+37
+195
+63
+40
+198
+63
+43
+201
+61
+46
+205
+56
+49
+220
+60
+62
+255
+93
+102
+255
+81
+103
+255
+72
+100
+250
+56
+91
+255
+63
+103
+246
+46
+92
+251
+62
+104
+228
+61
+91
+224
+93
+111
+162
+76
+85
+91
+45
+45
+71
+56
+51
+70
+66
+63
+64
+55
+58
+67
+52
+57
+71
+48
+54
+70
+50
+49
+64
+57
+41
+63
+68
+38
+69
+86
+42
+96
+116
+63
+139
+157
+97
+170
+190
+127
+177
+203
+140
+171
+201
+139
+166
+195
+139
+157
+186
+132
+142
+172
+122
+123
+153
+101
+102
+135
+80
+90
+124
+64
+94
+129
+63
+97
+135
+62
+104
+142
+67
+111
+149
+74
+114
+152
+79
+114
+151
+82
+112
+148
+84
+110
+146
+82
+110
+147
+78
+106
+143
+73
+102
+139
+70
+100
+137
+68
+102
+137
+73
+104
+139
+75
+105
+139
+78
+105
+139
+78
+102
+136
+75
+101
+135
+74
+100
+135
+71
+101
+136
+70
+103
+138
+72
+104
+139
+71
+104
+139
+71
+101
+138
+68
+107
+147
+76
+109
+151
+79
+112
+154
+82
+40
+48
+33
+39
+47
+34
+40
+45
+38
+41
+46
+40
+46
+48
+45
+51
+51
+49
+55
+56
+51
+57
+58
+52
+61
+61
+53
+63
+64
+56
+68
+69
+64
+74
+76
+75
+79
+82
+89
+86
+88
+101
+90
+92
+115
+93
+94
+125
+89
+88
+130
+91
+89
+139
+94
+93
+150
+101
+101
+163
+110
+110
+182
+119
+120
+200
+127
+129
+216
+132
+133
+226
+140
+140
+238
+140
+140
+240
+138
+138
+236
+134
+135
+228
+130
+130
+220
+128
+128
+214
+130
+128
+211
+131
+130
+206
+128
+131
+198
+129
+133
+197
+131
+131
+201
+132
+132
+206
+134
+131
+208
+136
+131
+211
+139
+132
+210
+140
+132
+207
+138
+128
+197
+138
+128
+188
+137
+128
+175
+135
+125
+160
+128
+120
+143
+119
+111
+122
+107
+101
+103
+102
+93
+88
+106
+92
+81
+108
+92
+77
+104
+92
+76
+102
+94
+75
+101
+95
+73
+102
+96
+72
+106
+96
+71
+114
+94
+70
+114
+79
+59
+135
+84
+65
+166
+92
+79
+193
+96
+89
+209
+89
+88
+220
+81
+84
+237
+83
+91
+247
+92
+96
+249
+104
+101
+230
+89
+80
+212
+68
+60
+206
+55
+48
+209
+55
+47
+215
+58
+49
+214
+61
+47
+212
+59
+43
+207
+57
+40
+205
+58
+38
+207
+57
+40
+209
+58
+41
+212
+56
+41
+216
+56
+42
+220
+53
+44
+220
+53
+44
+208
+47
+37
+205
+51
+41
+204
+56
+44
+202
+62
+47
+197
+64
+47
+193
+64
+45
+190
+61
+42
+188
+57
+39
+194
+57
+41
+190
+48
+34
+233
+87
+74
+223
+75
+63
+195
+47
+35
+209
+61
+49
+206
+60
+47
+199
+56
+40
+202
+59
+43
+201
+58
+41
+200
+57
+40
+199
+56
+39
+200
+55
+38
+201
+54
+38
+203
+53
+38
+204
+52
+38
+208
+55
+41
+215
+59
+46
+220
+62
+50
+220
+60
+48
+217
+55
+44
+218
+56
+45
+226
+62
+52
+236
+67
+60
+245
+66
+69
+242
+57
+63
+240
+50
+60
+246
+52
+63
+246
+50
+64
+241
+45
+59
+237
+45
+58
+237
+50
+61
+236
+55
+62
+230
+53
+59
+228
+54
+56
+229
+55
+56
+235
+57
+57
+240
+58
+57
+241
+55
+56
+239
+55
+55
+242
+59
+61
+238
+60
+60
+234
+58
+58
+230
+56
+55
+225
+56
+53
+223
+55
+52
+220
+55
+53
+220
+55
+53
+222
+57
+55
+225
+57
+56
+227
+57
+57
+230
+58
+58
+233
+57
+59
+236
+57
+60
+237
+57
+60
+239
+56
+60
+244
+55
+59
+243
+54
+58
+240
+56
+58
+237
+57
+58
+231
+59
+57
+224
+59
+53
+215
+57
+48
+207
+55
+44
+202
+56
+43
+200
+57
+41
+199
+57
+43
+198
+58
+41
+199
+58
+41
+199
+58
+40
+200
+59
+42
+199
+60
+41
+193
+57
+35
+196
+61
+39
+190
+58
+35
+182
+52
+30
+188
+57
+37
+201
+68
+51
+206
+64
+54
+201
+49
+44
+255
+95
+101
+255
+87
+103
+255
+75
+98
+252
+61
+92
+245
+51
+88
+242
+50
+89
+247
+56
+99
+240
+69
+105
+228
+91
+111
+171
+71
+81
+110
+52
+51
+78
+51
+44
+67
+63
+54
+65
+66
+60
+66
+54
+56
+66
+43
+49
+77
+46
+51
+77
+49
+46
+67
+56
+38
+68
+74
+40
+88
+110
+61
+125
+155
+95
+155
+186
+119
+167
+198
+130
+171
+203
+140
+159
+190
+130
+152
+182
+128
+148
+178
+126
+130
+160
+110
+102
+132
+82
+88
+118
+66
+89
+123
+63
+93
+128
+62
+99
+135
+65
+105
+143
+68
+110
+148
+73
+109
+149
+76
+108
+148
+78
+107
+146
+79
+108
+145
+78
+105
+142
+73
+102
+138
+68
+99
+134
+66
+99
+134
+66
+102
+137
+73
+104
+139
+75
+102
+138
+76
+100
+136
+74
+103
+139
+77
+104
+140
+78
+103
+139
+75
+102
+139
+72
+101
+138
+69
+102
+139
+69
+106
+143
+73
+107
+147
+74
+113
+155
+81
+113
+157
+82
+114
+158
+83
+42
+48
+34
+41
+47
+35
+41
+46
+39
+41
+46
+40
+45
+47
+44
+49
+51
+48
+53
+54
+49
+55
+56
+50
+59
+60
+52
+62
+63
+55
+65
+68
+61
+72
+74
+71
+79
+80
+84
+83
+85
+97
+88
+89
+107
+90
+92
+117
+92
+90
+127
+94
+93
+137
+100
+98
+148
+107
+106
+164
+117
+116
+186
+127
+126
+206
+135
+135
+223
+139
+140
+233
+141
+141
+239
+140
+140
+240
+137
+137
+235
+133
+132
+226
+128
+128
+216
+128
+126
+210
+128
+127
+207
+130
+130
+204
+133
+134
+199
+134
+135
+199
+135
+136
+201
+137
+136
+204
+139
+136
+207
+140
+134
+206
+141
+134
+204
+142
+133
+200
+138
+128
+188
+137
+127
+177
+134
+124
+161
+130
+120
+147
+123
+115
+130
+116
+107
+112
+108
+98
+96
+100
+93
+83
+99
+96
+79
+98
+96
+75
+101
+94
+75
+102
+94
+75
+105
+92
+73
+108
+93
+72
+110
+94
+71
+113
+93
+69
+121
+93
+71
+130
+89
+67
+149
+88
+70
+173
+90
+76
+199
+86
+80
+221
+83
+83
+243
+82
+88
+254
+89
+95
+240
+85
+83
+227
+76
+69
+217
+62
+57
+213
+54
+48
+217
+54
+47
+220
+57
+48
+219
+57
+44
+214
+57
+40
+211
+56
+38
+209
+56
+38
+209
+56
+40
+212
+56
+41
+215
+55
+41
+220
+54
+42
+223
+52
+44
+221
+53
+44
+206
+48
+39
+201
+53
+41
+200
+57
+43
+198
+61
+45
+196
+65
+47
+193
+64
+45
+191
+60
+42
+190
+57
+40
+196
+56
+41
+203
+60
+46
+228
+82
+69
+220
+72
+60
+200
+52
+40
+204
+58
+45
+200
+58
+44
+194
+52
+38
+202
+61
+44
+203
+60
+43
+202
+59
+42
+202
+59
+42
+203
+58
+41
+204
+57
+41
+206
+56
+41
+207
+54
+40
+211
+55
+42
+214
+56
+44
+217
+55
+44
+215
+51
+41
+213
+49
+39
+216
+49
+40
+222
+55
+46
+231
+60
+53
+248
+68
+71
+241
+56
+62
+237
+47
+57
+239
+47
+58
+240
+48
+61
+238
+46
+59
+235
+49
+60
+235
+54
+63
+228
+53
+58
+220
+51
+54
+216
+50
+50
+223
+58
+56
+238
+69
+66
+248
+73
+70
+248
+68
+67
+243
+63
+62
+233
+58
+55
+231
+57
+56
+229
+57
+55
+226
+57
+54
+225
+56
+53
+224
+56
+53
+225
+57
+56
+225
+57
+56
+224
+56
+55
+226
+56
+56
+229
+57
+57
+231
+57
+58
+233
+57
+59
+236
+57
+60
+237
+57
+60
+238
+55
+59
+243
+54
+58
+242
+53
+57
+238
+54
+56
+234
+56
+56
+228
+59
+56
+220
+58
+53
+211
+57
+47
+203
+55
+43
+198
+56
+42
+195
+58
+42
+194
+58
+42
+192
+59
+42
+192
+59
+42
+193
+60
+41
+193
+60
+43
+193
+60
+41
+189
+57
+36
+193
+63
+41
+187
+58
+37
+179
+53
+31
+185
+58
+39
+192
+60
+47
+201
+58
+50
+215
+61
+61
+255
+95
+103
+255
+81
+100
+253
+67
+91
+246
+57
+87
+242
+57
+91
+242
+61
+96
+240
+64
+100
+224
+74
+101
+170
+64
+76
+131
+63
+62
+95
+58
+50
+72
+58
+47
+59
+61
+48
+59
+61
+50
+73
+59
+58
+85
+61
+61
+81
+47
+46
+84
+55
+47
+87
+75
+53
+100
+104
+69
+119
+143
+91
+140
+176
+112
+154
+195
+125
+159
+199
+129
+152
+186
+125
+154
+185
+128
+154
+182
+131
+141
+169
+120
+114
+142
+94
+89
+117
+69
+84
+112
+61
+92
+123
+66
+95
+127
+64
+98
+134
+64
+105
+141
+67
+109
+147
+72
+108
+148
+75
+107
+147
+76
+105
+144
+77
+105
+144
+77
+103
+140
+71
+101
+137
+67
+99
+134
+66
+99
+134
+68
+103
+138
+74
+105
+140
+76
+104
+140
+78
+103
+139
+77
+105
+141
+79
+105
+141
+77
+105
+142
+75
+103
+140
+71
+103
+140
+70
+102
+142
+69
+108
+146
+73
+109
+149
+76
+112
+156
+81
+111
+157
+82
+114
+158
+83
+45
+49
+34
+45
+49
+35
+44
+47
+38
+44
+46
+41
+47
+47
+45
+49
+49
+47
+51
+52
+47
+52
+53
+45
+57
+59
+48
+60
+62
+49
+64
+66
+55
+69
+72
+65
+75
+77
+76
+81
+82
+87
+85
+85
+97
+86
+87
+105
+92
+89
+116
+94
+93
+127
+102
+100
+140
+112
+110
+160
+122
+120
+183
+133
+131
+206
+141
+139
+223
+144
+144
+234
+144
+142
+239
+142
+140
+237
+138
+137
+231
+135
+132
+223
+129
+127
+211
+127
+124
+203
+127
+125
+200
+128
+127
+195
+134
+134
+196
+136
+136
+196
+138
+138
+198
+140
+139
+199
+140
+138
+201
+140
+136
+197
+140
+132
+191
+139
+130
+183
+137
+128
+175
+134
+124
+161
+128
+118
+145
+123
+112
+129
+117
+106
+114
+110
+100
+99
+105
+94
+88
+99
+93
+81
+93
+98
+76
+93
+98
+75
+97
+95
+74
+103
+92
+74
+109
+90
+73
+112
+91
+72
+114
+92
+71
+114
+92
+69
+122
+96
+73
+123
+87
+63
+137
+82
+61
+164
+85
+68
+199
+88
+79
+224
+86
+83
+245
+80
+84
+252
+79
+83
+226
+62
+60
+222
+60
+55
+221
+56
+52
+222
+55
+49
+225
+54
+47
+225
+54
+46
+221
+55
+43
+218
+55
+40
+212
+55
+38
+211
+56
+36
+211
+56
+38
+213
+56
+39
+216
+54
+41
+221
+53
+42
+224
+51
+44
+221
+53
+44
+203
+51
+40
+196
+54
+40
+194
+57
+41
+193
+60
+43
+194
+63
+45
+194
+63
+45
+193
+60
+43
+192
+56
+40
+195
+53
+39
+220
+74
+61
+218
+70
+58
+213
+65
+53
+206
+60
+47
+196
+54
+40
+196
+59
+43
+190
+54
+38
+198
+58
+41
+199
+58
+41
+199
+58
+41
+201
+58
+42
+202
+56
+41
+203
+55
+41
+204
+54
+40
+205
+51
+39
+213
+57
+45
+213
+55
+44
+214
+51
+42
+215
+51
+42
+218
+51
+43
+223
+54
+47
+229
+58
+51
+233
+60
+56
+240
+60
+61
+237
+52
+57
+235
+48
+55
+236
+49
+56
+238
+51
+60
+237
+52
+60
+235
+55
+64
+234
+61
+67
+221
+55
+59
+225
+65
+65
+236
+78
+75
+248
+89
+85
+253
+90
+85
+250
+81
+76
+239
+66
+62
+229
+56
+52
+226
+54
+50
+224
+55
+50
+224
+55
+50
+224
+55
+50
+225
+56
+53
+226
+57
+54
+228
+59
+56
+228
+59
+56
+225
+55
+55
+228
+56
+56
+230
+56
+58
+232
+56
+59
+235
+56
+60
+235
+56
+60
+235
+56
+60
+236
+56
+59
+239
+53
+56
+238
+52
+55
+236
+53
+55
+231
+55
+55
+226
+58
+55
+217
+58
+52
+207
+56
+47
+199
+55
+44
+194
+56
+43
+191
+58
+43
+189
+59
+43
+187
+60
+43
+187
+60
+43
+187
+60
+41
+187
+60
+43
+187
+60
+41
+184
+57
+38
+189
+64
+42
+179
+57
+36
+177
+54
+36
+182
+59
+43
+180
+49
+39
+194
+52
+48
+235
+80
+84
+255
+92
+105
+254
+75
+96
+243
+59
+85
+237
+57
+86
+238
+65
+93
+236
+73
+102
+227
+75
+100
+202
+79
+97
+130
+56
+57
+102
+62
+54
+85
+63
+50
+71
+64
+48
+59
+60
+44
+56
+54
+41
+65
+52
+43
+78
+55
+47
+72
+43
+35
+83
+60
+44
+103
+93
+66
+129
+136
+95
+146
+171
+116
+149
+188
+123
+148
+194
+122
+149
+192
+123
+146
+180
+120
+156
+184
+133
+154
+180
+133
+128
+154
+109
+92
+117
+75
+72
+98
+53
+78
+104
+56
+91
+120
+66
+95
+125
+63
+99
+131
+64
+104
+140
+68
+108
+146
+71
+106
+146
+73
+104
+146
+74
+103
+144
+76
+102
+143
+75
+100
+137
+68
+100
+135
+67
+99
+134
+68
+101
+136
+70
+104
+139
+75
+107
+142
+78
+107
+143
+79
+106
+142
+78
+105
+144
+79
+105
+144
+79
+105
+144
+77
+104
+144
+74
+103
+143
+72
+104
+146
+72
+108
+148
+75
+111
+153
+77
+115
+161
+86
+115
+163
+87
+117
+163
+88
+50
+52
+38
+48
+52
+38
+48
+49
+41
+48
+49
+43
+49
+50
+45
+50
+51
+46
+51
+52
+46
+52
+54
+43
+57
+59
+45
+59
+62
+45
+63
+65
+51
+68
+70
+57
+73
+74
+68
+77
+79
+78
+82
+81
+87
+83
+83
+93
+88
+86
+100
+92
+90
+111
+100
+97
+126
+110
+108
+148
+122
+119
+172
+132
+130
+195
+140
+137
+214
+145
+143
+227
+148
+145
+234
+147
+144
+235
+142
+139
+226
+137
+133
+217
+130
+127
+204
+127
+124
+195
+127
+124
+191
+128
+126
+189
+132
+131
+189
+134
+133
+190
+137
+136
+193
+141
+138
+193
+139
+136
+189
+137
+133
+183
+135
+127
+174
+133
+125
+166
+133
+123
+157
+128
+118
+143
+121
+110
+127
+114
+102
+112
+109
+97
+99
+107
+93
+90
+105
+90
+83
+99
+91
+78
+92
+97
+75
+90
+98
+74
+97
+95
+74
+103
+92
+74
+111
+89
+75
+115
+89
+74
+117
+90
+73
+119
+91
+70
+118
+86
+65
+123
+81
+59
+139
+81
+61
+171
+88
+70
+205
+91
+80
+226
+84
+80
+237
+71
+73
+239
+63
+65
+219
+50
+47
+220
+53
+47
+225
+53
+49
+227
+54
+48
+227
+53
+46
+225
+53
+43
+224
+54
+41
+219
+56
+41
+214
+55
+36
+211
+56
+36
+209
+56
+38
+212
+57
+39
+216
+54
+41
+220
+54
+42
+224
+51
+44
+218
+54
+45
+200
+54
+41
+189
+56
+39
+188
+55
+38
+189
+58
+40
+191
+62
+43
+194
+63
+45
+195
+59
+43
+196
+56
+41
+198
+52
+39
+233
+85
+73
+211
+60
+49
+204
+56
+44
+209
+66
+52
+190
+53
+37
+192
+61
+43
+192
+61
+43
+192
+56
+40
+196
+56
+39
+197
+57
+40
+199
+58
+41
+200
+57
+41
+203
+55
+41
+204
+54
+40
+205
+51
+39
+210
+54
+42
+212
+51
+41
+213
+50
+41
+219
+52
+44
+227
+58
+51
+233
+62
+55
+236
+63
+57
+236
+61
+58
+232
+52
+53
+236
+53
+57
+239
+54
+59
+238
+53
+59
+234
+50
+58
+230
+51
+57
+228
+55
+61
+226
+60
+64
+243
+85
+86
+252
+98
+98
+255
+109
+106
+255
+105
+100
+243
+86
+81
+228
+65
+60
+223
+54
+51
+221
+52
+47
+223
+54
+49
+222
+55
+49
+222
+55
+49
+223
+56
+50
+225
+56
+53
+226
+57
+54
+229
+57
+55
+230
+58
+56
+229
+55
+56
+230
+56
+57
+232
+56
+59
+233
+57
+60
+235
+56
+60
+235
+56
+60
+235
+56
+60
+236
+55
+60
+238
+53
+58
+238
+54
+56
+234
+54
+55
+229
+57
+55
+223
+60
+55
+214
+60
+52
+204
+57
+47
+197
+57
+44
+190
+57
+42
+186
+59
+42
+182
+59
+41
+181
+60
+41
+181
+60
+43
+180
+61
+41
+179
+59
+42
+179
+60
+40
+179
+58
+39
+183
+64
+44
+173
+56
+38
+173
+56
+39
+179
+59
+45
+171
+43
+34
+193
+53
+52
+252
+97
+103
+253
+85
+100
+249
+72
+92
+238
+62
+85
+232
+62
+88
+229
+73
+95
+220
+81
+100
+206
+81
+95
+177
+85
+90
+119
+70
+65
+92
+70
+57
+79
+66
+50
+74
+67
+49
+70
+67
+48
+64
+61
+42
+61
+54
+35
+61
+50
+30
+65
+50
+29
+81
+70
+42
+110
+107
+72
+138
+147
+102
+149
+172
+116
+145
+180
+116
+141
+184
+115
+144
+186
+120
+157
+187
+133
+161
+184
+138
+144
+167
+125
+108
+130
+91
+75
+95
+58
+65
+87
+48
+76
+99
+55
+87
+114
+63
+95
+123
+64
+100
+131
+64
+105
+138
+67
+107
+145
+70
+105
+145
+72
+103
+145
+71
+100
+143
+72
+101
+142
+74
+98
+135
+66
+99
+134
+66
+100
+135
+69
+103
+138
+72
+106
+141
+77
+108
+143
+79
+109
+145
+81
+110
+146
+82
+106
+145
+80
+106
+145
+78
+106
+146
+76
+104
+146
+74
+103
+145
+71
+105
+147
+71
+109
+151
+75
+112
+156
+79
+119
+166
+88
+118
+166
+90
+118
+166
+90
+55
+56
+40
+54
+56
+42
+54
+54
+44
+53
+54
+46
+53
+54
+48
+53
+54
+48
+54
+55
+47
+54
+56
+43
+59
+62
+45
+61
+64
+45
+64
+67
+46
+68
+71
+52
+73
+75
+62
+77
+78
+70
+81
+80
+78
+82
+82
+82
+86
+85
+83
+89
+88
+93
+97
+95
+108
+107
+105
+129
+117
+115
+155
+128
+125
+178
+136
+134
+199
+140
+138
+211
+149
+146
+225
+148
+145
+226
+144
+141
+220
+139
+135
+211
+132
+129
+196
+129
+125
+186
+127
+124
+181
+127
+124
+179
+129
+126
+181
+132
+129
+182
+135
+133
+183
+137
+134
+181
+138
+132
+176
+134
+128
+166
+129
+122
+155
+128
+119
+146
+127
+115
+135
+122
+110
+124
+114
+101
+108
+109
+95
+95
+106
+91
+88
+105
+90
+83
+106
+89
+79
+102
+90
+76
+97
+96
+76
+95
+97
+76
+100
+95
+76
+105
+92
+75
+110
+91
+76
+116
+90
+75
+122
+90
+75
+125
+90
+71
+127
+84
+65
+136
+81
+61
+157
+81
+65
+182
+86
+70
+205
+83
+72
+216
+72
+64
+223
+58
+56
+226
+52
+51
+221
+49
+45
+223
+51
+47
+226
+53
+47
+227
+53
+46
+225
+51
+44
+223
+51
+41
+221
+53
+40
+220
+57
+40
+211
+56
+36
+208
+57
+36
+207
+58
+38
+209
+58
+39
+212
+56
+41
+217
+55
+42
+221
+53
+44
+216
+55
+45
+196
+59
+43
+185
+58
+41
+181
+54
+37
+183
+56
+39
+189
+59
+43
+194
+61
+46
+199
+59
+46
+199
+55
+44
+208
+57
+48
+245
+92
+84
+214
+61
+53
+201
+53
+43
+207
+65
+53
+184
+51
+36
+183
+58
+40
+188
+63
+43
+191
+58
+41
+195
+58
+42
+198
+58
+43
+200
+58
+44
+202
+59
+45
+204
+58
+45
+207
+56
+45
+209
+55
+45
+208
+51
+42
+210
+49
+41
+214
+49
+43
+222
+55
+49
+229
+60
+55
+234
+62
+58
+232
+59
+55
+230
+55
+52
+233
+55
+53
+239
+59
+60
+240
+60
+63
+234
+54
+57
+228
+49
+53
+228
+53
+58
+232
+66
+70
+237
+77
+79
+255
+120
+119
+255
+113
+110
+241
+96
+91
+221
+74
+67
+209
+56
+51
+209
+50
+46
+220
+55
+51
+231
+64
+58
+224
+57
+51
+224
+57
+49
+224
+55
+50
+224
+55
+50
+226
+54
+50
+227
+55
+51
+229
+55
+54
+229
+55
+54
+230
+54
+56
+231
+55
+57
+234
+55
+59
+235
+56
+60
+235
+56
+62
+235
+56
+62
+232
+55
+61
+234
+55
+59
+238
+55
+59
+238
+55
+57
+234
+55
+58
+228
+58
+58
+223
+61
+58
+214
+61
+55
+203
+59
+50
+195
+59
+47
+186
+56
+42
+181
+58
+42
+179
+59
+42
+175
+60
+41
+175
+60
+42
+172
+60
+40
+172
+59
+41
+172
+59
+41
+170
+59
+40
+172
+61
+42
+166
+56
+39
+167
+57
+42
+170
+56
+45
+171
+48
+41
+203
+64
+67
+255
+105
+114
+243
+78
+94
+241
+72
+91
+235
+69
+89
+226
+73
+91
+215
+80
+94
+199
+85
+93
+178
+86
+87
+153
+90
+85
+103
+75
+63
+83
+74
+57
+80
+68
+52
+78
+67
+49
+73
+67
+45
+66
+64
+39
+63
+66
+35
+65
+71
+35
+77
+85
+46
+94
+103
+60
+120
+129
+84
+139
+153
+102
+145
+164
+109
+141
+169
+110
+143
+178
+114
+151
+185
+125
+157
+183
+136
+146
+167
+128
+117
+134
+100
+82
+99
+67
+63
+80
+48
+66
+83
+49
+79
+97
+57
+86
+108
+61
+98
+123
+66
+101
+130
+66
+105
+138
+67
+106
+144
+69
+105
+146
+70
+101
+145
+70
+98
+144
+72
+99
+142
+71
+98
+135
+66
+102
+134
+67
+103
+138
+72
+105
+140
+74
+107
+142
+78
+109
+144
+80
+110
+146
+82
+111
+147
+83
+106
+145
+78
+107
+146
+79
+106
+147
+77
+105
+147
+75
+105
+147
+73
+106
+150
+73
+110
+154
+75
+114
+158
+79
+120
+167
+89
+118
+167
+88
+118
+167
+88
+63
+61
+46
+61
+62
+46
+61
+61
+49
+61
+61
+51
+61
+61
+53
+59
+60
+52
+59
+61
+50
+59
+61
+47
+63
+66
+47
+64
+68
+45
+67
+71
+46
+70
+74
+51
+75
+76
+58
+78
+79
+65
+81
+81
+73
+82
+82
+72
+89
+87
+74
+90
+90
+78
+95
+94
+92
+103
+101
+114
+113
+110
+137
+123
+121
+161
+131
+128
+183
+135
+133
+196
+143
+140
+209
+143
+140
+211
+141
+138
+207
+138
+133
+199
+131
+127
+186
+126
+121
+175
+122
+119
+166
+121
+118
+165
+123
+119
+169
+124
+122
+171
+128
+125
+170
+131
+126
+166
+131
+125
+161
+127
+121
+149
+124
+116
+137
+122
+114
+129
+118
+107
+115
+114
+102
+104
+109
+95
+94
+106
+91
+86
+107
+90
+82
+108
+90
+80
+108
+90
+78
+107
+91
+78
+103
+94
+77
+102
+95
+77
+103
+94
+77
+106
+93
+77
+110
+93
+77
+118
+92
+77
+124
+92
+77
+131
+89
+73
+150
+94
+79
+157
+85
+71
+169
+77
+64
+185
+73
+61
+197
+64
+55
+204
+56
+46
+213
+50
+43
+221
+50
+43
+225
+53
+49
+225
+54
+47
+226
+53
+46
+226
+52
+45
+224
+50
+41
+222
+52
+39
+220
+54
+38
+218
+59
+40
+209
+57
+36
+205
+59
+36
+204
+59
+38
+206
+59
+39
+209
+58
+41
+213
+57
+42
+217
+55
+44
+211
+57
+45
+193
+62
+44
+180
+59
+40
+176
+53
+35
+178
+53
+35
+187
+57
+41
+196
+60
+46
+201
+59
+47
+203
+55
+45
+217
+63
+55
+248
+91
+84
+227
+73
+65
+206
+58
+48
+204
+64
+51
+184
+54
+38
+172
+51
+32
+181
+60
+41
+188
+57
+39
+191
+55
+39
+192
+55
+39
+195
+55
+40
+197
+55
+41
+201
+55
+42
+206
+55
+44
+209
+55
+45
+217
+60
+51
+219
+58
+50
+222
+57
+51
+229
+60
+55
+234
+62
+58
+234
+61
+57
+231
+56
+53
+227
+52
+49
+232
+57
+54
+235
+60
+57
+236
+58
+58
+232
+56
+58
+236
+62
+64
+248
+80
+80
+255
+98
+99
+255
+112
+112
+249
+104
+101
+226
+84
+80
+202
+61
+54
+192
+49
+43
+201
+52
+48
+214
+59
+55
+223
+61
+58
+224
+59
+55
+226
+59
+53
+225
+58
+50
+226
+57
+52
+225
+56
+51
+227
+55
+51
+228
+55
+51
+229
+53
+53
+230
+54
+54
+233
+54
+57
+233
+54
+57
+234
+55
+59
+235
+56
+60
+235
+56
+62
+234
+55
+61
+232
+55
+61
+233
+54
+58
+239
+56
+60
+236
+56
+57
+232
+56
+58
+227
+59
+58
+221
+62
+58
+211
+62
+55
+201
+60
+50
+192
+60
+47
+182
+56
+41
+178
+58
+41
+174
+59
+41
+170
+59
+40
+169
+60
+40
+168
+59
+39
+165
+58
+38
+165
+58
+40
+165
+60
+41
+160
+57
+40
+160
+59
+41
+160
+57
+42
+162
+54
+42
+181
+62
+56
+219
+84
+88
+249
+102
+112
+237
+76
+92
+237
+74
+93
+231
+76
+92
+216
+78
+91
+198
+83
+90
+177
+87
+86
+156
+92
+82
+136
+97
+82
+84
+71
+55
+77
+74
+57
+83
+70
+53
+77
+62
+43
+63
+51
+27
+57
+54
+23
+65
+77
+37
+78
+102
+54
+108
+138
+84
+119
+148
+92
+132
+155
+101
+137
+154
+100
+141
+155
+102
+144
+163
+107
+148
+173
+116
+152
+176
+124
+131
+149
+109
+110
+125
+92
+81
+96
+67
+60
+74
+48
+57
+70
+44
+65
+80
+49
+79
+95
+59
+87
+106
+61
+99
+122
+68
+101
+130
+66
+106
+139
+68
+107
+145
+70
+105
+146
+70
+101
+145
+70
+97
+143
+70
+99
+142
+71
+99
+136
+67
+105
+137
+70
+106
+141
+75
+108
+143
+77
+108
+143
+79
+108
+143
+79
+109
+145
+81
+110
+146
+82
+109
+148
+81
+109
+149
+79
+109
+150
+80
+108
+150
+76
+107
+151
+74
+109
+153
+74
+114
+159
+78
+115
+162
+81
+124
+173
+94
+123
+172
+93
+122
+171
+92
+68
+65
+48
+68
+66
+51
+68
+66
+54
+67
+67
+57
+67
+67
+59
+67
+67
+59
+66
+66
+54
+66
+67
+51
+68
+70
+48
+69
+72
+45
+71
+74
+45
+74
+77
+50
+79
+78
+57
+82
+81
+63
+84
+82
+69
+85
+83
+68
+92
+90
+67
+92
+92
+68
+92
+93
+79
+97
+97
+97
+105
+104
+120
+114
+113
+144
+123
+122
+166
+129
+126
+181
+134
+130
+191
+136
+131
+195
+136
+132
+193
+132
+129
+186
+127
+123
+174
+121
+115
+161
+116
+111
+151
+111
+109
+148
+112
+109
+154
+114
+111
+158
+118
+113
+154
+119
+115
+150
+119
+115
+142
+116
+111
+131
+115
+107
+120
+114
+105
+110
+109
+97
+97
+108
+95
+89
+106
+92
+83
+107
+90
+80
+109
+91
+79
+111
+91
+80
+111
+92
+78
+111
+92
+78
+110
+92
+78
+109
+93
+78
+107
+94
+78
+108
+95
+79
+111
+95
+79
+117
+96
+79
+125
+93
+78
+137
+89
+77
+161
+95
+83
+167
+79
+69
+174
+66
+56
+186
+59
+50
+197
+55
+45
+204
+50
+40
+212
+51
+41
+220
+53
+44
+224
+55
+48
+225
+54
+47
+225
+52
+45
+224
+51
+44
+224
+52
+42
+221
+53
+40
+216
+55
+37
+212
+57
+37
+207
+58
+34
+202
+61
+34
+201
+61
+36
+202
+62
+39
+205
+60
+41
+210
+59
+42
+213
+57
+44
+207
+59
+45
+191
+64
+45
+177
+60
+40
+172
+53
+33
+174
+51
+33
+186
+56
+40
+196
+60
+46
+202
+58
+47
+206
+53
+45
+216
+57
+51
+240
+78
+73
+241
+84
+77
+217
+66
+57
+204
+66
+53
+190
+63
+46
+166
+49
+29
+179
+60
+40
+190
+60
+44
+193
+57
+43
+193
+55
+42
+194
+54
+41
+197
+55
+43
+201
+57
+46
+207
+59
+49
+212
+59
+51
+225
+68
+61
+227
+65
+60
+228
+63
+59
+231
+62
+59
+233
+61
+59
+233
+59
+58
+232
+56
+56
+231
+56
+53
+231
+56
+53
+230
+57
+53
+230
+55
+52
+233
+59
+58
+244
+74
+74
+255
+92
+91
+255
+100
+99
+248
+99
+95
+204
+61
+57
+193
+56
+50
+189
+52
+46
+195
+56
+49
+213
+65
+61
+222
+69
+64
+223
+61
+59
+217
+52
+50
+226
+59
+53
+226
+59
+51
+226
+57
+52
+226
+57
+52
+228
+56
+52
+229
+56
+52
+231
+55
+55
+233
+55
+55
+234
+54
+57
+235
+55
+58
+235
+54
+59
+235
+56
+60
+235
+56
+62
+232
+55
+61
+232
+55
+61
+233
+54
+58
+235
+55
+58
+233
+54
+57
+230
+56
+57
+224
+59
+57
+219
+62
+57
+209
+62
+54
+198
+60
+49
+190
+60
+46
+179
+56
+41
+174
+59
+41
+170
+59
+40
+166
+59
+39
+164
+59
+40
+163
+58
+39
+163
+58
+39
+160
+57
+38
+161
+62
+43
+150
+55
+37
+156
+61
+43
+154
+57
+41
+154
+50
+39
+195
+80
+75
+237
+107
+109
+237
+93
+102
+235
+80
+94
+232
+75
+92
+220
+74
+87
+202
+77
+83
+182
+84
+83
+161
+93
+82
+142
+101
+81
+127
+106
+85
+78
+75
+56
+75
+72
+55
+80
+63
+47
+76
+55
+36
+69
+53
+27
+71
+71
+35
+87
+111
+61
+105
+146
+86
+127
+178
+111
+130
+179
+113
+131
+165
+104
+125
+146
+89
+131
+141
+89
+142
+150
+99
+137
+151
+100
+124
+140
+95
+88
+102
+67
+71
+84
+56
+57
+69
+45
+54
+66
+42
+58
+68
+44
+61
+74
+48
+74
+88
+55
+87
+104
+62
+101
+124
+70
+104
+130
+67
+108
+139
+69
+108
+144
+70
+105
+147
+71
+99
+145
+70
+97
+145
+71
+97
+143
+71
+102
+139
+70
+108
+140
+73
+109
+144
+78
+110
+145
+79
+108
+143
+79
+107
+142
+78
+107
+143
+79
+109
+145
+81
+112
+151
+84
+113
+153
+83
+112
+153
+83
+112
+154
+80
+111
+155
+78
+113
+157
+78
+116
+163
+82
+119
+166
+85
+126
+175
+96
+123
+174
+95
+121
+172
+93
+73
+67
+51
+74
+68
+54
+73
+69
+57
+73
+69
+58
+73
+71
+59
+73
+71
+59
+72
+70
+57
+72
+71
+53
+73
+72
+51
+74
+74
+50
+76
+76
+50
+78
+78
+52
+82
+80
+59
+84
+81
+62
+88
+82
+68
+89
+84
+65
+93
+89
+62
+91
+90
+62
+92
+89
+72
+94
+91
+84
+100
+97
+104
+110
+107
+126
+120
+115
+147
+125
+120
+160
+129
+123
+167
+131
+125
+171
+133
+127
+173
+131
+124
+166
+125
+119
+157
+117
+110
+143
+111
+105
+133
+107
+103
+130
+105
+102
+133
+106
+103
+134
+109
+104
+134
+109
+105
+128
+109
+105
+120
+108
+103
+110
+107
+98
+101
+106
+96
+94
+103
+93
+84
+104
+92
+80
+104
+90
+77
+107
+91
+76
+110
+93
+77
+113
+94
+79
+113
+94
+79
+112
+93
+78
+112
+93
+79
+111
+93
+79
+112
+93
+78
+115
+93
+79
+119
+93
+78
+126
+93
+78
+137
+91
+76
+147
+87
+76
+162
+84
+72
+166
+69
+60
+171
+57
+47
+186
+55
+45
+200
+56
+47
+211
+54
+45
+217
+54
+45
+221
+54
+45
+223
+54
+47
+223
+52
+45
+223
+52
+44
+223
+52
+44
+223
+55
+44
+221
+55
+41
+216
+54
+39
+209
+54
+36
+207
+58
+36
+204
+60
+36
+202
+60
+38
+203
+61
+39
+206
+59
+41
+209
+59
+42
+211
+58
+44
+206
+60
+45
+190
+65
+47
+175
+60
+39
+168
+51
+33
+172
+51
+32
+182
+57
+39
+193
+61
+46
+201
+59
+47
+204
+56
+46
+204
+50
+42
+224
+65
+59
+248
+91
+84
+224
+73
+64
+208
+68
+55
+202
+70
+55
+171
+50
+31
+184
+63
+44
+202
+70
+55
+204
+66
+53
+202
+64
+51
+203
+63
+50
+205
+63
+51
+210
+66
+55
+220
+69
+60
+225
+71
+63
+226
+64
+59
+226
+61
+57
+227
+58
+55
+226
+54
+52
+226
+54
+52
+227
+55
+53
+229
+57
+55
+229
+60
+57
+228
+63
+57
+224
+61
+54
+221
+58
+53
+225
+63
+58
+234
+77
+72
+234
+81
+76
+211
+64
+57
+184
+41
+35
+184
+45
+38
+190
+53
+45
+201
+62
+55
+208
+65
+59
+214
+62
+57
+217
+59
+56
+225
+59
+59
+231
+61
+61
+226
+57
+54
+226
+57
+54
+226
+57
+54
+228
+56
+54
+229
+57
+53
+231
+58
+54
+233
+57
+57
+234
+58
+58
+234
+56
+56
+234
+56
+56
+235
+56
+59
+235
+56
+59
+233
+57
+60
+232
+56
+59
+231
+55
+58
+231
+55
+58
+233
+54
+58
+230
+54
+56
+226
+56
+56
+222
+58
+56
+214
+61
+56
+204
+61
+53
+194
+60
+49
+185
+59
+45
+174
+57
+40
+170
+59
+42
+166
+59
+41
+162
+59
+40
+160
+59
+39
+158
+59
+38
+159
+58
+40
+155
+58
+39
+152
+63
+45
+140
+53
+34
+153
+61
+46
+152
+56
+42
+151
+47
+38
+205
+92
+88
+246
+122
+124
+222
+88
+95
+229
+89
+100
+217
+81
+91
+200
+77
+82
+183
+77
+79
+167
+87
+80
+155
+97
+85
+141
+104
+85
+128
+110
+86
+84
+84
+56
+67
+72
+42
+66
+57
+28
+72
+59
+27
+88
+80
+43
+110
+116
+68
+132
+162
+102
+148
+193
+126
+135
+188
+118
+134
+184
+115
+124
+158
+97
+110
+130
+77
+117
+126
+81
+130
+135
+94
+117
+125
+86
+91
+98
+64
+59
+68
+41
+52
+60
+37
+53
+61
+40
+61
+68
+50
+60
+69
+50
+57
+67
+43
+67
+80
+50
+85
+101
+62
+103
+123
+72
+105
+131
+70
+108
+139
+71
+109
+145
+71
+106
+147
+71
+102
+146
+71
+98
+144
+71
+99
+142
+71
+104
+141
+74
+108
+143
+77
+111
+146
+80
+110
+147
+80
+108
+143
+77
+105
+142
+75
+106
+143
+74
+106
+146
+76
+115
+155
+84
+115
+157
+85
+115
+157
+83
+114
+158
+81
+114
+158
+79
+115
+162
+82
+119
+166
+85
+122
+171
+90
+119
+167
+91
+117
+165
+91
+116
+164
+90
+82
+75
+59
+82
+75
+59
+82
+74
+61
+82
+74
+61
+82
+74
+61
+82
+74
+61
+82
+74
+61
+82
+75
+59
+85
+78
+60
+86
+79
+61
+87
+80
+62
+88
+81
+63
+89
+82
+64
+91
+84
+68
+92
+85
+69
+92
+85
+69
+98
+91
+72
+97
+90
+72
+97
+89
+76
+98
+89
+82
+101
+93
+91
+107
+97
+105
+113
+102
+116
+117
+106
+123
+122
+110
+132
+124
+112
+136
+127
+115
+139
+127
+115
+137
+124
+112
+132
+117
+106
+123
+109
+98
+114
+101
+93
+106
+99
+96
+105
+96
+95
+101
+95
+93
+98
+95
+90
+94
+94
+90
+89
+94
+89
+85
+97
+90
+82
+98
+90
+79
+101
+91
+79
+103
+91
+75
+105
+92
+75
+107
+92
+73
+107
+92
+71
+109
+92
+72
+109
+93
+70
+106
+94
+72
+106
+98
+79
+114
+101
+84
+113
+90
+74
+117
+79
+66
+139
+87
+74
+156
+92
+80
+162
+90
+76
+170
+91
+76
+164
+78
+61
+165
+70
+52
+166
+60
+44
+176
+56
+40
+194
+56
+45
+210
+56
+48
+221
+52
+49
+222
+49
+45
+223
+54
+47
+222
+55
+46
+222
+55
+46
+222
+55
+46
+222
+55
+46
+219
+55
+43
+216
+54
+41
+215
+55
+41
+213
+56
+41
+212
+56
+41
+210
+57
+41
+210
+57
+41
+210
+57
+43
+210
+57
+43
+212
+56
+43
+205
+59
+44
+189
+59
+43
+182
+62
+45
+174
+57
+40
+169
+49
+32
+171
+50
+33
+183
+57
+42
+192
+60
+47
+195
+57
+46
+200
+53
+43
+206
+53
+45
+212
+58
+48
+219
+67
+56
+221
+75
+62
+212
+72
+57
+194
+61
+44
+183
+50
+35
+221
+80
+70
+216
+74
+64
+212
+70
+60
+211
+69
+59
+215
+73
+63
+219
+72
+64
+221
+68
+62
+223
+61
+58
+223
+55
+52
+230
+56
+55
+234
+58
+58
+234
+58
+58
+229
+57
+55
+224
+55
+52
+222
+57
+51
+220
+61
+55
+220
+69
+62
+209
+65
+57
+199
+57
+47
+191
+50
+40
+185
+48
+38
+186
+52
+41
+191
+59
+47
+195
+63
+51
+195
+58
+48
+199
+61
+51
+208
+64
+55
+217
+64
+58
+224
+62
+59
+229
+60
+57
+233
+57
+57
+236
+58
+58
+230
+56
+58
+229
+56
+58
+229
+56
+58
+229
+57
+57
+229
+57
+55
+229
+57
+55
+229
+57
+53
+229
+57
+53
+224
+52
+48
+225
+53
+49
+228
+54
+53
+229
+55
+54
+230
+56
+57
+231
+57
+58
+231
+57
+58
+231
+57
+59
+235
+59
+62
+230
+57
+59
+223
+57
+57
+220
+61
+58
+214
+65
+61
+205
+66
+59
+193
+65
+54
+183
+63
+49
+169
+58
+41
+163
+60
+43
+160
+61
+42
+155
+60
+40
+153
+58
+38
+150
+58
+37
+151
+56
+38
+145
+56
+38
+144
+65
+48
+139
+60
+45
+135
+47
+35
+145
+47
+38
+188
+76
+74
+228
+109
+111
+229
+109
+111
+205
+86
+90
+189
+76
+78
+181
+78
+79
+170
+81
+77
+162
+85
+79
+155
+88
+79
+150
+93
+82
+149
+97
+84
+138
+106
+83
+88
+89
+47
+61
+75
+22
+56
+69
+15
+86
+97
+41
+127
+141
+80
+155
+176
+111
+161
+188
+121
+156
+189
+120
+146
+181
+115
+126
+157
+97
+104
+128
+76
+92
+109
+67
+89
+100
+66
+84
+93
+66
+72
+80
+57
+63
+68
+48
+58
+61
+44
+64
+67
+50
+60
+64
+49
+58
+62
+48
+60
+67
+51
+58
+67
+48
+65
+78
+50
+82
+100
+62
+93
+115
+66
+103
+131
+72
+112
+143
+75
+111
+147
+75
+108
+146
+71
+106
+146
+73
+105
+147
+75
+103
+144
+74
+108
+144
+80
+109
+145
+83
+111
+147
+83
+108
+147
+80
+109
+146
+77
+107
+147
+74
+109
+150
+74
+109
+152
+73
+113
+156
+76
+113
+158
+77
+114
+159
+78
+114
+161
+80
+116
+163
+82
+118
+167
+85
+121
+170
+89
+122
+170
+94
+123
+168
+101
+111
+155
+92
+101
+145
+82
+87
+78
+63
+87
+78
+63
+87
+78
+63
+87
+78
+63
+87
+78
+63
+87
+78
+63
+87
+78
+63
+87
+78
+63
+88
+79
+64
+89
+80
+65
+89
+80
+65
+91
+82
+67
+92
+83
+68
+93
+84
+69
+94
+85
+70
+95
+86
+71
+100
+91
+74
+99
+90
+73
+99
+89
+77
+99
+89
+79
+102
+91
+85
+106
+95
+93
+110
+98
+100
+112
+100
+104
+114
+101
+108
+116
+103
+112
+118
+105
+114
+118
+105
+114
+115
+102
+109
+109
+96
+103
+103
+91
+95
+98
+88
+89
+94
+91
+86
+90
+90
+82
+89
+86
+79
+87
+84
+75
+88
+84
+73
+88
+84
+72
+92
+86
+72
+94
+87
+71
+99
+90
+75
+99
+90
+73
+102
+91
+73
+103
+92
+72
+105
+93
+71
+106
+94
+70
+107
+95
+71
+106
+95
+73
+102
+97
+77
+111
+103
+84
+119
+91
+77
+129
+83
+70
+153
+86
+77
+168
+88
+79
+175
+82
+74
+180
+82
+69
+173
+73
+57
+170
+67
+48
+171
+61
+44
+177
+57
+41
+190
+56
+44
+204
+55
+48
+216
+52
+50
+220
+51
+48
+221
+54
+46
+220
+56
+46
+220
+56
+46
+220
+56
+46
+219
+55
+45
+218
+56
+45
+217
+55
+44
+215
+55
+43
+215
+55
+43
+213
+55
+43
+213
+55
+43
+213
+55
+43
+212
+56
+43
+212
+56
+43
+212
+56
+43
+206
+58
+44
+190
+60
+46
+182
+62
+46
+174
+57
+40
+166
+49
+32
+167
+50
+32
+178
+58
+41
+185
+62
+46
+190
+60
+46
+198
+58
+45
+199
+52
+42
+203
+52
+41
+210
+59
+48
+220
+69
+58
+225
+79
+66
+223
+81
+67
+221
+79
+67
+219
+70
+63
+214
+65
+59
+209
+60
+53
+208
+59
+52
+211
+62
+55
+215
+62
+56
+217
+58
+54
+218
+53
+51
+230
+56
+55
+234
+56
+56
+236
+56
+57
+234
+56
+56
+230
+56
+55
+226
+58
+55
+225
+62
+57
+219
+66
+58
+205
+64
+55
+194
+61
+52
+187
+57
+44
+180
+52
+39
+178
+52
+38
+181
+55
+41
+186
+60
+45
+191
+64
+49
+198
+64
+52
+205
+64
+54
+213
+65
+55
+220
+63
+56
+226
+58
+55
+230
+56
+55
+235
+55
+54
+239
+56
+58
+233
+54
+58
+231
+54
+60
+231
+55
+58
+230
+56
+57
+230
+56
+55
+229
+57
+53
+229
+57
+53
+227
+58
+53
+226
+57
+50
+227
+58
+51
+227
+58
+53
+228
+59
+54
+228
+59
+56
+228
+59
+56
+229
+57
+57
+229
+57
+57
+228
+58
+59
+227
+59
+59
+223
+60
+61
+217
+63
+61
+208
+65
+59
+196
+63
+54
+183
+61
+50
+172
+59
+45
+165
+59
+43
+160
+61
+42
+156
+61
+43
+151
+60
+41
+150
+59
+40
+146
+58
+38
+147
+56
+37
+140
+58
+37
+128
+57
+39
+128
+56
+41
+137
+53
+42
+157
+60
+53
+191
+81
+80
+215
+101
+101
+209
+94
+97
+183
+77
+77
+172
+78
+76
+164
+84
+77
+157
+89
+80
+152
+92
+81
+151
+94
+83
+151
+94
+83
+152
+95
+86
+140
+102
+81
+96
+95
+47
+83
+103
+42
+94
+114
+51
+122
+144
+79
+153
+175
+110
+165
+190
+124
+153
+178
+112
+136
+160
+98
+106
+130
+72
+97
+117
+66
+84
+101
+59
+74
+88
+55
+70
+80
+55
+63
+72
+53
+57
+63
+49
+53
+56
+45
+58
+60
+47
+65
+66
+52
+61
+63
+52
+58
+61
+50
+61
+65
+51
+58
+67
+48
+64
+77
+51
+82
+100
+62
+94
+116
+69
+103
+131
+72
+113
+144
+77
+112
+148
+76
+110
+146
+72
+107
+148
+72
+107
+147
+76
+104
+145
+75
+109
+145
+81
+110
+146
+84
+109
+148
+83
+109
+148
+81
+107
+147
+76
+107
+148
+72
+108
+151
+72
+109
+152
+72
+112
+157
+74
+112
+157
+74
+112
+160
+76
+115
+162
+81
+117
+166
+84
+120
+169
+88
+120
+169
+88
+120
+168
+94
+110
+152
+89
+100
+141
+83
+90
+131
+73
+93
+84
+69
+93
+84
+69
+93
+84
+69
+93
+84
+69
+93
+84
+69
+93
+84
+69
+93
+84
+69
+93
+84
+69
+91
+82
+67
+92
+83
+68
+93
+84
+69
+94
+85
+70
+95
+86
+71
+96
+87
+72
+97
+88
+73
+97
+88
+71
+101
+93
+74
+101
+93
+72
+100
+91
+74
+100
+91
+76
+101
+91
+81
+102
+91
+85
+104
+93
+89
+104
+93
+91
+105
+93
+93
+106
+94
+94
+107
+95
+95
+107
+95
+95
+105
+94
+92
+102
+91
+89
+98
+87
+83
+95
+86
+81
+90
+86
+77
+87
+84
+75
+85
+81
+72
+82
+78
+67
+81
+77
+66
+83
+79
+67
+87
+81
+67
+88
+82
+66
+94
+87
+71
+94
+87
+69
+97
+89
+70
+99
+91
+70
+103
+92
+72
+105
+94
+72
+107
+96
+74
+105
+97
+76
+101
+96
+77
+113
+101
+85
+123
+94
+80
+136
+88
+78
+162
+91
+85
+175
+88
+81
+177
+74
+69
+182
+71
+64
+182
+65
+55
+183
+63
+49
+182
+60
+47
+184
+56
+43
+189
+55
+43
+197
+57
+44
+204
+57
+47
+211
+57
+47
+217
+56
+46
+219
+55
+45
+219
+55
+45
+219
+57
+46
+218
+56
+45
+217
+55
+44
+217
+55
+44
+215
+55
+43
+215
+55
+43
+213
+55
+43
+213
+55
+43
+212
+56
+43
+212
+56
+43
+212
+56
+43
+210
+57
+43
+205
+59
+44
+192
+62
+48
+182
+62
+46
+173
+58
+40
+163
+50
+32
+163
+51
+31
+170
+58
+38
+179
+62
+44
+185
+62
+46
+196
+63
+48
+196
+56
+43
+197
+50
+40
+200
+52
+42
+208
+60
+48
+216
+70
+57
+220
+77
+63
+225
+78
+68
+216
+59
+54
+215
+53
+51
+210
+51
+48
+211
+53
+50
+216
+58
+55
+222
+63
+60
+227
+62
+60
+232
+60
+60
+236
+57
+60
+237
+54
+58
+234
+51
+55
+231
+51
+54
+230
+54
+56
+227
+57
+57
+224
+60
+58
+217
+64
+58
+193
+55
+45
+184
+56
+43
+179
+53
+39
+175
+52
+37
+175
+52
+37
+178
+55
+40
+182
+59
+43
+187
+61
+46
+200
+68
+53
+205
+67
+54
+213
+66
+56
+217
+63
+55
+223
+58
+52
+229
+56
+52
+234
+54
+53
+238
+55
+57
+234
+54
+57
+233
+54
+57
+233
+54
+57
+231
+55
+55
+231
+55
+55
+230
+57
+53
+229
+57
+53
+229
+58
+51
+227
+58
+51
+228
+59
+52
+228
+59
+54
+227
+60
+54
+227
+59
+56
+226
+58
+57
+225
+57
+57
+222
+56
+56
+221
+57
+58
+220
+60
+60
+218
+64
+62
+211
+66
+61
+200
+63
+57
+185
+58
+49
+173
+55
+43
+165
+55
+40
+161
+59
+44
+157
+60
+43
+153
+60
+43
+148
+59
+41
+147
+58
+40
+144
+57
+38
+144
+55
+37
+138
+57
+38
+122
+54
+35
+121
+54
+37
+136
+57
+44
+160
+70
+61
+185
+83
+79
+192
+87
+84
+184
+80
+79
+171
+73
+70
+162
+77
+72
+156
+83
+76
+153
+89
+80
+151
+94
+83
+151
+97
+87
+151
+97
+87
+152
+95
+86
+139
+101
+80
+115
+114
+70
+122
+141
+86
+147
+166
+110
+164
+185
+128
+171
+192
+135
+158
+179
+123
+124
+144
+91
+91
+111
+60
+63
+82
+36
+65
+83
+43
+65
+80
+47
+63
+76
+50
+58
+67
+48
+54
+60
+46
+54
+57
+48
+53
+56
+47
+57
+59
+46
+64
+65
+51
+61
+63
+52
+57
+60
+49
+61
+65
+51
+57
+66
+47
+64
+77
+51
+81
+99
+61
+96
+118
+71
+105
+133
+74
+115
+146
+79
+114
+150
+78
+112
+148
+74
+109
+150
+74
+109
+149
+78
+107
+148
+78
+112
+148
+84
+113
+149
+85
+111
+150
+83
+110
+150
+80
+108
+148
+75
+108
+149
+73
+108
+151
+72
+110
+153
+73
+112
+157
+76
+112
+157
+76
+112
+159
+78
+117
+164
+83
+120
+169
+88
+121
+170
+91
+117
+166
+87
+113
+160
+88
+95
+137
+74
+86
+127
+69
+79
+120
+62
+97
+88
+73
+97
+88
+73
+97
+88
+73
+97
+88
+73
+97
+88
+73
+97
+88
+73
+97
+88
+73
+97
+88
+73
+95
+86
+71
+96
+87
+72
+96
+87
+72
+97
+88
+73
+98
+89
+74
+99
+90
+75
+100
+91
+76
+100
+91
+74
+101
+93
+72
+102
+94
+71
+102
+94
+73
+103
+95
+76
+103
+94
+79
+102
+92
+80
+102
+92
+82
+102
+92
+83
+104
+93
+87
+104
+93
+87
+104
+93
+87
+104
+94
+85
+103
+93
+84
+101
+91
+81
+100
+90
+80
+99
+91
+78
+93
+89
+77
+90
+86
+74
+86
+82
+70
+82
+78
+66
+80
+76
+64
+80
+77
+62
+84
+78
+64
+85
+79
+63
+87
+81
+65
+89
+84
+65
+91
+86
+67
+93
+88
+68
+97
+90
+71
+100
+93
+74
+102
+95
+76
+102
+97
+77
+103
+97
+81
+111
+99
+85
+119
+91
+79
+138
+91
+81
+169
+98
+92
+182
+91
+88
+180
+71
+68
+183
+61
+58
+193
+61
+56
+195
+60
+54
+195
+58
+48
+193
+57
+45
+189
+56
+41
+189
+57
+42
+193
+61
+46
+202
+62
+47
+213
+57
+45
+217
+55
+44
+218
+56
+45
+217
+57
+45
+218
+56
+45
+216
+56
+44
+216
+56
+44
+213
+55
+43
+213
+55
+43
+212
+56
+43
+212
+56
+43
+212
+56
+43
+212
+56
+43
+212
+56
+43
+210
+57
+43
+205
+59
+44
+193
+63
+49
+182
+62
+46
+172
+57
+39
+162
+51
+32
+157
+51
+29
+162
+56
+34
+172
+61
+41
+181
+64
+46
+188
+63
+45
+191
+58
+43
+195
+55
+42
+197
+53
+42
+203
+55
+43
+206
+58
+46
+206
+60
+47
+211
+58
+50
+220
+55
+53
+223
+50
+52
+218
+50
+50
+218
+52
+52
+222
+56
+56
+226
+60
+60
+232
+62
+63
+235
+61
+62
+235
+56
+60
+235
+52
+56
+232
+49
+54
+229
+50
+53
+228
+54
+56
+224
+56
+55
+217
+55
+53
+204
+55
+49
+185
+51
+40
+177
+54
+39
+175
+53
+38
+174
+54
+38
+174
+54
+38
+176
+56
+40
+179
+58
+41
+181
+58
+42
+195
+65
+49
+202
+66
+52
+210
+66
+55
+217
+64
+56
+223
+60
+53
+227
+58
+53
+234
+56
+54
+236
+56
+55
+237
+54
+56
+235
+55
+56
+235
+55
+56
+234
+56
+54
+234
+56
+54
+232
+57
+52
+231
+58
+52
+230
+59
+52
+226
+57
+50
+225
+58
+50
+223
+58
+52
+224
+59
+55
+222
+58
+56
+220
+58
+56
+219
+57
+55
+217
+57
+57
+214
+60
+58
+213
+64
+60
+210
+67
+61
+202
+65
+59
+187
+59
+50
+175
+54
+43
+164
+54
+39
+158
+55
+40
+156
+59
+42
+152
+59
+41
+148
+59
+41
+146
+59
+40
+143
+58
+38
+141
+56
+36
+140
+55
+35
+135
+57
+37
+128
+61
+42
+118
+53
+35
+129
+53
+39
+153
+69
+58
+170
+80
+72
+172
+77
+71
+169
+76
+71
+166
+81
+76
+157
+80
+74
+152
+85
+76
+148
+90
+79
+148
+94
+82
+149
+97
+86
+149
+97
+86
+151
+97
+87
+141
+103
+84
+137
+133
+95
+153
+169
+120
+173
+189
+142
+166
+184
+136
+144
+161
+116
+115
+134
+89
+78
+96
+56
+47
+65
+27
+45
+62
+28
+51
+66
+37
+58
+70
+46
+61
+70
+51
+59
+65
+51
+58
+61
+50
+58
+61
+52
+60
+61
+53
+57
+57
+45
+63
+64
+50
+60
+62
+51
+57
+60
+49
+60
+64
+50
+57
+66
+47
+63
+76
+50
+80
+98
+60
+97
+119
+72
+106
+134
+75
+116
+147
+80
+115
+151
+79
+114
+150
+76
+111
+152
+76
+111
+151
+80
+109
+151
+79
+112
+151
+84
+115
+152
+85
+112
+152
+82
+111
+151
+80
+109
+150
+74
+109
+150
+72
+110
+153
+74
+112
+155
+75
+113
+158
+77
+114
+159
+78
+116
+163
+83
+121
+168
+88
+123
+172
+93
+119
+167
+91
+109
+157
+83
+101
+146
+77
+90
+132
+69
+82
+123
+65
+77
+118
+60
+99
+90
+75
+99
+90
+75
+99
+90
+75
+99
+90
+75
+99
+90
+75
+99
+90
+75
+99
+90
+75
+99
+90
+75
+99
+90
+75
+99
+90
+75
+100
+91
+76
+100
+91
+76
+101
+92
+77
+102
+93
+78
+102
+93
+78
+102
+93
+76
+102
+94
+71
+103
+95
+72
+104
+96
+73
+105
+97
+76
+105
+97
+78
+105
+96
+79
+104
+95
+80
+103
+94
+79
+106
+96
+84
+105
+96
+81
+105
+96
+81
+104
+95
+78
+104
+95
+78
+104
+96
+77
+104
+96
+77
+104
+97
+78
+100
+94
+78
+96
+90
+76
+91
+85
+71
+86
+80
+66
+80
+77
+62
+78
+75
+58
+78
+75
+58
+78
+75
+58
+80
+77
+60
+82
+79
+62
+84
+81
+64
+86
+83
+64
+88
+87
+67
+91
+90
+70
+93
+92
+72
+95
+92
+75
+99
+96
+81
+105
+93
+81
+112
+85
+74
+134
+91
+82
+172
+105
+99
+189
+100
+96
+191
+79
+77
+197
+67
+67
+205
+61
+61
+210
+58
+57
+209
+57
+52
+203
+56
+48
+194
+56
+43
+187
+60
+41
+184
+65
+43
+190
+65
+43
+208
+58
+43
+215
+55
+41
+216
+56
+42
+215
+58
+43
+217
+57
+43
+214
+57
+42
+214
+57
+42
+212
+56
+41
+212
+56
+41
+212
+56
+41
+212
+56
+41
+210
+57
+41
+210
+57
+41
+210
+57
+41
+210
+57
+41
+205
+59
+44
+193
+63
+49
+182
+62
+48
+171
+58
+40
+161
+54
+34
+154
+52
+30
+155
+55
+32
+163
+61
+38
+175
+66
+45
+179
+59
+42
+186
+59
+44
+194
+58
+44
+199
+57
+45
+203
+56
+46
+206
+58
+48
+208
+60
+48
+216
+59
+52
+232
+58
+60
+234
+53
+60
+228
+51
+57
+226
+51
+56
+223
+53
+56
+223
+53
+56
+225
+52
+56
+225
+51
+53
+233
+54
+60
+232
+53
+57
+231
+52
+58
+230
+56
+58
+226
+57
+60
+218
+56
+54
+206
+51
+49
+191
+48
+40
+181
+53
+40
+174
+57
+40
+174
+57
+40
+173
+58
+40
+173
+58
+40
+173
+58
+40
+173
+56
+38
+175
+55
+38
+184
+58
+43
+193
+59
+47
+205
+63
+51
+215
+64
+55
+221
+62
+56
+225
+60
+56
+231
+58
+54
+235
+57
+55
+237
+55
+54
+238
+54
+54
+238
+54
+54
+237
+55
+52
+234
+56
+52
+232
+58
+51
+231
+58
+51
+228
+60
+51
+225
+58
+50
+223
+59
+50
+223
+60
+53
+220
+61
+55
+219
+61
+58
+217
+62
+60
+215
+61
+59
+212
+62
+61
+207
+64
+60
+203
+66
+60
+197
+66
+58
+185
+61
+53
+173
+55
+45
+163
+53
+40
+158
+55
+40
+154
+58
+42
+150
+59
+41
+147
+60
+41
+145
+59
+42
+141
+58
+40
+138
+57
+38
+137
+56
+37
+136
+55
+36
+131
+56
+37
+131
+64
+45
+117
+52
+34
+123
+51
+37
+147
+71
+58
+164
+81
+73
+161
+78
+70
+158
+78
+71
+161
+87
+78
+152
+85
+76
+146
+88
+76
+144
+90
+78
+141
+92
+78
+143
+93
+82
+148
+96
+85
+151
+97
+87
+143
+104
+87
+141
+137
+102
+152
+165
+122
+157
+169
+129
+128
+142
+106
+93
+107
+72
+68
+83
+52
+50
+64
+38
+36
+50
+25
+45
+58
+38
+48
+59
+42
+53
+61
+46
+57
+63
+51
+60
+63
+52
+61
+63
+52
+58
+59
+51
+58
+58
+48
+57
+57
+45
+62
+63
+49
+59
+61
+50
+56
+59
+48
+59
+63
+49
+56
+65
+46
+62
+75
+49
+80
+98
+60
+98
+120
+73
+107
+135
+76
+117
+148
+81
+116
+152
+80
+115
+151
+77
+113
+154
+78
+113
+153
+82
+111
+153
+81
+114
+154
+83
+114
+154
+83
+114
+154
+81
+112
+153
+77
+109
+151
+75
+109
+152
+73
+112
+155
+76
+115
+158
+79
+116
+160
+81
+118
+162
+83
+120
+167
+89
+123
+169
+94
+122
+168
+95
+113
+159
+86
+100
+146
+74
+89
+134
+67
+92
+133
+73
+85
+124
+69
+81
+120
+65
+101
+92
+77
+101
+92
+77
+101
+92
+77
+101
+92
+77
+101
+92
+77
+101
+92
+77
+101
+92
+77
+101
+92
+77
+101
+92
+77
+102
+93
+78
+102
+93
+78
+102
+93
+78
+103
+94
+79
+103
+94
+79
+104
+95
+80
+104
+95
+78
+103
+95
+74
+104
+96
+73
+105
+97
+76
+106
+98
+77
+106
+98
+79
+106
+98
+79
+106
+97
+80
+106
+97
+80
+106
+97
+80
+105
+97
+78
+104
+96
+77
+104
+96
+75
+104
+96
+75
+104
+96
+73
+105
+97
+74
+106
+98
+75
+102
+95
+77
+98
+93
+74
+94
+88
+72
+88
+82
+66
+83
+77
+61
+77
+74
+57
+75
+72
+55
+73
+72
+54
+75
+74
+56
+76
+75
+57
+76
+77
+59
+78
+79
+61
+80
+81
+63
+81
+84
+65
+83
+86
+69
+84
+85
+69
+92
+88
+76
+95
+85
+73
+100
+80
+69
+124
+87
+78
+161
+104
+97
+181
+102
+97
+193
+88
+85
+211
+83
+82
+214
+65
+67
+220
+60
+62
+219
+57
+55
+210
+56
+48
+200
+58
+46
+189
+62
+43
+178
+66
+42
+183
+64
+40
+204
+59
+42
+212
+55
+40
+213
+56
+41
+213
+57
+42
+214
+57
+42
+213
+57
+42
+213
+57
+42
+212
+56
+41
+212
+56
+41
+210
+57
+41
+210
+57
+41
+210
+57
+41
+210
+57
+41
+210
+57
+41
+210
+57
+41
+205
+59
+44
+193
+63
+49
+181
+61
+47
+171
+60
+41
+162
+57
+36
+153
+54
+31
+149
+53
+29
+155
+59
+34
+167
+65
+42
+178
+66
+46
+185
+64
+47
+191
+59
+44
+195
+55
+42
+197
+50
+40
+203
+52
+43
+210
+59
+48
+223
+61
+56
+233
+54
+58
+237
+52
+60
+234
+55
+61
+232
+57
+62
+229
+59
+62
+228
+59
+62
+225
+59
+61
+224
+58
+60
+223
+53
+56
+224
+55
+58
+226
+57
+62
+224
+61
+62
+217
+61
+62
+207
+58
+54
+194
+51
+47
+181
+48
+39
+177
+57
+43
+172
+61
+42
+172
+61
+42
+171
+62
+42
+170
+61
+41
+169
+60
+40
+169
+58
+39
+171
+56
+37
+175
+54
+37
+183
+56
+41
+197
+59
+48
+206
+62
+51
+214
+61
+53
+222
+60
+55
+227
+59
+56
+232
+59
+55
+236
+56
+55
+239
+55
+53
+239
+55
+53
+238
+56
+53
+235
+58
+52
+233
+59
+52
+231
+60
+52
+228
+61
+52
+226
+62
+53
+224
+63
+55
+222
+65
+58
+218
+65
+59
+217
+65
+62
+213
+65
+63
+209
+64
+61
+205
+66
+63
+195
+63
+58
+187
+64
+56
+179
+61
+51
+170
+56
+45
+161
+53
+40
+155
+53
+39
+152
+56
+40
+149
+60
+42
+145
+60
+40
+141
+60
+41
+138
+60
+40
+136
+58
+38
+134
+57
+39
+132
+55
+37
+131
+54
+36
+127
+54
+37
+125
+58
+41
+116
+51
+33
+126
+57
+42
+151
+79
+65
+163
+89
+78
+156
+82
+71
+149
+79
+69
+152
+86
+74
+149
+89
+78
+144
+91
+77
+142
+90
+77
+140
+91
+77
+142
+92
+81
+147
+95
+84
+153
+96
+87
+145
+103
+87
+126
+120
+88
+121
+131
+94
+114
+124
+90
+85
+96
+66
+59
+69
+44
+47
+59
+37
+48
+59
+42
+48
+60
+46
+51
+61
+50
+52
+60
+49
+54
+60
+50
+60
+63
+54
+64
+65
+57
+63
+65
+54
+60
+60
+48
+55
+55
+43
+56
+57
+43
+62
+63
+49
+58
+60
+49
+55
+58
+47
+58
+62
+48
+55
+64
+45
+61
+74
+48
+79
+97
+59
+98
+120
+73
+107
+135
+76
+117
+148
+81
+117
+153
+81
+116
+152
+78
+113
+154
+78
+114
+154
+83
+112
+154
+82
+114
+154
+81
+115
+156
+80
+114
+155
+79
+112
+153
+75
+110
+153
+74
+112
+155
+76
+115
+158
+79
+118
+161
+82
+121
+165
+88
+123
+167
+90
+122
+168
+93
+120
+166
+93
+113
+159
+87
+103
+148
+79
+93
+138
+69
+88
+130
+66
+95
+134
+77
+87
+126
+71
+82
+121
+66
+103
+94
+79
+103
+94
+79
+103
+94
+79
+103
+94
+79
+103
+94
+79
+103
+94
+79
+103
+94
+79
+103
+94
+79
+103
+94
+79
+103
+94
+79
+103
+94
+79
+104
+95
+80
+104
+95
+80
+104
+95
+80
+104
+95
+80
+105
+96
+79
+106
+97
+80
+106
+98
+79
+106
+98
+79
+106
+98
+79
+105
+96
+79
+105
+96
+79
+105
+97
+78
+105
+97
+78
+105
+97
+78
+104
+96
+75
+104
+96
+75
+104
+96
+73
+104
+96
+73
+104
+97
+71
+104
+97
+71
+104
+97
+71
+102
+95
+76
+101
+94
+75
+98
+91
+73
+92
+87
+68
+87
+82
+63
+80
+77
+58
+76
+73
+56
+73
+72
+54
+73
+72
+54
+71
+72
+54
+71
+74
+57
+71
+75
+58
+72
+76
+59
+73
+77
+60
+72
+79
+63
+74
+78
+63
+82
+80
+67
+89
+81
+70
+92
+78
+67
+105
+82
+68
+129
+89
+77
+149
+87
+76
+174
+84
+76
+209
+91
+89
+217
+75
+74
+223
+65
+66
+223
+57
+57
+217
+55
+50
+207
+59
+49
+195
+62
+45
+183
+64
+42
+180
+60
+36
+201
+58
+41
+211
+55
+40
+212
+56
+41
+211
+58
+42
+213
+57
+42
+211
+58
+42
+211
+58
+42
+211
+58
+42
+210
+57
+41
+209
+58
+41
+209
+58
+41
+209
+58
+41
+209
+58
+41
+209
+58
+41
+209
+58
+41
+205
+59
+44
+193
+61
+48
+181
+61
+47
+172
+61
+44
+163
+60
+41
+152
+56
+32
+144
+52
+27
+149
+57
+32
+161
+65
+41
+173
+67
+45
+182
+65
+47
+191
+61
+47
+192
+54
+43
+194
+47
+37
+199
+48
+39
+208
+54
+46
+222
+58
+56
+232
+53
+57
+238
+54
+62
+236
+59
+65
+233
+64
+67
+229
+66
+69
+224
+66
+67
+220
+64
+65
+217
+63
+63
+204
+50
+50
+207
+55
+54
+211
+58
+60
+207
+62
+59
+199
+60
+57
+189
+56
+49
+180
+53
+46
+171
+53
+41
+170
+60
+45
+167
+62
+43
+167
+62
+43
+166
+63
+44
+165
+62
+43
+166
+61
+40
+166
+59
+39
+169
+58
+39
+170
+55
+37
+177
+56
+39
+188
+56
+43
+195
+57
+46
+203
+56
+48
+211
+58
+52
+220
+61
+57
+228
+63
+59
+233
+58
+55
+236
+57
+53
+236
+57
+53
+235
+58
+52
+233
+59
+52
+232
+59
+52
+229
+61
+52
+226
+62
+52
+224
+66
+55
+221
+67
+57
+218
+67
+60
+213
+66
+59
+207
+65
+61
+202
+63
+60
+199
+61
+59
+191
+62
+57
+177
+60
+51
+169
+58
+47
+162
+56
+43
+156
+54
+40
+152
+55
+39
+148
+56
+41
+145
+58
+41
+141
+58
+40
+139
+61
+41
+137
+60
+42
+135
+60
+41
+131
+58
+39
+130
+57
+40
+128
+55
+38
+127
+54
+37
+125
+54
+36
+120
+51
+35
+120
+53
+37
+133
+66
+50
+152
+85
+69
+157
+87
+75
+148
+80
+67
+144
+80
+68
+149
+90
+76
+147
+89
+77
+144
+90
+78
+144
+92
+81
+144
+92
+81
+146
+91
+84
+149
+92
+85
+152
+91
+86
+142
+98
+85
+107
+98
+69
+86
+96
+61
+74
+83
+52
+61
+71
+44
+54
+63
+42
+50
+61
+44
+52
+62
+51
+53
+63
+54
+54
+61
+54
+56
+63
+56
+61
+66
+59
+67
+70
+61
+69
+71
+60
+67
+68
+54
+64
+62
+47
+59
+57
+42
+55
+56
+42
+61
+62
+48
+58
+60
+49
+55
+58
+47
+58
+62
+48
+54
+63
+44
+61
+74
+48
+78
+96
+58
+97
+119
+72
+107
+135
+76
+117
+148
+81
+117
+153
+81
+116
+152
+78
+114
+155
+79
+114
+154
+83
+112
+154
+80
+113
+155
+79
+114
+157
+78
+113
+156
+77
+112
+155
+76
+111
+154
+75
+114
+157
+78
+117
+161
+84
+121
+165
+88
+127
+171
+96
+126
+169
+97
+122
+165
+93
+113
+156
+85
+102
+145
+76
+95
+137
+71
+93
+135
+69
+94
+136
+73
+97
+136
+79
+89
+128
+73
+82
+121
+66
+104
+95
+80
+104
+95
+80
+104
+95
+80
+104
+95
+80
+104
+95
+80
+104
+95
+80
+104
+95
+80
+104
+95
+80
+103
+94
+79
+104
+95
+80
+104
+95
+80
+104
+95
+80
+104
+95
+80
+104
+95
+80
+105
+96
+81
+105
+96
+81
+109
+100
+85
+108
+99
+84
+106
+97
+82
+105
+96
+81
+104
+95
+80
+103
+94
+79
+103
+94
+77
+104
+96
+77
+105
+97
+78
+105
+97
+76
+105
+97
+76
+105
+97
+76
+104
+96
+73
+104
+96
+73
+104
+97
+71
+104
+96
+73
+103
+97
+75
+102
+95
+76
+101
+94
+75
+98
+91
+72
+92
+87
+68
+85
+82
+63
+80
+77
+60
+77
+76
+58
+69
+70
+52
+68
+71
+52
+68
+72
+55
+68
+72
+55
+66
+73
+57
+66
+75
+58
+66
+75
+58
+67
+74
+58
+74
+74
+62
+84
+80
+68
+85
+79
+65
+89
+76
+60
+101
+75
+58
+115
+69
+53
+146
+74
+62
+192
+91
+83
+215
+83
+79
+222
+70
+69
+223
+59
+58
+220
+55
+53
+213
+59
+51
+204
+61
+47
+189
+60
+41
+184
+55
+34
+203
+58
+41
+207
+56
+39
+208
+57
+40
+210
+59
+42
+210
+59
+42
+210
+59
+42
+210
+59
+42
+210
+59
+42
+209
+58
+41
+209
+58
+41
+209
+58
+41
+209
+58
+41
+209
+58
+41
+209
+58
+41
+209
+58
+41
+205
+59
+44
+193
+59
+48
+182
+58
+46
+173
+60
+44
+167
+62
+43
+153
+57
+35
+143
+51
+26
+147
+55
+30
+159
+63
+39
+163
+57
+35
+176
+59
+41
+192
+62
+48
+198
+60
+49
+204
+56
+46
+208
+55
+47
+217
+60
+53
+227
+63
+61
+236
+61
+66
+238
+63
+68
+233
+67
+69
+226
+68
+67
+214
+64
+63
+202
+59
+55
+192
+53
+48
+187
+49
+46
+183
+48
+44
+187
+54
+49
+190
+58
+54
+187
+60
+54
+179
+58
+50
+169
+57
+46
+164
+56
+44
+160
+58
+43
+161
+61
+45
+159
+62
+43
+160
+63
+44
+161
+64
+45
+161
+64
+45
+163
+64
+43
+163
+62
+42
+164
+61
+42
+169
+59
+42
+173
+58
+40
+178
+55
+40
+184
+54
+41
+191
+53
+43
+201
+57
+48
+212
+63
+57
+224
+67
+62
+229
+60
+55
+232
+59
+53
+232
+59
+53
+231
+60
+52
+229
+60
+53
+228
+61
+52
+225
+62
+53
+222
+64
+53
+220
+68
+57
+216
+68
+58
+210
+67
+59
+202
+65
+57
+196
+63
+58
+188
+59
+54
+184
+56
+53
+176
+57
+51
+162
+55
+45
+153
+56
+40
+149
+53
+39
+147
+54
+39
+145
+58
+41
+143
+60
+42
+139
+58
+41
+133
+56
+38
+136
+61
+42
+133
+60
+43
+131
+60
+42
+128
+60
+41
+126
+58
+39
+124
+56
+37
+123
+54
+38
+123
+54
+38
+121
+49
+35
+128
+56
+42
+140
+71
+56
+150
+83
+67
+146
+80
+66
+139
+76
+61
+144
+82
+69
+153
+95
+83
+145
+87
+76
+146
+89
+78
+148
+91
+82
+150
+93
+84
+150
+93
+86
+151
+92
+86
+150
+89
+84
+140
+94
+81
+97
+88
+59
+69
+77
+40
+54
+64
+30
+56
+65
+38
+62
+71
+50
+60
+69
+52
+51
+61
+50
+45
+55
+46
+49
+56
+49
+55
+62
+54
+66
+69
+60
+71
+74
+63
+72
+73
+59
+66
+67
+49
+63
+62
+42
+59
+58
+38
+55
+56
+40
+61
+62
+48
+57
+59
+48
+54
+57
+46
+58
+62
+48
+54
+63
+44
+60
+73
+47
+78
+96
+58
+97
+119
+72
+106
+134
+75
+117
+148
+81
+116
+152
+80
+116
+152
+78
+114
+155
+79
+114
+154
+83
+112
+154
+80
+113
+156
+77
+113
+156
+76
+113
+156
+76
+112
+155
+75
+112
+155
+76
+115
+158
+79
+119
+163
+86
+123
+167
+92
+130
+173
+101
+128
+171
+100
+120
+163
+92
+106
+149
+80
+93
+135
+69
+89
+131
+65
+94
+136
+72
+101
+143
+80
+99
+138
+81
+90
+129
+74
+83
+122
+67
+105
+96
+81
+105
+96
+81
+105
+96
+81
+105
+96
+81
+105
+96
+81
+105
+96
+81
+105
+96
+81
+105
+96
+81
+105
+96
+81
+105
+96
+81
+105
+96
+81
+105
+96
+81
+105
+96
+81
+105
+96
+81
+105
+96
+81
+105
+95
+83
+106
+96
+87
+106
+96
+87
+106
+96
+87
+106
+96
+87
+106
+96
+86
+106
+96
+86
+106
+96
+84
+106
+97
+82
+106
+97
+82
+106
+97
+80
+106
+97
+80
+106
+98
+79
+106
+98
+79
+106
+98
+79
+106
+98
+77
+106
+98
+77
+103
+95
+74
+103
+95
+74
+102
+94
+73
+101
+95
+73
+98
+93
+73
+90
+88
+67
+83
+80
+61
+77
+76
+58
+72
+73
+55
+69
+72
+55
+65
+69
+54
+64
+68
+53
+63
+69
+55
+63
+71
+56
+63
+71
+56
+63
+69
+55
+72
+74
+61
+74
+75
+61
+67
+68
+52
+75
+74
+54
+92
+81
+59
+96
+70
+47
+128
+75
+57
+189
+107
+93
+217
+104
+96
+224
+86
+83
+226
+71
+69
+229
+65
+64
+226
+64
+61
+215
+61
+53
+203
+59
+48
+201
+59
+45
+199
+51
+37
+203
+53
+38
+204
+54
+39
+205
+55
+40
+205
+55
+40
+206
+56
+41
+209
+59
+44
+211
+61
+46
+210
+60
+45
+210
+60
+45
+210
+60
+45
+210
+60
+45
+209
+59
+44
+209
+59
+44
+209
+59
+44
+206
+60
+45
+187
+50
+40
+182
+55
+46
+177
+59
+47
+168
+58
+41
+154
+55
+34
+148
+53
+31
+149
+55
+30
+156
+57
+34
+174
+65
+45
+179
+59
+43
+186
+54
+41
+193
+52
+42
+205
+54
+47
+215
+60
+55
+226
+67
+63
+234
+72
+69
+232
+68
+69
+232
+69
+72
+221
+67
+67
+201
+58
+54
+187
+54
+49
+180
+56
+48
+176
+55
+46
+169
+52
+43
+171
+57
+47
+169
+57
+46
+164
+56
+46
+160
+56
+45
+155
+57
+44
+150
+58
+43
+147
+60
+43
+146
+60
+43
+150
+61
+43
+152
+61
+42
+153
+62
+43
+154
+63
+44
+155
+64
+45
+156
+65
+44
+158
+66
+45
+161
+64
+45
+162
+59
+42
+165
+58
+40
+171
+55
+40
+176
+54
+41
+182
+54
+43
+190
+56
+45
+197
+58
+51
+204
+60
+52
+218
+61
+54
+224
+61
+54
+226
+63
+56
+226
+65
+55
+226
+65
+57
+222
+66
+54
+218
+64
+54
+215
+64
+53
+216
+72
+61
+210
+69
+59
+199
+65
+56
+187
+59
+50
+178
+53
+47
+170
+51
+45
+166
+49
+42
+159
+50
+43
+153
+57
+45
+146
+59
+42
+145
+57
+43
+141
+58
+42
+139
+58
+41
+136
+59
+41
+135
+59
+43
+133
+60
+43
+128
+57
+39
+125
+56
+40
+124
+57
+40
+124
+57
+40
+124
+57
+40
+123
+56
+39
+121
+54
+38
+120
+51
+36
+119
+45
+32
+139
+65
+52
+151
+79
+67
+147
+77
+65
+142
+76
+64
+145
+81
+69
+147
+85
+74
+142
+82
+71
+152
+92
+82
+152
+92
+82
+145
+85
+77
+144
+84
+76
+151
+90
+85
+149
+88
+83
+148
+87
+84
+147
+103
+90
+93
+84
+53
+73
+81
+42
+65
+75
+40
+66
+75
+44
+62
+72
+47
+55
+64
+43
+50
+61
+45
+52
+63
+49
+52
+60
+49
+72
+80
+67
+90
+94
+80
+87
+91
+74
+77
+79
+58
+68
+70
+46
+65
+65
+39
+61
+61
+37
+58
+59
+41
+62
+63
+49
+59
+61
+50
+58
+61
+50
+59
+63
+49
+52
+61
+42
+59
+72
+46
+80
+98
+60
+99
+121
+74
+108
+136
+77
+117
+148
+81
+115
+151
+79
+114
+150
+76
+112
+153
+77
+114
+154
+83
+113
+155
+81
+112
+157
+76
+113
+158
+75
+114
+159
+78
+114
+159
+78
+115
+159
+80
+118
+162
+85
+123
+167
+92
+127
+170
+98
+130
+173
+102
+120
+163
+94
+106
+147
+79
+96
+137
+71
+94
+135
+69
+97
+137
+74
+102
+142
+80
+104
+144
+84
+100
+137
+83
+91
+128
+76
+84
+121
+69
+105
+96
+81
+105
+96
+81
+105
+96
+81
+105
+96
+81
+105
+96
+81
+105
+96
+81
+105
+96
+81
+105
+96
+81
+105
+96
+81
+105
+96
+81
+105
+96
+81
+105
+96
+81
+105
+96
+81
+105
+96
+81
+105
+96
+81
+105
+95
+83
+106
+95
+89
+106
+95
+91
+106
+95
+91
+106
+95
+89
+106
+95
+89
+106
+96
+87
+106
+96
+86
+106
+96
+84
+106
+96
+84
+106
+97
+82
+106
+97
+82
+106
+97
+82
+106
+97
+82
+106
+97
+82
+106
+97
+80
+106
+97
+80
+104
+96
+77
+104
+96
+75
+103
+95
+74
+103
+95
+74
+100
+93
+74
+94
+89
+69
+85
+82
+63
+79
+78
+58
+73
+74
+58
+69
+72
+55
+66
+68
+54
+64
+68
+53
+63
+69
+55
+62
+70
+55
+62
+70
+55
+61
+69
+54
+66
+70
+56
+65
+67
+53
+64
+69
+49
+72
+76
+53
+77
+73
+48
+82
+65
+39
+124
+82
+58
+185
+117
+98
+201
+100
+88
+221
+96
+90
+234
+86
+84
+230
+72
+71
+226
+64
+62
+226
+64
+61
+219
+62
+57
+209
+56
+48
+205
+57
+43
+206
+61
+44
+207
+61
+46
+207
+62
+45
+207
+59
+45
+206
+59
+43
+205
+57
+43
+205
+58
+42
+206
+58
+44
+208
+58
+43
+208
+58
+44
+208
+58
+43
+208
+58
+44
+208
+58
+43
+208
+58
+44
+205
+59
+46
+201
+63
+53
+197
+66
+58
+188
+66
+55
+174
+61
+47
+159
+54
+35
+150
+49
+29
+150
+49
+29
+155
+50
+29
+168
+53
+35
+180
+54
+40
+195
+59
+47
+209
+65
+56
+222
+69
+63
+230
+73
+68
+233
+74
+70
+234
+75
+72
+224
+66
+65
+219
+69
+68
+208
+66
+62
+190
+59
+51
+175
+57
+47
+171
+61
+48
+165
+63
+49
+159
+61
+48
+159
+63
+49
+156
+62
+50
+151
+62
+48
+149
+61
+47
+143
+61
+47
+139
+62
+46
+135
+64
+46
+136
+63
+44
+142
+61
+42
+143
+60
+42
+146
+60
+43
+145
+62
+44
+148
+63
+43
+148
+63
+43
+150
+63
+44
+153
+62
+44
+159
+64
+46
+161
+61
+45
+164
+58
+44
+168
+56
+44
+173
+55
+43
+178
+56
+45
+184
+57
+48
+189
+56
+47
+202
+60
+50
+208
+60
+50
+211
+63
+53
+213
+65
+55
+215
+67
+57
+214
+67
+57
+212
+68
+57
+209
+69
+56
+202
+66
+54
+195
+65
+52
+185
+61
+51
+176
+58
+48
+169
+54
+47
+164
+53
+46
+159
+52
+44
+153
+55
+44
+146
+58
+46
+140
+61
+44
+138
+59
+44
+136
+59
+43
+134
+58
+42
+132
+59
+42
+131
+60
+42
+129
+60
+44
+126
+59
+42
+124
+59
+41
+123
+57
+41
+121
+58
+41
+120
+57
+40
+119
+56
+39
+117
+54
+39
+119
+52
+36
+128
+52
+39
+144
+68
+55
+152
+78
+67
+145
+75
+63
+140
+74
+62
+143
+81
+68
+146
+84
+73
+144
+82
+71
+147
+83
+74
+152
+88
+79
+152
+85
+79
+151
+86
+80
+156
+93
+88
+148
+87
+82
+142
+83
+79
+138
+99
+84
+93
+87
+53
+88
+99
+57
+95
+106
+66
+90
+102
+66
+73
+84
+54
+54
+67
+41
+52
+64
+42
+60
+72
+52
+79
+88
+71
+89
+98
+81
+95
+102
+84
+87
+92
+70
+74
+78
+55
+66
+69
+42
+63
+63
+35
+60
+60
+34
+57
+58
+40
+61
+62
+48
+58
+60
+49
+57
+60
+49
+60
+64
+50
+53
+62
+43
+59
+72
+46
+80
+98
+60
+100
+122
+75
+108
+136
+77
+117
+148
+81
+116
+152
+80
+114
+150
+76
+113
+154
+78
+114
+154
+83
+113
+155
+81
+115
+160
+79
+114
+159
+76
+112
+157
+76
+113
+158
+77
+116
+160
+81
+120
+164
+87
+124
+167
+95
+127
+170
+99
+123
+166
+97
+111
+154
+85
+99
+140
+74
+93
+134
+68
+97
+137
+74
+101
+141
+78
+101
+141
+78
+99
+139
+79
+100
+137
+83
+91
+128
+76
+84
+121
+69
+105
+96
+81
+105
+96
+81
+105
+96
+81
+105
+96
+81
+105
+96
+81
+105
+96
+81
+105
+96
+81
+105
+96
+81
+105
+96
+81
+105
+96
+81
+105
+96
+81
+105
+96
+81
+105
+96
+81
+105
+96
+81
+105
+96
+81
+105
+95
+85
+106
+95
+91
+106
+94
+94
+106
+94
+94
+106
+95
+93
+106
+95
+89
+106
+96
+87
+106
+96
+86
+106
+96
+84
+106
+96
+84
+106
+96
+84
+106
+96
+84
+106
+96
+84
+106
+96
+84
+106
+96
+84
+106
+96
+86
+106
+96
+84
+108
+97
+79
+107
+96
+76
+105
+97
+78
+105
+97
+78
+102
+95
+76
+97
+92
+72
+89
+86
+67
+83
+82
+62
+77
+75
+60
+72
+73
+57
+68
+70
+56
+65
+69
+54
+65
+69
+54
+63
+70
+54
+62
+68
+54
+61
+67
+53
+62
+69
+53
+58
+62
+45
+66
+71
+49
+73
+75
+51
+69
+63
+37
+84
+64
+39
+132
+92
+67
+181
+116
+96
+179
+87
+74
+214
+100
+90
+239
+101
+98
+236
+84
+83
+230
+70
+72
+235
+71
+72
+232
+66
+68
+219
+57
+54
+203
+55
+43
+201
+58
+42
+201
+58
+44
+201
+58
+42
+203
+57
+44
+202
+56
+41
+200
+54
+41
+200
+54
+39
+202
+56
+43
+203
+55
+41
+203
+55
+43
+203
+55
+41
+203
+55
+43
+204
+56
+42
+204
+56
+44
+203
+56
+46
+194
+51
+45
+190
+53
+47
+182
+54
+45
+173
+51
+40
+161
+48
+34
+158
+47
+30
+160
+49
+32
+167
+51
+36
+188
+65
+50
+199
+67
+55
+214
+71
+63
+225
+76
+70
+231
+76
+71
+233
+74
+70
+229
+70
+66
+223
+68
+64
+216
+66
+65
+209
+67
+65
+195
+63
+58
+177
+59
+49
+166
+60
+47
+161
+65
+49
+156
+69
+52
+152
+69
+51
+149
+68
+51
+146
+67
+52
+143
+66
+50
+138
+65
+48
+133
+64
+48
+130
+65
+47
+126
+65
+46
+129
+64
+46
+132
+59
+42
+136
+59
+43
+137
+58
+41
+137
+60
+42
+139
+60
+43
+139
+60
+43
+142
+61
+42
+143
+60
+42
+150
+63
+46
+152
+60
+45
+155
+59
+43
+158
+56
+42
+162
+56
+43
+167
+56
+45
+170
+58
+46
+175
+57
+47
+185
+57
+46
+190
+57
+48
+193
+59
+48
+196
+62
+51
+197
+63
+51
+197
+65
+52
+195
+65
+51
+193
+65
+52
+182
+59
+44
+178
+58
+44
+170
+56
+45
+163
+55
+43
+158
+54
+43
+155
+54
+44
+152
+55
+46
+148
+58
+47
+141
+59
+47
+136
+60
+44
+135
+59
+45
+132
+59
+44
+130
+58
+43
+128
+59
+43
+128
+59
+43
+127
+60
+44
+125
+59
+43
+122
+59
+42
+122
+59
+44
+119
+57
+42
+118
+56
+41
+117
+55
+40
+116
+54
+41
+118
+52
+38
+136
+59
+49
+148
+70
+60
+150
+78
+66
+142
+74
+61
+136
+72
+60
+141
+79
+66
+145
+83
+72
+146
+82
+73
+146
+79
+73
+153
+84
+79
+153
+83
+81
+154
+86
+83
+154
+93
+90
+147
+89
+85
+141
+91
+84
+141
+108
+91
+129
+125
+88
+126
+137
+94
+128
+139
+97
+108
+120
+82
+76
+88
+52
+54
+68
+35
+61
+74
+46
+76
+90
+64
+101
+113
+89
+101
+111
+87
+93
+101
+77
+80
+85
+62
+69
+73
+48
+63
+67
+40
+61
+64
+35
+58
+60
+36
+56
+57
+39
+59
+60
+46
+56
+58
+47
+57
+60
+49
+61
+65
+51
+54
+63
+44
+60
+73
+47
+80
+98
+60
+100
+122
+75
+109
+137
+78
+118
+149
+82
+116
+152
+80
+115
+151
+77
+113
+154
+78
+114
+154
+83
+112
+154
+80
+117
+162
+81
+112
+160
+76
+110
+157
+76
+112
+159
+79
+117
+164
+86
+121
+167
+92
+125
+168
+96
+124
+167
+96
+112
+153
+85
+102
+143
+77
+92
+132
+69
+92
+132
+69
+101
+140
+77
+105
+144
+81
+102
+141
+78
+95
+133
+72
+99
+136
+82
+90
+127
+76
+83
+120
+69
+105
+96
+81
+105
+96
+81
+105
+96
+81
+105
+96
+81
+105
+96
+81
+105
+96
+81
+105
+96
+81
+105
+96
+81
+106
+97
+82
+106
+97
+82
+106
+97
+82
+106
+97
+82
+106
+97
+82
+106
+97
+82
+106
+97
+82
+106
+96
+86
+107
+96
+92
+107
+95
+95
+107
+96
+94
+107
+96
+92
+107
+96
+90
+107
+97
+88
+107
+97
+87
+107
+97
+85
+107
+97
+85
+107
+97
+85
+107
+97
+85
+107
+97
+85
+107
+97
+87
+107
+97
+87
+107
+97
+88
+107
+97
+87
+110
+98
+82
+109
+98
+80
+106
+98
+79
+106
+98
+79
+104
+97
+78
+101
+94
+75
+95
+90
+71
+89
+86
+69
+82
+79
+62
+77
+75
+60
+71
+72
+58
+68
+70
+56
+67
+69
+55
+66
+68
+54
+64
+68
+53
+62
+66
+51
+63
+70
+52
+60
+65
+45
+71
+73
+51
+76
+70
+48
+77
+59
+37
+110
+78
+57
+152
+100
+79
+167
+96
+78
+158
+66
+53
+197
+84
+76
+229
+100
+95
+239
+95
+94
+237
+83
+85
+237
+74
+79
+234
+68
+72
+227
+64
+65
+205
+56
+49
+199
+57
+45
+197
+55
+43
+197
+55
+43
+200
+56
+45
+202
+58
+47
+203
+59
+48
+205
+58
+48
+209
+62
+52
+209
+62
+52
+210
+62
+52
+210
+62
+52
+211
+63
+53
+211
+63
+53
+211
+63
+53
+211
+62
+55
+211
+63
+59
+209
+66
+62
+203
+68
+62
+198
+70
+61
+194
+70
+60
+195
+73
+62
+199
+77
+64
+206
+80
+68
+217
+83
+72
+221
+80
+71
+226
+77
+71
+228
+73
+69
+228
+71
+66
+226
+67
+63
+224
+65
+61
+220
+65
+61
+214
+69
+66
+202
+67
+63
+189
+62
+55
+173
+59
+48
+161
+61
+46
+155
+66
+48
+151
+70
+51
+148
+73
+54
+142
+69
+52
+140
+69
+51
+138
+66
+51
+133
+66
+49
+130
+64
+48
+125
+64
+46
+123
+64
+46
+124
+63
+45
+128
+59
+44
+131
+57
+44
+131
+58
+43
+132
+59
+44
+132
+59
+44
+133
+60
+45
+135
+59
+43
+136
+59
+43
+137
+58
+43
+140
+57
+41
+143
+55
+41
+147
+55
+42
+150
+56
+44
+156
+58
+47
+160
+59
+47
+163
+59
+48
+170
+58
+47
+173
+56
+46
+175
+57
+47
+176
+58
+46
+176
+58
+46
+176
+58
+44
+175
+57
+43
+174
+56
+42
+168
+55
+41
+165
+55
+40
+158
+54
+41
+155
+54
+42
+149
+55
+43
+146
+56
+45
+145
+57
+47
+142
+60
+48
+136
+60
+46
+133
+60
+45
+131
+59
+44
+129
+57
+42
+127
+58
+42
+126
+57
+42
+125
+58
+42
+125
+59
+43
+124
+58
+44
+122
+59
+44
+121
+59
+44
+119
+57
+42
+115
+56
+42
+113
+54
+40
+114
+55
+41
+117
+53
+41
+140
+68
+56
+146
+72
+61
+145
+75
+63
+138
+72
+58
+135
+73
+60
+139
+79
+68
+147
+84
+75
+151
+84
+76
+150
+81
+76
+155
+84
+80
+152
+81
+79
+148
+83
+79
+150
+92
+88
+144
+95
+88
+144
+104
+94
+151
+126
+106
+148
+148
+112
+133
+146
+102
+117
+130
+87
+89
+104
+63
+67
+82
+43
+63
+79
+42
+80
+96
+60
+99
+114
+81
+101
+116
+85
+92
+105
+75
+78
+88
+61
+67
+76
+49
+63
+69
+43
+62
+66
+41
+61
+65
+40
+59
+61
+39
+55
+56
+40
+58
+59
+45
+55
+57
+46
+57
+60
+49
+61
+65
+51
+55
+64
+45
+60
+73
+47
+79
+97
+59
+98
+120
+73
+108
+136
+77
+118
+149
+82
+117
+153
+81
+116
+152
+78
+114
+155
+79
+114
+154
+83
+111
+155
+80
+113
+160
+79
+111
+158
+77
+111
+158
+77
+115
+162
+82
+122
+168
+93
+124
+170
+97
+122
+165
+94
+117
+160
+91
+99
+140
+74
+94
+135
+69
+91
+131
+68
+95
+135
+72
+103
+142
+79
+106
+145
+80
+102
+141
+76
+96
+135
+72
+98
+135
+81
+89
+126
+75
+82
+119
+68
+105
+96
+81
+105
+96
+81
+105
+96
+81
+105
+96
+81
+105
+96
+81
+105
+96
+81
+105
+96
+81
+105
+96
+81
+106
+97
+82
+106
+97
+82
+106
+97
+82
+106
+97
+82
+106
+97
+82
+106
+97
+82
+106
+97
+82
+106
+96
+84
+107
+96
+90
+107
+96
+92
+107
+96
+90
+107
+97
+88
+107
+97
+87
+107
+97
+85
+107
+98
+83
+107
+98
+83
+107
+98
+83
+107
+98
+83
+107
+98
+83
+107
+97
+85
+107
+97
+87
+107
+97
+87
+107
+97
+88
+107
+97
+87
+111
+99
+85
+110
+98
+82
+107
+98
+81
+107
+98
+81
+107
+98
+81
+104
+97
+79
+100
+93
+77
+96
+90
+74
+88
+82
+66
+82
+79
+62
+78
+75
+60
+73
+71
+56
+71
+69
+54
+68
+69
+53
+66
+67
+51
+63
+66
+49
+64
+72
+49
+65
+70
+47
+77
+71
+49
+83
+62
+43
+101
+62
+45
+148
+90
+76
+170
+96
+83
+153
+63
+52
+155
+52
+43
+179
+64
+57
+214
+89
+85
+241
+106
+103
+245
+101
+101
+235
+82
+85
+232
+73
+78
+233
+77
+80
+217
+73
+65
+211
+70
+60
+205
+64
+54
+203
+62
+52
+206
+64
+54
+210
+68
+58
+213
+71
+61
+215
+71
+62
+218
+74
+65
+218
+74
+65
+221
+74
+66
+221
+74
+66
+222
+75
+67
+222
+75
+67
+224
+75
+68
+224
+75
+69
+235
+83
+82
+232
+84
+84
+227
+83
+82
+220
+82
+79
+216
+83
+76
+216
+83
+76
+219
+85
+76
+224
+85
+78
+224
+76
+72
+225
+73
+70
+227
+69
+66
+226
+67
+64
+228
+66
+64
+226
+67
+64
+228
+69
+66
+224
+70
+68
+218
+73
+70
+203
+68
+64
+188
+61
+55
+174
+60
+50
+163
+62
+50
+153
+66
+49
+147
+68
+51
+146
+71
+52
+141
+68
+51
+138
+66
+51
+137
+65
+51
+132
+63
+48
+130
+62
+49
+128
+62
+48
+125
+62
+47
+125
+62
+47
+127
+59
+46
+128
+58
+46
+128
+58
+46
+128
+58
+46
+128
+61
+45
+129
+60
+45
+129
+60
+45
+131
+59
+45
+130
+57
+42
+132
+56
+42
+134
+56
+43
+138
+56
+42
+140
+57
+43
+144
+58
+45
+146
+58
+46
+148
+58
+47
+155
+59
+47
+158
+57
+45
+159
+57
+45
+160
+58
+44
+161
+57
+44
+162
+56
+43
+162
+56
+42
+162
+56
+42
+159
+56
+41
+156
+56
+41
+152
+56
+40
+148
+56
+41
+143
+57
+42
+140
+58
+44
+137
+58
+45
+135
+59
+45
+132
+58
+45
+130
+58
+44
+129
+57
+43
+128
+56
+42
+125
+56
+41
+125
+55
+43
+124
+56
+43
+123
+57
+43
+122
+56
+44
+121
+57
+45
+120
+58
+45
+118
+56
+43
+113
+53
+42
+111
+53
+41
+113
+55
+43
+116
+57
+43
+140
+72
+59
+141
+73
+60
+137
+73
+61
+132
+73
+59
+133
+75
+63
+140
+82
+70
+147
+87
+77
+152
+88
+79
+152
+81
+77
+156
+85
+81
+152
+82
+80
+147
+86
+81
+146
+96
+89
+136
+98
+87
+131
+103
+91
+134
+122
+100
+110
+114
+81
+90
+105
+64
+74
+89
+48
+65
+82
+40
+73
+90
+48
+87
+105
+63
+100
+118
+78
+106
+124
+86
+88
+105
+69
+76
+91
+58
+63
+76
+46
+58
+68
+41
+60
+68
+44
+62
+67
+45
+60
+65
+45
+58
+61
+44
+56
+57
+43
+58
+59
+45
+54
+56
+45
+56
+59
+48
+62
+66
+52
+55
+64
+45
+59
+72
+46
+76
+94
+56
+95
+117
+70
+105
+133
+74
+116
+147
+80
+116
+152
+80
+116
+152
+78
+114
+155
+79
+115
+155
+84
+112
+156
+81
+110
+157
+77
+109
+158
+76
+112
+161
+80
+119
+168
+89
+124
+170
+97
+122
+168
+96
+114
+157
+88
+105
+147
+81
+90
+131
+65
+92
+132
+69
+97
+136
+73
+101
+140
+77
+103
+142
+77
+103
+142
+75
+104
+141
+74
+102
+138
+76
+99
+134
+80
+89
+123
+73
+82
+116
+66
+105
+96
+81
+105
+96
+81
+105
+96
+81
+105
+96
+81
+105
+96
+81
+105
+96
+81
+105
+96
+81
+105
+96
+81
+107
+98
+83
+107
+98
+83
+107
+98
+83
+107
+98
+83
+107
+98
+83
+107
+98
+83
+107
+98
+83
+107
+97
+85
+108
+98
+89
+108
+98
+89
+108
+98
+89
+108
+98
+86
+108
+98
+86
+108
+99
+82
+108
+99
+82
+108
+100
+81
+108
+100
+81
+108
+100
+81
+108
+99
+82
+108
+99
+84
+108
+98
+86
+108
+98
+88
+108
+98
+88
+108
+98
+88
+111
+99
+85
+110
+98
+82
+107
+98
+81
+108
+99
+82
+108
+99
+82
+107
+98
+81
+103
+96
+80
+100
+93
+77
+94
+87
+71
+89
+83
+67
+83
+77
+63
+77
+74
+59
+75
+72
+57
+71
+69
+54
+69
+66
+51
+64
+65
+47
+61
+71
+46
+66
+70
+45
+81
+66
+45
+98
+61
+45
+129
+69
+58
+169
+89
+82
+178
+79
+74
+155
+46
+43
+175
+60
+57
+184
+62
+59
+208
+84
+82
+242
+112
+110
+254
+118
+118
+243
+100
+104
+237
+88
+94
+242
+93
+95
+227
+85
+81
+218
+80
+70
+212
+71
+64
+208
+67
+58
+209
+68
+61
+212
+71
+62
+214
+71
+65
+214
+71
+63
+217
+72
+67
+218
+74
+66
+220
+72
+68
+221
+74
+67
+222
+74
+70
+222
+75
+68
+224
+75
+71
+224
+75
+71
+226
+72
+72
+225
+71
+73
+220
+72
+72
+217
+71
+71
+214
+72
+68
+215
+72
+68
+216
+71
+66
+219
+70
+66
+224
+66
+65
+228
+65
+66
+230
+66
+65
+232
+66
+66
+231
+67
+66
+228
+66
+64
+223
+65
+62
+219
+65
+63
+221
+73
+71
+205
+66
+63
+188
+59
+54
+175
+61
+51
+165
+63
+51
+153
+64
+48
+146
+65
+48
+144
+67
+51
+140
+64
+50
+137
+64
+49
+136
+62
+49
+134
+60
+49
+132
+60
+48
+129
+59
+49
+129
+59
+49
+128
+60
+49
+128
+60
+49
+127
+61
+49
+127
+60
+51
+127
+61
+49
+127
+61
+49
+127
+61
+47
+127
+61
+49
+127
+61
+47
+128
+60
+47
+129
+60
+45
+131
+59
+45
+131
+57
+44
+133
+57
+44
+132
+56
+42
+133
+55
+43
+133
+54
+41
+141
+57
+46
+143
+56
+46
+145
+57
+45
+148
+58
+47
+151
+59
+46
+154
+61
+46
+158
+60
+47
+159
+62
+46
+153
+57
+41
+150
+57
+40
+147
+58
+42
+144
+58
+43
+138
+59
+44
+135
+59
+43
+132
+59
+44
+130
+58
+43
+130
+58
+44
+129
+57
+43
+127
+55
+41
+126
+54
+40
+123
+53
+41
+123
+53
+41
+123
+53
+41
+122
+54
+41
+120
+54
+42
+120
+56
+44
+119
+57
+44
+115
+56
+42
+112
+52
+41
+111
+53
+41
+114
+58
+45
+118
+60
+48
+139
+77
+64
+137
+75
+60
+132
+74
+60
+130
+77
+61
+133
+81
+67
+139
+86
+72
+146
+88
+77
+151
+87
+78
+147
+78
+73
+153
+84
+79
+151
+86
+82
+149
+92
+85
+144
+101
+92
+123
+94
+80
+102
+86
+70
+96
+94
+71
+69
+79
+45
+62
+78
+41
+63
+79
+40
+74
+92
+50
+95
+114
+69
+107
+126
+81
+101
+120
+75
+88
+106
+64
+77
+95
+55
+64
+81
+45
+54
+69
+38
+55
+68
+42
+61
+70
+49
+61
+68
+52
+58
+62
+48
+55
+59
+45
+56
+58
+44
+58
+59
+45
+54
+56
+45
+56
+59
+48
+62
+66
+52
+55
+64
+45
+57
+70
+44
+73
+91
+53
+91
+113
+66
+101
+129
+70
+114
+145
+78
+115
+151
+79
+115
+151
+77
+114
+155
+79
+115
+155
+84
+112
+156
+81
+109
+156
+76
+111
+160
+79
+115
+164
+85
+120
+168
+92
+122
+168
+96
+115
+160
+91
+105
+147
+81
+96
+138
+72
+89
+129
+66
+94
+134
+71
+101
+140
+77
+103
+142
+77
+102
+141
+74
+101
+141
+71
+103
+140
+71
+104
+140
+76
+97
+132
+78
+88
+122
+72
+81
+115
+65
+105
+96
+81
+105
+96
+81
+105
+96
+81
+105
+96
+81
+105
+96
+81
+105
+96
+81
+105
+96
+81
+105
+96
+81
+107
+98
+83
+107
+98
+83
+107
+98
+83
+107
+98
+83
+107
+98
+83
+107
+98
+83
+107
+98
+83
+107
+98
+83
+108
+98
+88
+108
+98
+86
+108
+98
+86
+108
+99
+82
+108
+99
+82
+108
+100
+79
+108
+100
+79
+108
+100
+77
+108
+100
+77
+108
+100
+77
+108
+100
+79
+108
+100
+81
+108
+99
+82
+108
+99
+84
+108
+98
+86
+108
+98
+86
+111
+99
+85
+109
+97
+83
+107
+98
+83
+108
+99
+84
+109
+100
+85
+108
+99
+84
+105
+96
+81
+102
+95
+79
+98
+91
+75
+94
+87
+71
+88
+81
+65
+82
+76
+60
+79
+73
+57
+74
+71
+54
+73
+67
+51
+65
+67
+46
+60
+70
+43
+66
+69
+42
+86
+64
+43
+122
+70
+57
+163
+80
+76
+178
+72
+72
+180
+57
+60
+183
+52
+57
+197
+67
+69
+193
+65
+64
+200
+75
+73
+222
+98
+96
+241
+113
+112
+242
+109
+112
+233
+97
+101
+228
+89
+92
+219
+81
+78
+213
+76
+68
+207
+68
+63
+205
+66
+59
+207
+68
+63
+208
+69
+62
+208
+66
+62
+205
+64
+57
+210
+67
+63
+210
+67
+61
+212
+67
+64
+213
+68
+63
+215
+67
+65
+216
+68
+64
+217
+69
+67
+218
+68
+67
+221
+65
+68
+221
+65
+68
+222
+68
+70
+221
+71
+72
+223
+73
+72
+224
+74
+73
+227
+73
+73
+229
+71
+72
+231
+65
+67
+234
+65
+68
+236
+66
+69
+236
+66
+69
+231
+65
+65
+226
+64
+62
+219
+61
+58
+214
+60
+58
+219
+69
+70
+204
+60
+60
+188
+54
+51
+177
+58
+50
+169
+62
+52
+155
+61
+49
+147
+61
+48
+145
+63
+49
+139
+60
+47
+139
+59
+48
+138
+58
+49
+137
+57
+48
+136
+56
+49
+135
+56
+51
+136
+57
+52
+133
+58
+52
+128
+60
+51
+125
+61
+51
+125
+61
+52
+125
+61
+51
+125
+61
+51
+125
+61
+49
+125
+61
+51
+124
+60
+48
+124
+60
+48
+124
+61
+46
+126
+60
+46
+126
+58
+45
+125
+57
+44
+125
+56
+41
+126
+54
+42
+126
+54
+42
+131
+57
+46
+131
+57
+46
+135
+57
+45
+137
+57
+46
+141
+57
+46
+145
+59
+46
+149
+60
+46
+150
+61
+45
+146
+57
+41
+145
+58
+41
+141
+58
+42
+138
+59
+42
+135
+59
+43
+131
+60
+42
+128
+59
+43
+126
+59
+42
+128
+56
+42
+128
+56
+44
+126
+54
+42
+125
+53
+41
+124
+52
+40
+122
+52
+40
+122
+52
+42
+121
+53
+42
+117
+50
+41
+118
+54
+44
+118
+56
+45
+114
+54
+43
+111
+51
+41
+111
+53
+42
+115
+58
+47
+120
+64
+51
+138
+80
+66
+134
+78
+63
+129
+78
+61
+130
+81
+64
+133
+86
+70
+137
+88
+73
+142
+85
+74
+145
+82
+73
+146
+79
+73
+151
+84
+78
+147
+84
+79
+145
+92
+86
+138
+102
+90
+110
+91
+74
+80
+75
+55
+69
+75
+49
+65
+78
+48
+75
+90
+57
+87
+103
+67
+96
+114
+74
+103
+121
+79
+100
+122
+76
+86
+108
+62
+71
+93
+47
+65
+86
+45
+55
+72
+36
+49
+64
+33
+54
+66
+42
+61
+70
+53
+60
+68
+57
+56
+61
+54
+55
+58
+51
+57
+59
+46
+59
+60
+46
+54
+56
+45
+57
+60
+49
+63
+67
+53
+55
+64
+45
+55
+68
+42
+70
+88
+50
+86
+108
+61
+97
+125
+66
+111
+142
+75
+113
+149
+77
+115
+151
+77
+114
+155
+79
+116
+156
+85
+113
+157
+82
+111
+158
+80
+113
+162
+81
+117
+166
+87
+118
+166
+90
+115
+161
+89
+106
+151
+82
+98
+140
+74
+91
+133
+69
+94
+134
+72
+96
+136
+73
+99
+138
+75
+101
+140
+75
+102
+141
+74
+102
+142
+72
+102
+139
+70
+101
+137
+73
+96
+131
+77
+87
+121
+71
+80
+114
+64
+105
+96
+81
+105
+96
+81
+105
+96
+81
+105
+96
+81
+105
+96
+81
+105
+96
+81
+105
+96
+81
+105
+96
+81
+107
+98
+83
+107
+98
+83
+107
+98
+83
+107
+98
+83
+107
+98
+83
+107
+98
+83
+107
+98
+83
+107
+98
+83
+108
+98
+86
+108
+99
+84
+108
+99
+84
+108
+99
+82
+108
+100
+81
+108
+100
+79
+108
+100
+79
+108
+100
+77
+108
+100
+77
+108
+100
+79
+108
+100
+79
+108
+100
+81
+108
+99
+82
+108
+99
+84
+108
+99
+84
+108
+99
+84
+110
+98
+84
+109
+97
+83
+109
+97
+83
+109
+97
+83
+109
+100
+85
+108
+99
+84
+106
+97
+82
+103
+96
+80
+100
+93
+77
+96
+89
+73
+90
+83
+67
+85
+78
+62
+80
+75
+56
+77
+72
+53
+73
+68
+49
+69
+67
+46
+65
+69
+42
+71
+67
+40
+92
+65
+44
+137
+83
+71
+175
+92
+88
+169
+63
+65
+169
+49
+51
+203
+74
+78
+195
+64
+69
+189
+61
+62
+185
+59
+60
+195
+71
+71
+216
+90
+91
+229
+101
+102
+221
+88
+91
+205
+71
+72
+209
+74
+71
+207
+69
+66
+205
+66
+63
+206
+67
+62
+210
+71
+66
+210
+71
+66
+206
+67
+62
+201
+62
+55
+207
+68
+61
+209
+68
+61
+210
+68
+64
+212
+69
+65
+214
+69
+66
+217
+69
+67
+220
+67
+69
+222
+68
+70
+222
+63
+67
+223
+64
+68
+222
+66
+69
+223
+69
+69
+225
+71
+71
+224
+70
+70
+224
+66
+67
+225
+62
+63
+232
+66
+68
+234
+64
+67
+232
+62
+65
+231
+61
+62
+228
+62
+62
+228
+64
+63
+226
+67
+64
+223
+69
+67
+215
+65
+66
+200
+56
+56
+184
+52
+48
+177
+58
+52
+169
+62
+54
+155
+61
+51
+146
+60
+47
+142
+63
+50
+137
+59
+47
+136
+58
+48
+136
+58
+48
+136
+56
+49
+136
+55
+51
+138
+55
+51
+137
+56
+52
+136
+59
+53
+128
+58
+50
+126
+59
+50
+126
+59
+50
+124
+60
+50
+124
+60
+48
+124
+60
+48
+124
+60
+48
+124
+60
+48
+120
+56
+44
+121
+57
+45
+124
+58
+46
+124
+58
+46
+125
+59
+45
+125
+59
+45
+125
+57
+44
+125
+57
+44
+126
+58
+47
+127
+57
+47
+128
+55
+46
+129
+55
+44
+132
+54
+42
+133
+53
+42
+134
+55
+42
+134
+55
+40
+138
+56
+42
+136
+57
+42
+136
+59
+43
+133
+60
+45
+132
+60
+45
+128
+61
+44
+126
+60
+44
+125
+59
+43
+125
+57
+44
+125
+55
+45
+124
+54
+44
+121
+53
+42
+122
+52
+42
+120
+52
+41
+120
+52
+41
+120
+53
+44
+114
+50
+40
+117
+53
+43
+118
+56
+45
+114
+54
+43
+110
+52
+41
+110
+53
+42
+116
+59
+48
+120
+66
+54
+138
+85
+71
+132
+80
+66
+128
+79
+64
+132
+83
+68
+136
+87
+73
+140
+86
+74
+140
+82
+71
+141
+78
+71
+149
+84
+78
+148
+85
+78
+139
+82
+75
+132
+88
+77
+127
+100
+83
+101
+90
+68
+71
+75
+50
+61
+74
+44
+73
+88
+57
+90
+107
+73
+103
+120
+84
+99
+120
+81
+89
+110
+69
+83
+104
+61
+78
+99
+56
+74
+95
+52
+58
+76
+38
+48
+63
+30
+44
+57
+29
+53
+62
+41
+61
+67
+53
+60
+66
+56
+58
+60
+55
+57
+60
+53
+59
+61
+50
+59
+61
+48
+55
+57
+46
+57
+60
+49
+63
+67
+53
+56
+63
+45
+56
+66
+41
+69
+85
+49
+85
+104
+59
+97
+122
+67
+110
+138
+77
+114
+147
+78
+114
+150
+78
+114
+154
+81
+115
+157
+83
+113
+157
+82
+114
+160
+85
+117
+163
+88
+118
+164
+91
+116
+162
+90
+111
+154
+85
+102
+144
+78
+94
+136
+72
+91
+131
+68
+100
+140
+78
+97
+137
+75
+96
+135
+72
+99
+138
+73
+102
+141
+74
+103
+142
+75
+101
+138
+69
+97
+133
+69
+96
+131
+77
+87
+121
+71
+80
+114
+64
+105
+96
+81
+105
+96
+81
+105
+96
+81
+106
+97
+82
+106
+97
+82
+107
+98
+83
+107
+98
+83
+107
+98
+83
+106
+97
+82
+106
+97
+82
+106
+97
+82
+106
+97
+82
+106
+97
+82
+106
+97
+82
+106
+97
+82
+106
+97
+82
+107
+98
+83
+107
+98
+83
+107
+98
+83
+107
+98
+83
+107
+98
+81
+107
+98
+81
+107
+98
+81
+107
+98
+81
+108
+99
+82
+108
+99
+82
+108
+99
+82
+108
+99
+82
+108
+99
+84
+108
+99
+84
+108
+99
+84
+110
+98
+84
+107
+93
+80
+112
+96
+81
+116
+100
+87
+114
+100
+87
+110
+98
+86
+106
+96
+84
+104
+96
+83
+104
+98
+84
+103
+97
+83
+103
+97
+81
+99
+93
+77
+91
+86
+67
+86
+81
+61
+83
+78
+56
+78
+72
+50
+71
+65
+41
+76
+70
+44
+74
+62
+36
+98
+73
+51
+145
+103
+87
+182
+120
+109
+187
+108
+101
+183
+89
+87
+185
+79
+79
+182
+66
+69
+189
+66
+69
+194
+68
+71
+200
+70
+72
+205
+72
+75
+208
+74
+75
+211
+75
+77
+211
+75
+77
+205
+69
+69
+205
+69
+69
+208
+70
+68
+211
+72
+69
+212
+70
+66
+207
+68
+61
+206
+67
+60
+207
+70
+60
+200
+68
+56
+201
+69
+57
+203
+69
+60
+207
+68
+63
+212
+67
+64
+216
+66
+67
+222
+63
+68
+222
+61
+67
+225
+66
+70
+223
+67
+68
+223
+67
+68
+224
+68
+69
+224
+68
+69
+225
+70
+68
+225
+70
+68
+227
+69
+68
+227
+67
+67
+228
+66
+64
+228
+64
+63
+227
+63
+62
+227
+63
+62
+227
+63
+61
+227
+63
+61
+224
+66
+63
+211
+66
+63
+197
+62
+58
+184
+57
+51
+170
+55
+48
+160
+57
+48
+151
+61
+50
+142
+62
+51
+134
+62
+50
+131
+63
+50
+129
+63
+51
+129
+61
+50
+129
+59
+51
+132
+57
+51
+135
+56
+51
+136
+56
+49
+136
+57
+50
+133
+59
+48
+132
+60
+46
+132
+60
+46
+129
+60
+45
+129
+59
+47
+128
+58
+46
+128
+58
+46
+128
+58
+46
+126
+58
+45
+126
+58
+45
+126
+58
+45
+126
+58
+45
+126
+58
+47
+126
+58
+47
+126
+58
+47
+126
+58
+47
+125
+57
+48
+125
+57
+48
+126
+56
+48
+126
+56
+46
+128
+55
+46
+128
+55
+46
+128
+55
+46
+126
+56
+44
+128
+56
+44
+126
+56
+44
+125
+57
+44
+124
+56
+45
+123
+57
+45
+122
+56
+44
+120
+56
+44
+120
+56
+44
+120
+56
+46
+120
+56
+46
+119
+55
+45
+118
+56
+45
+118
+54
+44
+116
+54
+43
+115
+53
+42
+113
+53
+43
+109
+49
+39
+114
+54
+44
+110
+52
+41
+109
+51
+40
+111
+54
+43
+109
+52
+41
+113
+56
+45
+127
+73
+61
+133
+83
+72
+133
+83
+74
+134
+82
+71
+136
+82
+72
+139
+80
+72
+144
+81
+74
+148
+81
+75
+149
+82
+76
+147
+84
+77
+141
+84
+75
+137
+91
+78
+130
+99
+81
+111
+95
+72
+89
+85
+58
+77
+86
+55
+79
+95
+59
+106
+126
+89
+98
+120
+81
+89
+111
+72
+85
+106
+67
+82
+103
+64
+77
+98
+59
+73
+89
+53
+67
+82
+49
+55
+68
+38
+52
+62
+35
+50
+58
+35
+54
+59
+39
+60
+62
+48
+64
+66
+53
+64
+64
+54
+60
+62
+51
+53
+56
+45
+51
+57
+45
+52
+58
+46
+55
+58
+47
+57
+61
+47
+59
+63
+46
+61
+66
+44
+60
+69
+40
+83
+95
+59
+97
+114
+70
+110
+134
+82
+115
+145
+85
+114
+149
+81
+114
+154
+83
+115
+157
+83
+114
+157
+85
+117
+158
+90
+126
+167
+101
+126
+167
+101
+112
+152
+89
+98
+138
+75
+94
+134
+71
+94
+134
+72
+94
+132
+71
+96
+134
+73
+98
+136
+75
+100
+138
+77
+102
+141
+78
+101
+140
+77
+99
+138
+75
+96
+135
+72
+94
+132
+71
+95
+130
+76
+84
+118
+68
+75
+109
+59
+105
+96
+81
+105
+96
+81
+105
+96
+81
+106
+97
+82
+106
+97
+82
+107
+98
+83
+107
+98
+83
+107
+98
+83
+106
+97
+82
+106
+97
+82
+106
+97
+82
+106
+97
+82
+106
+97
+82
+106
+97
+82
+106
+97
+82
+106
+97
+82
+107
+98
+83
+107
+98
+83
+107
+98
+83
+107
+98
+83
+107
+98
+83
+107
+98
+83
+107
+98
+83
+107
+98
+83
+108
+99
+84
+108
+99
+84
+108
+99
+84
+108
+99
+84
+108
+99
+84
+108
+99
+84
+108
+99
+84
+110
+98
+84
+114
+98
+83
+113
+97
+82
+114
+98
+85
+113
+99
+86
+114
+102
+90
+111
+103
+90
+109
+101
+88
+106
+100
+86
+103
+99
+87
+107
+104
+89
+111
+105
+89
+108
+103
+84
+104
+99
+79
+99
+94
+72
+91
+85
+61
+82
+76
+52
+80
+74
+48
+72
+62
+37
+81
+63
+41
+107
+80
+61
+127
+88
+71
+132
+78
+66
+136
+69
+61
+147
+68
+63
+177
+87
+86
+184
+84
+84
+187
+81
+81
+192
+80
+79
+192
+78
+77
+193
+77
+77
+194
+76
+74
+194
+76
+74
+205
+85
+84
+197
+73
+71
+192
+62
+62
+195
+61
+58
+205
+67
+64
+209
+70
+65
+205
+66
+59
+199
+62
+52
+202
+68
+57
+202
+68
+57
+204
+70
+61
+208
+69
+62
+214
+69
+66
+219
+66
+68
+223
+64
+69
+224
+63
+69
+223
+67
+70
+223
+67
+68
+223
+67
+68
+223
+69
+69
+224
+69
+67
+224
+70
+68
+225
+70
+68
+225
+70
+68
+224
+69
+65
+225
+67
+64
+224
+66
+63
+224
+65
+62
+226
+64
+61
+226
+64
+61
+226
+64
+61
+224
+66
+63
+213
+68
+63
+200
+67
+60
+186
+62
+54
+172
+58
+48
+160
+57
+48
+148
+58
+47
+138
+60
+48
+130
+60
+48
+128
+65
+50
+126
+64
+51
+126
+62
+52
+127
+60
+51
+131
+58
+51
+134
+57
+49
+136
+56
+49
+137
+57
+48
+135
+59
+46
+133
+60
+45
+132
+59
+44
+132
+59
+44
+131
+59
+45
+130
+58
+44
+130
+58
+44
+130
+58
+44
+127
+57
+45
+127
+57
+45
+127
+57
+45
+127
+57
+45
+126
+58
+47
+126
+58
+47
+126
+58
+47
+126
+58
+47
+125
+57
+48
+125
+57
+48
+125
+57
+48
+125
+57
+48
+125
+57
+48
+125
+57
+48
+124
+57
+48
+124
+57
+48
+124
+57
+48
+122
+58
+48
+122
+58
+48
+121
+57
+47
+121
+57
+47
+121
+57
+47
+119
+57
+46
+119
+57
+46
+119
+56
+47
+119
+56
+47
+116
+56
+46
+115
+55
+45
+114
+54
+44
+114
+54
+44
+112
+54
+43
+112
+54
+43
+107
+49
+38
+113
+55
+44
+109
+52
+41
+108
+51
+40
+111
+54
+43
+108
+51
+40
+112
+55
+44
+126
+72
+62
+132
+82
+73
+133
+83
+76
+136
+81
+74
+139
+80
+74
+144
+81
+76
+148
+80
+77
+149
+81
+78
+148
+83
+79
+138
+79
+71
+133
+83
+72
+128
+91
+75
+123
+101
+80
+115
+105
+80
+104
+107
+76
+102
+113
+81
+103
+120
+84
+94
+116
+77
+88
+110
+71
+80
+102
+63
+76
+97
+58
+75
+95
+58
+75
+92
+58
+71
+86
+55
+67
+80
+52
+60
+70
+45
+56
+64
+41
+54
+59
+39
+55
+58
+41
+60
+61
+47
+63
+64
+50
+62
+62
+50
+59
+61
+48
+52
+58
+48
+51
+59
+48
+53
+59
+49
+54
+60
+48
+58
+60
+47
+60
+63
+46
+62
+65
+44
+62
+68
+42
+81
+91
+57
+94
+109
+68
+107
+129
+82
+112
+140
+82
+112
+147
+83
+113
+153
+82
+115
+157
+83
+115
+158
+86
+120
+159
+94
+124
+162
+101
+120
+158
+97
+107
+145
+84
+96
+134
+73
+93
+131
+70
+93
+131
+70
+92
+130
+69
+96
+134
+73
+97
+135
+74
+99
+137
+76
+101
+139
+78
+100
+138
+77
+98
+136
+75
+96
+134
+73
+94
+132
+73
+93
+127
+76
+82
+116
+66
+73
+107
+57
+105
+96
+81
+105
+96
+81
+105
+96
+81
+106
+97
+82
+106
+97
+82
+107
+98
+83
+107
+98
+83
+107
+98
+83
+106
+97
+82
+106
+97
+82
+106
+97
+82
+106
+97
+82
+106
+97
+82
+106
+97
+82
+106
+97
+82
+106
+97
+82
+107
+98
+83
+107
+98
+83
+107
+98
+83
+107
+98
+83
+107
+98
+83
+107
+98
+83
+107
+98
+83
+107
+98
+83
+108
+99
+84
+108
+99
+84
+108
+99
+84
+108
+99
+84
+108
+99
+84
+108
+99
+84
+108
+99
+84
+110
+98
+84
+113
+100
+84
+111
+95
+80
+109
+93
+80
+109
+95
+82
+113
+101
+89
+111
+103
+92
+108
+100
+89
+104
+98
+86
+102
+98
+87
+112
+108
+96
+123
+120
+105
+126
+123
+106
+127
+121
+105
+122
+117
+98
+112
+105
+86
+101
+96
+74
+84
+84
+60
+70
+70
+46
+67
+62
+40
+77
+66
+46
+83
+64
+47
+85
+56
+40
+93
+55
+42
+108
+61
+51
+110
+55
+48
+117
+57
+49
+126
+59
+53
+135
+64
+58
+146
+73
+66
+155
+80
+74
+165
+88
+80
+171
+91
+82
+185
+94
+89
+183
+84
+78
+181
+72
+69
+186
+67
+63
+198
+68
+66
+206
+71
+67
+210
+68
+64
+207
+64
+58
+208
+65
+59
+209
+66
+60
+211
+68
+62
+213
+70
+64
+215
+70
+67
+219
+69
+70
+222
+68
+70
+222
+68
+70
+222
+68
+68
+222
+68
+68
+222
+68
+68
+221
+69
+68
+223
+69
+69
+222
+70
+69
+223
+69
+67
+223
+69
+67
+222
+68
+66
+222
+68
+66
+221
+68
+63
+220
+67
+62
+221
+66
+61
+221
+66
+61
+221
+66
+61
+220
+67
+62
+214
+69
+64
+206
+69
+63
+195
+66
+60
+179
+62
+53
+162
+58
+49
+148
+56
+45
+136
+57
+44
+131
+59
+45
+130
+64
+50
+127
+64
+49
+126
+62
+50
+127
+61
+49
+131
+58
+49
+134
+57
+49
+135
+56
+49
+136
+58
+48
+135
+59
+46
+132
+59
+44
+132
+59
+44
+132
+59
+44
+130
+58
+44
+130
+58
+44
+128
+58
+46
+128
+58
+46
+127
+57
+45
+127
+57
+45
+126
+58
+47
+126
+58
+47
+126
+58
+47
+126
+58
+47
+126
+58
+47
+126
+58
+47
+125
+57
+48
+125
+57
+48
+125
+57
+48
+125
+57
+48
+124
+57
+48
+123
+56
+47
+123
+56
+47
+123
+56
+47
+123
+59
+49
+123
+59
+49
+122
+58
+48
+121
+59
+48
+120
+58
+47
+120
+58
+47
+120
+58
+47
+120
+58
+47
+116
+56
+46
+116
+56
+46
+115
+55
+45
+115
+55
+45
+114
+54
+44
+113
+53
+43
+111
+53
+42
+111
+53
+42
+106
+49
+38
+111
+54
+43
+109
+52
+41
+107
+50
+39
+108
+54
+42
+105
+51
+39
+109
+55
+43
+125
+71
+61
+135
+80
+73
+135
+80
+73
+139
+80
+74
+142
+81
+76
+145
+82
+77
+146
+83
+78
+148
+85
+80
+145
+86
+80
+140
+87
+79
+135
+91
+80
+126
+94
+79
+116
+98
+78
+111
+105
+81
+111
+114
+85
+108
+119
+89
+102
+119
+85
+81
+101
+66
+75
+95
+58
+69
+89
+54
+68
+85
+51
+69
+86
+54
+71
+86
+57
+71
+84
+56
+69
+82
+56
+63
+73
+48
+60
+68
+45
+57
+62
+42
+55
+59
+42
+58
+60
+46
+60
+62
+48
+59
+61
+47
+57
+59
+46
+54
+60
+50
+53
+61
+50
+54
+60
+50
+54
+60
+48
+58
+60
+47
+60
+62
+48
+61
+64
+45
+61
+67
+41
+77
+87
+53
+90
+105
+64
+102
+124
+77
+108
+136
+78
+110
+145
+81
+113
+153
+82
+117
+159
+85
+116
+159
+87
+122
+161
+96
+119
+157
+96
+110
+148
+87
+99
+137
+76
+92
+130
+69
+92
+130
+69
+92
+130
+69
+90
+128
+67
+95
+133
+72
+97
+135
+74
+98
+136
+75
+100
+138
+77
+99
+137
+76
+97
+135
+74
+95
+133
+72
+93
+131
+72
+91
+125
+74
+80
+113
+66
+70
+103
+56
+105
+96
+81
+105
+96
+81
+105
+96
+81
+106
+97
+82
+106
+97
+82
+107
+98
+83
+107
+98
+83
+107
+98
+83
+106
+97
+82
+106
+97
+82
+106
+97
+82
+106
+97
+82
+106
+97
+82
+106
+97
+82
+106
+97
+82
+106
+97
+82
+107
+98
+83
+107
+98
+83
+107
+98
+83
+107
+98
+83
+107
+98
+83
+107
+98
+83
+107
+98
+83
+107
+98
+83
+108
+99
+84
+108
+99
+84
+108
+99
+84
+108
+99
+84
+108
+99
+84
+108
+99
+84
+108
+99
+84
+110
+98
+84
+114
+100
+87
+111
+97
+84
+109
+95
+82
+107
+95
+83
+107
+97
+87
+108
+99
+90
+108
+101
+91
+106
+102
+93
+106
+102
+93
+120
+116
+105
+136
+132
+120
+145
+141
+129
+149
+143
+129
+146
+140
+126
+137
+130
+114
+125
+122
+103
+96
+99
+78
+79
+84
+62
+68
+71
+50
+70
+69
+49
+72
+67
+48
+70
+61
+44
+76
+60
+44
+86
+67
+52
+80
+57
+43
+82
+54
+42
+86
+52
+42
+89
+53
+41
+92
+54
+43
+97
+57
+47
+101
+61
+49
+109
+61
+49
+136
+76
+66
+157
+83
+74
+173
+86
+79
+181
+79
+75
+188
+70
+68
+196
+66
+66
+208
+68
+67
+216
+70
+70
+212
+64
+62
+213
+65
+63
+214
+66
+62
+216
+68
+64
+217
+69
+67
+219
+69
+68
+219
+69
+68
+221
+69
+68
+222
+68
+68
+221
+69
+68
+221
+69
+68
+221
+69
+68
+221
+69
+68
+221
+69
+68
+221
+69
+66
+220
+71
+67
+219
+70
+66
+218
+69
+65
+217
+68
+62
+217
+68
+62
+218
+67
+60
+218
+67
+60
+219
+68
+61
+217
+68
+62
+214
+67
+60
+211
+70
+63
+201
+70
+62
+186
+65
+56
+167
+59
+49
+152
+56
+44
+140
+57
+43
+133
+60
+45
+131
+64
+48
+127
+64
+49
+126
+63
+48
+127
+61
+47
+131
+58
+49
+132
+58
+47
+135
+57
+47
+136
+58
+46
+132
+58
+45
+132
+59
+44
+132
+59
+44
+131
+58
+43
+130
+58
+44
+130
+58
+44
+127
+57
+45
+127
+57
+45
+127
+57
+45
+127
+57
+45
+126
+58
+47
+126
+58
+47
+126
+58
+47
+126
+58
+47
+126
+58
+47
+126
+58
+47
+125
+57
+48
+124
+57
+48
+125
+57
+48
+123
+56
+47
+123
+56
+47
+123
+56
+47
+123
+56
+47
+120
+56
+46
+123
+59
+49
+121
+59
+48
+121
+59
+48
+121
+59
+48
+120
+58
+47
+120
+58
+47
+120
+58
+47
+118
+58
+47
+115
+55
+45
+115
+55
+45
+115
+55
+45
+114
+54
+44
+113
+53
+43
+111
+53
+42
+111
+53
+42
+109
+52
+41
+106
+49
+38
+111
+54
+43
+108
+51
+40
+104
+50
+38
+107
+53
+41
+104
+50
+38
+108
+54
+42
+124
+70
+60
+138
+79
+71
+140
+79
+74
+141
+80
+75
+143
+82
+77
+144
+83
+78
+145
+86
+80
+144
+87
+80
+140
+90
+81
+137
+93
+82
+133
+97
+85
+121
+95
+80
+105
+90
+71
+100
+95
+73
+100
+104
+79
+92
+102
+75
+78
+93
+64
+69
+85
+56
+65
+81
+52
+61
+77
+48
+60
+75
+46
+63
+77
+51
+67
+81
+55
+70
+82
+58
+71
+83
+59
+66
+76
+52
+62
+71
+50
+58
+65
+47
+57
+61
+44
+57
+61
+46
+57
+61
+46
+56
+60
+45
+55
+59
+45
+55
+61
+51
+54
+61
+53
+54
+59
+52
+54
+60
+50
+58
+60
+49
+59
+61
+47
+60
+63
+44
+60
+65
+42
+74
+83
+52
+86
+101
+62
+98
+120
+73
+106
+134
+76
+110
+145
+81
+115
+155
+84
+119
+161
+87
+120
+162
+90
+123
+162
+97
+114
+152
+91
+101
+139
+78
+92
+130
+69
+90
+128
+67
+92
+130
+69
+92
+130
+69
+90
+128
+67
+95
+133
+72
+96
+134
+73
+97
+135
+74
+98
+136
+75
+97
+135
+74
+96
+134
+73
+94
+132
+71
+93
+131
+74
+90
+124
+74
+78
+111
+64
+69
+102
+55
+104
+97
+81
+104
+97
+81
+104
+97
+81
+105
+98
+82
+105
+98
+82
+106
+99
+83
+106
+99
+83
+106
+99
+83
+105
+98
+82
+105
+98
+82
+105
+98
+82
+105
+98
+82
+105
+98
+82
+105
+98
+82
+105
+98
+82
+105
+98
+82
+107
+98
+83
+107
+98
+83
+107
+98
+83
+107
+98
+83
+107
+98
+83
+107
+98
+83
+107
+98
+83
+107
+98
+83
+108
+99
+84
+108
+99
+84
+108
+99
+84
+108
+99
+84
+108
+99
+84
+108
+99
+84
+108
+99
+84
+108
+99
+84
+114
+102
+88
+116
+104
+92
+115
+103
+91
+109
+99
+89
+106
+97
+88
+108
+101
+93
+115
+110
+104
+122
+119
+112
+129
+126
+119
+144
+141
+134
+160
+157
+148
+168
+165
+156
+171
+167
+156
+168
+164
+153
+163
+157
+145
+153
+150
+135
+122
+123
+107
+99
+102
+83
+79
+82
+63
+71
+74
+55
+69
+72
+53
+66
+69
+50
+66
+69
+50
+69
+72
+53
+75
+76
+60
+74
+72
+57
+71
+68
+53
+68
+62
+48
+65
+57
+44
+65
+55
+43
+64
+54
+42
+70
+52
+40
+85
+53
+42
+113
+66
+56
+142
+79
+72
+160
+79
+75
+175
+73
+71
+191
+71
+73
+204
+69
+73
+211
+66
+69
+213
+64
+66
+215
+65
+66
+216
+66
+65
+217
+67
+66
+218
+69
+65
+218
+69
+65
+218
+69
+65
+218
+69
+65
+221
+69
+68
+221
+68
+70
+221
+68
+70
+219
+69
+70
+219
+69
+68
+219
+69
+68
+219
+69
+68
+217
+69
+67
+218
+70
+66
+217
+69
+65
+214
+70
+62
+213
+69
+61
+213
+69
+61
+213
+69
+61
+213
+69
+61
+214
+70
+62
+212
+65
+58
+211
+67
+59
+206
+69
+61
+193
+66
+57
+174
+62
+51
+158
+57
+45
+145
+59
+46
+138
+60
+47
+132
+63
+48
+129
+63
+47
+128
+62
+46
+128
+61
+45
+129
+59
+47
+132
+58
+45
+134
+58
+45
+135
+59
+46
+132
+58
+45
+131
+59
+45
+130
+58
+44
+130
+58
+44
+130
+58
+44
+129
+57
+43
+127
+57
+45
+127
+57
+45
+126
+58
+47
+126
+58
+47
+126
+58
+47
+126
+58
+47
+125
+58
+49
+125
+58
+49
+125
+58
+49
+125
+58
+49
+124
+57
+49
+122
+58
+49
+124
+57
+49
+121
+57
+48
+121
+57
+48
+120
+56
+47
+120
+56
+47
+118
+55
+46
+121
+58
+49
+121
+58
+49
+120
+57
+48
+118
+58
+48
+118
+58
+48
+117
+57
+47
+117
+57
+47
+116
+58
+47
+114
+55
+47
+113
+54
+46
+113
+54
+46
+112
+53
+45
+111
+52
+44
+110
+51
+43
+110
+51
+43
+109
+52
+43
+106
+49
+40
+109
+55
+45
+106
+52
+42
+104
+50
+40
+106
+52
+42
+102
+50
+39
+106
+54
+43
+125
+68
+59
+141
+78
+71
+143
+78
+72
+144
+81
+74
+144
+84
+76
+144
+85
+79
+142
+87
+80
+138
+89
+82
+131
+91
+81
+123
+89
+77
+118
+92
+79
+107
+90
+74
+93
+85
+66
+89
+88
+68
+89
+94
+72
+79
+89
+65
+63
+75
+51
+58
+72
+47
+55
+69
+46
+52
+66
+43
+53
+65
+43
+56
+68
+46
+61
+73
+51
+67
+76
+55
+69
+78
+57
+66
+75
+54
+63
+72
+53
+60
+69
+50
+58
+65
+47
+56
+63
+47
+55
+62
+46
+53
+60
+44
+52
+58
+44
+53
+60
+52
+53
+60
+53
+54
+59
+53
+54
+59
+52
+57
+59
+48
+58
+60
+47
+59
+62
+45
+59
+64
+41
+71
+80
+49
+82
+97
+58
+96
+118
+71
+105
+133
+75
+111
+146
+82
+117
+157
+86
+121
+163
+89
+121
+163
+91
+120
+159
+96
+110
+145
+87
+96
+131
+73
+90
+125
+67
+91
+126
+68
+94
+129
+71
+94
+129
+71
+93
+128
+70
+96
+131
+73
+97
+132
+74
+98
+133
+75
+98
+133
+75
+97
+132
+74
+96
+131
+73
+95
+130
+72
+94
+129
+73
+87
+124
+73
+76
+112
+66
+66
+102
+56
+104
+97
+81
+104
+97
+81
+104
+97
+81
+105
+98
+82
+105
+98
+82
+106
+99
+83
+106
+99
+83
+106
+99
+83
+105
+98
+82
+105
+98
+82
+105
+98
+82
+105
+98
+82
+105
+98
+82
+105
+98
+82
+105
+98
+82
+105
+98
+82
+107
+98
+83
+107
+98
+83
+107
+98
+83
+107
+98
+83
+107
+98
+83
+107
+98
+83
+107
+98
+83
+107
+98
+83
+108
+99
+84
+108
+99
+84
+108
+99
+84
+108
+99
+84
+108
+99
+84
+108
+99
+84
+108
+99
+84
+108
+99
+84
+107
+97
+85
+110
+100
+90
+112
+102
+92
+108
+99
+90
+107
+100
+92
+114
+109
+103
+132
+129
+124
+145
+144
+140
+167
+163
+160
+181
+177
+174
+196
+193
+188
+201
+198
+193
+201
+196
+190
+197
+192
+186
+192
+185
+177
+185
+178
+168
+164
+156
+143
+136
+130
+114
+102
+99
+84
+80
+81
+63
+70
+73
+56
+62
+69
+51
+59
+68
+49
+58
+70
+50
+56
+69
+51
+56
+69
+51
+56
+67
+50
+58
+66
+51
+60
+66
+52
+64
+67
+56
+67
+69
+58
+71
+69
+57
+64
+52
+40
+83
+56
+47
+104
+61
+54
+129
+68
+65
+163
+79
+79
+192
+87
+91
+204
+81
+86
+202
+67
+73
+211
+71
+74
+214
+70
+70
+216
+70
+70
+218
+70
+68
+219
+70
+66
+219
+70
+66
+220
+68
+63
+220
+68
+65
+221
+69
+68
+221
+68
+70
+219
+69
+70
+219
+69
+70
+218
+68
+67
+218
+68
+67
+218
+68
+67
+217
+69
+67
+217
+69
+65
+215
+70
+65
+214
+69
+64
+212
+69
+61
+211
+68
+60
+210
+69
+60
+211
+70
+61
+212
+69
+61
+212
+63
+56
+213
+64
+57
+208
+67
+58
+198
+67
+57
+182
+65
+55
+165
+61
+48
+150
+61
+47
+140
+61
+46
+134
+62
+47
+130
+63
+47
+129
+62
+46
+128
+61
+45
+129
+60
+45
+131
+59
+45
+132
+58
+45
+133
+59
+46
+130
+58
+44
+130
+58
+44
+130
+58
+44
+130
+58
+44
+129
+57
+43
+127
+58
+43
+127
+57
+45
+126
+56
+44
+126
+58
+47
+126
+58
+47
+126
+58
+47
+126
+58
+47
+125
+58
+49
+125
+58
+49
+125
+58
+49
+125
+58
+49
+122
+58
+49
+122
+58
+49
+121
+57
+48
+121
+57
+48
+120
+56
+47
+118
+55
+46
+118
+55
+46
+116
+56
+46
+119
+56
+47
+117
+57
+47
+117
+57
+47
+115
+57
+46
+116
+56
+46
+115
+57
+46
+114
+56
+45
+114
+56
+45
+113
+54
+46
+113
+54
+46
+112
+53
+45
+111
+52
+44
+110
+51
+43
+109
+52
+43
+108
+51
+42
+106
+52
+42
+104
+50
+40
+108
+54
+44
+105
+51
+41
+102
+50
+39
+104
+52
+41
+101
+49
+38
+105
+53
+42
+123
+66
+57
+142
+77
+71
+146
+77
+72
+145
+80
+74
+143
+84
+76
+141
+86
+79
+135
+88
+78
+129
+89
+79
+124
+92
+81
+115
+92
+78
+107
+91
+76
+96
+87
+70
+86
+83
+66
+80
+83
+66
+74
+81
+63
+64
+73
+54
+52
+64
+44
+51
+60
+43
+50
+59
+42
+48
+57
+40
+48
+57
+40
+50
+59
+42
+53
+62
+45
+57
+66
+49
+60
+69
+52
+63
+72
+55
+63
+72
+53
+62
+71
+52
+58
+70
+50
+58
+67
+50
+53
+64
+47
+51
+62
+45
+49
+60
+44
+51
+58
+51
+51
+57
+53
+52
+57
+53
+52
+57
+50
+56
+57
+49
+57
+59
+46
+59
+62
+45
+59
+64
+42
+67
+76
+47
+79
+94
+55
+93
+115
+68
+105
+132
+77
+112
+147
+83
+119
+159
+89
+121
+163
+89
+119
+161
+89
+113
+152
+89
+102
+137
+79
+90
+125
+67
+88
+123
+65
+92
+127
+69
+93
+128
+70
+93
+128
+70
+94
+129
+71
+96
+131
+73
+96
+131
+73
+96
+131
+73
+96
+131
+73
+96
+131
+73
+95
+130
+72
+94
+129
+71
+93
+128
+74
+85
+121
+73
+74
+110
+64
+65
+101
+57
+104
+97
+81
+104
+97
+81
+104
+97
+81
+105
+98
+82
+105
+98
+82
+106
+99
+83
+106
+99
+83
+106
+99
+83
+105
+98
+82
+105
+98
+82
+105
+98
+82
+105
+98
+82
+105
+98
+82
+105
+98
+82
+105
+98
+82
+105
+98
+82
+107
+98
+83
+107
+98
+83
+107
+98
+83
+107
+98
+83
+107
+98
+83
+107
+98
+83
+107
+98
+83
+107
+98
+83
+108
+99
+84
+108
+99
+84
+108
+99
+84
+108
+99
+84
+108
+99
+84
+108
+99
+84
+108
+99
+84
+108
+98
+86
+106
+96
+86
+106
+97
+88
+107
+100
+90
+107
+103
+94
+117
+112
+106
+136
+133
+128
+159
+158
+154
+176
+176
+174
+195
+194
+192
+211
+210
+208
+226
+225
+223
+231
+230
+228
+231
+227
+224
+227
+222
+218
+222
+214
+211
+217
+206
+200
+206
+188
+178
+184
+165
+151
+151
+135
+122
+121
+109
+93
+95
+89
+73
+75
+76
+58
+64
+69
+49
+59
+68
+47
+62
+74
+54
+61
+72
+55
+61
+70
+53
+59
+67
+52
+59
+62
+53
+58
+59
+51
+57
+56
+51
+58
+55
+48
+63
+60
+51
+69
+59
+50
+81
+53
+49
+99
+55
+52
+137
+71
+72
+177
+92
+95
+199
+96
+100
+202
+87
+90
+205
+81
+83
+209
+79
+79
+213
+78
+75
+216
+77
+74
+219
+74
+71
+221
+72
+68
+224
+69
+65
+223
+68
+66
+222
+68
+68
+221
+68
+70
+221
+68
+70
+220
+67
+69
+220
+67
+69
+219
+66
+68
+219
+67
+66
+217
+67
+66
+218
+68
+67
+216
+68
+64
+213
+68
+63
+212
+69
+63
+211
+68
+60
+210
+69
+60
+211
+70
+61
+212
+69
+61
+217
+64
+58
+217
+64
+58
+209
+66
+58
+200
+67
+58
+188
+67
+58
+172
+64
+52
+153
+59
+47
+140
+57
+43
+137
+61
+47
+131
+62
+46
+129
+62
+45
+128
+61
+44
+129
+60
+44
+131
+59
+44
+131
+59
+44
+132
+60
+45
+130
+58
+44
+130
+58
+44
+130
+58
+44
+129
+57
+43
+127
+57
+45
+127
+57
+45
+126
+56
+46
+125
+57
+46
+126
+58
+47
+126
+58
+47
+125
+58
+49
+125
+58
+49
+125
+58
+49
+125
+58
+49
+125
+58
+49
+125
+58
+49
+122
+58
+49
+121
+58
+49
+120
+57
+48
+120
+57
+48
+119
+56
+47
+116
+56
+46
+115
+55
+45
+114
+56
+45
+116
+56
+46
+115
+57
+46
+114
+56
+45
+113
+56
+45
+114
+56
+45
+112
+55
+44
+112
+55
+44
+112
+55
+44
+111
+54
+45
+111
+54
+45
+110
+53
+44
+110
+53
+44
+109
+52
+43
+108
+51
+42
+107
+50
+41
+105
+51
+41
+103
+49
+39
+107
+55
+44
+104
+52
+41
+101
+49
+38
+104
+52
+41
+98
+48
+37
+102
+52
+41
+122
+65
+56
+144
+77
+71
+146
+77
+72
+145
+80
+74
+142
+85
+76
+136
+88
+78
+129
+89
+79
+120
+90
+79
+114
+92
+78
+107
+94
+78
+94
+87
+71
+82
+80
+65
+75
+78
+61
+67
+74
+58
+57
+66
+49
+50
+58
+43
+48
+56
+41
+49
+55
+43
+49
+55
+45
+48
+54
+44
+47
+53
+43
+47
+53
+41
+48
+56
+43
+50
+58
+43
+52
+60
+45
+57
+68
+52
+59
+70
+53
+61
+72
+55
+60
+73
+55
+59
+70
+53
+54
+67
+49
+51
+64
+44
+49
+62
+45
+46
+56
+48
+48
+54
+50
+49
+54
+50
+50
+55
+49
+55
+56
+50
+57
+59
+48
+58
+60
+46
+58
+63
+41
+63
+72
+43
+75
+89
+53
+91
+113
+67
+104
+131
+76
+113
+147
+86
+119
+158
+91
+119
+161
+89
+115
+156
+86
+103
+141
+80
+94
+129
+73
+85
+120
+64
+87
+122
+66
+91
+126
+70
+91
+126
+70
+91
+126
+70
+93
+128
+72
+95
+130
+74
+95
+130
+74
+95
+130
+74
+95
+130
+74
+94
+129
+73
+94
+129
+73
+93
+128
+72
+93
+128
+74
+85
+118
+73
+74
+107
+64
+64
+96
+55
+104
+97
+81
+104
+97
+81
+104
+97
+81
+105
+98
+82
+105
+98
+82
+106
+99
+83
+106
+99
+83
+106
+99
+83
+105
+98
+82
+105
+98
+82
+105
+98
+82
+105
+98
+82
+105
+98
+82
+105
+98
+82
+105
+98
+82
+105
+98
+82
+107
+98
+83
+107
+98
+83
+107
+98
+83
+107
+98
+83
+107
+98
+83
+107
+98
+83
+107
+98
+83
+107
+98
+83
+108
+99
+84
+108
+99
+84
+108
+99
+84
+108
+99
+84
+108
+99
+84
+108
+99
+84
+108
+99
+84
+108
+98
+86
+112
+103
+94
+110
+103
+95
+108
+103
+97
+116
+113
+106
+135
+132
+127
+161
+160
+156
+188
+188
+186
+206
+208
+207
+207
+207
+207
+224
+224
+224
+242
+242
+242
+250
+248
+249
+251
+247
+246
+247
+243
+240
+241
+236
+233
+240
+226
+223
+232
+208
+198
+221
+193
+181
+193
+171
+157
+162
+145
+129
+125
+117
+98
+94
+92
+71
+75
+77
+55
+67
+72
+50
+65
+73
+50
+65
+73
+52
+64
+71
+53
+66
+68
+55
+65
+65
+55
+66
+61
+57
+67
+57
+55
+65
+57
+54
+59
+58
+53
+66
+61
+55
+71
+53
+49
+76
+45
+43
+102
+54
+54
+145
+81
+82
+181
+102
+105
+199
+109
+109
+192
+92
+92
+199
+90
+87
+206
+87
+83
+211
+84
+78
+216
+78
+75
+222
+74
+72
+225
+70
+68
+226
+68
+67
+221
+68
+70
+219
+69
+70
+219
+69
+70
+220
+67
+69
+220
+67
+69
+219
+66
+68
+219
+67
+66
+219
+67
+66
+220
+68
+67
+217
+67
+66
+215
+67
+63
+212
+67
+62
+212
+67
+62
+211
+68
+60
+210
+69
+60
+213
+69
+61
+221
+66
+61
+219
+65
+57
+210
+66
+58
+202
+68
+59
+191
+69
+58
+176
+65
+54
+156
+58
+45
+139
+53
+38
+138
+60
+47
+133
+61
+46
+130
+61
+45
+128
+61
+44
+129
+60
+44
+129
+60
+44
+131
+60
+42
+132
+60
+45
+130
+58
+44
+130
+58
+44
+130
+58
+44
+127
+58
+43
+127
+57
+45
+126
+56
+44
+125
+57
+46
+125
+57
+46
+126
+58
+47
+126
+58
+47
+125
+58
+49
+125
+58
+49
+125
+58
+49
+125
+58
+49
+125
+58
+49
+123
+59
+49
+121
+58
+49
+119
+59
+49
+120
+57
+48
+117
+57
+47
+116
+56
+46
+115
+57
+46
+114
+56
+45
+113
+55
+44
+114
+56
+45
+113
+56
+45
+112
+55
+44
+110
+56
+44
+112
+55
+44
+109
+55
+43
+111
+54
+43
+111
+54
+43
+111
+54
+45
+111
+54
+45
+110
+53
+44
+109
+52
+43
+108
+51
+42
+106
+52
+42
+105
+51
+41
+104
+52
+41
+102
+50
+39
+107
+55
+44
+104
+52
+41
+99
+49
+38
+101
+51
+40
+98
+48
+37
+101
+51
+40
+120
+66
+56
+142
+77
+71
+146
+79
+73
+142
+82
+74
+138
+85
+77
+131
+88
+79
+122
+90
+79
+113
+91
+77
+104
+92
+76
+90
+84
+68
+73
+74
+58
+63
+67
+52
+62
+68
+54
+57
+65
+50
+48
+56
+43
+47
+55
+42
+54
+60
+50
+52
+55
+48
+53
+56
+49
+53
+55
+50
+52
+55
+48
+50
+53
+46
+48
+54
+44
+48
+56
+45
+49
+57
+44
+54
+65
+51
+58
+69
+53
+61
+74
+57
+62
+75
+57
+60
+73
+55
+55
+70
+51
+50
+65
+44
+49
+62
+45
+44
+54
+46
+46
+52
+48
+48
+53
+49
+49
+54
+48
+54
+55
+49
+56
+58
+47
+58
+60
+46
+58
+63
+43
+60
+69
+42
+73
+87
+52
+89
+111
+65
+103
+130
+77
+112
+146
+86
+118
+157
+92
+117
+158
+88
+112
+153
+85
+96
+134
+73
+88
+123
+67
+83
+118
+62
+87
+122
+66
+91
+126
+70
+89
+124
+68
+89
+124
+68
+92
+127
+71
+95
+130
+74
+95
+130
+74
+94
+129
+73
+94
+129
+73
+94
+129
+73
+93
+128
+72
+93
+128
+72
+93
+127
+76
+83
+116
+73
+72
+104
+65
+63
+93
+55
+105
+99
+83
+105
+99
+83
+105
+99
+83
+105
+99
+83
+105
+99
+83
+105
+99
+83
+105
+99
+83
+105
+99
+83
+105
+99
+83
+105
+99
+83
+105
+99
+83
+105
+99
+83
+105
+99
+83
+105
+99
+83
+105
+99
+83
+106
+99
+83
+107
+98
+83
+107
+98
+83
+107
+98
+83
+108
+99
+84
+108
+99
+84
+109
+100
+85
+109
+100
+85
+109
+100
+85
+109
+100
+85
+109
+100
+85
+109
+100
+85
+109
+100
+85
+109
+100
+85
+109
+100
+85
+109
+100
+85
+108
+100
+87
+105
+98
+90
+103
+100
+93
+118
+115
+110
+147
+146
+142
+175
+175
+173
+196
+198
+197
+218
+220
+219
+234
+238
+239
+243
+244
+246
+246
+247
+249
+252
+252
+254
+255
+255
+255
+255
+255
+253
+255
+251
+250
+252
+247
+244
+253
+242
+236
+247
+225
+212
+242
+216
+199
+224
+202
+181
+198
+182
+159
+170
+160
+135
+136
+132
+105
+98
+98
+70
+69
+72
+45
+68
+72
+47
+67
+71
+48
+70
+69
+49
+71
+68
+53
+70
+60
+51
+67
+54
+48
+70
+52
+50
+73
+57
+57
+65
+60
+57
+66
+61
+58
+70
+56
+55
+75
+54
+53
+101
+69
+70
+147
+105
+106
+198
+147
+146
+233
+172
+169
+211
+140
+136
+199
+119
+112
+191
+96
+90
+195
+86
+81
+210
+82
+79
+219
+77
+76
+225
+71
+73
+225
+69
+72
+220
+70
+71
+220
+74
+75
+217
+68
+70
+210
+60
+62
+215
+62
+64
+225
+72
+74
+225
+71
+73
+216
+62
+64
+218
+64
+64
+218
+64
+64
+217
+65
+64
+215
+66
+62
+215
+66
+62
+212
+64
+60
+209
+64
+59
+211
+64
+57
+222
+67
+62
+219
+65
+57
+211
+64
+57
+202
+65
+57
+190
+66
+56
+176
+64
+53
+159
+58
+46
+144
+56
+42
+140
+61
+48
+135
+62
+47
+131
+62
+46
+129
+62
+45
+128
+61
+44
+127
+60
+43
+129
+61
+42
+129
+60
+44
+127
+58
+43
+127
+57
+45
+127
+57
+45
+126
+56
+44
+126
+56
+46
+124
+56
+45
+124
+56
+45
+124
+56
+45
+124
+57
+48
+124
+57
+48
+124
+57
+48
+124
+57
+48
+122
+58
+49
+122
+58
+49
+122
+58
+49
+122
+58
+49
+121
+61
+53
+119
+60
+52
+119
+59
+51
+117
+58
+50
+116
+57
+49
+113
+56
+47
+112
+55
+46
+112
+55
+46
+111
+54
+45
+109
+55
+45
+109
+55
+45
+108
+56
+45
+109
+55
+45
+108
+56
+45
+109
+55
+45
+109
+55
+45
+105
+50
+43
+109
+54
+47
+112
+57
+50
+111
+56
+49
+107
+52
+45
+103
+50
+42
+103
+50
+42
+104
+51
+43
+101
+48
+40
+105
+55
+46
+100
+50
+41
+93
+45
+35
+96
+48
+38
+95
+47
+37
+98
+50
+40
+115
+62
+54
+140
+79
+74
+143
+80
+75
+136
+81
+74
+129
+82
+74
+125
+89
+77
+118
+95
+81
+102
+89
+73
+84
+78
+62
+68
+69
+53
+62
+69
+53
+58
+67
+50
+53
+64
+48
+52
+60
+47
+51
+59
+48
+52
+58
+48
+52
+58
+48
+54
+56
+51
+55
+56
+51
+54
+54
+52
+52
+54
+49
+51
+53
+48
+49
+54
+47
+47
+54
+46
+46
+54
+43
+46
+57
+43
+50
+61
+45
+54
+67
+50
+58
+71
+54
+58
+73
+54
+56
+71
+52
+52
+67
+46
+49
+63
+46
+42
+52
+43
+44
+50
+46
+45
+50
+46
+46
+51
+45
+52
+53
+47
+55
+57
+46
+58
+60
+47
+58
+63
+43
+54
+62
+38
+68
+82
+49
+87
+108
+67
+104
+130
+82
+115
+148
+93
+119
+158
+95
+114
+155
+87
+107
+148
+82
+91
+126
+68
+88
+121
+68
+84
+117
+64
+84
+117
+64
+87
+120
+67
+90
+123
+70
+91
+124
+71
+90
+123
+70
+94
+127
+74
+98
+131
+78
+98
+131
+78
+94
+127
+74
+92
+125
+72
+95
+128
+75
+96
+129
+76
+94
+126
+77
+83
+113
+75
+70
+100
+66
+61
+88
+55
+105
+99
+83
+105
+99
+83
+105
+99
+83
+105
+99
+83
+105
+99
+83
+105
+99
+83
+105
+99
+83
+105
+99
+83
+105
+99
+83
+105
+99
+83
+105
+99
+83
+105
+99
+83
+105
+99
+83
+105
+99
+83
+105
+99
+83
+105
+99
+83
+107
+98
+83
+107
+98
+83
+107
+98
+83
+108
+99
+84
+108
+99
+84
+109
+100
+85
+109
+100
+85
+109
+100
+85
+109
+100
+85
+109
+100
+85
+109
+100
+85
+109
+100
+85
+109
+100
+85
+109
+100
+85
+109
+100
+85
+108
+100
+89
+103
+100
+93
+111
+110
+106
+134
+133
+131
+164
+164
+162
+193
+195
+194
+214
+218
+219
+234
+238
+239
+247
+251
+252
+247
+251
+254
+248
+252
+255
+252
+253
+255
+254
+254
+254
+255
+255
+253
+255
+254
+250
+255
+252
+249
+255
+250
+243
+255
+240
+224
+251
+235
+212
+237
+223
+197
+215
+205
+178
+192
+187
+157
+164
+163
+132
+130
+131
+99
+103
+106
+75
+76
+81
+51
+71
+74
+47
+69
+67
+46
+71
+66
+47
+72
+62
+50
+73
+58
+51
+76
+57
+53
+75
+60
+57
+66
+56
+55
+71
+62
+63
+81
+69
+69
+96
+80
+80
+124
+104
+103
+166
+140
+139
+207
+178
+174
+232
+197
+191
+255
+213
+207
+234
+177
+168
+201
+131
+123
+188
+99
+93
+199
+87
+85
+213
+83
+83
+219
+74
+77
+216
+67
+69
+213
+71
+70
+210
+70
+69
+215
+73
+72
+219
+75
+75
+218
+70
+70
+212
+62
+63
+214
+61
+63
+221
+67
+69
+217
+63
+63
+217
+63
+63
+218
+64
+64
+218
+64
+64
+217
+65
+62
+214
+65
+61
+212
+64
+60
+212
+63
+57
+220
+65
+60
+219
+64
+59
+211
+64
+57
+203
+66
+58
+191
+67
+59
+177
+65
+54
+160
+59
+49
+146
+56
+45
+140
+61
+48
+135
+62
+47
+131
+62
+46
+129
+62
+45
+128
+61
+44
+127
+60
+43
+129
+60
+44
+129
+60
+44
+127
+58
+43
+127
+57
+45
+127
+57
+45
+126
+56
+44
+125
+57
+46
+124
+56
+45
+124
+56
+45
+124
+56
+45
+124
+57
+48
+124
+57
+48
+124
+57
+48
+124
+57
+48
+122
+58
+49
+123
+59
+50
+123
+59
+50
+122
+59
+50
+119
+60
+52
+117
+60
+51
+117
+58
+50
+115
+58
+49
+114
+57
+48
+110
+56
+46
+111
+54
+45
+109
+55
+45
+109
+55
+45
+108
+56
+45
+108
+56
+45
+108
+56
+45
+108
+56
+45
+106
+56
+45
+108
+56
+45
+108
+56
+45
+107
+54
+46
+110
+55
+48
+111
+56
+49
+110
+57
+49
+108
+55
+47
+105
+52
+44
+103
+50
+42
+101
+51
+42
+99
+49
+40
+100
+52
+42
+95
+47
+37
+94
+46
+36
+98
+50
+40
+94
+46
+36
+96
+48
+38
+112
+62
+53
+129
+74
+69
+135
+82
+76
+135
+88
+82
+126
+88
+79
+114
+86
+75
+100
+82
+68
+81
+74
+58
+62
+63
+47
+58
+65
+49
+54
+65
+48
+53
+64
+48
+51
+62
+48
+52
+60
+49
+52
+60
+49
+53
+59
+49
+55
+58
+51
+55
+57
+52
+55
+55
+53
+55
+55
+53
+53
+55
+50
+52
+54
+49
+49
+54
+47
+47
+54
+46
+47
+55
+44
+46
+57
+43
+49
+60
+46
+52
+65
+48
+56
+69
+52
+57
+72
+53
+56
+71
+52
+52
+69
+50
+52
+66
+49
+46
+56
+47
+46
+53
+46
+46
+51
+45
+45
+50
+43
+50
+51
+43
+52
+54
+43
+56
+58
+45
+57
+61
+44
+55
+63
+40
+68
+81
+51
+87
+108
+69
+104
+130
+85
+116
+149
+96
+119
+157
+98
+112
+152
+89
+103
+143
+80
+89
+124
+68
+87
+120
+67
+84
+117
+64
+84
+117
+64
+86
+119
+66
+89
+122
+69
+89
+122
+69
+89
+122
+69
+91
+124
+71
+95
+128
+75
+95
+128
+75
+92
+125
+72
+91
+124
+71
+94
+127
+74
+94
+127
+74
+94
+123
+77
+82
+109
+74
+70
+95
+66
+59
+84
+55
+105
+99
+83
+105
+99
+83
+105
+99
+83
+105
+99
+83
+105
+99
+83
+105
+99
+83
+105
+99
+83
+105
+99
+83
+105
+99
+83
+105
+99
+83
+105
+99
+83
+105
+99
+83
+105
+99
+83
+105
+99
+83
+105
+99
+83
+105
+99
+83
+107
+98
+83
+107
+98
+83
+107
+98
+83
+108
+99
+84
+108
+99
+84
+109
+100
+85
+109
+100
+85
+109
+100
+85
+109
+100
+85
+109
+100
+85
+109
+100
+85
+109
+100
+85
+109
+100
+85
+110
+101
+86
+110
+101
+86
+108
+102
+90
+101
+100
+95
+121
+123
+120
+151
+153
+152
+178
+182
+183
+205
+209
+210
+228
+233
+236
+244
+249
+252
+250
+255
+255
+251
+255
+255
+252
+255
+255
+253
+254
+255
+254
+254
+254
+255
+254
+252
+255
+255
+251
+255
+255
+250
+255
+255
+244
+254
+252
+231
+250
+249
+221
+239
+240
+209
+225
+229
+196
+210
+216
+180
+188
+196
+159
+160
+168
+131
+135
+145
+108
+96
+103
+69
+81
+88
+55
+68
+71
+44
+68
+67
+46
+74
+68
+52
+76
+68
+55
+75
+65
+56
+73
+62
+58
+68
+58
+57
+84
+74
+75
+107
+95
+95
+130
+118
+118
+157
+146
+144
+192
+178
+175
+219
+206
+200
+234
+220
+211
+248
+228
+217
+255
+240
+229
+255
+224
+214
+234
+167
+159
+190
+101
+97
+177
+67
+68
+198
+72
+75
+219
+86
+89
+216
+88
+85
+207
+79
+76
+202
+70
+66
+204
+69
+66
+210
+70
+69
+214
+70
+70
+216
+68
+68
+217
+67
+68
+214
+61
+63
+216
+62
+64
+217
+63
+63
+217
+63
+63
+217
+65
+64
+214
+64
+63
+213
+65
+61
+213
+64
+58
+217
+64
+58
+217
+64
+58
+210
+66
+58
+203
+69
+60
+192
+68
+60
+178
+66
+55
+161
+60
+50
+147
+57
+46
+142
+60
+48
+137
+61
+48
+131
+62
+47
+129
+62
+46
+127
+61
+45
+126
+60
+44
+128
+61
+45
+128
+61
+45
+127
+57
+45
+127
+57
+45
+126
+58
+47
+125
+57
+46
+125
+57
+46
+124
+56
+45
+123
+56
+47
+123
+56
+47
+125
+58
+49
+125
+58
+49
+123
+59
+50
+123
+59
+50
+123
+59
+50
+123
+59
+50
+122
+59
+52
+120
+60
+52
+116
+59
+50
+113
+59
+49
+114
+57
+48
+111
+57
+47
+110
+56
+46
+108
+56
+45
+108
+54
+44
+107
+55
+44
+108
+56
+45
+106
+56
+45
+106
+56
+45
+106
+56
+45
+106
+56
+45
+105
+57
+45
+106
+56
+45
+106
+56
+45
+110
+57
+49
+109
+56
+48
+109
+56
+48
+109
+56
+48
+109
+56
+48
+105
+55
+46
+102
+52
+43
+99
+49
+40
+100
+50
+41
+97
+49
+39
+93
+45
+35
+95
+48
+38
+99
+52
+42
+92
+45
+35
+95
+48
+38
+115
+68
+60
+125
+80
+74
+129
+86
+80
+126
+89
+81
+112
+84
+73
+94
+74
+63
+79
+67
+55
+63
+60
+45
+52
+54
+40
+50
+59
+42
+48
+59
+43
+49
+60
+46
+50
+61
+47
+52
+60
+49
+52
+60
+49
+53
+59
+49
+55
+58
+51
+55
+57
+52
+55
+57
+54
+54
+56
+51
+53
+55
+50
+53
+55
+50
+50
+55
+48
+48
+55
+47
+48
+56
+45
+46
+57
+43
+48
+59
+45
+50
+63
+46
+54
+67
+50
+55
+69
+52
+56
+71
+52
+56
+71
+52
+57
+70
+53
+52
+62
+51
+51
+58
+50
+47
+52
+45
+44
+50
+40
+47
+48
+40
+49
+51
+40
+53
+55
+42
+54
+58
+41
+54
+62
+39
+68
+81
+53
+89
+109
+74
+107
+132
+90
+119
+151
+102
+119
+156
+102
+108
+147
+90
+95
+135
+75
+87
+120
+67
+87
+117
+67
+84
+114
+64
+84
+114
+64
+86
+116
+66
+88
+118
+68
+89
+119
+69
+89
+119
+69
+90
+120
+70
+93
+123
+73
+95
+125
+75
+93
+123
+73
+93
+123
+73
+95
+125
+75
+94
+124
+74
+90
+119
+75
+78
+101
+72
+65
+87
+64
+54
+76
+53
+105
+99
+83
+105
+99
+83
+105
+99
+83
+105
+99
+83
+105
+99
+83
+105
+99
+83
+105
+99
+83
+105
+99
+83
+105
+99
+83
+105
+99
+83
+105
+99
+83
+105
+99
+83
+105
+99
+83
+105
+99
+83
+105
+99
+83
+105
+99
+83
+106
+99
+83
+107
+98
+83
+107
+98
+83
+108
+99
+84
+108
+99
+84
+109
+100
+85
+109
+100
+85
+109
+100
+85
+109
+100
+85
+109
+100
+85
+109
+100
+85
+110
+101
+86
+110
+101
+86
+110
+101
+86
+110
+101
+86
+109
+103
+91
+106
+107
+102
+131
+135
+136
+163
+167
+168
+185
+190
+193
+208
+213
+216
+229
+237
+239
+243
+251
+253
+245
+253
+255
+251
+255
+255
+251
+255
+255
+252
+255
+255
+252
+254
+251
+253
+254
+249
+254
+253
+248
+255
+254
+247
+255
+255
+243
+248
+253
+230
+244
+253
+222
+238
+247
+216
+230
+242
+206
+221
+233
+195
+206
+218
+180
+182
+193
+153
+161
+171
+134
+128
+135
+101
+102
+109
+76
+77
+81
+54
+70
+72
+48
+72
+74
+53
+75
+73
+58
+72
+68
+57
+68
+64
+55
+80
+70
+68
+106
+96
+95
+139
+129
+128
+164
+154
+153
+183
+175
+172
+203
+198
+194
+223
+218
+212
+234
+230
+221
+247
+238
+229
+255
+249
+239
+255
+246
+235
+255
+215
+207
+245
+178
+172
+227
+141
+140
+200
+100
+100
+176
+68
+66
+194
+83
+76
+200
+85
+78
+199
+82
+73
+195
+72
+65
+199
+72
+66
+211
+77
+74
+213
+74
+71
+207
+63
+62
+210
+62
+62
+212
+62
+63
+213
+63
+62
+216
+64
+63
+214
+64
+63
+214
+64
+63
+213
+65
+61
+213
+65
+61
+214
+62
+57
+213
+64
+58
+210
+67
+61
+204
+69
+63
+192
+69
+62
+178
+65
+57
+162
+61
+53
+149
+59
+50
+142
+60
+49
+137
+61
+48
+131
+62
+47
+129
+62
+46
+127
+61
+47
+126
+60
+44
+128
+61
+45
+128
+61
+45
+127
+57
+45
+127
+57
+45
+126
+58
+47
+125
+57
+46
+125
+57
+46
+124
+56
+45
+123
+56
+47
+123
+56
+47
+126
+59
+50
+126
+59
+50
+124
+60
+51
+123
+59
+50
+123
+59
+50
+123
+59
+50
+122
+59
+52
+120
+60
+52
+114
+57
+48
+111
+57
+47
+111
+57
+47
+109
+57
+46
+108
+56
+45
+107
+55
+44
+106
+54
+43
+104
+54
+43
+105
+55
+44
+105
+55
+44
+105
+55
+44
+104
+56
+44
+104
+56
+44
+104
+56
+44
+104
+56
+44
+104
+56
+44
+109
+59
+50
+108
+55
+47
+106
+53
+45
+105
+55
+46
+106
+56
+47
+106
+56
+47
+102
+52
+43
+97
+49
+39
+101
+53
+43
+97
+50
+40
+93
+46
+36
+97
+50
+40
+98
+51
+41
+89
+42
+32
+97
+50
+40
+121
+78
+69
+129
+92
+86
+118
+87
+82
+105
+78
+71
+87
+67
+58
+73
+60
+51
+64
+58
+46
+58
+59
+45
+56
+60
+46
+48
+56
+41
+47
+58
+42
+51
+59
+46
+52
+60
+47
+53
+61
+50
+53
+59
+49
+54
+57
+48
+54
+57
+48
+55
+57
+52
+54
+56
+51
+54
+56
+51
+52
+57
+50
+51
+56
+49
+51
+57
+47
+49
+57
+46
+49
+57
+46
+46
+57
+43
+47
+58
+44
+48
+61
+44
+50
+63
+46
+53
+66
+49
+55
+69
+52
+59
+72
+54
+60
+73
+56
+57
+67
+56
+55
+63
+52
+50
+56
+46
+45
+51
+39
+46
+48
+37
+47
+49
+36
+50
+52
+38
+52
+56
+39
+52
+60
+39
+69
+82
+56
+93
+112
+80
+114
+139
+100
+123
+154
+110
+119
+156
+105
+102
+141
+88
+85
+124
+69
+83
+115
+65
+84
+114
+64
+83
+113
+63
+83
+113
+63
+84
+114
+64
+85
+115
+65
+86
+116
+66
+86
+116
+66
+87
+117
+67
+91
+121
+71
+93
+123
+73
+92
+122
+72
+94
+124
+74
+95
+125
+75
+92
+122
+72
+87
+114
+73
+73
+93
+68
+61
+78
+60
+49
+66
+48
+103
+100
+83
+103
+100
+83
+103
+100
+83
+103
+100
+83
+103
+100
+83
+103
+100
+83
+103
+100
+83
+103
+100
+83
+103
+100
+83
+103
+100
+83
+103
+100
+83
+103
+100
+83
+103
+100
+83
+103
+100
+83
+103
+100
+83
+105
+99
+83
+106
+99
+83
+107
+98
+83
+107
+98
+83
+108
+99
+84
+108
+99
+84
+109
+100
+85
+109
+100
+85
+109
+100
+85
+109
+100
+85
+109
+100
+85
+109
+100
+85
+110
+101
+86
+110
+101
+86
+111
+102
+87
+111
+102
+87
+110
+103
+93
+113
+113
+111
+135
+140
+143
+164
+169
+172
+183
+191
+194
+205
+213
+216
+227
+237
+239
+242
+252
+254
+244
+254
+255
+248
+255
+255
+250
+255
+255
+251
+255
+252
+253
+255
+250
+252
+253
+245
+250
+252
+241
+249
+249
+237
+246
+248
+234
+246
+255
+232
+243
+255
+228
+240
+253
+225
+238
+249
+217
+233
+244
+210
+222
+232
+197
+202
+210
+173
+182
+190
+153
+157
+163
+129
+125
+130
+98
+89
+93
+66
+71
+76
+53
+70
+75
+55
+70
+74
+57
+67
+71
+57
+65
+67
+56
+98
+95
+88
+133
+125
+122
+170
+162
+159
+192
+184
+181
+203
+195
+193
+213
+208
+205
+230
+225
+221
+241
+238
+233
+249
+246
+239
+250
+243
+233
+251
+237
+226
+255
+236
+227
+255
+242
+234
+255
+224
+219
+233
+165
+162
+182
+105
+99
+164
+76
+64
+178
+82
+68
+192
+90
+78
+199
+92
+82
+197
+83
+73
+190
+69
+61
+193
+64
+59
+202
+67
+64
+203
+64
+61
+206
+64
+62
+209
+63
+63
+210
+64
+64
+211
+66
+63
+211
+66
+63
+211
+66
+63
+211
+66
+61
+211
+63
+59
+210
+65
+60
+208
+69
+64
+201
+69
+64
+189
+67
+62
+175
+64
+57
+160
+62
+53
+149
+61
+51
+142
+60
+49
+137
+60
+50
+131
+61
+49
+129
+61
+48
+127
+61
+49
+126
+60
+46
+127
+61
+47
+127
+61
+47
+126
+58
+47
+126
+58
+47
+126
+58
+47
+125
+57
+46
+124
+57
+48
+123
+56
+47
+123
+56
+47
+123
+56
+47
+124
+60
+51
+124
+60
+51
+124
+60
+51
+123
+59
+50
+122
+59
+52
+121
+58
+51
+121
+58
+51
+119
+59
+51
+110
+55
+48
+109
+56
+48
+108
+55
+47
+108
+55
+47
+107
+54
+46
+104
+54
+45
+104
+54
+45
+104
+54
+45
+105
+55
+46
+104
+56
+46
+104
+56
+46
+103
+56
+46
+103
+56
+46
+103
+56
+46
+103
+56
+46
+104
+56
+46
+107
+57
+50
+104
+54
+47
+102
+52
+45
+103
+53
+46
+105
+55
+48
+104
+55
+48
+101
+52
+45
+98
+49
+42
+99
+50
+43
+98
+51
+43
+95
+48
+40
+93
+49
+40
+93
+49
+40
+86
+42
+33
+98
+54
+45
+123
+85
+76
+116
+89
+82
+97
+78
+72
+78
+63
+56
+65
+55
+46
+61
+54
+44
+59
+57
+45
+57
+59
+46
+57
+60
+49
+51
+57
+45
+51
+59
+46
+53
+59
+47
+54
+60
+48
+54
+60
+48
+55
+58
+47
+53
+56
+45
+52
+55
+46
+54
+57
+48
+52
+57
+50
+51
+56
+49
+51
+57
+47
+51
+57
+47
+50
+58
+47
+49
+57
+46
+49
+57
+44
+46
+57
+43
+46
+57
+43
+47
+58
+44
+48
+59
+45
+51
+62
+46
+54
+67
+50
+58
+69
+53
+60
+71
+55
+61
+69
+56
+58
+66
+53
+53
+59
+47
+48
+54
+40
+48
+50
+37
+47
+49
+36
+49
+51
+37
+49
+53
+36
+50
+58
+37
+71
+83
+59
+98
+117
+87
+119
+143
+107
+124
+155
+114
+113
+149
+103
+92
+130
+81
+74
+112
+61
+79
+111
+62
+81
+110
+62
+81
+110
+62
+81
+110
+62
+81
+110
+62
+81
+110
+62
+83
+112
+64
+83
+112
+64
+87
+116
+68
+91
+120
+72
+93
+122
+74
+93
+122
+74
+95
+124
+76
+95
+124
+76
+90
+119
+71
+82
+108
+69
+65
+82
+63
+54
+67
+57
+43
+56
+46
+103
+100
+83
+103
+100
+83
+103
+100
+83
+103
+100
+83
+103
+100
+83
+103
+100
+83
+103
+100
+83
+103
+100
+83
+103
+100
+83
+103
+100
+83
+103
+100
+83
+103
+100
+83
+103
+100
+83
+103
+100
+83
+103
+100
+83
+105
+99
+83
+106
+99
+83
+107
+98
+83
+107
+98
+83
+108
+99
+84
+108
+99
+84
+109
+100
+85
+109
+100
+85
+109
+100
+85
+109
+100
+85
+109
+100
+85
+110
+101
+86
+110
+101
+86
+111
+102
+87
+112
+103
+88
+112
+103
+88
+110
+103
+93
+108
+110
+109
+122
+130
+133
+147
+154
+160
+171
+181
+183
+196
+206
+208
+220
+230
+232
+237
+247
+249
+244
+254
+255
+245
+254
+253
+246
+255
+252
+250
+255
+250
+251
+255
+249
+251
+254
+243
+248
+250
+237
+245
+246
+232
+241
+244
+227
+244
+253
+234
+244
+253
+232
+244
+252
+229
+243
+249
+223
+242
+246
+219
+233
+236
+205
+216
+215
+185
+197
+196
+165
+177
+176
+146
+143
+142
+114
+101
+103
+79
+77
+80
+59
+71
+75
+58
+70
+77
+61
+71
+79
+66
+74
+82
+71
+122
+123
+115
+158
+155
+148
+195
+190
+184
+215
+207
+204
+222
+212
+211
+230
+220
+219
+243
+235
+233
+252
+247
+244
+243
+240
+235
+254
+251
+244
+255
+255
+246
+255
+251
+241
+255
+243
+234
+255
+237
+229
+255
+226
+218
+255
+210
+199
+212
+143
+127
+181
+100
+81
+162
+75
+58
+178
+85
+70
+190
+88
+74
+182
+71
+60
+182
+63
+55
+199
+74
+68
+199
+67
+62
+202
+67
+63
+205
+66
+63
+208
+66
+64
+208
+66
+62
+208
+66
+62
+208
+66
+62
+208
+65
+61
+210
+65
+60
+210
+67
+63
+206
+68
+65
+197
+68
+63
+184
+65
+61
+170
+61
+56
+158
+59
+53
+149
+60
+52
+142
+59
+51
+137
+60
+50
+131
+61
+51
+129
+61
+50
+127
+61
+49
+126
+60
+48
+127
+61
+49
+127
+61
+47
+126
+58
+47
+126
+58
+47
+126
+58
+47
+125
+57
+46
+124
+57
+48
+123
+56
+47
+123
+56
+47
+123
+56
+47
+124
+60
+51
+123
+59
+50
+123
+59
+50
+122
+58
+49
+121
+58
+51
+120
+57
+50
+119
+56
+49
+117
+57
+49
+110
+55
+48
+108
+55
+47
+108
+55
+47
+106
+56
+47
+105
+55
+46
+105
+55
+46
+104
+54
+45
+103
+55
+45
+103
+55
+45
+103
+55
+45
+102
+55
+45
+102
+55
+45
+102
+55
+45
+102
+55
+45
+102
+55
+45
+102
+55
+45
+104
+55
+48
+104
+54
+47
+103
+53
+46
+103
+53
+46
+103
+54
+47
+104
+55
+48
+103
+54
+47
+102
+53
+46
+97
+50
+42
+101
+54
+46
+94
+50
+41
+92
+48
+39
+96
+52
+43
+97
+53
+44
+105
+61
+52
+117
+83
+74
+88
+71
+64
+69
+62
+54
+60
+53
+47
+57
+53
+44
+59
+56
+47
+56
+58
+47
+53
+55
+44
+51
+54
+43
+54
+57
+46
+53
+59
+47
+55
+58
+47
+54
+57
+46
+54
+57
+46
+53
+56
+45
+53
+55
+44
+51
+54
+43
+50
+56
+44
+49
+57
+44
+50
+56
+46
+49
+57
+44
+49
+57
+46
+49
+57
+44
+49
+57
+44
+49
+57
+44
+46
+57
+43
+46
+57
+43
+46
+57
+43
+47
+58
+44
+48
+59
+43
+51
+62
+46
+54
+65
+49
+55
+66
+50
+60
+68
+53
+58
+67
+50
+56
+63
+47
+53
+59
+45
+52
+54
+41
+50
+52
+39
+49
+51
+37
+48
+52
+37
+48
+55
+37
+72
+84
+62
+101
+120
+92
+117
+141
+109
+116
+146
+108
+102
+137
+95
+82
+119
+75
+66
+104
+57
+75
+107
+60
+78
+107
+59
+80
+109
+61
+80
+109
+61
+78
+107
+59
+78
+107
+59
+79
+108
+60
+81
+110
+62
+86
+115
+67
+90
+119
+71
+93
+122
+74
+94
+123
+75
+95
+124
+76
+95
+124
+76
+86
+115
+67
+78
+102
+66
+59
+73
+56
+48
+59
+51
+38
+47
+42
+103
+100
+83
+103
+100
+83
+103
+100
+83
+103
+100
+83
+103
+100
+83
+103
+100
+83
+103
+100
+83
+103
+100
+83
+103
+100
+83
+103
+100
+83
+103
+100
+83
+103
+100
+83
+103
+100
+83
+103
+100
+83
+103
+100
+83
+105
+99
+83
+106
+99
+83
+107
+98
+83
+107
+98
+83
+108
+99
+84
+108
+99
+84
+109
+100
+85
+109
+100
+85
+109
+100
+85
+109
+100
+85
+109
+100
+85
+110
+101
+86
+110
+101
+86
+111
+102
+87
+112
+103
+88
+113
+104
+89
+111
+104
+94
+104
+105
+107
+109
+116
+122
+133
+140
+148
+163
+172
+177
+191
+200
+205
+211
+222
+226
+229
+240
+242
+240
+252
+252
+242
+252
+251
+245
+254
+249
+248
+255
+247
+250
+255
+246
+252
+255
+242
+250
+253
+236
+248
+249
+231
+246
+247
+231
+246
+246
+234
+247
+247
+235
+250
+247
+232
+252
+246
+230
+253
+245
+226
+247
+236
+214
+231
+216
+195
+213
+198
+175
+192
+177
+154
+158
+147
+125
+117
+110
+91
+90
+87
+70
+80
+81
+67
+83
+86
+75
+91
+98
+90
+99
+109
+100
+146
+154
+141
+176
+179
+168
+210
+207
+198
+230
+223
+217
+242
+228
+227
+249
+235
+235
+255
+241
+244
+255
+248
+249
+255
+253
+251
+255
+251
+248
+249
+248
+243
+247
+247
+237
+251
+249
+237
+255
+252
+240
+255
+253
+241
+255
+249
+234
+255
+224
+203
+234
+168
+144
+183
+111
+89
+168
+87
+68
+174
+85
+69
+183
+82
+70
+185
+77
+65
+191
+74
+65
+195
+71
+63
+198
+69
+63
+202
+69
+64
+203
+68
+64
+205
+68
+62
+204
+67
+61
+203
+66
+60
+204
+65
+60
+209
+67
+63
+208
+69
+64
+204
+69
+65
+194
+67
+61
+179
+61
+57
+166
+59
+53
+156
+59
+53
+149
+60
+54
+140
+60
+51
+135
+61
+52
+133
+60
+53
+129
+61
+52
+127
+60
+51
+126
+60
+48
+127
+61
+49
+127
+61
+49
+126
+58
+47
+126
+58
+47
+126
+58
+47
+125
+57
+46
+124
+57
+48
+123
+56
+47
+123
+56
+47
+123
+56
+47
+123
+59
+50
+123
+59
+50
+121
+58
+51
+120
+57
+50
+119
+56
+49
+118
+55
+48
+118
+55
+48
+115
+55
+47
+110
+55
+48
+106
+56
+47
+106
+56
+47
+106
+56
+47
+106
+56
+47
+104
+56
+46
+104
+56
+46
+104
+56
+46
+103
+55
+45
+102
+55
+45
+102
+55
+45
+102
+55
+45
+100
+56
+45
+100
+56
+45
+100
+56
+45
+102
+55
+45
+103
+54
+47
+104
+55
+48
+105
+56
+49
+105
+56
+49
+104
+55
+48
+105
+56
+49
+106
+59
+51
+108
+61
+53
+103
+56
+48
+107
+60
+52
+98
+54
+45
+97
+53
+44
+111
+67
+58
+120
+76
+67
+116
+73
+64
+110
+77
+68
+67
+57
+48
+53
+54
+46
+52
+53
+47
+56
+57
+49
+56
+59
+50
+52
+55
+46
+49
+52
+43
+50
+53
+44
+53
+56
+45
+53
+56
+45
+53
+55
+44
+52
+54
+43
+52
+54
+43
+52
+54
+43
+52
+54
+41
+51
+55
+41
+47
+55
+40
+46
+57
+41
+48
+56
+43
+46
+57
+41
+46
+57
+43
+46
+57
+41
+48
+56
+41
+48
+56
+41
+49
+57
+42
+48
+56
+41
+48
+56
+43
+47
+55
+42
+48
+56
+43
+49
+57
+44
+51
+59
+46
+52
+60
+45
+57
+66
+49
+58
+67
+48
+59
+66
+48
+58
+65
+49
+58
+60
+46
+54
+56
+42
+50
+52
+38
+47
+51
+36
+50
+57
+39
+73
+85
+63
+99
+117
+91
+109
+132
+103
+102
+132
+98
+87
+121
+84
+73
+110
+69
+63
+100
+56
+72
+103
+59
+76
+105
+59
+78
+107
+61
+78
+107
+61
+76
+105
+59
+76
+105
+59
+77
+106
+60
+79
+108
+62
+85
+114
+68
+89
+118
+72
+91
+120
+74
+93
+122
+76
+94
+123
+77
+92
+121
+75
+81
+110
+64
+71
+95
+59
+54
+66
+52
+43
+52
+47
+34
+40
+38
+103
+100
+83
+103
+100
+83
+103
+100
+83
+103
+100
+83
+103
+100
+83
+103
+100
+83
+103
+100
+83
+103
+100
+83
+103
+100
+83
+103
+100
+83
+103
+100
+83
+103
+100
+83
+103
+100
+83
+103
+100
+83
+103
+100
+83
+105
+99
+83
+106
+99
+83
+106
+99
+83
+106
+98
+85
+108
+98
+86
+108
+98
+86
+109
+99
+87
+109
+100
+85
+109
+100
+85
+109
+100
+85
+108
+101
+85
+109
+102
+86
+110
+103
+87
+111
+103
+90
+110
+104
+92
+111
+104
+94
+109
+106
+101
+107
+111
+114
+109
+116
+122
+131
+138
+144
+165
+174
+179
+195
+204
+209
+213
+223
+225
+230
+238
+241
+244
+252
+254
+244
+253
+250
+247
+253
+249
+249
+254
+247
+250
+255
+244
+252
+255
+242
+252
+255
+241
+252
+255
+238
+253
+254
+240
+251
+248
+239
+254
+250
+241
+255
+249
+239
+255
+250
+237
+255
+249
+233
+255
+242
+223
+239
+224
+203
+221
+206
+183
+193
+178
+155
+162
+151
+129
+124
+117
+98
+98
+95
+78
+88
+90
+76
+93
+99
+87
+109
+119
+110
+124
+134
+125
+165
+173
+162
+187
+193
+181
+215
+215
+207
+235
+230
+226
+250
+238
+238
+255
+244
+244
+255
+245
+247
+254
+244
+245
+253
+247
+247
+250
+249
+247
+250
+252
+247
+251
+255
+249
+250
+253
+244
+244
+247
+238
+247
+249
+238
+255
+252
+239
+255
+242
+225
+255
+242
+224
+250
+201
+184
+188
+129
+113
+157
+85
+71
+171
+85
+72
+183
+85
+74
+177
+69
+59
+192
+74
+64
+198
+71
+64
+201
+70
+62
+202
+69
+62
+202
+67
+61
+201
+66
+60
+199
+66
+59
+200
+65
+59
+207
+70
+62
+205
+71
+62
+199
+71
+62
+188
+67
+59
+173
+62
+53
+159
+58
+50
+149
+59
+51
+145
+62
+54
+138
+61
+53
+132
+62
+52
+130
+62
+53
+129
+61
+52
+127
+60
+51
+126
+60
+48
+128
+60
+49
+128
+60
+49
+126
+58
+47
+126
+58
+47
+126
+58
+49
+125
+57
+48
+124
+57
+48
+123
+56
+47
+123
+56
+47
+123
+56
+47
+122
+58
+49
+122
+58
+49
+120
+57
+50
+119
+56
+49
+118
+55
+48
+117
+54
+47
+117
+54
+47
+113
+54
+46
+109
+56
+48
+107
+57
+48
+106
+56
+47
+106
+56
+47
+105
+57
+47
+105
+57
+47
+105
+57
+47
+104
+56
+46
+103
+55
+45
+102
+55
+45
+103
+55
+45
+102
+55
+45
+102
+55
+45
+102
+55
+45
+102
+55
+45
+102
+55
+45
+102
+53
+46
+106
+56
+49
+109
+59
+52
+107
+58
+51
+106
+57
+50
+106
+58
+48
+109
+62
+52
+111
+67
+56
+108
+64
+53
+111
+68
+59
+100
+60
+50
+99
+61
+50
+122
+86
+74
+134
+100
+90
+121
+87
+77
+98
+76
+65
+62
+58
+49
+51
+56
+49
+52
+57
+50
+55
+60
+53
+52
+58
+48
+47
+53
+43
+50
+53
+44
+57
+60
+51
+51
+54
+43
+50
+53
+42
+50
+52
+41
+48
+51
+40
+49
+51
+40
+50
+53
+42
+52
+54
+43
+52
+55
+44
+46
+54
+41
+44
+55
+41
+47
+55
+42
+45
+56
+42
+47
+55
+42
+47
+55
+42
+47
+55
+42
+47
+55
+42
+49
+57
+44
+48
+56
+43
+48
+56
+45
+47
+55
+44
+47
+55
+44
+47
+55
+44
+48
+56
+45
+48
+56
+43
+55
+63
+48
+57
+66
+49
+60
+69
+52
+61
+68
+52
+59
+65
+51
+56
+60
+46
+50
+54
+39
+45
+52
+36
+50
+59
+42
+74
+86
+66
+99
+114
+91
+104
+124
+97
+93
+118
+88
+79
+109
+75
+70
+102
+65
+65
+97
+58
+72
+100
+59
+75
+104
+60
+78
+107
+63
+78
+107
+63
+75
+104
+60
+74
+103
+57
+76
+105
+61
+78
+107
+61
+84
+113
+69
+87
+116
+72
+90
+119
+75
+91
+120
+76
+93
+122
+78
+90
+118
+77
+78
+106
+65
+67
+91
+59
+50
+62
+52
+41
+47
+47
+31
+37
+37
+104
+101
+86
+104
+101
+86
+104
+101
+86
+104
+101
+86
+104
+101
+86
+104
+101
+86
+104
+101
+86
+104
+101
+86
+104
+101
+86
+104
+101
+86
+104
+101
+86
+104
+101
+86
+104
+101
+86
+104
+101
+86
+104
+101
+86
+104
+101
+86
+106
+100
+86
+106
+100
+86
+106
+100
+88
+108
+100
+89
+108
+99
+90
+109
+101
+90
+109
+101
+88
+109
+102
+86
+103
+96
+78
+106
+101
+82
+110
+107
+88
+111
+108
+93
+104
+101
+92
+102
+101
+97
+115
+113
+114
+129
+130
+134
+137
+142
+146
+149
+157
+160
+170
+178
+181
+194
+199
+202
+215
+220
+223
+233
+237
+238
+245
+246
+248
+248
+250
+249
+252
+254
+253
+254
+254
+252
+255
+255
+250
+253
+254
+246
+250
+253
+242
+249
+252
+241
+250
+253
+242
+251
+254
+243
+249
+250
+242
+250
+250
+242
+249
+249
+237
+252
+250
+235
+254
+252
+231
+249
+247
+222
+233
+229
+202
+213
+212
+182
+186
+185
+155
+152
+152
+124
+113
+116
+89
+95
+100
+77
+98
+107
+88
+114
+125
+108
+132
+144
+130
+145
+155
+144
+180
+185
+178
+202
+204
+199
+226
+227
+222
+240
+239
+235
+247
+243
+242
+251
+247
+246
+253
+249
+248
+252
+248
+247
+255
+254
+252
+254
+254
+252
+254
+254
+252
+253
+255
+250
+254
+255
+250
+254
+255
+250
+254
+255
+250
+254
+255
+250
+251
+253
+248
+255
+253
+248
+255
+251
+246
+255
+229
+223
+215
+166
+159
+163
+96
+88
+155
+68
+61
+178
+75
+66
+193
+79
+69
+195
+71
+61
+198
+67
+57
+201
+68
+59
+205
+72
+63
+206
+73
+64
+203
+72
+64
+202
+71
+61
+198
+71
+56
+195
+72
+56
+190
+73
+56
+181
+71
+56
+166
+69
+53
+154
+66
+52
+144
+66
+53
+139
+67
+53
+133
+67
+53
+129
+67
+54
+127
+65
+52
+127
+63
+51
+128
+62
+50
+128
+60
+49
+129
+59
+49
+129
+59
+49
+127
+57
+49
+126
+58
+49
+124
+57
+49
+123
+56
+48
+122
+55
+47
+122
+55
+47
+119
+55
+46
+118
+54
+45
+119
+55
+46
+119
+55
+46
+119
+56
+47
+119
+56
+47
+118
+55
+46
+117
+54
+45
+113
+53
+43
+110
+51
+43
+108
+55
+47
+105
+56
+49
+105
+56
+49
+104
+55
+48
+104
+55
+48
+103
+54
+47
+103
+54
+47
+103
+54
+47
+102
+53
+46
+103
+54
+47
+105
+55
+48
+105
+56
+49
+104
+55
+48
+103
+54
+47
+101
+52
+45
+101
+51
+44
+104
+51
+45
+106
+53
+47
+109
+56
+48
+107
+57
+48
+106
+58
+48
+105
+59
+46
+105
+61
+48
+107
+65
+51
+103
+66
+50
+106
+73
+58
+100
+72
+58
+118
+95
+79
+126
+107
+92
+138
+120
+106
+140
+127
+111
+82
+74
+61
+55
+57
+46
+52
+58
+48
+52
+58
+48
+51
+57
+47
+51
+57
+47
+51
+57
+47
+50
+56
+46
+50
+56
+46
+49
+55
+45
+49
+55
+45
+51
+54
+45
+48
+54
+44
+50
+53
+44
+47
+53
+43
+49
+52
+43
+47
+53
+43
+47
+52
+45
+46
+53
+45
+47
+52
+45
+46
+53
+45
+47
+52
+45
+47
+52
+45
+47
+52
+45
+47
+52
+45
+48
+53
+46
+47
+52
+45
+47
+52
+45
+46
+51
+44
+46
+51
+44
+47
+52
+45
+47
+52
+45
+47
+54
+46
+49
+59
+50
+51
+61
+50
+54
+64
+53
+56
+66
+55
+57
+68
+54
+55
+66
+52
+53
+64
+48
+51
+62
+45
+52
+63
+46
+68
+81
+61
+87
+101
+78
+91
+107
+81
+80
+98
+72
+69
+88
+60
+64
+84
+56
+66
+87
+54
+73
+99
+62
+75
+101
+62
+75
+102
+61
+75
+102
+61
+74
+101
+60
+74
+101
+58
+76
+103
+62
+79
+106
+63
+85
+112
+71
+89
+116
+75
+92
+118
+79
+93
+119
+80
+93
+119
+82
+87
+113
+78
+72
+98
+63
+59
+79
+54
+37
+48
+42
+38
+43
+46
+36
+41
+44
+104
+101
+86
+104
+101
+86
+104
+101
+86
+104
+101
+86
+104
+101
+86
+104
+101
+86
+104
+101
+86
+104
+101
+86
+104
+101
+86
+104
+101
+86
+104
+101
+86
+104
+101
+86
+104
+101
+86
+104
+101
+86
+104
+101
+86
+104
+101
+86
+104
+101
+86
+104
+101
+86
+106
+99
+89
+107
+100
+90
+108
+99
+92
+109
+100
+91
+109
+101
+90
+109
+102
+86
+105
+100
+81
+106
+104
+83
+109
+106
+87
+106
+107
+91
+103
+103
+95
+108
+108
+108
+126
+127
+132
+144
+147
+154
+167
+174
+180
+183
+193
+195
+208
+213
+216
+225
+230
+233
+241
+242
+244
+250
+251
+253
+255
+254
+255
+255
+254
+255
+254
+253
+251
+255
+254
+250
+255
+255
+250
+254
+255
+249
+251
+252
+244
+248
+251
+242
+246
+252
+242
+247
+253
+243
+247
+250
+241
+248
+250
+239
+248
+250
+237
+247
+250
+233
+249
+251
+229
+242
+245
+218
+223
+226
+195
+204
+208
+175
+180
+184
+151
+145
+150
+118
+107
+113
+85
+89
+97
+73
+95
+107
+85
+116
+129
+111
+140
+152
+138
+157
+167
+156
+191
+193
+188
+211
+211
+209
+231
+231
+229
+243
+243
+241
+247
+247
+245
+251
+251
+249
+252
+252
+250
+251
+251
+249
+254
+254
+252
+254
+254
+252
+254
+254
+252
+254
+254
+252
+254
+254
+252
+254
+254
+252
+254
+254
+252
+251
+255
+254
+241
+255
+255
+237
+251
+252
+247
+249
+248
+255
+248
+247
+255
+233
+230
+239
+190
+185
+196
+128
+119
+164
+80
+70
+176
+78
+65
+186
+76
+63
+193
+75
+63
+196
+74
+61
+194
+68
+56
+188
+61
+52
+190
+63
+54
+196
+70
+58
+196
+70
+55
+195
+74
+55
+191
+76
+58
+180
+73
+55
+166
+70
+54
+153
+67
+50
+144
+68
+54
+138
+71
+55
+130
+68
+55
+127
+67
+56
+126
+66
+55
+124
+64
+53
+126
+62
+52
+127
+60
+51
+128
+60
+49
+128
+60
+51
+125
+58
+50
+125
+58
+50
+122
+58
+49
+122
+58
+49
+121
+57
+48
+120
+56
+47
+118
+55
+46
+118
+55
+46
+117
+54
+45
+118
+55
+46
+116
+56
+46
+116
+56
+46
+116
+56
+46
+114
+54
+44
+111
+53
+42
+109
+52
+43
+108
+55
+47
+105
+56
+49
+106
+56
+49
+104
+55
+48
+105
+55
+48
+104
+55
+48
+103
+54
+47
+103
+54
+47
+101
+51
+44
+101
+51
+44
+103
+53
+46
+104
+54
+47
+106
+56
+49
+106
+56
+49
+106
+56
+49
+107
+57
+50
+107
+54
+48
+108
+55
+49
+107
+57
+48
+107
+59
+49
+107
+59
+47
+106
+62
+49
+106
+64
+48
+105
+68
+50
+103
+72
+54
+107
+80
+61
+103
+82
+65
+117
+102
+83
+129
+117
+101
+140
+133
+115
+134
+131
+114
+75
+76
+60
+54
+57
+46
+51
+57
+47
+51
+57
+47
+51
+57
+47
+50
+56
+46
+50
+56
+46
+50
+56
+46
+49
+55
+45
+49
+55
+45
+49
+55
+45
+49
+55
+45
+48
+54
+44
+48
+54
+44
+47
+53
+43
+47
+53
+43
+47
+53
+43
+47
+52
+46
+47
+52
+46
+47
+52
+46
+47
+52
+46
+47
+52
+46
+47
+52
+46
+47
+52
+46
+47
+52
+46
+48
+53
+47
+47
+52
+46
+46
+51
+45
+46
+51
+45
+46
+51
+45
+46
+51
+45
+47
+52
+46
+47
+54
+47
+46
+56
+48
+47
+58
+50
+49
+61
+51
+52
+64
+54
+54
+66
+54
+54
+66
+54
+54
+66
+52
+53
+66
+49
+54
+67
+49
+67
+80
+62
+80
+93
+73
+82
+96
+73
+73
+87
+64
+65
+79
+54
+66
+80
+55
+69
+85
+58
+74
+98
+64
+74
+100
+63
+75
+101
+64
+75
+101
+62
+73
+99
+60
+72
+99
+58
+73
+100
+59
+74
+101
+60
+83
+110
+69
+88
+114
+75
+92
+118
+81
+93
+119
+84
+91
+116
+84
+84
+109
+79
+67
+92
+62
+54
+73
+53
+38
+49
+45
+39
+44
+48
+37
+42
+46
+104
+101
+86
+104
+101
+86
+104
+101
+86
+104
+101
+86
+104
+101
+86
+104
+101
+86
+104
+101
+86
+104
+101
+86
+104
+101
+86
+104
+101
+86
+104
+101
+86
+104
+101
+86
+104
+101
+86
+104
+101
+86
+104
+101
+86
+104
+101
+86
+104
+101
+86
+104
+101
+86
+106
+99
+89
+107
+100
+90
+108
+99
+92
+109
+100
+91
+109
+101
+90
+109
+102
+86
+109
+104
+85
+107
+105
+84
+109
+106
+87
+106
+107
+91
+107
+107
+99
+119
+119
+119
+145
+146
+151
+167
+172
+178
+190
+197
+203
+209
+219
+221
+235
+240
+243
+246
+251
+254
+253
+254
+255
+254
+255
+255
+255
+254
+255
+255
+253
+254
+254
+253
+251
+255
+254
+250
+255
+255
+250
+253
+254
+248
+250
+251
+243
+245
+248
+239
+241
+247
+235
+241
+247
+235
+244
+247
+236
+245
+249
+235
+246
+248
+234
+245
+248
+229
+245
+247
+225
+238
+238
+212
+219
+219
+191
+201
+202
+171
+176
+177
+146
+147
+150
+121
+117
+121
+96
+107
+112
+90
+116
+123
+105
+136
+144
+129
+159
+167
+156
+174
+181
+173
+205
+207
+202
+222
+222
+220
+239
+239
+237
+248
+248
+246
+251
+251
+249
+254
+254
+252
+254
+254
+252
+253
+253
+251
+254
+254
+252
+254
+254
+252
+254
+254
+252
+254
+254
+252
+254
+254
+252
+254
+254
+252
+254
+254
+252
+253
+255
+254
+245
+250
+253
+251
+255
+255
+254
+254
+254
+255
+248
+246
+255
+250
+244
+255
+245
+235
+248
+204
+193
+215
+157
+143
+147
+75
+60
+164
+81
+65
+168
+75
+58
+167
+64
+49
+183
+71
+59
+207
+89
+77
+206
+84
+73
+189
+63
+51
+196
+68
+55
+198
+72
+58
+195
+75
+61
+185
+73
+59
+170
+66
+55
+157
+63
+51
+149
+65
+55
+144
+70
+59
+134
+66
+57
+129
+66
+57
+126
+66
+56
+123
+65
+54
+122
+64
+53
+122
+62
+52
+122
+62
+52
+122
+62
+52
+120
+60
+52
+120
+60
+52
+119
+59
+51
+119
+59
+51
+117
+58
+50
+116
+57
+49
+116
+57
+49
+116
+57
+49
+114
+57
+48
+114
+57
+48
+114
+57
+48
+114
+57
+48
+111
+57
+47
+110
+56
+46
+108
+54
+44
+107
+53
+43
+108
+55
+47
+106
+56
+49
+108
+55
+49
+106
+56
+49
+107
+54
+48
+105
+55
+48
+105
+55
+48
+104
+54
+47
+103
+53
+46
+103
+53
+46
+102
+53
+46
+103
+54
+47
+104
+55
+48
+105
+56
+49
+107
+58
+51
+107
+58
+51
+108
+59
+52
+106
+59
+51
+105
+58
+48
+104
+60
+49
+107
+63
+50
+106
+67
+52
+105
+68
+50
+102
+69
+50
+102
+73
+55
+108
+86
+65
+106
+89
+71
+117
+106
+86
+134
+127
+109
+145
+142
+123
+128
+127
+109
+69
+70
+54
+53
+56
+45
+50
+56
+46
+50
+56
+46
+50
+56
+46
+49
+55
+45
+49
+55
+45
+49
+55
+45
+48
+54
+44
+49
+55
+45
+49
+55
+45
+49
+55
+45
+48
+54
+44
+48
+54
+44
+47
+53
+43
+47
+53
+43
+47
+53
+43
+47
+52
+46
+47
+52
+46
+47
+52
+46
+47
+52
+46
+47
+52
+46
+47
+52
+46
+47
+52
+46
+47
+52
+46
+47
+52
+46
+47
+52
+46
+46
+51
+45
+45
+50
+44
+45
+50
+44
+46
+51
+45
+47
+52
+46
+46
+53
+46
+43
+53
+45
+43
+54
+46
+45
+57
+47
+47
+59
+49
+50
+62
+50
+52
+64
+52
+54
+66
+52
+55
+68
+51
+56
+69
+51
+63
+76
+58
+69
+82
+62
+67
+81
+58
+59
+73
+50
+56
+70
+45
+62
+76
+51
+68
+84
+57
+74
+95
+64
+74
+98
+64
+76
+100
+66
+75
+99
+63
+73
+97
+61
+71
+96
+57
+70
+95
+56
+71
+96
+57
+82
+107
+68
+88
+112
+76
+93
+117
+83
+94
+118
+86
+90
+113
+84
+80
+103
+75
+61
+84
+56
+46
+65
+46
+38
+49
+45
+39
+44
+48
+37
+42
+46
+104
+101
+86
+104
+101
+86
+104
+101
+86
+104
+101
+86
+104
+101
+86
+104
+101
+86
+104
+101
+86
+104
+101
+86
+104
+101
+86
+104
+101
+86
+104
+101
+86
+104
+101
+86
+104
+101
+86
+104
+101
+86
+104
+101
+86
+104
+101
+86
+104
+101
+86
+104
+101
+86
+106
+99
+89
+107
+100
+90
+108
+99
+92
+109
+100
+91
+109
+101
+90
+109
+102
+86
+110
+105
+86
+108
+106
+85
+108
+107
+87
+108
+109
+93
+112
+113
+105
+128
+130
+129
+158
+161
+166
+185
+190
+196
+195
+202
+208
+218
+228
+230
+244
+249
+252
+250
+255
+255
+251
+252
+254
+251
+252
+254
+253
+251
+252
+251
+250
+248
+255
+254
+252
+255
+255
+251
+255
+254
+249
+251
+252
+244
+245
+246
+238
+238
+241
+230
+233
+239
+227
+231
+237
+223
+237
+241
+226
+240
+244
+229
+241
+244
+227
+241
+244
+223
+242
+241
+220
+234
+234
+208
+216
+216
+188
+199
+199
+171
+178
+177
+149
+161
+161
+137
+145
+147
+125
+144
+147
+128
+156
+158
+145
+170
+173
+162
+182
+187
+180
+192
+197
+191
+220
+220
+218
+233
+233
+231
+246
+246
+244
+251
+251
+249
+253
+253
+251
+255
+255
+253
+255
+255
+253
+253
+253
+251
+254
+254
+252
+254
+254
+252
+254
+254
+252
+254
+254
+252
+254
+254
+252
+254
+254
+252
+254
+254
+252
+254
+254
+254
+251
+251
+253
+255
+254
+255
+255
+254
+255
+245
+240
+237
+246
+237
+230
+255
+249
+240
+255
+250
+236
+255
+238
+222
+232
+191
+173
+183
+127
+110
+148
+79
+63
+163
+80
+64
+185
+89
+75
+184
+78
+64
+180
+68
+56
+190
+69
+58
+193
+65
+54
+198
+70
+59
+197
+73
+63
+188
+71
+61
+173
+64
+57
+161
+60
+52
+152
+62
+54
+149
+66
+60
+139
+64
+59
+133
+66
+60
+128
+65
+58
+124
+65
+59
+121
+64
+57
+119
+64
+57
+117
+64
+56
+118
+63
+56
+118
+61
+52
+118
+61
+52
+118
+61
+52
+117
+60
+51
+115
+61
+51
+114
+60
+50
+114
+60
+50
+113
+59
+49
+111
+59
+48
+111
+59
+48
+111
+59
+48
+110
+58
+47
+107
+57
+46
+106
+56
+45
+106
+56
+45
+105
+55
+46
+109
+56
+50
+110
+55
+50
+109
+54
+49
+108
+55
+49
+108
+55
+49
+107
+54
+48
+105
+55
+48
+105
+55
+48
+108
+58
+51
+106
+57
+50
+104
+55
+48
+102
+55
+47
+102
+55
+47
+102
+55
+47
+104
+57
+49
+102
+58
+49
+106
+63
+54
+102
+62
+52
+101
+61
+49
+102
+62
+50
+104
+67
+51
+105
+69
+53
+102
+71
+51
+99
+71
+50
+99
+74
+54
+104
+86
+64
+105
+92
+73
+115
+107
+86
+133
+130
+111
+143
+142
+122
+112
+113
+95
+57
+61
+44
+52
+55
+44
+50
+56
+46
+49
+55
+45
+49
+55
+45
+49
+55
+45
+48
+54
+44
+48
+54
+44
+48
+54
+44
+49
+55
+45
+49
+55
+45
+49
+55
+45
+48
+54
+44
+48
+54
+44
+47
+53
+43
+47
+53
+43
+47
+53
+43
+46
+51
+45
+46
+51
+45
+46
+51
+45
+46
+51
+45
+46
+51
+45
+46
+51
+45
+46
+51
+45
+46
+51
+45
+46
+51
+45
+46
+51
+45
+45
+50
+44
+45
+50
+44
+45
+50
+44
+45
+50
+44
+46
+51
+45
+45
+52
+45
+42
+52
+44
+41
+52
+44
+42
+54
+44
+43
+55
+45
+46
+58
+46
+49
+61
+49
+52
+64
+50
+53
+65
+51
+54
+67
+50
+58
+71
+53
+60
+73
+55
+56
+69
+49
+50
+63
+43
+50
+64
+41
+56
+70
+47
+62
+78
+52
+68
+88
+60
+69
+93
+61
+75
+96
+65
+74
+98
+64
+75
+96
+63
+71
+95
+59
+72
+94
+58
+70
+94
+58
+83
+105
+69
+88
+112
+78
+96
+117
+86
+94
+117
+88
+90
+110
+83
+76
+99
+73
+57
+77
+52
+41
+58
+40
+38
+47
+44
+37
+42
+46
+35
+40
+44
+104
+101
+86
+104
+101
+86
+104
+101
+86
+104
+101
+86
+104
+101
+86
+104
+101
+86
+104
+101
+86
+104
+101
+86
+104
+101
+86
+104
+101
+86
+104
+101
+86
+104
+101
+86
+104
+101
+86
+104
+101
+86
+104
+101
+86
+104
+101
+86
+104
+101
+86
+104
+101
+86
+106
+99
+89
+107
+100
+90
+108
+99
+92
+109
+100
+91
+109
+101
+90
+109
+102
+86
+108
+103
+84
+107
+105
+84
+110
+109
+89
+111
+112
+96
+116
+117
+109
+133
+135
+134
+164
+167
+172
+191
+196
+202
+205
+212
+218
+229
+239
+241
+251
+255
+255
+251
+255
+255
+250
+251
+253
+252
+253
+255
+255
+253
+254
+253
+252
+250
+255
+255
+253
+255
+255
+251
+254
+253
+248
+247
+248
+240
+239
+240
+232
+231
+234
+223
+224
+230
+218
+222
+229
+213
+231
+235
+218
+234
+239
+219
+237
+240
+219
+236
+240
+217
+238
+238
+214
+232
+232
+208
+218
+216
+191
+204
+202
+177
+194
+189
+167
+183
+181
+160
+177
+174
+157
+182
+180
+167
+193
+190
+181
+201
+200
+195
+210
+211
+206
+217
+217
+215
+232
+232
+230
+242
+242
+240
+250
+250
+248
+252
+252
+250
+253
+253
+251
+255
+255
+253
+255
+255
+253
+252
+252
+250
+254
+254
+252
+254
+254
+252
+254
+254
+252
+254
+254
+252
+254
+254
+252
+254
+254
+252
+254
+254
+252
+255
+254
+252
+255
+251
+254
+255
+247
+250
+250
+246
+245
+248
+247
+243
+252
+255
+248
+254
+255
+248
+254
+255
+244
+253
+252
+234
+255
+254
+236
+245
+220
+200
+196
+155
+137
+157
+98
+80
+151
+75
+59
+165
+76
+60
+180
+80
+64
+186
+74
+60
+189
+65
+55
+196
+68
+59
+195
+71
+63
+188
+69
+61
+176
+63
+59
+166
+58
+55
+157
+59
+56
+152
+63
+59
+143
+62
+59
+137
+63
+60
+130
+65
+61
+124
+65
+61
+119
+66
+60
+115
+66
+59
+114
+67
+59
+115
+66
+59
+113
+63
+54
+115
+62
+54
+115
+62
+54
+114
+61
+53
+114
+61
+53
+114
+61
+53
+112
+62
+53
+111
+61
+52
+110
+62
+52
+109
+61
+51
+108
+60
+50
+107
+59
+49
+106
+59
+49
+105
+58
+48
+105
+58
+48
+106
+58
+48
+110
+55
+50
+112
+54
+50
+112
+54
+50
+109
+54
+49
+109
+54
+49
+108
+55
+49
+105
+55
+48
+105
+55
+48
+108
+59
+52
+107
+58
+51
+104
+57
+49
+101
+57
+48
+101
+57
+48
+101
+57
+48
+101
+58
+49
+100
+60
+50
+102
+66
+54
+99
+65
+53
+99
+67
+52
+100
+68
+53
+100
+71
+53
+100
+73
+54
+98
+73
+51
+95
+73
+50
+94
+76
+54
+101
+86
+63
+106
+98
+77
+114
+109
+87
+132
+131
+111
+132
+135
+114
+91
+96
+76
+51
+58
+40
+50
+56
+44
+50
+56
+46
+49
+55
+45
+49
+55
+45
+49
+55
+45
+48
+54
+44
+48
+54
+44
+48
+54
+44
+49
+55
+45
+49
+55
+45
+49
+55
+45
+48
+54
+44
+48
+54
+44
+47
+53
+43
+47
+53
+43
+47
+53
+43
+46
+51
+45
+46
+51
+45
+46
+51
+45
+46
+51
+45
+46
+51
+45
+46
+51
+45
+46
+51
+45
+46
+51
+45
+45
+50
+44
+45
+50
+44
+44
+49
+43
+44
+49
+43
+44
+49
+43
+44
+49
+43
+45
+50
+44
+44
+51
+44
+44
+54
+46
+43
+53
+45
+42
+52
+43
+42
+52
+43
+43
+53
+44
+46
+56
+45
+48
+59
+45
+50
+61
+47
+50
+61
+45
+53
+64
+47
+54
+65
+48
+53
+65
+45
+49
+61
+41
+49
+61
+41
+53
+65
+45
+56
+70
+47
+61
+79
+53
+64
+84
+56
+70
+89
+61
+72
+92
+64
+74
+93
+63
+73
+94
+61
+75
+94
+62
+75
+96
+63
+84
+103
+71
+91
+112
+81
+99
+118
+90
+97
+117
+90
+89
+107
+83
+74
+93
+71
+54
+71
+52
+38
+52
+37
+36
+45
+42
+36
+41
+44
+34
+39
+42
+104
+101
+86
+104
+101
+86
+104
+101
+86
+104
+101
+86
+104
+101
+86
+104
+101
+86
+104
+101
+86
+104
+101
+86
+104
+101
+86
+104
+101
+86
+104
+101
+86
+104
+101
+86
+104
+101
+86
+104
+101
+86
+104
+101
+86
+104
+101
+86
+104
+101
+86
+104
+101
+86
+106
+99
+89
+107
+100
+90
+108
+99
+92
+109
+100
+91
+109
+101
+90
+108
+102
+86
+106
+103
+84
+107
+106
+85
+108
+110
+89
+111
+114
+97
+115
+118
+109
+129
+133
+132
+159
+164
+168
+184
+191
+199
+213
+222
+227
+236
+246
+248
+251
+255
+255
+251
+255
+255
+250
+251
+255
+253
+254
+255
+255
+254
+255
+253
+252
+250
+255
+255
+251
+255
+255
+250
+252
+252
+244
+243
+245
+234
+235
+237
+226
+227
+231
+217
+221
+227
+213
+220
+227
+209
+228
+233
+211
+231
+236
+213
+233
+237
+214
+234
+236
+212
+235
+235
+211
+232
+230
+207
+223
+218
+196
+211
+206
+184
+211
+206
+186
+204
+198
+182
+203
+195
+184
+208
+201
+193
+215
+210
+206
+224
+219
+216
+234
+230
+229
+240
+239
+237
+243
+242
+240
+249
+249
+247
+253
+253
+251
+253
+253
+251
+253
+253
+251
+255
+255
+253
+254
+254
+252
+252
+252
+250
+254
+254
+252
+254
+254
+252
+254
+254
+252
+254
+254
+252
+254
+254
+252
+254
+254
+252
+254
+254
+252
+255
+253
+252
+255
+252
+253
+255
+246
+247
+253
+249
+248
+254
+255
+253
+249
+255
+253
+246
+255
+250
+237
+255
+243
+240
+254
+239
+235
+242
+226
+255
+255
+237
+255
+236
+217
+204
+166
+147
+163
+106
+87
+161
+90
+70
+170
+87
+69
+173
+76
+59
+182
+70
+58
+188
+70
+60
+189
+70
+62
+185
+70
+63
+178
+66
+62
+169
+61
+58
+161
+59
+57
+153
+59
+57
+149
+61
+60
+142
+62
+61
+133
+63
+61
+125
+64
+59
+120
+65
+60
+115
+66
+59
+112
+68
+59
+112
+68
+59
+112
+63
+56
+113
+63
+54
+113
+63
+54
+113
+63
+54
+113
+63
+54
+112
+62
+53
+111
+63
+53
+111
+63
+53
+111
+64
+54
+110
+63
+53
+109
+62
+52
+107
+60
+50
+104
+60
+49
+104
+60
+49
+104
+60
+49
+108
+60
+50
+111
+56
+51
+113
+54
+50
+112
+54
+50
+112
+54
+50
+109
+54
+49
+108
+55
+49
+106
+56
+49
+105
+56
+49
+104
+55
+48
+103
+56
+48
+101
+57
+48
+101
+58
+49
+100
+60
+50
+101
+63
+52
+102
+64
+53
+100
+66
+54
+94
+66
+52
+97
+71
+56
+99
+76
+58
+100
+77
+59
+99
+77
+56
+96
+75
+54
+93
+75
+51
+93
+77
+52
+93
+81
+57
+98
+88
+63
+109
+104
+82
+115
+115
+91
+128
+131
+110
+118
+123
+101
+70
+79
+58
+52
+61
+42
+51
+57
+45
+50
+56
+46
+50
+56
+46
+50
+56
+46
+49
+55
+45
+49
+55
+45
+49
+55
+45
+48
+54
+44
+49
+55
+45
+49
+55
+45
+49
+55
+45
+48
+54
+44
+48
+54
+44
+47
+53
+43
+47
+53
+43
+47
+53
+43
+45
+50
+44
+45
+50
+44
+45
+50
+44
+45
+50
+44
+45
+50
+44
+45
+50
+44
+45
+50
+44
+45
+50
+44
+45
+50
+44
+44
+49
+43
+43
+48
+42
+43
+48
+42
+43
+48
+42
+43
+48
+42
+44
+49
+43
+44
+51
+44
+46
+53
+46
+44
+54
+46
+42
+52
+43
+42
+52
+43
+42
+52
+43
+43
+53
+44
+45
+55
+44
+46
+57
+43
+45
+56
+42
+48
+59
+43
+52
+63
+47
+53
+64
+47
+52
+63
+46
+51
+63
+43
+51
+62
+45
+51
+64
+44
+55
+70
+47
+57
+75
+51
+64
+79
+56
+66
+84
+58
+71
+87
+60
+72
+91
+63
+77
+93
+66
+77
+96
+68
+85
+101
+74
+92
+111
+83
+100
+116
+90
+96
+114
+90
+88
+103
+82
+71
+88
+69
+52
+66
+49
+36
+50
+37
+36
+45
+42
+36
+41
+44
+34
+39
+42
+104
+101
+86
+104
+101
+86
+104
+101
+86
+104
+101
+86
+104
+101
+86
+104
+101
+86
+104
+101
+86
+104
+101
+86
+104
+101
+86
+104
+101
+86
+104
+101
+86
+104
+101
+86
+104
+101
+86
+104
+101
+86
+104
+101
+86
+104
+101
+86
+106
+100
+86
+106
+100
+86
+106
+99
+89
+107
+100
+90
+108
+99
+92
+109
+100
+91
+108
+102
+90
+108
+102
+86
+108
+105
+86
+108
+107
+86
+107
+109
+88
+107
+110
+93
+108
+114
+104
+121
+127
+125
+149
+157
+160
+174
+183
+190
+209
+218
+223
+233
+242
+247
+251
+255
+255
+248
+253
+255
+248
+249
+253
+254
+255
+255
+255
+254
+255
+249
+248
+246
+255
+255
+251
+254
+253
+248
+249
+249
+241
+241
+243
+232
+233
+235
+222
+227
+231
+216
+223
+230
+214
+224
+232
+211
+228
+233
+210
+231
+237
+211
+232
+236
+211
+231
+233
+209
+232
+232
+208
+231
+229
+206
+224
+219
+199
+215
+208
+190
+218
+211
+195
+217
+209
+198
+222
+212
+203
+230
+221
+216
+238
+228
+227
+243
+233
+234
+250
+241
+244
+255
+249
+251
+250
+249
+247
+254
+254
+252
+255
+255
+253
+253
+253
+251
+253
+253
+251
+255
+255
+253
+255
+255
+253
+252
+252
+250
+254
+254
+252
+254
+254
+252
+254
+254
+252
+254
+254
+252
+254
+254
+252
+254
+254
+252
+254
+254
+252
+255
+253
+252
+255
+250
+249
+255
+251
+250
+255
+254
+253
+252
+255
+253
+245
+255
+252
+234
+251
+245
+234
+255
+248
+242
+255
+253
+245
+255
+250
+239
+245
+231
+255
+250
+234
+255
+250
+232
+242
+204
+185
+171
+119
+98
+143
+81
+58
+170
+93
+73
+175
+80
+62
+179
+76
+61
+179
+75
+62
+179
+75
+64
+177
+73
+64
+172
+69
+62
+162
+63
+58
+154
+59
+55
+150
+61
+57
+143
+62
+58
+136
+63
+57
+129
+64
+58
+122
+65
+58
+117
+67
+58
+113
+69
+58
+113
+69
+60
+112
+63
+56
+113
+63
+56
+113
+63
+56
+113
+63
+56
+113
+63
+56
+113
+63
+56
+112
+63
+56
+112
+63
+56
+113
+66
+58
+112
+65
+57
+110
+63
+55
+108
+61
+53
+105
+61
+52
+106
+62
+53
+106
+62
+53
+110
+61
+54
+111
+56
+51
+114
+55
+51
+112
+54
+50
+112
+54
+50
+110
+55
+50
+108
+55
+49
+106
+56
+49
+105
+56
+49
+100
+56
+47
+100
+57
+48
+99
+59
+49
+100
+62
+51
+100
+64
+52
+99
+65
+53
+99
+65
+53
+95
+67
+53
+90
+69
+52
+95
+78
+60
+103
+86
+66
+104
+87
+67
+99
+83
+60
+94
+79
+56
+91
+79
+53
+92
+82
+55
+93
+86
+60
+93
+89
+62
+110
+108
+85
+116
+118
+94
+124
+129
+107
+99
+109
+85
+50
+62
+40
+54
+66
+46
+51
+59
+46
+51
+57
+47
+51
+57
+47
+51
+57
+47
+50
+56
+46
+50
+56
+46
+50
+56
+46
+49
+55
+45
+49
+55
+45
+49
+55
+45
+49
+55
+45
+48
+54
+44
+48
+54
+44
+47
+53
+43
+47
+53
+43
+47
+53
+43
+45
+50
+44
+45
+50
+44
+45
+50
+44
+45
+50
+44
+45
+50
+44
+45
+50
+44
+45
+50
+44
+45
+50
+44
+44
+49
+43
+44
+49
+43
+43
+48
+42
+42
+47
+41
+42
+47
+41
+43
+48
+42
+44
+49
+43
+43
+50
+43
+45
+52
+45
+43
+53
+45
+42
+52
+44
+42
+52
+44
+43
+53
+44
+43
+53
+44
+44
+54
+43
+45
+55
+44
+44
+54
+43
+47
+58
+44
+50
+61
+47
+54
+65
+49
+55
+66
+50
+55
+66
+49
+53
+64
+48
+52
+63
+46
+50
+63
+45
+52
+67
+46
+58
+71
+51
+61
+76
+53
+65
+79
+56
+68
+84
+58
+74
+88
+63
+76
+92
+66
+84
+98
+73
+92
+107
+84
+99
+113
+90
+94
+109
+88
+85
+98
+80
+68
+82
+65
+50
+62
+48
+35
+47
+37
+38
+47
+44
+38
+44
+44
+36
+42
+42
+104
+101
+86
+104
+101
+86
+104
+101
+86
+104
+101
+86
+104
+101
+86
+104
+101
+86
+104
+101
+86
+104
+101
+86
+104
+101
+86
+104
+101
+86
+104
+101
+86
+104
+101
+86
+104
+101
+86
+104
+101
+86
+104
+101
+86
+104
+101
+86
+106
+100
+86
+106
+100
+86
+106
+99
+89
+107
+100
+90
+108
+99
+92
+109
+100
+91
+108
+102
+90
+108
+102
+86
+111
+108
+89
+109
+108
+87
+106
+108
+87
+103
+107
+90
+102
+108
+98
+114
+123
+120
+142
+152
+154
+168
+177
+184
+201
+210
+215
+226
+235
+240
+247
+252
+255
+246
+251
+254
+249
+250
+254
+254
+255
+255
+255
+254
+255
+249
+248
+244
+255
+255
+250
+253
+253
+245
+248
+248
+238
+240
+242
+229
+233
+235
+221
+229
+233
+216
+227
+234
+216
+229
+237
+214
+230
+236
+210
+233
+237
+210
+234
+237
+210
+232
+232
+206
+232
+230
+207
+232
+227
+207
+225
+218
+200
+216
+208
+195
+216
+206
+196
+221
+210
+204
+234
+223
+219
+248
+237
+235
+255
+244
+246
+255
+245
+249
+255
+245
+251
+255
+249
+252
+254
+252
+253
+255
+255
+253
+255
+255
+253
+254
+254
+252
+254
+254
+252
+255
+255
+253
+255
+255
+253
+253
+253
+251
+254
+254
+252
+254
+254
+252
+254
+254
+252
+254
+254
+252
+254
+254
+252
+254
+254
+252
+254
+254
+252
+255
+254
+250
+255
+249
+247
+255
+249
+247
+251
+250
+248
+247
+251
+250
+245
+255
+254
+243
+255
+255
+240
+255
+255
+237
+253
+250
+240
+252
+248
+251
+255
+250
+255
+253
+241
+255
+242
+226
+255
+239
+219
+255
+225
+203
+216
+174
+150
+170
+114
+91
+164
+89
+68
+169
+84
+64
+168
+81
+62
+169
+82
+65
+173
+81
+66
+169
+77
+64
+161
+68
+60
+151
+61
+53
+149
+62
+55
+143
+63
+54
+137
+62
+56
+131
+64
+55
+125
+65
+55
+119
+67
+54
+116
+68
+56
+115
+69
+56
+113
+63
+56
+113
+63
+56
+115
+62
+56
+113
+63
+56
+113
+63
+56
+113
+63
+56
+113
+63
+56
+112
+63
+56
+115
+66
+59
+113
+66
+58
+111
+64
+56
+109
+62
+54
+108
+61
+53
+106
+62
+53
+109
+62
+54
+111
+62
+55
+111
+56
+51
+113
+55
+51
+111
+56
+51
+109
+56
+50
+109
+56
+50
+105
+56
+49
+104
+57
+49
+102
+58
+49
+102
+59
+50
+100
+62
+51
+100
+64
+52
+98
+66
+53
+96
+67
+53
+93
+65
+51
+92
+64
+50
+87
+66
+49
+84
+71
+52
+91
+83
+62
+102
+94
+71
+105
+94
+72
+98
+88
+63
+90
+83
+57
+90
+83
+55
+92
+87
+58
+90
+86
+59
+88
+87
+59
+107
+109
+85
+115
+119
+94
+117
+125
+102
+85
+97
+73
+38
+50
+28
+56
+68
+48
+51
+59
+46
+52
+58
+48
+52
+58
+48
+51
+57
+47
+51
+57
+47
+51
+57
+47
+50
+56
+46
+50
+56
+46
+49
+55
+45
+49
+55
+45
+49
+55
+45
+48
+54
+44
+48
+54
+44
+47
+53
+43
+47
+53
+43
+47
+53
+43
+45
+50
+44
+45
+50
+44
+45
+50
+44
+45
+50
+44
+45
+50
+44
+45
+50
+44
+45
+50
+44
+45
+50
+44
+44
+49
+43
+43
+48
+42
+43
+48
+42
+42
+47
+41
+42
+47
+41
+43
+48
+42
+43
+48
+42
+44
+49
+43
+43
+50
+43
+41
+51
+43
+42
+52
+44
+43
+53
+45
+43
+53
+44
+44
+54
+45
+45
+55
+46
+45
+55
+44
+44
+54
+43
+46
+56
+45
+50
+60
+49
+54
+65
+51
+57
+68
+54
+57
+68
+52
+55
+66
+52
+54
+65
+49
+48
+59
+43
+50
+63
+45
+53
+66
+48
+57
+70
+50
+60
+73
+53
+64
+78
+55
+70
+84
+61
+74
+88
+63
+82
+96
+73
+91
+104
+84
+97
+110
+90
+92
+105
+87
+81
+94
+77
+66
+78
+64
+47
+59
+47
+34
+44
+35
+42
+48
+44
+40
+46
+44
+38
+44
+44
+104
+101
+86
+104
+101
+86
+104
+101
+86
+104
+101
+86
+104
+101
+86
+104
+101
+86
+104
+101
+86
+104
+101
+86
+105
+102
+87
+105
+102
+87
+105
+102
+87
+105
+102
+87
+105
+102
+87
+105
+102
+87
+105
+102
+87
+105
+102
+87
+107
+101
+87
+107
+101
+87
+107
+100
+90
+108
+101
+91
+109
+100
+93
+110
+101
+92
+109
+103
+91
+109
+103
+87
+113
+110
+91
+107
+109
+87
+107
+110
+89
+107
+114
+96
+106
+114
+103
+112
+121
+118
+135
+145
+147
+159
+170
+176
+187
+196
+201
+208
+217
+222
+234
+239
+243
+246
+251
+254
+252
+253
+255
+254
+255
+255
+255
+254
+255
+254
+253
+249
+255
+255
+250
+254
+254
+246
+250
+250
+240
+246
+248
+235
+244
+246
+232
+240
+244
+227
+234
+241
+223
+231
+239
+216
+240
+246
+218
+237
+242
+212
+235
+238
+209
+236
+236
+210
+232
+230
+209
+225
+220
+201
+221
+213
+200
+222
+212
+202
+224
+211
+205
+231
+217
+216
+241
+227
+227
+249
+234
+237
+253
+241
+243
+255
+246
+250
+255
+248
+255
+255
+252
+255
+255
+253
+254
+254
+254
+252
+254
+254
+252
+254
+254
+252
+254
+254
+252
+254
+254
+252
+254
+254
+252
+254
+254
+252
+254
+254
+252
+254
+254
+252
+254
+254
+252
+254
+254
+252
+254
+254
+252
+254
+254
+252
+254
+254
+252
+254
+255
+250
+255
+254
+250
+255
+255
+251
+255
+255
+253
+254
+255
+255
+252
+255
+255
+250
+255
+255
+249
+254
+255
+249
+253
+255
+254
+255
+255
+254
+253
+251
+254
+249
+243
+255
+248
+238
+255
+249
+233
+255
+248
+226
+255
+241
+217
+255
+232
+207
+182
+132
+105
+162
+100
+75
+147
+83
+58
+155
+87
+64
+165
+93
+71
+160
+83
+65
+154
+75
+58
+155
+76
+61
+142
+63
+50
+141
+63
+50
+135
+63
+51
+128
+60
+47
+121
+59
+46
+116
+60
+45
+115
+63
+49
+115
+66
+52
+114
+61
+53
+114
+61
+55
+116
+61
+56
+115
+62
+56
+117
+64
+58
+117
+64
+58
+116
+63
+57
+113
+63
+56
+115
+65
+58
+113
+64
+57
+113
+64
+57
+113
+64
+57
+112
+63
+56
+110
+63
+55
+111
+62
+55
+111
+62
+55
+107
+57
+50
+109
+56
+50
+108
+58
+51
+108
+59
+52
+108
+59
+52
+104
+60
+51
+103
+60
+51
+99
+61
+50
+99
+63
+51
+94
+62
+49
+100
+71
+57
+99
+71
+57
+84
+61
+45
+78
+57
+40
+77
+56
+39
+64
+49
+30
+87
+81
+59
+80
+78
+55
+75
+73
+48
+79
+75
+50
+93
+89
+62
+105
+101
+74
+101
+97
+68
+86
+85
+55
+88
+88
+60
+93
+96
+67
+111
+115
+90
+122
+128
+102
+100
+108
+85
+61
+73
+49
+45
+57
+35
+50
+62
+42
+52
+60
+47
+53
+59
+49
+52
+58
+48
+52
+58
+48
+52
+58
+48
+51
+57
+47
+51
+57
+47
+51
+57
+47
+51
+57
+47
+51
+57
+47
+51
+57
+47
+50
+56
+46
+49
+55
+45
+49
+55
+45
+49
+55
+45
+48
+54
+44
+49
+54
+48
+49
+54
+48
+48
+53
+47
+48
+53
+47
+47
+52
+46
+47
+52
+46
+47
+52
+46
+47
+52
+46
+44
+49
+43
+44
+49
+43
+44
+49
+43
+44
+49
+43
+44
+49
+43
+44
+49
+43
+43
+48
+42
+43
+48
+42
+46
+53
+46
+45
+52
+45
+45
+52
+45
+44
+51
+44
+45
+52
+45
+45
+52
+44
+46
+53
+45
+46
+53
+45
+43
+50
+42
+45
+52
+44
+48
+55
+47
+53
+61
+50
+57
+65
+54
+61
+69
+56
+63
+71
+60
+63
+74
+60
+55
+66
+50
+53
+64
+47
+51
+62
+45
+49
+61
+41
+50
+62
+42
+57
+69
+47
+66
+78
+56
+73
+85
+63
+79
+91
+71
+86
+98
+78
+93
+104
+87
+89
+100
+84
+76
+87
+73
+60
+70
+59
+47
+57
+46
+41
+51
+42
+42
+48
+44
+41
+47
+43
+40
+46
+44
+104
+101
+86
+104
+101
+86
+104
+101
+86
+104
+101
+86
+104
+101
+86
+104
+101
+86
+104
+101
+86
+104
+101
+86
+105
+102
+87
+105
+102
+87
+105
+102
+87
+105
+102
+87
+105
+102
+87
+105
+102
+87
+105
+102
+87
+105
+102
+87
+107
+101
+87
+107
+101
+87
+107
+100
+90
+108
+101
+91
+109
+100
+93
+110
+101
+92
+109
+103
+91
+107
+104
+87
+111
+110
+90
+106
+108
+86
+107
+110
+89
+107
+114
+96
+106
+116
+105
+113
+124
+120
+137
+148
+150
+163
+174
+180
+190
+199
+204
+210
+219
+224
+235
+240
+244
+247
+252
+255
+253
+254
+255
+254
+255
+255
+255
+254
+252
+254
+253
+249
+255
+255
+250
+254
+254
+244
+251
+251
+239
+247
+249
+235
+244
+247
+230
+240
+245
+225
+234
+242
+221
+232
+237
+214
+234
+239
+209
+230
+235
+203
+228
+231
+202
+230
+230
+204
+227
+225
+204
+223
+217
+201
+222
+212
+202
+223
+212
+206
+230
+216
+215
+236
+222
+222
+245
+230
+233
+250
+238
+242
+255
+243
+247
+255
+246
+250
+255
+249
+253
+255
+251
+254
+255
+254
+252
+254
+254
+252
+254
+254
+252
+254
+254
+252
+254
+254
+252
+254
+254
+252
+254
+254
+252
+254
+254
+252
+254
+254
+252
+254
+254
+252
+254
+254
+252
+254
+254
+252
+254
+254
+252
+254
+254
+252
+254
+254
+252
+253
+255
+252
+250
+255
+249
+250
+255
+249
+253
+255
+252
+253
+254
+255
+253
+252
+255
+253
+250
+255
+255
+250
+255
+255
+248
+255
+255
+252
+255
+255
+250
+253
+255
+248
+246
+255
+249
+242
+255
+252
+239
+255
+252
+234
+254
+248
+226
+255
+241
+215
+255
+234
+206
+217
+178
+149
+163
+117
+91
+142
+92
+67
+146
+92
+66
+152
+92
+68
+152
+87
+67
+150
+83
+64
+138
+70
+51
+137
+68
+52
+135
+68
+51
+131
+68
+51
+126
+67
+51
+122
+66
+49
+118
+65
+49
+115
+63
+49
+117
+64
+56
+115
+62
+56
+117
+62
+57
+117
+64
+58
+116
+63
+57
+111
+61
+54
+112
+62
+55
+115
+65
+58
+113
+63
+56
+112
+63
+56
+112
+63
+56
+110
+63
+55
+111
+62
+55
+109
+62
+54
+110
+61
+54
+109
+62
+54
+107
+60
+52
+108
+61
+53
+109
+62
+54
+107
+63
+54
+106
+63
+54
+103
+65
+54
+101
+65
+53
+98
+66
+53
+100
+71
+57
+91
+65
+50
+94
+71
+55
+94
+73
+56
+78
+61
+43
+70
+55
+36
+71
+56
+37
+62
+54
+33
+76
+76
+52
+71
+75
+50
+68
+71
+44
+68
+68
+42
+77
+77
+49
+92
+91
+63
+98
+97
+67
+96
+97
+66
+89
+89
+61
+100
+103
+74
+115
+119
+94
+115
+121
+95
+88
+96
+73
+58
+68
+44
+47
+59
+37
+55
+67
+47
+54
+62
+49
+54
+60
+50
+54
+60
+50
+54
+60
+50
+53
+59
+49
+53
+59
+49
+53
+59
+49
+53
+59
+49
+53
+59
+49
+53
+59
+49
+53
+59
+49
+52
+58
+48
+52
+58
+48
+51
+57
+47
+51
+57
+47
+51
+57
+47
+50
+55
+49
+50
+55
+49
+50
+55
+49
+49
+54
+48
+49
+54
+48
+49
+54
+48
+48
+53
+47
+48
+53
+47
+46
+51
+45
+46
+51
+45
+45
+50
+44
+45
+50
+44
+44
+49
+43
+44
+49
+43
+43
+48
+42
+43
+48
+42
+42
+49
+42
+42
+49
+42
+41
+48
+41
+41
+48
+41
+41
+48
+41
+42
+49
+42
+43
+50
+42
+44
+51
+43
+46
+53
+45
+45
+52
+44
+46
+53
+45
+48
+55
+47
+52
+59
+51
+57
+65
+54
+63
+70
+62
+66
+74
+63
+59
+70
+56
+58
+69
+53
+55
+66
+49
+52
+63
+46
+51
+63
+43
+54
+66
+46
+60
+72
+50
+64
+76
+54
+76
+88
+68
+83
+95
+75
+89
+100
+84
+87
+98
+82
+76
+86
+75
+61
+71
+60
+49
+59
+50
+43
+53
+44
+44
+51
+44
+43
+49
+45
+42
+48
+44
+104
+101
+86
+104
+101
+86
+104
+101
+86
+104
+101
+86
+104
+101
+86
+104
+101
+86
+104
+101
+86
+104
+101
+86
+105
+102
+87
+105
+102
+87
+105
+102
+87
+105
+102
+87
+105
+102
+87
+105
+102
+87
+105
+102
+87
+105
+102
+87
+107
+101
+87
+107
+101
+87
+108
+99
+90
+109
+100
+91
+109
+100
+93
+110
+101
+92
+109
+103
+91
+107
+104
+87
+109
+108
+88
+105
+109
+86
+106
+111
+89
+107
+116
+97
+105
+117
+105
+113
+125
+121
+138
+152
+153
+165
+178
+184
+191
+202
+208
+212
+221
+226
+237
+242
+246
+247
+252
+255
+252
+253
+255
+253
+255
+254
+255
+254
+252
+254
+253
+248
+255
+255
+247
+253
+253
+243
+250
+251
+237
+247
+250
+233
+244
+247
+228
+239
+244
+222
+231
+239
+216
+229
+235
+209
+226
+231
+201
+222
+225
+194
+221
+221
+193
+222
+222
+198
+222
+219
+200
+221
+215
+203
+224
+213
+207
+228
+217
+215
+237
+225
+225
+242
+230
+234
+249
+237
+241
+254
+243
+247
+255
+246
+250
+255
+248
+251
+255
+249
+252
+255
+252
+252
+255
+254
+252
+254
+254
+252
+254
+254
+252
+254
+254
+252
+254
+254
+252
+254
+254
+252
+254
+254
+252
+254
+254
+252
+254
+254
+252
+254
+254
+252
+254
+254
+252
+254
+254
+252
+254
+254
+252
+254
+254
+252
+254
+254
+252
+253
+255
+252
+246
+255
+250
+246
+255
+250
+250
+254
+253
+253
+253
+253
+255
+250
+254
+255
+248
+255
+255
+246
+255
+255
+244
+254
+255
+249
+255
+255
+247
+252
+255
+247
+247
+255
+250
+245
+255
+255
+246
+255
+255
+242
+250
+253
+236
+250
+248
+227
+254
+240
+214
+255
+246
+219
+255
+235
+208
+223
+191
+166
+168
+131
+105
+132
+90
+66
+131
+83
+60
+145
+93
+71
+148
+93
+72
+139
+82
+62
+127
+70
+50
+118
+63
+42
+117
+62
+42
+118
+66
+45
+121
+70
+51
+120
+71
+54
+113
+63
+52
+110
+60
+51
+113
+60
+52
+116
+66
+57
+115
+65
+56
+111
+63
+53
+113
+65
+55
+120
+72
+62
+110
+62
+52
+109
+62
+52
+109
+62
+52
+107
+63
+52
+108
+61
+51
+106
+62
+51
+108
+61
+51
+106
+62
+51
+103
+63
+53
+103
+65
+54
+103
+65
+54
+103
+67
+55
+101
+67
+55
+99
+67
+54
+96
+67
+53
+94
+68
+53
+98
+75
+59
+85
+66
+49
+90
+73
+55
+96
+83
+64
+82
+71
+51
+67
+59
+38
+69
+61
+40
+70
+65
+43
+65
+69
+44
+66
+72
+46
+65
+69
+42
+60
+64
+37
+63
+66
+37
+78
+78
+50
+95
+96
+65
+105
+106
+75
+97
+97
+69
+110
+113
+84
+118
+122
+97
+103
+109
+83
+74
+79
+57
+52
+60
+37
+52
+61
+40
+61
+70
+51
+56
+62
+50
+56
+62
+52
+56
+62
+52
+56
+62
+52
+55
+61
+51
+55
+61
+51
+55
+61
+51
+54
+60
+50
+56
+62
+52
+56
+62
+52
+55
+61
+51
+55
+61
+51
+55
+61
+51
+54
+60
+50
+54
+60
+50
+54
+60
+50
+53
+58
+52
+52
+57
+51
+52
+57
+51
+52
+57
+51
+51
+56
+50
+51
+56
+50
+51
+56
+50
+50
+55
+49
+48
+53
+47
+48
+53
+47
+47
+52
+46
+46
+51
+45
+45
+50
+44
+44
+49
+43
+43
+48
+42
+43
+48
+42
+41
+46
+40
+41
+46
+40
+41
+46
+40
+41
+46
+40
+41
+46
+40
+42
+47
+41
+43
+48
+42
+44
+49
+43
+49
+54
+48
+47
+52
+46
+44
+49
+43
+44
+49
+43
+47
+52
+46
+54
+59
+52
+61
+66
+60
+65
+72
+64
+64
+75
+61
+62
+75
+58
+60
+73
+55
+56
+69
+51
+52
+65
+45
+50
+63
+43
+51
+65
+42
+53
+67
+44
+68
+81
+61
+75
+88
+68
+81
+94
+77
+81
+94
+77
+72
+84
+72
+60
+72
+60
+50
+62
+52
+46
+56
+47
+46
+53
+46
+46
+53
+46
+45
+52
+45
+103
+100
+85
+103
+100
+85
+104
+101
+86
+104
+101
+86
+104
+101
+86
+104
+101
+86
+105
+102
+87
+105
+102
+87
+105
+102
+87
+105
+102
+87
+105
+102
+87
+105
+102
+87
+105
+102
+87
+105
+102
+87
+105
+102
+87
+105
+102
+87
+107
+101
+87
+107
+101
+87
+108
+99
+90
+109
+100
+91
+109
+100
+93
+109
+102
+92
+109
+103
+91
+106
+105
+87
+107
+109
+88
+105
+109
+86
+106
+111
+89
+106
+115
+96
+104
+116
+104
+109
+124
+119
+136
+152
+152
+166
+179
+185
+191
+202
+208
+211
+220
+227
+235
+240
+246
+246
+251
+255
+252
+253
+255
+253
+255
+254
+255
+255
+253
+255
+254
+249
+254
+254
+246
+253
+253
+241
+250
+251
+237
+247
+250
+231
+244
+247
+226
+238
+243
+220
+229
+237
+213
+226
+232
+206
+219
+224
+192
+215
+218
+187
+214
+214
+188
+217
+215
+194
+221
+215
+199
+222
+215
+205
+229
+219
+217
+236
+224
+224
+247
+235
+239
+250
+239
+245
+255
+244
+250
+255
+248
+253
+255
+249
+252
+255
+250
+250
+255
+250
+250
+255
+252
+251
+255
+254
+252
+254
+254
+252
+254
+254
+252
+254
+254
+252
+254
+254
+252
+254
+254
+252
+254
+254
+252
+254
+254
+252
+254
+254
+252
+254
+254
+252
+254
+254
+252
+254
+254
+252
+254
+254
+252
+254
+254
+252
+254
+254
+252
+253
+255
+252
+247
+255
+253
+247
+255
+253
+250
+254
+253
+253
+253
+253
+255
+251
+253
+255
+248
+254
+255
+246
+253
+255
+244
+250
+255
+248
+251
+255
+247
+250
+255
+248
+248
+255
+252
+249
+255
+255
+248
+255
+255
+248
+250
+255
+244
+250
+252
+238
+255
+255
+237
+255
+248
+228
+253
+238
+219
+255
+239
+219
+255
+239
+217
+238
+210
+188
+176
+144
+121
+118
+82
+60
+117
+76
+54
+117
+75
+53
+119
+74
+53
+123
+78
+57
+125
+80
+59
+120
+75
+54
+107
+64
+45
+98
+55
+38
+123
+77
+64
+115
+68
+58
+113
+66
+56
+115
+68
+58
+111
+67
+56
+103
+59
+48
+100
+56
+45
+103
+61
+49
+105
+63
+51
+105
+63
+51
+105
+63
+51
+103
+63
+51
+102
+62
+50
+102
+62
+50
+102
+62
+50
+101
+63
+50
+98
+64
+52
+98
+66
+53
+96
+67
+53
+95
+67
+53
+95
+67
+53
+91
+68
+52
+90
+69
+52
+87
+68
+51
+88
+73
+54
+79
+66
+47
+92
+84
+63
+111
+105
+83
+99
+94
+72
+77
+75
+52
+73
+71
+48
+73
+75
+51
+62
+68
+42
+63
+72
+45
+64
+70
+42
+60
+66
+38
+60
+65
+35
+70
+73
+44
+88
+89
+58
+100
+101
+70
+109
+109
+81
+120
+120
+92
+116
+118
+94
+91
+95
+70
+64
+67
+46
+54
+59
+37
+56
+64
+43
+60
+67
+49
+57
+63
+51
+57
+63
+53
+57
+63
+53
+56
+62
+52
+56
+62
+52
+55
+61
+51
+55
+61
+51
+55
+61
+51
+57
+63
+53
+56
+62
+52
+56
+62
+52
+56
+62
+52
+56
+62
+52
+56
+62
+52
+56
+62
+52
+56
+62
+52
+55
+60
+54
+55
+60
+54
+55
+60
+54
+54
+59
+53
+54
+59
+53
+54
+59
+53
+53
+58
+52
+53
+58
+52
+51
+56
+50
+51
+56
+50
+49
+54
+48
+48
+53
+47
+47
+52
+46
+45
+50
+44
+44
+49
+43
+44
+49
+43
+43
+48
+42
+43
+48
+42
+42
+47
+41
+42
+47
+41
+43
+48
+42
+44
+49
+43
+45
+50
+44
+45
+50
+44
+48
+53
+47
+46
+51
+45
+43
+48
+42
+43
+48
+42
+45
+50
+46
+50
+55
+49
+56
+61
+57
+59
+66
+58
+64
+75
+61
+64
+77
+59
+64
+77
+59
+61
+74
+54
+56
+69
+49
+51
+64
+44
+49
+63
+40
+48
+62
+39
+60
+73
+53
+66
+79
+59
+72
+85
+67
+73
+86
+69
+68
+80
+66
+59
+71
+59
+50
+62
+52
+46
+58
+48
+45
+55
+47
+47
+54
+47
+46
+53
+46
+103
+100
+85
+103
+100
+85
+103
+100
+85
+104
+101
+86
+104
+101
+86
+105
+102
+87
+105
+102
+87
+105
+102
+87
+105
+102
+87
+105
+102
+87
+105
+102
+87
+105
+102
+87
+105
+102
+87
+105
+102
+87
+105
+102
+87
+105
+102
+87
+107
+101
+87
+108
+100
+87
+108
+99
+90
+109
+100
+91
+109
+100
+93
+109
+102
+92
+109
+103
+91
+106
+105
+87
+107
+109
+88
+105
+110
+87
+105
+113
+90
+103
+115
+95
+100
+114
+101
+106
+121
+116
+133
+149
+149
+163
+178
+183
+189
+200
+206
+210
+219
+226
+234
+239
+245
+244
+249
+253
+251
+252
+255
+253
+255
+254
+255
+255
+253
+255
+255
+250
+255
+255
+248
+255
+255
+243
+254
+255
+241
+251
+254
+235
+247
+250
+229
+240
+245
+222
+230
+238
+214
+226
+232
+204
+217
+220
+191
+213
+213
+185
+210
+208
+185
+212
+209
+190
+218
+212
+200
+224
+217
+209
+234
+224
+223
+244
+233
+237
+253
+242
+248
+255
+246
+251
+255
+250
+255
+255
+252
+255
+255
+253
+254
+254
+253
+251
+254
+253
+249
+254
+253
+249
+254
+254
+252
+254
+254
+252
+254
+254
+252
+254
+254
+252
+254
+254
+252
+254
+254
+252
+254
+254
+252
+254
+254
+252
+254
+254
+252
+254
+254
+252
+254
+254
+252
+254
+254
+252
+254
+254
+252
+254
+254
+252
+254
+254
+252
+253
+255
+254
+250
+255
+255
+250
+255
+255
+252
+255
+255
+255
+255
+255
+255
+253
+254
+255
+251
+251
+255
+249
+250
+255
+249
+248
+255
+248
+246
+255
+249
+247
+255
+250
+247
+255
+254
+249
+255
+255
+251
+255
+255
+251
+253
+255
+250
+252
+253
+248
+244
+241
+234
+255
+251
+243
+255
+253
+244
+255
+251
+241
+255
+248
+235
+255
+244
+228
+246
+227
+210
+228
+207
+188
+208
+183
+163
+183
+156
+135
+146
+118
+97
+118
+87
+67
+104
+73
+53
+104
+73
+53
+109
+76
+57
+112
+79
+60
+108
+71
+55
+105
+66
+51
+103
+66
+50
+106
+69
+53
+110
+73
+57
+110
+74
+58
+111
+75
+59
+111
+75
+59
+101
+65
+49
+99
+66
+49
+99
+66
+49
+99
+66
+49
+99
+66
+49
+99
+66
+49
+98
+67
+49
+96
+67
+51
+93
+70
+54
+92
+71
+54
+92
+71
+54
+90
+71
+54
+90
+71
+54
+87
+72
+53
+84
+71
+52
+82
+71
+51
+80
+72
+51
+78
+72
+50
+102
+100
+77
+126
+126
+102
+114
+114
+90
+86
+88
+64
+74
+76
+52
+71
+77
+51
+60
+69
+42
+60
+70
+43
+63
+72
+43
+65
+71
+43
+65
+70
+40
+68
+71
+42
+77
+78
+47
+84
+85
+54
+120
+119
+91
+123
+122
+94
+110
+110
+86
+85
+85
+61
+67
+66
+46
+63
+65
+44
+62
+65
+46
+58
+62
+45
+59
+62
+51
+57
+63
+53
+57
+63
+53
+56
+62
+52
+56
+62
+52
+55
+61
+51
+55
+61
+51
+55
+61
+51
+56
+62
+52
+56
+62
+52
+56
+62
+52
+56
+62
+52
+56
+62
+52
+56
+62
+52
+56
+62
+52
+56
+62
+52
+57
+62
+56
+57
+62
+56
+57
+62
+56
+56
+61
+55
+56
+61
+55
+56
+61
+55
+55
+60
+54
+55
+60
+54
+54
+59
+53
+53
+58
+52
+52
+57
+51
+51
+56
+50
+50
+55
+49
+48
+53
+47
+47
+52
+46
+47
+52
+46
+45
+50
+46
+45
+50
+46
+44
+49
+45
+43
+48
+44
+43
+48
+44
+44
+49
+45
+45
+50
+46
+45
+50
+46
+44
+49
+45
+44
+49
+45
+44
+49
+45
+44
+49
+45
+46
+50
+49
+48
+53
+49
+51
+55
+54
+52
+59
+52
+59
+71
+57
+61
+76
+57
+64
+79
+60
+64
+79
+58
+60
+75
+54
+55
+70
+47
+52
+67
+44
+50
+65
+42
+54
+69
+46
+58
+73
+52
+64
+79
+60
+66
+80
+63
+63
+77
+62
+56
+70
+55
+49
+63
+50
+45
+57
+45
+45
+55
+46
+46
+53
+45
+45
+52
+44
+102
+99
+84
+102
+99
+84
+103
+100
+85
+104
+101
+86
+104
+101
+86
+105
+102
+87
+106
+103
+88
+106
+103
+88
+105
+102
+87
+105
+102
+87
+105
+102
+87
+105
+102
+87
+105
+102
+87
+105
+102
+87
+105
+102
+87
+105
+102
+87
+108
+100
+87
+108
+100
+87
+108
+99
+90
+109
+100
+91
+109
+100
+93
+109
+102
+92
+109
+103
+91
+106
+105
+87
+107
+109
+88
+105
+110
+87
+105
+113
+90
+103
+115
+95
+98
+112
+99
+103
+120
+114
+130
+148
+148
+163
+178
+183
+192
+203
+209
+212
+221
+228
+235
+240
+246
+245
+250
+254
+251
+252
+255
+253
+255
+254
+255
+255
+253
+255
+255
+250
+255
+255
+248
+255
+255
+244
+255
+255
+243
+255
+255
+239
+250
+253
+232
+242
+247
+224
+231
+240
+213
+226
+232
+204
+215
+218
+189
+209
+209
+181
+205
+203
+180
+206
+203
+186
+214
+207
+197
+222
+215
+209
+236
+226
+227
+247
+238
+243
+255
+245
+253
+255
+249
+255
+255
+252
+255
+255
+254
+255
+255
+254
+252
+253
+254
+249
+253
+254
+248
+253
+255
+249
+254
+255
+250
+254
+254
+252
+254
+254
+252
+254
+254
+252
+254
+254
+252
+254
+254
+252
+254
+254
+252
+254
+254
+252
+254
+254
+252
+254
+254
+252
+254
+254
+252
+254
+254
+252
+254
+254
+252
+254
+254
+252
+254
+254
+252
+254
+254
+254
+253
+254
+255
+254
+255
+255
+254
+255
+255
+254
+255
+255
+254
+255
+253
+254
+255
+250
+253
+254
+248
+253
+253
+245
+251
+251
+241
+252
+252
+244
+254
+253
+248
+255
+254
+250
+255
+255
+253
+254
+254
+254
+254
+252
+255
+254
+252
+255
+251
+246
+252
+255
+250
+254
+254
+248
+250
+249
+244
+241
+253
+246
+240
+255
+254
+244
+255
+254
+241
+255
+254
+237
+255
+248
+230
+252
+239
+220
+242
+227
+208
+226
+209
+189
+205
+187
+167
+179
+161
+141
+155
+134
+115
+140
+117
+99
+122
+93
+75
+125
+94
+76
+116
+85
+67
+97
+68
+50
+87
+58
+40
+89
+60
+42
+91
+62
+44
+88
+61
+42
+96
+69
+50
+96
+69
+50
+96
+69
+50
+95
+70
+50
+96
+71
+51
+96
+71
+51
+96
+71
+51
+93
+72
+51
+92
+75
+55
+92
+77
+58
+92
+77
+58
+89
+76
+57
+88
+77
+57
+85
+77
+56
+82
+76
+54
+81
+76
+54
+78
+76
+53
+81
+81
+57
+105
+107
+83
+124
+128
+103
+109
+113
+88
+83
+89
+63
+70
+76
+50
+62
+71
+44
+60
+70
+43
+60
+70
+43
+63
+72
+43
+68
+74
+46
+69
+74
+44
+68
+71
+42
+72
+73
+42
+76
+77
+46
+121
+120
+92
+116
+115
+87
+102
+100
+77
+84
+82
+59
+76
+73
+54
+75
+74
+54
+70
+69
+51
+60
+61
+45
+60
+63
+52
+57
+63
+53
+57
+63
+53
+57
+63
+53
+56
+62
+52
+56
+62
+52
+56
+62
+52
+56
+62
+52
+55
+61
+51
+55
+61
+51
+56
+62
+52
+56
+62
+52
+56
+62
+52
+56
+62
+52
+57
+63
+53
+57
+63
+53
+58
+63
+57
+58
+63
+57
+58
+63
+57
+58
+63
+57
+57
+62
+56
+57
+62
+56
+57
+62
+56
+56
+61
+55
+56
+61
+55
+56
+61
+55
+55
+60
+54
+54
+59
+53
+53
+58
+52
+52
+57
+51
+51
+56
+50
+51
+56
+50
+47
+52
+48
+46
+51
+47
+45
+50
+46
+44
+49
+45
+43
+48
+44
+43
+48
+44
+43
+48
+44
+43
+48
+44
+43
+48
+44
+44
+49
+45
+45
+49
+48
+46
+50
+49
+47
+51
+50
+47
+51
+50
+47
+51
+50
+45
+52
+45
+51
+63
+49
+55
+70
+51
+61
+76
+55
+64
+79
+58
+63
+78
+55
+60
+75
+52
+57
+72
+49
+56
+71
+48
+53
+68
+45
+56
+71
+48
+60
+75
+54
+62
+77
+58
+60
+74
+57
+55
+69
+54
+49
+63
+50
+45
+57
+45
+44
+54
+45
+46
+53
+45
+45
+52
+44
+102
+99
+84
+102
+99
+84
+103
+100
+85
+104
+101
+86
+104
+101
+86
+105
+102
+87
+106
+103
+88
+106
+103
+88
+105
+102
+87
+105
+102
+87
+105
+102
+87
+105
+102
+87
+105
+102
+87
+105
+102
+87
+105
+102
+87
+105
+102
+87
+108
+100
+87
+108
+100
+87
+108
+99
+90
+109
+100
+91
+109
+100
+93
+109
+102
+92
+109
+103
+91
+106
+105
+87
+106
+108
+87
+104
+109
+86
+104
+114
+90
+102
+115
+95
+99
+113
+100
+104
+121
+115
+133
+151
+151
+165
+183
+187
+199
+210
+216
+218
+227
+234
+240
+245
+251
+248
+253
+255
+252
+253
+255
+253
+255
+254
+255
+255
+253
+255
+254
+249
+255
+255
+245
+255
+255
+242
+255
+255
+240
+252
+255
+236
+248
+251
+230
+239
+244
+221
+226
+235
+208
+221
+227
+199
+213
+213
+185
+206
+204
+179
+201
+196
+176
+202
+196
+180
+208
+201
+191
+218
+210
+207
+233
+224
+227
+246
+237
+242
+255
+246
+254
+255
+249
+255
+255
+252
+255
+255
+254
+255
+254
+254
+252
+252
+254
+249
+251
+255
+247
+252
+255
+248
+253
+255
+250
+254
+254
+252
+254
+254
+252
+254
+254
+252
+254
+254
+252
+254
+254
+252
+254
+254
+252
+254
+254
+252
+254
+254
+252
+254
+254
+252
+254
+254
+252
+254
+254
+252
+254
+254
+252
+254
+254
+252
+254
+254
+252
+254
+254
+254
+254
+251
+255
+255
+252
+255
+254
+253
+255
+253
+255
+254
+250
+255
+250
+247
+255
+248
+246
+255
+243
+245
+255
+240
+243
+254
+238
+245
+255
+242
+250
+255
+246
+253
+255
+250
+255
+253
+254
+255
+251
+255
+255
+249
+255
+255
+248
+255
+252
+241
+255
+254
+245
+255
+255
+250
+255
+255
+253
+255
+255
+252
+255
+252
+251
+249
+248
+248
+240
+245
+245
+233
+255
+255
+241
+255
+255
+239
+255
+255
+237
+255
+255
+237
+255
+252
+234
+255
+246
+229
+251
+239
+223
+248
+235
+218
+249
+228
+209
+255
+230
+208
+227
+202
+180
+165
+143
+120
+116
+94
+71
+101
+79
+56
+98
+76
+53
+92
+72
+48
+94
+74
+50
+92
+74
+50
+92
+74
+50
+93
+75
+51
+93
+75
+51
+94
+76
+52
+94
+76
+52
+92
+77
+54
+89
+78
+56
+87
+79
+58
+87
+79
+58
+86
+80
+58
+85
+79
+57
+83
+78
+56
+80
+78
+55
+78
+78
+54
+77
+79
+55
+80
+84
+59
+96
+102
+76
+102
+111
+84
+85
+94
+67
+69
+79
+52
+65
+75
+48
+60
+70
+43
+63
+73
+46
+63
+73
+46
+67
+76
+47
+72
+78
+50
+72
+77
+47
+70
+73
+44
+79
+80
+49
+89
+88
+58
+113
+109
+82
+106
+102
+75
+97
+92
+70
+91
+86
+64
+89
+84
+65
+84
+81
+62
+77
+74
+57
+66
+67
+51
+61
+64
+53
+59
+65
+55
+59
+65
+55
+59
+65
+55
+58
+64
+54
+58
+64
+54
+58
+64
+54
+57
+63
+53
+56
+62
+52
+56
+62
+52
+56
+62
+52
+57
+63
+53
+57
+63
+53
+58
+64
+54
+58
+64
+54
+58
+64
+54
+59
+64
+58
+59
+64
+58
+59
+64
+58
+58
+63
+57
+58
+63
+57
+57
+62
+56
+57
+62
+56
+57
+62
+56
+58
+63
+57
+58
+63
+57
+57
+62
+56
+57
+62
+56
+56
+61
+55
+56
+61
+55
+55
+60
+54
+55
+60
+54
+52
+57
+53
+50
+55
+51
+49
+54
+50
+47
+52
+48
+45
+50
+46
+44
+49
+45
+43
+47
+46
+43
+47
+46
+44
+48
+47
+44
+48
+47
+45
+49
+48
+46
+50
+49
+46
+50
+51
+46
+50
+51
+45
+49
+50
+43
+49
+45
+43
+57
+42
+47
+64
+45
+54
+72
+50
+59
+77
+55
+61
+79
+55
+60
+78
+52
+58
+76
+50
+58
+76
+50
+53
+71
+47
+55
+73
+49
+58
+76
+54
+60
+77
+58
+58
+75
+57
+54
+71
+55
+48
+64
+51
+45
+59
+46
+45
+55
+46
+46
+53
+45
+45
+52
+44
+99
+100
+82
+99
+100
+82
+100
+101
+83
+101
+102
+84
+101
+102
+86
+104
+102
+87
+105
+103
+88
+105
+103
+88
+104
+102
+87
+105
+102
+87
+105
+102
+87
+105
+102
+87
+105
+102
+87
+105
+102
+87
+105
+102
+87
+107
+101
+87
+107
+101
+87
+107
+101
+87
+108
+100
+89
+108
+101
+91
+109
+100
+93
+109
+102
+92
+107
+103
+91
+106
+105
+87
+105
+107
+86
+104
+109
+87
+104
+114
+90
+103
+116
+96
+100
+113
+103
+106
+123
+117
+137
+155
+157
+170
+187
+194
+205
+216
+222
+223
+232
+239
+242
+249
+255
+250
+255
+255
+251
+255
+255
+253
+255
+254
+254
+255
+250
+254
+254
+246
+250
+250
+238
+250
+251
+237
+250
+251
+233
+248
+250
+229
+244
+246
+225
+234
+238
+215
+223
+227
+202
+217
+219
+195
+211
+209
+184
+204
+199
+177
+197
+190
+172
+198
+190
+177
+204
+195
+188
+214
+206
+204
+230
+221
+224
+244
+234
+242
+253
+246
+254
+254
+249
+255
+255
+253
+255
+254
+254
+255
+253
+253
+251
+252
+254
+249
+251
+255
+249
+252
+255
+250
+253
+255
+252
+254
+254
+252
+254
+254
+252
+254
+254
+252
+254
+254
+252
+254
+254
+252
+254
+254
+252
+254
+254
+252
+254
+254
+252
+254
+254
+252
+254
+254
+252
+254
+254
+252
+255
+254
+252
+255
+254
+252
+255
+254
+252
+255
+253
+254
+255
+250
+255
+255
+251
+255
+254
+252
+255
+252
+254
+253
+249
+255
+251
+246
+255
+247
+244
+255
+244
+243
+255
+241
+242
+254
+240
+245
+255
+242
+250
+255
+246
+254
+255
+250
+255
+252
+251
+255
+249
+252
+255
+247
+255
+255
+246
+255
+255
+248
+255
+255
+247
+255
+255
+249
+255
+255
+252
+255
+253
+252
+255
+251
+253
+252
+250
+255
+251
+252
+255
+250
+244
+250
+240
+244
+250
+238
+247
+249
+236
+247
+248
+234
+248
+246
+231
+251
+248
+231
+255
+250
+234
+255
+253
+234
+253
+241
+219
+255
+251
+228
+236
+220
+197
+158
+142
+119
+96
+80
+55
+82
+66
+41
+88
+72
+47
+88
+72
+47
+91
+77
+51
+91
+77
+51
+90
+78
+52
+90
+78
+52
+91
+79
+53
+91
+79
+53
+92
+80
+54
+91
+81
+56
+85
+79
+55
+84
+79
+57
+84
+79
+57
+81
+79
+56
+80
+78
+55
+78
+78
+54
+75
+77
+53
+73
+77
+52
+74
+78
+53
+76
+82
+56
+83
+92
+65
+80
+89
+60
+64
+73
+44
+59
+70
+40
+65
+76
+46
+63
+74
+42
+67
+78
+46
+68
+79
+47
+72
+81
+50
+76
+83
+50
+73
+78
+48
+74
+77
+46
+89
+90
+59
+107
+106
+78
+102
+101
+73
+98
+94
+69
+94
+89
+67
+95
+90
+70
+96
+91
+71
+90
+85
+66
+83
+78
+59
+76
+73
+56
+65
+66
+52
+64
+66
+53
+64
+66
+53
+62
+65
+54
+62
+65
+54
+62
+65
+54
+61
+64
+55
+61
+64
+55
+57
+63
+53
+57
+63
+53
+57
+63
+53
+58
+64
+54
+58
+64
+54
+58
+66
+55
+58
+66
+55
+58
+66
+55
+59
+64
+57
+59
+64
+57
+59
+64
+58
+58
+63
+56
+58
+63
+57
+57
+62
+55
+57
+62
+56
+57
+62
+55
+59
+64
+58
+59
+64
+57
+59
+64
+58
+59
+64
+57
+58
+63
+57
+58
+63
+56
+58
+63
+57
+58
+63
+57
+56
+63
+56
+55
+61
+57
+52
+59
+52
+51
+56
+50
+49
+54
+48
+47
+52
+46
+46
+51
+47
+46
+51
+47
+46
+50
+49
+46
+50
+49
+44
+50
+46
+44
+50
+46
+43
+50
+43
+43
+50
+42
+44
+52
+41
+41
+54
+37
+36
+54
+30
+41
+61
+33
+50
+70
+43
+56
+76
+49
+59
+79
+54
+59
+77
+53
+59
+77
+53
+59
+77
+53
+56
+74
+50
+57
+75
+51
+59
+77
+53
+60
+78
+54
+60
+78
+56
+55
+72
+53
+49
+66
+48
+46
+60
+45
+46
+56
+45
+47
+54
+46
+46
+53
+45
+92
+102
+78
+93
+103
+79
+95
+103
+80
+96
+104
+81
+98
+106
+85
+101
+106
+86
+103
+106
+87
+104
+107
+88
+102
+103
+85
+104
+103
+85
+104
+101
+86
+104
+101
+86
+106
+100
+86
+107
+101
+87
+107
+101
+89
+108
+102
+88
+107
+101
+87
+106
+103
+88
+109
+103
+91
+108
+104
+93
+109
+102
+94
+106
+102
+91
+104
+100
+88
+102
+100
+85
+102
+103
+85
+103
+108
+86
+102
+111
+90
+98
+111
+93
+99
+112
+103
+114
+130
+127
+150
+168
+172
+185
+199
+208
+209
+219
+228
+224
+233
+240
+240
+247
+253
+247
+252
+255
+247
+253
+251
+250
+255
+251
+252
+255
+248
+252
+254
+243
+248
+249
+235
+250
+251
+235
+249
+248
+230
+243
+240
+221
+239
+236
+217
+236
+233
+214
+224
+222
+201
+214
+209
+189
+216
+208
+189
+203
+191
+175
+188
+179
+164
+188
+178
+169
+195
+184
+180
+205
+195
+196
+219
+210
+215
+233
+223
+231
+250
+243
+251
+253
+248
+255
+254
+251
+255
+255
+254
+255
+254
+254
+255
+252
+254
+253
+251
+253
+250
+252
+254
+251
+254
+254
+254
+254
+254
+254
+254
+254
+254
+254
+254
+254
+254
+254
+254
+254
+254
+254
+255
+254
+252
+255
+254
+252
+255
+255
+253
+255
+255
+253
+255
+255
+251
+255
+254
+250
+255
+253
+250
+255
+252
+249
+255
+252
+249
+255
+252
+249
+255
+254
+255
+255
+253
+254
+253
+253
+253
+253
+253
+253
+254
+255
+255
+254
+255
+253
+251
+255
+252
+249
+254
+248
+253
+255
+250
+251
+252
+246
+253
+252
+247
+255
+255
+250
+255
+254
+248
+255
+249
+244
+255
+247
+243
+255
+250
+249
+255
+251
+255
+255
+252
+255
+254
+253
+255
+254
+255
+255
+254
+255
+255
+251
+255
+252
+251
+255
+252
+250
+254
+253
+252
+255
+255
+252
+255
+255
+255
+255
+253
+255
+254
+249
+255
+254
+242
+255
+254
+237
+255
+254
+234
+255
+254
+232
+251
+245
+223
+255
+252
+230
+233
+225
+202
+145
+137
+114
+86
+79
+53
+88
+78
+51
+85
+76
+47
+83
+74
+45
+87
+78
+49
+87
+78
+49
+85
+78
+49
+85
+78
+49
+84
+79
+50
+84
+79
+50
+84
+78
+52
+83
+79
+52
+81
+77
+50
+82
+78
+53
+80
+78
+53
+80
+80
+54
+77
+79
+55
+75
+79
+54
+72
+77
+54
+71
+76
+53
+74
+80
+54
+70
+79
+52
+65
+74
+45
+61
+70
+39
+62
+72
+38
+68
+75
+42
+70
+77
+43
+68
+78
+41
+77
+88
+48
+75
+87
+47
+70
+81
+41
+67
+77
+40
+79
+86
+52
+94
+99
+67
+96
+99
+68
+90
+90
+62
+89
+89
+63
+91
+89
+66
+95
+90
+68
+95
+90
+70
+95
+88
+69
+92
+85
+66
+88
+81
+62
+85
+78
+59
+75
+70
+51
+71
+68
+49
+68
+65
+48
+65
+63
+48
+64
+62
+49
+62
+62
+50
+63
+63
+53
+63
+65
+54
+60
+63
+54
+58
+64
+54
+58
+64
+54
+57
+65
+54
+57
+65
+52
+55
+66
+52
+55
+66
+52
+55
+66
+52
+58
+66
+55
+57
+65
+54
+57
+64
+56
+56
+64
+53
+56
+63
+55
+57
+65
+54
+57
+64
+56
+58
+66
+55
+58
+65
+57
+58
+66
+55
+57
+64
+56
+58
+66
+55
+59
+66
+58
+60
+68
+57
+61
+68
+60
+62
+69
+61
+56
+66
+58
+55
+65
+57
+55
+65
+56
+55
+63
+52
+53
+61
+48
+51
+59
+46
+50
+56
+46
+49
+54
+48
+46
+52
+48
+47
+53
+49
+45
+55
+47
+45
+57
+45
+46
+59
+41
+48
+64
+38
+54
+71
+39
+55
+77
+39
+59
+86
+43
+59
+88
+44
+60
+86
+49
+59
+84
+52
+59
+82
+56
+60
+79
+57
+61
+78
+59
+61
+79
+57
+58
+76
+54
+63
+81
+55
+68
+86
+60
+68
+87
+59
+67
+87
+60
+64
+84
+59
+55
+74
+52
+46
+63
+44
+45
+55
+44
+44
+51
+43
+41
+48
+40
+89
+103
+77
+90
+104
+78
+92
+104
+80
+93
+105
+81
+97
+107
+83
+98
+108
+84
+103
+108
+88
+103
+108
+88
+103
+104
+86
+103
+104
+86
+105
+102
+87
+105
+102
+87
+107
+101
+87
+108
+102
+88
+109
+101
+90
+109
+103
+89
+108
+102
+88
+106
+103
+88
+107
+103
+91
+108
+104
+93
+107
+103
+94
+106
+102
+91
+104
+102
+90
+101
+102
+86
+104
+105
+87
+103
+108
+86
+103
+112
+93
+102
+115
+98
+106
+119
+110
+121
+137
+136
+156
+171
+178
+186
+200
+209
+208
+218
+227
+224
+233
+238
+240
+247
+253
+246
+254
+255
+249
+255
+253
+249
+255
+249
+251
+254
+245
+249
+253
+239
+249
+250
+236
+248
+249
+231
+246
+243
+226
+238
+235
+216
+235
+230
+211
+230
+225
+206
+221
+214
+196
+210
+201
+184
+203
+191
+175
+193
+179
+166
+184
+172
+160
+187
+174
+166
+194
+183
+181
+205
+195
+196
+219
+208
+214
+228
+221
+228
+251
+243
+254
+253
+247
+255
+254
+251
+255
+255
+254
+255
+254
+253
+255
+252
+253
+255
+252
+254
+253
+252
+254
+253
+254
+254
+254
+254
+254
+254
+254
+254
+254
+254
+254
+254
+254
+254
+254
+254
+254
+254
+255
+254
+252
+255
+254
+252
+255
+255
+253
+255
+255
+253
+255
+253
+250
+255
+253
+250
+255
+253
+250
+255
+252
+249
+255
+252
+248
+255
+253
+248
+255
+254
+253
+255
+254
+252
+253
+253
+253
+253
+253
+253
+255
+255
+255
+255
+255
+255
+254
+254
+254
+253
+253
+253
+255
+255
+253
+255
+255
+251
+255
+252
+249
+254
+247
+241
+245
+236
+229
+238
+228
+219
+244
+231
+222
+250
+241
+234
+255
+252
+253
+254
+254
+255
+253
+255
+254
+254
+255
+253
+252
+255
+251
+251
+255
+250
+251
+255
+254
+250
+254
+255
+252
+255
+255
+252
+255
+255
+255
+254
+255
+254
+254
+252
+255
+253
+244
+255
+254
+236
+255
+253
+231
+255
+254
+229
+248
+246
+223
+254
+252
+231
+229
+224
+202
+141
+137
+112
+83
+77
+51
+84
+79
+50
+82
+75
+46
+81
+74
+45
+85
+79
+47
+85
+79
+47
+84
+79
+49
+84
+79
+49
+83
+79
+50
+83
+79
+50
+81
+80
+52
+81
+80
+52
+81
+77
+50
+79
+78
+50
+80
+78
+53
+78
+81
+54
+77
+79
+55
+74
+80
+54
+72
+77
+54
+69
+77
+53
+71
+80
+53
+69
+78
+49
+65
+74
+45
+63
+73
+39
+66
+73
+40
+70
+77
+43
+74
+80
+44
+74
+82
+43
+75
+86
+43
+75
+88
+42
+82
+93
+51
+89
+100
+60
+93
+101
+64
+87
+94
+60
+83
+88
+58
+83
+86
+57
+85
+85
+61
+86
+86
+62
+90
+85
+65
+91
+86
+66
+92
+85
+66
+92
+84
+65
+90
+82
+61
+89
+81
+60
+82
+76
+54
+80
+74
+52
+75
+70
+51
+72
+67
+48
+67
+64
+49
+65
+63
+50
+66
+64
+52
+63
+65
+54
+61
+62
+54
+58
+64
+54
+58
+64
+54
+57
+65
+54
+55
+66
+52
+55
+66
+52
+54
+67
+50
+54
+67
+50
+58
+66
+55
+57
+65
+54
+57
+65
+54
+56
+64
+53
+56
+64
+53
+57
+65
+54
+57
+65
+54
+58
+66
+55
+58
+66
+55
+58
+66
+55
+58
+66
+55
+58
+66
+55
+59
+67
+56
+60
+68
+57
+61
+69
+58
+60
+70
+59
+61
+71
+63
+60
+72
+62
+60
+70
+59
+60
+71
+55
+60
+68
+53
+58
+66
+51
+57
+63
+51
+56
+61
+54
+55
+62
+55
+52
+62
+54
+51
+61
+52
+48
+62
+45
+51
+67
+41
+57
+77
+42
+66
+89
+47
+71
+97
+49
+79
+112
+59
+76
+110
+59
+76
+105
+61
+70
+97
+62
+66
+89
+63
+60
+82
+61
+59
+76
+58
+58
+75
+56
+61
+79
+57
+68
+86
+60
+74
+93
+65
+76
+95
+65
+75
+95
+67
+72
+92
+64
+60
+83
+57
+51
+70
+48
+43
+53
+42
+43
+50
+42
+40
+47
+39
+89
+103
+77
+90
+104
+78
+92
+104
+80
+94
+106
+82
+97
+107
+83
+99
+109
+85
+103
+108
+88
+104
+109
+89
+105
+106
+88
+105
+106
+88
+107
+104
+89
+107
+104
+89
+108
+102
+88
+109
+103
+89
+110
+102
+91
+110
+104
+90
+108
+102
+88
+107
+104
+89
+107
+103
+91
+107
+103
+92
+107
+103
+94
+106
+102
+91
+104
+102
+90
+101
+102
+86
+104
+105
+87
+101
+106
+84
+100
+109
+90
+103
+116
+99
+111
+124
+115
+127
+143
+142
+157
+172
+179
+182
+196
+205
+204
+214
+223
+221
+230
+235
+239
+246
+252
+246
+254
+255
+249
+255
+253
+248
+255
+248
+248
+251
+242
+245
+249
+235
+244
+245
+231
+241
+242
+224
+236
+233
+216
+226
+223
+204
+222
+217
+198
+216
+211
+192
+208
+201
+183
+199
+190
+173
+192
+180
+164
+188
+174
+161
+187
+175
+163
+194
+181
+173
+204
+193
+191
+215
+205
+206
+227
+216
+222
+234
+227
+234
+251
+243
+254
+253
+247
+255
+254
+251
+255
+254
+253
+255
+253
+252
+255
+252
+253
+255
+252
+254
+253
+253
+255
+254
+254
+254
+254
+254
+254
+254
+254
+254
+254
+254
+254
+254
+254
+254
+254
+254
+254
+254
+255
+254
+252
+255
+254
+252
+255
+255
+253
+255
+254
+252
+255
+253
+250
+255
+253
+250
+255
+252
+249
+255
+252
+249
+255
+252
+248
+255
+253
+248
+255
+254
+253
+254
+253
+251
+252
+252
+252
+253
+253
+253
+254
+254
+254
+255
+255
+255
+254
+254
+254
+253
+253
+253
+255
+255
+253
+255
+255
+251
+255
+253
+250
+249
+242
+236
+232
+223
+216
+223
+213
+204
+234
+221
+212
+246
+237
+230
+255
+252
+253
+254
+254
+255
+253
+255
+254
+254
+255
+253
+252
+255
+251
+251
+255
+250
+251
+255
+254
+250
+254
+255
+252
+255
+255
+252
+255
+255
+255
+254
+255
+254
+254
+252
+255
+253
+244
+255
+254
+236
+255
+253
+231
+255
+254
+229
+249
+247
+224
+254
+252
+231
+228
+223
+201
+138
+134
+109
+80
+74
+48
+82
+77
+48
+82
+75
+46
+82
+75
+46
+84
+78
+46
+85
+79
+47
+84
+79
+49
+85
+80
+50
+84
+80
+51
+83
+79
+50
+81
+80
+52
+80
+79
+51
+81
+77
+50
+79
+78
+50
+80
+78
+53
+77
+80
+53
+77
+79
+55
+74
+80
+54
+73
+78
+55
+70
+78
+54
+72
+81
+54
+69
+78
+49
+67
+76
+47
+66
+76
+42
+70
+77
+44
+73
+80
+46
+79
+85
+49
+81
+89
+50
+80
+91
+48
+85
+98
+52
+103
+116
+73
+119
+130
+90
+112
+120
+83
+88
+95
+61
+76
+81
+51
+78
+81
+52
+80
+80
+56
+81
+81
+57
+84
+79
+59
+85
+80
+60
+87
+80
+61
+88
+81
+62
+91
+83
+62
+92
+84
+63
+89
+83
+61
+86
+80
+58
+81
+76
+57
+77
+72
+53
+71
+68
+53
+68
+66
+53
+67
+65
+53
+63
+65
+54
+61
+62
+54
+58
+64
+54
+58
+64
+54
+57
+65
+54
+55
+66
+52
+55
+66
+52
+54
+67
+50
+54
+67
+50
+58
+66
+55
+58
+66
+55
+57
+65
+54
+57
+65
+54
+57
+65
+54
+57
+65
+54
+58
+66
+55
+58
+66
+55
+58
+66
+55
+58
+66
+55
+58
+66
+55
+58
+66
+55
+59
+67
+56
+60
+68
+57
+62
+70
+59
+60
+70
+59
+64
+74
+66
+63
+75
+65
+64
+74
+63
+64
+75
+59
+65
+73
+58
+63
+71
+56
+63
+69
+57
+62
+67
+60
+62
+69
+62
+57
+67
+59
+54
+64
+55
+52
+66
+49
+57
+73
+47
+66
+86
+51
+80
+103
+61
+88
+114
+66
+94
+127
+74
+91
+125
+74
+87
+116
+72
+77
+104
+69
+67
+90
+64
+57
+79
+58
+54
+71
+53
+52
+69
+50
+60
+78
+56
+69
+87
+61
+77
+96
+68
+82
+101
+71
+82
+102
+74
+78
+98
+70
+65
+88
+62
+56
+75
+53
+47
+57
+46
+47
+54
+46
+44
+51
+43
+89
+103
+77
+90
+104
+78
+92
+104
+80
+94
+106
+82
+98
+108
+84
+100
+110
+86
+104
+109
+89
+105
+110
+90
+107
+108
+90
+107
+108
+90
+109
+106
+91
+108
+105
+90
+110
+104
+90
+110
+104
+90
+111
+103
+92
+111
+105
+91
+109
+103
+89
+107
+104
+89
+107
+103
+91
+107
+103
+92
+106
+102
+93
+106
+102
+91
+104
+102
+90
+102
+103
+87
+102
+103
+85
+97
+102
+80
+95
+104
+85
+100
+113
+96
+112
+125
+116
+127
+143
+142
+151
+166
+173
+171
+185
+194
+199
+209
+218
+217
+226
+231
+237
+244
+250
+245
+253
+255
+248
+254
+252
+245
+252
+245
+243
+246
+237
+238
+242
+228
+234
+235
+221
+228
+229
+211
+221
+218
+201
+212
+209
+190
+208
+203
+184
+202
+197
+178
+195
+188
+170
+189
+180
+163
+196
+184
+168
+198
+184
+171
+203
+191
+179
+213
+200
+192
+224
+213
+211
+234
+224
+225
+244
+233
+239
+248
+241
+248
+252
+244
+255
+253
+247
+255
+254
+251
+255
+254
+253
+255
+253
+252
+255
+251
+252
+254
+252
+254
+253
+253
+255
+254
+254
+254
+254
+254
+254
+254
+254
+254
+254
+254
+254
+254
+254
+254
+254
+254
+254
+254
+255
+254
+252
+255
+254
+252
+255
+254
+252
+255
+254
+252
+255
+253
+250
+255
+252
+249
+255
+252
+249
+255
+252
+249
+255
+251
+247
+255
+252
+247
+255
+253
+252
+253
+252
+250
+251
+251
+251
+252
+252
+252
+254
+254
+254
+255
+255
+255
+254
+254
+254
+253
+253
+253
+254
+253
+251
+255
+255
+251
+255
+253
+250
+250
+243
+237
+234
+225
+218
+227
+217
+208
+239
+226
+217
+251
+242
+235
+255
+252
+253
+254
+254
+255
+253
+255
+254
+254
+255
+253
+252
+255
+251
+251
+255
+250
+251
+255
+254
+250
+254
+255
+252
+255
+255
+252
+255
+255
+255
+254
+255
+254
+254
+252
+255
+253
+244
+255
+254
+236
+255
+252
+230
+255
+253
+228
+252
+250
+227
+255
+254
+233
+228
+223
+201
+137
+133
+108
+80
+74
+48
+82
+77
+48
+84
+77
+48
+84
+77
+48
+84
+78
+46
+85
+79
+47
+85
+80
+50
+85
+80
+50
+84
+80
+51
+83
+79
+50
+80
+79
+51
+79
+78
+50
+81
+77
+50
+79
+78
+50
+79
+77
+52
+76
+79
+52
+76
+78
+54
+74
+80
+54
+74
+79
+56
+71
+79
+55
+74
+83
+56
+71
+80
+51
+70
+79
+50
+72
+82
+48
+76
+83
+50
+78
+85
+51
+85
+91
+55
+91
+99
+60
+103
+114
+71
+115
+128
+82
+135
+148
+105
+144
+156
+116
+133
+143
+106
+110
+117
+83
+90
+95
+65
+82
+87
+57
+79
+79
+55
+78
+78
+54
+80
+75
+55
+79
+74
+54
+82
+75
+56
+85
+78
+59
+89
+81
+60
+91
+83
+62
+90
+84
+62
+88
+82
+60
+84
+79
+60
+80
+75
+56
+74
+71
+56
+71
+69
+56
+69
+67
+55
+65
+67
+56
+61
+62
+54
+58
+64
+54
+58
+64
+54
+57
+65
+54
+55
+66
+52
+55
+66
+52
+54
+67
+50
+54
+67
+50
+59
+67
+56
+58
+66
+55
+57
+65
+54
+57
+65
+54
+57
+65
+54
+57
+65
+54
+58
+66
+55
+59
+67
+56
+59
+67
+56
+58
+66
+55
+58
+66
+55
+59
+67
+56
+59
+67
+56
+61
+69
+58
+62
+70
+59
+61
+71
+60
+61
+71
+63
+60
+72
+62
+62
+72
+61
+62
+73
+57
+64
+72
+57
+63
+71
+56
+63
+69
+57
+63
+68
+61
+61
+68
+61
+57
+67
+59
+54
+64
+55
+52
+66
+49
+57
+73
+47
+68
+88
+53
+82
+105
+63
+91
+117
+69
+89
+122
+69
+87
+121
+70
+84
+113
+69
+73
+100
+65
+62
+85
+59
+51
+73
+52
+48
+65
+47
+46
+63
+44
+54
+72
+50
+64
+82
+56
+75
+94
+66
+82
+101
+71
+83
+103
+75
+79
+99
+71
+65
+88
+62
+54
+73
+51
+49
+59
+48
+48
+55
+47
+45
+52
+44
+89
+103
+77
+90
+104
+78
+92
+104
+80
+94
+106
+82
+98
+108
+84
+100
+110
+86
+105
+110
+90
+106
+111
+91
+109
+110
+92
+108
+109
+91
+110
+107
+92
+109
+106
+91
+110
+104
+90
+110
+104
+90
+112
+104
+93
+111
+105
+91
+109
+103
+89
+107
+104
+89
+106
+102
+90
+106
+102
+91
+105
+101
+92
+105
+101
+90
+104
+102
+90
+102
+103
+87
+103
+104
+86
+97
+102
+80
+94
+103
+84
+100
+113
+96
+112
+125
+116
+125
+141
+140
+145
+160
+167
+161
+175
+184
+194
+204
+213
+214
+223
+228
+234
+241
+247
+243
+251
+253
+245
+251
+249
+242
+249
+242
+239
+242
+233
+233
+237
+223
+227
+228
+214
+218
+219
+201
+211
+208
+191
+204
+201
+182
+201
+196
+177
+195
+190
+171
+190
+183
+165
+187
+178
+161
+202
+190
+174
+209
+195
+182
+218
+206
+194
+229
+216
+208
+238
+227
+225
+248
+238
+239
+255
+245
+251
+255
+249
+255
+252
+244
+255
+253
+247
+255
+253
+250
+255
+253
+252
+255
+252
+251
+255
+251
+252
+254
+252
+254
+253
+254
+255
+255
+254
+254
+254
+254
+254
+254
+254
+254
+254
+254
+254
+254
+254
+254
+254
+254
+254
+254
+255
+254
+252
+255
+254
+252
+255
+254
+252
+255
+254
+252
+255
+252
+249
+255
+252
+249
+255
+252
+249
+255
+251
+248
+255
+251
+247
+255
+252
+247
+255
+252
+251
+252
+251
+249
+251
+251
+251
+252
+252
+252
+254
+254
+254
+255
+255
+255
+254
+254
+254
+253
+253
+253
+254
+253
+251
+254
+253
+249
+255
+252
+249
+254
+247
+241
+245
+236
+229
+239
+229
+220
+247
+234
+225
+254
+245
+238
+255
+252
+253
+254
+254
+255
+253
+255
+254
+254
+255
+253
+252
+255
+251
+251
+255
+250
+251
+255
+254
+250
+254
+255
+251
+255
+255
+251
+255
+255
+254
+253
+255
+254
+254
+252
+255
+254
+245
+255
+254
+236
+255
+252
+230
+255
+252
+227
+254
+252
+229
+255
+255
+235
+229
+224
+202
+138
+134
+109
+81
+75
+49
+84
+79
+50
+86
+79
+50
+87
+80
+51
+84
+78
+46
+85
+79
+47
+86
+81
+51
+86
+81
+51
+85
+81
+52
+83
+79
+50
+79
+78
+50
+78
+77
+49
+81
+77
+50
+79
+78
+50
+79
+77
+52
+76
+79
+52
+76
+78
+54
+74
+80
+54
+74
+79
+56
+73
+81
+57
+76
+85
+58
+73
+82
+53
+74
+83
+54
+78
+88
+54
+81
+88
+55
+82
+89
+55
+91
+97
+61
+99
+107
+68
+129
+142
+98
+146
+162
+115
+161
+174
+131
+157
+169
+129
+148
+158
+121
+138
+145
+111
+115
+120
+90
+90
+95
+65
+80
+80
+56
+78
+78
+54
+78
+73
+53
+76
+71
+51
+78
+71
+52
+81
+74
+55
+86
+78
+57
+88
+80
+59
+88
+82
+60
+86
+80
+58
+83
+78
+59
+80
+75
+56
+76
+73
+58
+73
+71
+58
+71
+69
+57
+67
+69
+58
+61
+62
+54
+58
+64
+54
+58
+64
+54
+57
+65
+54
+55
+66
+52
+55
+66
+52
+54
+67
+50
+54
+67
+50
+59
+67
+56
+59
+67
+56
+58
+66
+55
+57
+65
+54
+57
+65
+54
+58
+66
+55
+59
+67
+56
+59
+67
+56
+59
+67
+56
+59
+67
+56
+59
+67
+56
+59
+67
+56
+60
+68
+57
+61
+69
+58
+62
+70
+59
+61
+71
+60
+59
+69
+61
+58
+70
+60
+60
+70
+59
+60
+71
+55
+62
+70
+55
+61
+69
+54
+62
+68
+56
+61
+66
+59
+58
+65
+58
+55
+65
+57
+53
+63
+54
+52
+66
+49
+57
+73
+47
+66
+86
+51
+78
+101
+59
+85
+111
+63
+83
+116
+63
+81
+115
+64
+79
+108
+64
+69
+96
+61
+57
+80
+54
+46
+68
+47
+44
+61
+43
+44
+61
+42
+49
+67
+45
+60
+78
+52
+73
+92
+64
+80
+99
+69
+82
+102
+74
+78
+98
+70
+63
+86
+60
+52
+71
+49
+43
+53
+42
+43
+50
+42
+40
+47
+39

Added: packages/libhdf4/branches/upstream/current/mfhdf/hrepack/image24plane.txt
===================================================================
--- packages/libhdf4/branches/upstream/current/mfhdf/hrepack/image24plane.txt	                        (rev 0)
+++ packages/libhdf4/branches/upstream/current/mfhdf/hrepack/image24plane.txt	2007-05-15 09:53:05 UTC (rev 831)
@@ -0,0 +1,101475 @@
+components
+3
+height
+149
+width
+227
+48
+48
+49
+50
+53
+53
+54
+54
+56
+56
+58
+58
+58
+58
+58
+58
+58
+57
+57
+56
+56
+57
+57
+58
+56
+56
+56
+56
+56
+56
+56
+56
+54
+54
+54
+53
+53
+52
+52
+52
+52
+52
+52
+52
+52
+52
+52
+50
+47
+47
+47
+48
+49
+50
+51
+51
+54
+54
+55
+56
+56
+57
+58
+58
+65
+66
+68
+70
+73
+74
+75
+75
+77
+77
+79
+78
+79
+79
+80
+82
+82
+89
+98
+110
+125
+139
+153
+163
+175
+184
+190
+197
+199
+202
+203
+208
+231
+237
+235
+235
+238
+239
+241
+244
+248
+247
+244
+240
+233
+226
+215
+203
+187
+181
+181
+180
+180
+179
+178
+175
+173
+170
+166
+162
+159
+155
+152
+150
+148
+146
+146
+145
+145
+144
+146
+146
+148
+148
+148
+148
+148
+149
+150
+150
+150
+149
+151
+159
+169
+179
+188
+191
+185
+181
+172
+158
+135
+111
+84
+67
+61
+57
+57
+55
+55
+54
+53
+53
+55
+55
+55
+54
+54
+53
+53
+52
+47
+46
+47
+47
+48
+48
+50
+50
+53
+52
+52
+51
+55
+61
+69
+80
+106
+124
+141
+149
+159
+170
+170
+159
+148
+135
+128
+126
+115
+96
+84
+80
+83
+79
+77
+84
+102
+124
+141
+153
+163
+162
+158
+143
+123
+102
+88
+81
+85
+85
+85
+48
+48
+49
+49
+52
+53
+54
+54
+56
+56
+58
+58
+58
+58
+58
+58
+57
+57
+56
+56
+56
+56
+57
+57
+56
+56
+56
+56
+56
+56
+56
+56
+54
+54
+53
+53
+53
+52
+52
+52
+53
+53
+53
+53
+53
+53
+53
+51
+48
+48
+48
+49
+50
+51
+52
+52
+54
+54
+55
+55
+56
+57
+58
+58
+64
+65
+67
+69
+72
+73
+74
+74
+76
+76
+77
+77
+77
+78
+79
+81
+80
+85
+94
+106
+120
+132
+146
+156
+167
+175
+181
+188
+192
+196
+197
+205
+225
+231
+232
+234
+237
+239
+243
+246
+248
+247
+244
+240
+233
+224
+213
+202
+185
+181
+180
+180
+180
+178
+176
+175
+173
+169
+166
+161
+159
+155
+152
+150
+148
+146
+145
+145
+145
+144
+146
+146
+148
+147
+148
+148
+148
+149
+150
+150
+148
+149
+152
+160
+171
+181
+189
+191
+187
+183
+172
+156
+133
+108
+83
+66
+62
+58
+57
+56
+56
+55
+54
+54
+55
+55
+55
+54
+54
+53
+53
+52
+47
+46
+47
+47
+48
+48
+50
+50
+51
+53
+52
+51
+53
+60
+67
+78
+100
+118
+134
+143
+154
+164
+165
+157
+145
+134
+127
+123
+111
+91
+81
+79
+79
+79
+80
+82
+91
+110
+131
+148
+153
+154
+153
+143
+126
+106
+93
+86
+88
+86
+88
+47
+47
+48
+49
+52
+52
+53
+53
+55
+55
+55
+55
+57
+57
+57
+57
+57
+56
+55
+55
+55
+55
+56
+57
+56
+56
+56
+56
+56
+56
+56
+56
+54
+53
+53
+53
+52
+52
+52
+52
+53
+53
+53
+53
+53
+53
+53
+51
+50
+49
+50
+51
+51
+52
+52
+53
+54
+54
+54
+55
+56
+57
+57
+58
+63
+64
+66
+68
+71
+72
+72
+72
+73
+73
+75
+75
+75
+76
+77
+78
+77
+81
+89
+100
+113
+124
+135
+146
+152
+160
+167
+175
+181
+186
+191
+197
+217
+225
+227
+231
+234
+240
+244
+248
+250
+249
+245
+240
+232
+220
+209
+198
+183
+179
+179
+178
+178
+176
+175
+173
+170
+167
+165
+161
+157
+154
+152
+149
+148
+145
+145
+145
+144
+144
+144
+144
+145
+145
+146
+146
+147
+147
+148
+149
+149
+150
+154
+163
+175
+185
+191
+193
+192
+184
+174
+153
+129
+104
+81
+66
+63
+61
+60
+58
+57
+56
+55
+55
+54
+54
+54
+53
+53
+52
+52
+50
+46
+44
+46
+46
+47
+47
+48
+50
+53
+52
+53
+52
+52
+57
+62
+73
+91
+108
+124
+134
+144
+152
+155
+148
+140
+131
+125
+117
+102
+84
+77
+76
+77
+79
+81
+77
+78
+91
+113
+133
+135
+138
+141
+134
+120
+102
+90
+86
+90
+90
+91
+46
+47
+47
+48
+51
+52
+52
+52
+54
+54
+54
+54
+56
+56
+56
+56
+55
+55
+54
+54
+54
+54
+55
+55
+56
+56
+56
+56
+56
+56
+56
+56
+53
+53
+53
+52
+52
+52
+51
+51
+54
+54
+54
+54
+54
+54
+54
+52
+51
+51
+51
+52
+52
+53
+53
+53
+53
+53
+54
+55
+56
+56
+57
+57
+62
+63
+64
+66
+69
+69
+70
+70
+71
+71
+72
+73
+73
+74
+76
+74
+75
+78
+85
+94
+105
+115
+126
+134
+140
+148
+157
+163
+172
+179
+184
+193
+210
+218
+222
+226
+231
+236
+243
+247
+250
+249
+245
+238
+229
+218
+205
+194
+181
+176
+176
+176
+175
+174
+174
+172
+169
+166
+163
+160
+156
+152
+150
+148
+145
+145
+145
+144
+144
+144
+143
+143
+144
+144
+143
+143
+146
+145
+148
+146
+149
+150
+156
+166
+178
+188
+193
+194
+194
+186
+172
+151
+124
+98
+76
+65
+64
+62
+61
+60
+58
+57
+56
+56
+54
+54
+54
+51
+53
+50
+50
+49
+45
+45
+47
+47
+48
+48
+49
+49
+53
+54
+53
+53
+52
+54
+58
+68
+84
+99
+113
+123
+130
+137
+141
+139
+131
+125
+120
+111
+96
+81
+76
+76
+76
+80
+81
+76
+71
+77
+94
+106
+117
+120
+122
+119
+107
+96
+87
+84
+93
+93
+93
+45
+45
+46
+47
+48
+49
+51
+52
+51
+51
+52
+52
+52
+52
+54
+54
+52
+52
+51
+51
+51
+51
+52
+52
+53
+53
+53
+53
+53
+53
+53
+53
+51
+51
+50
+50
+50
+49
+49
+49
+52
+52
+52
+52
+52
+52
+52
+52
+52
+52
+52
+52
+52
+53
+53
+53
+53
+53
+54
+54
+55
+56
+57
+57
+60
+61
+63
+64
+66
+67
+67
+67
+68
+68
+70
+71
+72
+73
+74
+73
+74
+77
+82
+89
+98
+106
+117
+125
+130
+139
+147
+154
+163
+172
+178
+187
+204
+212
+216
+221
+226
+233
+240
+244
+249
+248
+244
+237
+225
+211
+197
+185
+178
+174
+174
+174
+173
+172
+172
+170
+168
+164
+160
+158
+154
+151
+149
+147
+145
+144
+143
+143
+143
+142
+142
+142
+142
+142
+142
+142
+143
+143
+145
+144
+148
+151
+157
+168
+182
+191
+197
+196
+190
+183
+166
+144
+116
+90
+69
+60
+64
+64
+63
+62
+61
+60
+57
+56
+54
+52
+52
+50
+51
+49
+49
+48
+45
+44
+45
+45
+47
+47
+48
+49
+51
+53
+53
+52
+50
+52
+55
+61
+78
+89
+101
+110
+115
+121
+128
+131
+127
+122
+117
+107
+95
+84
+79
+76
+78
+78
+77
+74
+71
+71
+75
+77
+93
+96
+98
+96
+90
+87
+85
+88
+94
+96
+96
+44
+44
+46
+46
+47
+48
+51
+51
+50
+50
+51
+51
+51
+51
+53
+53
+51
+51
+50
+49
+49
+50
+51
+51
+51
+51
+51
+51
+51
+51
+51
+51
+50
+50
+50
+50
+49
+49
+49
+48
+51
+51
+51
+51
+51
+51
+51
+51
+52
+52
+52
+52
+52
+52
+52
+52
+52
+53
+53
+54
+55
+56
+56
+56
+59
+60
+61
+62
+64
+65
+65
+65
+67
+67
+69
+70
+71
+72
+74
+72
+74
+73
+78
+86
+92
+100
+110
+118
+123
+130
+140
+148
+156
+163
+170
+180
+196
+204
+209
+214
+222
+228
+236
+241
+247
+244
+240
+233
+220
+205
+190
+177
+174
+171
+170
+170
+170
+169
+169
+168
+165
+162
+160
+155
+151
+149
+147
+145
+143
+143
+143
+143
+142
+142
+142
+141
+142
+139
+141
+139
+139
+140
+141
+142
+148
+151
+160
+172
+185
+194
+197
+194
+186
+177
+163
+141
+111
+83
+65
+57
+64
+65
+63
+62
+60
+57
+56
+55
+52
+52
+51
+50
+50
+48
+48
+46
+45
+45
+46
+46
+48
+48
+49
+49
+50
+51
+51
+52
+50
+49
+52
+56
+71
+79
+88
+96
+101
+109
+121
+130
+128
+124
+119
+110
+100
+91
+82
+76
+79
+76
+73
+72
+72
+69
+64
+59
+66
+68
+74
+74
+73
+75
+79
+86
+94
+96
+96
+43
+43
+44
+45
+47
+47
+48
+48
+49
+49
+49
+49
+50
+50
+50
+50
+50
+50
+49
+49
+49
+49
+50
+50
+49
+49
+49
+49
+49
+49
+49
+49
+50
+50
+50
+49
+49
+49
+48
+48
+51
+51
+51
+51
+51
+51
+51
+51
+52
+52
+52
+51
+51
+51
+51
+51
+52
+52
+53
+54
+55
+55
+56
+56
+58
+59
+60
+61
+63
+63
+63
+63
+66
+66
+69
+69
+71
+72
+74
+72
+72
+71
+75
+81
+88
+95
+102
+110
+118
+124
+133
+140
+147
+155
+162
+172
+187
+194
+201
+208
+217
+226
+234
+240
+242
+241
+236
+228
+214
+198
+181
+170
+170
+169
+169
+168
+168
+168
+167
+165
+163
+160
+158
+154
+150
+147
+145
+143
+143
+141
+141
+140
+140
+140
+139
+139
+139
+138
+138
+137
+138
+139
+139
+140
+146
+152
+161
+174
+188
+194
+196
+192
+185
+178
+165
+143
+115
+87
+67
+60
+62
+64
+62
+61
+58
+57
+56
+54
+52
+52
+51
+49
+49
+46
+46
+46
+45
+45
+45
+45
+46
+46
+48
+48
+48
+49
+50
+50
+48
+47
+50
+52
+63
+68
+75
+84
+90
+100
+117
+131
+137
+133
+126
+116
+109
+99
+86
+76
+75
+73
+71
+69
+70
+68
+63
+59
+58
+62
+68
+71
+71
+74
+78
+85
+94
+97
+97
+43
+43
+44
+44
+46
+47
+48
+48
+49
+49
+49
+49
+50
+50
+50
+50
+50
+49
+49
+48
+48
+49
+49
+50
+48
+48
+48
+48
+48
+48
+48
+48
+50
+50
+50
+49
+49
+48
+48
+48
+50
+50
+50
+50
+50
+50
+50
+50
+51
+51
+51
+51
+51
+51
+51
+51
+52
+52
+53
+54
+54
+55
+56
+56
+57
+58
+59
+60
+62
+62
+62
+62
+66
+66
+69
+69
+71
+73
+74
+73
+70
+70
+74
+79
+84
+92
+98
+106
+113
+119
+125
+133
+140
+149
+155
+164
+178
+186
+193
+202
+212
+222
+231
+238
+237
+235
+231
+223
+209
+191
+175
+164
+166
+166
+165
+165
+165
+164
+164
+164
+162
+159
+156
+152
+149
+145
+143
+143
+141
+141
+141
+140
+140
+139
+139
+138
+138
+136
+136
+136
+136
+135
+136
+139
+145
+150
+162
+173
+186
+193
+193
+187
+185
+178
+165
+145
+117
+91
+71
+67
+60
+63
+62
+59
+57
+55
+54
+52
+52
+51
+50
+49
+47
+46
+46
+46
+45
+45
+45
+45
+46
+46
+48
+48
+47
+48
+50
+50
+49
+48
+48
+51
+56
+59
+67
+75
+83
+94
+116
+135
+144
+140
+132
+122
+114
+105
+87
+73
+69
+71
+68
+67
+67
+64
+64
+62
+71
+75
+81
+85
+83
+82
+84
+89
+94
+97
+97
+44
+44
+44
+44
+45
+45
+46
+46
+47
+47
+49
+48
+48
+48
+47
+47
+47
+47
+47
+47
+47
+47
+47
+48
+47
+47
+47
+47
+47
+47
+47
+47
+47
+47
+47
+48
+48
+49
+49
+50
+49
+49
+49
+49
+49
+49
+49
+49
+48
+49
+50
+51
+51
+51
+51
+51
+51
+51
+51
+51
+52
+53
+54
+55
+56
+57
+58
+59
+61
+62
+62
+62
+63
+63
+66
+67
+68
+70
+71
+70
+71
+72
+74
+80
+84
+88
+94
+98
+109
+116
+124
+131
+141
+147
+152
+158
+167
+173
+181
+190
+202
+212
+222
+229
+232
+234
+230
+218
+200
+183
+170
+162
+162
+161
+162
+162
+161
+161
+162
+160
+156
+154
+152
+149
+147
+144
+142
+140
+139
+139
+138
+137
+137
+137
+136
+135
+137
+134
+134
+135
+136
+136
+137
+139
+145
+151
+163
+177
+186
+187
+187
+184
+180
+175
+163
+145
+126
+106
+86
+73
+76
+74
+66
+60
+57
+55
+54
+51
+52
+51
+49
+49
+48
+47
+44
+44
+45
+45
+45
+45
+47
+47
+47
+47
+48
+48
+49
+49
+49
+49
+49
+52
+52
+59
+65
+67
+74
+93
+121
+139
+147
+148
+144
+131
+116
+106
+95
+90
+76
+72
+65
+62
+63
+65
+76
+85
+98
+110
+118
+114
+108
+103
+95
+87
+91
+96
+99
+44
+44
+44
+44
+45
+45
+46
+46
+47
+46
+48
+48
+47
+47
+47
+47
+46
+46
+46
+46
+47
+47
+47
+47
+47
+47
+47
+47
+47
+47
+47
+47
+47
+47
+47
+48
+48
+48
+49
+49
+49
+49
+49
+49
+49
+49
+49
+49
+48
+48
+49
+50
+51
+51
+50
+50
+50
+50
+50
+50
+51
+52
+53
+54
+56
+57
+58
+59
+61
+62
+62
+61
+63
+63
+65
+66
+67
+69
+71
+72
+72
+72
+76
+79
+81
+86
+90
+95
+104
+112
+119
+129
+137
+144
+150
+155
+162
+167
+172
+180
+190
+201
+212
+219
+223
+224
+222
+212
+196
+178
+165
+158
+159
+158
+159
+158
+158
+158
+158
+158
+154
+153
+150
+148
+144
+143
+140
+140
+139
+138
+137
+137
+137
+135
+135
+133
+134
+133
+133
+131
+132
+134
+135
+136
+147
+151
+163
+175
+184
+184
+183
+179
+177
+170
+159
+144
+127
+109
+90
+78
+76
+75
+69
+64
+61
+56
+52
+49
+50
+50
+48
+47
+47
+46
+46
+46
+47
+45
+47
+47
+47
+47
+47
+47
+48
+48
+49
+49
+49
+49
+49
+50
+53
+57
+60
+63
+72
+94
+120
+138
+147
+148
+144
+132
+121
+113
+107
+104
+92
+88
+83
+82
+84
+90
+102
+114
+116
+126
+131
+126
+118
+114
+102
+90
+89
+94
+97
+44
+44
+44
+44
+44
+44
+45
+45
+46
+46
+46
+45
+47
+46
+46
+46
+44
+44
+44
+44
+43
+43
+43
+43
+45
+45
+45
+45
+45
+45
+45
+45
+44
+44
+45
+45
+45
+46
+46
+46
+46
+46
+46
+47
+47
+47
+47
+47
+48
+48
+49
+50
+50
+50
+50
+49
+49
+49
+49
+49
+50
+51
+52
+53
+56
+57
+58
+59
+61
+61
+61
+61
+63
+63
+65
+65
+67
+68
+70
+71
+72
+74
+75
+78
+80
+83
+86
+91
+99
+107
+116
+125
+135
+141
+148
+150
+157
+160
+162
+168
+177
+186
+197
+205
+213
+215
+212
+204
+190
+174
+161
+156
+157
+156
+156
+155
+155
+155
+155
+155
+152
+150
+148
+147
+143
+140
+139
+138
+137
+137
+137
+135
+135
+133
+132
+131
+132
+130
+130
+130
+131
+133
+135
+136
+148
+151
+160
+172
+178
+179
+178
+174
+173
+166
+157
+145
+130
+115
+99
+88
+78
+77
+72
+68
+64
+57
+52
+47
+48
+48
+47
+47
+46
+46
+47
+47
+47
+46
+47
+47
+47
+47
+47
+47
+48
+48
+48
+48
+48
+48
+48
+49
+54
+55
+56
+59
+72
+95
+122
+139
+144
+146
+143
+132
+125
+123
+124
+125
+125
+119
+113
+110
+110
+111
+121
+131
+139
+145
+144
+136
+131
+124
+106
+92
+86
+91
+93
+45
+45
+45
+45
+45
+45
+46
+46
+46
+46
+45
+45
+46
+46
+46
+46
+44
+43
+43
+43
+43
+42
+42
+42
+44
+44
+44
+44
+44
+44
+44
+44
+44
+44
+44
+44
+44
+45
+45
+45
+45
+46
+46
+46
+46
+47
+47
+47
+47
+48
+49
+49
+49
+49
+48
+48
+48
+48
+48
+48
+49
+50
+51
+52
+57
+58
+59
+60
+61
+61
+61
+61
+62
+62
+64
+64
+65
+67
+68
+69
+70
+72
+73
+74
+76
+78
+81
+84
+94
+101
+111
+120
+130
+138
+144
+148
+153
+155
+155
+159
+165
+174
+184
+191
+199
+203
+202
+195
+182
+170
+158
+153
+153
+153
+152
+151
+151
+153
+153
+151
+149
+148
+147
+144
+142
+138
+138
+137
+136
+136
+135
+135
+132
+132
+131
+128
+129
+128
+128
+129
+131
+131
+135
+136
+148
+150
+158
+167
+174
+174
+173
+170
+167
+161
+154
+143
+134
+122
+109
+98
+83
+81
+75
+69
+64
+59
+53
+49
+48
+47
+46
+46
+46
+46
+47
+48
+47
+47
+47
+47
+47
+46
+47
+46
+48
+47
+48
+47
+47
+47
+47
+50
+55
+54
+51
+57
+72
+98
+123
+139
+141
+143
+140
+131
+129
+133
+141
+146
+147
+144
+140
+135
+130
+125
+129
+136
+148
+152
+148
+139
+133
+127
+107
+88
+83
+89
+90
+43
+43
+43
+43
+45
+45
+46
+46
+45
+45
+46
+45
+45
+44
+44
+44
+44
+44
+44
+43
+43
+42
+42
+42
+44
+44
+44
+44
+44
+44
+44
+44
+44
+44
+44
+44
+44
+43
+43
+43
+44
+45
+45
+46
+46
+47
+47
+47
+47
+48
+48
+48
+48
+48
+47
+46
+47
+47
+47
+47
+48
+49
+51
+52
+57
+58
+59
+60
+61
+61
+60
+60
+61
+61
+63
+63
+64
+65
+66
+67
+68
+67
+68
+69
+71
+72
+75
+78
+88
+95
+105
+114
+125
+134
+140
+144
+151
+151
+151
+151
+156
+163
+171
+179
+186
+189
+190
+185
+176
+166
+155
+151
+151
+151
+150
+149
+148
+149
+150
+150
+149
+147
+146
+142
+139
+137
+137
+136
+135
+134
+134
+134
+131
+131
+130
+128
+128
+128
+128
+127
+130
+131
+135
+136
+145
+146
+154
+163
+168
+168
+169
+166
+162
+155
+149
+140
+134
+126
+116
+106
+92
+86
+78
+69
+63
+60
+55
+54
+48
+48
+46
+47
+47
+47
+49
+50
+49
+49
+49
+49
+49
+47
+49
+47
+50
+48
+50
+48
+48
+48
+48
+50
+56
+53
+49
+54
+71
+96
+122
+136
+141
+143
+141
+134
+135
+144
+155
+160
+152
+154
+155
+152
+145
+137
+137
+144
+146
+149
+144
+136
+132
+123
+103
+84
+81
+85
+86
+44
+44
+44
+44
+46
+46
+47
+47
+46
+46
+47
+46
+46
+46
+45
+45
+45
+45
+45
+44
+43
+42
+42
+42
+43
+43
+43
+43
+43
+43
+43
+43
+44
+44
+43
+43
+43
+42
+42
+42
+44
+44
+44
+45
+46
+46
+47
+47
+47
+47
+48
+48
+47
+47
+46
+45
+48
+48
+47
+48
+49
+50
+51
+52
+58
+58
+59
+60
+61
+60
+60
+59
+61
+60
+62
+62
+63
+64
+65
+63
+64
+64
+64
+65
+66
+67
+70
+72
+81
+88
+97
+108
+117
+128
+134
+139
+147
+149
+147
+147
+149
+154
+160
+165
+172
+176
+180
+177
+170
+161
+154
+150
+149
+148
+147
+147
+147
+147
+148
+148
+147
+146
+143
+141
+138
+137
+135
+135
+134
+134
+133
+131
+131
+129
+127
+127
+128
+127
+127
+128
+130
+133
+136
+138
+142
+144
+151
+159
+167
+167
+169
+164
+156
+150
+143
+136
+131
+126
+121
+112
+100
+93
+82
+74
+66
+62
+58
+57
+51
+50
+49
+47
+47
+48
+49
+50
+49
+49
+49
+49
+49
+48
+48
+48
+49
+49
+49
+49
+47
+47
+47
+50
+56
+53
+51
+53
+69
+92
+117
+134
+142
+145
+144
+139
+141
+151
+162
+169
+165
+166
+167
+164
+151
+139
+136
+141
+142
+144
+141
+132
+128
+119
+100
+81
+77
+81
+82
+44
+44
+44
+44
+46
+46
+46
+46
+47
+47
+47
+47
+47
+47
+46
+46
+47
+46
+46
+45
+44
+43
+43
+42
+43
+43
+43
+43
+43
+43
+43
+43
+43
+43
+43
+42
+42
+42
+41
+41
+43
+43
+44
+45
+46
+46
+47
+47
+47
+47
+47
+47
+47
+46
+45
+44
+48
+48
+48
+48
+49
+50
+52
+52
+58
+59
+59
+60
+61
+60
+60
+59
+60
+60
+62
+61
+62
+62
+63
+62
+61
+59
+59
+60
+61
+62
+64
+67
+71
+79
+89
+100
+110
+120
+127
+133
+143
+145
+144
+143
+144
+147
+151
+153
+160
+166
+170
+170
+165
+159
+151
+149
+146
+146
+145
+144
+145
+145
+146
+146
+145
+145
+142
+141
+138
+136
+134
+132
+133
+133
+131
+130
+130
+129
+126
+126
+128
+128
+128
+129
+132
+133
+136
+140
+140
+142
+152
+161
+168
+169
+169
+164
+153
+146
+137
+130
+128
+127
+126
+120
+106
+100
+90
+81
+73
+67
+62
+60
+54
+52
+51
+48
+49
+49
+50
+52
+50
+50
+50
+50
+50
+48
+48
+48
+49
+49
+48
+48
+48
+48
+48
+49
+54
+53
+52
+52
+65
+87
+113
+130
+141
+144
+144
+139
+141
+149
+160
+164
+169
+168
+167
+161
+147
+133
+130
+135
+136
+140
+139
+129
+123
+113
+95
+77
+73
+74
+76
+46
+44
+46
+46
+46
+46
+46
+47
+48
+48
+48
+48
+48
+48
+47
+49
+50
+49
+49
+48
+47
+44
+43
+43
+43
+43
+43
+43
+43
+43
+43
+43
+43
+43
+45
+42
+44
+41
+41
+40
+42
+43
+44
+44
+45
+46
+47
+47
+45
+45
+47
+47
+46
+45
+44
+44
+49
+50
+50
+50
+51
+52
+53
+54
+59
+59
+60
+60
+61
+60
+59
+59
+60
+60
+61
+61
+61
+62
+63
+61
+62
+61
+60
+57
+57
+58
+59
+63
+67
+74
+84
+94
+104
+111
+118
+123
+135
+139
+139
+140
+142
+143
+146
+149
+152
+156
+162
+161
+158
+153
+150
+148
+148
+147
+144
+142
+142
+140
+140
+141
+142
+142
+139
+138
+136
+135
+132
+132
+130
+128
+127
+126
+126
+124
+124
+124
+128
+129
+128
+130
+133
+133
+136
+139
+140
+142
+147
+152
+157
+157
+158
+157
+147
+143
+137
+129
+127
+125
+122
+116
+103
+98
+92
+85
+78
+71
+64
+61
+56
+56
+53
+51
+50
+50
+51
+52
+50
+48
+48
+50
+50
+50
+50
+50
+51
+51
+49
+49
+48
+48
+48
+49
+52
+52
+52
+52
+63
+84
+109
+129
+137
+141
+141
+136
+138
+145
+155
+159
+159
+158
+157
+152
+140
+130
+133
+140
+132
+137
+137
+126
+118
+108
+90
+74
+70
+70
+70
+47
+46
+47
+48
+48
+48
+49
+50
+51
+52
+52
+54
+53
+52
+51
+52
+53
+53
+52
+51
+50
+49
+48
+48
+46
+46
+45
+45
+44
+43
+42
+41
+46
+46
+47
+46
+47
+46
+46
+46
+47
+47
+45
+46
+45
+45
+46
+46
+45
+45
+46
+47
+47
+48
+50
+50
+50
+52
+53
+54
+56
+58
+58
+59
+61
+61
+62
+62
+62
+61
+60
+59
+61
+60
+60
+59
+61
+62
+62
+64
+66
+66
+60
+57
+53
+52
+54
+59
+64
+71
+79
+86
+91
+97
+102
+109
+121
+127
+134
+139
+143
+147
+147
+146
+147
+147
+148
+149
+148
+146
+145
+145
+151
+151
+146
+140
+136
+132
+130
+130
+136
+136
+138
+137
+136
+135
+132
+131
+123
+126
+118
+112
+118
+118
+118
+125
+125
+131
+136
+139
+138
+135
+133
+135
+144
+149
+147
+142
+138
+134
+135
+136
+139
+138
+139
+138
+132
+124
+114
+110
+104
+97
+91
+89
+90
+86
+79
+73
+66
+64
+58
+53
+51
+51
+51
+49
+47
+45
+45
+45
+47
+49
+51
+51
+52
+52
+51
+50
+48
+47
+47
+47
+47
+49
+48
+47
+60
+86
+112
+127
+141
+139
+140
+140
+138
+137
+142
+153
+159
+157
+150
+143
+136
+133
+131
+133
+131
+131
+128
+121
+114
+104
+89
+77
+74
+68
+62
+47
+48
+48
+48
+49
+49
+50
+51
+52
+52
+55
+55
+54
+53
+53
+53
+55
+55
+54
+54
+51
+50
+48
+48
+48
+47
+47
+45
+45
+43
+41
+41
+46
+47
+47
+47
+47
+47
+46
+46
+47
+47
+46
+46
+46
+46
+46
+46
+46
+46
+46
+46
+47
+47
+49
+51
+53
+53
+55
+56
+58
+59
+60
+61
+62
+62
+62
+62
+62
+61
+60
+60
+61
+60
+59
+59
+61
+61
+62
+64
+68
+70
+67
+64
+61
+60
+59
+62
+65
+70
+75
+80
+86
+92
+97
+103
+112
+120
+128
+136
+143
+145
+147
+147
+141
+139
+139
+140
+141
+141
+142
+145
+149
+149
+144
+139
+134
+131
+129
+129
+133
+134
+135
+136
+133
+132
+130
+127
+119
+119
+112
+109
+114
+114
+113
+117
+127
+132
+138
+140
+138
+135
+133
+136
+144
+149
+145
+138
+131
+127
+128
+131
+134
+139
+143
+143
+136
+127
+117
+109
+100
+94
+89
+89
+90
+88
+82
+77
+69
+65
+59
+53
+51
+50
+49
+46
+49
+48
+48
+48
+49
+51
+52
+52
+52
+51
+50
+48
+47
+45
+44
+44
+50
+50
+48
+45
+56
+83
+111
+128
+135
+134
+134
+136
+134
+132
+138
+147
+153
+150
+147
+140
+134
+130
+130
+131
+131
+130
+127
+120
+113
+104
+89
+77
+70
+64
+59
+49
+49
+49
+49
+50
+50
+52
+52
+53
+53
+56
+56
+56
+55
+55
+54
+56
+56
+55
+54
+52
+51
+50
+49
+49
+47
+48
+47
+45
+44
+43
+43
+47
+49
+47
+47
+47
+47
+46
+46
+48
+48
+47
+47
+47
+48
+48
+48
+47
+47
+48
+48
+48
+47
+49
+50
+54
+55
+57
+58
+60
+61
+62
+63
+63
+63
+64
+64
+63
+62
+61
+61
+61
+60
+59
+59
+59
+59
+60
+63
+68
+71
+74
+76
+79
+78
+74
+71
+68
+65
+66
+70
+79
+89
+99
+105
+107
+111
+119
+129
+135
+140
+141
+141
+138
+135
+134
+133
+134
+137
+140
+143
+142
+143
+140
+138
+135
+133
+134
+134
+137
+137
+136
+134
+132
+128
+126
+122
+124
+120
+117
+116
+118
+118
+117
+118
+127
+132
+138
+140
+138
+137
+136
+140
+147
+153
+151
+146
+138
+131
+129
+130
+134
+138
+143
+145
+144
+138
+130
+122
+107
+97
+92
+92
+93
+91
+85
+80
+70
+66
+58
+51
+46
+42
+40
+43
+50
+53
+53
+53
+52
+53
+51
+51
+48
+47
+44
+43
+41
+40
+38
+40
+49
+51
+46
+42
+53
+80
+109
+124
+128
+126
+127
+131
+128
+126
+128
+135
+141
+139
+136
+132
+129
+127
+127
+127
+127
+128
+125
+119
+112
+104
+89
+77
+69
+62
+57
+50
+50
+51
+51
+51
+52
+53
+53
+54
+55
+57
+58
+58
+57
+57
+57
+58
+57
+57
+56
+53
+52
+52
+52
+51
+51
+49
+49
+48
+46
+45
+45
+48
+50
+48
+48
+48
+48
+47
+47
+49
+49
+48
+48
+49
+49
+49
+49
+49
+49
+49
+49
+49
+50
+51
+51
+57
+57
+59
+60
+62
+64
+64
+65
+66
+65
+66
+65
+65
+64
+62
+62
+61
+61
+60
+59
+59
+60
+61
+63
+66
+70
+77
+84
+88
+87
+81
+75
+68
+62
+60
+64
+72
+84
+96
+101
+105
+107
+117
+125
+133
+137
+138
+136
+137
+134
+134
+133
+133
+134
+135
+137
+137
+137
+136
+136
+135
+136
+136
+137
+138
+138
+136
+133
+130
+125
+122
+120
+127
+122
+120
+120
+117
+118
+123
+123
+128
+132
+135
+137
+136
+138
+138
+140
+144
+147
+148
+143
+137
+132
+131
+131
+135
+136
+139
+143
+143
+139
+136
+127
+114
+108
+104
+102
+103
+100
+96
+92
+81
+76
+66
+57
+50
+46
+44
+45
+53
+56
+56
+55
+52
+51
+50
+48
+44
+43
+42
+40
+39
+39
+37
+40
+46
+49
+48
+46
+56
+80
+105
+118
+123
+121
+124
+127
+125
+121
+122
+127
+130
+128
+125
+125
+125
+126
+126
+125
+124
+125
+122
+117
+110
+101
+87
+78
+69
+63
+57
+52
+52
+52
+53
+53
+53
+55
+55
+56
+56
+59
+60
+60
+60
+60
+60
+60
+60
+59
+59
+56
+55
+54
+54
+53
+54
+54
+51
+50
+49
+48
+49
+50
+52
+52
+52
+50
+50
+50
+50
+51
+51
+51
+51
+50
+50
+51
+51
+51
+51
+51
+51
+53
+53
+54
+54
+59
+60
+61
+63
+65
+66
+69
+67
+68
+68
+69
+68
+67
+66
+64
+64
+62
+62
+61
+61
+61
+61
+62
+62
+66
+70
+78
+85
+90
+89
+83
+76
+68
+60
+57
+60
+68
+78
+90
+94
+102
+106
+115
+122
+130
+134
+135
+134
+130
+129
+129
+129
+131
+131
+133
+132
+132
+132
+133
+134
+136
+137
+139
+140
+138
+137
+135
+131
+127
+122
+119
+120
+127
+122
+129
+131
+117
+113
+124
+125
+127
+129
+131
+132
+133
+135
+138
+137
+130
+129
+134
+135
+136
+137
+141
+141
+138
+136
+136
+137
+135
+132
+129
+127
+125
+125
+123
+120
+120
+117
+112
+108
+99
+92
+83
+73
+66
+61
+57
+55
+57
+57
+54
+52
+49
+46
+44
+44
+41
+41
+41
+41
+42
+42
+43
+45
+44
+50
+53
+56
+66
+85
+102
+110
+116
+113
+117
+120
+119
+115
+116
+119
+122
+120
+119
+120
+121
+123
+123
+124
+121
+122
+119
+115
+109
+100
+87
+78
+68
+62
+56
+53
+53
+54
+54
+55
+55
+56
+56
+57
+58
+61
+62
+62
+62
+62
+62
+63
+63
+62
+61
+59
+58
+57
+57
+56
+56
+57
+56
+55
+52
+53
+52
+54
+54
+54
+54
+52
+52
+52
+52
+52
+52
+52
+53
+51
+51
+52
+52
+52
+52
+53
+53
+56
+56
+57
+58
+61
+62
+64
+65
+67
+68
+71
+72
+70
+70
+70
+70
+69
+67
+66
+65
+64
+64
+63
+62
+62
+63
+64
+64
+65
+68
+75
+81
+86
+85
+82
+75
+68
+63
+61
+63
+67
+73
+83
+88
+93
+100
+108
+118
+125
+130
+131
+130
+126
+125
+125
+125
+128
+131
+134
+133
+131
+131
+132
+132
+136
+136
+137
+138
+135
+134
+131
+128
+126
+124
+121
+126
+133
+138
+160
+166
+138
+124
+130
+128
+123
+122
+124
+125
+127
+130
+137
+134
+119
+117
+130
+141
+150
+159
+166
+167
+157
+150
+146
+143
+139
+134
+130
+131
+134
+136
+134
+131
+129
+126
+122
+118
+109
+104
+96
+87
+80
+72
+66
+64
+61
+60
+56
+53
+50
+47
+44
+43
+43
+44
+45
+47
+51
+52
+54
+54
+51
+60
+69
+73
+81
+93
+103
+106
+110
+107
+108
+112
+113
+111
+111
+114
+117
+114
+113
+116
+120
+122
+121
+121
+118
+119
+117
+111
+106
+99
+85
+78
+67
+64
+58
+54
+55
+55
+55
+56
+56
+57
+58
+58
+59
+62
+63
+63
+63
+64
+64
+66
+66
+65
+64
+61
+61
+60
+60
+60
+60
+60
+60
+59
+57
+57
+56
+56
+57
+56
+56
+56
+56
+54
+54
+54
+54
+53
+53
+54
+54
+55
+55
+53
+53
+56
+57
+58
+60
+61
+64
+64
+65
+67
+68
+71
+72
+73
+73
+74
+74
+74
+73
+70
+68
+66
+65
+65
+64
+64
+63
+63
+64
+64
+65
+64
+65
+67
+70
+72
+74
+74
+72
+69
+69
+69
+70
+73
+73
+76
+82
+90
+100
+110
+122
+131
+137
+139
+139
+139
+135
+130
+127
+127
+130
+136
+138
+133
+132
+132
+134
+134
+133
+132
+131
+128
+127
+126
+127
+127
+128
+129
+135
+144
+160
+203
+216
+171
+138
+136
+127
+117
+114
+113
+114
+118
+124
+132
+128
+113
+116
+138
+156
+173
+186
+194
+195
+191
+183
+173
+163
+154
+145
+139
+137
+140
+142
+139
+135
+132
+128
+122
+119
+112
+107
+103
+94
+88
+80
+72
+67
+65
+64
+59
+56
+52
+50
+46
+46
+48
+51
+54
+58
+62
+65
+69
+67
+70
+76
+86
+91
+96
+103
+105
+106
+108
+103
+102
+108
+111
+110
+110
+114
+115
+111
+111
+114
+119
+121
+120
+117
+115
+117
+115
+110
+105
+98
+84
+77
+72
+69
+63
+55
+55
+56
+56
+56
+57
+58
+58
+59
+60
+63
+64
+64
+64
+65
+65
+67
+67
+67
+66
+63
+62
+62
+61
+62
+62
+62
+62
+61
+60
+58
+59
+58
+58
+57
+57
+57
+57
+57
+55
+54
+54
+54
+54
+54
+55
+55
+55
+53
+54
+57
+59
+60
+63
+66
+66
+65
+66
+67
+69
+72
+73
+74
+74
+75
+75
+74
+74
+70
+69
+67
+66
+66
+66
+65
+64
+64
+65
+66
+66
+63
+64
+66
+69
+71
+73
+77
+78
+77
+78
+81
+81
+81
+82
+80
+86
+103
+114
+126
+137
+149
+155
+159
+159
+160
+153
+142
+133
+132
+133
+140
+143
+139
+138
+137
+136
+136
+132
+128
+125
+122
+122
+122
+125
+129
+134
+139
+146
+150
+176
+234
+252
+195
+149
+137
+120
+112
+106
+104
+106
+111
+118
+128
+130
+124
+134
+160
+183
+203
+214
+218
+218
+230
+219
+207
+195
+184
+174
+165
+162
+159
+159
+156
+152
+148
+141
+137
+133
+127
+124
+119
+112
+105
+98
+87
+83
+79
+77
+73
+68
+64
+59
+55
+54
+57
+58
+61
+65
+70
+72
+75
+72
+84
+89
+100
+103
+105
+110
+109
+108
+107
+103
+103
+109
+112
+113
+114
+117
+116
+111
+111
+114
+119
+121
+119
+116
+115
+117
+115
+111
+105
+97
+84
+77
+78
+76
+69
+57
+57
+57
+57
+57
+58
+61
+61
+61
+61
+64
+64
+65
+66
+68
+68
+69
+69
+69
+68
+68
+67
+69
+68
+66
+66
+66
+66
+66
+66
+65
+65
+65
+65
+65
+64
+64
+62
+62
+62
+60
+60
+59
+58
+56
+56
+55
+55
+57
+57
+57
+58
+60
+61
+65
+66
+67
+68
+70
+74
+75
+76
+78
+78
+78
+78
+76
+75
+73
+72
+69
+69
+66
+65
+64
+63
+63
+63
+64
+64
+60
+77
+77
+75
+84
+82
+81
+95
+91
+94
+95
+92
+94
+101
+109
+114
+137
+143
+151
+159
+159
+155
+154
+158
+166
+164
+168
+171
+165
+153
+151
+156
+148
+146
+143
+137
+136
+135
+127
+117
+117
+115
+116
+121
+133
+142
+149
+155
+198
+229
+194
+202
+224
+171
+134
+132
+109
+105
+105
+107
+107
+111
+125
+141
+145
+177
+208
+218
+222
+229
+241
+243
+243
+233
+227
+226
+224
+218
+216
+215
+196
+192
+189
+185
+181
+175
+171
+167
+157
+157
+154
+150
+145
+135
+127
+123
+117
+103
+100
+97
+79
+71
+76
+77
+72
+69
+68
+70
+70
+71
+75
+81
+89
+96
+102
+103
+107
+117
+117
+111
+108
+108
+112
+114
+115
+117
+119
+118
+114
+115
+115
+113
+115
+119
+122
+121
+120
+115
+109
+107
+105
+97
+84
+79
+79
+84
+82
+57
+57
+57
+57
+58
+59
+62
+63
+62
+62
+65
+65
+66
+67
+68
+68
+70
+69
+69
+69
+68
+68
+69
+69
+69
+69
+69
+68
+67
+67
+68
+67
+66
+66
+66
+66
+65
+65
+64
+64
+62
+60
+59
+59
+57
+56
+55
+55
+57
+57
+57
+58
+60
+62
+65
+66
+67
+69
+73
+74
+76
+76
+78
+78
+78
+78
+77
+74
+73
+72
+69
+69
+67
+66
+64
+64
+64
+64
+65
+65
+67
+73
+75
+86
+106
+116
+123
+133
+129
+131
+132
+132
+141
+152
+161
+162
+147
+148
+154
+159
+160
+156
+156
+159
+163
+155
+153
+160
+164
+167
+174
+182
+181
+176
+167
+155
+147
+142
+133
+121
+114
+124
+135
+133
+133
+149
+181
+211
+219
+221
+199
+190
+208
+179
+132
+130
+121
+101
+96
+107
+117
+119
+127
+150
+185
+210
+224
+231
+238
+249
+255
+255
+255
+243
+236
+234
+230
+224
+222
+221
+219
+216
+214
+213
+208
+206
+204
+201
+204
+203
+203
+202
+202
+201
+199
+197
+195
+177
+163
+153
+141
+132
+107
+72
+84
+77
+72
+74
+75
+75
+79
+85
+91
+99
+103
+105
+110
+122
+122
+116
+114
+112
+112
+113
+117
+119
+119
+119
+115
+120
+122
+121
+126
+131
+133
+131
+129
+122
+114
+109
+104
+96
+84
+78
+82
+86
+86
+56
+56
+56
+57
+59
+60
+63
+64
+64
+64
+67
+67
+67
+67
+68
+68
+70
+70
+70
+69
+69
+69
+71
+70
+74
+73
+72
+71
+70
+69
+70
+69
+68
+68
+68
+68
+68
+68
+68
+67
+63
+63
+60
+59
+58
+58
+57
+57
+57
+57
+58
+59
+62
+64
+66
+67
+69
+70
+73
+75
+77
+77
+78
+77
+80
+77
+76
+75
+73
+72
+69
+68
+67
+67
+65
+65
+63
+64
+64
+68
+83
+82
+105
+142
+173
+193
+203
+196
+154
+150
+149
+155
+171
+190
+203
+196
+163
+157
+160
+165
+165
+163
+164
+167
+171
+161
+152
+157
+165
+172
+178
+184
+167
+177
+185
+190
+186
+173
+150
+130
+123
+118
+122
+133
+156
+186
+215
+232
+225
+206
+205
+187
+198
+198
+148
+140
+125
+106
+104
+117
+128
+130
+143
+177
+224
+239
+238
+239
+248
+255
+255
+254
+255
+245
+240
+239
+237
+233
+236
+239
+241
+239
+239
+237
+236
+234
+233
+232
+228
+229
+228
+228
+233
+238
+242
+244
+252
+237
+225
+210
+203
+199
+166
+114
+93
+88
+87
+81
+66
+58
+63
+76
+86
+97
+101
+104
+113
+127
+126
+119
+120
+117
+114
+114
+118
+121
+122
+122
+128
+132
+138
+141
+146
+151
+152
+150
+145
+135
+122
+112
+103
+94
+84
+80
+82
+88
+89
+55
+55
+56
+57
+59
+61
+64
+65
+66
+66
+68
+68
+68
+68
+69
+69
+71
+71
+71
+70
+70
+70
+72
+72
+76
+75
+74
+73
+72
+71
+70
+69
+68
+68
+69
+69
+68
+69
+69
+69
+64
+63
+61
+60
+59
+58
+58
+58
+57
+57
+59
+59
+63
+64
+67
+68
+70
+70
+74
+75
+77
+77
+77
+77
+79
+79
+76
+75
+74
+71
+69
+68
+68
+68
+66
+64
+64
+65
+66
+70
+81
+88
+135
+189
+216
+228
+226
+201
+157
+148
+144
+152
+173
+196
+212
+203
+177
+167
+169
+172
+175
+176
+179
+180
+178
+169
+163
+164
+169
+171
+174
+173
+182
+186
+187
+186
+190
+197
+196
+190
+153
+139
+135
+157
+195
+219
+224
+218
+221
+204
+209
+198
+197
+200
+167
+144
+119
+120
+126
+130
+133
+145
+172
+213
+234
+246
+242
+242
+249
+253
+249
+243
+253
+248
+244
+246
+248
+249
+255
+255
+255
+252
+252
+249
+247
+248
+246
+245
+247
+245
+244
+245
+247
+252
+255
+255
+255
+253
+250
+239
+228
+226
+213
+180
+124
+104
+88
+80
+71
+63
+59
+65
+81
+95
+103
+111
+124
+136
+135
+125
+122
+124
+124
+122
+122
+125
+131
+136
+149
+156
+163
+166
+172
+177
+176
+171
+161
+148
+131
+115
+104
+93
+83
+80
+80
+86
+87
+54
+54
+55
+56
+58
+60
+63
+64
+66
+66
+68
+68
+68
+69
+70
+70
+70
+70
+71
+72
+72
+72
+74
+74
+76
+75
+75
+74
+74
+73
+72
+71
+69
+69
+69
+69
+69
+69
+68
+68
+64
+64
+64
+63
+60
+59
+59
+58
+59
+59
+59
+60
+63
+65
+67
+68
+71
+71
+75
+77
+77
+78
+79
+79
+79
+78
+78
+74
+73
+71
+68
+68
+68
+68
+66
+64
+65
+65
+66
+75
+91
+116
+172
+218
+229
+226
+213
+182
+167
+156
+145
+149
+171
+193
+211
+204
+177
+168
+170
+173
+178
+184
+188
+187
+172
+170
+168
+166
+170
+176
+183
+187
+200
+204
+206
+205
+211
+220
+223
+218
+193
+195
+203
+209
+215
+218
+223
+224
+217
+215
+205
+206
+190
+178
+181
+150
+123
+130
+136
+133
+147
+176
+206
+232
+231
+237
+230
+227
+227
+227
+228
+229
+240
+239
+239
+242
+245
+248
+254
+255
+255
+253
+252
+250
+251
+252
+253
+252
+253
+251
+250
+250
+250
+249
+249
+250
+255
+255
+255
+253
+238
+230
+226
+216
+186
+140
+96
+81
+86
+86
+74
+65
+82
+101
+117
+128
+142
+153
+149
+136
+130
+137
+143
+140
+135
+138
+151
+164
+178
+184
+191
+192
+194
+197
+195
+190
+176
+162
+141
+121
+105
+92
+84
+82
+80
+84
+86
+53
+53
+54
+55
+56
+58
+61
+62
+64
+64
+67
+68
+69
+69
+71
+71
+71
+71
+72
+73
+73
+73
+75
+76
+76
+75
+76
+75
+76
+75
+74
+73
+71
+71
+70
+70
+69
+69
+68
+67
+65
+65
+64
+64
+61
+60
+59
+59
+59
+59
+59
+60
+63
+65
+68
+69
+72
+74
+76
+77
+78
+78
+79
+79
+79
+78
+77
+76
+73
+71
+70
+67
+67
+66
+66
+64
+64
+65
+66
+78
+106
+149
+195
+218
+220
+219
+209
+188
+172
+159
+150
+148
+161
+179
+193
+189
+167
+162
+165
+167
+175
+184
+186
+183
+174
+173
+167
+164
+170
+182
+195
+202
+188
+203
+221
+232
+239
+239
+231
+218
+216
+222
+229
+224
+216
+214
+224
+231
+216
+221
+202
+205
+189
+174
+200
+184
+142
+135
+132
+139
+170
+209
+226
+229
+240
+239
+226
+216
+209
+209
+219
+233
+235
+238
+239
+245
+246
+246
+249
+253
+251
+248
+248
+249
+254
+255
+255
+255
+251
+251
+250
+247
+247
+244
+241
+241
+255
+251
+251
+255
+251
+243
+236
+224
+231
+194
+150
+116
+93
+82
+82
+87
+94
+114
+136
+149
+159
+166
+161
+150
+149
+158
+166
+166
+162
+166
+181
+194
+204
+209
+213
+213
+212
+213
+209
+203
+191
+176
+152
+128
+109
+96
+87
+86
+83
+86
+87
+53
+53
+53
+53
+54
+56
+58
+59
+61
+62
+65
+67
+68
+70
+72
+72
+71
+72
+73
+73
+74
+74
+77
+77
+77
+76
+77
+77
+78
+77
+78
+77
+74
+74
+73
+72
+71
+70
+68
+68
+67
+67
+65
+64
+63
+63
+60
+60
+60
+60
+60
+60
+64
+65
+68
+69
+72
+75
+77
+78
+80
+80
+79
+79
+79
+79
+77
+76
+73
+70
+69
+67
+66
+65
+65
+63
+63
+64
+64
+78
+111
+165
+190
+186
+188
+193
+191
+183
+167
+162
+155
+150
+152
+158
+164
+162
+158
+160
+162
+165
+173
+183
+184
+178
+177
+173
+168
+166
+175
+188
+195
+196
+193
+203
+213
+221
+232
+245
+253
+252
+233
+227
+220
+217
+220
+223
+229
+228
+215
+212
+207
+206
+196
+187
+199
+210
+166
+143
+139
+164
+203
+224
+232
+233
+246
+238
+225
+213
+202
+200
+211
+229
+240
+245
+251
+255
+254
+249
+249
+250
+247
+246
+246
+249
+251
+254
+255
+255
+255
+255
+255
+255
+251
+249
+247
+244
+251
+245
+249
+252
+250
+255
+255
+242
+240
+229
+211
+175
+132
+104
+105
+115
+121
+140
+163
+173
+178
+182
+178
+170
+176
+182
+189
+192
+195
+201
+213
+221
+226
+231
+233
+230
+229
+228
+224
+217
+202
+186
+162
+136
+116
+101
+92
+91
+92
+92
+94
+53
+53
+53
+53
+53
+54
+56
+57
+60
+61
+64
+66
+68
+70
+71
+72
+72
+72
+72
+74
+74
+75
+75
+78
+77
+77
+77
+77
+77
+77
+78
+78
+77
+77
+75
+74
+72
+71
+69
+68
+67
+67
+65
+65
+64
+63
+60
+60
+62
+62
+60
+61
+62
+65
+67
+68
+72
+73
+76
+77
+78
+80
+79
+79
+76
+76
+75
+76
+74
+73
+70
+67
+65
+62
+61
+60
+63
+64
+66
+83
+134
+193
+200
+174
+170
+177
+171
+171
+170
+171
+169
+163
+160
+161
+161
+158
+160
+163
+166
+166
+173
+182
+183
+176
+171
+168
+169
+172
+187
+198
+197
+188
+188
+201
+218
+227
+238
+246
+249
+247
+246
+241
+236
+232
+227
+226
+225
+222
+222
+207
+219
+205
+199
+194
+179
+209
+191
+165
+170
+205
+232
+231
+235
+246
+237
+227
+215
+207
+195
+185
+187
+199
+229
+234
+242
+249
+252
+250
+250
+251
+252
+251
+250
+249
+251
+253
+255
+255
+255
+255
+255
+251
+247
+245
+245
+243
+244
+252
+255
+243
+231
+249
+255
+255
+246
+238
+231
+220
+199
+170
+143
+126
+153
+171
+190
+197
+198
+200
+199
+195
+203
+204
+209
+215
+221
+230
+232
+237
+239
+242
+244
+240
+238
+237
+234
+228
+209
+193
+171
+145
+122
+108
+98
+96
+100
+100
+100
+50
+51
+52
+54
+56
+57
+57
+57
+59
+60
+61
+63
+65
+67
+69
+69
+72
+72
+72
+74
+75
+76
+77
+78
+77
+74
+71
+74
+78
+78
+71
+68
+78
+76
+74
+75
+77
+76
+70
+66
+69
+67
+64
+63
+64
+63
+60
+60
+67
+66
+65
+62
+63
+62
+63
+64
+66
+68
+71
+74
+76
+79
+79
+76
+70
+69
+72
+74
+75
+77
+75
+72
+67
+55
+55
+62
+62
+58
+67
+101
+189
+183
+166
+164
+167
+164
+163
+168
+162
+165
+169
+171
+172
+172
+174
+170
+164
+161
+162
+166
+170
+172
+172
+172
+169
+171
+173
+179
+189
+196
+192
+184
+199
+203
+207
+213
+219
+225
+231
+237
+240
+242
+242
+239
+234
+227
+221
+218
+219
+212
+207
+206
+197
+190
+194
+207
+200
+207
+225
+238
+240
+237
+243
+248
+235
+225
+214
+201
+187
+179
+177
+180
+202
+212
+222
+226
+235
+248
+254
+249
+253
+250
+253
+255
+253
+250
+254
+255
+255
+255
+249
+245
+244
+248
+253
+255
+255
+255
+249
+239
+229
+229
+247
+255
+255
+240
+245
+232
+198
+194
+140
+145
+171
+189
+212
+222
+221
+220
+222
+226
+231
+235
+241
+244
+245
+245
+243
+244
+248
+248
+248
+245
+242
+237
+232
+229
+214
+205
+187
+163
+139
+121
+114
+112
+123
+119
+118
+48
+49
+51
+53
+54
+55
+56
+56
+58
+59
+61
+63
+65
+67
+68
+69
+72
+72
+72
+74
+75
+76
+77
+78
+75
+75
+75
+80
+87
+89
+86
+82
+79
+77
+72
+70
+71
+72
+70
+66
+68
+65
+63
+63
+64
+64
+61
+59
+61
+61
+61
+60
+61
+62
+61
+62
+66
+68
+71
+74
+77
+79
+80
+76
+65
+63
+69
+72
+74
+74
+70
+67
+65
+60
+61
+69
+74
+80
+100
+133
+176
+171
+160
+161
+163
+158
+158
+163
+161
+167
+174
+179
+182
+183
+184
+181
+170
+165
+164
+165
+168
+171
+171
+171
+174
+171
+177
+191
+198
+193
+188
+192
+203
+207
+208
+209
+212
+216
+224
+231
+238
+244
+244
+241
+234
+225
+215
+213
+222
+217
+213
+212
+204
+193
+196
+207
+209
+218
+233
+243
+244
+240
+245
+248
+229
+218
+210
+197
+183
+174
+170
+171
+182
+198
+212
+220
+227
+239
+250
+254
+248
+247
+250
+255
+253
+249
+252
+255
+255
+255
+252
+249
+249
+252
+254
+255
+255
+255
+244
+242
+243
+246
+247
+247
+250
+248
+238
+220
+203
+182
+115
+150
+180
+206
+229
+239
+235
+233
+236
+237
+246
+251
+255
+255
+255
+255
+254
+252
+253
+252
+251
+249
+247
+243
+240
+238
+230
+220
+202
+179
+158
+142
+137
+136
+142
+137
+134
+47
+48
+49
+50
+52
+53
+55
+55
+58
+58
+60
+62
+64
+66
+67
+68
+73
+73
+74
+76
+77
+78
+78
+79
+75
+78
+84
+95
+105
+109
+108
+107
+96
+89
+79
+72
+72
+71
+69
+64
+67
+63
+60
+60
+61
+62
+62
+61
+56
+57
+59
+60
+61
+62
+63
+64
+69
+71
+73
+76
+79
+80
+80
+76
+60
+58
+62
+65
+66
+67
+63
+60
+63
+68
+75
+82
+92
+111
+139
+164
+165
+162
+159
+164
+165
+158
+158
+162
+164
+170
+177
+182
+185
+187
+190
+190
+178
+172
+169
+169
+171
+173
+173
+173
+178
+176
+185
+203
+203
+188
+186
+201
+208
+212
+212
+214
+216
+220
+227
+232
+240
+244
+244
+240
+231
+221
+212
+210
+221
+220
+218
+218
+211
+200
+197
+203
+201
+205
+217
+229
+234
+233
+236
+235
+222
+213
+205
+194
+182
+174
+171
+172
+172
+192
+212
+221
+224
+232
+247
+255
+244
+244
+249
+253
+254
+250
+251
+254
+255
+255
+255
+255
+255
+255
+255
+255
+255
+255
+254
+250
+252
+255
+250
+236
+248
+254
+218
+203
+218
+187
+103
+151
+178
+215
+245
+253
+250
+250
+249
+244
+251
+255
+255
+255
+255
+255
+255
+255
+255
+255
+255
+255
+254
+252
+250
+248
+240
+229
+211
+190
+173
+162
+157
+157
+163
+157
+153
+47
+47
+48
+49
+50
+51
+53
+54
+56
+57
+59
+61
+63
+65
+66
+67
+72
+74
+75
+77
+80
+79
+81
+79
+76
+81
+94
+109
+122
+129
+128
+128
+123
+114
+101
+89
+84
+77
+71
+66
+68
+64
+60
+59
+59
+60
+61
+59
+58
+57
+59
+62
+63
+64
+63
+65
+70
+72
+75
+77
+79
+79
+80
+76
+66
+63
+64
+65
+65
+64
+62
+60
+61
+70
+80
+88
+107
+135
+161
+174
+167
+165
+165
+170
+168
+160
+161
+164
+165
+171
+179
+185
+189
+193
+197
+196
+189
+182
+178
+174
+175
+176
+178
+179
+182
+185
+196
+203
+200
+190
+192
+205
+214
+216
+218
+219
+222
+225
+230
+236
+243
+244
+244
+239
+228
+219
+210
+208
+215
+218
+218
+220
+214
+208
+205
+210
+196
+197
+202
+216
+226
+229
+222
+214
+211
+206
+199
+190
+181
+176
+175
+177
+172
+189
+209
+217
+221
+229
+243
+253
+240
+240
+246
+254
+254
+252
+250
+252
+255
+255
+255
+255
+255
+255
+255
+255
+255
+255
+255
+252
+246
+252
+252
+243
+239
+236
+206
+220
+251
+211
+104
+113
+166
+210
+247
+255
+255
+255
+255
+249
+250
+252
+255
+255
+255
+255
+254
+255
+255
+255
+255
+255
+255
+254
+254
+253
+246
+236
+218
+201
+186
+179
+177
+176
+183
+175
+169
+49
+49
+48
+48
+49
+50
+52
+53
+55
+56
+57
+59
+61
+63
+65
+68
+73
+76
+78
+80
+82
+82
+83
+81
+79
+86
+102
+119
+134
+141
+143
+143
+142
+135
+123
+112
+105
+95
+85
+78
+75
+69
+63
+59
+57
+57
+56
+56
+54
+55
+56
+59
+62
+63
+66
+67
+71
+74
+75
+76
+77
+77
+76
+76
+77
+76
+73
+67
+63
+60
+56
+55
+57
+64
+72
+90
+119
+149
+167
+169
+170
+170
+171
+172
+169
+165
+166
+171
+167
+173
+181
+188
+193
+197
+202
+202
+197
+190
+186
+183
+183
+184
+186
+186
+187
+199
+205
+197
+193
+198
+203
+207
+219
+223
+225
+226
+227
+231
+236
+240
+245
+246
+242
+236
+226
+217
+208
+207
+214
+217
+216
+216
+215
+212
+214
+216
+214
+205
+201
+203
+214
+217
+210
+197
+197
+194
+192
+186
+183
+180
+182
+185
+181
+191
+201
+210
+219
+227
+237
+246
+236
+237
+242
+251
+255
+253
+250
+251
+251
+251
+255
+255
+255
+255
+255
+255
+255
+255
+255
+251
+245
+253
+254
+243
+231
+224
+226
+255
+255
+239
+140
+108
+166
+206
+243
+255
+255
+255
+255
+251
+252
+253
+255
+255
+255
+255
+255
+255
+255
+255
+255
+255
+255
+255
+255
+255
+253
+243
+228
+214
+205
+201
+202
+202
+201
+190
+182
+54
+52
+51
+49
+49
+50
+51
+52
+54
+55
+56
+58
+60
+62
+64
+66
+74
+77
+79
+82
+84
+84
+83
+82
+81
+90
+108
+127
+140
+150
+153
+154
+153
+148
+140
+134
+129
+120
+110
+102
+93
+86
+77
+68
+62
+59
+59
+55
+53
+52
+54
+56
+60
+63
+67
+70
+71
+72
+73
+73
+73
+72
+72
+72
+76
+76
+71
+64
+58
+53
+49
+47
+55
+55
+67
+93
+126
+149
+157
+158
+167
+170
+170
+170
+169
+169
+172
+176
+171
+178
+185
+191
+195
+200
+205
+207
+203
+198
+194
+193
+193
+194
+194
+195
+197
+209
+208
+195
+195
+208
+214
+211
+224
+228
+231
+232
+234
+237
+240
+243
+246
+245
+241
+236
+225
+218
+209
+208
+216
+217
+214
+213
+213
+212
+212
+214
+236
+225
+211
+204
+202
+204
+200
+192
+188
+188
+188
+185
+183
+184
+188
+191
+193
+193
+197
+207
+215
+221
+228
+235
+232
+234
+240
+249
+254
+252
+252
+252
+248
+249
+253
+255
+255
+255
+255
+255
+254
+255
+252
+250
+255
+255
+252
+233
+243
+231
+240
+255
+254
+236
+194
+165
+179
+206
+240
+255
+255
+255
+255
+251
+253
+252
+253
+255
+255
+255
+253
+255
+255
+255
+255
+255
+255
+255
+254
+252
+249
+242
+231
+223
+219
+221
+224
+223
+221
+207
+197
+60
+59
+56
+53
+52
+52
+53
+54
+55
+56
+57
+59
+61
+63
+65
+67
+74
+77
+80
+83
+87
+85
+85
+83
+83
+93
+110
+130
+145
+154
+159
+162
+161
+158
+153
+149
+148
+144
+137
+130
+122
+114
+102
+88
+80
+73
+70
+67
+63
+61
+59
+59
+60
+63
+67
+69
+70
+70
+69
+69
+67
+66
+65
+65
+69
+71
+71
+71
+70
+67
+63
+62
+67
+65
+75
+102
+128
+138
+140
+146
+164
+169
+171
+172
+173
+175
+176
+177
+177
+182
+189
+195
+200
+204
+210
+212
+207
+205
+203
+203
+204
+205
+204
+203
+211
+213
+210
+204
+206
+216
+218
+215
+228
+233
+236
+238
+240
+242
+244
+246
+247
+244
+240
+233
+226
+217
+210
+207
+212
+213
+211
+209
+210
+211
+210
+208
+227
+232
+231
+218
+204
+196
+191
+185
+185
+185
+185
+185
+184
+186
+192
+195
+201
+198
+201
+209
+213
+214
+216
+223
+230
+232
+237
+245
+252
+251
+251
+251
+246
+247
+249
+253
+255
+255
+255
+255
+246
+242
+244
+250
+255
+255
+247
+236
+246
+239
+227
+239
+218
+223
+222
+210
+191
+199
+230
+255
+255
+255
+255
+254
+251
+249
+248
+250
+250
+249
+250
+252
+255
+255
+255
+255
+255
+254
+252
+249
+240
+233
+228
+226
+230
+235
+241
+241
+236
+220
+208
+64
+61
+58
+55
+53
+53
+53
+54
+55
+55
+57
+59
+61
+63
+64
+66
+74
+77
+82
+86
+87
+88
+87
+84
+83
+94
+112
+130
+145
+156
+163
+167
+170
+166
+161
+160
+159
+157
+153
+149
+146
+137
+121
+106
+96
+88
+82
+79
+78
+75
+70
+64
+63
+63
+64
+65
+67
+67
+66
+66
+63
+62
+60
+59
+65
+71
+80
+89
+95
+99
+99
+101
+102
+95
+106
+130
+146
+143
+142
+150
+167
+174
+174
+175
+176
+180
+178
+176
+181
+188
+194
+200
+205
+209
+213
+216
+210
+208
+208
+209
+212
+212
+211
+211
+222
+213
+209
+214
+222
+222
+218
+220
+231
+235
+239
+241
+244
+247
+247
+247
+247
+244
+238
+233
+225
+218
+212
+207
+206
+207
+206
+207
+208
+210
+209
+206
+203
+227
+243
+235
+213
+196
+186
+181
+184
+184
+185
+185
+186
+189
+192
+196
+202
+202
+206
+213
+211
+206
+205
+214
+227
+230
+232
+242
+248
+249
+247
+250
+244
+245
+248
+251
+255
+255
+255
+255
+239
+239
+249
+253
+249
+242
+245
+253
+251
+255
+235
+243
+238
+246
+237
+223
+190
+188
+216
+249
+255
+255
+254
+255
+252
+251
+248
+249
+249
+250
+252
+253
+253
+255
+255
+255
+255
+251
+247
+243
+235
+232
+228
+232
+240
+249
+255
+254
+244
+227
+214
+66
+65
+64
+62
+60
+58
+56
+55
+54
+54
+55
+56
+59
+62
+65
+69
+73
+77
+82
+85
+87
+88
+90
+91
+84
+88
+103
+124
+141
+151
+158
+165
+170
+171
+172
+172
+170
+170
+168
+169
+159
+153
+141
+129
+116
+104
+93
+88
+88
+89
+86
+77
+67
+63
+63
+66
+62
+64
+66
+63
+60
+58
+62
+65
+70
+85
+101
+108
+119
+131
+132
+128
+137
+144
+157
+164
+162
+154
+151
+158
+167
+172
+174
+177
+179
+180
+182
+185
+186
+190
+196
+203
+209
+214
+218
+218
+215
+216
+217
+216
+216
+216
+218
+221
+230
+224
+218
+227
+254
+255
+255
+231
+229
+237
+241
+244
+244
+245
+248
+248
+247
+243
+237
+227
+218
+212
+212
+211
+204
+202
+205
+207
+210
+210
+210
+209
+218
+207
+220
+244
+229
+203
+197
+183
+183
+182
+185
+186
+189
+191
+196
+198
+199
+204
+217
+223
+212
+195
+192
+207
+222
+226
+230
+239
+241
+239
+237
+241
+249
+248
+247
+247
+252
+255
+255
+253
+245
+239
+243
+251
+255
+255
+254
+252
+255
+247
+253
+252
+234
+235
+251
+233
+198
+173
+203
+232
+249
+255
+254
+252
+246
+247
+247
+246
+248
+253
+253
+251
+255
+255
+255
+253
+255
+255
+246
+231
+228
+223
+225
+241
+252
+253
+255
+255
+249
+231
+218
+67
+66
+65
+63
+61
+59
+58
+57
+55
+55
+55
+56
+58
+61
+64
+68
+72
+76
+81
+84
+86
+87
+89
+90
+85
+87
+101
+121
+138
+148
+155
+163
+171
+172
+174
+175
+176
+175
+175
+175
+169
+162
+152
+140
+128
+117
+105
+99
+96
+96
+93
+86
+77
+70
+66
+65
+60
+65
+70
+67
+65
+68
+79
+88
+102
+116
+130
+138
+149
+160
+165
+164
+172
+180
+185
+181
+173
+168
+168
+169
+167
+168
+171
+174
+176
+178
+181
+184
+187
+194
+202
+211
+217
+222
+223
+223
+225
+223
+223
+225
+229
+232
+231
+230
+229
+230
+228
+220
+213
+216
+235
+255
+241
+238
+234
+238
+248
+255
+254
+246
+250
+245
+239
+231
+222
+214
+212
+207
+203
+200
+202
+205
+207
+208
+209
+208
+211
+207
+212
+229
+229
+219
+205
+183
+188
+187
+189
+190
+190
+192
+194
+196
+200
+203
+213
+220
+210
+195
+191
+204
+219
+223
+229
+235
+237
+235
+233
+236
+247
+248
+249
+250
+252
+255
+255
+254
+241
+245
+255
+255
+255
+253
+250
+249
+249
+242
+249
+249
+236
+241
+247
+217
+182
+153
+185
+218
+239
+254
+251
+253
+248
+247
+247
+245
+248
+253
+254
+252
+253
+254
+252
+252
+255
+255
+245
+234
+229
+222
+223
+239
+252
+255
+255
+255
+248
+232
+221
+69
+69
+67
+65
+63
+61
+60
+59
+56
+56
+55
+56
+58
+61
+63
+67
+71
+74
+78
+82
+84
+87
+89
+89
+87
+88
+98
+115
+133
+144
+152
+160
+170
+173
+175
+177
+179
+180
+181
+181
+175
+172
+163
+153
+142
+131
+120
+115
+107
+105
+99
+93
+86
+78
+69
+64
+56
+65
+75
+76
+81
+90
+112
+130
+152
+165
+175
+178
+184
+192
+194
+192
+193
+207
+207
+195
+183
+180
+178
+173
+175
+176
+178
+180
+183
+187
+192
+196
+196
+203
+211
+217
+223
+225
+224
+223
+220
+217
+216
+222
+230
+236
+233
+228
+227
+219
+216
+219
+212
+204
+214
+233
+245
+242
+239
+240
+246
+250
+252
+248
+240
+236
+232
+227
+220
+216
+213
+209
+205
+203
+205
+208
+210
+211
+212
+212
+209
+214
+213
+213
+229
+237
+217
+194
+192
+191
+192
+191
+193
+192
+192
+192
+198
+199
+207
+216
+210
+198
+192
+199
+214
+216
+221
+228
+229
+226
+226
+229
+242
+246
+253
+254
+252
+250
+251
+255
+248
+255
+255
+255
+255
+252
+254
+255
+250
+247
+248
+242
+231
+234
+229
+197
+160
+126
+155
+195
+223
+241
+244
+255
+249
+249
+247
+245
+248
+253
+255
+252
+252
+252
+250
+251
+255
+255
+249
+239
+230
+220
+221
+238
+253
+255
+255
+255
+248
+233
+224
+73
+72
+70
+68
+66
+64
+63
+62
+58
+57
+57
+57
+58
+60
+62
+64
+69
+73
+76
+79
+82
+85
+87
+87
+88
+88
+94
+112
+128
+140
+149
+157
+168
+169
+173
+176
+177
+178
+180
+180
+175
+171
+165
+159
+151
+140
+130
+125
+117
+112
+102
+95
+89
+81
+71
+65
+61
+72
+84
+96
+110
+128
+150
+170
+189
+201
+203
+201
+198
+199
+198
+196
+197
+216
+223
+208
+195
+194
+186
+175
+173
+173
+174
+179
+182
+188
+195
+200
+211
+215
+218
+220
+222
+222
+221
+219
+211
+210
+211
+216
+225
+227
+225
+220
+220
+208
+205
+217
+226
+220
+208
+203
+233
+243
+253
+252
+244
+241
+245
+251
+241
+235
+228
+222
+218
+215
+214
+211
+211
+210
+214
+216
+218
+219
+220
+220
+210
+230
+229
+206
+223
+243
+223
+213
+200
+196
+195
+195
+194
+194
+193
+190
+194
+194
+200
+207
+206
+198
+191
+193
+206
+209
+213
+219
+221
+217
+218
+220
+235
+243
+252
+255
+250
+245
+245
+253
+255
+255
+255
+255
+250
+252
+255
+255
+255
+250
+244
+236
+224
+212
+200
+177
+141
+104
+130
+172
+206
+229
+239
+255
+251
+249
+248
+245
+248
+255
+255
+254
+251
+250
+249
+253
+255
+255
+253
+247
+235
+223
+222
+237
+254
+255
+255
+255
+247
+234
+228
+78
+77
+76
+74
+72
+70
+68
+67
+63
+62
+61
+61
+61
+62
+64
+63
+67
+69
+75
+78
+81
+82
+86
+86
+90
+86
+91
+108
+126
+138
+146
+154
+166
+169
+173
+175
+176
+176
+176
+175
+171
+168
+164
+160
+154
+147
+138
+134
+131
+123
+109
+100
+95
+89
+82
+78
+87
+95
+109
+129
+152
+172
+188
+202
+214
+223
+222
+215
+208
+203
+198
+194
+211
+225
+228
+215
+205
+203
+194
+182
+183
+184
+186
+189
+195
+202
+208
+213
+217
+218
+219
+217
+217
+217
+218
+215
+212
+215
+218
+221
+223
+222
+221
+220
+214
+217
+215
+207
+205
+210
+213
+212
+216
+230
+248
+253
+249
+245
+246
+247
+247
+237
+226
+218
+215
+215
+217
+217
+227
+228
+226
+226
+224
+223
+220
+218
+209
+239
+248
+211
+209
+230
+220
+230
+207
+202
+198
+197
+196
+196
+195
+192
+190
+190
+195
+199
+199
+194
+190
+188
+201
+202
+206
+213
+215
+213
+211
+215
+233
+240
+252
+255
+252
+242
+243
+252
+255
+255
+254
+244
+243
+250
+253
+249
+253
+245
+239
+236
+221
+192
+168
+156
+127
+89
+110
+150
+190
+223
+238
+254
+254
+252
+249
+246
+249
+255
+255
+254
+253
+250
+250
+254
+255
+255
+255
+255
+242
+229
+225
+240
+255
+255
+255
+255
+246
+237
+232
+81
+80
+79
+77
+75
+73
+71
+71
+66
+65
+64
+63
+63
+63
+65
+64
+66
+69
+75
+77
+80
+82
+85
+85
+89
+85
+90
+105
+124
+137
+147
+154
+166
+169
+172
+173
+174
+174
+173
+173
+169
+167
+164
+162
+159
+154
+149
+146
+146
+137
+124
+115
+111
+109
+105
+106
+121
+130
+142
+163
+187
+205
+214
+218
+224
+228
+224
+217
+210
+204
+199
+198
+227
+229
+224
+211
+206
+206
+200
+190
+195
+195
+197
+201
+206
+209
+215
+218
+214
+213
+214
+213
+214
+216
+219
+218
+219
+221
+224
+223
+221
+220
+220
+219
+210
+221
+218
+205
+198
+206
+210
+205
+204
+212
+226
+243
+255
+255
+254
+243
+234
+225
+216
+212
+215
+222
+228
+233
+239
+240
+238
+232
+227
+220
+215
+209
+205
+231
+255
+219
+200
+215
+211
+234
+217
+210
+203
+198
+198
+198
+195
+193
+187
+187
+190
+192
+191
+189
+188
+187
+195
+196
+200
+208
+211
+208
+210
+213
+233
+238
+251
+255
+255
+245
+245
+254
+255
+255
+245
+238
+241
+247
+240
+227
+243
+245
+241
+241
+238
+206
+169
+151
+117
+82
+97
+132
+177
+221
+239
+253
+254
+252
+250
+248
+252
+255
+255
+255
+255
+248
+250
+255
+255
+255
+255
+255
+250
+238
+234
+245
+255
+255
+255
+255
+249
+242
+238
+83
+82
+81
+79
+77
+75
+74
+73
+69
+68
+66
+65
+64
+65
+65
+64
+65
+67
+73
+77
+79
+82
+85
+85
+87
+82
+88
+106
+125
+137
+146
+152
+164
+166
+171
+171
+172
+173
+172
+172
+168
+166
+164
+163
+161
+160
+157
+155
+153
+146
+139
+134
+131
+132
+131
+136
+143
+154
+169
+187
+207
+224
+232
+232
+228
+222
+216
+210
+202
+194
+191
+195
+226
+223
+217
+216
+218
+216
+210
+200
+192
+190
+191
+192
+194
+195
+198
+198
+206
+208
+209
+212
+214
+217
+221
+220
+222
+219
+220
+219
+219
+218
+216
+215
+213
+211
+208
+207
+210
+209
+202
+192
+200
+202
+213
+231
+250
+255
+255
+247
+234
+225
+217
+215
+220
+227
+233
+240
+246
+248
+244
+237
+228
+222
+213
+207
+201
+209
+250
+228
+200
+208
+203
+228
+228
+220
+209
+201
+198
+197
+194
+191
+186
+188
+189
+188
+186
+186
+189
+190
+188
+188
+192
+200
+204
+202
+204
+208
+232
+236
+248
+255
+255
+247
+247
+253
+249
+244
+233
+227
+234
+242
+234
+222
+246
+255
+247
+238
+249
+239
+196
+163
+106
+73
+88
+117
+165
+220
+242
+249
+255
+255
+252
+249
+252
+255
+255
+255
+254
+247
+247
+253
+255
+255
+255
+255
+255
+246
+242
+251
+255
+254
+254
+255
+253
+248
+246
+86
+84
+83
+80
+79
+76
+76
+74
+72
+70
+69
+66
+66
+65
+67
+65
+67
+68
+74
+77
+79
+81
+84
+85
+85
+81
+87
+106
+126
+140
+147
+153
+159
+164
+166
+169
+169
+169
+169
+169
+165
+163
+163
+162
+164
+165
+165
+163
+152
+150
+148
+148
+149
+152
+158
+168
+164
+178
+193
+206
+218
+228
+235
+235
+231
+223
+216
+209
+199
+191
+189
+193
+225
+221
+221
+230
+236
+230
+219
+207
+205
+200
+201
+199
+198
+195
+194
+194
+198
+203
+206
+211
+216
+217
+219
+219
+228
+222
+218
+218
+223
+223
+219
+213
+216
+206
+202
+208
+206
+199
+202
+212
+200
+206
+215
+222
+230
+238
+246
+251
+255
+250
+242
+236
+234
+231
+229
+230
+244
+248
+244
+239
+232
+224
+217
+211
+198
+192
+244
+235
+207
+212
+203
+223
+234
+224
+211
+201
+198
+198
+195
+190
+190
+193
+192
+187
+183
+184
+189
+190
+181
+179
+184
+193
+197
+197
+200
+203
+229
+230
+241
+254
+254
+243
+240
+246
+248
+241
+229
+223
+233
+249
+247
+239
+253
+255
+245
+223
+246
+255
+211
+164
+96
+69
+82
+107
+156
+220
+244
+246
+255
+255
+253
+251
+252
+255
+255
+254
+250
+242
+242
+249
+253
+250
+254
+255
+255
+252
+248
+254
+255
+253
+253
+255
+255
+252
+251
+88
+87
+87
+85
+84
+82
+82
+80
+77
+75
+75
+72
+72
+71
+72
+70
+71
+71
+74
+78
+82
+85
+85
+86
+88
+85
+90
+107
+123
+137
+145
+152
+166
+167
+165
+164
+162
+163
+164
+164
+161
+161
+161
+164
+167
+172
+174
+171
+161
+156
+149
+152
+166
+180
+180
+179
+186
+205
+219
+227
+228
+227
+223
+223
+226
+221
+219
+200
+202
+202
+186
+219
+230
+233
+235
+232
+230
+225
+219
+212
+207
+200
+202
+209
+205
+191
+184
+189
+191
+195
+200
+203
+209
+212
+219
+224
+231
+224
+219
+222
+230
+231
+225
+215
+209
+206
+203
+201
+201
+203
+206
+207
+202
+207
+209
+210
+210
+213
+215
+220
+224
+230
+235
+235
+233
+231
+232
+237
+246
+246
+239
+236
+234
+227
+217
+208
+195
+196
+231
+233
+203
+223
+197
+218
+225
+220
+212
+204
+200
+198
+199
+200
+197
+194
+190
+188
+187
+186
+186
+183
+180
+181
+185
+187
+187
+190
+192
+196
+239
+245
+234
+244
+251
+236
+244
+255
+255
+251
+234
+226
+229
+237
+243
+245
+255
+255
+241
+241
+214
+248
+189
+133
+97
+74
+77
+115
+165
+205
+237
+255
+255
+255
+252
+251
+253
+254
+255
+251
+239
+229
+231
+240
+248
+252
+253
+255
+255
+255
+255
+255
+254
+252
+252
+251
+253
+255
+255
+89
+88
+88
+86
+85
+84
+83
+82
+78
+77
+76
+75
+74
+74
+74
+73
+71
+72
+76
+79
+82
+83
+86
+84
+88
+85
+89
+107
+123
+134
+141
+150
+161
+163
+161
+161
+160
+160
+162
+161
+160
+160
+158
+161
+164
+166
+166
+163
+163
+160
+160
+165
+177
+188
+189
+191
+204
+220
+230
+233
+230
+225
+219
+218
+224
+218
+218
+203
+204
+202
+193
+229
+230
+232
+234
+231
+226
+219
+213
+207
+212
+198
+197
+204
+204
+193
+184
+183
+185
+191
+198
+203
+209
+216
+225
+228
+229
+226
+225
+225
+228
+226
+221
+213
+211
+205
+201
+200
+204
+206
+207
+208
+213
+214
+211
+207
+201
+199
+203
+207
+216
+222
+227
+230
+230
+230
+230
+232
+236
+237
+236
+232
+224
+219
+213
+210
+213
+187
+214
+208
+217
+235
+218
+216
+231
+226
+220
+212
+205
+201
+200
+199
+200
+196
+191
+189
+189
+186
+185
+182
+178
+180
+183
+184
+186
+189
+193
+197
+235
+242
+231
+240
+245
+232
+241
+254
+255
+255
+242
+228
+228
+239
+253
+255
+253
+255
+235
+237
+215
+242
+178
+118
+94
+78
+83
+117
+169
+214
+246
+255
+255
+255
+253
+251
+250
+251
+250
+246
+237
+227
+227
+235
+244
+249
+252
+255
+255
+255
+255
+254
+249
+248
+250
+250
+249
+251
+254
+92
+91
+91
+89
+88
+87
+86
+86
+83
+82
+81
+79
+79
+79
+79
+77
+74
+74
+77
+80
+83
+86
+86
+84
+87
+86
+90
+107
+121
+133
+139
+146
+153
+155
+155
+155
+157
+158
+160
+160
+160
+157
+155
+156
+156
+157
+156
+155
+153
+158
+168
+178
+191
+198
+197
+194
+209
+218
+223
+225
+225
+225
+223
+223
+224
+215
+213
+207
+202
+195
+196
+233
+224
+228
+232
+227
+220
+214
+209
+204
+213
+196
+190
+197
+205
+198
+187
+183
+186
+191
+199
+207
+215
+222
+230
+233
+217
+218
+221
+223
+223
+222
+220
+217
+198
+192
+187
+186
+191
+191
+191
+193
+227
+229
+222
+213
+204
+200
+200
+204
+210
+213
+215
+217
+219
+220
+219
+220
+219
+223
+224
+220
+213
+208
+208
+209
+212
+194
+231
+210
+218
+222
+232
+240
+237
+231
+227
+221
+214
+207
+202
+197
+196
+192
+188
+185
+185
+183
+181
+178
+176
+177
+180
+181
+183
+185
+190
+195
+220
+234
+228
+240
+246
+231
+236
+245
+228
+240
+240
+235
+235
+242
+254
+255
+253
+252
+231
+232
+217
+237
+170
+108
+89
+79
+87
+119
+173
+225
+255
+255
+255
+255
+252
+250
+251
+251
+249
+244
+233
+222
+220
+225
+233
+239
+245
+252
+253
+255
+255
+249
+241
+239
+243
+247
+251
+252
+255
+92
+92
+91
+90
+89
+89
+88
+88
+85
+84
+83
+82
+82
+82
+82
+80
+76
+75
+79
+82
+84
+87
+87
+87
+86
+85
+92
+106
+121
+130
+138
+143
+148
+149
+149
+150
+152
+152
+155
+155
+156
+152
+150
+149
+147
+147
+146
+145
+136
+148
+168
+184
+199
+207
+210
+208
+217
+218
+218
+220
+222
+225
+229
+229
+227
+214
+209
+209
+198
+186
+197
+234
+221
+227
+230
+227
+219
+211
+208
+206
+207
+194
+187
+192
+199
+196
+189
+184
+189
+194
+203
+210
+217
+224
+232
+235
+217
+218
+222
+224
+225
+225
+220
+217
+202
+199
+195
+192
+192
+195
+198
+208
+236
+237
+228
+217
+207
+199
+200
+201
+207
+208
+207
+209
+212
+214
+212
+209
+211
+211
+211
+208
+205
+202
+204
+204
+204
+207
+244
+224
+210
+210
+230
+251
+255
+255
+255
+246
+231
+213
+199
+189
+196
+192
+187
+184
+183
+181
+178
+176
+175
+173
+176
+176
+177
+182
+188
+192
+203
+223
+226
+244
+248
+230
+228
+232
+218
+234
+239
+236
+240
+249
+255
+255
+254
+248
+229
+229
+218
+230
+168
+106
+85
+83
+92
+121
+176
+231
+255
+255
+255
+252
+251
+250
+249
+246
+242
+234
+219
+208
+205
+209
+217
+223
+233
+242
+244
+249
+251
+244
+234
+231
+235
+240
+251
+251
+254
+92
+92
+91
+91
+90
+89
+89
+89
+87
+86
+85
+85
+84
+85
+85
+83
+79
+79
+81
+83
+85
+88
+89
+88
+85
+85
+92
+104
+117
+124
+133
+140
+141
+142
+142
+144
+146
+147
+148
+147
+149
+146
+142
+137
+133
+129
+126
+129
+128
+145
+170
+193
+214
+225
+229
+230
+226
+220
+216
+216
+220
+227
+236
+237
+230
+215
+208
+208
+191
+179
+200
+224
+220
+225
+227
+225
+218
+212
+209
+207
+199
+192
+189
+189
+191
+191
+189
+189
+194
+199
+207
+213
+219
+224
+231
+235
+231
+230
+229
+232
+233
+231
+222
+214
+205
+205
+201
+197
+194
+196
+206
+222
+235
+237
+228
+216
+204
+198
+196
+197
+203
+203
+204
+206
+212
+212
+211
+208
+208
+202
+197
+196
+198
+199
+199
+199
+205
+205
+216
+225
+212
+228
+224
+223
+215
+214
+222
+229
+234
+234
+232
+228
+203
+196
+190
+184
+183
+180
+176
+174
+172
+172
+172
+172
+173
+177
+183
+186
+198
+222
+226
+240
+244
+229
+229
+232
+251
+254
+241
+229
+234
+252
+255
+255
+254
+245
+232
+228
+221
+226
+172
+115
+93
+94
+104
+129
+179
+232
+255
+255
+254
+251
+249
+247
+244
+237
+227
+218
+201
+191
+187
+192
+200
+207
+217
+227
+235
+243
+247
+242
+234
+231
+233
+238
+241
+240
+242
+91
+91
+91
+90
+90
+89
+89
+89
+88
+88
+87
+86
+86
+87
+87
+88
+81
+81
+83
+85
+88
+88
+89
+88
+87
+85
+89
+101
+110
+117
+126
+131
+133
+132
+135
+137
+139
+140
+141
+141
+144
+139
+131
+126
+120
+114
+108
+111
+131
+148
+175
+203
+227
+239
+243
+244
+235
+225
+217
+215
+222
+229
+240
+240
+228
+215
+204
+206
+186
+176
+201
+213
+216
+218
+219
+218
+216
+212
+205
+203
+192
+193
+192
+190
+188
+187
+189
+192
+196
+202
+210
+215
+220
+225
+228
+232
+234
+234
+234
+240
+246
+247
+240
+230
+219
+216
+215
+210
+209
+211
+220
+235
+237
+238
+230
+220
+209
+202
+200
+201
+198
+201
+206
+211
+218
+221
+221
+216
+211
+201
+194
+192
+195
+198
+197
+197
+204
+205
+205
+230
+219
+239
+227
+218
+213
+210
+213
+214
+210
+204
+198
+192
+206
+198
+188
+181
+177
+175
+171
+170
+171
+171
+172
+172
+171
+173
+178
+181
+201
+224
+224
+234
+238
+230
+240
+246
+255
+255
+241
+231
+240
+255
+255
+255
+253
+244
+237
+229
+222
+220
+180
+133
+113
+111
+121
+141
+182
+223
+249
+252
+255
+250
+244
+238
+230
+220
+208
+197
+178
+172
+172
+178
+185
+190
+201
+210
+224
+232
+240
+241
+236
+233
+232
+234
+232
+230
+229
+91
+91
+91
+91
+90
+90
+90
+90
+89
+89
+88
+88
+88
+89
+89
+89
+83
+84
+85
+88
+89
+90
+90
+89
+89
+85
+88
+95
+100
+106
+115
+121
+122
+122
+127
+130
+133
+135
+136
+136
+136
+131
+125
+121
+115
+110
+105
+111
+132
+151
+179
+210
+236
+246
+251
+252
+240
+231
+222
+219
+224
+231
+240
+239
+221
+212
+200
+201
+180
+177
+206
+201
+206
+208
+207
+208
+211
+207
+200
+195
+190
+195
+194
+191
+189
+190
+191
+193
+196
+203
+211
+217
+221
+225
+228
+234
+235
+241
+248
+253
+255
+255
+255
+253
+250
+246
+243
+243
+246
+247
+252
+254
+246
+244
+237
+227
+217
+208
+206
+206
+203
+209
+217
+223
+226
+228
+229
+223
+217
+207
+201
+196
+194
+194
+198
+200
+201
+211
+225
+235
+222
+224
+235
+232
+216
+213
+215
+215
+213
+210
+205
+201
+214
+204
+191
+180
+176
+172
+171
+169
+172
+173
+174
+173
+171
+171
+173
+177
+192
+218
+222
+232
+240
+234
+245
+253
+241
+248
+245
+237
+248
+255
+255
+255
+252
+242
+241
+231
+222
+217
+189
+152
+129
+123
+130
+145
+172
+203
+224
+233
+236
+227
+215
+205
+196
+187
+180
+172
+156
+152
+156
+163
+170
+175
+184
+194
+206
+216
+228
+235
+236
+233
+229
+226
+223
+218
+213
+91
+90
+90
+90
+90
+90
+89
+89
+90
+89
+89
+88
+88
+89
+90
+90
+86
+86
+88
+89
+90
+90
+90
+90
+91
+87
+87
+92
+94
+98
+106
+113
+116
+116
+120
+125
+129
+132
+133
+135
+130
+127
+125
+122
+122
+120
+116
+124
+133
+152
+178
+211
+237
+246
+252
+253
+244
+235
+228
+225
+227
+230
+237
+234
+214
+209
+197
+195
+178
+179
+209
+195
+201
+199
+197
+200
+205
+204
+195
+188
+192
+196
+195
+193
+194
+195
+194
+195
+196
+202
+212
+217
+221
+225
+229
+234
+245
+254
+255
+255
+255
+255
+255
+254
+254
+246
+242
+247
+255
+255
+252
+244
+246
+243
+237
+230
+218
+212
+209
+208
+212
+221
+230
+235
+235
+232
+232
+226
+223
+215
+211
+203
+196
+194
+200
+207
+206
+212
+230
+223
+224
+210
+236
+229
+213
+210
+210
+207
+206
+202
+200
+197
+227
+216
+202
+190
+183
+181
+181
+181
+175
+177
+177
+177
+175
+173
+173
+174
+177
+208
+220
+236
+244
+238
+245
+248
+255
+255
+250
+235
+241
+255
+255
+255
+250
+243
+245
+232
+220
+215
+196
+164
+134
+126
+129
+141
+161
+180
+200
+213
+202
+191
+176
+166
+157
+154
+150
+145
+140
+138
+143
+152
+158
+162
+170
+179
+190
+201
+216
+227
+232
+230
+223
+218
+211
+206
+200
+90
+90
+90
+90
+90
+90
+90
+90
+88
+88
+88
+89
+89
+90
+90
+90
+90
+90
+90
+91
+93
+94
+92
+92
+89
+87
+87
+88
+90
+93
+96
+96
+103
+106
+112
+114
+120
+129
+137
+138
+137
+140
+138
+135
+139
+145
+139
+137
+143
+161
+179
+202
+220
+231
+243
+254
+246
+241
+236
+233
+233
+233
+233
+226
+207
+197
+190
+183
+176
+178
+192
+210
+199
+212
+205
+204
+214
+199
+181
+187
+186
+193
+195
+194
+192
+194
+197
+199
+203
+208
+214
+216
+218
+224
+236
+245
+246
+247
+248
+249
+250
+252
+252
+252
+251
+247
+248
+255
+255
+255
+255
+255
+254
+238
+229
+227
+221
+211
+209
+218
+226
+232
+238
+242
+242
+239
+238
+229
+220
+209
+210
+236
+187
+196
+223
+200
+205
+222
+232
+226
+216
+218
+226
+229
+223
+213
+207
+203
+204
+205
+203
+197
+236
+224
+200
+185
+186
+184
+177
+180
+176
+176
+174
+175
+176
+178
+180
+179
+176
+186
+214
+236
+241
+246
+251
+245
+255
+253
+242
+244
+253
+255
+255
+255
+255
+241
+245
+239
+217
+208
+190
+158
+134
+125
+126
+135
+148
+158
+160
+156
+146
+138
+128
+122
+121
+124
+129
+131
+132
+134
+140
+147
+149
+152
+157
+162
+167
+175
+189
+206
+220
+224
+218
+211
+203
+192
+184
+90
+90
+90
+90
+90
+90
+90
+90
+88
+88
+88
+89
+89
+90
+90
+90
+90
+90
+92
+93
+93
+94
+92
+92
+93
+91
+91
+89
+90
+92
+95
+94
+97
+101
+107
+110
+117
+127
+135
+139
+143
+145
+143
+143
+154
+165
+158
+154
+156
+166
+175
+192
+208
+218
+231
+243
+245
+245
+244
+241
+236
+231
+225
+216
+199
+189
+182
+177
+171
+174
+189
+208
+218
+220
+212
+208
+213
+205
+187
+178
+189
+194
+196
+196
+196
+198
+199
+202
+207
+207
+212
+218
+227
+234
+239
+240
+231
+231
+235
+240
+246
+250
+254
+255
+251
+248
+250
+255
+255
+255
+255
+252
+244
+245
+244
+228
+218
+219
+221
+218
+241
+244
+247
+246
+246
+248
+249
+244
+219
+218
+215
+228
+228
+206
+209
+193
+212
+225
+232
+224
+216
+217
+221
+221
+212
+207
+201
+199
+200
+202
+202
+198
+237
+225
+201
+186
+194
+195
+191
+194
+191
+190
+189
+187
+184
+181
+180
+176
+180
+187
+211
+232
+239
+246
+254
+249
+255
+253
+244
+245
+254
+255
+255
+255
+255
+242
+246
+242
+221
+208
+183
+149
+127
+117
+120
+127
+138
+141
+139
+133
+112
+108
+104
+103
+107
+113
+121
+124
+132
+133
+139
+142
+146
+148
+151
+155
+155
+161
+172
+188
+205
+213
+212
+206
+197
+186
+177
+92
+92
+92
+92
+92
+92
+92
+92
+90
+90
+90
+91
+91
+92
+92
+92
+92
+92
+93
+93
+93
+94
+94
+92
+95
+93
+92
+91
+90
+91
+93
+92
+93
+98
+101
+105
+113
+125
+132
+137
+152
+155
+156
+160
+177
+189
+183
+177
+181
+186
+182
+189
+200
+210
+219
+228
+241
+247
+249
+247
+239
+229
+215
+205
+192
+184
+177
+173
+169
+173
+187
+207
+217
+215
+217
+218
+220
+221
+206
+181
+190
+193
+196
+198
+201
+200
+201
+204
+207
+207
+211
+223
+238
+244
+241
+233
+224
+221
+226
+230
+234
+238
+239
+242
+242
+239
+240
+247
+253
+252
+251
+248
+244
+241
+242
+239
+238
+238
+233
+229
+240
+243
+246
+246
+245
+245
+243
+237
+220
+226
+218
+223
+255
+229
+209
+206
+217
+223
+224
+219
+213
+214
+214
+210
+200
+195
+194
+196
+197
+198
+198
+197
+235
+225
+201
+191
+203
+209
+206
+210
+216
+215
+212
+207
+201
+195
+188
+182
+185
+188
+207
+227
+237
+248
+255
+253
+255
+252
+245
+246
+254
+255
+255
+255
+255
+242
+245
+242
+224
+203
+167
+130
+110
+104
+109
+116
+123
+125
+120
+113
+96
+95
+97
+101
+110
+117
+125
+128
+132
+135
+139
+142
+140
+143
+146
+148
+147
+149
+154
+168
+184
+196
+200
+198
+183
+169
+159
+91
+91
+91
+91
+91
+91
+91
+91
+90
+90
+90
+91
+91
+92
+92
+92
+93
+93
+93
+94
+94
+94
+94
+94
+94
+94
+93
+91
+92
+91
+92
+91
+94
+98
+100
+103
+111
+122
+132
+136
+155
+166
+175
+184
+200
+211
+204
+198
+216
+217
+209
+203
+201
+204
+211
+222
+238
+245
+251
+249
+240
+226
+209
+197
+191
+182
+175
+171
+170
+174
+188
+206
+213
+213
+224
+229
+225
+232
+223
+191
+193
+190
+192
+196
+201
+202
+203
+206
+205
+210
+217
+229
+241
+245
+240
+228
+222
+221
+224
+228
+231
+233
+236
+236
+232
+230
+234
+240
+245
+246
+250
+251
+253
+228
+229
+255
+255
+255
+242
+244
+232
+237
+241
+244
+241
+234
+225
+215
+216
+218
+212
+229
+255
+245
+221
+229
+219
+218
+213
+210
+209
+208
+205
+198
+190
+185
+187
+191
+192
+191
+192
+197
+229
+220
+202
+199
+215
+222
+218
+223
+231
+233
+230
+225
+217
+208
+200
+193
+187
+187
+203
+224
+236
+250
+255
+255
+252
+250
+245
+247
+255
+255
+255
+254
+250
+240
+241
+240
+225
+195
+146
+111
+95
+92
+100
+108
+116
+118
+114
+111
+109
+108
+111
+117
+123
+129
+132
+135
+134
+136
+139
+140
+138
+138
+139
+144
+145
+143
+144
+154
+170
+187
+197
+198
+177
+161
+151
+91
+91
+91
+91
+91
+91
+91
+91
+90
+90
+90
+91
+91
+92
+92
+92
+93
+94
+94
+94
+94
+95
+94
+94
+94
+94
+94
+92
+94
+93
+94
+94
+98
+99
+99
+101
+108
+120
+127
+131
+148
+172
+194
+206
+218
+223
+218
+216
+236
+242
+233
+219
+205
+202
+210
+219
+234
+242
+248
+246
+237
+222
+205
+192
+189
+181
+174
+171
+170
+174
+187
+204
+225
+226
+238
+235
+222
+227
+230
+213
+200
+192
+188
+193
+200
+201
+203
+208
+206
+215
+224
+233
+237
+237
+235
+229
+223
+223
+229
+235
+241
+244
+246
+244
+235
+232
+235
+240
+242
+245
+252
+255
+245
+229
+238
+255
+255
+255
+245
+247
+238
+237
+237
+233
+227
+219
+206
+199
+203
+199
+208
+242
+246
+242
+219
+226
+220
+212
+206
+205
+207
+207
+202
+194
+185
+179
+181
+184
+185
+182
+188
+198
+219
+217
+206
+208
+225
+231
+227
+231
+235
+238
+235
+231
+225
+216
+208
+200
+190
+186
+200
+220
+235
+251
+255
+255
+247
+248
+245
+248
+254
+255
+255
+255
+247
+241
+240
+238
+227
+188
+131
+98
+92
+91
+102
+110
+116
+120
+121
+119
+121
+120
+122
+124
+129
+132
+133
+134
+137
+139
+138
+138
+136
+135
+137
+139
+143
+140
+141
+151
+170
+191
+203
+207
+188
+168
+156
+90
+90
+90
+90
+90
+90
+90
+90
+90
+90
+90
+91
+91
+92
+92
+93
+94
+94
+94
+95
+94
+95
+94
+94
+93
+93
+94
+95
+95
+96
+97
+98
+101
+101
+97
+98
+104
+116
+123
+125
+143
+174
+203
+218
+227
+232
+230
+228
+242
+252
+244
+227
+209
+203
+209
+217
+230
+235
+239
+239
+231
+218
+201
+190
+186
+177
+169
+168
+170
+176
+188
+202
+232
+233
+235
+229
+218
+222
+238
+244
+218
+201
+190
+194
+199
+200
+203
+210
+209
+218
+230
+233
+234
+232
+234
+235
+241
+243
+247
+250
+251
+253
+250
+247
+244
+241
+242
+243
+242
+244
+254
+255
+230
+248
+255
+255
+252
+250
+244
+233
+243
+234
+221
+210
+202
+194
+189
+188
+196
+192
+217
+250
+221
+225
+207
+207
+224
+212
+202
+202
+206
+205
+203
+196
+180
+173
+175
+179
+177
+175
+186
+202
+214
+216
+212
+215
+231
+236
+232
+237
+242
+244
+242
+239
+232
+226
+218
+210
+194
+186
+197
+215
+231
+250
+255
+255
+248
+249
+246
+247
+252
+253
+255
+255
+245
+244
+242
+239
+229
+182
+121
+94
+96
+97
+110
+118
+123
+126
+129
+130
+128
+125
+124
+125
+128
+130
+131
+133
+137
+139
+137
+136
+133
+133
+135
+137
+139
+135
+140
+153
+175
+198
+213
+217
+194
+172
+155
+90
+90
+90
+90
+90
+90
+90
+90
+90
+90
+90
+91
+91
+92
+92
+93
+94
+96
+94
+95
+94
+95
+94
+94
+94
+95
+96
+97
+97
+97
+97
+100
+104
+103
+99
+98
+106
+118
+124
+128
+143
+173
+205
+222
+237
+246
+246
+244
+248
+255
+251
+235
+219
+214
+213
+215
+224
+227
+230
+228
+223
+212
+199
+189
+184
+175
+168
+169
+173
+180
+193
+207
+223
+229
+227
+226
+224
+219
+230
+252
+242
+217
+198
+198
+200
+201
+205
+213
+213
+222
+230
+232
+233
+232
+238
+245
+255
+255
+255
+255
+255
+255
+250
+244
+246
+243
+242
+242
+240
+243
+254
+255
+240
+255
+255
+247
+236
+239
+234
+217
+235
+221
+201
+186
+177
+171
+165
+168
+184
+188
+221
+225
+205
+205
+193
+201
+228
+213
+201
+200
+201
+200
+200
+196
+177
+166
+168
+172
+171
+172
+188
+211
+214
+221
+219
+220
+233
+236
+235
+244
+253
+255
+250
+244
+237
+230
+223
+216
+201
+189
+192
+207
+225
+247
+255
+255
+252
+252
+248
+247
+249
+249
+252
+252
+238
+242
+240
+236
+225
+174
+112
+92
+95
+102
+117
+127
+132
+134
+136
+137
+136
+132
+127
+125
+127
+129
+131
+134
+136
+138
+136
+134
+130
+130
+131
+133
+135
+134
+140
+155
+176
+199
+214
+215
+188
+165
+147
+91
+90
+91
+90
+91
+90
+91
+90
+91
+90
+91
+91
+92
+92
+93
+93
+94
+94
+94
+94
+94
+94
+94
+92
+96
+97
+97
+98
+98
+97
+97
+98
+107
+106
+101
+100
+107
+120
+125
+127
+145
+171
+198
+217
+238
+252
+253
+249
+247
+255
+251
+238
+229
+225
+221
+215
+222
+223
+225
+222
+218
+208
+197
+188
+181
+172
+169
+173
+180
+187
+202
+216
+217
+225
+222
+226
+230
+211
+207
+235
+255
+235
+209
+202
+203
+201
+205
+212
+218
+223
+229
+231
+234
+237
+244
+252
+252
+255
+255
+255
+255
+255
+251
+246
+237
+236
+237
+238
+237
+239
+253
+255
+255
+254
+247
+242
+242
+240
+227
+210
+218
+205
+187
+175
+168
+162
+155
+157
+170
+178
+210
+187
+196
+190
+189
+206
+229
+213
+200
+196
+197
+196
+198
+195
+177
+167
+168
+173
+172
+175
+194
+219
+217
+225
+222
+222
+234
+237
+239
+252
+254
+253
+249
+243
+237
+230
+223
+214
+209
+191
+188
+200
+217
+243
+255
+255
+253
+255
+252
+253
+252
+249
+249
+249
+234
+240
+236
+228
+215
+162
+102
+88
+90
+98
+116
+128
+135
+136
+138
+139
+140
+134
+129
+126
+124
+125
+129
+131
+131
+133
+132
+130
+128
+128
+129
+132
+137
+136
+140
+153
+172
+189
+201
+203
+182
+159
+140
+93
+92
+93
+92
+93
+92
+93
+92
+94
+93
+94
+93
+94
+93
+94
+93
+93
+93
+94
+92
+92
+91
+93
+94
+96
+95
+96
+98
+99
+100
+100
+100
+107
+104
+101
+102
+110
+120
+129
+137
+143
+165
+190
+208
+225
+240
+249
+255
+244
+237
+231
+233
+235
+231
+228
+229
+226
+224
+221
+217
+212
+204
+196
+185
+167
+175
+173
+172
+191
+204
+204
+208
+218
+220
+222
+222
+222
+221
+215
+211
+217
+240
+242
+217
+199
+205
+212
+210
+211
+240
+225
+239
+244
+239
+255
+240
+250
+255
+255
+249
+253
+255
+254
+240
+238
+248
+233
+235
+240
+227
+255
+229
+255
+255
+255
+251
+246
+236
+222
+208
+204
+197
+184
+167
+156
+154
+157
+160
+167
+174
+194
+191
+189
+196
+197
+212
+219
+218
+209
+200
+196
+199
+203
+197
+188
+179
+173
+171
+179
+195
+210
+216
+228
+223
+218
+221
+231
+242
+249
+253
+247
+246
+246
+243
+242
+237
+230
+221
+213
+190
+192
+185
+214
+233
+255
+251
+255
+255
+255
+253
+252
+254
+250
+243
+242
+235
+237
+224
+216
+141
+92
+83
+92
+103
+119
+125
+127
+128
+131
+130
+128
+127
+126
+125
+124
+125
+127
+127
+127
+127
+129
+127
+126
+127
+129
+131
+135
+139
+139
+142
+153
+167
+175
+178
+163
+141
+124
+93
+93
+93
+93
+93
+93
+93
+93
+94
+94
+94
+94
+94
+94
+94
+94
+92
+94
+95
+94
+91
+91
+92
+94
+95
+93
+93
+95
+96
+98
+99
+101
+105
+103
+101
+103
+110
+121
+128
+135
+158
+163
+171
+185
+211
+234
+244
+244
+245
+238
+233
+238
+243
+242
+238
+234
+228
+224
+220
+215
+210
+203
+196
+186
+171
+170
+169
+178
+193
+197
+199
+212
+210
+214
+215
+216
+217
+219
+219
+218
+221
+230
+235
+225
+208
+199
+202
+211
+221
+245
+228
+241
+246
+241
+255
+237
+243
+247
+251
+253
+252
+248
+246
+247
+239
+237
+234
+253
+216
+238
+250
+213
+255
+255
+255
+253
+247
+231
+218
+210
+193
+194
+188
+172
+154
+147
+146
+147
+158
+176
+209
+206
+195
+198
+209
+235
+216
+214
+208
+199
+198
+202
+208
+206
+199
+194
+194
+195
+201
+209
+216
+222
+228
+222
+218
+221
+231
+242
+251
+251
+244
+243
+244
+243
+243
+238
+231
+223
+215
+191
+190
+183
+211
+233
+255
+249
+253
+255
+255
+255
+255
+255
+252
+246
+243
+236
+236
+223
+194
+128
+88
+82
+91
+101
+115
+120
+119
+123
+125
+125
+124
+124
+124
+123
+123
+123
+125
+126
+124
+125
+125
+125
+124
+125
+127
+130
+133
+135
+136
+136
+139
+144
+144
+140
+118
+99
+83
+93
+93
+93
+93
+93
+93
+93
+93
+93
+93
+93
+93
+93
+93
+93
+93
+94
+95
+97
+96
+93
+92
+91
+91
+91
+91
+92
+92
+95
+99
+102
+103
+103
+103
+104
+108
+115
+124
+130
+138
+152
+160
+170
+185
+207
+228
+238
+242
+248
+242
+234
+237
+243
+245
+242
+238
+228
+224
+219
+213
+207
+201
+193
+184
+174
+170
+171
+184
+199
+192
+187
+202
+205
+208
+213
+216
+217
+217
+220
+224
+221
+219
+226
+233
+222
+200
+200
+217
+226
+245
+231
+242
+248
+245
+255
+244
+240
+235
+236
+249
+245
+239
+236
+245
+234
+245
+231
+225
+234
+255
+237
+255
+255
+242
+239
+241
+235
+222
+214
+214
+194
+194
+189
+181
+173
+168
+162
+157
+155
+169
+199
+194
+188
+200
+215
+244
+208
+210
+208
+203
+204
+212
+218
+219
+219
+216
+221
+227
+228
+224
+227
+235
+224
+221
+217
+221
+231
+240
+245
+248
+244
+244
+244
+243
+243
+238
+231
+223
+216
+192
+186
+181
+208
+237
+255
+251
+253
+255
+255
+253
+254
+255
+252
+250
+244
+238
+234
+223
+165
+117
+88
+85
+95
+102
+114
+117
+116
+120
+123
+123
+121
+121
+121
+120
+121
+121
+124
+122
+122
+123
+123
+123
+123
+123
+125
+127
+135
+138
+139
+137
+134
+130
+121
+111
+81
+64
+50
+94
+94
+94
+94
+94
+94
+94
+94
+94
+94
+94
+94
+94
+94
+94
+94
+94
+96
+97
+96
+93
+90
+89
+88
+88
+91
+95
+98
+101
+105
+108
+107
+108
+108
+111
+114
+121
+127
+133
+140
+142
+159
+173
+179
+189
+204
+222
+241
+254
+253
+244
+242
+242
+242
+240
+239
+229
+225
+219
+213
+206
+198
+191
+184
+173
+173
+177
+188
+204
+199
+186
+186
+200
+205
+211
+217
+219
+217
+220
+224
+224
+219
+224
+236
+227
+210
+209
+224
+222
+240
+233
+239
+245
+248
+255
+255
+253
+242
+226
+237
+234
+240
+232
+235
+241
+209
+229
+220
+231
+239
+255
+241
+217
+219
+225
+225
+222
+220
+218
+212
+201
+195
+190
+193
+206
+215
+210
+196
+178
+182
+207
+217
+227
+239
+234
+241
+201
+206
+210
+208
+211
+217
+224
+226
+233
+231
+236
+242
+239
+232
+236
+246
+222
+219
+218
+222
+229
+236
+242
+244
+244
+246
+246
+245
+245
+240
+233
+224
+217
+194
+183
+179
+203
+239
+255
+254
+255
+255
+252
+250
+250
+252
+251
+250
+242
+239
+229
+215
+136
+107
+92
+91
+99
+106
+115
+116
+117
+119
+121
+122
+119
+118
+119
+118
+120
+120
+123
+122
+122
+122
+122
+122
+122
+122
+124
+126
+134
+139
+140
+138
+134
+128
+116
+105
+80
+67
+56
+94
+94
+94
+94
+94
+94
+94
+94
+94
+94
+94
+94
+94
+94
+94
+94
+93
+95
+96
+95
+92
+90
+88
+88
+89
+96
+103
+110
+115
+115
+115
+113
+111
+112
+114
+118
+122
+127
+132
+138
+147
+157
+160
+158
+160
+172
+188
+210
+240
+253
+254
+251
+249
+244
+237
+234
+232
+227
+221
+215
+208
+199
+192
+185
+173
+180
+175
+176
+200
+213
+201
+187
+190
+193
+204
+214
+219
+218
+220
+226
+224
+226
+228
+229
+226
+222
+222
+226
+219
+234
+236
+238
+239
+246
+255
+255
+255
+255
+225
+227
+224
+247
+232
+220
+218
+234
+219
+216
+255
+224
+202
+202
+193
+213
+224
+218
+217
+223
+220
+205
+204
+205
+211
+221
+235
+245
+244
+234
+196
+198
+229
+248
+255
+255
+229
+215
+201
+209
+215
+214
+213
+213
+216
+220
+238
+241
+240
+242
+239
+235
+243
+254
+223
+220
+218
+220
+227
+234
+239
+242
+244
+246
+247
+246
+245
+240
+234
+226
+217
+198
+180
+178
+195
+239
+255
+255
+255
+255
+249
+246
+245
+247
+249
+249
+243
+237
+219
+193
+114
+98
+96
+99
+102
+107
+116
+117
+118
+120
+121
+120
+117
+117
+117
+118
+119
+120
+123
+122
+122
+123
+124
+124
+121
+121
+123
+125
+128
+133
+135
+135
+133
+131
+123
+114
+100
+91
+81
+95
+95
+95
+95
+95
+95
+95
+95
+95
+95
+95
+95
+95
+95
+95
+95
+94
+95
+96
+94
+91
+89
+90
+90
+95
+104
+114
+122
+123
+123
+122
+118
+113
+114
+116
+119
+122
+126
+132
+139
+150
+153
+155
+162
+170
+171
+159
+153
+186
+210
+225
+233
+239
+241
+236
+229
+235
+231
+226
+218
+211
+203
+195
+188
+179
+186
+171
+163
+190
+217
+217
+203
+184
+184
+192
+206
+217
+218
+222
+228
+223
+228
+227
+221
+222
+227
+228
+223
+222
+233
+240
+239
+236
+242
+255
+255
+255
+255
+226
+227
+213
+244
+226
+215
+217
+203
+202
+247
+220
+213
+209
+186
+196
+219
+229
+219
+215
+220
+217
+204
+208
+226
+244
+250
+247
+246
+248
+248
+214
+213
+234
+234
+231
+227
+207
+206
+217
+224
+228
+223
+217
+215
+215
+220
+245
+251
+248
+245
+245
+248
+255
+255
+224
+222
+220
+221
+225
+231
+237
+240
+244
+247
+249
+248
+246
+241
+235
+226
+217
+201
+179
+177
+186
+236
+255
+255
+255
+255
+246
+243
+243
+244
+249
+249
+243
+235
+205
+160
+102
+89
+95
+99
+102
+107
+116
+119
+120
+123
+122
+118
+115
+114
+115
+116
+118
+119
+123
+122
+121
+122
+124
+123
+120
+120
+122
+123
+126
+131
+133
+135
+137
+137
+132
+124
+117
+111
+103
+95
+95
+95
+95
+95
+95
+95
+95
+94
+94
+94
+94
+94
+94
+94
+95
+97
+97
+97
+94
+91
+91
+92
+95
+107
+115
+125
+130
+129
+125
+123
+120
+115
+115
+120
+123
+126
+132
+141
+148
+154
+160
+171
+188
+201
+197
+170
+154
+155
+173
+181
+194
+214
+232
+238
+236
+235
+233
+229
+224
+217
+210
+202
+194
+189
+190
+175
+167
+187
+209
+214
+213
+195
+186
+186
+199
+214
+217
+223
+231
+226
+227
+226
+222
+224
+229
+228
+222
+229
+232
+240
+240
+239
+241
+242
+244
+246
+252
+233
+246
+216
+235
+221
+230
+216
+204
+207
+226
+210
+208
+185
+213
+217
+226
+232
+230
+223
+219
+224
+228
+238
+250
+255
+255
+248
+245
+246
+246
+244
+232
+232
+216
+207
+212
+211
+225
+227
+233
+234
+225
+217
+216
+219
+227
+243
+255
+255
+250
+252
+255
+255
+251
+227
+223
+221
+221
+226
+230
+237
+241
+244
+247
+249
+248
+246
+241
+235
+227
+216
+205
+181
+177
+178
+233
+255
+255
+255
+253
+243
+241
+244
+245
+251
+252
+245
+232
+188
+125
+94
+81
+91
+93
+101
+106
+114
+118
+121
+123
+120
+115
+112
+112
+113
+113
+116
+117
+121
+120
+120
+121
+122
+121
+120
+120
+121
+123
+127
+130
+132
+134
+135
+134
+128
+120
+112
+108
+101
+95
+95
+95
+95
+95
+95
+95
+95
+94
+94
+94
+94
+94
+94
+94
+95
+99
+99
+97
+93
+90
+92
+95
+97
+116
+121
+129
+131
+126
+121
+121
+119
+119
+120
+125
+130
+133
+141
+151
+160
+172
+182
+190
+200
+208
+214
+209
+208
+175
+174
+164
+168
+194
+224
+239
+241
+233
+234
+230
+226
+223
+215
+207
+201
+193
+193
+185
+184
+193
+199
+199
+209
+211
+194
+188
+197
+210
+215
+223
+231
+230
+225
+224
+227
+231
+230
+226
+223
+233
+229
+240
+240
+241
+242
+232
+226
+231
+247
+246
+255
+229
+235
+224
+254
+255
+220
+255
+255
+234
+211
+198
+215
+241
+235
+237
+246
+240
+230
+241
+255
+255
+255
+254
+245
+247
+253
+253
+246
+241
+227
+226
+213
+210
+217
+210
+216
+223
+227
+226
+217
+211
+214
+220
+232
+234
+252
+254
+247
+249
+255
+253
+236
+226
+224
+222
+223
+225
+232
+239
+244
+246
+247
+249
+248
+248
+242
+235
+227
+215
+209
+182
+178
+176
+232
+255
+255
+255
+252
+241
+242
+245
+246
+253
+253
+242
+225
+174
+98
+89
+74
+85
+88
+99
+105
+113
+118
+122
+124
+120
+114
+110
+110
+110
+111
+114
+116
+119
+119
+119
+120
+121
+119
+118
+118
+119
+121
+122
+126
+129
+127
+126
+123
+114
+105
+95
+92
+86
+92
+94
+96
+96
+95
+95
+95
+97
+98
+95
+93
+93
+97
+99
+98
+96
+100
+97
+93
+94
+91
+90
+101
+115
+121
+122
+126
+128
+125
+120
+114
+108
+116
+118
+128
+139
+150
+164
+178
+188
+203
+211
+217
+219
+220
+221
+217
+217
+209
+184
+161
+203
+216
+189
+216
+247
+233
+229
+225
+227
+226
+219
+216
+214
+203
+192
+199
+187
+191
+198
+185
+206
+209
+204
+197
+196
+205
+216
+225
+227
+223
+223
+224
+228
+224
+221
+223
+229
+228
+234
+236
+238
+238
+235
+232
+226
+215
+230
+245
+237
+215
+215
+249
+255
+255
+255
+255
+255
+255
+245
+242
+252
+255
+255
+249
+248
+243
+235
+234
+238
+252
+255
+255
+254
+251
+254
+255
+251
+237
+223
+214
+214
+215
+215
+216
+219
+225
+220
+217
+214
+215
+219
+224
+230
+240
+243
+243
+246
+245
+242
+235
+227
+222
+222
+223
+224
+228
+233
+239
+245
+247
+248
+250
+249
+249
+243
+236
+229
+224
+204
+191
+175
+184
+210
+255
+254
+255
+255
+246
+239
+241
+249
+253
+245
+242
+209
+137
+80
+69
+68
+77
+90
+91
+99
+113
+120
+120
+116
+114
+113
+108
+109
+110
+111
+114
+116
+117
+117
+116
+116
+118
+119
+118
+118
+117
+116
+123
+123
+122
+117
+109
+98
+88
+83
+63
+63
+62
+91
+94
+96
+96
+96
+95
+96
+97
+98
+96
+95
+96
+98
+99
+98
+96
+102
+95
+92
+94
+97
+100
+109
+118
+119
+123
+125
+120
+113
+107
+108
+110
+117
+124
+137
+152
+168
+184
+201
+211
+219
+226
+231
+230
+228
+226
+219
+212
+212
+189
+170
+199
+202
+182
+211
+246
+236
+231
+226
+228
+233
+229
+224
+219
+214
+201
+202
+185
+184
+189
+182
+200
+221
+212
+198
+189
+196
+212
+220
+219
+226
+229
+228
+224
+220
+219
+223
+227
+236
+237
+237
+235
+231
+227
+225
+221
+214
+216
+228
+243
+250
+252
+254
+255
+240
+235
+238
+252
+255
+255
+244
+242
+236
+239
+241
+244
+238
+228
+227
+234
+251
+253
+255
+255
+255
+255
+252
+242
+229
+222
+219
+222
+223
+220
+218
+219
+224
+219
+216
+215
+219
+223
+229
+231
+233
+234
+235
+238
+238
+236
+229
+223
+220
+221
+223
+226
+229
+234
+242
+245
+247
+247
+250
+249
+247
+243
+236
+229
+223
+212
+194
+182
+183
+216
+255
+251
+254
+254
+247
+244
+246
+246
+250
+241
+227
+183
+119
+76
+62
+61
+71
+80
+88
+96
+110
+117
+118
+116
+113
+112
+107
+107
+108
+109
+112
+114
+115
+115
+116
+117
+117
+117
+116
+114
+113
+112
+110
+108
+104
+98
+88
+78
+70
+64
+64
+64
+64
+89
+91
+94
+94
+94
+94
+95
+96
+97
+96
+95
+96
+97
+97
+96
+94
+98
+92
+91
+99
+107
+113
+118
+121
+121
+121
+120
+110
+101
+96
+106
+114
+125
+135
+151
+169
+187
+203
+220
+229
+233
+237
+240
+237
+231
+226
+215
+203
+185
+170
+156
+171
+168
+158
+187
+222
+247
+238
+227
+226
+234
+235
+231
+224
+223
+212
+212
+194
+183
+183
+174
+182
+219
+223
+217
+202
+197
+209
+217
+217
+222
+233
+236
+224
+213
+213
+218
+222
+230
+232
+231
+230
+227
+226
+225
+224
+198
+202
+220
+240
+250
+247
+243
+241
+231
+232
+237
+251
+255
+255
+242
+225
+232
+242
+250
+251
+244
+236
+243
+255
+245
+244
+247
+252
+255
+255
+246
+232
+222
+222
+227
+233
+235
+230
+225
+221
+221
+217
+215
+215
+220
+225
+231
+233
+227
+227
+229
+231
+232
+230
+225
+219
+218
+219
+222
+226
+231
+235
+243
+247
+245
+245
+248
+247
+247
+242
+238
+231
+221
+220
+199
+187
+181
+228
+255
+248
+252
+251
+248
+251
+250
+243
+239
+233
+210
+155
+107
+79
+62
+59
+70
+72
+81
+89
+103
+114
+116
+113
+109
+107
+105
+105
+105
+107
+109
+110
+112
+113
+117
+117
+116
+114
+112
+109
+107
+106
+101
+97
+91
+85
+76
+69
+65
+62
+67
+68
+69
+87
+90
+92
+94
+93
+94
+95
+97
+96
+96
+96
+97
+97
+96
+95
+92
+90
+90
+98
+106
+113
+118
+120
+122
+119
+115
+109
+98
+93
+97
+108
+120
+137
+149
+164
+182
+199
+213
+225
+231
+235
+238
+238
+233
+227
+218
+203
+188
+166
+157
+150
+155
+155
+156
+181
+208
+251
+243
+232
+229
+229
+234
+234
+232
+223
+219
+222
+211
+195
+186
+176
+167
+191
+219
+234
+219
+201
+204
+212
+215
+217
+241
+254
+237
+217
+214
+219
+222
+223
+225
+225
+222
+220
+218
+217
+215
+194
+196
+206
+217
+223
+224
+228
+234
+241
+246
+247
+248
+255
+255
+241
+219
+233
+240
+241
+240
+235
+235
+249
+255
+237
+232
+234
+242
+255
+255
+244
+227
+225
+228
+234
+242
+244
+239
+230
+224
+221
+218
+217
+217
+220
+227
+232
+233
+226
+224
+227
+230
+231
+229
+224
+218
+218
+219
+222
+226
+231
+235
+242
+246
+244
+244
+247
+246
+246
+242
+238
+231
+220
+224
+201
+190
+182
+238
+255
+248
+253
+250
+251
+255
+252
+239
+232
+224
+195
+135
+101
+90
+72
+65
+76
+70
+76
+83
+98
+108
+112
+110
+107
+105
+103
+104
+104
+106
+107
+109
+111
+112
+116
+115
+113
+111
+106
+103
+101
+100
+96
+93
+87
+82
+77
+76
+78
+79
+77
+78
+79
+85
+87
+91
+92
+93
+93
+95
+97
+95
+96
+97
+97
+96
+95
+95
+94
+86
+95
+110
+116
+120
+120
+120
+121
+115
+106
+96
+91
+95
+106
+118
+128
+147
+158
+173
+187
+203
+212
+221
+225
+229
+230
+228
+224
+218
+206
+190
+174
+155
+143
+140
+141
+147
+157
+169
+188
+230
+237
+240
+240
+238
+237
+235
+233
+227
+224
+228
+222
+204
+198
+196
+175
+174
+199
+220
+214
+204
+206
+208
+209
+214
+245
+255
+250
+227
+220
+223
+227
+226
+227
+226
+221
+212
+205
+198
+194
+197
+192
+193
+203
+215
+219
+219
+218
+225
+236
+242
+242
+249
+255
+241
+222
+233
+237
+237
+239
+242
+247
+255
+255
+229
+222
+223
+234
+249
+253
+244
+233
+232
+235
+239
+242
+243
+240
+233
+226
+223
+220
+219
+220
+223
+228
+232
+233
+230
+228
+230
+232
+232
+230
+225
+220
+219
+220
+223
+225
+229
+233
+241
+244
+243
+241
+244
+244
+244
+242
+238
+231
+222
+224
+202
+192
+192
+247
+255
+249
+248
+246
+252
+255
+255
+242
+228
+216
+171
+119
+100
+97
+84
+75
+80
+71
+71
+76
+90
+102
+109
+109
+108
+104
+102
+103
+103
+105
+106
+108
+110
+111
+116
+115
+110
+106
+102
+99
+97
+95
+90
+88
+83
+80
+79
+82
+87
+90
+85
+85
+85
+82
+85
+88
+90
+91
+92
+94
+96
+96
+97
+97
+97
+96
+96
+98
+97
+94
+106
+121
+125
+122
+120
+118
+115
+106
+99
+91
+93
+104
+118
+129
+136
+153
+163
+175
+187
+198
+207
+212
+215
+217
+217
+215
+210
+204
+197
+180
+163
+141
+124
+124
+120
+130
+143
+144
+157
+192
+215
+237
+249
+253
+250
+243
+237
+237
+234
+225
+224
+209
+211
+221
+194
+184
+189
+194
+200
+207
+215
+214
+209
+208
+234
+250
+242
+223
+217
+219
+224
+230
+231
+231
+226
+218
+209
+202
+196
+176
+184
+200
+211
+210
+203
+204
+207
+211
+227
+237
+240
+244
+246
+232
+218
+229
+236
+243
+253
+255
+255
+255
+255
+226
+221
+221
+231
+245
+249
+248
+244
+237
+239
+240
+237
+235
+234
+231
+225
+227
+224
+223
+222
+225
+228
+232
+232
+232
+231
+232
+235
+235
+233
+226
+222
+219
+220
+221
+223
+227
+231
+239
+242
+241
+240
+243
+243
+243
+241
+236
+231
+224
+217
+204
+193
+209
+255
+253
+247
+237
+241
+250
+255
+255
+248
+227
+200
+139
+106
+93
+93
+88
+81
+79
+73
+68
+71
+83
+94
+103
+106
+106
+103
+103
+102
+102
+103
+105
+107
+109
+109
+113
+111
+106
+103
+99
+96
+95
+94
+92
+91
+87
+86
+85
+89
+93
+94
+90
+88
+88
+78
+81
+85
+87
+88
+90
+92
+94
+97
+98
+98
+97
+95
+97
+102
+104
+110
+117
+124
+123
+119
+118
+112
+106
+97
+94
+95
+101
+112
+125
+137
+143
+153
+161
+170
+180
+186
+192
+195
+199
+198
+197
+193
+188
+187
+181
+166
+150
+139
+117
+119
+115
+122
+137
+133
+150
+155
+183
+214
+237
+252
+255
+254
+249
+252
+245
+230
+231
+216
+219
+234
+197
+196
+189
+190
+199
+209
+212
+212
+215
+210
+216
+221
+220
+214
+213
+216
+222
+229
+230
+229
+226
+219
+213
+209
+204
+174
+188
+205
+209
+198
+187
+192
+202
+215
+226
+236
+240
+239
+236
+223
+212
+209
+218
+227
+237
+245
+247
+244
+239
+228
+225
+230
+240
+247
+249
+254
+253
+239
+240
+240
+236
+232
+231
+230
+224
+228
+224
+224
+224
+227
+230
+234
+236
+236
+236
+237
+238
+238
+235
+228
+222
+222
+221
+221
+223
+225
+230
+237
+241
+240
+238
+241
+242
+243
+241
+236
+231
+226
+210
+210
+198
+231
+255
+249
+241
+227
+239
+253
+255
+255
+253
+219
+177
+106
+94
+88
+85
+89
+85
+76
+73
+64
+65
+75
+88
+98
+102
+104
+102
+101
+99
+99
+101
+103
+104
+105
+107
+110
+108
+104
+100
+97
+95
+95
+95
+95
+95
+93
+93
+93
+96
+99
+99
+92
+90
+90
+74
+77
+81
+84
+87
+89
+92
+94
+100
+101
+100
+98
+95
+97
+103
+108
+119
+121
+120
+116
+114
+116
+108
+98
+90
+95
+102
+109
+118
+129
+143
+151
+155
+160
+169
+174
+177
+178
+180
+182
+181
+179
+174
+171
+170
+164
+153
+136
+126
+102
+108
+100
+108
+124
+123
+147
+140
+162
+187
+212
+238
+255
+255
+255
+254
+247
+233
+238
+221
+222
+234
+186
+190
+190
+199
+209
+203
+193
+202
+219
+222
+211
+204
+205
+212
+215
+221
+225
+228
+228
+222
+215
+207
+202
+197
+194
+212
+200
+189
+190
+195
+196
+194
+194
+220
+221
+225
+229
+232
+229
+220
+212
+203
+212
+218
+224
+228
+232
+233
+231
+238
+237
+244
+253
+255
+253
+255
+255
+248
+249
+249
+240
+235
+233
+232
+226
+227
+224
+224
+225
+228
+231
+235
+238
+236
+235
+236
+237
+237
+234
+227
+219
+222
+221
+221
+222
+224
+227
+233
+236
+238
+238
+240
+240
+242
+239
+235
+231
+228
+205
+215
+202
+249
+255
+246
+237
+228
+243
+255
+255
+255
+245
+201
+148
+83
+88
+84
+79
+89
+83
+69
+71
+61
+64
+73
+83
+95
+101
+103
+101
+99
+97
+98
+99
+101
+102
+104
+105
+108
+107
+102
+99
+97
+96
+96
+96
+94
+94
+95
+96
+97
+100
+102
+102
+93
+92
+93
+68
+70
+74
+80
+82
+87
+93
+95
+96
+97
+96
+95
+98
+103
+111
+115
+119
+122
+124
+121
+112
+103
+96
+92
+96
+102
+111
+121
+132
+141
+150
+156
+160
+161
+163
+164
+166
+165
+165
+164
+165
+163
+162
+162
+159
+153
+142
+131
+113
+104
+99
+102
+108
+115
+128
+143
+150
+169
+181
+192
+216
+235
+246
+255
+249
+255
+237
+223
+217
+239
+204
+197
+196
+195
+192
+195
+198
+202
+208
+213
+210
+214
+215
+211
+205
+205
+216
+226
+224
+225
+222
+215
+207
+201
+198
+196
+194
+198
+203
+205
+204
+197
+187
+182
+199
+208
+217
+224
+227
+225
+216
+208
+205
+213
+220
+227
+232
+237
+240
+244
+251
+250
+251
+253
+255
+255
+255
+255
+255
+255
+255
+254
+244
+237
+233
+232
+221
+221
+222
+224
+227
+230
+233
+235
+235
+236
+235
+233
+231
+226
+221
+219
+220
+219
+220
+222
+223
+226
+227
+230
+236
+237
+240
+241
+241
+237
+232
+228
+222
+212
+211
+215
+255
+255
+248
+241
+247
+236
+249
+255
+245
+230
+178
+97
+71
+65
+75
+82
+79
+66
+59
+60
+65
+69
+75
+83
+91
+97
+100
+100
+98
+96
+97
+99
+101
+104
+108
+109
+108
+105
+103
+102
+102
+101
+99
+97
+100
+100
+98
+99
+100
+100
+101
+97
+91
+92
+95
+61
+63
+70
+74
+80
+84
+91
+93
+96
+96
+94
+94
+99
+104
+110
+115
+116
+118
+116
+112
+103
+97
+93
+92
+101
+107
+116
+125
+134
+141
+148
+152
+155
+156
+157
+158
+158
+157
+156
+155
+158
+156
+156
+155
+154
+147
+136
+128
+115
+107
+100
+101
+107
+113
+124
+141
+157
+178
+187
+195
+211
+221
+224
+235
+251
+255
+247
+238
+227
+235
+199
+194
+197
+195
+192
+193
+196
+200
+207
+211
+213
+213
+211
+210
+209
+209
+212
+216
+223
+224
+220
+214
+207
+200
+193
+190
+190
+193
+198
+201
+202
+200
+197
+194
+191
+199
+209
+216
+218
+215
+204
+195
+202
+211
+221
+229
+237
+244
+249
+253
+255
+255
+255
+255
+255
+255
+255
+255
+255
+255
+255
+255
+247
+241
+234
+230
+220
+220
+222
+224
+227
+230
+233
+235
+235
+236
+235
+232
+228
+223
+220
+217
+219
+219
+220
+220
+222
+223
+225
+227
+231
+234
+235
+235
+235
+232
+228
+223
+221
+209
+207
+239
+255
+255
+241
+249
+248
+247
+244
+243
+239
+205
+139
+89
+69
+60
+62
+67
+67
+61
+56
+58
+60
+75
+92
+101
+104
+101
+100
+100
+97
+97
+97
+99
+103
+105
+107
+108
+108
+106
+104
+102
+103
+102
+102
+100
+102
+100
+100
+100
+101
+101
+102
+98
+93
+95
+98
+54
+58
+63
+68
+75
+79
+86
+89
+94
+92
+92
+94
+99
+104
+111
+115
+115
+113
+106
+99
+92
+90
+92
+92
+104
+110
+119
+127
+134
+138
+143
+145
+147
+147
+147
+147
+148
+147
+147
+146
+149
+147
+148
+148
+147
+140
+131
+126
+121
+115
+103
+100
+100
+104
+117
+135
+166
+190
+203
+208
+218
+222
+220
+226
+251
+255
+255
+255
+247
+238
+196
+192
+196
+193
+192
+192
+194
+198
+204
+208
+214
+211
+206
+208
+212
+212
+206
+203
+218
+218
+217
+214
+208
+201
+194
+190
+189
+192
+194
+196
+199
+202
+203
+204
+199
+202
+207
+208
+210
+209
+202
+197
+204
+214
+223
+231
+241
+246
+251
+255
+252
+252
+251
+249
+251
+250
+252
+254
+255
+255
+254
+253
+247
+242
+236
+229
+220
+220
+222
+224
+229
+231
+233
+235
+237
+238
+237
+234
+229
+225
+220
+216
+218
+217
+218
+219
+221
+222
+224
+225
+225
+226
+227
+227
+227
+225
+221
+218
+219
+204
+211
+255
+255
+249
+237
+255
+247
+255
+240
+233
+227
+171
+101
+81
+65
+52
+53
+58
+63
+62
+60
+62
+62
+88
+115
+128
+119
+104
+97
+97
+96
+96
+97
+99
+104
+106
+107
+108
+110
+107
+104
+103
+104
+104
+102
+100
+101
+100
+99
+100
+102
+102
+101
+98
+99
+101
+104
+50
+53
+59
+65
+71
+75
+82
+86
+88
+89
+89
+94
+99
+105
+111
+114
+114
+106
+96
+87
+84
+87
+92
+97
+108
+114
+123
+130
+136
+138
+140
+141
+143
+143
+143
+142
+143
+142
+142
+141
+143
+142
+143
+144
+143
+137
+128
+126
+127
+121
+107
+99
+96
+98
+109
+128
+161
+193
+209
+217
+228
+228
+224
+228
+236
+237
+254
+255
+255
+245
+201
+196
+194
+191
+191
+190
+193
+197
+200
+206
+216
+212
+206
+206
+209
+209
+203
+199
+210
+211
+210
+210
+209
+205
+200
+196
+196
+196
+198
+198
+199
+200
+201
+203
+211
+211
+208
+203
+203
+207
+207
+206
+206
+217
+226
+235
+242
+247
+249
+252
+249
+247
+247
+248
+251
+253
+255
+255
+255
+253
+250
+249
+247
+242
+233
+225
+220
+220
+222
+224
+229
+231
+233
+235
+238
+238
+238
+234
+230
+225
+220
+215
+216
+216
+216
+217
+218
+220
+221
+221
+219
+220
+221
+220
+220
+218
+215
+214
+213
+206
+231
+255
+254
+243
+243
+255
+251
+252
+240
+228
+196
+129
+78
+72
+54
+50
+56
+62
+65
+63
+65
+69
+84
+112
+143
+151
+131
+106
+95
+93
+95
+97
+98
+102
+107
+108
+109
+109
+111
+108
+105
+104
+105
+105
+104
+103
+102
+100
+100
+101
+103
+104
+102
+100
+103
+105
+108
+45
+51
+56
+60
+66
+71
+77
+81
+83
+83
+85
+90
+97
+105
+109
+108
+106
+98
+88
+80
+81
+88
+96
+102
+111
+117
+124
+130
+134
+135
+138
+139
+139
+139
+138
+137
+137
+136
+138
+137
+140
+139
+141
+141
+141
+135
+126
+127
+131
+125
+108
+99
+92
+91
+102
+122
+149
+187
+209
+219
+230
+231
+224
+227
+228
+226
+247
+255
+255
+244
+201
+193
+192
+191
+191
+192
+194
+197
+199
+205
+216
+217
+210
+207
+204
+201
+200
+201
+207
+209
+210
+209
+207
+204
+203
+203
+202
+201
+202
+201
+200
+198
+197
+197
+208
+208
+205
+201
+203
+206
+205
+204
+208
+217
+228
+236
+244
+249
+251
+252
+252
+251
+252
+252
+254
+255
+255
+255
+255
+251
+247
+245
+241
+237
+228
+221
+220
+220
+222
+226
+229
+231
+234
+236
+241
+241
+239
+237
+230
+225
+218
+215
+216
+214
+214
+216
+216
+217
+218
+217
+213
+213
+214
+213
+212
+211
+211
+211
+208
+215
+255
+255
+255
+240
+255
+250
+255
+242
+237
+215
+148
+91
+71
+63
+49
+52
+58
+60
+58
+62
+80
+94
+121
+144
+170
+168
+142
+111
+97
+94
+96
+99
+101
+106
+111
+112
+111
+111
+111
+108
+105
+103
+105
+105
+105
+104
+102
+101
+100
+101
+103
+104
+103
+101
+105
+105
+108
+43
+46
+52
+56
+62
+66
+72
+75
+78
+78
+79
+87
+95
+102
+103
+103
+98
+91
+81
+78
+82
+91
+101
+108
+117
+122
+127
+131
+134
+134
+136
+137
+135
+134
+134
+133
+133
+133
+135
+135
+141
+140
+141
+140
+139
+132
+123
+124
+129
+126
+109
+100
+92
+89
+99
+118
+146
+183
+209
+219
+231
+231
+228
+231
+236
+230
+247
+243
+254
+230
+196
+190
+194
+193
+193
+195
+196
+200
+203
+207
+214
+216
+212
+206
+199
+196
+198
+202
+207
+214
+217
+214
+206
+200
+202
+203
+201
+200
+201
+201
+202
+200
+200
+199
+202
+207
+210
+211
+214
+213
+206
+201
+210
+220
+231
+240
+246
+250
+253
+253
+249
+247
+247
+246
+247
+247
+250
+250
+252
+248
+245
+240
+237
+231
+224
+218
+220
+221
+223
+226
+229
+231
+234
+236
+242
+242
+240
+237
+230
+223
+218
+214
+213
+212
+212
+212
+213
+213
+215
+212
+208
+206
+207
+207
+206
+206
+206
+208
+208
+232
+255
+254
+255
+246
+255
+246
+255
+234
+221
+185
+107
+71
+71
+59
+56
+58
+57
+53
+51
+66
+102
+129
+159
+169
+181
+175
+146
+118
+101
+96
+96
+99
+103
+109
+114
+114
+113
+112
+111
+108
+104
+102
+104
+105
+105
+105
+103
+102
+101
+102
+104
+105
+105
+102
+106
+107
+110
+40
+43
+47
+51
+55
+60
+64
+67
+73
+72
+75
+82
+91
+97
+98
+96
+95
+90
+84
+84
+92
+103
+112
+118
+123
+126
+131
+132
+132
+131
+133
+134
+131
+130
+131
+130
+131
+133
+136
+136
+141
+139
+139
+139
+137
+129
+119
+117
+125
+121
+107
+101
+93
+91
+100
+116
+140
+176
+202
+214
+226
+230
+231
+237
+245
+237
+247
+222
+229
+210
+195
+199
+197
+196
+197
+200
+202
+205
+208
+212
+211
+212
+210
+205
+199
+194
+192
+195
+200
+213
+225
+222
+211
+202
+201
+205
+200
+200
+200
+200
+202
+202
+203
+203
+205
+210
+215
+216
+218
+219
+215
+210
+220
+229
+238
+245
+249
+249
+250
+248
+242
+239
+237
+237
+239
+239
+242
+241
+244
+244
+242
+236
+229
+225
+223
+221
+220
+221
+223
+227
+230
+233
+234
+236
+244
+244
+241
+238
+230
+224
+218
+212
+211
+209
+208
+208
+208
+208
+209
+208
+203
+200
+200
+199
+200
+200
+203
+206
+213
+250
+255
+255
+253
+254
+255
+250
+244
+230
+192
+135
+84
+67
+68
+62
+66
+64
+58
+54
+57
+80
+125
+159
+176
+175
+176
+166
+146
+123
+103
+95
+94
+99
+105
+111
+115
+115
+113
+111
+110
+107
+103
+101
+103
+104
+105
+105
+102
+100
+100
+101
+103
+104
+105
+102
+106
+108
+111
+38
+40
+45
+49
+51
+55
+58
+60
+71
+68
+71
+79
+90
+95
+94
+92
+96
+92
+89
+92
+103
+113
+122
+127
+129
+130
+133
+132
+131
+129
+131
+131
+132
+131
+132
+131
+133
+135
+138
+140
+141
+140
+139
+138
+133
+127
+115
+111
+117
+114
+105
+102
+99
+97
+102
+115
+125
+159
+184
+197
+215
+226
+233
+240
+247
+241
+247
+209
+212
+197
+200
+212
+199
+199
+201
+205
+208
+211
+216
+217
+207
+206
+206
+203
+199
+193
+190
+188
+192
+209
+227
+228
+216
+203
+203
+208
+202
+201
+199
+198
+200
+202
+206
+208
+211
+213
+213
+210
+213
+218
+221
+220
+232
+241
+247
+251
+250
+245
+242
+239
+237
+234
+234
+235
+237
+241
+244
+243
+239
+238
+236
+233
+226
+222
+223
+225
+221
+222
+225
+227
+230
+233
+234
+236
+244
+244
+241
+236
+230
+223
+216
+211
+208
+205
+205
+204
+205
+205
+205
+204
+197
+194
+195
+194
+195
+198
+201
+205
+220
+255
+255
+255
+250
+255
+246
+251
+228
+224
+162
+91
+71
+70
+64
+67
+71
+70
+64
+63
+69
+96
+139
+170
+177
+171
+166
+157
+142
+123
+102
+90
+94
+97
+104
+111
+114
+114
+112
+110
+110
+106
+102
+100
+102
+104
+105
+105
+102
+101
+100
+101
+103
+104
+104
+101
+107
+109
+112
+40
+39
+40
+41
+46
+51
+55
+57
+61
+63
+68
+74
+79
+86
+90
+93
+89
+91
+94
+101
+110
+119
+127
+132
+140
+140
+138
+134
+130
+128
+130
+131
+128
+129
+131
+132
+134
+136
+139
+140
+138
+138
+137
+135
+128
+119
+107
+102
+106
+108
+104
+102
+101
+102
+106
+114
+114
+135
+166
+193
+209
+220
+237
+247
+249
+230
+212
+206
+209
+215
+214
+212
+207
+205
+207
+209
+212
+216
+220
+220
+208
+205
+204
+202
+197
+193
+190
+188
+194
+190
+233
+223
+195
+209
+206
+199
+202
+201
+200
+199
+200
+201
+203
+204
+208
+215
+220
+220
+217
+218
+226
+236
+245
+242
+240
+246
+246
+241
+237
+237
+236
+230
+228
+229
+235
+240
+241
+239
+242
+238
+234
+230
+225
+223
+220
+220
+222
+225
+227
+230
+233
+236
+237
+239
+244
+243
+240
+237
+231
+224
+215
+207
+202
+200
+199
+198
+199
+199
+200
+199
+193
+196
+190
+182
+188
+201
+206
+201
+255
+255
+255
+252
+245
+242
+247
+240
+228
+171
+110
+78
+67
+65
+66
+66
+77
+77
+67
+68
+88
+125
+155
+167
+171
+159
+152
+148
+130
+102
+88
+89
+93
+99
+105
+110
+109
+108
+107
+108
+105
+102
+99
+99
+102
+104
+102
+100
+103
+104
+103
+102
+101
+102
+106
+107
+113
+113
+114
+42
+41
+41
+41
+45
+49
+53
+55
+59
+62
+65
+72
+79
+83
+88
+90
+92
+94
+100
+107
+117
+127
+135
+139
+141
+140
+137
+133
+128
+128
+128
+130
+133
+134
+135
+137
+139
+140
+141
+142
+138
+137
+134
+130
+123
+116
+108
+100
+99
+98
+101
+102
+105
+108
+110
+113
+121
+130
+149
+173
+199
+221
+243
+254
+240
+227
+217
+213
+217
+220
+219
+214
+211
+209
+209
+212
+215
+220
+223
+221
+206
+201
+200
+198
+196
+193
+191
+190
+196
+203
+228
+220
+200
+204
+200
+194
+202
+203
+202
+202
+203
+204
+206
+207
+211
+214
+217
+215
+213
+216
+222
+231
+248
+241
+237
+239
+240
+238
+235
+235
+228
+220
+216
+223
+238
+248
+248
+243
+233
+231
+229
+226
+225
+224
+225
+225
+224
+226
+229
+231
+233
+236
+237
+238
+243
+242
+238
+234
+228
+220
+211
+203
+198
+195
+194
+192
+192
+193
+193
+193
+189
+193
+187
+179
+185
+192
+201
+215
+255
+255
+253
+246
+242
+242
+240
+224
+170
+131
+95
+72
+59
+59
+73
+85
+81
+84
+87
+100
+119
+140
+154
+159
+152
+154
+154
+141
+114
+89
+84
+92
+95
+98
+105
+109
+108
+107
+105
+105
+103
+101
+99
+99
+103
+105
+104
+103
+105
+105
+105
+103
+103
+102
+108
+109
+112
+111
+114
+45
+45
+44
+44
+47
+49
+51
+52
+57
+60
+64
+69
+75
+81
+85
+86
+92
+94
+102
+112
+122
+133
+141
+144
+144
+142
+138
+135
+129
+127
+127
+128
+134
+136
+138
+140
+140
+140
+140
+139
+137
+134
+128
+123
+117
+110
+105
+99
+93
+93
+97
+103
+109
+112
+114
+114
+122
+123
+137
+164
+199
+224
+245
+252
+226
+222
+221
+222
+225
+225
+221
+218
+212
+211
+211
+213
+216
+221
+224
+221
+203
+196
+194
+193
+194
+194
+193
+192
+195
+220
+218
+213
+206
+196
+196
+190
+198
+199
+199
+201
+202
+203
+204
+205
+213
+213
+214
+215
+218
+223
+229
+233
+240
+237
+235
+236
+238
+237
+235
+234
+221
+225
+236
+248
+253
+250
+239
+229
+226
+224
+224
+224
+225
+226
+228
+228
+225
+228
+230
+232
+235
+235
+235
+236
+239
+238
+236
+231
+226
+217
+207
+199
+194
+191
+189
+187
+187
+187
+187
+187
+184
+189
+179
+177
+182
+180
+194
+235
+255
+254
+243
+237
+238
+236
+227
+202
+130
+102
+85
+71
+59
+56
+65
+78
+72
+83
+103
+129
+146
+149
+148
+149
+146
+156
+154
+128
+92
+72
+78
+91
+95
+99
+104
+108
+106
+104
+103
+102
+100
+100
+99
+101
+104
+107
+107
+106
+105
+105
+105
+104
+103
+104
+108
+111
+115
+115
+117
+50
+48
+48
+48
+49
+50
+51
+52
+57
+59
+63
+68
+73
+77
+82
+83
+88
+92
+100
+110
+122
+132
+140
+145
+148
+147
+142
+137
+130
+127
+127
+128
+132
+134
+137
+141
+139
+137
+135
+133
+133
+128
+121
+114
+109
+107
+105
+99
+92
+90
+97
+103
+111
+115
+117
+119
+118
+123
+139
+171
+205
+226
+237
+239
+219
+220
+225
+227
+227
+225
+224
+219
+214
+211
+209
+212
+216
+220
+224
+218
+200
+189
+188
+189
+191
+194
+195
+196
+198
+233
+211
+204
+209
+190
+192
+192
+192
+196
+197
+199
+200
+203
+204
+205
+210
+212
+213
+219
+227
+233
+236
+236
+232
+236
+239
+238
+234
+230
+228
+226
+243
+252
+255
+255
+243
+228
+223
+221
+223
+222
+222
+223
+225
+226
+229
+230
+229
+230
+232
+233
+235
+235
+235
+236
+238
+238
+234
+229
+223
+214
+204
+197
+190
+186
+182
+181
+181
+180
+179
+179
+179
+183
+173
+173
+179
+171
+193
+252
+253
+249
+238
+232
+229
+220
+206
+177
+119
+92
+79
+74
+70
+64
+61
+61
+65
+81
+110
+138
+149
+145
+141
+144
+157
+161
+144
+108
+75
+65
+76
+87
+95
+100
+105
+107
+105
+103
+100
+101
+98
+99
+100
+103
+106
+108
+109
+110
+106
+106
+106
+104
+103
+105
+109
+112
+119
+118
+118
+55
+54
+54
+53
+53
+53
+54
+54
+59
+61
+64
+68
+73
+77
+81
+82
+86
+89
+97
+107
+117
+128
+136
+140
+149
+148
+144
+139
+132
+129
+127
+127
+129
+132
+135
+137
+138
+134
+129
+128
+127
+122
+114
+109
+106
+105
+106
+102
+97
+95
+100
+105
+110
+116
+122
+125
+127
+136
+157
+182
+205
+216
+223
+226
+221
+223
+226
+227
+225
+223
+221
+220
+211
+208
+207
+209
+212
+217
+221
+216
+196
+185
+181
+183
+189
+194
+199
+199
+208
+245
+214
+201
+207
+184
+183
+188
+191
+195
+198
+200
+202
+204
+207
+209
+208
+210
+214
+222
+229
+234
+232
+230
+233
+239
+240
+234
+228
+228
+232
+237
+255
+255
+241
+221
+209
+209
+220
+231
+224
+224
+224
+224
+226
+227
+229
+229
+230
+231
+234
+235
+235
+235
+232
+234
+238
+238
+234
+228
+223
+214
+203
+195
+186
+181
+179
+175
+175
+172
+172
+172
+170
+172
+166
+167
+170
+171
+203
+255
+243
+241
+235
+226
+215
+199
+178
+153
+103
+83
+80
+78
+73
+66
+63
+65
+77
+94
+120
+139
+145
+141
+143
+151
+157
+146
+117
+82
+63
+66
+79
+86
+98
+101
+105
+106
+105
+101
+98
+99
+98
+102
+103
+105
+107
+109
+110
+111
+106
+107
+106
+105
+105
+106
+110
+114
+120
+118
+118
+63
+61
+61
+61
+61
+59
+59
+59
+63
+64
+67
+70
+75
+78
+81
+82
+89
+90
+95
+103
+113
+123
+131
+135
+143
+143
+141
+138
+131
+126
+122
+121
+123
+124
+128
+131
+131
+127
+124
+122
+118
+114
+109
+106
+107
+108
+108
+107
+103
+102
+103
+106
+110
+118
+124
+131
+150
+157
+169
+185
+197
+204
+213
+221
+225
+225
+226
+226
+224
+222
+220
+218
+209
+205
+204
+206
+209
+213
+217
+211
+193
+180
+176
+178
+187
+196
+201
+203
+217
+248
+227
+206
+204
+184
+172
+181
+188
+191
+192
+195
+197
+201
+206
+209
+217
+219
+222
+229
+234
+234
+231
+227
+232
+235
+236
+232
+236
+248
+255
+255
+249
+226
+202
+192
+201
+214
+223
+224
+226
+225
+226
+225
+227
+228
+229
+230
+233
+233
+234
+235
+235
+234
+232
+233
+239
+236
+232
+227
+221
+211
+201
+192
+182
+178
+174
+170
+169
+168
+165
+165
+165
+160
+160
+160
+162
+181
+219
+249
+237
+237
+231
+216
+198
+177
+156
+136
+84
+77
+83
+77
+63
+57
+65
+78
+108
+119
+132
+137
+141
+144
+148
+152
+131
+110
+81
+60
+57
+65
+79
+87
+99
+101
+106
+107
+105
+101
+97
+99
+99
+105
+106
+108
+108
+108
+109
+110
+109
+109
+109
+108
+107
+109
+114
+115
+124
+123
+122
+68
+68
+68
+67
+67
+67
+66
+66
+68
+69
+71
+74
+79
+82
+84
+85
+92
+92
+92
+97
+105
+114
+123
+129
+134
+136
+136
+132
+127
+121
+116
+111
+112
+114
+118
+119
+119
+116
+115
+114
+109
+108
+106
+107
+109
+111
+111
+111
+110
+109
+107
+108
+111
+117
+125
+137
+161
+167
+174
+186
+197
+204
+212
+220
+224
+225
+225
+224
+224
+221
+216
+212
+207
+202
+201
+202
+205
+210
+213
+207
+191
+177
+172
+174
+186
+196
+202
+206
+216
+240
+241
+217
+204
+190
+166
+179
+190
+193
+193
+194
+197
+201
+207
+212
+225
+227
+228
+231
+233
+233
+232
+231
+231
+230
+230
+233
+244
+255
+255
+248
+204
+193
+189
+195
+213
+222
+223
+217
+226
+226
+226
+226
+228
+229
+231
+233
+234
+235
+235
+235
+235
+232
+232
+233
+235
+233
+230
+224
+219
+209
+198
+190
+179
+174
+170
+166
+164
+163
+163
+160
+161
+150
+156
+154
+154
+195
+237
+237
+235
+232
+220
+202
+182
+161
+142
+127
+78
+75
+80
+76
+69
+71
+87
+105
+127
+130
+131
+125
+131
+142
+137
+124
+88
+71
+57
+54
+58
+61
+74
+87
+101
+104
+108
+108
+105
+99
+97
+97
+102
+108
+109
+110
+108
+107
+107
+109
+112
+113
+112
+112
+111
+113
+116
+119
+126
+123
+121
+73
+74
+73
+73
+73
+73
+72
+72
+73
+74
+76
+78
+82
+84
+88
+89
+93
+91
+92
+94
+100
+110
+120
+125
+129
+131
+133
+131
+125
+117
+111
+107
+105
+106
+109
+109
+109
+108
+107
+106
+103
+104
+104
+107
+110
+113
+113
+112
+112
+111
+112
+115
+119
+126
+137
+147
+162
+166
+171
+186
+200
+211
+217
+221
+223
+223
+223
+223
+223
+221
+216
+209
+207
+204
+202
+203
+206
+209
+211
+206
+190
+175
+168
+172
+182
+193
+201
+204
+204
+224
+248
+224
+208
+202
+171
+184
+202
+204
+202
+203
+205
+210
+220
+225
+226
+226
+227
+226
+226
+227
+229
+229
+228
+224
+221
+225
+234
+234
+211
+184
+184
+190
+201
+208
+214
+217
+225
+231
+226
+226
+226
+228
+229
+231
+233
+234
+234
+234
+235
+235
+233
+232
+231
+231
+233
+230
+226
+222
+214
+204
+194
+185
+174
+170
+166
+162
+160
+158
+159
+155
+152
+140
+153
+152
+151
+205
+246
+222
+229
+217
+200
+183
+167
+155
+141
+128
+84
+67
+66
+72
+88
+110
+132
+148
+135
+134
+124
+110
+117
+130
+117
+91
+59
+52
+53
+61
+60
+57
+67
+85
+103
+105
+108
+109
+106
+102
+98
+99
+104
+108
+111
+110
+108
+105
+106
+106
+115
+115
+115
+114
+114
+115
+119
+122
+119
+117
+116
+82
+82
+82
+82
+82
+82
+82
+82
+85
+86
+87
+88
+89
+91
+92
+92
+98
+97
+97
+98
+101
+107
+113
+117
+122
+124
+127
+127
+124
+117
+109
+101
+99
+96
+95
+95
+94
+94
+97
+98
+101
+103
+105
+107
+107
+109
+109
+106
+106
+114
+113
+117
+139
+156
+162
+170
+164
+165
+166
+176
+194
+210
+221
+222
+223
+222
+222
+222
+222
+219
+216
+215
+213
+212
+210
+210
+210
+210
+212
+205
+189
+182
+174
+169
+171
+183
+192
+195
+200
+206
+212
+219
+221
+212
+194
+183
+221
+216
+212
+211
+215
+219
+221
+223
+223
+230
+234
+234
+229
+224
+222
+220
+220
+209
+199
+191
+185
+186
+191
+195
+195
+199
+208
+217
+224
+229
+233
+236
+230
+229
+229
+229
+229
+229
+229
+229
+224
+225
+228
+229
+230
+231
+231
+231
+235
+230
+223
+220
+214
+205
+193
+183
+169
+163
+160
+155
+153
+150
+151
+145
+144
+139
+135
+145
+188
+228
+229
+205
+189
+181
+170
+162
+155
+150
+149
+138
+88
+61
+56
+86
+127
+155
+161
+156
+146
+126
+104
+92
+89
+84
+72
+63
+58
+64
+60
+58
+60
+58
+65
+82
+93
+103
+112
+111
+108
+106
+105
+103
+108
+109
+111
+108
+109
+107
+109
+109
+113
+113
+114
+114
+116
+118
+121
+122
+123
+111
+101
+87
+87
+87
+87
+87
+87
+87
+87
+88
+89
+89
+91
+92
+93
+94
+95
+100
+99
+99
+99
+102
+106
+110
+112
+114
+116
+118
+118
+115
+109
+103
+98
+94
+90
+89
+87
+88
+88
+92
+94
+99
+99
+102
+103
+105
+106
+107
+106
+102
+111
+119
+129
+153
+168
+175
+180
+173
+170
+171
+177
+190
+204
+216
+220
+221
+220
+220
+220
+219
+218
+217
+215
+215
+213
+213
+213
+212
+212
+212
+206
+190
+182
+174
+166
+167
+178
+185
+190
+198
+199
+203
+210
+220
+225
+223
+221
+219
+214
+209
+208
+211
+215
+217
+218
+230
+234
+236
+234
+230
+226
+225
+219
+205
+194
+187
+180
+178
+181
+186
+191
+198
+205
+213
+220
+226
+230
+235
+239
+233
+231
+231
+230
+230
+229
+229
+227
+226
+227
+227
+228
+228
+228
+229
+229
+228
+227
+223
+217
+208
+196
+183
+172
+165
+160
+156
+151
+150
+146
+147
+140
+128
+128
+137
+157
+191
+215
+209
+183
+172
+164
+157
+152
+151
+151
+152
+140
+96
+83
+94
+122
+153
+165
+153
+136
+106
+97
+84
+74
+70
+63
+57
+53
+58
+65
+61
+58
+61
+58
+64
+82
+94
+103
+113
+112
+110
+107
+107
+104
+109
+110
+109
+109
+107
+107
+108
+109
+112
+112
+112
+115
+117
+120
+120
+120
+110
+100
+90
+93
+93
+93
+93
+93
+93
+93
+93
+91
+92
+93
+94
+95
+96
+97
+97
+101
+101
+100
+100
+101
+102
+104
+104
+105
+106
+107
+107
+105
+102
+98
+95
+90
+87
+85
+82
+81
+83
+87
+88
+94
+94
+97
+99
+103
+105
+107
+105
+101
+113
+123
+136
+162
+175
+177
+182
+182
+183
+182
+184
+189
+197
+204
+211
+217
+219
+219
+219
+218
+217
+217
+215
+215
+213
+213
+212
+212
+212
+210
+205
+192
+182
+173
+163
+163
+170
+179
+185
+196
+196
+197
+200
+208
+216
+220
+225
+216
+215
+210
+211
+216
+222
+227
+232
+236
+237
+234
+231
+230
+227
+224
+217
+193
+184
+179
+175
+175
+178
+182
+187
+200
+205
+213
+217
+223
+229
+234
+238
+234
+233
+233
+231
+231
+230
+229
+229
+227
+228
+228
+227
+227
+226
+225
+222
+221
+220
+218
+211
+200
+185
+173
+165
+161
+157
+153
+148
+147
+144
+144
+138
+122
+121
+136
+160
+185
+192
+184
+171
+162
+156
+153
+151
+151
+151
+152
+139
+115
+122
+147
+164
+171
+158
+124
+91
+63
+65
+65
+63
+58
+54
+54
+53
+57
+64
+61
+57
+61
+57
+64
+81
+96
+105
+115
+114
+112
+109
+109
+107
+112
+113
+111
+110
+108
+108
+108
+110
+112
+112
+112
+117
+120
+121
+117
+113
+95
+86
+79
+97
+97
+97
+97
+97
+97
+97
+97
+95
+96
+96
+97
+98
+99
+100
+100
+101
+102
+102
+103
+103
+102
+102
+102
+104
+104
+104
+104
+103
+101
+100
+99
+93
+90
+86
+82
+80
+80
+84
+85
+87
+89
+91
+93
+97
+100
+102
+102
+103
+111
+119
+138
+169
+182
+180
+183
+193
+195
+195
+193
+189
+189
+193
+202
+213
+217
+218
+217
+218
+216
+216
+213
+213
+212
+212
+212
+212
+212
+210
+205
+193
+182
+172
+162
+157
+162
+172
+181
+188
+191
+195
+197
+203
+206
+206
+211
+220
+223
+218
+218
+222
+226
+232
+235
+235
+235
+232
+229
+228
+224
+217
+204
+185
+177
+175
+174
+174
+176
+179
+181
+195
+202
+210
+217
+223
+227
+234
+236
+237
+235
+235
+234
+234
+232
+231
+230
+226
+225
+223
+224
+222
+220
+219
+217
+214
+213
+210
+202
+187
+175
+164
+158
+156
+152
+148
+146
+143
+141
+140
+135
+128
+118
+129
+153
+170
+172
+169
+166
+157
+152
+148
+148
+149
+149
+151
+141
+137
+153
+173
+166
+144
+115
+78
+47
+45
+51
+58
+61
+59
+58
+58
+60
+57
+63
+60
+57
+60
+57
+63
+80
+97
+106
+116
+115
+114
+111
+111
+109
+112
+115
+112
+111
+109
+109
+110
+112
+113
+114
+116
+121
+123
+119
+109
+101
+90
+82
+77
+99
+99
+99
+99
+99
+99
+99
+99
+99
+99
+100
+100
+101
+102
+102
+102
+102
+103
+104
+105
+105
+105
+104
+103
+106
+105
+105
+104
+104
+104
+104
+104
+100
+96
+91
+86
+80
+78
+78
+78
+80
+82
+84
+86
+88
+91
+93
+95
+99
+105
+112
+134
+172
+189
+191
+197
+205
+210
+209
+203
+194
+187
+184
+190
+208
+215
+216
+215
+217
+214
+214
+212
+212
+212
+212
+210
+210
+210
+210
+205
+193
+182
+171
+161
+154
+155
+163
+175
+179
+186
+194
+199
+203
+206
+208
+216
+232
+234
+228
+226
+223
+223
+225
+225
+233
+232
+231
+230
+226
+218
+206
+191
+181
+174
+174
+173
+173
+173
+173
+175
+184
+193
+205
+215
+221
+225
+231
+235
+237
+238
+238
+237
+234
+232
+231
+228
+225
+223
+223
+220
+219
+217
+215
+212
+207
+203
+197
+185
+173
+163
+158
+154
+150
+147
+145
+141
+138
+137
+136
+131
+131
+117
+123
+147
+164
+161
+158
+161
+152
+146
+144
+141
+143
+148
+151
+143
+141
+152
+157
+128
+93
+68
+50
+36
+45
+48
+53
+57
+60
+61
+58
+58
+57
+62
+59
+56
+59
+56
+62
+80
+98
+107
+117
+116
+115
+113
+113
+111
+114
+114
+114
+112
+109
+109
+112
+115
+116
+118
+120
+123
+122
+113
+100
+89
+92
+85
+81
+101
+101
+101
+101
+101
+101
+101
+101
+101
+102
+102
+102
+103
+103
+104
+104
+103
+104
+105
+106
+106
+106
+106
+106
+106
+105
+104
+104
+104
+104
+105
+106
+102
+98
+94
+88
+83
+77
+75
+73
+75
+76
+76
+78
+80
+81
+83
+84
+92
+95
+100
+124
+161
+181
+193
+211
+214
+220
+219
+210
+200
+189
+178
+183
+204
+212
+213
+213
+214
+213
+213
+212
+212
+210
+210
+210
+210
+210
+210
+205
+193
+181
+171
+162
+153
+149
+155
+167
+178
+185
+191
+195
+197
+203
+210
+223
+233
+237
+234
+232
+229
+228
+225
+224
+223
+224
+226
+224
+217
+207
+194
+181
+177
+172
+172
+171
+170
+169
+169
+171
+175
+183
+197
+206
+214
+222
+227
+232
+236
+239
+239
+238
+235
+233
+231
+228
+226
+224
+222
+218
+217
+213
+209
+205
+195
+187
+179
+170
+161
+155
+152
+149
+145
+141
+138
+136
+134
+132
+131
+127
+125
+116
+126
+151
+163
+156
+149
+152
+149
+144
+142
+140
+142
+147
+153
+145
+126
+121
+114
+85
+59
+47
+48
+48
+51
+52
+54
+60
+64
+63
+60
+55
+56
+62
+58
+55
+58
+55
+61
+79
+98
+107
+117
+117
+116
+113
+114
+112
+114
+115
+114
+112
+110
+112
+115
+118
+121
+123
+122
+120
+113
+103
+93
+88
+95
+87
+82
+103
+103
+103
+103
+103
+103
+103
+103
+103
+103
+103
+104
+104
+104
+104
+105
+106
+106
+106
+106
+105
+105
+105
+105
+105
+104
+104
+104
+104
+104
+104
+104
+102
+101
+98
+92
+87
+80
+76
+73
+73
+71
+71
+71
+72
+73
+72
+74
+82
+89
+92
+105
+129
+149
+174
+209
+217
+223
+223
+217
+207
+195
+183
+180
+201
+211
+212
+211
+213
+211
+211
+211
+210
+209
+209
+209
+209
+209
+209
+205
+193
+181
+172
+163
+152
+144
+149
+161
+173
+182
+191
+192
+194
+199
+208
+222
+232
+238
+236
+233
+229
+224
+220
+217
+204
+207
+211
+207
+199
+189
+180
+171
+170
+167
+167
+166
+165
+166
+166
+169
+170
+177
+188
+195
+203
+211
+220
+228
+233
+236
+236
+235
+233
+232
+229
+226
+224
+221
+218
+213
+207
+202
+199
+191
+177
+169
+162
+156
+152
+148
+145
+141
+139
+137
+135
+131
+130
+128
+127
+125
+120
+120
+133
+152
+157
+148
+144
+149
+147
+144
+144
+144
+146
+149
+152
+142
+107
+86
+74
+61
+54
+50
+52
+53
+54
+56
+61
+67
+69
+67
+64
+59
+55
+61
+58
+55
+58
+54
+61
+78
+97
+107
+117
+117
+116
+114
+114
+112
+113
+114
+113
+112
+111
+114
+117
+121
+127
+126
+122
+113
+102
+95
+93
+94
+97
+89
+82
+104
+104
+104
+104
+104
+104
+104
+104
+103
+104
+104
+104
+104
+104
+105
+105
+109
+108
+106
+105
+104
+103
+103
+104
+105
+105
+105
+105
+104
+104
+104
+104
+103
+102
+101
+98
+92
+85
+80
+77
+69
+68
+68
+68
+66
+66
+66
+67
+74
+84
+85
+89
+101
+115
+146
+192
+215
+222
+223
+220
+213
+204
+189
+184
+203
+207
+208
+210
+210
+210
+210
+210
+209
+209
+209
+209
+209
+209
+209
+205
+193
+182
+173
+167
+153
+143
+147
+159
+163
+176
+192
+198
+204
+208
+217
+227
+236
+238
+233
+226
+214
+202
+192
+187
+183
+187
+190
+187
+179
+169
+164
+160
+161
+159
+160
+161
+161
+163
+163
+164
+169
+173
+178
+184
+191
+201
+212
+224
+229
+232
+232
+231
+229
+228
+225
+222
+220
+216
+210
+202
+196
+188
+184
+176
+162
+153
+149
+147
+145
+143
+139
+133
+136
+133
+131
+128
+126
+124
+123
+123
+121
+128
+140
+150
+146
+139
+144
+153
+145
+146
+148
+150
+150
+151
+150
+140
+97
+69
+54
+56
+62
+60
+51
+45
+49
+55
+66
+71
+72
+66
+63
+59
+55
+61
+57
+54
+58
+54
+60
+78
+97
+106
+117
+116
+116
+114
+114
+112
+113
+113
+113
+112
+112
+115
+119
+123
+130
+128
+120
+106
+93
+89
+94
+101
+99
+90
+83
+105
+105
+105
+105
+105
+105
+105
+105
+105
+105
+105
+105
+105
+105
+105
+105
+106
+106
+106
+106
+106
+106
+106
+106
+106
+106
+106
+106
+106
+106
+106
+106
+103
+103
+102
+101
+98
+90
+83
+77
+72
+69
+65
+64
+63
+63
+63
+63
+72
+74
+67
+75
+92
+96
+128
+189
+217
+224
+226
+229
+226
+215
+203
+201
+199
+203
+204
+205
+205
+206
+209
+211
+210
+210
+210
+210
+209
+209
+209
+206
+187
+182
+177
+168
+154
+148
+149
+156
+174
+179
+186
+193
+205
+215
+226
+234
+232
+232
+221
+201
+187
+180
+176
+169
+171
+169
+164
+160
+155
+150
+147
+146
+150
+152
+153
+154
+155
+156
+158
+161
+162
+165
+171
+176
+182
+190
+197
+204
+218
+224
+226
+226
+226
+222
+218
+215
+216
+210
+199
+187
+178
+170
+166
+159
+153
+146
+145
+141
+139
+136
+135
+133
+128
+125
+124
+124
+124
+123
+121
+120
+119
+139
+151
+147
+142
+145
+147
+142
+152
+152
+145
+144
+151
+149
+148
+147
+93
+73
+65
+66
+62
+55
+50
+52
+52
+72
+90
+87
+77
+68
+65
+61
+58
+62
+59
+58
+59
+52
+59
+80
+99
+108
+117
+115
+114
+112
+114
+113
+112
+113
+114
+114
+115
+118
+123
+127
+130
+120
+106
+96
+94
+97
+102
+104
+100
+91
+84
+105
+105
+105
+105
+105
+105
+105
+105
+105
+105
+105
+105
+105
+105
+105
+105
+106
+106
+106
+106
+106
+106
+106
+106
+106
+106
+106
+106
+106
+106
+106
+106
+104
+104
+103
+103
+100
+94
+85
+79
+73
+69
+66
+64
+63
+62
+62
+61
+66
+65
+64
+72
+77
+82
+124
+185
+201
+221
+234
+230
+226
+226
+219
+209
+205
+206
+207
+207
+207
+206
+205
+205
+206
+208
+208
+208
+208
+208
+208
+205
+201
+197
+188
+174
+159
+150
+150
+155
+168
+180
+195
+209
+222
+230
+233
+234
+224
+219
+208
+190
+175
+171
+165
+159
+159
+156
+151
+149
+143
+139
+135
+136
+142
+143
+146
+145
+148
+148
+150
+153
+159
+161
+164
+168
+173
+178
+184
+189
+202
+208
+211
+213
+215
+214
+212
+209
+202
+195
+185
+176
+169
+164
+159
+153
+146
+140
+138
+136
+134
+132
+131
+129
+126
+124
+123
+121
+120
+119
+117
+119
+128
+144
+152
+145
+140
+143
+146
+144
+147
+152
+152
+151
+156
+148
+142
+138
+93
+88
+95
+90
+73
+54
+52
+60
+79
+89
+95
+87
+74
+66
+63
+60
+57
+61
+58
+57
+60
+53
+59
+80
+100
+108
+117
+116
+114
+113
+114
+113
+115
+114
+112
+113
+116
+120
+124
+127
+123
+111
+99
+93
+97
+101
+101
+99
+100
+91
+84
+105
+105
+105
+105
+105
+105
+105
+105
+105
+105
+105
+105
+105
+105
+105
+105
+106
+106
+106
+106
+106
+106
+106
+106
+106
+106
+106
+106
+106
+106
+106
+106
+108
+107
+105
+105
+102
+97
+89
+83
+77
+72
+68
+65
+65
+63
+62
+61
+62
+58
+66
+73
+69
+84
+132
+181
+179
+214
+239
+236
+230
+235
+232
+219
+203
+201
+201
+201
+203
+202
+200
+200
+202
+203
+203
+203
+203
+204
+204
+203
+194
+190
+182
+173
+161
+158
+160
+167
+188
+199
+214
+225
+231
+233
+229
+223
+216
+209
+195
+177
+166
+161
+156
+152
+149
+146
+143
+138
+133
+130
+126
+129
+132
+136
+137
+137
+139
+139
+142
+143
+150
+152
+155
+158
+162
+167
+170
+175
+185
+190
+193
+196
+197
+197
+195
+193
+182
+178
+170
+163
+158
+155
+152
+148
+141
+136
+135
+132
+130
+128
+128
+127
+125
+122
+122
+119
+118
+117
+116
+118
+136
+148
+150
+142
+136
+141
+145
+146
+146
+153
+153
+154
+154
+147
+141
+141
+129
+126
+128
+108
+76
+54
+61
+76
+101
+101
+93
+80
+69
+63
+61
+58
+56
+59
+56
+57
+61
+54
+60
+80
+100
+109
+118
+116
+115
+113
+114
+112
+117
+112
+110
+112
+117
+121
+125
+124
+112
+102
+92
+92
+101
+105
+102
+95
+99
+90
+83
+105
+105
+105
+105
+105
+105
+105
+105
+106
+106
+106
+106
+106
+106
+106
+106
+107
+107
+107
+107
+107
+107
+107
+107
+107
+107
+107
+107
+107
+107
+107
+107
+110
+109
+106
+106
+104
+101
+95
+89
+82
+77
+71
+68
+67
+66
+64
+62
+63
+60
+71
+76
+77
+110
+152
+167
+158
+197
+229
+239
+237
+237
+234
+227
+205
+199
+197
+197
+200
+202
+203
+205
+209
+209
+210
+210
+211
+211
+211
+211
+211
+209
+203
+198
+194
+195
+199
+206
+217
+221
+226
+228
+228
+226
+224
+220
+214
+202
+189
+173
+161
+155
+151
+148
+142
+140
+138
+133
+130
+125
+123
+124
+128
+131
+131
+132
+132
+133
+135
+136
+137
+140
+143
+147
+150
+156
+160
+163
+170
+173
+175
+176
+176
+176
+175
+174
+168
+165
+158
+155
+149
+146
+145
+142
+136
+133
+131
+129
+127
+126
+125
+125
+124
+122
+121
+119
+115
+113
+114
+117
+140
+146
+145
+138
+135
+139
+147
+151
+150
+155
+152
+148
+150
+144
+144
+151
+148
+133
+117
+89
+67
+63
+80
+99
+101
+92
+78
+67
+63
+62
+61
+59
+55
+58
+55
+57
+61
+55
+60
+79
+98
+108
+118
+117
+116
+114
+114
+111
+113
+111
+111
+115
+122
+124
+122
+117
+99
+94
+91
+95
+103
+106
+102
+96
+98
+89
+82
+105
+105
+105
+105
+105
+105
+105
+105
+106
+106
+106
+106
+106
+106
+106
+106
+107
+107
+107
+107
+107
+107
+107
+107
+107
+107
+107
+107
+107
+107
+107
+107
+111
+110
+107
+107
+107
+104
+100
+96
+88
+82
+78
+73
+71
+68
+66
+63
+64
+65
+77
+83
+101
+148
+170
+153
+155
+179
+214
+241
+245
+235
+232
+233
+217
+211
+205
+203
+206
+210
+213
+215
+218
+218
+221
+221
+222
+222
+224
+224
+235
+232
+227
+220
+216
+216
+219
+224
+224
+225
+227
+226
+228
+226
+228
+224
+218
+203
+188
+174
+163
+153
+147
+146
+141
+138
+137
+132
+130
+128
+125
+125
+127
+128
+128
+128
+128
+129
+129
+131
+130
+132
+134
+138
+140
+144
+146
+148
+155
+158
+159
+160
+161
+162
+162
+162
+159
+156
+152
+148
+143
+140
+137
+135
+132
+130
+129
+128
+125
+125
+124
+123
+122
+121
+120
+118
+113
+111
+113
+116
+140
+141
+137
+132
+133
+140
+147
+152
+152
+156
+152
+147
+146
+136
+131
+134
+110
+90
+74
+65
+73
+87
+100
+106
+88
+76
+63
+58
+60
+62
+60
+58
+56
+58
+54
+56
+62
+55
+59
+76
+95
+105
+116
+116
+116
+114
+115
+112
+110
+109
+112
+119
+124
+122
+114
+105
+90
+92
+97
+101
+103
+103
+104
+102
+99
+89
+82
+105
+105
+105
+105
+105
+105
+105
+105
+107
+107
+107
+107
+107
+107
+107
+107
+108
+108
+108
+108
+108
+108
+108
+108
+108
+108
+108
+108
+108
+108
+108
+108
+111
+110
+107
+108
+108
+107
+103
+100
+94
+89
+83
+77
+75
+71
+69
+64
+61
+66
+81
+98
+129
+169
+178
+155
+175
+184
+208
+242
+254
+243
+237
+242
+227
+218
+212
+208
+209
+212
+214
+214
+217
+218
+220
+221
+222
+222
+224
+224
+226
+225
+220
+217
+214
+215
+216
+219
+224
+228
+230
+232
+231
+228
+223
+219
+221
+205
+188
+175
+165
+153
+146
+144
+140
+137
+136
+134
+132
+129
+129
+128
+128
+127
+127
+127
+127
+127
+127
+127
+128
+129
+131
+131
+133
+132
+133
+133
+141
+143
+145
+148
+151
+154
+158
+159
+153
+150
+147
+144
+138
+135
+132
+130
+130
+129
+127
+126
+123
+123
+123
+122
+120
+120
+119
+115
+112
+111
+114
+118
+139
+137
+132
+130
+133
+139
+146
+151
+147
+153
+151
+149
+144
+123
+102
+96
+69
+62
+63
+74
+95
+107
+101
+88
+77
+64
+54
+55
+61
+61
+58
+55
+56
+58
+54
+56
+62
+55
+57
+73
+91
+101
+114
+115
+115
+114
+115
+112
+109
+111
+115
+120
+122
+115
+105
+96
+89
+94
+101
+103
+102
+101
+103
+104
+97
+88
+81
+105
+105
+105
+105
+105
+105
+105
+105
+107
+107
+107
+107
+107
+107
+107
+107
+108
+108
+108
+108
+108
+108
+108
+108
+108
+108
+108
+108
+108
+108
+108
+108
+111
+109
+107
+108
+109
+108
+105
+102
+98
+94
+88
+82
+79
+74
+73
+65
+60
+66
+86
+122
+163
+178
+180
+183
+197
+193
+200
+222
+241
+242
+233
+228
+219
+213
+207
+205
+207
+208
+208
+205
+210
+210
+212
+213
+215
+216
+217
+218
+221
+221
+222
+221
+223
+224
+227
+229
+231
+234
+236
+236
+231
+226
+219
+214
+219
+204
+188
+177
+169
+155
+147
+145
+139
+139
+138
+137
+136
+135
+136
+133
+128
+125
+125
+125
+125
+125
+125
+124
+124
+124
+126
+126
+125
+125
+126
+126
+131
+131
+135
+137
+141
+145
+149
+150
+146
+145
+141
+138
+135
+131
+128
+126
+128
+128
+126
+125
+124
+122
+122
+121
+117
+118
+118
+114
+111
+111
+115
+120
+138
+134
+129
+130
+133
+137
+142
+145
+146
+151
+147
+145
+138
+110
+80
+69
+65
+75
+87
+96
+103
+100
+86
+71
+65
+55
+49
+54
+61
+60
+56
+55
+57
+59
+54
+57
+63
+55
+55
+70
+86
+97
+111
+113
+115
+114
+116
+113
+111
+113
+117
+118
+115
+106
+98
+91
+94
+96
+99
+101
+102
+102
+102
+101
+96
+87
+80
+105
+105
+105
+105
+105
+105
+105
+105
+107
+107
+107
+107
+107
+107
+107
+107
+108
+108
+108
+108
+108
+108
+108
+108
+108
+108
+108
+108
+108
+108
+108
+108
+110
+109
+109
+109
+109
+108
+106
+103
+100
+96
+90
+85
+80
+77
+73
+69
+65
+71
+92
+137
+175
+169
+169
+203
+195
+189
+185
+195
+216
+229
+221
+205
+209
+207
+205
+206
+210
+210
+206
+201
+207
+209
+210
+212
+214
+217
+220
+222
+222
+223
+222
+223
+225
+224
+224
+225
+232
+234
+232
+231
+228
+228
+226
+223
+215
+200
+184
+177
+169
+155
+146
+142
+137
+136
+136
+136
+136
+138
+137
+136
+128
+126
+126
+124
+124
+124
+124
+124
+120
+121
+124
+124
+125
+125
+125
+125
+126
+127
+128
+129
+132
+133
+134
+134
+138
+136
+136
+133
+132
+128
+126
+125
+125
+125
+124
+121
+122
+120
+120
+120
+114
+117
+118
+114
+110
+110
+116
+120
+138
+132
+128
+132
+136
+140
+140
+141
+149
+148
+139
+132
+127
+101
+71
+61
+73
+90
+103
+99
+89
+83
+78
+74
+58
+48
+44
+53
+61
+60
+58
+57
+59
+59
+55
+57
+63
+56
+56
+69
+85
+97
+110
+114
+114
+114
+115
+113
+114
+117
+118
+116
+111
+102
+94
+91
+100
+97
+96
+99
+102
+103
+101
+97
+96
+87
+80
+105
+105
+105
+106
+106
+107
+107
+107
+106
+106
+106
+106
+106
+106
+106
+106
+107
+107
+107
+107
+107
+107
+107
+107
+108
+108
+108
+108
+108
+108
+108
+110
+107
+112
+116
+114
+110
+106
+104
+104
+103
+103
+99
+91
+86
+83
+78
+71
+76
+74
+98
+145
+182
+187
+183
+185
+182
+189
+194
+200
+205
+208
+211
+211
+205
+205
+208
+211
+212
+207
+206
+207
+200
+201
+203
+207
+212
+216
+222
+222
+225
+223
+223
+224
+224
+225
+225
+227
+227
+228
+228
+227
+227
+227
+227
+224
+211
+197
+184
+170
+160
+151
+142
+134
+131
+129
+129
+129
+132
+135
+136
+136
+133
+132
+132
+129
+129
+128
+128
+128
+126
+126
+126
+126
+126
+126
+126
+126
+125
+125
+126
+126
+128
+128
+128
+126
+128
+126
+125
+124
+123
+122
+120
+120
+120
+120
+119
+118
+118
+116
+115
+113
+109
+114
+110
+109
+111
+109
+113
+127
+133
+133
+134
+136
+139
+144
+148
+149
+147
+141
+137
+130
+111
+89
+77
+79
+106
+98
+89
+85
+82
+77
+73
+67
+55
+52
+50
+54
+60
+64
+64
+60
+53
+51
+52
+55
+57
+59
+61
+60
+83
+97
+110
+115
+114
+114
+115
+114
+117
+126
+126
+112
+98
+94
+94
+94
+96
+98
+100
+102
+101
+99
+96
+94
+95
+84
+75
+105
+105
+105
+106
+106
+107
+107
+107
+106
+106
+106
+106
+106
+106
+106
+106
+107
+107
+107
+107
+107
+107
+107
+107
+108
+108
+108
+108
+108
+108
+108
+110
+114
+113
+114
+113
+114
+111
+109
+106
+103
+107
+111
+108
+104
+99
+91
+82
+80
+72
+81
+107
+127
+132
+136
+147
+177
+184
+187
+192
+192
+193
+194
+194
+205
+197
+192
+195
+205
+209
+205
+199
+202
+202
+204
+208
+214
+219
+223
+224
+223
+223
+223
+223
+224
+224
+225
+225
+224
+225
+224
+224
+226
+226
+226
+224
+213
+200
+186
+172
+160
+148
+138
+130
+128
+126
+126
+127
+131
+134
+136
+137
+135
+133
+132
+132
+131
+130
+130
+130
+127
+127
+127
+127
+126
+126
+126
+126
+125
+125
+125
+125
+125
+125
+124
+124
+124
+122
+122
+121
+121
+121
+119
+119
+119
+119
+116
+115
+114
+114
+112
+112
+107
+113
+109
+108
+111
+108
+112
+126
+132
+133
+136
+139
+144
+148
+149
+148
+138
+133
+128
+123
+115
+104
+102
+103
+94
+88
+80
+76
+75
+75
+71
+67
+60
+56
+54
+55
+60
+63
+62
+59
+52
+51
+53
+54
+58
+60
+62
+62
+81
+94
+107
+112
+112
+113
+115
+115
+120
+124
+120
+107
+96
+93
+93
+92
+96
+97
+99
+101
+100
+98
+96
+94
+93
+82
+73
+105
+105
+105
+106
+106
+107
+107
+107
+106
+106
+106
+106
+106
+106
+106
+106
+107
+107
+107
+107
+107
+107
+107
+107
+108
+108
+108
+108
+108
+108
+108
+110
+113
+111
+109
+109
+113
+111
+108
+104
+102
+112
+123
+126
+127
+122
+112
+101
+84
+70
+67
+77
+83
+85
+93
+108
+110
+117
+126
+135
+146
+155
+165
+171
+185
+183
+181
+186
+198
+206
+210
+207
+208
+209
+211
+213
+215
+219
+222
+222
+222
+222
+222
+221
+223
+222
+223
+223
+222
+222
+221
+220
+221
+221
+221
+220
+214
+206
+195
+179
+162
+148
+136
+131
+130
+127
+126
+127
+131
+134
+135
+136
+135
+132
+132
+132
+130
+130
+128
+128
+127
+127
+126
+126
+126
+126
+126
+126
+125
+125
+125
+125
+124
+123
+123
+123
+123
+123
+122
+121
+120
+120
+120
+120
+116
+116
+115
+115
+114
+113
+111
+111
+106
+111
+109
+107
+108
+105
+109
+125
+135
+135
+139
+142
+145
+146
+148
+145
+140
+135
+126
+116
+111
+111
+108
+102
+81
+75
+69
+68
+69
+71
+71
+69
+63
+60
+57
+55
+58
+60
+59
+57
+54
+53
+54
+54
+58
+60
+61
+61
+77
+90
+102
+108
+110
+113
+117
+116
+122
+119
+110
+99
+92
+92
+92
+90
+95
+97
+98
+100
+99
+97
+95
+93
+91
+80
+70
+105
+105
+105
+106
+106
+107
+107
+107
+106
+106
+106
+106
+106
+106
+106
+106
+107
+107
+107
+107
+107
+107
+107
+107
+108
+108
+108
+108
+108
+108
+108
+110
+114
+111
+109
+107
+107
+108
+108
+106
+106
+120
+136
+145
+149
+146
+137
+125
+96
+79
+68
+70
+72
+70
+76
+86
+80
+82
+86
+89
+92
+97
+101
+109
+136
+157
+173
+181
+188
+196
+208
+216
+212
+213
+214
+216
+217
+219
+219
+221
+222
+221
+221
+221
+221
+221
+221
+220
+219
+218
+217
+217
+218
+218
+219
+217
+214
+211
+201
+186
+167
+152
+140
+133
+131
+127
+126
+127
+131
+132
+135
+136
+132
+132
+132
+131
+130
+130
+127
+127
+127
+127
+126
+126
+126
+126
+126
+126
+125
+124
+125
+123
+123
+123
+123
+120
+123
+121
+121
+121
+120
+120
+120
+118
+115
+115
+115
+114
+113
+111
+111
+109
+106
+111
+108
+104
+107
+104
+108
+124
+138
+140
+141
+143
+144
+145
+144
+140
+137
+133
+121
+105
+100
+100
+92
+78
+69
+65
+61
+60
+63
+67
+70
+71
+66
+62
+58
+57
+57
+57
+56
+55
+55
+54
+54
+54
+58
+59
+60
+60
+74
+86
+98
+106
+110
+115
+119
+120
+123
+114
+101
+92
+90
+92
+92
+90
+95
+96
+97
+98
+97
+96
+94
+93
+90
+78
+69
+104
+104
+104
+105
+105
+106
+106
+106
+105
+105
+105
+105
+105
+105
+105
+105
+107
+107
+107
+107
+107
+107
+107
+107
+108
+108
+108
+108
+108
+108
+108
+108
+114
+116
+115
+109
+106
+108
+115
+122
+129
+144
+160
+168
+171
+168
+163
+153
+122
+99
+79
+71
+69
+66
+66
+69
+75
+74
+71
+68
+65
+65
+64
+70
+85
+113
+142
+160
+175
+191
+204
+211
+213
+215
+216
+217
+218
+218
+218
+218
+221
+221
+221
+219
+219
+219
+219
+217
+218
+217
+214
+213
+213
+213
+213
+214
+212
+211
+206
+193
+174
+158
+145
+138
+132
+129
+128
+128
+129
+132
+134
+135
+132
+131
+130
+130
+130
+129
+127
+127
+126
+126
+126
+126
+125
+125
+125
+125
+124
+122
+124
+121
+121
+120
+120
+118
+121
+121
+120
+118
+118
+117
+117
+116
+114
+113
+113
+112
+111
+110
+110
+109
+106
+109
+106
+104
+106
+102
+106
+125
+141
+143
+144
+144
+144
+142
+138
+131
+123
+118
+107
+93
+89
+89
+79
+63
+58
+55
+52
+53
+56
+61
+67
+69
+66
+63
+60
+58
+56
+55
+53
+52
+53
+53
+54
+54
+57
+58
+59
+59
+71
+82
+96
+105
+111
+117
+121
+121
+120
+110
+96
+90
+91
+94
+94
+93
+96
+97
+98
+98
+97
+96
+95
+94
+87
+76
+66
+104
+104
+104
+105
+105
+106
+106
+106
+105
+105
+105
+105
+105
+105
+105
+105
+107
+107
+107
+107
+107
+107
+107
+107
+108
+108
+108
+108
+108
+108
+108
+108
+107
+110
+112
+108
+107
+114
+132
+145
+167
+181
+196
+201
+201
+197
+192
+185
+164
+136
+102
+80
+70
+62
+59
+58
+56
+56
+56
+58
+60
+64
+67
+71
+64
+83
+104
+129
+163
+192
+204
+202
+211
+214
+216
+218
+219
+219
+220
+220
+221
+221
+219
+219
+218
+218
+218
+217
+217
+215
+214
+212
+211
+210
+211
+212
+212
+213
+208
+198
+182
+165
+150
+140
+134
+130
+129
+128
+129
+131
+132
+133
+130
+130
+130
+130
+129
+127
+127
+126
+126
+126
+126
+126
+125
+125
+125
+125
+122
+122
+121
+121
+120
+118
+118
+116
+119
+117
+117
+115
+116
+115
+114
+114
+113
+113
+112
+111
+110
+109
+108
+106
+104
+108
+105
+102
+104
+101
+105
+123
+142
+146
+145
+143
+141
+135
+129
+124
+115
+107
+96
+86
+80
+74
+64
+52
+51
+50
+48
+48
+50
+53
+57
+60
+63
+63
+62
+58
+58
+53
+51
+49
+51
+51
+52
+52
+56
+57
+59
+59
+67
+79
+93
+105
+112
+119
+121
+119
+113
+102
+90
+88
+92
+93
+93
+94
+96
+96
+96
+96
+96
+95
+94
+93
+85
+74
+65
+104
+104
+104
+105
+105
+106
+106
+106
+105
+105
+105
+105
+105
+105
+105
+105
+107
+107
+107
+107
+107
+107
+107
+107
+108
+108
+108
+108
+108
+108
+108
+108
+106
+106
+107
+107
+117
+136
+159
+176
+195
+211
+226
+231
+231
+227
+222
+217
+206
+184
+151
+121
+95
+75
+64
+59
+62
+61
+61
+59
+59
+58
+57
+58
+63
+69
+81
+99
+137
+177
+199
+202
+205
+209
+213
+216
+219
+221
+224
+223
+222
+221
+221
+220
+220
+219
+219
+217
+218
+216
+213
+212
+211
+210
+211
+212
+217
+217
+209
+200
+188
+172
+153
+140
+137
+131
+129
+128
+129
+131
+131
+132
+130
+130
+130
+129
+127
+127
+126
+125
+126
+126
+125
+125
+125
+125
+125
+125
+122
+121
+120
+120
+119
+116
+115
+114
+116
+115
+114
+113
+114
+112
+112
+112
+111
+111
+110
+110
+109
+108
+107
+105
+103
+107
+104
+101
+104
+98
+102
+122
+144
+146
+145
+142
+136
+129
+120
+114
+107
+94
+82
+75
+67
+57
+50
+48
+49
+49
+48
+47
+47
+48
+50
+52
+57
+59
+61
+60
+59
+54
+51
+49
+46
+48
+49
+50
+55
+57
+58
+58
+63
+75
+91
+104
+113
+119
+119
+115
+103
+94
+85
+87
+91
+91
+91
+93
+95
+95
+95
+95
+94
+94
+93
+93
+85
+74
+64
+104
+104
+104
+105
+105
+106
+106
+106
+105
+105
+105
+105
+105
+105
+105
+105
+107
+107
+107
+107
+107
+107
+107
+107
+108
+108
+108
+108
+108
+108
+108
+108
+112
+110
+108
+116
+135
+161
+188
+206
+207
+224
+242
+250
+251
+247
+241
+240
+232
+221
+193
+162
+125
+94
+75
+67
+65
+65
+64
+66
+65
+66
+67
+65
+59
+66
+71
+76
+102
+145
+181
+199
+192
+199
+206
+211
+216
+222
+225
+226
+221
+219
+219
+220
+220
+219
+219
+219
+220
+217
+215
+212
+212
+211
+210
+213
+221
+219
+210
+202
+191
+176
+156
+139
+138
+133
+130
+128
+129
+129
+131
+132
+130
+130
+130
+127
+127
+126
+125
+125
+126
+126
+125
+125
+125
+125
+125
+123
+121
+119
+120
+117
+116
+115
+114
+113
+114
+113
+112
+110
+112
+109
+111
+111
+111
+111
+110
+109
+108
+106
+105
+104
+102
+107
+104
+99
+101
+98
+101
+120
+142
+146
+142
+138
+131
+122
+113
+104
+90
+73
+63
+62
+57
+48
+47
+54
+52
+53
+53
+52
+50
+48
+48
+49
+54
+58
+61
+62
+60
+55
+50
+49
+44
+46
+48
+49
+54
+56
+58
+58
+60
+73
+89
+103
+112
+118
+117
+112
+96
+88
+83
+87
+91
+89
+89
+92
+95
+95
+94
+94
+94
+93
+93
+93
+83
+72
+63
+105
+105
+105
+105
+105
+105
+105
+105
+105
+105
+105
+105
+105
+105
+105
+106
+107
+107
+107
+108
+108
+109
+109
+109
+109
+109
+109
+109
+109
+109
+109
+108
+105
+103
+118
+147
+175
+196
+218
+234
+243
+246
+252
+255
+255
+255
+252
+253
+247
+242
+224
+198
+170
+136
+98
+69
+68
+67
+70
+71
+70
+67
+70
+73
+65
+66
+70
+75
+101
+147
+198
+233
+211
+199
+191
+195
+210
+219
+225
+225
+220
+220
+217
+210
+215
+225
+225
+216
+218
+218
+217
+215
+215
+212
+209
+211
+222
+219
+211
+202
+190
+176
+159
+144
+140
+135
+131
+129
+128
+127
+129
+129
+127
+127
+127
+126
+126
+124
+124
+124
+124
+124
+124
+124
+122
+122
+122
+122
+121
+119
+119
+117
+116
+113
+112
+112
+111
+109
+109
+108
+109
+108
+109
+109
+105
+109
+112
+111
+107
+103
+103
+104
+101
+105
+100
+93
+96
+95
+98
+115
+140
+143
+136
+129
+125
+118
+102
+84
+68
+62
+58
+53
+52
+51
+52
+52
+54
+55
+54
+52
+51
+49
+47
+46
+46
+50
+54
+58
+58
+56
+52
+49
+42
+44
+45
+46
+52
+55
+58
+58
+54
+68
+87
+104
+115
+119
+114
+107
+91
+88
+84
+84
+87
+90
+91
+90
+94
+98
+98
+94
+92
+95
+96
+94
+83
+70
+61
+105
+105
+105
+105
+105
+105
+105
+105
+105
+105
+105
+105
+105
+105
+105
+105
+107
+107
+107
+108
+108
+109
+109
+109
+109
+109
+109
+109
+109
+109
+109
+108
+103
+111
+134
+164
+193
+214
+234
+247
+247
+248
+252
+254
+255
+255
+255
+255
+255
+251
+237
+215
+192
+164
+130
+103
+76
+71
+69
+71
+72
+73
+76
+75
+66
+71
+81
+96
+124
+166
+207
+232
+255
+234
+201
+188
+199
+213
+219
+216
+213
+210
+215
+219
+218
+212
+214
+221
+217
+217
+218
+218
+217
+214
+212
+212
+220
+219
+211
+203
+191
+177
+160
+146
+140
+135
+131
+129
+128
+127
+129
+129
+127
+127
+127
+126
+125
+124
+124
+124
+124
+124
+124
+124
+122
+123
+123
+122
+119
+117
+117
+115
+114
+110
+111
+109
+109
+108
+108
+108
+108
+106
+108
+108
+107
+110
+111
+110
+108
+105
+103
+101
+99
+100
+95
+94
+98
+94
+96
+112
+129
+135
+135
+126
+114
+100
+81
+62
+58
+54
+53
+51
+52
+52
+53
+55
+55
+55
+55
+53
+52
+49
+47
+47
+46
+49
+52
+56
+57
+56
+52
+52
+46
+46
+46
+45
+50
+52
+56
+57
+55
+68
+87
+104
+116
+119
+112
+103
+89
+87
+84
+84
+86
+89
+89
+89
+91
+95
+95
+92
+91
+94
+94
+94
+82
+70
+59
+105
+105
+105
+105
+105
+105
+105
+105
+105
+105
+105
+105
+105
+105
+105
+105
+107
+107
+107
+108
+108
+109
+109
+109
+109
+109
+109
+109
+109
+110
+110
+108
+101
+121
+151
+178
+205
+228
+244
+250
+251
+252
+253
+254
+255
+255
+255
+255
+254
+250
+239
+225
+210
+188
+160
+135
+96
+81
+68
+68
+74
+76
+75
+73
+68
+84
+107
+130
+157
+192
+219
+234
+248
+255
+255
+234
+190
+177
+198
+219
+216
+207
+202
+204
+210
+214
+216
+217
+214
+216
+217
+217
+217
+214
+213
+213
+217
+217
+210
+203
+192
+178
+161
+147
+142
+137
+131
+129
+127
+126
+128
+128
+127
+127
+126
+125
+125
+124
+123
+123
+125
+125
+123
+123
+123
+123
+122
+120
+116
+113
+114
+111
+110
+108
+108
+107
+108
+106
+106
+106
+106
+105
+106
+106
+110
+109
+109
+109
+109
+105
+102
+99
+100
+97
+93
+95
+99
+92
+95
+115
+125
+129
+126
+112
+94
+79
+63
+52
+50
+48
+49
+50
+52
+52
+53
+55
+55
+55
+54
+53
+53
+50
+48
+48
+46
+48
+50
+54
+55
+56
+56
+57
+52
+51
+47
+44
+47
+49
+53
+54
+54
+68
+89
+107
+119
+119
+108
+95
+87
+87
+84
+84
+86
+88
+89
+89
+90
+93
+95
+93
+93
+95
+94
+90
+78
+65
+54
+105
+105
+105
+105
+105
+105
+105
+105
+105
+105
+105
+105
+105
+105
+105
+105
+106
+107
+107
+108
+108
+109
+109
+109
+109
+109
+109
+110
+110
+110
+110
+109
+106
+131
+163
+185
+208
+229
+243
+245
+251
+251
+252
+252
+253
+254
+255
+255
+248
+244
+238
+230
+221
+206
+182
+161
+128
+102
+77
+70
+72
+75
+72
+68
+80
+106
+139
+164
+183
+203
+223
+234
+247
+255
+255
+255
+245
+227
+200
+176
+194
+200
+199
+195
+199
+211
+213
+207
+210
+212
+213
+216
+214
+214
+213
+213
+214
+213
+210
+204
+192
+178
+162
+149
+142
+137
+131
+129
+127
+126
+128
+128
+127
+127
+126
+125
+125
+124
+123
+123
+126
+126
+124
+123
+123
+123
+122
+120
+114
+111
+111
+109
+108
+107
+106
+104
+105
+105
+105
+104
+104
+104
+104
+104
+109
+108
+106
+105
+106
+106
+102
+97
+101
+97
+93
+97
+98
+89
+97
+121
+129
+118
+105
+87
+73
+64
+58
+56
+48
+47
+51
+52
+53
+53
+54
+54
+55
+54
+54
+52
+51
+51
+49
+49
+46
+47
+48
+50
+53
+55
+59
+60
+57
+55
+50
+45
+46
+47
+50
+52
+52
+69
+93
+114
+123
+119
+102
+85
+83
+84
+83
+83
+84
+85
+86
+86
+87
+91
+93
+92
+94
+95
+92
+87
+73
+61
+49
+103
+103
+103
+103
+103
+103
+103
+103
+103
+103
+103
+103
+103
+103
+103
+105
+106
+107
+107
+108
+108
+109
+109
+109
+109
+109
+109
+110
+110
+111
+111
+110
+113
+135
+164
+183
+205
+227
+242
+244
+248
+250
+251
+253
+252
+250
+249
+246
+246
+243
+240
+238
+233
+222
+202
+182
+157
+125
+89
+71
+70
+70
+67
+65
+98
+133
+170
+192
+203
+213
+230
+241
+249
+250
+251
+255
+255
+255
+233
+182
+164
+178
+192
+199
+197
+190
+193
+202
+203
+206
+209
+210
+211
+211
+211
+211
+211
+210
+208
+201
+189
+175
+160
+149
+142
+137
+131
+129
+127
+126
+127
+127
+126
+126
+126
+125
+124
+123
+123
+123
+124
+124
+124
+123
+122
+121
+121
+119
+110
+109
+108
+108
+107
+104
+104
+104
+105
+104
+104
+103
+103
+103
+103
+104
+107
+104
+102
+103
+105
+104
+101
+98
+99
+98
+95
+93
+93
+86
+98
+123
+116
+97
+78
+65
+61
+59
+57
+57
+51
+51
+53
+54
+54
+55
+53
+52
+54
+52
+51
+51
+51
+50
+49
+49
+46
+46
+47
+48
+51
+54
+58
+60
+61
+58
+53
+48
+48
+47
+49
+49
+50
+71
+98
+119
+124
+113
+92
+74
+79
+81
+81
+81
+81
+81
+83
+83
+87
+91
+93
+93
+95
+95
+90
+82
+65
+54
+43
+103
+103
+103
+103
+103
+103
+103
+103
+103
+103
+103
+103
+103
+103
+103
+105
+106
+107
+107
+108
+108
+109
+109
+109
+109
+109
+110
+110
+111
+112
+112
+110
+108
+122
+147
+171
+196
+220
+237
+244
+245
+246
+250
+251
+251
+248
+245
+241
+244
+244
+244
+243
+242
+233
+216
+197
+177
+143
+101
+77
+71
+70
+71
+74
+122
+158
+195
+215
+222
+230
+243
+252
+243
+254
+255
+255
+255
+255
+255
+255
+212
+181
+162
+178
+190
+182
+182
+199
+199
+202
+205
+208
+208
+208
+208
+208
+210
+210
+206
+197
+184
+170
+158
+149
+142
+137
+131
+129
+127
+126
+127
+127
+126
+126
+126
+125
+124
+123
+123
+123
+124
+123
+123
+122
+121
+120
+119
+117
+110
+108
+108
+106
+105
+105
+104
+103
+103
+103
+102
+102
+102
+102
+102
+102
+104
+104
+103
+103
+103
+104
+103
+102
+97
+101
+94
+92
+96
+97
+105
+117
+88
+69
+60
+57
+59
+56
+53
+51
+54
+53
+55
+54
+54
+53
+53
+51
+50
+49
+50
+49
+49
+49
+49
+49
+46
+46
+46
+47
+48
+51
+54
+55
+60
+58
+56
+53
+52
+50
+49
+48
+48
+72
+101
+117
+116
+102
+82
+66
+75
+78
+80
+80
+78
+78
+79
+81
+86
+90
+93
+94
+95
+95
+86
+78
+59
+48
+38
+103
+103
+103
+103
+103
+103
+103
+103
+103
+103
+103
+103
+103
+103
+103
+105
+106
+107
+107
+108
+108
+109
+109
+109
+109
+109
+110
+110
+111
+112
+113
+111
+104
+109
+133
+163
+191
+211
+229
+240
+242
+245
+248
+250
+252
+250
+248
+246
+246
+247
+250
+252
+253
+247
+231
+213
+192
+158
+117
+90
+80
+83
+91
+99
+146
+176
+210
+230
+242
+249
+255
+255
+255
+255
+249
+247
+251
+255
+255
+255
+255
+234
+183
+168
+174
+183
+185
+191
+195
+198
+202
+203
+205
+204
+203
+204
+209
+208
+204
+194
+179
+166
+156
+149
+140
+135
+133
+129
+127
+126
+127
+127
+126
+126
+126
+125
+124
+123
+123
+123
+123
+123
+121
+120
+119
+118
+118
+115
+110
+106
+106
+106
+106
+104
+104
+104
+103
+102
+102
+102
+100
+100
+100
+102
+103
+104
+105
+105
+104
+105
+106
+108
+103
+107
+98
+97
+111
+120
+116
+110
+67
+53
+52
+56
+56
+52
+49
+50
+53
+53
+53
+52
+52
+52
+52
+51
+47
+46
+48
+46
+46
+46
+48
+48
+49
+48
+48
+47
+48
+49
+51
+52
+57
+58
+59
+58
+58
+54
+50
+47
+50
+73
+99
+109
+102
+87
+73
+63
+72
+76
+78
+78
+76
+76
+77
+79
+85
+89
+91
+93
+94
+92
+81
+71
+54
+43
+34
+103
+103
+103
+103
+103
+103
+103
+103
+103
+103
+103
+103
+103
+103
+103
+105
+106
+106
+106
+108
+108
+109
+109
+109
+109
+108
+109
+110
+111
+110
+111
+109
+107
+109
+131
+165
+195
+213
+230
+244
+244
+247
+249
+250
+252
+252
+252
+253
+251
+254
+255
+255
+255
+255
+239
+221
+193
+162
+124
+98
+88
+93
+109
+124
+165
+187
+215
+235
+250
+255
+255
+254
+253
+250
+250
+251
+250
+244
+247
+255
+255
+255
+250
+188
+157
+171
+183
+177
+192
+198
+201
+202
+202
+201
+199
+200
+207
+205
+199
+188
+173
+159
+149
+145
+138
+132
+130
+129
+127
+126
+128
+128
+126
+126
+126
+125
+124
+123
+123
+123
+122
+122
+120
+119
+118
+117
+117
+113
+109
+107
+106
+106
+105
+105
+105
+104
+103
+102
+103
+102
+102
+102
+102
+102
+102
+106
+109
+107
+106
+106
+109
+111
+108
+111
+100
+99
+122
+134
+121
+98
+62
+51
+52
+55
+52
+47
+50
+57
+51
+50
+50
+48
+49
+50
+52
+52
+46
+44
+47
+45
+47
+47
+47
+47
+49
+48
+48
+47
+47
+47
+48
+48
+55
+57
+60
+61
+59
+56
+50
+45
+50
+74
+99
+104
+93
+79
+70
+65
+72
+75
+78
+78
+75
+74
+76
+78
+84
+87
+90
+91
+93
+90
+78
+67
+50
+41
+31
+104
+104
+104
+104
+104
+104
+104
+104
+104
+104
+104
+104
+104
+104
+104
+104
+106
+106
+106
+108
+108
+109
+109
+109
+103
+106
+110
+111
+104
+102
+115
+129
+137
+149
+170
+194
+215
+233
+245
+248
+252
+254
+255
+253
+250
+249
+250
+251
+249
+250
+249
+252
+254
+249
+233
+213
+186
+152
+113
+95
+98
+114
+132
+145
+180
+202
+226
+240
+247
+251
+253
+252
+255
+254
+254
+253
+254
+254
+254
+254
+251
+255
+255
+255
+215
+163
+155
+178
+193
+195
+198
+201
+205
+206
+203
+202
+198
+195
+190
+181
+166
+154
+144
+139
+133
+129
+127
+127
+128
+128
+129
+129
+127
+126
+124
+123
+122
+122
+119
+118
+119
+119
+119
+119
+118
+117
+113
+110
+108
+105
+105
+104
+104
+103
+103
+103
+102
+103
+105
+105
+104
+103
+101
+101
+104
+106
+109
+107
+106
+105
+105
+107
+103
+106
+100
+118
+126
+138
+140
+82
+55
+52
+52
+51
+51
+51
+50
+50
+49
+49
+51
+48
+50
+47
+49
+47
+47
+46
+47
+46
+47
+47
+47
+47
+48
+47
+47
+46
+46
+47
+47
+47
+49
+51
+54
+56
+57
+55
+53
+51
+52
+68
+87
+91
+80
+69
+64
+66
+73
+75
+75
+75
+74
+74
+76
+79
+85
+89
+92
+93
+93
+87
+72
+59
+37
+38
+36
+104
+104
+104
+104
+104
+104
+104
+104
+104
+104
+104
+104
+104
+104
+104
+104
+104
+104
+106
+107
+108
+109
+109
+109
+105
+106
+109
+106
+103
+108
+126
+144
+167
+183
+208
+225
+241
+250
+255
+255
+254
+255
+255
+254
+251
+248
+246
+247
+247
+248
+248
+247
+249
+242
+223
+204
+180
+145
+107
+89
+95
+116
+140
+157
+191
+211
+231
+243
+247
+251
+252
+251
+254
+254
+254
+254
+254
+254
+254
+251
+241
+237
+247
+255
+255
+239
+196
+164
+176
+186
+193
+196
+194
+188
+190
+196
+196
+195
+191
+180
+166
+153
+144
+138
+130
+127
+126
+124
+126
+127
+128
+128
+125
+125
+122
+122
+121
+120
+118
+118
+117
+118
+116
+116
+116
+114
+111
+109
+108
+105
+106
+104
+105
+104
+103
+103
+101
+101
+103
+104
+106
+106
+106
+107
+107
+108
+107
+107
+107
+106
+106
+105
+103
+107
+103
+117
+129
+140
+134
+75
+54
+51
+51
+51
+50
+50
+50
+49
+49
+49
+49
+48
+48
+47
+47
+47
+47
+47
+47
+47
+47
+47
+47
+47
+48
+47
+46
+46
+46
+46
+47
+47
+46
+47
+49
+52
+54
+54
+54
+53
+54
+67
+80
+82
+73
+65
+66
+69
+74
+74
+75
+75
+73
+72
+73
+74
+83
+88
+92
+93
+91
+84
+67
+54
+38
+39
+37
+104
+104
+104
+104
+104
+104
+104
+104
+104
+104
+104
+104
+104
+104
+104
+104
+104
+104
+106
+107
+108
+109
+109
+109
+109
+107
+109
+106
+107
+119
+145
+167
+190
+209
+235
+246
+253
+254
+255
+255
+254
+255
+255
+253
+250
+245
+241
+241
+244
+245
+246
+245
+245
+238
+219
+201
+176
+147
+117
+107
+116
+136
+159
+174
+205
+222
+239
+248
+251
+254
+254
+253
+254
+254
+254
+254
+254
+254
+254
+253
+245
+251
+254
+255
+255
+255
+248
+215
+147
+164
+168
+167
+183
+207
+206
+189
+196
+198
+195
+185
+170
+157
+149
+144
+134
+129
+126
+123
+122
+122
+122
+122
+120
+120
+119
+119
+117
+116
+116
+116
+114
+114
+114
+114
+111
+110
+108
+107
+108
+106
+108
+106
+107
+105
+105
+104
+103
+103
+102
+103
+104
+105
+107
+107
+108
+106
+105
+104
+107
+106
+105
+102
+102
+108
+106
+117
+134
+145
+128
+69
+53
+50
+50
+50
+49
+49
+49
+48
+49
+49
+49
+48
+48
+47
+47
+47
+47
+47
+47
+47
+47
+47
+47
+47
+47
+47
+46
+45
+45
+46
+47
+46
+43
+43
+45
+47
+50
+52
+54
+55
+56
+63
+69
+67
+59
+56
+62
+68
+74
+74
+76
+75
+73
+71
+70
+71
+82
+88
+93
+94
+90
+80
+61
+46
+38
+39
+37
+104
+104
+104
+104
+104
+104
+104
+104
+104
+104
+104
+104
+104
+104
+104
+104
+104
+104
+106
+107
+108
+109
+109
+109
+110
+108
+108
+108
+112
+128
+158
+185
+195
+218
+244
+250
+251
+251
+253
+251
+255
+255
+255
+251
+245
+238
+233
+231
+237
+240
+241
+241
+242
+234
+216
+199
+178
+161
+145
+144
+156
+170
+182
+192
+220
+233
+246
+251
+253
+255
+255
+253
+254
+254
+254
+254
+254
+254
+254
+254
+251
+255
+255
+245
+246
+255
+255
+255
+232
+183
+148
+163
+185
+184
+180
+190
+193
+198
+197
+188
+173
+161
+152
+149
+139
+133
+128
+124
+121
+119
+117
+118
+118
+118
+118
+117
+115
+114
+114
+113
+111
+111
+111
+110
+107
+106
+106
+105
+109
+110
+109
+108
+108
+107
+105
+105
+108
+106
+104
+102
+102
+102
+104
+102
+106
+102
+101
+102
+104
+105
+102
+99
+99
+104
+105
+115
+133
+143
+112
+57
+52
+50
+49
+49
+49
+48
+48
+48
+49
+49
+49
+48
+48
+47
+47
+47
+46
+46
+46
+46
+46
+46
+46
+46
+46
+46
+45
+45
+45
+45
+46
+45
+42
+41
+42
+43
+46
+49
+52
+53
+54
+58
+60
+56
+50
+50
+56
+62
+68
+69
+75
+74
+75
+71
+72
+70
+83
+88
+96
+94
+90
+76
+57
+41
+38
+37
+35
+104
+104
+104
+104
+104
+104
+104
+104
+104
+104
+104
+104
+104
+104
+104
+104
+104
+104
+106
+107
+108
+109
+109
+109
+108
+107
+110
+111
+116
+133
+164
+191
+205
+229
+251
+251
+250
+252
+255
+253
+255
+255
+254
+247
+239
+231
+224
+222
+231
+234
+237
+236
+238
+232
+218
+204
+194
+183
+177
+182
+193
+201
+210
+217
+232
+242
+250
+252
+253
+255
+255
+252
+254
+254
+254
+254
+254
+254
+254
+255
+255
+255
+250
+248
+252
+254
+254
+253
+255
+245
+196
+157
+151
+165
+180
+186
+189
+196
+195
+188
+176
+166
+157
+152
+143
+137
+130
+124
+119
+115
+114
+115
+113
+115
+115
+114
+114
+114
+112
+111
+110
+109
+108
+107
+106
+105
+105
+106
+110
+112
+112
+109
+109
+108
+105
+105
+108
+107
+104
+101
+101
+101
+101
+100
+102
+99
+99
+100
+100
+100
+98
+95
+94
+101
+106
+114
+132
+132
+91
+51
+50
+50
+49
+49
+49
+48
+48
+48
+49
+49
+49
+48
+48
+47
+47
+47
+46
+46
+46
+46
+46
+46
+46
+46
+45
+45
+44
+44
+44
+44
+45
+44
+44
+43
+42
+42
+43
+46
+48
+50
+50
+53
+54
+53
+49
+49
+53
+56
+61
+64
+70
+72
+74
+73
+75
+75
+84
+91
+99
+97
+89
+74
+54
+38
+36
+36
+34
+104
+104
+104
+104
+104
+104
+104
+104
+104
+104
+104
+104
+104
+104
+104
+104
+104
+104
+106
+107
+108
+109
+109
+108
+106
+107
+108
+111
+115
+129
+159
+184
+213
+236
+251
+251
+250
+253
+255
+253
+255
+255
+252
+243
+235
+227
+221
+220
+228
+231
+233
+234
+235
+232
+223
+211
+211
+204
+203
+208
+215
+224
+234
+240
+243
+249
+253
+253
+253
+255
+254
+252
+254
+254
+254
+254
+254
+254
+254
+255
+255
+255
+253
+254
+249
+246
+237
+240
+235
+255
+255
+204
+163
+161
+170
+173
+182
+188
+189
+185
+178
+169
+161
+153
+149
+142
+133
+125
+120
+115
+112
+112
+112
+113
+113
+113
+113
+112
+111
+111
+111
+110
+109
+107
+104
+104
+104
+108
+111
+113
+112
+112
+109
+108
+106
+105
+104
+103
+101
+101
+100
+101
+102
+100
+94
+97
+99
+100
+99
+96
+93
+93
+93
+98
+109
+115
+128
+118
+70
+52
+51
+50
+50
+50
+49
+49
+49
+48
+49
+49
+49
+48
+48
+47
+47
+47
+45
+45
+45
+45
+45
+45
+45
+45
+45
+44
+43
+43
+43
+43
+44
+44
+46
+44
+42
+42
+42
+43
+45
+46
+45
+48
+52
+53
+52
+51
+51
+51
+55
+57
+64
+66
+71
+72
+77
+77
+85
+92
+100
+96
+88
+71
+52
+36
+36
+36
+34
+104
+104
+104
+104
+104
+104
+104
+104
+104
+104
+104
+104
+104
+104
+104
+104
+106
+106
+106
+107
+108
+109
+108
+108
+108
+108
+107
+107
+108
+121
+149
+174
+209
+233
+251
+248
+248
+254
+255
+249
+255
+254
+249
+241
+233
+227
+223
+224
+228
+231
+232
+231
+232
+231
+224
+215
+218
+217
+222
+230
+238
+243
+250
+255
+250
+254
+255
+253
+253
+255
+255
+252
+254
+254
+254
+254
+254
+254
+254
+255
+255
+255
+255
+252
+245
+234
+234
+242
+245
+239
+255
+255
+242
+171
+143
+170
+175
+179
+179
+179
+177
+172
+162
+154
+150
+143
+136
+129
+122
+117
+113
+113
+112
+113
+113
+113
+113
+113
+112
+112
+113
+112
+110
+108
+105
+106
+106
+110
+111
+114
+112
+112
+110
+108
+106
+105
+100
+100
+99
+100
+100
+99
+99
+95
+90
+95
+103
+104
+99
+94
+91
+92
+93
+93
+110
+116
+124
+99
+50
+54
+51
+51
+51
+51
+50
+50
+50
+49
+49
+49
+49
+48
+48
+47
+47
+47
+45
+45
+45
+45
+45
+45
+45
+45
+44
+44
+43
+42
+42
+43
+44
+43
+45
+43
+42
+42
+43
+43
+44
+45
+44
+47
+50
+54
+55
+55
+53
+52
+50
+52
+58
+61
+65
+68
+74
+76
+84
+92
+99
+94
+85
+68
+50
+35
+38
+38
+36
+104
+104
+104
+104
+104
+104
+104
+104
+104
+104
+104
+104
+104
+104
+104
+104
+106
+106
+106
+107
+108
+109
+108
+108
+111
+109
+106
+103
+102
+114
+142
+168
+201
+226
+247
+246
+249
+254
+255
+249
+255
+253
+248
+240
+233
+229
+227
+229
+230
+233
+234
+232
+232
+232
+225
+216
+216
+221
+234
+248
+255
+255
+255
+255
+254
+255
+255
+254
+254
+255
+255
+253
+254
+254
+254
+254
+254
+254
+254
+255
+255
+255
+251
+247
+245
+243
+240
+237
+240
+251
+255
+255
+255
+255
+216
+170
+164
+169
+168
+169
+173
+169
+161
+151
+149
+143
+137
+131
+125
+119
+116
+115
+113
+113
+115
+113
+113
+113
+113
+112
+115
+113
+111
+109
+108
+106
+109
+111
+111
+113
+111
+109
+109
+105
+104
+102
+102
+100
+100
+98
+96
+93
+92
+87
+84
+91
+102
+105
+98
+90
+90
+92
+90
+88
+107
+115
+117
+85
+38
+56
+51
+52
+52
+51
+51
+51
+50
+50
+49
+49
+49
+48
+48
+47
+47
+47
+45
+45
+45
+45
+45
+45
+45
+45
+44
+43
+43
+42
+42
+43
+43
+44
+43
+41
+42
+43
+43
+44
+45
+45
+44
+46
+50
+54
+57
+57
+55
+54
+48
+50
+53
+57
+60
+64
+70
+74
+82
+91
+97
+92
+81
+66
+47
+34
+42
+40
+38
+104
+104
+104
+104
+104
+104
+104
+104
+105
+105
+105
+105
+105
+105
+105
+105
+107
+107
+107
+108
+109
+110
+109
+109
+113
+107
+107
+107
+106
+112
+135
+159
+187
+208
+234
+246
+252
+254
+255
+254
+255
+254
+250
+246
+244
+240
+234
+231
+240
+237
+235
+236
+232
+225
+221
+222
+224
+231
+241
+249
+253
+255
+255
+255
+255
+254
+254
+254
+254
+254
+254
+254
+254
+254
+254
+254
+254
+254
+254
+254
+255
+255
+255
+254
+252
+250
+249
+249
+254
+254
+254
+255
+255
+255
+255
+255
+182
+162
+147
+155
+165
+160
+154
+155
+142
+141
+135
+128
+121
+116
+115
+115
+114
+114
+116
+115
+117
+117
+116
+113
+115
+113
+113
+113
+112
+110
+111
+111
+107
+109
+108
+108
+108
+104
+103
+99
+99
+94
+100
+99
+84
+78
+77
+64
+87
+80
+75
+79
+93
+105
+101
+86
+88
+93
+111
+122
+100
+61
+45
+50
+52
+53
+52
+52
+52
+51
+51
+51
+51
+51
+51
+50
+49
+49
+49
+48
+49
+49
+48
+48
+47
+47
+47
+47
+44
+44
+44
+44
+44
+44
+43
+43
+46
+45
+45
+44
+45
+45
+46
+46
+43
+45
+48
+53
+57
+61
+63
+63
+55
+53
+51
+49
+50
+57
+66
+73
+79
+86
+93
+89
+76
+60
+47
+41
+42
+41
+40
+104
+104
+104
+104
+104
+104
+104
+104
+105
+105
+105
+105
+105
+105
+105
+105
+107
+107
+107
+108
+109
+110
+109
+107
+111
+106
+107
+107
+106
+113
+137
+163
+190
+210
+235
+247
+253
+254
+255
+254
+255
+254
+251
+247
+244
+240
+234
+232
+234
+230
+228
+230
+227
+223
+222
+223
+230
+236
+245
+250
+255
+255
+255
+255
+255
+254
+254
+254
+254
+254
+254
+254
+254
+254
+254
+254
+254
+254
+254
+253
+250
+250
+253
+253
+253
+253
+255
+255
+255
+255
+255
+255
+255
+255
+254
+255
+255
+217
+163
+142
+146
+152
+152
+150
+138
+137
+135
+131
+126
+122
+118
+115
+117
+115
+117
+117
+116
+111
+112
+115
+113
+112
+112
+110
+111
+109
+110
+109
+107
+108
+109
+107
+106
+103
+101
+98
+100
+91
+94
+94
+78
+70
+71
+62
+76
+71
+68
+68
+77
+92
+98
+96
+89
+100
+115
+115
+88
+58
+47
+55
+54
+54
+54
+54
+53
+53
+53
+53
+53
+53
+53
+52
+52
+51
+51
+51
+50
+50
+50
+49
+49
+49
+48
+48
+46
+46
+45
+45
+44
+44
+43
+43
+42
+42
+41
+41
+41
+42
+43
+44
+46
+45
+46
+48
+52
+57
+63
+66
+59
+58
+55
+52
+51
+54
+60
+64
+76
+83
+89
+87
+76
+61
+49
+43
+44
+43
+42
+104
+104
+104
+104
+104
+104
+104
+104
+105
+105
+105
+105
+105
+105
+105
+105
+107
+107
+108
+109
+109
+110
+109
+107
+109
+105
+106
+107
+105
+113
+138
+165
+191
+212
+237
+247
+252
+253
+255
+254
+255
+253
+250
+247
+244
+239
+231
+229
+226
+222
+221
+222
+222
+221
+224
+228
+237
+242
+249
+254
+255
+255
+255
+255
+255
+254
+254
+254
+254
+254
+254
+254
+254
+254
+254
+254
+254
+254
+254
+253
+246
+246
+250
+253
+255
+255
+255
+255
+255
+255
+255
+255
+255
+255
+250
+250
+254
+255
+255
+223
+168
+132
+131
+145
+148
+139
+127
+118
+117
+118
+121
+120
+113
+110
+113
+116
+115
+111
+113
+120
+110
+109
+109
+107
+108
+106
+108
+106
+103
+103
+103
+103
+101
+99
+96
+94
+98
+85
+90
+96
+82
+67
+69
+70
+65
+66
+65
+60
+63
+78
+95
+105
+97
+110
+118
+103
+74
+52
+52
+61
+56
+56
+56
+56
+55
+55
+55
+54
+56
+56
+55
+55
+55
+54
+54
+54
+53
+52
+52
+52
+51
+51
+51
+50
+48
+48
+47
+46
+45
+44
+43
+43
+41
+41
+41
+41
+41
+42
+43
+44
+49
+47
+44
+44
+47
+54
+61
+65
+64
+62
+60
+56
+52
+50
+51
+53
+68
+75
+81
+81
+72
+60
+50
+46
+46
+46
+45
+103
+103
+104
+104
+104
+104
+105
+105
+105
+105
+105
+105
+105
+105
+105
+105
+107
+107
+108
+109
+109
+109
+109
+106
+107
+105
+106
+106
+104
+109
+136
+166
+191
+211
+235
+246
+252
+253
+255
+255
+254
+253
+250
+247
+244
+238
+229
+226
+219
+215
+214
+217
+221
+222
+229
+236
+247
+250
+255
+255
+255
+255
+255
+255
+255
+254
+254
+254
+254
+254
+254
+254
+254
+254
+254
+254
+254
+254
+254
+253
+247
+247
+250
+253
+255
+255
+255
+255
+255
+255
+255
+255
+255
+255
+250
+250
+255
+255
+253
+255
+255
+238
+176
+118
+117
+117
+119
+123
+125
+120
+107
+98
+123
+115
+113
+115
+111
+103
+100
+103
+105
+105
+105
+103
+102
+102
+102
+101
+98
+98
+96
+95
+95
+91
+90
+87
+88
+79
+92
+111
+99
+77
+73
+73
+62
+63
+64
+60
+60
+70
+88
+100
+109
+120
+116
+91
+64
+54
+56
+60
+57
+57
+57
+56
+56
+55
+55
+55
+57
+56
+56
+56
+56
+56
+56
+56
+55
+55
+55
+54
+54
+54
+53
+53
+51
+51
+49
+48
+47
+45
+44
+44
+43
+43
+42
+42
+43
+44
+45
+45
+48
+46
+43
+43
+45
+50
+56
+59
+64
+64
+64
+61
+56
+51
+49
+48
+60
+66
+72
+73
+68
+59
+50
+46
+45
+47
+46
+103
+103
+103
+104
+104
+105
+105
+105
+105
+105
+105
+105
+105
+105
+105
+105
+107
+108
+108
+109
+109
+109
+109
+106
+107
+105
+105
+103
+100
+106
+133
+163
+189
+210
+234
+244
+251
+253
+255
+255
+255
+255
+254
+251
+247
+240
+230
+226
+217
+213
+210
+212
+218
+224
+234
+244
+253
+255
+255
+255
+255
+254
+254
+254
+254
+254
+254
+254
+254
+254
+254
+254
+254
+254
+254
+254
+254
+254
+254
+253
+250
+250
+252
+255
+255
+255
+255
+255
+255
+255
+255
+255
+255
+255
+253
+252
+244
+255
+255
+255
+255
+255
+246
+228
+208
+183
+146
+118
+104
+104
+109
+112
+108
+105
+103
+106
+110
+110
+111
+111
+101
+99
+99
+99
+99
+99
+98
+96
+93
+92
+92
+90
+90
+87
+84
+82
+80
+78
+102
+126
+114
+86
+74
+71
+60
+60
+63
+65
+65
+68
+77
+84
+120
+123
+110
+85
+67
+63
+62
+58
+59
+57
+57
+56
+56
+55
+55
+55
+56
+56
+56
+56
+56
+56
+56
+56
+57
+57
+57
+56
+56
+56
+55
+55
+54
+53
+52
+51
+50
+48
+47
+47
+45
+45
+44
+43
+43
+44
+45
+45
+44
+44
+44
+44
+46
+48
+51
+52
+59
+61
+64
+64
+60
+55
+52
+50
+54
+58
+64
+66
+63
+56
+49
+45
+45
+46
+45
+102
+102
+103
+104
+104
+105
+106
+106
+105
+105
+105
+105
+105
+105
+105
+105
+108
+108
+108
+109
+109
+109
+109
+106
+107
+105
+105
+103
+98
+103
+130
+163
+192
+212
+235
+245
+251
+253
+255
+255
+255
+255
+255
+255
+250
+242
+231
+226
+215
+209
+205
+206
+214
+222
+236
+247
+255
+255
+255
+255
+255
+253
+253
+253
+254
+254
+254
+254
+254
+254
+254
+254
+254
+254
+254
+254
+254
+254
+254
+254
+253
+254
+254
+254
+254
+254
+253
+253
+251
+252
+254
+255
+255
+254
+254
+254
+251
+255
+254
+249
+253
+255
+255
+255
+255
+252
+242
+226
+205
+179
+155
+140
+122
+125
+116
+97
+87
+89
+91
+88
+96
+96
+96
+95
+96
+96
+96
+93
+92
+92
+92
+89
+88
+85
+82
+81
+78
+81
+105
+124
+109
+83
+70
+62
+60
+60
+63
+68
+69
+68
+72
+76
+121
+116
+102
+84
+76
+75
+70
+60
+60
+57
+57
+57
+56
+56
+56
+56
+55
+55
+56
+56
+56
+56
+57
+57
+58
+58
+58
+58
+57
+57
+57
+56
+56
+56
+55
+54
+53
+52
+51
+51
+47
+46
+45
+44
+43
+43
+43
+43
+43
+44
+45
+46
+47
+47
+47
+45
+51
+55
+61
+64
+63
+60
+57
+56
+53
+56
+60
+62
+60
+55
+49
+45
+44
+46
+45
+102
+102
+103
+104
+104
+105
+106
+106
+105
+105
+105
+105
+105
+105
+105
+105
+108
+108
+108
+109
+109
+109
+109
+106
+106
+104
+104
+102
+99
+104
+133
+165
+199
+218
+240
+248
+252
+253
+255
+255
+255
+255
+255
+252
+248
+239
+226
+221
+213
+206
+201
+202
+208
+218
+233
+246
+255
+255
+255
+255
+254
+252
+251
+252
+253
+254
+254
+254
+254
+254
+254
+254
+254
+254
+254
+254
+254
+254
+254
+254
+254
+255
+254
+253
+250
+247
+246
+245
+243
+245
+250
+253
+255
+255
+255
+255
+252
+254
+255
+255
+255
+252
+248
+245
+255
+255
+255
+255
+255
+255
+251
+248
+249
+255
+227
+165
+116
+101
+98
+92
+94
+92
+92
+93
+93
+94
+94
+92
+89
+87
+87
+86
+85
+83
+80
+78
+77
+80
+96
+102
+85
+69
+65
+60
+63
+63
+67
+72
+72
+70
+79
+89
+113
+106
+97
+91
+89
+84
+77
+66
+61
+59
+59
+59
+58
+58
+58
+57
+56
+56
+56
+57
+57
+58
+58
+58
+59
+59
+59
+58
+58
+57
+57
+57
+58
+58
+57
+57
+56
+56
+55
+55
+52
+50
+49
+47
+45
+44
+43
+43
+44
+44
+45
+46
+46
+46
+45
+43
+43
+47
+54
+59
+61
+60
+58
+58
+53
+55
+58
+60
+58
+54
+48
+45
+45
+46
+45
+99
+99
+100
+101
+101
+104
+105
+105
+104
+105
+105
+105
+105
+105
+105
+107
+107
+107
+108
+108
+109
+109
+107
+106
+105
+104
+104
+103
+100
+106
+137
+170
+205
+223
+242
+250
+251
+253
+254
+254
+250
+250
+250
+248
+244
+234
+223
+217
+211
+204
+197
+198
+204
+214
+230
+244
+253
+254
+255
+254
+253
+252
+251
+252
+253
+254
+254
+254
+254
+254
+254
+254
+254
+254
+254
+254
+255
+255
+255
+255
+255
+255
+254
+252
+249
+246
+244
+243
+242
+245
+250
+254
+255
+255
+255
+255
+255
+255
+255
+255
+253
+251
+250
+252
+244
+244
+247
+247
+248
+251
+255
+255
+253
+255
+236
+158
+96
+82
+88
+88
+91
+91
+90
+90
+91
+91
+92
+91
+85
+84
+84
+81
+80
+78
+75
+73
+74
+76
+83
+80
+64
+59
+65
+63
+67
+68
+72
+76
+73
+74
+89
+107
+102
+98
+94
+95
+96
+90
+83
+76
+65
+64
+64
+62
+62
+62
+61
+61
+57
+57
+57
+58
+58
+58
+58
+58
+59
+59
+59
+58
+58
+57
+57
+57
+59
+59
+59
+59
+58
+58
+58
+58
+56
+55
+52
+51
+49
+47
+46
+46
+46
+46
+44
+44
+43
+43
+44
+41
+36
+41
+50
+56
+59
+59
+59
+59
+56
+57
+59
+60
+60
+55
+49
+46
+46
+47
+46
+92
+93
+95
+96
+98
+101
+103
+104
+102
+104
+104
+104
+106
+107
+107
+108
+107
+106
+109
+108
+109
+106
+104
+102
+102
+103
+102
+98
+99
+114
+150
+185
+209
+224
+240
+247
+247
+250
+252
+252
+248
+250
+249
+243
+239
+236
+224
+214
+216
+203
+188
+188
+195
+205
+219
+233
+250
+253
+254
+255
+254
+252
+251
+252
+254
+254
+254
+254
+254
+254
+255
+255
+255
+255
+255
+255
+255
+255
+255
+255
+255
+255
+253
+253
+254
+254
+251
+249
+253
+251
+253
+255
+255
+255
+255
+255
+255
+255
+254
+254
+254
+251
+251
+250
+252
+252
+255
+255
+255
+255
+255
+255
+251
+255
+233
+145
+86
+88
+85
+83
+87
+87
+85
+85
+84
+84
+84
+83
+81
+82
+80
+80
+77
+75
+72
+71
+74
+70
+65
+61
+62
+68
+70
+68
+77
+75
+70
+67
+79
+94
+96
+90
+89
+91
+95
+95
+95
+92
+88
+85
+75
+71
+68
+65
+64
+62
+63
+63
+60
+58
+58
+57
+57
+55
+55
+55
+58
+57
+57
+56
+56
+57
+57
+58
+58
+58
+57
+58
+59
+60
+61
+62
+56
+55
+55
+55
+53
+51
+50
+49
+46
+47
+45
+45
+46
+48
+54
+55
+59
+59
+60
+59
+59
+60
+61
+61
+58
+63
+68
+68
+67
+64
+55
+46
+45
+44
+41
+89
+90
+92
+93
+97
+98
+103
+103
+103
+103
+105
+105
+107
+108
+109
+109
+108
+106
+107
+108
+107
+106
+104
+101
+104
+103
+103
+102
+106
+121
+156
+186
+208
+224
+240
+246
+249
+249
+251
+249
+249
+248
+246
+238
+235
+230
+221
+210
+203
+193
+184
+187
+194
+205
+219
+228
+251
+253
+254
+255
+254
+252
+252
+252
+254
+254
+254
+254
+254
+254
+255
+255
+255
+255
+255
+255
+255
+255
+255
+255
+255
+255
+253
+253
+255
+255
+254
+253
+255
+255
+255
+254
+245
+238
+244
+250
+255
+254
+253
+254
+252
+251
+251
+250
+252
+252
+255
+254
+255
+255
+255
+255
+248
+254
+229
+141
+83
+84
+82
+81
+85
+85
+84
+84
+83
+83
+81
+81
+81
+79
+80
+78
+77
+74
+72
+69
+71
+69
+65
+63
+66
+70
+74
+74
+75
+75
+82
+89
+93
+87
+83
+83
+85
+86
+90
+91
+92
+92
+90
+89
+82
+80
+75
+72
+67
+65
+66
+63
+61
+58
+58
+57
+55
+55
+54
+54
+58
+57
+57
+56
+56
+57
+57
+58
+58
+58
+58
+58
+59
+60
+61
+60
+61
+60
+60
+60
+60
+58
+57
+56
+55
+52
+51
+48
+51
+57
+66
+71
+79
+76
+76
+70
+66
+60
+59
+58
+61
+68
+74
+76
+75
+72
+60
+51
+43
+43
+40
+89
+90
+92
+94
+97
+99
+103
+104
+105
+105
+107
+107
+108
+109
+110
+110
+108
+107
+107
+107
+107
+106
+104
+101
+104
+101
+100
+103
+111
+127
+157
+182
+204
+221
+239
+246
+249
+248
+248
+245
+244
+241
+236
+226
+222
+216
+208
+199
+192
+188
+187
+194
+204
+215
+227
+234
+251
+253
+254
+254
+253
+252
+252
+253
+254
+254
+254
+254
+254
+254
+255
+255
+255
+255
+255
+255
+255
+255
+255
+255
+255
+254
+252
+253
+254
+255
+254
+253
+255
+255
+255
+249
+232
+223
+234
+246
+255
+254
+253
+254
+252
+251
+251
+250
+252
+252
+255
+254
+255
+255
+255
+255
+249
+254
+228
+138
+80
+82
+82
+82
+84
+85
+84
+85
+84
+83
+81
+80
+81
+79
+80
+77
+77
+74
+73
+70
+72
+69
+67
+66
+70
+73
+79
+81
+80
+85
+103
+119
+112
+88
+76
+78
+80
+81
+84
+85
+87
+88
+91
+92
+89
+86
+81
+77
+71
+68
+67
+63
+61
+58
+58
+57
+55
+55
+54
+54
+58
+58
+57
+57
+57
+57
+58
+58
+58
+58
+58
+58
+59
+60
+62
+60
+64
+63
+64
+64
+65
+63
+63
+62
+62
+57
+54
+52
+57
+66
+80
+88
+94
+91
+87
+77
+67
+57
+54
+52
+60
+69
+77
+82
+82
+78
+65
+56
+47
+47
+44
+89
+90
+92
+94
+98
+100
+104
+105
+107
+107
+109
+108
+110
+110
+111
+111
+109
+107
+107
+107
+106
+106
+104
+102
+102
+97
+95
+100
+112
+127
+151
+171
+199
+217
+237
+245
+248
+245
+243
+238
+234
+228
+221
+212
+208
+202
+195
+189
+196
+198
+203
+213
+224
+234
+244
+248
+252
+253
+254
+254
+253
+251
+252
+253
+254
+254
+254
+254
+254
+254
+255
+255
+255
+255
+255
+255
+255
+255
+255
+255
+255
+253
+251
+252
+254
+255
+254
+253
+254
+255
+255
+250
+234
+227
+239
+251
+255
+254
+253
+254
+252
+251
+251
+250
+252
+252
+255
+254
+255
+255
+255
+255
+252
+255
+228
+137
+80
+82
+84
+84
+84
+85
+85
+85
+84
+83
+80
+79
+81
+79
+79
+76
+76
+74
+74
+71
+74
+71
+70
+72
+76
+78
+85
+91
+103
+115
+135
+144
+133
+110
+90
+82
+79
+78
+80
+79
+82
+85
+89
+91
+90
+88
+84
+80
+74
+71
+69
+65
+61
+58
+58
+57
+55
+55
+54
+54
+59
+58
+57
+57
+57
+57
+58
+59
+59
+58
+58
+59
+59
+61
+62
+61
+61
+60
+62
+62
+64
+63
+63
+63
+61
+57
+54
+52
+57
+68
+82
+91
+89
+87
+84
+73
+62
+51
+48
+46
+54
+64
+75
+82
+83
+79
+65
+54
+49
+48
+45
+89
+90
+92
+94
+98
+100
+105
+106
+109
+108
+110
+109
+110
+110
+112
+111
+109
+107
+106
+106
+105
+105
+104
+102
+103
+97
+94
+100
+112
+125
+145
+161
+194
+214
+234
+243
+245
+242
+239
+233
+227
+218
+211
+204
+201
+195
+190
+187
+202
+209
+218
+229
+238
+248
+255
+255
+252
+253
+253
+253
+252
+251
+252
+254
+254
+254
+254
+254
+254
+254
+255
+255
+255
+255
+255
+255
+255
+255
+255
+255
+255
+252
+251
+252
+254
+255
+254
+253
+254
+254
+255
+254
+245
+239
+247
+254
+255
+254
+253
+254
+252
+251
+251
+250
+251
+251
+254
+254
+255
+255
+255
+255
+254
+255
+229
+138
+81
+84
+86
+87
+84
+85
+86
+86
+85
+83
+79
+78
+81
+79
+79
+76
+76
+74
+74
+73
+76
+73
+74
+78
+81
+82
+91
+99
+129
+146
+161
+157
+148
+138
+115
+90
+80
+78
+78
+76
+78
+81
+86
+88
+88
+86
+83
+80
+76
+73
+71
+67
+61
+58
+58
+57
+55
+55
+54
+54
+59
+59
+58
+57
+57
+58
+59
+59
+59
+59
+59
+59
+60
+61
+62
+61
+59
+58
+60
+60
+62
+61
+62
+61
+58
+55
+53
+52
+57
+66
+78
+85
+83
+81
+79
+69
+57
+46
+44
+44
+49
+60
+73
+80
+82
+78
+63
+52
+43
+43
+40
+47
+47
+48
+49
+49
+49
+50
+50
+51
+51
+51
+51
+51
+51
+51
+51
+50
+49
+49
+48
+48
+49
+49
+50
+48
+48
+48
+48
+48
+48
+48
+48
+46
+46
+46
+45
+45
+44
+44
+44
+44
+44
+44
+44
+44
+44
+44
+45
+42
+44
+44
+45
+46
+47
+48
+48
+51
+51
+52
+53
+53
+54
+55
+55
+58
+60
+62
+64
+65
+66
+67
+67
+68
+68
+67
+66
+67
+67
+68
+69
+63
+63
+64
+66
+69
+72
+71
+70
+71
+71
+69
+71
+71
+71
+72
+69
+70
+67
+68
+69
+67
+66
+62
+61
+59
+58
+58
+60
+63
+64
+63
+65
+61
+64
+64
+63
+63
+64
+63
+64
+64
+65
+65
+66
+64
+65
+64
+65
+62
+63
+63
+62
+62
+61
+60
+60
+63
+63
+61
+61
+61
+62
+63
+64
+63
+62
+61
+63
+66
+68
+68
+68
+63
+65
+70
+72
+72
+65
+56
+51
+53
+53
+53
+51
+49
+48
+48
+48
+50
+50
+50
+49
+49
+48
+48
+49
+47
+48
+47
+47
+47
+47
+46
+46
+44
+43
+42
+41
+40
+46
+54
+58
+66
+73
+77
+79
+87
+100
+111
+116
+123
+127
+134
+136
+121
+97
+75
+68
+74
+71
+72
+81
+100
+125
+145
+158
+169
+168
+160
+146
+124
+103
+87
+78
+82
+81
+81
+47
+47
+48
+48
+48
+49
+50
+50
+51
+51
+51
+51
+51
+51
+51
+51
+49
+49
+48
+48
+48
+48
+49
+49
+48
+48
+48
+48
+48
+48
+48
+48
+46
+46
+45
+45
+45
+44
+44
+44
+45
+45
+45
+45
+45
+45
+45
+46
+43
+45
+45
+46
+47
+48
+49
+49
+51
+51
+52
+52
+53
+54
+55
+55
+57
+59
+61
+63
+64
+65
+66
+66
+67
+67
+65
+65
+65
+66
+67
+68
+62
+63
+65
+67
+68
+69
+69
+67
+67
+65
+65
+66
+68
+69
+70
+67
+69
+66
+67
+68
+68
+66
+64
+63
+59
+58
+58
+60
+63
+65
+64
+64
+62
+64
+63
+63
+63
+63
+63
+64
+64
+64
+65
+65
+64
+65
+64
+65
+62
+63
+62
+62
+62
+61
+60
+60
+63
+62
+61
+61
+61
+62
+63
+64
+64
+62
+62
+62
+65
+68
+67
+68
+65
+67
+70
+73
+71
+64
+57
+52
+54
+54
+53
+52
+50
+49
+49
+49
+50
+50
+50
+49
+49
+48
+48
+49
+47
+48
+47
+47
+47
+47
+46
+46
+45
+44
+42
+41
+41
+45
+52
+56
+62
+69
+74
+78
+84
+97
+108
+114
+123
+128
+133
+132
+117
+91
+72
+67
+70
+71
+72
+78
+89
+111
+135
+153
+158
+160
+157
+145
+127
+107
+91
+83
+83
+82
+81
+46
+46
+47
+48
+48
+48
+49
+49
+50
+50
+50
+50
+50
+50
+50
+50
+49
+48
+47
+47
+47
+47
+48
+49
+48
+48
+48
+48
+48
+48
+48
+48
+46
+45
+45
+45
+44
+44
+44
+44
+45
+45
+45
+45
+45
+45
+45
+46
+45
+46
+47
+48
+48
+49
+49
+50
+51
+51
+51
+52
+53
+54
+54
+55
+56
+58
+60
+62
+63
+64
+64
+64
+64
+64
+63
+63
+63
+64
+65
+66
+65
+65
+66
+67
+67
+67
+66
+65
+60
+58
+59
+61
+64
+68
+70
+68
+67
+64
+66
+66
+68
+67
+65
+63
+59
+58
+59
+61
+64
+65
+64
+64
+61
+64
+64
+63
+63
+63
+62
+64
+63
+64
+64
+65
+65
+63
+64
+64
+62
+62
+62
+62
+61
+61
+61
+61
+62
+62
+60
+60
+61
+61
+63
+63
+65
+63
+62
+62
+65
+67
+68
+67
+68
+70
+73
+74
+71
+64
+58
+53
+55
+55
+54
+52
+52
+51
+50
+50
+50
+50
+50
+49
+50
+49
+49
+49
+48
+49
+48
+48
+47
+47
+47
+46
+47
+46
+44
+42
+42
+45
+50
+53
+57
+63
+69
+73
+79
+91
+102
+109
+119
+125
+130
+126
+109
+86
+69
+65
+65
+70
+72
+72
+75
+91
+116
+137
+140
+143
+144
+138
+122
+105
+91
+83
+85
+84
+83
+45
+46
+46
+47
+47
+48
+48
+48
+49
+49
+49
+49
+49
+49
+49
+49
+47
+47
+46
+46
+46
+46
+47
+47
+48
+48
+48
+48
+48
+48
+48
+48
+45
+45
+45
+44
+44
+44
+43
+43
+46
+46
+46
+46
+46
+46
+46
+47
+48
+48
+48
+49
+49
+50
+50
+50
+50
+50
+51
+52
+53
+53
+54
+54
+55
+57
+58
+60
+61
+61
+62
+62
+61
+62
+60
+61
+61
+62
+64
+65
+68
+69
+68
+68
+68
+66
+65
+63
+57
+57
+57
+60
+64
+69
+72
+70
+68
+65
+66
+68
+67
+66
+64
+63
+59
+58
+59
+62
+65
+66
+64
+64
+61
+64
+64
+64
+62
+63
+63
+63
+64
+63
+64
+64
+64
+64
+64
+63
+62
+62
+62
+61
+61
+61
+60
+60
+61
+61
+60
+60
+60
+62
+62
+63
+65
+63
+62
+64
+66
+67
+67
+66
+70
+74
+76
+75
+70
+64
+58
+55
+56
+57
+55
+55
+53
+52
+51
+51
+50
+50
+50
+50
+50
+49
+49
+50
+50
+50
+49
+49
+48
+48
+48
+48
+49
+48
+47
+44
+43
+44
+48
+50
+55
+59
+65
+69
+72
+82
+95
+105
+115
+121
+125
+119
+102
+82
+69
+64
+64
+69
+70
+67
+66
+76
+94
+110
+121
+125
+128
+122
+111
+98
+89
+84
+87
+86
+86
+45
+45
+45
+46
+47
+48
+47
+48
+47
+47
+47
+47
+47
+47
+47
+47
+47
+47
+46
+46
+46
+46
+47
+47
+48
+48
+48
+48
+48
+48
+48
+48
+46
+46
+45
+45
+45
+44
+44
+44
+47
+47
+47
+47
+47
+47
+47
+47
+49
+49
+49
+49
+49
+50
+50
+50
+50
+50
+51
+51
+52
+53
+54
+54
+53
+54
+56
+57
+58
+59
+59
+59
+58
+58
+58
+59
+60
+61
+62
+64
+71
+72
+71
+70
+69
+68
+66
+62
+59
+58
+58
+61
+66
+70
+74
+73
+71
+68
+68
+69
+66
+65
+61
+60
+58
+58
+60
+63
+66
+67
+65
+63
+63
+63
+63
+63
+62
+62
+62
+63
+62
+63
+63
+63
+63
+63
+62
+62
+62
+63
+62
+62
+62
+61
+61
+61
+61
+61
+61
+61
+60
+62
+62
+63
+66
+65
+64
+64
+65
+67
+66
+65
+67
+72
+76
+74
+69
+62
+57
+53
+57
+56
+55
+54
+53
+52
+52
+51
+50
+51
+51
+51
+50
+50
+50
+50
+50
+50
+50
+50
+49
+49
+48
+48
+50
+49
+49
+46
+44
+43
+46
+47
+53
+57
+61
+64
+66
+75
+90
+103
+112
+120
+123
+115
+100
+84
+71
+66
+65
+66
+65
+65
+66
+70
+75
+80
+99
+102
+105
+102
+96
+91
+88
+88
+89
+87
+87
+44
+44
+45
+45
+46
+47
+47
+47
+46
+46
+46
+46
+46
+46
+46
+45
+46
+46
+45
+44
+44
+45
+46
+46
+46
+46
+46
+46
+46
+46
+46
+46
+45
+45
+45
+45
+44
+44
+44
+43
+46
+46
+46
+46
+46
+46
+46
+46
+49
+49
+49
+49
+49
+49
+49
+49
+49
+50
+50
+51
+52
+53
+53
+53
+52
+53
+54
+55
+55
+57
+57
+57
+57
+57
+57
+58
+59
+60
+62
+65
+71
+72
+71
+70
+69
+67
+64
+62
+60
+59
+59
+61
+64
+70
+74
+74
+72
+69
+70
+69
+67
+64
+62
+58
+59
+58
+60
+64
+67
+67
+64
+62
+63
+64
+63
+63
+63
+62
+62
+63
+62
+63
+63
+62
+63
+62
+62
+63
+62
+62
+62
+62
+61
+61
+61
+60
+61
+60
+60
+60
+60
+61
+62
+63
+66
+65
+64
+66
+67
+67
+66
+65
+65
+73
+78
+78
+71
+63
+59
+54
+57
+55
+55
+54
+52
+52
+51
+52
+51
+51
+52
+51
+51
+50
+50
+51
+51
+51
+51
+51
+50
+50
+49
+49
+49
+50
+50
+48
+46
+45
+46
+46
+52
+52
+56
+60
+63
+71
+89
+107
+117
+124
+124
+117
+104
+91
+77
+66
+65
+64
+61
+62
+66
+67
+66
+64
+71
+77
+81
+81
+81
+81
+85
+87
+89
+89
+88
+43
+43
+44
+45
+46
+46
+47
+47
+45
+45
+45
+45
+45
+45
+45
+45
+45
+44
+43
+43
+43
+43
+44
+44
+43
+43
+43
+43
+43
+43
+43
+43
+44
+44
+44
+43
+43
+43
+42
+42
+45
+45
+45
+45
+45
+45
+45
+46
+49
+49
+49
+48
+48
+48
+48
+48
+49
+49
+50
+51
+52
+52
+53
+53
+51
+52
+53
+54
+54
+54
+54
+55
+56
+56
+56
+57
+59
+60
+62
+64
+69
+70
+69
+68
+67
+66
+63
+61
+61
+58
+57
+59
+61
+66
+70
+70
+70
+70
+70
+69
+68
+67
+64
+62
+58
+59
+60
+65
+67
+68
+64
+61
+63
+64
+64
+63
+62
+62
+61
+62
+61
+63
+63
+63
+63
+62
+63
+62
+62
+62
+62
+61
+61
+61
+60
+60
+60
+61
+59
+60
+60
+62
+61
+63
+67
+66
+65
+66
+67
+67
+67
+67
+70
+81
+88
+88
+82
+73
+67
+63
+57
+55
+55
+54
+53
+52
+51
+51
+51
+51
+52
+51
+51
+51
+51
+51
+51
+51
+51
+51
+51
+51
+50
+50
+48
+49
+50
+49
+47
+46
+46
+47
+48
+48
+51
+56
+60
+70
+93
+115
+128
+132
+131
+122
+112
+101
+83
+67
+63
+60
+59
+62
+66
+66
+65
+63
+66
+72
+77
+81
+81
+82
+86
+88
+90
+89
+88
+43
+43
+44
+44
+44
+46
+47
+47
+45
+45
+45
+45
+45
+45
+45
+45
+44
+43
+43
+42
+42
+43
+43
+44
+42
+42
+42
+42
+42
+42
+42
+42
+44
+44
+44
+43
+43
+42
+42
+42
+44
+44
+44
+44
+44
+44
+44
+44
+47
+48
+48
+48
+48
+48
+48
+48
+49
+49
+50
+51
+51
+52
+53
+53
+50
+51
+52
+53
+53
+53
+53
+53
+56
+56
+56
+56
+58
+61
+62
+63
+67
+67
+66
+65
+65
+64
+62
+60
+60
+57
+56
+56
+58
+61
+66
+66
+70
+69
+70
+71
+71
+70
+67
+66
+59
+59
+62
+66
+68
+68
+64
+62
+65
+65
+64
+64
+64
+63
+63
+62
+62
+64
+63
+63
+62
+63
+62
+62
+62
+62
+62
+61
+61
+60
+60
+61
+61
+60
+60
+60
+60
+62
+62
+63
+68
+67
+66
+67
+67
+68
+68
+69
+80
+91
+101
+102
+95
+85
+77
+73
+57
+56
+55
+54
+52
+52
+51
+51
+51
+52
+52
+51
+52
+51
+51
+51
+51
+51
+51
+51
+51
+51
+50
+50
+47
+48
+50
+50
+48
+47
+47
+47
+44
+44
+48
+55
+60
+73
+98
+122
+138
+141
+136
+128
+120
+107
+87
+68
+61
+60
+60
+62
+65
+67
+68
+69
+81
+87
+94
+96
+95
+94
+94
+95
+91
+90
+90
+45
+45
+45
+46
+45
+45
+45
+45
+46
+46
+45
+44
+44
+44
+43
+43
+43
+43
+43
+43
+43
+43
+43
+44
+43
+43
+43
+43
+43
+43
+43
+43
+43
+43
+43
+44
+44
+45
+45
+46
+45
+45
+45
+45
+45
+45
+45
+45
+44
+45
+46
+47
+47
+47
+47
+47
+47
+47
+47
+47
+48
+49
+50
+52
+48
+50
+51
+52
+52
+53
+53
+53
+52
+53
+53
+54
+55
+57
+58
+60
+63
+64
+64
+63
+62
+60
+57
+54
+57
+56
+56
+57
+59
+61
+63
+62
+65
+65
+67
+69
+71
+71
+69
+67
+64
+66
+68
+69
+68
+66
+65
+66
+65
+64
+63
+62
+61
+61
+62
+63
+60
+61
+60
+62
+61
+61
+61
+62
+60
+60
+61
+60
+60
+60
+58
+59
+61
+60
+60
+61
+62
+64
+65
+65
+69
+68
+69
+73
+71
+68
+69
+77
+90
+102
+113
+115
+114
+106
+94
+81
+76
+70
+62
+56
+53
+52
+51
+51
+51
+52
+52
+52
+50
+49
+49
+49
+50
+50
+50
+50
+49
+49
+49
+49
+50
+50
+49
+49
+49
+49
+49
+48
+43
+47
+51
+52
+59
+79
+109
+133
+144
+150
+149
+137
+122
+110
+98
+91
+73
+66
+62
+62
+66
+73
+85
+96
+113
+125
+134
+127
+121
+117
+107
+95
+90
+90
+93
+45
+45
+45
+45
+45
+45
+44
+45
+46
+45
+44
+44
+43
+43
+43
+43
+42
+42
+42
+42
+43
+43
+43
+43
+43
+43
+43
+43
+43
+43
+43
+43
+43
+43
+43
+44
+44
+44
+45
+45
+45
+45
+45
+45
+45
+45
+45
+45
+44
+44
+45
+46
+47
+47
+46
+46
+46
+46
+46
+46
+47
+48
+49
+50
+48
+49
+50
+52
+52
+53
+53
+52
+52
+52
+52
+53
+54
+56
+58
+59
+62
+62
+61
+62
+61
+59
+57
+55
+55
+55
+55
+57
+57
+60
+60
+61
+64
+65
+66
+68
+69
+70
+69
+68
+68
+69
+70
+71
+70
+67
+66
+66
+67
+66
+64
+63
+63
+63
+62
+62
+61
+62
+61
+61
+61
+62
+62
+61
+60
+61
+60
+60
+60
+59
+59
+60
+60
+61
+61
+61
+62
+64
+65
+66
+71
+69
+71
+74
+73
+71
+76
+84
+100
+113
+126
+127
+124
+115
+102
+88
+78
+73
+67
+61
+58
+56
+52
+49
+51
+51
+51
+50
+49
+48
+48
+48
+49
+50
+49
+49
+49
+49
+49
+49
+50
+50
+49
+49
+49
+49
+49
+48
+43
+45
+50
+53
+63
+86
+114
+136
+147
+151
+150
+139
+129
+121
+116
+110
+95
+90
+85
+87
+94
+103
+118
+130
+136
+146
+149
+142
+134
+128
+116
+101
+88
+88
+91
+45
+45
+45
+45
+45
+46
+45
+45
+45
+45
+45
+44
+43
+42
+42
+42
+43
+42
+42
+42
+41
+41
+41
+41
+43
+43
+43
+43
+43
+43
+43
+43
+42
+42
+43
+43
+43
+44
+44
+44
+44
+44
+44
+45
+45
+45
+45
+46
+44
+44
+45
+46
+46
+46
+46
+45
+45
+45
+45
+45
+46
+47
+48
+49
+48
+49
+50
+51
+51
+52
+52
+52
+52
+52
+52
+52
+54
+55
+57
+58
+59
+59
+60
+61
+59
+58
+55
+54
+54
+54
+53
+55
+57
+59
+60
+60
+63
+64
+64
+64
+67
+68
+69
+68
+70
+72
+73
+73
+69
+67
+66
+65
+66
+65
+63
+62
+62
+62
+62
+63
+60
+61
+60
+61
+62
+61
+60
+61
+60
+60
+60
+59
+59
+60
+58
+59
+60
+60
+60
+62
+63
+65
+67
+68
+74
+72
+72
+75
+75
+76
+83
+96
+115
+129
+140
+142
+137
+128
+113
+99
+82
+78
+73
+68
+64
+59
+54
+49
+49
+49
+48
+48
+47
+47
+47
+47
+47
+48
+47
+47
+47
+47
+47
+47
+48
+48
+48
+48
+48
+48
+48
+47
+43
+43
+47
+54
+69
+94
+122
+141
+148
+151
+149
+142
+137
+137
+139
+140
+136
+131
+126
+125
+126
+130
+142
+153
+161
+168
+165
+157
+150
+141
+123
+104
+86
+87
+89
+46
+46
+46
+46
+46
+46
+46
+46
+45
+45
+44
+44
+42
+42
+42
+42
+42
+41
+41
+41
+41
+40
+40
+40
+42
+42
+42
+42
+42
+42
+42
+42
+42
+42
+42
+42
+42
+43
+43
+43
+43
+44
+44
+44
+44
+45
+45
+45
+43
+44
+45
+45
+45
+45
+44
+44
+44
+44
+44
+44
+45
+46
+47
+48
+49
+50
+51
+52
+51
+51
+51
+52
+51
+51
+50
+51
+52
+54
+55
+56
+57
+57
+58
+59
+58
+57
+56
+53
+55
+54
+54
+56
+57
+58
+60
+62
+63
+63
+63
+63
+65
+66
+68
+69
+71
+72
+74
+73
+70
+66
+65
+64
+65
+65
+63
+62
+62
+62
+61
+62
+60
+61
+61
+61
+61
+61
+61
+60
+59
+59
+59
+59
+59
+59
+59
+59
+59
+60
+60
+62
+64
+67
+68
+69
+76
+72
+71
+74
+76
+81
+93
+106
+128
+143
+154
+155
+149
+139
+123
+109
+90
+85
+79
+73
+68
+61
+55
+51
+49
+48
+47
+45
+45
+45
+46
+47
+46
+46
+46
+46
+46
+46
+46
+46
+47
+47
+47
+47
+47
+47
+47
+45
+44
+42
+45
+54
+74
+102
+128
+144
+147
+150
+149
+144
+144
+153
+164
+168
+168
+164
+160
+158
+153
+152
+156
+163
+176
+177
+173
+163
+155
+146
+124
+102
+86
+85
+86
+47
+47
+47
+47
+46
+46
+46
+46
+45
+45
+45
+44
+44
+43
+43
+43
+42
+42
+42
+41
+41
+40
+40
+40
+42
+42
+42
+42
+42
+42
+42
+42
+42
+42
+42
+42
+42
+41
+41
+41
+42
+43
+43
+44
+44
+45
+45
+45
+43
+44
+44
+44
+44
+44
+43
+42
+43
+43
+43
+43
+44
+45
+47
+48
+48
+50
+51
+52
+51
+51
+50
+50
+50
+50
+49
+49
+50
+51
+53
+54
+54
+56
+57
+58
+57
+57
+56
+53
+55
+54
+55
+55
+58
+60
+62
+62
+64
+63
+63
+63
+64
+67
+67
+69
+69
+71
+72
+71
+68
+65
+63
+64
+64
+64
+63
+62
+61
+60
+61
+61
+60
+59
+60
+60
+60
+60
+60
+60
+59
+58
+58
+58
+58
+58
+58
+58
+58
+60
+61
+63
+66
+68
+70
+72
+75
+72
+71
+76
+80
+88
+102
+118
+140
+153
+164
+163
+157
+145
+130
+117
+101
+95
+85
+76
+70
+64
+58
+56
+49
+48
+45
+44
+43
+43
+45
+46
+45
+45
+45
+45
+45
+46
+45
+46
+46
+47
+46
+47
+47
+47
+47
+45
+44
+41
+43
+54
+76
+104
+131
+146
+151
+154
+153
+150
+155
+170
+185
+192
+183
+182
+183
+183
+177
+171
+171
+177
+179
+180
+173
+162
+155
+146
+122
+98
+84
+84
+85
+48
+48
+48
+48
+47
+47
+47
+47
+46
+46
+46
+45
+45
+45
+44
+44
+43
+43
+43
+42
+41
+40
+40
+40
+41
+41
+41
+41
+41
+41
+41
+41
+42
+42
+41
+41
+41
+40
+40
+40
+42
+42
+42
+43
+44
+44
+45
+45
+43
+43
+44
+44
+43
+43
+42
+41
+44
+44
+43
+44
+45
+46
+47
+48
+49
+49
+51
+52
+51
+50
+50
+49
+50
+49
+48
+48
+49
+50
+52
+52
+53
+55
+57
+58
+57
+56
+55
+53
+53
+53
+54
+56
+57
+60
+62
+61
+63
+62
+63
+63
+66
+66
+67
+68
+66
+68
+69
+69
+66
+63
+62
+62
+63
+63
+61
+61
+60
+60
+60
+60
+59
+60
+60
+59
+59
+60
+59
+59
+58
+58
+57
+58
+58
+57
+57
+57
+60
+60
+63
+65
+67
+70
+73
+73
+74
+71
+72
+78
+86
+96
+112
+131
+148
+161
+168
+167
+160
+150
+136
+123
+112
+105
+94
+83
+75
+69
+64
+60
+52
+50
+46
+44
+41
+42
+43
+44
+43
+43
+43
+43
+43
+44
+44
+44
+45
+45
+45
+45
+46
+46
+46
+44
+42
+40
+43
+54
+75
+103
+130
+147
+155
+158
+159
+158
+165
+180
+197
+206
+201
+202
+203
+200
+190
+179
+176
+178
+178
+178
+172
+161
+153
+142
+120
+95
+81
+81
+81
+48
+48
+48
+48
+47
+47
+47
+47
+47
+47
+47
+47
+46
+46
+45
+45
+45
+44
+44
+43
+42
+41
+41
+40
+41
+41
+41
+41
+41
+41
+41
+41
+41
+41
+41
+40
+40
+40
+39
+39
+41
+41
+42
+43
+44
+44
+45
+45
+43
+43
+43
+43
+43
+42
+41
+40
+44
+44
+44
+44
+45
+46
+48
+48
+49
+50
+50
+51
+51
+50
+50
+49
+49
+49
+48
+47
+48
+48
+49
+51
+54
+54
+56
+57
+58
+57
+55
+54
+52
+52
+52
+53
+56
+58
+59
+59
+60
+60
+62
+64
+65
+66
+65
+64
+62
+64
+66
+66
+64
+62
+61
+63
+63
+63
+62
+61
+59
+59
+60
+60
+59
+59
+59
+59
+59
+58
+58
+59
+57
+57
+58
+57
+57
+57
+56
+56
+60
+61
+64
+66
+69
+73
+75
+77
+73
+72
+74
+83
+93
+104
+123
+142
+156
+167
+172
+170
+161
+153
+139
+129
+120
+114
+104
+93
+84
+76
+68
+63
+55
+52
+48
+43
+40
+40
+41
+43
+41
+41
+41
+41
+41
+42
+42
+42
+43
+43
+44
+44
+44
+44
+44
+43
+41
+41
+45
+54
+72
+99
+128
+146
+156
+160
+162
+161
+168
+184
+200
+208
+211
+210
+209
+203
+189
+175
+172
+176
+174
+177
+171
+159
+148
+136
+115
+93
+79
+77
+76
+47
+48
+47
+47
+48
+48
+48
+47
+48
+48
+48
+47
+47
+47
+46
+45
+46
+45
+45
+44
+43
+42
+41
+41
+41
+41
+41
+41
+41
+41
+41
+41
+41
+41
+40
+40
+40
+39
+39
+38
+40
+41
+42
+43
+43
+45
+46
+46
+44
+44
+43
+43
+42
+41
+40
+40
+45
+45
+45
+45
+46
+47
+48
+49
+51
+51
+52
+52
+51
+50
+49
+49
+49
+49
+47
+47
+47
+48
+49
+50
+51
+54
+55
+57
+58
+58
+56
+54
+50
+49
+50
+51
+54
+57
+60
+59
+61
+61
+63
+64
+64
+64
+63
+61
+60
+62
+66
+67
+66
+63
+62
+62
+62
+61
+61
+61
+61
+61
+61
+62
+60
+60
+60
+59
+58
+59
+59
+59
+58
+59
+58
+59
+59
+58
+58
+58
+62
+62
+64
+67
+70
+74
+77
+79
+73
+73
+80
+92
+104
+117
+135
+153
+162
+170
+172
+169
+162
+155
+144
+136
+126
+121
+112
+103
+93
+82
+73
+65
+56
+53
+48
+43
+40
+40
+41
+42
+41
+42
+42
+41
+41
+41
+41
+41
+42
+42
+43
+43
+44
+44
+44
+43
+41
+42
+45
+54
+70
+96
+124
+144
+153
+158
+161
+161
+167
+182
+196
+203
+201
+199
+198
+193
+183
+173
+174
+181
+171
+174
+169
+156
+143
+131
+110
+90
+76
+74
+72
+48
+48
+48
+49
+49
+49
+50
+49
+50
+51
+51
+50
+49
+49
+47
+47
+48
+48
+47
+46
+44
+45
+44
+44
+44
+44
+45
+45
+44
+43
+41
+41
+41
+41
+40
+41
+41
+41
+42
+42
+43
+43
+44
+45
+45
+46
+47
+47
+45
+45
+44
+45
+46
+47
+46
+46
+45
+44
+45
+46
+47
+49
+49
+50
+52
+52
+53
+53
+53
+52
+51
+50
+50
+49
+49
+48
+47
+48
+48
+49
+47
+49
+51
+54
+56
+55
+54
+50
+45
+41
+39
+41
+46
+53
+60
+63
+65
+64
+65
+66
+64
+61
+59
+56
+59
+61
+65
+66
+67
+65
+62
+59
+59
+58
+59
+61
+63
+63
+63
+63
+64
+63
+62
+61
+60
+59
+58
+59
+57
+64
+60
+56
+62
+62
+59
+63
+59
+63
+68
+72
+76
+77
+79
+78
+76
+84
+99
+113
+125
+138
+151
+159
+166
+167
+168
+168
+165
+161
+155
+151
+142
+133
+122
+116
+110
+101
+88
+75
+63
+57
+48
+43
+39
+39
+39
+38
+41
+41
+40
+39
+38
+38
+38
+38
+39
+39
+40
+40
+41
+42
+42
+42
+41
+43
+45
+47
+63
+92
+122
+139
+156
+157
+161
+166
+168
+170
+180
+191
+193
+190
+186
+179
+174
+171
+170
+170
+168
+166
+158
+148
+137
+124
+107
+90
+82
+73
+65
+48
+49
+49
+49
+50
+50
+49
+50
+51
+51
+52
+52
+51
+50
+48
+48
+47
+47
+46
+46
+46
+45
+44
+44
+44
+45
+45
+45
+44
+42
+42
+40
+41
+40
+40
+40
+41
+41
+42
+42
+43
+43
+45
+45
+47
+47
+47
+47
+46
+46
+46
+46
+46
+46
+45
+46
+45
+46
+46
+47
+47
+48
+50
+51
+53
+53
+53
+53
+53
+52
+51
+51
+50
+49
+48
+48
+47
+47
+48
+49
+47
+47
+50
+51
+52
+51
+50
+48
+44
+42
+41
+42
+45
+51
+57
+61
+65
+65
+65
+64
+63
+61
+58
+59
+57
+60
+62
+64
+65
+65
+65
+63
+59
+59
+60
+61
+62
+64
+63
+64
+64
+62
+61
+60
+59
+59
+58
+60
+57
+61
+59
+57
+63
+63
+57
+58
+61
+64
+68
+72
+74
+77
+79
+77
+74
+84
+102
+119
+135
+147
+159
+166
+167
+168
+167
+167
+165
+160
+156
+153
+147
+139
+130
+123
+119
+111
+97
+86
+73
+65
+56
+48
+42
+41
+40
+40
+40
+39
+39
+39
+38
+38
+39
+39
+39
+40
+40
+41
+42
+42
+43
+43
+45
+46
+44
+45
+58
+88
+120
+139
+150
+153
+158
+163
+164
+165
+173
+182
+185
+182
+179
+174
+171
+168
+168
+168
+166
+164
+157
+146
+136
+123
+106
+90
+77
+68
+62
+50
+50
+50
+50
+51
+51
+51
+51
+52
+52
+53
+53
+53
+52
+50
+49
+48
+48
+47
+46
+47
+46
+44
+45
+45
+45
+46
+45
+45
+44
+42
+41
+40
+39
+41
+41
+41
+41
+42
+42
+44
+44
+46
+46
+46
+47
+47
+47
+47
+47
+46
+46
+47
+46
+45
+45
+46
+48
+48
+49
+49
+51
+52
+53
+54
+54
+55
+55
+54
+53
+52
+52
+50
+49
+48
+48
+48
+48
+49
+49
+49
+47
+46
+44
+43
+42
+42
+42
+44
+46
+45
+45
+46
+48
+50
+52
+58
+59
+59
+61
+60
+60
+58
+58
+60
+61
+62
+63
+65
+65
+66
+67
+63
+61
+62
+62
+62
+62
+61
+61
+59
+60
+58
+58
+59
+60
+61
+61
+62
+60
+59
+60
+65
+65
+61
+59
+63
+65
+70
+72
+74
+74
+78
+77
+73
+83
+101
+117
+132
+144
+156
+164
+168
+169
+169
+168
+164
+158
+153
+151
+149
+146
+139
+134
+130
+124
+114
+104
+89
+80
+68
+58
+51
+47
+45
+42
+38
+36
+36
+36
+37
+38
+40
+42
+42
+42
+43
+44
+45
+45
+46
+45
+47
+47
+42
+42
+55
+85
+118
+138
+144
+147
+153
+159
+160
+160
+165
+172
+175
+173
+170
+169
+167
+167
+166
+166
+164
+162
+155
+145
+135
+124
+107
+90
+73
+64
+58
+51
+51
+52
+52
+52
+53
+52
+52
+53
+54
+54
+55
+55
+54
+52
+52
+50
+49
+49
+48
+48
+47
+46
+46
+47
+47
+47
+47
+46
+46
+45
+43
+41
+41
+42
+42
+42
+42
+43
+43
+45
+45
+47
+47
+48
+48
+48
+48
+49
+49
+47
+48
+48
+46
+46
+46
+50
+50
+50
+51
+52
+54
+54
+55
+56
+56
+57
+56
+56
+55
+53
+53
+50
+50
+49
+48
+48
+49
+50
+49
+51
+49
+45
+41
+38
+37
+38
+40
+47
+49
+50
+50
+47
+47
+45
+46
+57
+59
+60
+60
+59
+59
+59
+58
+62
+64
+66
+66
+67
+66
+65
+65
+64
+64
+63
+63
+62
+60
+59
+58
+56
+56
+57
+57
+59
+60
+61
+62
+64
+55
+56
+60
+59
+62
+65
+64
+66
+68
+71
+73
+73
+75
+78
+80
+81
+90
+101
+114
+125
+136
+147
+156
+165
+167
+168
+168
+163
+158
+152
+150
+148
+146
+142
+140
+139
+134
+125
+118
+103
+93
+80
+68
+58
+52
+47
+42
+37
+35
+35
+36
+37
+39
+41
+44
+42
+43
+43
+44
+44
+44
+45
+44
+42
+43
+43
+43
+56
+85
+113
+132
+140
+143
+150
+156
+159
+158
+160
+165
+167
+165
+163
+163
+165
+165
+165
+164
+161
+159
+153
+144
+135
+124
+107
+91
+71
+61
+55
+53
+53
+53
+54
+54
+54
+54
+54
+55
+55
+56
+57
+57
+57
+55
+55
+52
+52
+51
+51
+51
+50
+49
+49
+49
+50
+50
+49
+48
+47
+46
+45
+44
+43
+43
+43
+44
+44
+44
+44
+47
+47
+47
+47
+49
+49
+50
+50
+50
+50
+50
+50
+49
+49
+49
+49
+52
+53
+52
+54
+55
+56
+56
+57
+58
+58
+59
+58
+57
+56
+53
+53
+51
+51
+50
+50
+50
+50
+51
+51
+52
+50
+48
+44
+40
+39
+40
+44
+50
+53
+55
+54
+51
+49
+47
+47
+58
+59
+60
+61
+60
+60
+59
+58
+59
+62
+65
+66
+67
+67
+64
+64
+66
+67
+64
+62
+60
+59
+57
+56
+54
+55
+56
+58
+60
+61
+62
+62
+57
+48
+56
+63
+53
+53
+66
+67
+69
+71
+73
+74
+74
+76
+79
+85
+94
+102
+109
+114
+121
+131
+144
+154
+159
+163
+167
+168
+166
+162
+156
+151
+144
+142
+140
+139
+139
+136
+131
+126
+113
+104
+90
+75
+64
+54
+47
+42
+39
+37
+38
+38
+39
+40
+43
+44
+43
+43
+43
+43
+42
+42
+41
+41
+35
+42
+48
+54
+67
+90
+112
+125
+136
+138
+144
+152
+155
+153
+154
+159
+162
+160
+159
+160
+163
+165
+165
+163
+158
+156
+150
+142
+134
+123
+107
+92
+69
+58
+52
+54
+54
+55
+55
+56
+56
+55
+55
+56
+57
+58
+59
+59
+59
+57
+57
+55
+55
+54
+53
+54
+53
+52
+52
+52
+52
+53
+52
+51
+51
+49
+48
+45
+45
+45
+45
+46
+46
+46
+47
+48
+48
+48
+49
+50
+50
+51
+51
+51
+51
+52
+52
+52
+53
+52
+53
+54
+55
+55
+56
+57
+58
+58
+59
+60
+60
+60
+60
+59
+57
+55
+54
+53
+53
+52
+51
+51
+52
+53
+53
+54
+53
+50
+49
+46
+45
+47
+49
+53
+56
+57
+57
+55
+54
+50
+50
+50
+51
+53
+54
+55
+56
+55
+54
+55
+58
+60
+62
+63
+64
+63
+65
+65
+65
+65
+63
+60
+58
+57
+56
+55
+56
+57
+59
+60
+61
+62
+60
+53
+51
+77
+89
+65
+57
+70
+75
+71
+74
+76
+77
+77
+80
+85
+92
+105
+112
+114
+117
+117
+124
+135
+145
+147
+153
+160
+165
+165
+161
+156
+150
+143
+141
+140
+142
+142
+141
+138
+134
+125
+116
+104
+90
+77
+64
+54
+47
+43
+42
+42
+42
+42
+44
+45
+45
+45
+45
+44
+43
+41
+40
+39
+40
+40
+51
+62
+71
+82
+98
+113
+121
+130
+132
+137
+145
+149
+149
+151
+154
+159
+156
+155
+158
+162
+164
+162
+159
+154
+153
+148
+141
+133
+124
+108
+92
+68
+57
+51
+55
+56
+56
+56
+57
+57
+56
+57
+57
+58
+59
+60
+60
+60
+59
+59
+58
+58
+57
+56
+56
+56
+55
+55
+55
+55
+55
+55
+54
+53
+51
+51
+47
+47
+47
+48
+48
+48
+49
+49
+49
+49
+50
+50
+51
+51
+52
+52
+52
+52
+52
+53
+54
+57
+56
+57
+55
+56
+57
+58
+58
+60
+61
+61
+61
+61
+61
+60
+60
+58
+56
+55
+56
+55
+55
+54
+54
+55
+55
+56
+54
+55
+56
+56
+57
+56
+56
+57
+56
+56
+57
+56
+57
+57
+57
+54
+47
+47
+51
+54
+57
+59
+59
+61
+65
+64
+61
+60
+58
+60
+61
+64
+63
+64
+62
+62
+60
+59
+58
+59
+58
+59
+60
+61
+61
+60
+59
+57
+49
+61
+108
+127
+91
+68
+76
+78
+73
+77
+80
+81
+83
+85
+90
+100
+113
+120
+118
+115
+109
+107
+111
+116
+128
+137
+148
+156
+159
+159
+154
+151
+143
+142
+144
+146
+147
+147
+146
+144
+137
+130
+119
+107
+93
+79
+67
+58
+50
+49
+48
+47
+47
+47
+47
+47
+47
+46
+44
+42
+40
+38
+36
+38
+53
+67
+81
+89
+98
+109
+119
+123
+130
+130
+134
+142
+148
+148
+150
+154
+157
+155
+153
+156
+160
+162
+158
+155
+151
+151
+146
+139
+132
+123
+109
+93
+73
+60
+54
+56
+56
+57
+57
+57
+58
+57
+57
+58
+59
+60
+61
+61
+61
+60
+60
+59
+59
+59
+58
+58
+57
+57
+56
+57
+57
+57
+57
+56
+55
+53
+51
+48
+48
+49
+49
+49
+49
+49
+50
+49
+49
+51
+51
+51
+52
+52
+52
+52
+53
+53
+56
+57
+58
+59
+59
+56
+58
+57
+59
+60
+61
+62
+62
+62
+62
+61
+61
+60
+59
+57
+56
+57
+57
+56
+55
+55
+56
+57
+57
+56
+57
+59
+60
+60
+60
+60
+59
+54
+54
+54
+54
+55
+56
+57
+54
+53
+54
+59
+64
+68
+72
+74
+76
+81
+76
+68
+59
+55
+55
+57
+60
+60
+61
+60
+59
+59
+59
+60
+61
+62
+62
+62
+61
+59
+57
+54
+51
+41
+63
+125
+150
+104
+72
+75
+72
+76
+81
+83
+86
+86
+90
+95
+102
+113
+118
+115
+107
+95
+84
+81
+82
+111
+121
+133
+142
+147
+148
+145
+142
+137
+137
+140
+142
+144
+144
+143
+144
+137
+133
+121
+110
+97
+82
+68
+59
+52
+49
+48
+47
+47
+46
+46
+47
+48
+47
+46
+44
+41
+40
+39
+41
+66
+81
+94
+101
+108
+117
+123
+126
+132
+132
+135
+143
+149
+150
+153
+157
+155
+153
+150
+153
+157
+159
+154
+150
+148
+148
+144
+138
+132
+124
+109
+93
+79
+67
+60
+58
+58
+58
+58
+58
+59
+60
+60
+60
+60
+61
+61
+62
+63
+63
+63
+64
+64
+64
+63
+63
+62
+62
+61
+59
+59
+59
+59
+58
+59
+58
+58
+56
+56
+56
+55
+54
+55
+55
+55
+55
+55
+54
+53
+53
+53
+52
+52
+54
+54
+54
+55
+55
+56
+58
+59
+58
+60
+60
+62
+63
+64
+64
+64
+64
+64
+63
+62
+60
+59
+59
+59
+57
+56
+57
+56
+56
+56
+57
+57
+53
+68
+64
+58
+64
+54
+48
+60
+52
+54
+52
+48
+47
+54
+61
+60
+73
+71
+73
+75
+70
+62
+61
+68
+78
+80
+86
+89
+79
+65
+59
+62
+57
+56
+53
+51
+55
+62
+63
+60
+65
+63
+59
+57
+54
+50
+44
+38
+72
+99
+70
+89
+122
+86
+70
+86
+82
+91
+98
+100
+95
+94
+99
+106
+99
+110
+111
+89
+59
+45
+44
+49
+65
+74
+91
+111
+124
+129
+133
+138
+126
+128
+131
+133
+135
+136
+138
+138
+128
+125
+121
+110
+98
+85
+72
+65
+58
+47
+48
+49
+39
+37
+48
+53
+51
+50
+49
+49
+46
+43
+45
+54
+72
+87
+95
+100
+111
+124
+132
+129
+131
+135
+141
+146
+149
+151
+153
+155
+150
+152
+151
+149
+149
+153
+152
+150
+149
+141
+135
+132
+130
+122
+109
+95
+80
+75
+73
+58
+58
+58
+58
+59
+60
+61
+62
+61
+61
+62
+62
+63
+64
+63
+63
+65
+64
+64
+64
+63
+63
+62
+62
+62
+62
+62
+61
+60
+60
+59
+58
+57
+57
+57
+57
+56
+56
+57
+57
+55
+55
+54
+54
+54
+53
+52
+52
+54
+54
+54
+55
+55
+58
+58
+60
+59
+59
+61
+62
+64
+64
+64
+64
+64
+64
+63
+61
+60
+59
+59
+59
+58
+57
+57
+57
+57
+57
+58
+58
+58
+56
+47
+46
+55
+58
+59
+69
+68
+72
+73
+72
+74
+79
+80
+79
+68
+66
+66
+67
+62
+55
+55
+61
+67
+63
+64
+69
+71
+70
+72
+78
+75
+71
+64
+56
+55
+61
+62
+61
+60
+72
+75
+62
+43
+40
+57
+75
+76
+79
+64
+65
+96
+89
+64
+84
+97
+91
+92
+104
+108
+102
+99
+99
+102
+97
+88
+67
+46
+39
+40
+42
+48
+53
+63
+76
+82
+84
+85
+90
+98
+101
+105
+108
+112
+116
+118
+120
+124
+121
+118
+113
+107
+101
+97
+95
+97
+84
+76
+72
+68
+70
+55
+28
+49
+48
+49
+54
+56
+58
+62
+69
+79
+90
+97
+102
+114
+130
+137
+134
+137
+137
+139
+142
+146
+148
+148
+148
+146
+150
+151
+150
+152
+157
+157
+155
+153
+146
+137
+132
+129
+121
+109
+97
+83
+80
+79
+57
+57
+57
+58
+60
+61
+62
+63
+63
+63
+64
+64
+64
+64
+63
+63
+65
+65
+65
+64
+64
+64
+64
+63
+65
+64
+63
+62
+61
+60
+60
+59
+58
+58
+58
+58
+59
+59
+59
+60
+56
+56
+55
+54
+53
+53
+52
+52
+54
+54
+53
+55
+55
+57
+57
+59
+59
+60
+61
+63
+63
+64
+65
+64
+63
+63
+62
+61
+60
+59
+59
+58
+58
+58
+58
+58
+59
+60
+60
+59
+69
+51
+51
+65
+76
+86
+93
+96
+66
+73
+77
+79
+82
+85
+80
+76
+65
+66
+64
+63
+59
+55
+56
+61
+69
+62
+55
+58
+62
+65
+67
+67
+48
+57
+68
+75
+77
+75
+65
+55
+56
+54
+49
+48
+51
+60
+70
+77
+71
+54
+60
+52
+79
+99
+74
+91
+99
+95
+99
+111
+111
+103
+103
+104
+100
+84
+71
+58
+52
+52
+50
+46
+53
+51
+53
+56
+55
+54
+54
+57
+65
+67
+70
+73
+77
+81
+84
+86
+84
+83
+80
+78
+78
+81
+83
+87
+105
+99
+93
+87
+90
+101
+83
+45
+39
+49
+58
+63
+58
+56
+66
+78
+79
+86
+95
+101
+117
+134
+140
+136
+140
+139
+139
+139
+140
+143
+144
+144
+149
+155
+158
+160
+163
+168
+169
+166
+162
+152
+141
+131
+126
+119
+109
+99
+87
+85
+85
+56
+56
+57
+58
+60
+62
+63
+64
+65
+65
+65
+65
+65
+65
+64
+64
+66
+66
+66
+65
+65
+66
+65
+65
+67
+66
+65
+64
+62
+61
+60
+59
+58
+58
+59
+59
+59
+60
+60
+60
+57
+56
+56
+55
+54
+53
+53
+53
+54
+54
+55
+55
+56
+58
+59
+60
+60
+61
+62
+63
+64
+64
+64
+64
+63
+62
+62
+61
+60
+58
+59
+58
+59
+59
+59
+60
+60
+61
+62
+60
+56
+43
+59
+85
+85
+86
+86
+75
+52
+58
+62
+66
+70
+74
+67
+63
+66
+70
+66
+64
+63
+62
+66
+68
+71
+66
+60
+59
+60
+58
+54
+51
+57
+57
+56
+55
+61
+74
+84
+88
+63
+52
+45
+54
+72
+80
+66
+52
+59
+47
+57
+56
+70
+93
+88
+87
+87
+100
+112
+111
+102
+99
+109
+117
+85
+70
+62
+60
+64
+67
+61
+55
+66
+60
+55
+54
+52
+50
+51
+56
+51
+53
+54
+56
+58
+61
+63
+64
+67
+67
+64
+63
+65
+67
+71
+74
+81
+84
+87
+85
+86
+99
+102
+89
+49
+48
+49
+56
+62
+64
+68
+70
+74
+84
+96
+107
+124
+142
+145
+139
+141
+143
+143
+141
+138
+140
+146
+151
+163
+169
+174
+177
+180
+185
+183
+181
+171
+160
+145
+132
+124
+116
+108
+100
+88
+87
+88
+55
+55
+56
+57
+59
+61
+62
+63
+65
+65
+65
+65
+65
+66
+65
+65
+67
+67
+66
+67
+68
+68
+67
+67
+67
+66
+65
+64
+61
+61
+60
+59
+59
+59
+59
+59
+59
+59
+59
+59
+57
+57
+57
+56
+55
+54
+54
+53
+55
+55
+55
+56
+56
+59
+59
+60
+61
+62
+63
+64
+64
+65
+63
+63
+63
+61
+61
+60
+59
+59
+58
+58
+60
+60
+59
+60
+61
+63
+63
+61
+54
+52
+77
+94
+78
+65
+55
+39
+50
+56
+58
+61
+65
+69
+63
+60
+63
+66
+64
+63
+64
+67
+72
+74
+62
+63
+61
+59
+57
+58
+59
+61
+71
+69
+64
+57
+56
+67
+77
+83
+68
+77
+84
+85
+75
+64
+53
+51
+52
+57
+51
+59
+57
+65
+91
+85
+78
+98
+106
+96
+90
+100
+112
+109
+70
+60
+59
+62
+68
+73
+74
+73
+76
+68
+58
+55
+52
+49
+52
+58
+57
+58
+59
+59
+60
+63
+65
+67
+69
+69
+68
+68
+67
+68
+68
+67
+72
+66
+74
+79
+75
+80
+93
+99
+91
+64
+38
+43
+64
+79
+76
+67
+74
+89
+106
+123
+141
+156
+156
+147
+142
+151
+155
+153
+146
+147
+158
+168
+182
+188
+193
+193
+195
+198
+195
+190
+181
+169
+151
+135
+123
+115
+109
+102
+90
+89
+91
+54
+54
+55
+56
+57
+59
+60
+61
+63
+63
+64
+65
+66
+66
+66
+66
+68
+68
+67
+68
+69
+69
+68
+69
+67
+67
+66
+65
+64
+63
+62
+61
+61
+61
+60
+60
+59
+59
+59
+58
+58
+58
+57
+57
+56
+55
+54
+54
+55
+55
+55
+56
+57
+59
+60
+61
+63
+62
+63
+64
+65
+65
+63
+63
+63
+61
+60
+59
+59
+59
+57
+57
+59
+60
+59
+60
+62
+63
+63
+59
+57
+71
+90
+88
+68
+57
+52
+44
+50
+56
+58
+58
+61
+64
+59
+56
+55
+58
+57
+55
+58
+66
+69
+69
+62
+63
+60
+54
+54
+62
+68
+71
+58
+65
+70
+68
+63
+59
+52
+48
+57
+73
+85
+80
+63
+50
+48
+55
+49
+61
+46
+56
+52
+55
+104
+108
+87
+90
+86
+81
+91
+106
+103
+83
+69
+62
+60
+62
+66
+72
+80
+87
+79
+68
+59
+54
+50
+47
+50
+55
+57
+58
+58
+59
+61
+63
+67
+68
+60
+62
+63
+64
+64
+62
+61
+60
+74
+61
+66
+78
+77
+80
+86
+91
+114
+97
+74
+58
+53
+56
+66
+76
+81
+101
+124
+141
+157
+167
+166
+156
+158
+167
+175
+172
+167
+168
+180
+193
+201
+206
+208
+208
+206
+207
+203
+198
+189
+178
+159
+140
+126
+116
+110
+106
+95
+96
+95
+54
+54
+54
+54
+55
+57
+57
+58
+60
+61
+62
+64
+65
+67
+67
+67
+68
+69
+68
+68
+70
+70
+70
+70
+69
+68
+67
+67
+66
+65
+64
+65
+65
+65
+64
+63
+61
+60
+60
+60
+58
+58
+58
+57
+56
+56
+55
+55
+56
+56
+56
+56
+58
+59
+60
+61
+63
+63
+64
+65
+64
+64
+64
+63
+61
+61
+61
+60
+59
+58
+56
+57
+58
+59
+58
+59
+61
+62
+64
+58
+50
+75
+84
+63
+49
+48
+49
+50
+50
+57
+61
+61
+61
+63
+59
+55
+54
+56
+54
+52
+56
+64
+67
+64
+66
+65
+60
+56
+58
+67
+68
+65
+64
+64
+55
+44
+36
+39
+44
+49
+44
+48
+53
+55
+53
+52
+50
+51
+52
+55
+51
+55
+55
+63
+97
+127
+101
+86
+76
+86
+100
+99
+82
+66
+69
+63
+62
+64
+63
+63
+69
+77
+74
+63
+56
+54
+53
+50
+54
+59
+58
+58
+56
+56
+56
+59
+61
+63
+64
+64
+65
+67
+68
+67
+67
+67
+73
+68
+72
+77
+77
+88
+97
+94
+107
+113
+111
+93
+67
+54
+65
+85
+101
+125
+150
+163
+174
+182
+182
+175
+183
+189
+193
+195
+194
+198
+206
+215
+218
+221
+221
+218
+216
+215
+212
+207
+197
+186
+167
+146
+130
+120
+115
+111
+106
+105
+104
+54
+54
+54
+54
+54
+55
+55
+56
+59
+60
+61
+63
+65
+67
+68
+69
+69
+69
+69
+70
+70
+71
+71
+72
+71
+71
+69
+68
+68
+68
+67
+67
+67
+68
+66
+65
+62
+61
+61
+59
+58
+58
+58
+58
+57
+55
+55
+55
+55
+55
+56
+57
+58
+58
+60
+61
+64
+63
+64
+65
+65
+64
+64
+63
+62
+62
+61
+59
+57
+56
+55
+56
+56
+58
+59
+61
+61
+62
+63
+57
+61
+93
+90
+56
+47
+50
+47
+51
+58
+67
+71
+70
+66
+66
+61
+58
+57
+59
+58
+55
+60
+67
+69
+64
+61
+60
+59
+60
+69
+76
+69
+56
+55
+60
+61
+53
+44
+42
+40
+39
+44
+48
+52
+54
+53
+52
+51
+52
+59
+50
+63
+55
+57
+63
+65
+108
+103
+82
+78
+98
+103
+81
+64
+65
+60
+58
+59
+62
+61
+54
+52
+56
+71
+63
+58
+57
+57
+55
+58
+63
+67
+65
+63
+59
+58
+58
+59
+60
+64
+63
+63
+63
+64
+65
+64
+66
+68
+79
+86
+76
+66
+86
+105
+102
+94
+96
+104
+112
+112
+102
+92
+89
+126
+152
+176
+187
+194
+199
+199
+195
+202
+202
+202
+206
+213
+219
+224
+227
+229
+232
+232
+228
+225
+224
+221
+216
+202
+191
+171
+150
+134
+123
+117
+114
+114
+112
+110
+49
+50
+51
+53
+55
+56
+56
+56
+58
+59
+61
+63
+65
+67
+69
+69
+72
+72
+72
+72
+74
+75
+76
+75
+74
+70
+68
+70
+73
+73
+68
+63
+69
+67
+64
+65
+67
+66
+61
+57
+60
+58
+57
+55
+56
+55
+55
+52
+58
+57
+57
+57
+58
+58
+59
+60
+63
+64
+64
+64
+64
+64
+64
+63
+64
+62
+59
+56
+54
+52
+55
+58
+62
+56
+59
+66
+64
+56
+59
+66
+106
+75
+55
+54
+55
+54
+56
+61
+57
+60
+64
+65
+61
+57
+54
+55
+54
+55
+56
+60
+64
+66
+66
+65
+62
+61
+60
+61
+67
+70
+62
+50
+57
+57
+57
+57
+55
+54
+52
+50
+46
+47
+49
+50
+53
+55
+58
+59
+58
+51
+52
+56
+56
+54
+66
+83
+78
+83
+92
+93
+80
+62
+56
+63
+64
+67
+64
+62
+60
+58
+59
+59
+76
+75
+70
+62
+60
+63
+62
+59
+69
+68
+68
+68
+64
+60
+61
+66
+70
+65
+59
+58
+61
+68
+73
+75
+78
+78
+81
+82
+79
+79
+90
+103
+93
+69
+86
+94
+91
+117
+92
+114
+143
+167
+195
+213
+220
+219
+220
+219
+216
+216
+217
+220
+227
+231
+236
+239
+243
+243
+240
+236
+231
+226
+221
+220
+208
+201
+186
+165
+144
+131
+125
+123
+132
+128
+125
+46
+47
+50
+52
+53
+54
+55
+55
+57
+58
+61
+63
+65
+67
+68
+69
+72
+72
+72
+72
+74
+75
+77
+77
+74
+73
+74
+80
+85
+88
+84
+79
+73
+68
+63
+61
+62
+63
+61
+59
+58
+57
+55
+55
+56
+56
+56
+54
+52
+52
+53
+55
+57
+58
+60
+61
+63
+63
+64
+64
+64
+64
+63
+63
+64
+64
+60
+57
+54
+52
+51
+52
+60
+59
+61
+63
+58
+54
+65
+74
+80
+59
+50
+54
+58
+55
+57
+62
+59
+60
+63
+64
+61
+57
+54
+55
+57
+58
+57
+59
+62
+65
+66
+64
+63
+58
+60
+69
+72
+63
+56
+54
+55
+55
+57
+59
+60
+58
+56
+52
+49
+46
+46
+48
+52
+55
+58
+58
+60
+54
+56
+61
+59
+53
+58
+70
+70
+73
+79
+80
+71
+59
+58
+67
+66
+68
+66
+62
+59
+58
+60
+61
+69
+76
+78
+71
+63
+63
+63
+64
+67
+67
+68
+70
+66
+62
+62
+66
+70
+67
+63
+64
+66
+70
+74
+75
+72
+71
+74
+82
+93
+96
+88
+79
+70
+68
+68
+73
+92
+106
+71
+121
+148
+176
+209
+226
+231
+232
+230
+226
+227
+225
+227
+230
+236
+242
+247
+250
+249
+249
+246
+244
+238
+234
+231
+229
+221
+214
+198
+178
+161
+147
+143
+144
+148
+144
+140
+46
+47
+48
+49
+51
+52
+54
+54
+57
+58
+60
+62
+64
+66
+67
+68
+70
+71
+72
+73
+74
+76
+76
+76
+73
+75
+82
+94
+104
+109
+107
+104
+89
+81
+71
+64
+62
+61
+60
+58
+58
+58
+55
+55
+56
+57
+58
+57
+51
+52
+54
+57
+58
+59
+60
+60
+62
+63
+63
+64
+63
+63
+63
+63
+59
+61
+60
+58
+55
+53
+52
+50
+55
+57
+56
+49
+43
+46
+58
+69
+58
+50
+49
+57
+60
+55
+56
+60
+59
+61
+65
+65
+62
+60
+58
+60
+60
+60
+57
+57
+60
+62
+62
+60
+63
+56
+62
+76
+71
+54
+50
+57
+54
+54
+56
+58
+58
+56
+54
+51
+48
+46
+46
+49
+50
+54
+56
+55
+56
+53
+57
+62
+61
+54
+57
+65
+60
+62
+69
+75
+74
+67
+63
+67
+67
+68
+66
+61
+58
+56
+58
+59
+56
+68
+78
+73
+64
+62
+66
+72
+65
+64
+67
+71
+69
+64
+63
+65
+68
+67
+67
+70
+73
+75
+76
+74
+66
+68
+72
+78
+91
+98
+87
+69
+77
+86
+64
+71
+121
+121
+64
+123
+140
+177
+216
+234
+240
+245
+243
+236
+233
+233
+234
+237
+242
+246
+251
+254
+253
+252
+249
+247
+244
+242
+239
+239
+231
+223
+207
+189
+174
+165
+163
+163
+171
+165
+161
+46
+46
+47
+48
+49
+50
+52
+53
+56
+57
+59
+61
+63
+65
+66
+67
+69
+70
+72
+74
+75
+77
+76
+76
+74
+80
+93
+108
+122
+130
+130
+128
+117
+107
+95
+83
+76
+69
+64
+60
+63
+59
+56
+54
+54
+56
+57
+56
+55
+57
+59
+59
+61
+60
+59
+59
+63
+63
+63
+64
+63
+63
+62
+63
+61
+62
+61
+58
+58
+57
+57
+57
+56
+56
+52
+44
+41
+48
+55
+61
+54
+55
+58
+63
+63
+57
+56
+59
+58
+60
+62
+64
+62
+61
+61
+62
+63
+61
+57
+56
+57
+58
+58
+57
+59
+59
+66
+69
+62
+49
+50
+57
+53
+52
+54
+55
+55
+54
+51
+49
+48
+46
+47
+48
+50
+52
+54
+53
+50
+48
+52
+60
+61
+57
+61
+68
+53
+54
+59
+68
+77
+75
+67
+61
+64
+65
+62
+60
+58
+56
+57
+59
+52
+63
+72
+72
+66
+64
+70
+78
+63
+63
+66
+72
+72
+66
+64
+65
+65
+67
+70
+73
+77
+79
+76
+72
+63
+74
+79
+73
+77
+87
+87
+79
+75
+78
+62
+98
+156
+141
+57
+75
+119
+163
+210
+231
+242
+251
+250
+241
+237
+237
+237
+240
+242
+246
+250
+251
+252
+251
+249
+248
+245
+244
+243
+242
+235
+227
+213
+198
+185
+180
+180
+182
+191
+183
+177
+48
+48
+47
+47
+48
+49
+51
+52
+55
+56
+57
+59
+61
+63
+65
+65
+69
+70
+72
+74
+75
+77
+76
+75
+74
+84
+100
+120
+134
+144
+147
+144
+139
+131
+119
+109
+100
+91
+80
+74
+71
+66
+61
+55
+53
+54
+53
+53
+55
+56
+57
+59
+60
+60
+61
+60
+63
+63
+64
+65
+64
+63
+64
+62
+63
+62
+58
+56
+56
+57
+59
+60
+60
+57
+51
+49
+55
+62
+61
+56
+59
+60
+64
+65
+64
+60
+59
+62
+56
+58
+60
+61
+60
+59
+60
+61
+63
+62
+58
+55
+55
+56
+56
+56
+55
+65
+67
+56
+49
+51
+55
+53
+52
+51
+52
+54
+53
+53
+49
+47
+47
+47
+47
+48
+50
+52
+53
+52
+49
+47
+50
+54
+57
+58
+63
+69
+70
+64
+60
+64
+75
+78
+69
+59
+61
+60
+60
+59
+57
+58
+60
+63
+57
+60
+64
+67
+67
+68
+74
+79
+63
+62
+66
+73
+74
+70
+67
+67
+64
+66
+69
+74
+78
+79
+76
+72
+68
+78
+80
+72
+74
+86
+87
+81
+71
+72
+88
+147
+178
+155
+72
+47
+106
+149
+198
+225
+240
+251
+253
+246
+246
+245
+245
+246
+248
+250
+252
+252
+251
+250
+248
+247
+245
+244
+243
+243
+241
+233
+220
+209
+202
+201
+202
+205
+208
+200
+192
+53
+51
+50
+48
+48
+49
+50
+51
+54
+55
+56
+58
+60
+62
+64
+64
+68
+69
+72
+75
+75
+77
+76
+75
+76
+87
+105
+126
+143
+153
+158
+158
+152
+145
+138
+133
+126
+118
+107
+101
+90
+84
+75
+65
+60
+58
+55
+54
+53
+53
+54
+55
+58
+60
+62
+64
+63
+64
+65
+66
+65
+66
+65
+63
+61
+58
+55
+54
+54
+55
+56
+57
+60
+52
+48
+56
+66
+71
+63
+52
+59
+60
+63
+63
+62
+62
+63
+63
+56
+57
+58
+57
+57
+58
+58
+60
+62
+59
+57
+56
+56
+57
+56
+54
+55
+67
+64
+48
+44
+55
+60
+50
+51
+50
+50
+51
+51
+50
+47
+45
+47
+46
+48
+49
+52
+53
+54
+53
+55
+51
+51
+51
+53
+56
+60
+63
+89
+82
+72
+67
+69
+73
+69
+62
+58
+59
+58
+58
+58
+58
+62
+65
+65
+60
+60
+65
+69
+71
+73
+76
+66
+64
+67
+75
+78
+74
+70
+70
+65
+66
+69
+74
+78
+79
+78
+76
+77
+79
+77
+79
+87
+95
+85
+71
+86
+83
+100
+144
+137
+130
+95
+77
+104
+141
+187
+219
+238
+247
+250
+249
+250
+251
+250
+250
+250
+251
+252
+251
+251
+251
+250
+250
+247
+245
+242
+240
+237
+230
+221
+216
+215
+219
+222
+225
+228
+216
+206
+57
+56
+53
+50
+49
+49
+50
+51
+52
+53
+54
+56
+58
+60
+62
+63
+66
+67
+71
+74
+75
+76
+75
+74
+74
+87
+108
+130
+149
+160
+166
+169
+165
+160
+155
+152
+149
+145
+137
+131
+121
+113
+99
+86
+78
+71
+67
+66
+63
+61
+58
+57
+57
+59
+61
+64
+64
+65
+66
+67
+67
+67
+67
+65
+59
+61
+64
+68
+71
+72
+72
+71
+72
+61
+58
+70
+80
+74
+63
+56
+62
+62
+62
+63
+64
+64
+63
+60
+56
+56
+57
+57
+56
+56
+57
+59
+58
+58
+56
+56
+57
+58
+55
+54
+60
+62
+57
+50
+52
+59
+60
+51
+49
+49
+49
+50
+49
+47
+45
+44
+45
+47
+49
+51
+53
+54
+55
+55
+57
+56
+54
+52
+52
+55
+56
+55
+78
+88
+90
+81
+71
+68
+64
+62
+60
+60
+60
+58
+57
+59
+62
+65
+68
+64
+64
+70
+73
+72
+71
+73
+70
+66
+68
+76
+81
+79
+76
+75
+68
+68
+70
+73
+78
+79
+79
+80
+85
+84
+84
+89
+93
+92
+83
+74
+89
+87
+79
+94
+78
+86
+86
+89
+99
+128
+169
+208
+233
+241
+246
+252
+252
+253
+252
+251
+250
+249
+249
+248
+250
+250
+251
+250
+247
+242
+237
+234
+225
+221
+217
+217
+223
+231
+237
+241
+243
+231
+219
+61
+58
+55
+52
+50
+50
+50
+51
+52
+52
+54
+56
+58
+60
+61
+62
+66
+67
+70
+74
+75
+76
+75
+73
+74
+88
+109
+132
+151
+164
+173
+176
+177
+172
+167
+164
+163
+161
+155
+150
+146
+136
+121
+105
+93
+85
+80
+77
+74
+71
+66
+61
+58
+58
+60
+62
+64
+66
+67
+68
+68
+68
+69
+66
+67
+72
+81
+91
+97
+99
+98
+95
+88
+74
+72
+83
+88
+76
+65
+63
+66
+64
+65
+64
+65
+65
+61
+55
+55
+56
+56
+56
+54
+55
+56
+59
+55
+55
+55
+56
+57
+57
+56
+54
+65
+56
+51
+56
+61
+61
+57
+53
+50
+48
+48
+48
+47
+45
+44
+44
+45
+47
+50
+52
+53
+55
+55
+56
+55
+56
+55
+54
+55
+57
+55
+52
+52
+78
+100
+96
+79
+65
+59
+57
+62
+62
+60
+59
+57
+57
+60
+62
+68
+65
+69
+75
+76
+71
+69
+72
+73
+67
+69
+77
+83
+82
+79
+79
+72
+71
+71
+73
+78
+81
+82
+84
+84
+90
+96
+96
+86
+78
+81
+90
+93
+102
+80
+88
+83
+90
+79
+83
+92
+114
+152
+198
+226
+235
+242
+255
+255
+255
+255
+255
+253
+252
+251
+249
+248
+248
+249
+249
+245
+239
+232
+229
+221
+218
+217
+222
+232
+243
+250
+254
+250
+237
+224
+62
+61
+60
+58
+56
+54
+52
+51
+50
+50
+51
+52
+54
+57
+60
+62
+64
+67
+70
+73
+74
+75
+76
+78
+73
+82
+100
+126
+146
+160
+170
+176
+179
+178
+180
+178
+177
+175
+172
+171
+161
+154
+141
+127
+114
+101
+90
+82
+81
+81
+79
+72
+63
+58
+59
+63
+62
+66
+69
+68
+66
+67
+70
+75
+85
+101
+113
+114
+117
+119
+111
+95
+91
+88
+87
+87
+78
+65
+58
+59
+60
+61
+63
+64
+64
+63
+61
+59
+54
+54
+54
+55
+55
+56
+57
+56
+56
+57
+58
+57
+54
+54
+56
+58
+67
+61
+55
+64
+91
+108
+93
+63
+51
+50
+50
+47
+42
+40
+40
+43
+45
+48
+50
+49
+48
+49
+52
+58
+59
+60
+60
+60
+58
+57
+56
+55
+64
+56
+71
+99
+88
+66
+64
+52
+58
+60
+60
+60
+58
+58
+60
+62
+62
+67
+80
+88
+79
+63
+63
+72
+72
+71
+74
+80
+82
+78
+75
+76
+82
+79
+75
+74
+77
+81
+82
+82
+88
+89
+89
+92
+93
+91
+88
+86
+101
+89
+95
+94
+73
+73
+84
+88
+102
+103
+142
+181
+209
+234
+238
+248
+250
+255
+255
+255
+254
+255
+252
+247
+250
+250
+247
+243
+244
+243
+232
+217
+214
+209
+214
+231
+244
+247
+251
+255
+254
+240
+227
+63
+62
+61
+59
+57
+55
+54
+53
+51
+51
+51
+52
+53
+56
+59
+61
+63
+66
+69
+72
+73
+74
+75
+77
+74
+81
+98
+123
+143
+157
+166
+174
+180
+181
+182
+183
+183
+182
+180
+178
+170
+163
+152
+138
+127
+113
+101
+94
+87
+86
+84
+80
+73
+67
+65
+65
+60
+66
+69
+68
+63
+66
+77
+86
+103
+116
+125
+125
+124
+124
+113
+96
+89
+87
+81
+73
+64
+60
+61
+63
+56
+55
+56
+57
+56
+57
+55
+54
+51
+52
+55
+58
+60
+61
+60
+60
+62
+60
+60
+62
+66
+67
+66
+65
+64
+66
+64
+56
+49
+54
+73
+91
+64
+54
+43
+41
+45
+47
+44
+40
+48
+52
+54
+54
+51
+50
+50
+54
+58
+59
+60
+58
+57
+55
+53
+52
+57
+53
+61
+80
+84
+76
+66
+49
+59
+61
+60
+59
+57
+56
+58
+58
+62
+66
+79
+87
+82
+68
+67
+72
+76
+74
+77
+83
+84
+80
+78
+79
+86
+85
+83
+82
+82
+83
+83
+83
+76
+84
+92
+96
+91
+85
+82
+84
+87
+84
+93
+93
+82
+87
+93
+86
+96
+92
+127
+169
+199
+224
+233
+248
+250
+255
+255
+255
+254
+255
+253
+248
+250
+249
+247
+244
+245
+244
+233
+220
+215
+209
+213
+229
+245
+249
+252
+255
+253
+241
+227
+65
+65
+63
+61
+59
+57
+56
+55
+52
+52
+51
+52
+53
+56
+58
+60
+62
+66
+68
+70
+71
+71
+73
+74
+75
+80
+94
+117
+138
+153
+164
+171
+179
+181
+183
+185
+186
+187
+185
+185
+178
+172
+163
+151
+141
+128
+117
+109
+96
+93
+90
+87
+82
+75
+68
+64
+53
+60
+65
+64
+62
+69
+87
+99
+115
+122
+127
+123
+118
+112
+99
+84
+71
+76
+73
+61
+54
+58
+61
+61
+60
+59
+58
+59
+60
+60
+60
+60
+54
+56
+60
+63
+65
+62
+60
+58
+55
+52
+51
+57
+65
+69
+66
+61
+60
+52
+52
+55
+50
+44
+54
+71
+75
+64
+52
+45
+44
+44
+44
+42
+42
+47
+50
+53
+52
+49
+49
+51
+55
+58
+58
+58
+59
+58
+56
+56
+52
+60
+58
+60
+79
+89
+69
+51
+59
+60
+59
+58
+57
+56
+56
+56
+61
+65
+74
+85
+82
+71
+68
+71
+75
+73
+76
+83
+83
+80
+77
+78
+88
+90
+91
+90
+86
+82
+81
+81
+70
+79
+89
+90
+86
+84
+87
+92
+89
+91
+98
+98
+96
+105
+106
+94
+93
+77
+108
+151
+185
+211
+224
+245
+249
+255
+255
+255
+254
+255
+252
+248
+249
+249
+247
+246
+247
+246
+238
+228
+219
+209
+211
+228
+246
+251
+253
+255
+251
+239
+229
+69
+68
+66
+64
+62
+60
+59
+58
+54
+53
+53
+53
+53
+55
+57
+59
+62
+64
+68
+70
+69
+69
+71
+73
+77
+78
+90
+112
+134
+150
+161
+169
+176
+177
+179
+183
+183
+185
+184
+184
+177
+173
+167
+158
+150
+139
+129
+121
+109
+103
+96
+90
+88
+81
+71
+62
+53
+56
+61
+64
+67
+79
+93
+103
+108
+110
+111
+105
+97
+88
+73
+59
+51
+65
+69
+60
+56
+64
+65
+59
+54
+53
+53
+53
+55
+56
+59
+60
+64
+64
+64
+63
+61
+57
+54
+52
+46
+45
+46
+51
+58
+60
+56
+53
+53
+44
+41
+55
+66
+63
+52
+46
+70
+73
+72
+60
+45
+35
+39
+47
+45
+47
+50
+51
+49
+48
+47
+48
+55
+57
+58
+60
+62
+63
+64
+64
+54
+76
+74
+53
+71
+90
+73
+65
+60
+59
+58
+58
+58
+58
+57
+57
+60
+62
+70
+79
+80
+72
+67
+67
+72
+70
+74
+80
+82
+77
+75
+75
+88
+91
+97
+97
+88
+79
+77
+78
+76
+79
+83
+82
+84
+90
+99
+105
+102
+98
+98
+101
+103
+106
+106
+104
+94
+70
+93
+135
+171
+199
+218
+243
+247
+253
+255
+255
+254
+255
+251
+248
+250
+250
+248
+250
+251
+250
+243
+236
+224
+213
+212
+230
+247
+254
+254
+254
+249
+239
+231
+72
+71
+70
+68
+66
+64
+61
+60
+56
+55
+54
+54
+54
+55
+57
+58
+62
+65
+67
+69
+68
+69
+70
+72
+77
+77
+87
+107
+130
+147
+159
+166
+174
+175
+176
+179
+179
+180
+179
+179
+174
+171
+167
+162
+156
+149
+140
+133
+127
+117
+107
+101
+97
+91
+81
+72
+70
+67
+66
+69
+77
+85
+91
+90
+84
+83
+84
+80
+74
+67
+57
+47
+57
+68
+72
+63
+62
+71
+73
+63
+62
+61
+60
+62
+63
+66
+68
+69
+69
+66
+62
+59
+54
+53
+51
+51
+49
+52
+55
+57
+56
+55
+54
+53
+47
+53
+55
+50
+49
+57
+62
+59
+60
+68
+74
+68
+54
+42
+42
+47
+54
+53
+51
+49
+48
+47
+48
+48
+56
+57
+58
+59
+60
+61
+63
+62
+55
+87
+97
+59
+59
+80
+70
+80
+60
+58
+56
+57
+58
+60
+59
+59
+58
+60
+65
+72
+73
+68
+64
+62
+70
+69
+73
+80
+82
+78
+75
+76
+90
+94
+102
+104
+93
+80
+77
+79
+83
+82
+81
+82
+92
+103
+105
+101
+101
+94
+94
+106
+115
+107
+101
+110
+101
+71
+86
+123
+159
+193
+214
+238
+245
+252
+255
+255
+253
+255
+251
+248
+254
+253
+251
+253
+255
+253
+250
+246
+233
+221
+217
+233
+250
+255
+254
+254
+248
+240
+233
+75
+74
+73
+71
+69
+67
+64
+64
+59
+58
+57
+56
+56
+56
+58
+59
+63
+66
+69
+70
+69
+69
+70
+72
+76
+75
+83
+105
+129
+147
+158
+164
+172
+172
+173
+176
+177
+177
+176
+176
+172
+170
+168
+166
+163
+158
+153
+148
+146
+138
+128
+120
+117
+112
+103
+95
+95
+87
+80
+79
+83
+84
+80
+72
+65
+65
+69
+69
+69
+65
+59
+54
+74
+73
+66
+56
+57
+65
+68
+63
+69
+69
+70
+69
+70
+71
+71
+71
+62
+59
+56
+52
+51
+52
+52
+54
+56
+60
+61
+60
+57
+53
+53
+55
+46
+59
+61
+49
+45
+55
+61
+58
+57
+56
+58
+61
+64
+60
+51
+44
+44
+43
+42
+43
+47
+52
+56
+57
+55
+55
+55
+55
+55
+54
+53
+53
+53
+80
+109
+72
+52
+67
+62
+86
+65
+62
+56
+54
+58
+60
+62
+61
+57
+60
+63
+65
+65
+64
+61
+60
+67
+68
+72
+80
+82
+79
+78
+79
+94
+97
+105
+110
+100
+86
+81
+86
+86
+86
+87
+93
+109
+117
+106
+87
+95
+94
+96
+114
+135
+128
+117
+122
+106
+77
+85
+112
+149
+191
+213
+233
+244
+250
+254
+254
+253
+254
+250
+249
+255
+254
+253
+255
+255
+255
+252
+253
+241
+230
+226
+240
+251
+254
+254
+255
+250
+244
+240
+77
+76
+75
+73
+71
+69
+68
+67
+62
+61
+59
+58
+57
+58
+57
+59
+64
+67
+69
+71
+71
+70
+70
+72
+75
+72
+82
+103
+129
+147
+158
+162
+167
+167
+169
+172
+173
+174
+174
+174
+172
+170
+168
+167
+168
+167
+164
+162
+158
+154
+147
+143
+141
+136
+129
+121
+109
+99
+88
+81
+77
+73
+65
+62
+62
+65
+69
+74
+75
+71
+68
+65
+86
+72
+60
+54
+56
+59
+57
+56
+58
+60
+59
+58
+56
+55
+52
+50
+52
+51
+51
+51
+51
+53
+54
+56
+61
+61
+59
+56
+55
+54
+52
+51
+51
+51
+52
+54
+61
+62
+57
+50
+58
+52
+49
+53
+60
+61
+55
+51
+45
+45
+45
+47
+52
+57
+59
+57
+50
+48
+48
+49
+49
+50
+49
+51
+49
+61
+106
+84
+57
+64
+58
+82
+74
+67
+58
+54
+56
+59
+60
+61
+59
+63
+64
+63
+59
+59
+59
+60
+62
+62
+68
+76
+80
+78
+76
+78
+97
+97
+104
+111
+104
+90
+85
+91
+91
+95
+98
+107
+125
+133
+118
+92
+101
+107
+98
+106
+144
+161
+148
+140
+105
+81
+85
+103
+140
+190
+213
+227
+242
+249
+253
+253
+253
+253
+251
+248
+255
+253
+253
+255
+255
+253
+251
+255
+250
+240
+236
+246
+252
+252
+253
+255
+254
+249
+246
+79
+78
+75
+74
+71
+70
+68
+68
+64
+64
+60
+59
+57
+58
+58
+60
+64
+68
+70
+71
+71
+70
+72
+72
+73
+71
+81
+104
+130
+148
+157
+162
+160
+160
+163
+166
+169
+171
+172
+172
+171
+170
+167
+167
+169
+170
+168
+167
+161
+161
+159
+159
+155
+150
+141
+132
+102
+93
+82
+74
+66
+62
+60
+61
+64
+67
+70
+74
+74
+71
+67
+64
+83
+68
+57
+62
+68
+64
+56
+53
+67
+68
+67
+65
+62
+57
+54
+50
+50
+51
+52
+53
+53
+52
+52
+52
+66
+60
+54
+54
+57
+57
+53
+49
+56
+49
+49
+57
+56
+52
+55
+67
+55
+56
+54
+53
+51
+53
+58
+63
+76
+72
+66
+62
+60
+55
+50
+44
+43
+41
+44
+47
+49
+52
+53
+55
+48
+46
+100
+93
+64
+68
+59
+77
+82
+72
+59
+54
+56
+57
+59
+58
+60
+64
+65
+60
+56
+57
+60
+63
+55
+55
+62
+71
+75
+73
+73
+74
+97
+94
+100
+110
+107
+93
+88
+94
+97
+100
+104
+110
+127
+141
+131
+110
+112
+120
+97
+88
+136
+180
+173
+153
+104
+81
+84
+97
+136
+192
+215
+224
+241
+248
+253
+252
+253
+253
+252
+249
+255
+254
+252
+255
+255
+252
+251
+255
+255
+246
+242
+249
+253
+251
+252
+255
+255
+252
+251
+79
+80
+78
+78
+75
+75
+73
+72
+67
+67
+65
+64
+62
+63
+62
+64
+67
+69
+71
+73
+74
+74
+74
+75
+78
+76
+84
+104
+126
+143
+153
+159
+162
+161
+160
+161
+163
+167
+170
+173
+170
+169
+168
+169
+170
+170
+170
+170
+168
+166
+160
+159
+164
+160
+135
+105
+78
+70
+65
+61
+61
+62
+64
+64
+61
+61
+70
+59
+68
+69
+49
+74
+75
+67
+62
+59
+60
+61
+59
+60
+66
+63
+68
+77
+75
+61
+54
+57
+55
+54
+53
+50
+47
+47
+50
+53
+65
+56
+49
+50
+57
+59
+55
+50
+50
+51
+52
+51
+51
+51
+53
+53
+48
+50
+53
+54
+52
+51
+51
+52
+50
+51
+53
+51
+47
+45
+45
+46
+45
+43
+43
+47
+53
+57
+55
+52
+45
+51
+88
+89
+59
+78
+52
+72
+79
+74
+67
+59
+56
+56
+57
+60
+60
+59
+57
+59
+60
+61
+61
+60
+56
+59
+61
+63
+63
+64
+64
+65
+106
+112
+99
+109
+113
+97
+103
+112
+107
+104
+103
+101
+103
+109
+110
+109
+119
+126
+95
+105
+103
+174
+167
+141
+112
+89
+81
+110
+149
+182
+213
+238
+244
+245
+247
+251
+254
+255
+254
+255
+255
+252
+249
+254
+255
+255
+255
+253
+253
+251
+250
+250
+249
+250
+250
+250
+253
+255
+255
+80
+79
+79
+77
+76
+75
+74
+73
+69
+68
+67
+66
+65
+65
+65
+65
+67
+68
+70
+72
+74
+75
+75
+75
+78
+76
+85
+104
+125
+140
+149
+154
+156
+155
+157
+158
+161
+165
+170
+172
+172
+171
+167
+166
+164
+164
+162
+160
+166
+164
+160
+155
+153
+143
+115
+87
+70
+63
+59
+58
+59
+62
+64
+65
+60
+57
+65
+59
+66
+64
+51
+79
+67
+63
+59
+56
+56
+56
+58
+59
+69
+61
+60
+71
+76
+67
+58
+57
+55
+55
+54
+52
+50
+51
+53
+56
+61
+58
+53
+52
+52
+53
+51
+50
+56
+56
+56
+58
+58
+58
+55
+51
+51
+53
+55
+55
+54
+52
+52
+52
+50
+50
+48
+46
+44
+44
+45
+46
+43
+44
+48
+50
+52
+53
+56
+57
+63
+42
+68
+62
+70
+86
+66
+66
+85
+82
+75
+67
+61
+57
+57
+56
+59
+59
+58
+60
+62
+63
+64
+62
+58
+59
+61
+62
+63
+63
+66
+67
+105
+109
+98
+107
+111
+98
+107
+115
+111
+110
+107
+97
+92
+99
+110
+119
+117
+121
+89
+99
+99
+168
+162
+134
+114
+95
+90
+115
+157
+196
+225
+245
+248
+248
+249
+251
+254
+255
+254
+255
+255
+255
+251
+254
+255
+255
+255
+255
+253
+253
+251
+247
+244
+243
+245
+247
+249
+252
+253
+80
+79
+79
+77
+76
+75
+74
+74
+71
+70
+69
+67
+67
+67
+67
+67
+67
+70
+71
+73
+75
+75
+75
+75
+77
+77
+87
+105
+123
+137
+145
+150
+152
+151
+152
+156
+159
+163
+167
+169
+170
+168
+165
+162
+160
+158
+154
+153
+154
+152
+147
+140
+131
+115
+91
+70
+68
+65
+63
+62
+62
+62
+62
+62
+60
+56
+63
+65
+67
+60
+57
+87
+66
+62
+59
+57
+54
+54
+57
+59
+72
+59
+53
+65
+75
+72
+61
+56
+54
+55
+55
+54
+53
+55
+57
+61
+50
+51
+53
+52
+52
+54
+57
+62
+51
+51
+52
+53
+55
+55
+50
+44
+64
+62
+61
+60
+57
+55
+55
+55
+55
+51
+47
+46
+46
+46
+47
+46
+44
+48
+53
+53
+51
+52
+57
+62
+65
+49
+83
+59
+65
+67
+74
+84
+85
+83
+79
+74
+67
+60
+56
+54
+55
+55
+55
+58
+60
+62
+61
+61
+58
+59
+60
+61
+61
+63
+67
+69
+92
+103
+97
+108
+112
+97
+102
+106
+80
+94
+106
+104
+99
+102
+111
+117
+114
+111
+81
+90
+97
+158
+152
+122
+109
+100
+96
+119
+165
+209
+238
+248
+251
+252
+253
+255
+255
+255
+255
+255
+255
+252
+246
+247
+251
+251
+252
+255
+250
+250
+248
+242
+234
+232
+236
+242
+248
+252
+254
+80
+80
+79
+78
+77
+77
+76
+76
+73
+72
+71
+70
+70
+70
+70
+70
+69
+71
+73
+75
+76
+76
+76
+75
+76
+77
+86
+104
+121
+133
+141
+148
+148
+148
+149
+152
+155
+158
+161
+163
+165
+162
+159
+155
+153
+151
+147
+144
+131
+130
+124
+115
+102
+88
+72
+62
+68
+68
+69
+68
+66
+64
+62
+62
+63
+58
+63
+69
+65
+54
+62
+90
+65
+64
+61
+58
+56
+57
+60
+65
+69
+58
+50
+60
+69
+69
+62
+57
+56
+57
+56
+58
+56
+57
+59
+62
+48
+49
+51
+51
+52
+54
+56
+59
+54
+58
+59
+59
+58
+58
+59
+56
+67
+64
+64
+61
+57
+57
+58
+59
+60
+55
+49
+49
+49
+51
+49
+47
+50
+53
+55
+55
+53
+55
+59
+62
+59
+60
+94
+70
+51
+46
+64
+87
+117
+114
+106
+94
+80
+65
+53
+46
+56
+56
+56
+59
+60
+61
+61
+60
+59
+60
+60
+60
+59
+62
+66
+70
+77
+96
+97
+112
+116
+96
+93
+93
+70
+88
+105
+107
+104
+109
+113
+115
+111
+103
+74
+82
+93
+148
+145
+116
+106
+104
+103
+124
+170
+220
+245
+249
+249
+252
+254
+255
+255
+255
+252
+251
+247
+241
+234
+235
+237
+239
+243
+247
+246
+246
+246
+237
+227
+222
+226
+233
+244
+246
+249
+80
+80
+79
+79
+78
+77
+77
+77
+75
+74
+73
+73
+72
+73
+73
+73
+71
+73
+73
+76
+77
+77
+76
+76
+75
+75
+85
+101
+116
+126
+135
+143
+144
+145
+146
+148
+149
+151
+152
+154
+157
+155
+148
+144
+139
+135
+130
+125
+115
+110
+102
+92
+78
+65
+59
+59
+67
+71
+73
+73
+71
+66
+62
+61
+66
+62
+64
+73
+62
+50
+67
+85
+68
+65
+63
+62
+63
+64
+68
+70
+61
+56
+53
+57
+61
+61
+59
+60
+58
+59
+59
+59
+56
+56
+56
+57
+56
+52
+49
+50
+51
+52
+49
+47
+48
+54
+57
+54
+51
+51
+57
+62
+56
+55
+55
+53
+52
+53
+55
+58
+61
+56
+52
+53
+56
+58
+57
+56
+62
+59
+56
+55
+57
+60
+60
+58
+62
+58
+62
+67
+47
+58
+50
+53
+53
+59
+67
+75
+81
+83
+84
+85
+63
+63
+60
+61
+62
+63
+63
+62
+60
+60
+60
+61
+60
+61
+65
+68
+76
+98
+99
+110
+114
+96
+96
+95
+105
+109
+110
+100
+98
+109
+117
+118
+107
+95
+71
+75
+90
+137
+142
+121
+114
+117
+119
+136
+178
+226
+250
+253
+252
+255
+255
+255
+255
+251
+241
+237
+232
+227
+221
+222
+224
+226
+230
+235
+239
+242
+242
+235
+225
+219
+221
+226
+231
+231
+233
+79
+79
+79
+78
+78
+77
+77
+77
+76
+76
+75
+74
+74
+75
+75
+76
+73
+73
+75
+76
+77
+77
+76
+77
+75
+76
+83
+94
+106
+116
+125
+134
+138
+139
+141
+142
+143
+143
+144
+144
+148
+144
+136
+129
+123
+116
+110
+104
+105
+98
+88
+79
+65
+56
+53
+58
+66
+72
+76
+77
+73
+69
+63
+62
+67
+67
+65
+73
+59
+52
+73
+76
+66
+63
+59
+60
+64
+69
+71
+71
+56
+56
+56
+57
+57
+56
+58
+59
+59
+61
+60
+59
+56
+54
+54
+53
+50
+46
+43
+47
+51
+54
+52
+50
+46
+51
+53
+50
+46
+46
+53
+58
+48
+48
+51
+51
+53
+55
+57
+60
+56
+54
+54
+58
+62
+65
+65
+65
+71
+65
+59
+57
+60
+61
+60
+56
+58
+55
+48
+67
+50
+63
+47
+42
+49
+53
+56
+57
+56
+53
+50
+49
+69
+65
+61
+58
+57
+57
+58
+58
+59
+61
+62
+60
+60
+60
+62
+65
+83
+103
+99
+106
+110
+99
+106
+110
+110
+114
+112
+102
+103
+116
+117
+110
+103
+90
+72
+72
+87
+128
+146
+136
+134
+137
+138
+151
+183
+222
+244
+250
+255
+255
+255
+255
+249
+239
+227
+222
+213
+211
+209
+210
+213
+214
+218
+223
+230
+234
+237
+234
+227
+221
+218
+220
+219
+217
+216
+78
+78
+78
+78
+77
+77
+77
+77
+76
+76
+75
+75
+75
+76
+76
+77
+73
+74
+76
+76
+78
+77
+77
+78
+77
+76
+79
+87
+95
+102
+111
+121
+128
+130
+131
+133
+134
+136
+137
+137
+136
+131
+124
+118
+112
+107
+101
+95
+94
+85
+78
+74
+64
+54
+52
+58
+64
+70
+74
+75
+72
+68
+63
+63
+65
+70
+65
+72
+58
+55
+79
+66
+61
+54
+49
+53
+62
+69
+70
+68
+57
+58
+58
+58
+56
+57
+58
+58
+57
+58
+58
+57
+55
+53
+51
+51
+42
+42
+45
+46
+49
+50
+51
+53
+55
+55
+57
+56
+56
+55
+53
+53
+42
+45
+49
+52
+54
+56
+59
+61
+53
+56
+59
+61
+62
+61
+62
+65
+74
+71
+65
+60
+57
+57
+56
+57
+50
+57
+64
+68
+48
+46
+52
+54
+51
+55
+57
+58
+59
+59
+58
+59
+76
+70
+64
+57
+54
+54
+55
+56
+59
+61
+62
+61
+60
+60
+60
+61
+75
+100
+99
+107
+111
+105
+114
+117
+101
+111
+116
+111
+111
+120
+116
+101
+98
+84
+72
+68
+81
+118
+149
+153
+150
+151
+149
+157
+178
+204
+224
+236
+244
+241
+235
+228
+221
+212
+203
+199
+193
+194
+195
+201
+203
+203
+206
+211
+217
+222
+227
+229
+226
+219
+212
+209
+205
+203
+198
+78
+77
+77
+77
+77
+77
+76
+76
+77
+76
+76
+75
+75
+76
+77
+76
+74
+74
+76
+78
+77
+77
+77
+77
+79
+77
+77
+82
+88
+93
+102
+113
+119
+122
+125
+128
+129
+131
+132
+132
+125
+121
+116
+111
+109
+105
+101
+95
+79
+72
+69
+71
+66
+58
+54
+58
+62
+66
+69
+70
+69
+67
+63
+64
+64
+71
+65
+71
+57
+58
+85
+62
+56
+47
+42
+47
+58
+67
+67
+62
+59
+59
+60
+58
+59
+60
+59
+56
+53
+55
+56
+55
+53
+51
+51
+50
+51
+54
+56
+52
+45
+40
+40
+43
+45
+41
+38
+41
+44
+42
+32
+25
+34
+40
+44
+48
+49
+51
+53
+54
+54
+57
+61
+62
+58
+55
+53
+57
+72
+75
+69
+61
+54
+51
+54
+56
+52
+54
+67
+56
+50
+32
+56
+54
+49
+52
+52
+53
+54
+54
+53
+55
+89
+82
+72
+64
+59
+59
+60
+60
+57
+59
+61
+61
+59
+57
+57
+58
+60
+89
+98
+112
+118
+109
+113
+114
+121
+127
+124
+109
+104
+114
+115
+105
+92
+80
+71
+64
+78
+112
+152
+163
+156
+154
+151
+156
+169
+186
+205
+220
+215
+210
+202
+193
+187
+182
+178
+176
+180
+181
+186
+192
+195
+196
+197
+201
+206
+210
+218
+224
+222
+216
+205
+199
+193
+188
+182
+77
+77
+77
+77
+77
+77
+77
+77
+75
+75
+75
+76
+76
+77
+77
+77
+76
+76
+77
+78
+77
+79
+79
+79
+77
+77
+76
+78
+80
+85
+89
+93
+103
+109
+114
+116
+119
+126
+131
+131
+126
+126
+120
+112
+112
+114
+106
+90
+71
+66
+65
+68
+64
+58
+60
+68
+62
+62
+62
+65
+67
+68
+66
+67
+63
+64
+63
+62
+60
+60
+68
+77
+54
+59
+50
+51
+67
+63
+54
+62
+55
+58
+60
+59
+57
+57
+58
+58
+58
+57
+54
+50
+46
+47
+55
+61
+57
+54
+49
+43
+40
+38
+38
+38
+38
+33
+34
+39
+41
+33
+24
+23
+37
+34
+34
+43
+45
+42
+44
+50
+54
+54
+54
+54
+49
+46
+44
+47
+57
+58
+57
+83
+34
+43
+70
+46
+46
+60
+69
+58
+47
+46
+53
+60
+62
+60
+53
+51
+53
+59
+59
+56
+98
+90
+67
+54
+58
+56
+51
+54
+48
+50
+50
+52
+54
+58
+60
+61
+58
+67
+92
+112
+115
+120
+121
+113
+122
+119
+117
+118
+116
+114
+107
+100
+94
+74
+69
+70
+70
+103
+144
+155
+156
+153
+148
+151
+159
+166
+168
+168
+163
+163
+159
+154
+154
+157
+160
+164
+172
+177
+183
+188
+190
+189
+189
+189
+188
+189
+195
+205
+212
+211
+200
+192
+185
+177
+168
+77
+77
+77
+77
+77
+77
+77
+77
+75
+75
+75
+76
+76
+77
+77
+77
+76
+77
+76
+77
+78
+79
+79
+79
+80
+79
+78
+78
+80
+83
+85
+88
+93
+100
+105
+108
+113
+122
+128
+128
+128
+125
+116
+108
+111
+115
+103
+86
+61
+55
+54
+61
+65
+63
+64
+65
+61
+59
+60
+62
+66
+66
+66
+66
+60
+61
+60
+59
+58
+58
+65
+74
+71
+65
+54
+53
+64
+67
+57
+53
+56
+59
+61
+61
+59
+59
+58
+57
+57
+54
+50
+50
+53
+56
+56
+57
+50
+49
+47
+45
+44
+45
+46
+46
+42
+37
+36
+39
+37
+29
+20
+19
+29
+45
+50
+41
+39
+45
+47
+42
+58
+55
+52
+50
+47
+48
+50
+56
+50
+59
+56
+69
+69
+47
+50
+34
+53
+63
+69
+61
+51
+50
+54
+58
+58
+57
+53
+53
+57
+60
+60
+57
+99
+88
+64
+52
+57
+58
+54
+57
+53
+52
+52
+53
+54
+53
+54
+54
+59
+66
+89
+108
+113
+120
+124
+117
+122
+119
+119
+118
+117
+111
+104
+97
+93
+75
+68
+70
+73
+102
+138
+146
+147
+146
+142
+144
+149
+152
+149
+148
+135
+137
+137
+141
+143
+149
+155
+158
+171
+177
+183
+186
+187
+187
+188
+187
+181
+179
+183
+190
+199
+200
+195
+188
+181
+172
+163
+76
+76
+76
+76
+76
+76
+76
+76
+74
+74
+74
+75
+75
+76
+76
+76
+76
+76
+75
+77
+78
+79
+79
+79
+82
+81
+80
+78
+79
+80
+81
+82
+84
+89
+95
+99
+108
+119
+126
+125
+132
+128
+118
+111
+115
+117
+104
+81
+61
+54
+54
+61
+68
+69
+66
+63
+61
+58
+58
+61
+64
+66
+65
+66
+59
+57
+57
+57
+56
+57
+63
+70
+68
+57
+55
+59
+67
+79
+72
+51
+57
+58
+59
+61
+61
+60
+58
+57
+55
+50
+47
+52
+61
+63
+57
+52
+54
+54
+50
+48
+46
+45
+44
+44
+44
+40
+39
+41
+37
+30
+22
+24
+37
+47
+52
+53
+57
+58
+53
+45
+50
+47
+46
+45
+46
+46
+47
+52
+48
+61
+54
+59
+109
+67
+47
+47
+58
+64
+65
+60
+55
+53
+53
+54
+54
+54
+54
+56
+59
+60
+60
+59
+96
+84
+60
+48
+59
+62
+59
+61
+61
+60
+61
+60
+59
+57
+54
+54
+59
+64
+84
+103
+111
+122
+129
+123
+122
+121
+122
+121
+117
+110
+99
+92
+89
+73
+65
+70
+76
+97
+122
+128
+130
+133
+131
+133
+136
+136
+132
+130
+122
+127
+133
+141
+149
+156
+160
+163
+171
+176
+180
+184
+184
+185
+186
+186
+177
+172
+170
+174
+181
+186
+185
+183
+171
+160
+150
+75
+75
+75
+75
+75
+75
+75
+75
+74
+74
+74
+75
+75
+76
+76
+76
+75
+75
+76
+77
+77
+79
+79
+79
+81
+81
+79
+79
+78
+78
+79
+79
+80
+84
+89
+94
+104
+117
+124
+123
+132
+133
+128
+122
+120
+116
+99
+77
+72
+67
+67
+70
+73
+72
+69
+65
+64
+60
+60
+62
+65
+66
+65
+64
+63
+60
+57
+58
+57
+56
+62
+68
+60
+51
+59
+65
+68
+83
+85
+58
+57
+55
+55
+59
+61
+61
+57
+56
+52
+50
+50
+57
+62
+62
+53
+47
+54
+55
+52
+50
+46
+46
+44
+44
+42
+39
+40
+42
+39
+34
+31
+37
+56
+40
+44
+77
+93
+78
+60
+58
+41
+42
+45
+48
+50
+48
+43
+40
+48
+55
+50
+67
+115
+86
+62
+71
+61
+60
+58
+56
+55
+54
+52
+51
+53
+54
+56
+59
+60
+57
+58
+60
+88
+77
+55
+48
+60
+65
+59
+60
+62
+61
+63
+64
+63
+60
+58
+57
+57
+61
+78
+99
+110
+124
+132
+125
+118
+119
+122
+122
+118
+109
+98
+91
+84
+71
+61
+68
+79
+91
+104
+109
+115
+121
+122
+125
+129
+131
+129
+129
+135
+142
+149
+157
+164
+168
+170
+170
+172
+176
+179
+182
+183
+183
+184
+184
+180
+171
+165
+165
+172
+180
+184
+184
+171
+158
+146
+75
+75
+75
+75
+75
+75
+75
+75
+74
+74
+74
+75
+75
+76
+76
+76
+76
+75
+75
+77
+77
+78
+79
+79
+79
+78
+78
+79
+78
+79
+80
+79
+78
+80
+84
+89
+101
+114
+119
+118
+125
+134
+137
+130
+119
+108
+89
+69
+70
+73
+77
+76
+71
+69
+69
+67
+66
+63
+63
+65
+68
+68
+66
+63
+65
+61
+58
+58
+57
+56
+59
+63
+70
+61
+66
+65
+59
+74
+88
+75
+64
+56
+51
+56
+60
+58
+55
+56
+48
+51
+56
+59
+58
+54
+48
+44
+48
+50
+49
+50
+51
+51
+53
+53
+46
+45
+47
+49
+46
+42
+44
+52
+58
+51
+62
+92
+104
+85
+67
+64
+51
+51
+51
+54
+57
+56
+52
+47
+50
+46
+55
+89
+92
+88
+65
+72
+66
+60
+55
+54
+56
+57
+55
+53
+56
+57
+58
+61
+59
+54
+55
+61
+78
+69
+53
+49
+62
+64
+56
+53
+50
+50
+53
+56
+58
+58
+57
+58
+54
+56
+73
+95
+110
+125
+133
+126
+116
+118
+122
+123
+116
+108
+97
+90
+81
+72
+62
+69
+83
+86
+91
+98
+112
+118
+121
+126
+129
+133
+136
+140
+149
+154
+160
+167
+170
+171
+171
+169
+172
+174
+178
+180
+181
+182
+184
+184
+183
+173
+164
+165
+174
+186
+193
+198
+186
+170
+156
+74
+74
+74
+74
+74
+74
+74
+74
+74
+74
+74
+75
+75
+76
+76
+76
+75
+75
+75
+76
+77
+78
+79
+79
+78
+78
+79
+79
+79
+80
+81
+80
+76
+77
+79
+85
+96
+111
+116
+113
+118
+131
+140
+131
+116
+101
+81
+63
+55
+64
+73
+71
+65
+66
+67
+67
+67
+64
+64
+66
+68
+68
+66
+63
+64
+59
+56
+57
+57
+56
+58
+59
+73
+63
+61
+55
+50
+65
+90
+104
+80
+65
+53
+54
+57
+57
+55
+56
+48
+54
+59
+59
+52
+47
+45
+45
+52
+52
+51
+50
+49
+49
+48
+49
+49
+50
+53
+53
+49
+46
+49
+62
+51
+78
+95
+92
+84
+79
+68
+56
+65
+58
+50
+47
+50
+56
+59
+58
+58
+50
+74
+107
+76
+80
+59
+59
+76
+64
+55
+55
+60
+60
+58
+59
+59
+58
+60
+62
+57
+51
+58
+68
+71
+67
+55
+50
+59
+58
+50
+50
+44
+44
+46
+51
+55
+58
+60
+62
+54
+52
+66
+88
+106
+124
+134
+127
+117
+119
+123
+122
+114
+105
+94
+89
+79
+75
+64
+70
+85
+83
+84
+96
+115
+124
+129
+134
+136
+139
+144
+151
+156
+159
+164
+168
+169
+170
+169
+169
+170
+173
+175
+178
+178
+180
+182
+184
+181
+173
+166
+169
+181
+196
+206
+210
+194
+178
+161
+75
+75
+75
+75
+75
+75
+75
+75
+75
+75
+75
+76
+76
+77
+77
+76
+75
+74
+75
+76
+77
+78
+79
+79
+79
+80
+79
+80
+80
+80
+80
+78
+75
+75
+78
+84
+97
+112
+118
+115
+117
+128
+134
+127
+113
+101
+82
+62
+47
+55
+65
+64
+63
+66
+67
+65
+65
+64
+63
+65
+67
+66
+64
+62
+62
+57
+55
+58
+60
+60
+61
+63
+61
+57
+48
+47
+52
+57
+77
+108
+104
+81
+60
+58
+58
+55
+54
+56
+52
+55
+57
+54
+49
+47
+49
+49
+50
+48
+45
+43
+38
+35
+32
+32
+39
+43
+47
+49
+44
+42
+51
+66
+67
+95
+103
+85
+74
+74
+65
+49
+64
+55
+45
+40
+46
+56
+63
+64
+63
+58
+89
+93
+71
+68
+54
+59
+85
+70
+57
+56
+58
+57
+57
+61
+63
+60
+59
+61
+55
+51
+61
+76
+71
+69
+57
+51
+55
+53
+48
+49
+44
+43
+46
+49
+52
+56
+59
+62
+57
+51
+59
+78
+97
+121
+136
+131
+121
+122
+124
+122
+111
+101
+90
+86
+75
+74
+64
+69
+84
+77
+77
+94
+114
+126
+136
+142
+144
+146
+151
+158
+164
+166
+167
+168
+168
+169
+169
+168
+167
+169
+172
+174
+175
+177
+181
+183
+179
+173
+168
+173
+185
+199
+207
+210
+192
+174
+156
+74
+75
+74
+75
+74
+75
+74
+75
+74
+75
+74
+76
+75
+77
+76
+76
+75
+75
+75
+77
+77
+79
+79
+79
+81
+82
+82
+81
+81
+80
+79
+76
+77
+76
+79
+87
+101
+117
+124
+120
+122
+129
+132
+126
+117
+109
+90
+70
+52
+58
+64
+63
+65
+69
+66
+60
+63
+62
+62
+64
+66
+65
+62
+61
+63
+59
+56
+60
+63
+64
+65
+67
+55
+56
+46
+51
+58
+48
+53
+85
+119
+91
+67
+60
+59
+55
+54
+58
+55
+56
+54
+51
+48
+49
+51
+53
+37
+35
+34
+33
+32
+31
+29
+30
+28
+32
+39
+41
+39
+41
+53
+70
+96
+94
+85
+80
+80
+75
+62
+48
+61
+54
+47
+46
+52
+59
+63
+61
+57
+56
+86
+59
+63
+52
+50
+67
+87
+72
+57
+54
+54
+53
+53
+58
+60
+58
+55
+57
+52
+49
+63
+82
+73
+72
+59
+50
+52
+49
+45
+50
+44
+43
+43
+43
+45
+49
+52
+56
+61
+50
+55
+73
+92
+119
+137
+134
+126
+125
+125
+119
+107
+96
+87
+83
+68
+71
+59
+65
+81
+73
+70
+93
+109
+125
+140
+150
+152
+155
+160
+165
+172
+171
+170
+167
+165
+165
+165
+165
+164
+166
+170
+172
+173
+175
+179
+182
+182
+176
+173
+176
+188
+198
+203
+205
+191
+171
+152
+75
+75
+75
+75
+75
+75
+75
+75
+76
+76
+76
+76
+76
+76
+76
+76
+74
+75
+76
+76
+76
+78
+80
+83
+83
+82
+80
+81
+82
+81
+78
+76
+75
+75
+79
+91
+107
+123
+133
+137
+132
+136
+136
+130
+121
+114
+106
+97
+77
+65
+61
+66
+69
+65
+61
+62
+59
+59
+58
+59
+60
+59
+58
+57
+54
+65
+60
+54
+65
+70
+61
+55
+56
+55
+53
+54
+56
+60
+58
+54
+59
+83
+90
+69
+56
+62
+66
+58
+50
+71
+47
+54
+55
+45
+66
+40
+38
+41
+41
+29
+34
+39
+39
+29
+31
+44
+33
+38
+44
+33
+86
+43
+92
+94
+89
+84
+79
+71
+62
+54
+61
+64
+62
+54
+49
+53
+58
+59
+56
+55
+69
+59
+51
+54
+53
+68
+76
+75
+68
+58
+52
+53
+52
+53
+60
+57
+47
+40
+45
+57
+67
+72
+80
+69
+55
+48
+48
+50
+49
+49
+47
+48
+48
+48
+48
+50
+53
+57
+61
+50
+62
+61
+95
+115
+143
+132
+135
+132
+120
+104
+95
+92
+86
+77
+72
+60
+62
+66
+94
+63
+67
+91
+116
+134
+150
+156
+157
+161
+166
+168
+167
+166
+165
+165
+164
+163
+163
+163
+165
+166
+171
+172
+173
+174
+177
+179
+181
+180
+177
+174
+180
+189
+194
+193
+175
+152
+135
+75
+75
+75
+75
+75
+75
+75
+75
+76
+76
+76
+76
+76
+76
+76
+75
+75
+76
+77
+78
+78
+78
+81
+82
+83
+81
+79
+79
+78
+80
+79
+77
+76
+78
+83
+95
+111
+126
+136
+139
+150
+140
+127
+120
+121
+124
+117
+105
+94
+81
+71
+74
+76
+71
+64
+60
+57
+58
+57
+60
+61
+60
+58
+59
+60
+63
+56
+58
+65
+60
+54
+60
+53
+53
+53
+52
+56
+58
+59
+57
+54
+65
+77
+73
+62
+56
+56
+59
+58
+73
+48
+55
+54
+46
+63
+37
+36
+37
+41
+43
+42
+40
+40
+43
+36
+37
+37
+59
+26
+50
+63
+35
+104
+97
+90
+86
+78
+65
+59
+61
+55
+66
+71
+61
+47
+39
+38
+39
+45
+58
+84
+72
+53
+52
+61
+87
+71
+71
+65
+57
+51
+54
+55
+55
+61
+57
+53
+50
+52
+56
+63
+69
+74
+65
+54
+48
+48
+50
+48
+48
+48
+49
+48
+47
+48
+49
+52
+57
+61
+51
+60
+61
+94
+118
+144
+133
+134
+128
+115
+100
+92
+89
+84
+76
+68
+61
+66
+74
+83
+61
+67
+92
+118
+135
+149
+156
+157
+161
+165
+166
+165
+165
+164
+163
+161
+161
+161
+162
+163
+166
+169
+170
+171
+173
+175
+177
+176
+178
+175
+171
+171
+172
+170
+162
+133
+111
+95
+76
+76
+76
+76
+76
+76
+76
+76
+76
+76
+76
+76
+76
+76
+76
+76
+75
+78
+80
+80
+80
+79
+79
+82
+81
+81
+79
+79
+80
+81
+84
+84
+84
+86
+92
+105
+118
+131
+138
+142
+146
+139
+131
+125
+128
+131
+126
+115
+102
+85
+73
+72
+73
+71
+65
+61
+55
+55
+56
+60
+63
+63
+61
+61
+61
+60
+58
+66
+72
+59
+48
+58
+54
+54
+55
+56
+55
+56
+57
+58
+52
+52
+65
+79
+72
+53
+50
+64
+62
+72
+48
+53
+54
+49
+66
+46
+41
+35
+36
+49
+45
+39
+38
+49
+40
+55
+42
+40
+50
+81
+59
+89
+94
+85
+78
+76
+69
+58
+55
+62
+53
+62
+65
+60
+55
+49
+43
+38
+36
+47
+69
+58
+44
+51
+65
+94
+63
+67
+65
+61
+57
+61
+64
+64
+64
+61
+62
+65
+62
+58
+63
+73
+66
+60
+53
+50
+49
+51
+49
+48
+48
+48
+48
+47
+48
+49
+52
+57
+62
+52
+56
+59
+91
+122
+147
+135
+129
+124
+113
+100
+90
+85
+79
+73
+65
+63
+71
+84
+64
+56
+70
+95
+119
+135
+147
+152
+154
+158
+163
+163
+162
+162
+161
+160
+159
+160
+160
+160
+162
+164
+167
+168
+169
+169
+171
+174
+178
+181
+178
+172
+166
+158
+147
+134
+99
+79
+65
+77
+77
+77
+77
+77
+77
+77
+77
+77
+77
+77
+77
+77
+77
+77
+77
+76
+78
+80
+81
+80
+78
+79
+80
+79
+81
+85
+88
+88
+89
+92
+94
+96
+99
+107
+116
+126
+135
+141
+143
+135
+139
+138
+129
+121
+123
+129
+130
+116
+100
+88
+79
+73
+68
+63
+60
+54
+55
+57
+60
+64
+64
+64
+63
+57
+62
+61
+70
+82
+72
+53
+49
+57
+56
+59
+61
+59
+54
+54
+56
+53
+50
+61
+78
+75
+58
+56
+66
+54
+62
+47
+48
+50
+52
+74
+70
+62
+51
+36
+47
+44
+50
+42
+47
+57
+26
+50
+43
+56
+68
+87
+75
+60
+64
+66
+62
+57
+56
+55
+57
+56
+56
+57
+64
+77
+85
+77
+66
+55
+57
+75
+77
+81
+89
+82
+89
+53
+62
+66
+64
+63
+66
+67
+64
+63
+56
+57
+63
+58
+53
+62
+77
+57
+54
+51
+51
+52
+51
+50
+48
+48
+47
+48
+47
+47
+48
+52
+56
+63
+54
+53
+57
+86
+124
+147
+135
+128
+121
+110
+99
+88
+80
+72
+67
+61
+66
+77
+90
+50
+57
+77
+101
+123
+137
+146
+149
+152
+157
+161
+162
+160
+160
+159
+158
+159
+159
+159
+160
+162
+163
+167
+167
+168
+168
+171
+173
+178
+180
+179
+173
+166
+157
+142
+128
+98
+82
+71
+77
+77
+77
+77
+77
+77
+77
+77
+77
+77
+77
+77
+77
+77
+77
+77
+75
+77
+80
+80
+79
+78
+79
+81
+80
+87
+96
+102
+104
+103
+103
+103
+108
+112
+118
+124
+130
+135
+139
+140
+142
+141
+132
+117
+108
+110
+117
+118
+115
+109
+104
+95
+83
+71
+60
+55
+53
+54
+57
+60
+64
+65
+65
+64
+55
+64
+58
+59
+82
+92
+77
+59
+57
+55
+57
+62
+61
+54
+52
+54
+51
+55
+61
+69
+70
+66
+65
+62
+48
+55
+48
+45
+44
+51
+76
+87
+90
+79
+46
+48
+44
+69
+54
+44
+44
+61
+49
+50
+98
+61
+41
+45
+38
+59
+65
+55
+51
+57
+55
+47
+52
+59
+71
+83
+96
+105
+101
+94
+64
+69
+94
+104
+111
+106
+75
+61
+52
+62
+68
+67
+62
+60
+58
+52
+53
+45
+44
+46
+44
+44
+57
+74
+51
+51
+51
+51
+53
+52
+52
+50
+48
+47
+47
+46
+47
+48
+51
+55
+63
+56
+50
+56
+78
+124
+146
+135
+126
+117
+108
+97
+85
+74
+64
+59
+58
+68
+80
+87
+46
+62
+84
+106
+124
+137
+146
+150
+153
+158
+161
+160
+159
+159
+157
+158
+158
+159
+159
+161
+162
+165
+166
+167
+167
+168
+170
+172
+172
+175
+174
+170
+165
+160
+149
+138
+119
+107
+97
+78
+78
+78
+78
+78
+78
+78
+78
+78
+78
+78
+78
+78
+78
+78
+78
+76
+78
+78
+79
+78
+79
+83
+84
+90
+98
+109
+117
+117
+113
+112
+112
+116
+119
+124
+128
+131
+134
+138
+141
+144
+139
+133
+131
+132
+126
+107
+82
+78
+82
+88
+88
+84
+75
+63
+52
+56
+57
+58
+61
+64
+65
+63
+62
+57
+65
+53
+46
+73
+103
+100
+85
+60
+54
+51
+58
+59
+54
+51
+54
+49
+55
+59
+57
+62
+70
+66
+57
+48
+52
+51
+45
+41
+47
+66
+82
+93
+92
+57
+57
+43
+74
+56
+47
+51
+39
+37
+87
+61
+57
+54
+31
+40
+61
+66
+53
+44
+49
+48
+41
+52
+76
+98
+105
+100
+96
+96
+98
+76
+78
+92
+86
+77
+72
+52
+51
+65
+75
+79
+74
+64
+58
+54
+46
+50
+45
+42
+39
+41
+48
+62
+74
+49
+51
+51
+53
+52
+52
+52
+51
+48
+47
+46
+45
+46
+47
+50
+55
+61
+59
+49
+55
+67
+121
+141
+136
+123
+113
+104
+96
+83
+69
+58
+55
+58
+72
+80
+74
+52
+66
+87
+106
+124
+136
+145
+149
+153
+158
+160
+158
+155
+156
+155
+156
+157
+158
+159
+161
+161
+164
+167
+166
+166
+167
+169
+170
+170
+173
+172
+169
+167
+165
+157
+148
+137
+128
+120
+80
+80
+80
+80
+80
+80
+80
+80
+79
+79
+79
+79
+79
+79
+79
+78
+80
+80
+79
+79
+79
+82
+86
+90
+103
+111
+122
+126
+124
+119
+117
+118
+121
+125
+129
+132
+134
+138
+142
+147
+147
+150
+156
+167
+173
+166
+136
+103
+70
+65
+65
+66
+72
+78
+74
+63
+61
+59
+59
+60
+64
+63
+62
+60
+58
+63
+52
+49
+73
+99
+104
+101
+79
+62
+52
+55
+57
+53
+50
+54
+48
+52
+55
+55
+62
+67
+62
+52
+51
+47
+51
+46
+45
+48
+54
+64
+77
+89
+70
+81
+51
+70
+56
+65
+53
+44
+46
+70
+55
+55
+35
+59
+57
+60
+62
+55
+46
+42
+50
+61
+77
+95
+109
+106
+97
+91
+90
+92
+100
+90
+87
+64
+49
+52
+51
+67
+74
+82
+83
+74
+63
+57
+56
+51
+46
+48
+48
+42
+46
+59
+67
+65
+49
+52
+52
+53
+52
+51
+52
+52
+48
+47
+46
+45
+46
+47
+50
+55
+58
+62
+49
+55
+59
+115
+138
+135
+116
+104
+97
+92
+82
+68
+55
+56
+61
+78
+81
+57
+60
+68
+86
+100
+119
+133
+142
+148
+154
+158
+158
+155
+152
+153
+154
+154
+155
+156
+157
+159
+161
+162
+165
+164
+164
+164
+165
+167
+169
+172
+171
+168
+165
+162
+154
+145
+132
+128
+121
+80
+80
+80
+80
+80
+80
+80
+80
+79
+79
+79
+79
+79
+79
+79
+78
+81
+81
+80
+80
+80
+84
+90
+95
+114
+120
+128
+129
+126
+121
+117
+119
+124
+127
+133
+136
+138
+143
+150
+157
+167
+172
+179
+184
+190
+193
+187
+172
+111
+92
+71
+62
+71
+87
+87
+78
+64
+61
+60
+61
+61
+61
+59
+57
+56
+60
+58
+61
+79
+88
+93
+101
+99
+76
+58
+56
+57
+52
+50
+54
+52
+50
+53
+60
+67
+67
+58
+51
+52
+45
+48
+48
+52
+54
+46
+50
+66
+88
+87
+111
+68
+72
+60
+91
+109
+59
+123
+108
+81
+61
+48
+59
+72
+59
+56
+62
+56
+46
+64
+95
+110
+107
+100
+94
+95
+99
+95
+90
+93
+80
+74
+55
+47
+53
+48
+57
+68
+74
+73
+64
+54
+52
+55
+54
+39
+48
+50
+43
+48
+62
+63
+52
+51
+53
+54
+52
+51
+51
+52
+52
+48
+47
+46
+45
+46
+47
+50
+55
+57
+63
+48
+54
+54
+112
+135
+134
+110
+99
+94
+90
+81
+67
+57
+59
+67
+84
+82
+48
+68
+69
+83
+93
+115
+129
+139
+146
+152
+157
+156
+153
+151
+151
+151
+152
+153
+155
+155
+158
+158
+161
+163
+163
+162
+162
+163
+165
+164
+166
+166
+161
+156
+151
+140
+130
+117
+113
+107
+76
+78
+80
+80
+79
+79
+79
+81
+82
+79
+77
+77
+81
+83
+82
+81
+83
+80
+80
+81
+81
+83
+97
+113
+120
+124
+128
+129
+127
+122
+115
+111
+119
+124
+131
+141
+151
+164
+176
+185
+197
+204
+207
+207
+207
+209
+203
+194
+168
+128
+93
+122
+116
+72
+81
+99
+75
+63
+57
+59
+58
+55
+54
+59
+56
+53
+66
+60
+73
+88
+79
+100
+99
+88
+71
+58
+54
+55
+54
+52
+48
+50
+55
+61
+60
+55
+53
+55
+47
+47
+47
+49
+50
+52
+53
+54
+55
+74
+89
+78
+56
+54
+88
+126
+120
+107
+99
+102
+101
+92
+89
+91
+87
+70
+58
+57
+51
+45
+50
+62
+85
+97
+104
+103
+100
+100
+97
+94
+83
+70
+56
+52
+49
+47
+51
+57
+68
+66
+63
+60
+57
+56
+57
+54
+55
+52
+52
+52
+54
+53
+51
+49
+51
+53
+55
+53
+51
+50
+50
+50
+49
+48
+47
+46
+47
+48
+51
+55
+63
+56
+54
+47
+59
+88
+152
+123
+109
+102
+93
+81
+72
+68
+61
+59
+79
+84
+61
+44
+58
+70
+77
+94
+105
+120
+136
+146
+150
+149
+150
+152
+149
+150
+151
+152
+153
+155
+156
+156
+155
+157
+160
+161
+162
+162
+161
+160
+165
+163
+158
+151
+139
+126
+114
+106
+85
+85
+84
+75
+78
+80
+80
+80
+79
+80
+81
+82
+80
+79
+80
+82
+83
+82
+80
+86
+81
+79
+84
+90
+96
+107
+119
+121
+125
+127
+124
+117
+112
+111
+113
+119
+126
+137
+152
+167
+182
+197
+206
+214
+219
+222
+221
+219
+216
+209
+199
+188
+155
+124
+138
+125
+86
+96
+114
+90
+75
+63
+62
+63
+59
+54
+54
+61
+56
+63
+54
+62
+75
+72
+93
+111
+96
+72
+53
+48
+54
+53
+48
+53
+57
+61
+60
+56
+53
+52
+53
+55
+53
+50
+48
+48
+50
+52
+53
+56
+62
+74
+87
+94
+92
+93
+97
+79
+74
+78
+92
+104
+101
+89
+79
+53
+45
+44
+47
+40
+34
+41
+57
+81
+92
+100
+101
+102
+101
+92
+82
+69
+60
+54
+54
+53
+51
+50
+54
+62
+62
+59
+58
+56
+56
+57
+58
+57
+55
+55
+55
+55
+54
+51
+50
+51
+54
+55
+54
+50
+49
+49
+50
+49
+48
+47
+46
+47
+48
+51
+55
+60
+61
+56
+49
+55
+90
+144
+115
+103
+94
+87
+80
+71
+65
+61
+66
+81
+76
+60
+50
+57
+65
+71
+83
+99
+114
+131
+143
+147
+147
+147
+148
+146
+148
+149
+150
+151
+153
+154
+154
+155
+157
+159
+159
+158
+158
+157
+156
+152
+148
+140
+129
+117
+105
+93
+87
+87
+87
+87
+76
+78
+81
+81
+81
+81
+82
+83
+84
+83
+82
+83
+84
+84
+83
+80
+85
+81
+81
+89
+100
+109
+117
+123
+123
+126
+124
+115
+105
+103
+110
+117
+125
+133
+148
+167
+185
+201
+215
+224
+228
+231
+232
+229
+225
+219
+207
+196
+174
+154
+130
+130
+110
+81
+93
+109
+117
+96
+74
+66
+65
+62
+57
+54
+61
+59
+65
+55
+55
+62
+61
+70
+106
+105
+91
+66
+50
+52
+54
+50
+53
+65
+71
+61
+50
+49
+50
+48
+52
+49
+46
+47
+50
+55
+61
+66
+45
+52
+68
+86
+94
+90
+83
+81
+69
+70
+77
+91
+107
+109
+87
+60
+47
+45
+50
+51
+44
+40
+55
+76
+74
+80
+87
+95
+100
+97
+82
+67
+57
+55
+55
+60
+59
+57
+53
+54
+58
+59
+57
+57
+55
+56
+58
+60
+57
+57
+57
+57
+56
+55
+52
+50
+54
+55
+56
+54
+50
+48
+48
+49
+49
+49
+48
+47
+47
+48
+51
+54
+57
+68
+56
+52
+47
+95
+131
+108
+99
+88
+81
+78
+69
+59
+61
+74
+85
+68
+60
+62
+60
+63
+68
+72
+92
+107
+124
+137
+143
+144
+143
+143
+144
+145
+146
+148
+150
+151
+151
+152
+156
+157
+156
+156
+154
+151
+149
+148
+141
+136
+127
+116
+105
+96
+88
+85
+93
+94
+95
+74
+77
+79
+81
+80
+81
+82
+84
+83
+83
+83
+84
+84
+83
+82
+80
+79
+81
+88
+99
+109
+117
+122
+124
+124
+121
+114
+105
+100
+103
+114
+123
+138
+146
+162
+181
+196
+209
+220
+227
+229
+233
+232
+226
+219
+211
+195
+182
+164
+152
+134
+127
+113
+98
+104
+113
+139
+118
+92
+76
+69
+65
+61
+60
+58
+60
+69
+67
+58
+58
+54
+49
+73
+97
+107
+83
+58
+52
+54
+52
+52
+77
+90
+75
+56
+51
+52
+50
+46
+44
+44
+45
+49
+54
+59
+63
+47
+52
+58
+67
+70
+69
+71
+77
+81
+86
+87
+91
+102
+107
+86
+56
+50
+47
+46
+43
+37
+41
+62
+83
+63
+65
+71
+81
+90
+88
+71
+54
+53
+55
+59
+64
+64
+61
+57
+55
+56
+57
+56
+56
+55
+55
+57
+58
+58
+59
+58
+58
+58
+56
+53
+51
+54
+55
+56
+54
+50
+48
+47
+48
+50
+50
+49
+48
+48
+48
+51
+54
+56
+70
+57
+51
+44
+102
+121
+103
+100
+86
+76
+72
+64
+55
+63
+82
+89
+67
+67
+79
+70
+67
+71
+68
+85
+99
+116
+131
+139
+141
+141
+142
+143
+144
+145
+147
+148
+150
+150
+151
+155
+155
+153
+151
+147
+144
+142
+141
+135
+129
+121
+113
+105
+102
+101
+102
+103
+104
+105
+72
+74
+78
+79
+80
+80
+82
+84
+82
+83
+84
+84
+83
+82
+82
+81
+77
+88
+102
+112
+116
+119
+122
+123
+121
+114
+103
+99
+103
+114
+124
+132
+149
+159
+174
+189
+201
+211
+218
+223
+224
+226
+222
+215
+208
+198
+182
+167
+153
+141
+132
+123
+117
+114
+109
+111
+137
+129
+116
+102
+88
+79
+69
+65
+58
+59
+66
+69
+60
+61
+66
+49
+48
+73
+88
+78
+61
+56
+54
+51
+52
+85
+107
+93
+68
+59
+59
+56
+52
+50
+49
+48
+48
+47
+47
+48
+57
+52
+51
+58
+67
+69
+66
+64
+69
+80
+86
+86
+93
+101
+87
+63
+59
+53
+51
+50
+50
+57
+72
+86
+53
+51
+54
+65
+74
+72
+59
+49
+53
+57
+60
+60
+59
+58
+55
+55
+59
+59
+58
+57
+56
+55
+54
+55
+58
+59
+58
+58
+59
+57
+54
+51
+55
+56
+57
+55
+51
+49
+48
+49
+51
+51
+50
+48
+49
+48
+51
+54
+55
+67
+55
+49
+49
+106
+113
+103
+95
+82
+68
+63
+59
+58
+71
+91
+86
+69
+74
+89
+79
+73
+73
+69
+80
+92
+108
+124
+133
+138
+140
+141
+142
+143
+145
+146
+147
+149
+149
+150
+153
+152
+149
+146
+143
+140
+138
+136
+129
+124
+116
+110
+107
+108
+110
+113
+111
+112
+111
+69
+72
+75
+77
+78
+79
+81
+83
+83
+84
+84
+84
+83
+83
+85
+86
+86
+101
+117
+121
+121
+121
+121
+119
+114
+106
+99
+101
+112
+126
+135
+141
+157
+166
+179
+191
+199
+206
+211
+213
+214
+213
+208
+201
+195
+186
+168
+155
+137
+121
+116
+107
+107
+110
+97
+96
+115
+122
+128
+126
+115
+100
+85
+73
+68
+62
+60
+65
+58
+67
+84
+62
+54
+57
+61
+63
+66
+67
+64
+55
+50
+76
+95
+87
+68
+58
+56
+55
+57
+57
+57
+58
+57
+57
+56
+56
+40
+51
+64
+73
+68
+59
+55
+58
+57
+73
+86
+89
+93
+95
+83
+63
+64
+63
+64
+70
+76
+81
+84
+85
+51
+46
+46
+55
+60
+58
+52
+48
+52
+57
+56
+52
+50
+50
+52
+52
+60
+61
+60
+59
+56
+55
+52
+52
+56
+57
+56
+57
+57
+55
+53
+51
+55
+56
+58
+55
+50
+48
+48
+49
+52
+52
+51
+49
+49
+49
+51
+54
+57
+60
+55
+48
+64
+110
+107
+99
+84
+74
+62
+55
+55
+64
+79
+92
+71
+70
+76
+86
+81
+74
+71
+68
+74
+85
+99
+115
+127
+135
+138
+140
+140
+142
+144
+144
+146
+148
+148
+148
+149
+148
+145
+142
+140
+137
+136
+134
+130
+126
+120
+114
+111
+112
+114
+117
+114
+115
+115
+66
+69
+73
+75
+76
+78
+80
+82
+85
+86
+86
+85
+83
+85
+90
+93
+103
+112
+120
+121
+120
+119
+117
+111
+104
+102
+103
+109
+120
+133
+144
+151
+161
+168
+178
+186
+191
+193
+195
+197
+194
+192
+186
+179
+176
+168
+153
+139
+132
+111
+110
+101
+102
+109
+94
+99
+90
+103
+117
+124
+125
+120
+106
+92
+83
+72
+61
+68
+59
+71
+92
+59
+60
+55
+54
+62
+68
+66
+65
+65
+56
+62
+67
+66
+61
+56
+55
+55
+58
+57
+58
+59
+62
+65
+69
+71
+45
+59
+74
+76
+61
+48
+48
+57
+65
+76
+86
+90
+92
+89
+76
+62
+52
+53
+57
+63
+66
+68
+64
+62
+51
+48
+49
+55
+54
+49
+45
+49
+50
+57
+55
+48
+44
+48
+51
+51
+61
+61
+61
+60
+58
+57
+54
+54
+53
+53
+53
+54
+54
+53
+50
+49
+55
+57
+58
+55
+52
+49
+49
+49
+52
+53
+52
+50
+49
+49
+51
+54
+59
+52
+58
+50
+85
+112
+99
+90
+75
+72
+58
+49
+54
+67
+77
+80
+53
+71
+75
+78
+81
+74
+64
+68
+70
+79
+91
+106
+120
+129
+136
+139
+138
+139
+141
+142
+144
+145
+145
+146
+146
+144
+143
+139
+138
+136
+135
+135
+133
+130
+126
+121
+119
+119
+120
+122
+116
+117
+117
+67
+70
+72
+75
+75
+77
+79
+81
+87
+88
+88
+86
+85
+87
+94
+99
+114
+117
+118
+115
+114
+117
+112
+103
+97
+101
+108
+115
+124
+135
+147
+156
+161
+167
+174
+179
+180
+179
+179
+179
+176
+172
+166
+161
+159
+153
+140
+126
+120
+97
+99
+88
+90
+99
+86
+98
+77
+85
+97
+108
+121
+129
+124
+112
+97
+84
+71
+79
+66
+71
+87
+44
+49
+52
+62
+69
+62
+50
+55
+69
+69
+57
+51
+53
+59
+61
+60
+61
+59
+57
+53
+52
+53
+56
+60
+63
+83
+71
+60
+58
+61
+59
+55
+52
+75
+76
+80
+84
+89
+86
+77
+67
+52
+54
+53
+52
+49
+49
+48
+46
+51
+50
+52
+56
+51
+41
+40
+46
+45
+53
+53
+46
+42
+48
+53
+53
+60
+61
+61
+61
+59
+58
+55
+54
+52
+51
+50
+51
+53
+52
+49
+48
+56
+58
+58
+56
+52
+51
+51
+52
+53
+53
+52
+51
+50
+50
+52
+54
+61
+47
+62
+52
+98
+112
+91
+80
+70
+72
+61
+50
+55
+71
+74
+66
+43
+72
+75
+72
+80
+74
+64
+70
+67
+74
+85
+100
+114
+125
+132
+136
+136
+137
+138
+141
+142
+143
+143
+144
+144
+144
+141
+138
+136
+135
+135
+134
+129
+127
+125
+124
+123
+123
+124
+126
+120
+121
+122
+66
+68
+70
+71
+72
+73
+77
+79
+81
+82
+83
+86
+89
+98
+106
+111
+113
+116
+121
+119
+112
+103
+97
+95
+98
+104
+112
+122
+130
+139
+146
+153
+158
+160
+162
+163
+163
+162
+160
+159
+158
+156
+154
+153
+150
+142
+131
+124
+111
+103
+95
+90
+89
+86
+85
+86
+82
+89
+88
+91
+107
+122
+131
+139
+117
+117
+95
+80
+69
+90
+55
+50
+54
+55
+55
+55
+57
+59
+60
+63
+56
+60
+63
+59
+53
+51
+58
+64
+57
+57
+55
+55
+55
+58
+63
+65
+61
+64
+69
+71
+67
+60
+50
+43
+60
+69
+79
+86
+89
+88
+79
+67
+58
+58
+56
+53
+46
+42
+40
+39
+44
+43
+42
+41
+39
+38
+36
+35
+35
+38
+42
+44
+44
+46
+53
+60
+56
+58
+59
+59
+58
+57
+55
+53
+51
+52
+53
+53
+53
+53
+53
+53
+56
+57
+57
+57
+56
+55
+54
+52
+53
+52
+53
+52
+53
+53
+54
+56
+58
+55
+58
+62
+109
+98
+85
+75
+79
+58
+57
+63
+64
+80
+73
+36
+43
+56
+68
+76
+73
+67
+68
+73
+72
+75
+83
+93
+107
+118
+126
+131
+134
+136
+137
+139
+141
+144
+144
+145
+145
+142
+140
+139
+138
+137
+133
+131
+131
+129
+127
+126
+127
+127
+126
+125
+123
+127
+130
+63
+65
+67
+69
+69
+71
+75
+77
+79
+81
+83
+86
+91
+99
+108
+111
+112
+112
+112
+109
+102
+97
+94
+92
+100
+106
+114
+123
+130
+137
+142
+147
+149
+151
+152
+153
+151
+150
+150
+149
+150
+148
+147
+147
+145
+138
+127
+121
+109
+101
+94
+91
+90
+86
+84
+84
+84
+91
+88
+88
+102
+114
+120
+126
+136
+135
+117
+103
+85
+90
+50
+47
+55
+55
+55
+56
+56
+59
+59
+61
+57
+57
+58
+58
+57
+57
+56
+56
+59
+57
+56
+56
+57
+57
+58
+57
+54
+56
+61
+64
+65
+63
+60
+57
+52
+62
+72
+79
+81
+78
+67
+55
+55
+56
+55
+52
+47
+43
+41
+40
+43
+42
+41
+38
+35
+33
+30
+29
+30
+31
+36
+41
+45
+50
+55
+60
+57
+58
+59
+59
+58
+57
+55
+53
+51
+52
+53
+54
+55
+54
+53
+53
+57
+57
+57
+57
+57
+56
+56
+54
+53
+51
+52
+53
+53
+54
+55
+55
+61
+52
+53
+84
+102
+91
+73
+76
+69
+64
+56
+62
+78
+76
+56
+41
+51
+54
+59
+64
+66
+64
+68
+73
+68
+80
+98
+111
+118
+122
+126
+130
+131
+134
+137
+140
+141
+142
+144
+145
+145
+144
+141
+139
+138
+137
+133
+131
+131
+129
+127
+128
+129
+129
+127
+126
+128
+132
+135
+57
+60
+63
+65
+66
+69
+72
+76
+79
+79
+83
+87
+93
+101
+109
+113
+111
+107
+102
+96
+91
+90
+93
+95
+106
+111
+120
+128
+132
+136
+139
+142
+144
+144
+144
+144
+142
+141
+140
+139
+140
+139
+139
+140
+139
+133
+123
+115
+103
+96
+91
+91
+91
+88
+85
+83
+89
+95
+91
+88
+100
+109
+113
+119
+138
+138
+133
+125
+110
+97
+52
+50
+56
+58
+57
+57
+57
+59
+58
+58
+58
+53
+53
+56
+62
+62
+54
+47
+58
+56
+55
+56
+58
+58
+57
+55
+53
+54
+56
+58
+61
+64
+65
+66
+58
+64
+69
+70
+72
+71
+64
+55
+54
+54
+55
+52
+48
+45
+43
+42
+39
+39
+37
+35
+33
+30
+28
+27
+29
+30
+35
+42
+50
+55
+57
+59
+57
+58
+59
+59
+57
+56
+55
+53
+51
+52
+53
+54
+54
+54
+53
+52
+56
+57
+57
+56
+56
+55
+55
+54
+53
+52
+53
+54
+54
+55
+55
+56
+61
+50
+56
+108
+93
+81
+62
+75
+59
+66
+56
+65
+87
+64
+34
+46
+52
+53
+54
+59
+62
+61
+64
+69
+70
+97
+126
+140
+135
+127
+125
+128
+131
+133
+137
+140
+142
+143
+144
+145
+147
+145
+141
+140
+139
+139
+136
+134
+132
+131
+128
+129
+130
+130
+129
+128
+134
+138
+141
+53
+56
+60
+62
+64
+66
+69
+74
+76
+77
+81
+87
+94
+103
+110
+111
+109
+103
+94
+87
+85
+88
+95
+99
+110
+115
+124
+131
+134
+136
+136
+138
+142
+140
+140
+139
+137
+136
+134
+133
+133
+133
+134
+136
+136
+131
+121
+112
+96
+90
+89
+92
+94
+91
+86
+82
+84
+91
+89
+88
+99
+108
+112
+121
+125
+122
+131
+134
+129
+107
+60
+56
+59
+58
+59
+58
+58
+58
+57
+56
+58
+54
+53
+56
+62
+62
+56
+47
+54
+53
+52
+54
+57
+60
+61
+59
+58
+58
+57
+57
+58
+59
+60
+61
+68
+69
+65
+61
+60
+65
+64
+59
+53
+53
+53
+51
+47
+43
+41
+41
+38
+38
+38
+39
+38
+37
+36
+35
+33
+34
+37
+44
+53
+57
+57
+57
+57
+58
+59
+59
+57
+56
+55
+53
+52
+52
+54
+54
+55
+54
+53
+53
+56
+56
+56
+56
+55
+55
+54
+54
+53
+54
+55
+57
+57
+59
+58
+58
+59
+51
+73
+111
+85
+69
+62
+67
+55
+60
+66
+79
+80
+47
+29
+48
+47
+52
+58
+65
+64
+61
+64
+70
+93
+126
+159
+168
+152
+132
+123
+126
+131
+134
+138
+143
+144
+145
+146
+146
+148
+146
+142
+141
+140
+140
+138
+137
+133
+131
+129
+130
+131
+132
+130
+130
+138
+142
+145
+51
+54
+57
+59
+61
+64
+68
+71
+73
+75
+78
+85
+94
+103
+107
+107
+104
+96
+86
+80
+81
+89
+99
+106
+114
+120
+127
+133
+135
+136
+137
+138
+139
+138
+136
+135
+133
+131
+131
+130
+132
+132
+133
+134
+134
+130
+120
+110
+90
+84
+87
+92
+96
+95
+90
+83
+74
+83
+83
+82
+93
+102
+108
+118
+117
+111
+126
+130
+135
+108
+63
+56
+59
+61
+61
+60
+59
+58
+56
+55
+58
+56
+56
+57
+58
+58
+57
+55
+57
+55
+56
+55
+55
+56
+60
+62
+60
+61
+60
+59
+58
+56
+55
+53
+64
+64
+61
+57
+56
+59
+58
+53
+47
+48
+50
+50
+47
+45
+43
+44
+45
+46
+47
+47
+47
+47
+45
+46
+40
+40
+43
+48
+54
+56
+56
+53
+57
+58
+59
+58
+57
+56
+54
+52
+52
+52
+53
+55
+55
+54
+54
+53
+56
+57
+57
+57
+57
+56
+55
+56
+56
+58
+59
+61
+61
+62
+61
+61
+55
+60
+93
+96
+80
+60
+66
+55
+55
+52
+78
+92
+64
+38
+40
+49
+46
+54
+62
+65
+61
+61
+74
+92
+133
+163
+190
+190
+165
+139
+127
+127
+132
+136
+141
+147
+148
+149
+147
+147
+148
+146
+142
+140
+140
+140
+139
+138
+133
+132
+131
+132
+133
+134
+133
+133
+142
+145
+148
+49
+52
+55
+57
+58
+61
+65
+68
+72
+71
+74
+83
+94
+101
+103
+102
+97
+89
+81
+79
+83
+94
+105
+111
+119
+124
+129
+133
+135
+135
+135
+136
+135
+134
+132
+130
+128
+128
+127
+128
+133
+133
+133
+134
+133
+128
+118
+106
+87
+81
+85
+94
+100
+97
+93
+87
+78
+85
+84
+82
+92
+98
+104
+113
+121
+113
+124
+115
+120
+92
+59
+53
+59
+61
+61
+60
+59
+59
+57
+55
+53
+55
+58
+58
+58
+56
+58
+61
+61
+64
+65
+62
+56
+52
+56
+60
+58
+58
+59
+59
+58
+57
+53
+53
+54
+59
+62
+63
+63
+62
+55
+44
+43
+45
+48
+51
+49
+48
+48
+48
+48
+49
+49
+48
+47
+45
+44
+42
+46
+46
+48
+51
+54
+55
+54
+53
+57
+58
+58
+58
+57
+56
+54
+52
+53
+53
+54
+55
+55
+54
+54
+54
+55
+56
+56
+57
+56
+56
+55
+57
+57
+60
+61
+63
+64
+64
+63
+60
+55
+72
+103
+78
+72
+56
+66
+49
+57
+55
+83
+87
+50
+41
+55
+50
+51
+55
+59
+58
+56
+68
+99
+131
+174
+193
+206
+199
+174
+148
+134
+130
+133
+136
+143
+150
+152
+151
+149
+148
+148
+145
+141
+139
+139
+140
+139
+139
+134
+133
+132
+133
+136
+137
+135
+134
+143
+147
+150
+48
+49
+52
+53
+54
+56
+61
+62
+69
+69
+72
+80
+91
+98
+98
+96
+94
+88
+84
+84
+93
+105
+115
+120
+127
+130
+132
+134
+133
+132
+132
+133
+134
+133
+131
+129
+127
+128
+128
+128
+133
+132
+131
+132
+130
+124
+113
+102
+86
+81
+87
+95
+101
+100
+96
+91
+82
+91
+89
+85
+91
+93
+98
+109
+122
+114
+120
+89
+91
+68
+53
+58
+58
+60
+61
+61
+59
+58
+56
+54
+48
+51
+56
+59
+59
+59
+59
+60
+59
+67
+75
+72
+61
+52
+53
+59
+57
+57
+57
+57
+56
+56
+55
+55
+54
+60
+63
+64
+64
+65
+58
+49
+48
+49
+52
+54
+52
+49
+48
+47
+46
+47
+47
+48
+45
+44
+43
+42
+49
+50
+53
+53
+53
+53
+55
+56
+56
+57
+58
+58
+56
+55
+54
+52
+53
+53
+55
+56
+55
+55
+54
+54
+55
+56
+56
+57
+57
+57
+56
+57
+57
+58
+62
+63
+64
+64
+62
+59
+58
+85
+94
+71
+62
+58
+56
+53
+58
+71
+80
+64
+50
+53
+57
+51
+51
+53
+56
+60
+67
+92
+132
+168
+197
+203
+204
+195
+174
+153
+136
+129
+131
+137
+143
+149
+153
+152
+149
+147
+147
+144
+140
+138
+138
+139
+139
+139
+136
+134
+134
+136
+138
+139
+137
+137
+146
+150
+153
+46
+48
+50
+51
+51
+54
+57
+59
+68
+68
+70
+79
+90
+97
+96
+92
+95
+90
+88
+92
+103
+115
+124
+128
+132
+133
+134
+133
+131
+130
+130
+130
+135
+134
+132
+130
+130
+130
+130
+131
+133
+131
+130
+130
+127
+120
+110
+99
+87
+84
+87
+95
+101
+100
+96
+93
+79
+89
+89
+83
+86
+87
+90
+100
+114
+110
+113
+68
+65
+49
+52
+67
+57
+58
+59
+60
+58
+58
+56
+55
+44
+48
+54
+60
+64
+62
+59
+55
+52
+66
+79
+78
+66
+55
+55
+62
+59
+58
+56
+55
+54
+54
+56
+56
+59
+59
+57
+54
+55
+60
+60
+55
+56
+56
+58
+57
+52
+47
+44
+44
+47
+49
+51
+52
+53
+53
+51
+53
+50
+53
+56
+54
+52
+52
+55
+60
+56
+57
+57
+58
+56
+55
+54
+52
+53
+53
+55
+56
+57
+56
+55
+55
+56
+58
+57
+59
+58
+58
+58
+59
+57
+58
+61
+62
+63
+63
+61
+56
+60
+93
+81
+72
+56
+63
+46
+62
+61
+93
+76
+45
+56
+66
+55
+52
+48
+50
+57
+68
+86
+116
+157
+190
+203
+201
+195
+186
+172
+153
+135
+124
+129
+135
+142
+149
+152
+151
+148
+146
+147
+143
+139
+137
+137
+139
+139
+139
+136
+135
+135
+136
+138
+139
+139
+138
+147
+151
+154
+48
+47
+45
+46
+48
+51
+56
+58
+61
+64
+69
+76
+82
+88
+92
+94
+88
+89
+93
+101
+110
+120
+129
+133
+140
+140
+138
+135
+130
+128
+128
+130
+131
+133
+131
+132
+131
+131
+132
+132
+128
+128
+128
+125
+120
+111
+101
+93
+92
+92
+92
+94
+95
+96
+96
+94
+79
+84
+92
+96
+89
+81
+83
+92
+104
+89
+68
+55
+55
+58
+61
+59
+57
+58
+57
+58
+56
+56
+53
+53
+47
+51
+56
+62
+64
+64
+61
+57
+57
+48
+87
+75
+47
+61
+60
+56
+59
+58
+57
+56
+55
+54
+53
+52
+55
+59
+62
+60
+55
+56
+62
+67
+66
+57
+50
+52
+50
+45
+45
+50
+55
+53
+54
+55
+57
+58
+55
+55
+59
+60
+58
+56
+56
+55
+55
+55
+57
+57
+57
+58
+57
+57
+57
+56
+55
+54
+56
+57
+59
+59
+57
+55
+56
+57
+57
+58
+58
+58
+59
+60
+57
+61
+58
+52
+57
+68
+64
+49
+95
+87
+75
+61
+51
+50
+56
+69
+91
+71
+52
+51
+63
+66
+54
+43
+46
+49
+56
+74
+110
+155
+186
+198
+203
+190
+182
+178
+160
+132
+118
+123
+128
+135
+143
+148
+149
+148
+146
+145
+142
+138
+134
+134
+137
+139
+138
+136
+139
+140
+139
+139
+138
+139
+143
+147
+155
+157
+158
+48
+47
+46
+46
+47
+51
+54
+56
+60
+63
+68
+74
+80
+85
+89
+92
+90
+93
+98
+106
+116
+126
+135
+140
+141
+140
+137
+132
+128
+126
+127
+130
+134
+135
+136
+136
+136
+134
+134
+133
+128
+127
+124
+120
+115
+107
+98
+93
+96
+96
+94
+94
+92
+93
+94
+93
+93
+89
+88
+90
+86
+83
+82
+89
+85
+76
+62
+54
+54
+57
+57
+57
+56
+56
+56
+56
+55
+54
+52
+53
+48
+53
+57
+61
+65
+64
+60
+57
+56
+60
+82
+72
+52
+58
+58
+52
+61
+60
+59
+59
+58
+57
+56
+54
+55
+56
+55
+51
+49
+49
+55
+60
+68
+56
+47
+47
+48
+46
+49
+54
+53
+51
+50
+58
+69
+73
+68
+63
+58
+57
+57
+57
+56
+56
+57
+57
+56
+56
+57
+57
+57
+57
+57
+55
+54
+53
+54
+56
+59
+58
+57
+55
+56
+58
+58
+59
+59
+60
+60
+60
+57
+63
+58
+53
+58
+60
+58
+61
+95
+81
+67
+57
+57
+61
+64
+74
+64
+63
+58
+58
+61
+61
+59
+61
+47
+55
+75
+104
+143
+176
+195
+199
+186
+185
+182
+169
+142
+117
+112
+123
+127
+134
+141
+147
+148
+147
+144
+144
+140
+137
+134
+134
+138
+140
+140
+139
+141
+141
+142
+140
+140
+142
+146
+149
+156
+157
+158
+49
+49
+47
+46
+47
+49
+52
+53
+59
+62
+66
+72
+77
+82
+85
+87
+89
+93
+100
+110
+120
+131
+139
+144
+142
+140
+137
+132
+127
+124
+125
+127
+134
+136
+138
+139
+138
+136
+132
+130
+128
+124
+118
+112
+106
+100
+94
+93
+98
+98
+95
+92
+90
+91
+92
+92
+96
+87
+82
+85
+88
+86
+80
+79
+62
+60
+56
+55
+54
+54
+55
+55
+55
+56
+56
+56
+54
+53
+51
+53
+51
+54
+57
+60
+63
+63
+60
+56
+53
+74
+70
+65
+60
+54
+59
+54
+58
+58
+58
+58
+56
+55
+54
+51
+57
+55
+51
+51
+51
+54
+58
+60
+60
+52
+48
+49
+51
+52
+55
+61
+55
+65
+78
+89
+90
+81
+66
+56
+54
+55
+55
+55
+56
+57
+59
+59
+55
+56
+56
+56
+56
+56
+56
+56
+53
+52
+53
+55
+58
+58
+56
+55
+56
+58
+59
+60
+60
+60
+60
+60
+57
+64
+57
+54
+59
+49
+52
+80
+92
+75
+59
+57
+65
+73
+75
+79
+56
+62
+63
+64
+60
+54
+52
+55
+43
+60
+93
+136
+171
+188
+194
+192
+180
+184
+180
+154
+117
+98
+104
+120
+125
+131
+140
+146
+146
+146
+144
+143
+137
+135
+134
+136
+139
+142
+143
+142
+144
+144
+144
+144
+143
+146
+148
+153
+161
+163
+163
+52
+52
+49
+49
+50
+51
+52
+54
+59
+62
+65
+70
+74
+79
+81
+83
+86
+90
+97
+108
+119
+130
+137
+143
+145
+144
+139
+133
+127
+124
+124
+126
+131
+133
+136
+138
+136
+133
+127
+125
+123
+118
+110
+102
+97
+93
+90
+91
+97
+98
+95
+92
+89
+89
+90
+91
+86
+81
+81
+88
+91
+84
+71
+63
+50
+53
+53
+54
+53
+53
+54
+56
+55
+56
+56
+57
+54
+54
+51
+54
+54
+56
+55
+58
+62
+63
+59
+56
+52
+85
+60
+56
+66
+53
+61
+61
+56
+56
+57
+58
+57
+55
+54
+51
+54
+51
+50
+52
+58
+62
+63
+61
+52
+53
+54
+53
+50
+51
+55
+60
+85
+98
+109
+105
+86
+65
+54
+52
+54
+55
+55
+56
+56
+57
+57
+58
+55
+56
+56
+57
+56
+56
+56
+55
+53
+54
+54
+57
+60
+60
+57
+57
+57
+59
+59
+60
+60
+61
+59
+60
+58
+64
+56
+56
+59
+43
+53
+97
+85
+72
+62
+62
+73
+81
+81
+85
+70
+70
+66
+67
+67
+61
+54
+50
+50
+70
+107
+147
+172
+180
+184
+186
+187
+184
+167
+130
+95
+87
+99
+114
+123
+131
+138
+145
+145
+145
+143
+142
+135
+134
+135
+138
+141
+143
+145
+146
+145
+145
+146
+146
+145
+147
+151
+156
+166
+166
+166
+56
+56
+54
+54
+54
+54
+55
+56
+62
+64
+67
+71
+75
+78
+80
+82
+85
+88
+95
+105
+115
+125
+134
+138
+146
+145
+141
+135
+129
+125
+124
+124
+126
+129
+133
+134
+132
+128
+122
+119
+115
+110
+101
+95
+91
+90
+89
+90
+96
+97
+95
+92
+91
+90
+90
+90
+84
+81
+81
+86
+83
+72
+58
+52
+49
+51
+53
+53
+51
+51
+53
+57
+56
+57
+58
+58
+56
+55
+53
+55
+59
+58
+54
+56
+59
+61
+59
+55
+57
+92
+61
+53
+65
+51
+58
+63
+58
+58
+58
+58
+59
+58
+56
+55
+51
+49
+49
+55
+60
+62
+59
+55
+55
+59
+60
+54
+49
+53
+66
+77
+120
+113
+96
+74
+56
+50
+55
+64
+57
+57
+55
+55
+54
+55
+55
+55
+54
+55
+55
+56
+56
+56
+55
+55
+55
+55
+55
+58
+61
+61
+59
+59
+56
+58
+59
+60
+60
+60
+59
+59
+59
+61
+56
+57
+56
+48
+64
+105
+78
+72
+69
+73
+80
+85
+86
+90
+75
+74
+68
+67
+67
+64
+66
+71
+85
+103
+129
+153
+164
+169
+178
+185
+183
+167
+134
+99
+80
+83
+97
+108
+123
+130
+138
+144
+146
+145
+144
+142
+135
+134
+138
+140
+142
+144
+146
+147
+145
+146
+147
+147
+147
+150
+154
+158
+167
+167
+167
+61
+62
+61
+61
+61
+60
+61
+61
+66
+68
+71
+74
+76
+79
+81
+82
+87
+90
+94
+101
+110
+121
+128
+133
+140
+140
+138
+133
+127
+121
+119
+118
+119
+122
+125
+126
+125
+121
+116
+114
+107
+102
+95
+91
+90
+90
+90
+91
+94
+95
+94
+93
+93
+92
+92
+89
+94
+85
+77
+73
+64
+56
+50
+50
+53
+54
+53
+52
+50
+52
+54
+59
+57
+59
+59
+59
+58
+57
+55
+57
+62
+59
+53
+53
+57
+60
+59
+55
+63
+91
+73
+58
+64
+54
+51
+60
+57
+55
+55
+55
+55
+55
+55
+55
+60
+58
+57
+60
+62
+61
+56
+52
+57
+60
+58
+56
+62
+80
+98
+112
+104
+84
+61
+49
+52
+59
+61
+59
+59
+58
+57
+56
+55
+55
+53
+54
+54
+54
+55
+56
+56
+55
+55
+54
+56
+56
+56
+59
+62
+62
+60
+60
+56
+58
+59
+59
+60
+59
+58
+58
+60
+57
+59
+57
+54
+62
+84
+102
+76
+74
+76
+78
+83
+87
+92
+97
+71
+74
+70
+62
+51
+54
+77
+102
+138
+148
+155
+154
+155
+163
+173
+176
+149
+125
+96
+74
+70
+80
+95
+106
+122
+130
+139
+145
+146
+145
+143
+142
+136
+137
+141
+143
+143
+143
+145
+146
+148
+149
+150
+150
+151
+153
+159
+162
+173
+172
+171
+65
+66
+66
+67
+67
+67
+66
+67
+70
+72
+74
+77
+78
+81
+82
+83
+90
+92
+93
+97
+104
+113
+122
+126
+130
+131
+132
+129
+123
+115
+111
+109
+109
+111
+113
+115
+115
+111
+107
+105
+97
+95
+92
+90
+91
+91
+92
+92
+92
+93
+94
+95
+95
+96
+93
+89
+95
+79
+66
+59
+55
+50
+51
+53
+55
+54
+52
+51
+52
+53
+55
+57
+58
+61
+61
+62
+60
+59
+57
+59
+64
+60
+53
+51
+56
+60
+58
+53
+57
+78
+84
+66
+66
+63
+49
+60
+60
+57
+55
+54
+55
+57
+59
+59
+68
+65
+63
+62
+61
+59
+56
+56
+56
+57
+55
+59
+74
+92
+100
+99
+61
+56
+52
+56
+65
+69
+61
+52
+59
+59
+57
+57
+56
+56
+55
+55
+54
+55
+54
+56
+56
+55
+55
+54
+55
+54
+56
+59
+62
+62
+60
+60
+56
+59
+59
+59
+59
+58
+58
+57
+62
+55
+61
+57
+50
+80
+107
+93
+80
+75
+74
+77
+84
+93
+101
+106
+75
+72
+63
+55
+53
+71
+111
+146
+178
+179
+165
+146
+141
+150
+151
+140
+102
+84
+69
+66
+68
+74
+88
+104
+124
+130
+139
+144
+147
+145
+145
+143
+139
+140
+144
+145
+143
+142
+143
+145
+151
+153
+153
+154
+155
+157
+163
+166
+175
+174
+172
+67
+68
+69
+69
+71
+71
+70
+71
+72
+74
+76
+78
+80
+81
+82
+84
+89
+90
+89
+91
+97
+107
+115
+120
+123
+125
+127
+124
+119
+110
+105
+103
+102
+103
+104
+105
+105
+103
+98
+96
+93
+92
+90
+91
+93
+94
+94
+93
+93
+93
+93
+93
+93
+93
+91
+87
+84
+69
+57
+55
+56
+54
+54
+54
+54
+52
+52
+52
+55
+55
+54
+54
+58
+60
+60
+61
+59
+59
+58
+60
+65
+60
+51
+51
+57
+61
+59
+56
+50
+65
+91
+73
+68
+70
+50
+63
+70
+66
+64
+63
+63
+66
+69
+71
+64
+61
+58
+54
+54
+55
+57
+60
+63
+61
+58
+63
+77
+81
+64
+41
+45
+53
+62
+65
+62
+59
+59
+61
+57
+57
+57
+56
+57
+58
+57
+58
+56
+56
+56
+56
+57
+56
+55
+55
+54
+54
+56
+58
+61
+61
+60
+59
+57
+59
+59
+59
+59
+59
+58
+58
+63
+53
+61
+56
+47
+92
+122
+88
+89
+81
+77
+77
+87
+97
+104
+110
+84
+72
+57
+59
+80
+116
+162
+193
+188
+184
+158
+130
+126
+135
+125
+98
+68
+60
+61
+68
+69
+67
+80
+101
+123
+131
+139
+145
+147
+146
+144
+142
+141
+143
+146
+147
+143
+142
+143
+146
+155
+157
+157
+158
+158
+162
+166
+171
+167
+165
+164
+75
+75
+74
+74
+74
+74
+74
+75
+78
+79
+80
+81
+82
+84
+85
+85
+91
+90
+89
+89
+93
+97
+102
+106
+110
+112
+115
+115
+112
+106
+98
+93
+96
+95
+93
+90
+90
+89
+90
+90
+91
+91
+92
+92
+92
+92
+93
+94
+98
+101
+90
+79
+87
+92
+90
+91
+78
+70
+60
+56
+56
+56
+52
+49
+54
+55
+55
+55
+55
+55
+54
+55
+56
+56
+57
+57
+57
+57
+56
+59
+59
+62
+57
+49
+50
+57
+60
+57
+53
+53
+58
+67
+75
+72
+61
+50
+80
+74
+70
+69
+73
+72
+68
+61
+55
+56
+58
+58
+57
+55
+57
+61
+69
+65
+57
+50
+48
+52
+59
+63
+58
+61
+64
+64
+62
+60
+57
+58
+56
+56
+56
+57
+57
+57
+57
+57
+52
+53
+54
+55
+56
+57
+57
+57
+59
+57
+57
+61
+65
+66
+65
+63
+58
+60
+61
+60
+58
+58
+56
+56
+65
+60
+47
+47
+76
+109
+109
+86
+76
+78
+81
+85
+88
+93
+97
+106
+89
+75
+69
+97
+141
+176
+188
+189
+181
+157
+128
+109
+100
+93
+80
+68
+61
+67
+64
+62
+67
+67
+78
+100
+115
+131
+143
+147
+146
+146
+147
+144
+144
+145
+147
+147
+146
+147
+150
+152
+156
+158
+159
+161
+163
+167
+170
+170
+168
+155
+145
+78
+78
+78
+78
+78
+78
+78
+78
+79
+80
+80
+82
+83
+84
+85
+86
+91
+90
+89
+89
+91
+95
+98
+100
+101
+103
+105
+105
+102
+96
+91
+88
+91
+90
+86
+84
+84
+84
+86
+87
+90
+90
+91
+92
+93
+94
+95
+95
+97
+103
+91
+83
+86
+88
+82
+82
+73
+67
+61
+57
+56
+55
+52
+51
+54
+56
+56
+56
+55
+56
+55
+55
+55
+55
+55
+55
+56
+56
+56
+58
+60
+62
+57
+49
+50
+58
+62
+60
+58
+52
+52
+59
+69
+79
+81
+79
+70
+65
+60
+59
+62
+62
+58
+53
+56
+56
+56
+56
+56
+58
+62
+66
+64
+61
+57
+52
+52
+55
+60
+64
+64
+64
+65
+63
+58
+56
+55
+56
+54
+54
+55
+56
+56
+57
+57
+58
+57
+58
+58
+59
+59
+59
+57
+57
+58
+59
+60
+63
+65
+63
+61
+59
+59
+61
+61
+60
+59
+58
+56
+58
+57
+56
+53
+60
+81
+101
+94
+77
+78
+84
+89
+92
+94
+94
+95
+102
+95
+103
+114
+144
+175
+190
+178
+160
+130
+117
+101
+88
+80
+72
+63
+56
+60
+66
+63
+61
+65
+67
+77
+100
+116
+131
+144
+148
+146
+148
+147
+145
+145
+146
+148
+148
+147
+148
+151
+152
+157
+157
+160
+162
+166
+169
+169
+168
+152
+141
+131
+84
+84
+84
+84
+84
+84
+84
+84
+82
+83
+84
+85
+86
+87
+88
+88
+93
+93
+91
+91
+91
+91
+93
+93
+93
+94
+95
+95
+94
+91
+87
+86
+86
+84
+81
+78
+77
+79
+81
+82
+87
+87
+89
+91
+92
+94
+96
+97
+96
+101
+94
+88
+91
+88
+74
+71
+65
+63
+60
+56
+55
+57
+57
+57
+56
+55
+55
+57
+56
+55
+55
+55
+55
+55
+55
+56
+56
+56
+57
+59
+62
+62
+58
+50
+51
+58
+62
+62
+63
+56
+50
+52
+60
+70
+77
+78
+59
+53
+51
+53
+58
+63
+62
+60
+57
+54
+51
+51
+54
+57
+60
+64
+55
+56
+53
+52
+52
+55
+59
+61
+68
+67
+66
+63
+58
+56
+54
+55
+54
+54
+54
+55
+55
+57
+57
+58
+58
+59
+59
+60
+59
+58
+57
+56
+57
+60
+64
+66
+63
+58
+55
+55
+59
+60
+60
+59
+58
+57
+55
+57
+54
+54
+57
+70
+83
+87
+80
+73
+77
+83
+89
+94
+97
+97
+95
+101
+114
+141
+166
+185
+192
+179
+144
+111
+82
+83
+80
+76
+67
+60
+57
+56
+59
+65
+63
+60
+65
+66
+77
+99
+118
+133
+146
+150
+148
+150
+149
+148
+148
+149
+150
+150
+148
+149
+151
+153
+157
+157
+159
+164
+169
+170
+166
+160
+137
+127
+120
+88
+88
+88
+88
+88
+88
+88
+88
+86
+87
+87
+88
+89
+90
+91
+91
+93
+94
+94
+95
+94
+92
+92
+92
+93
+93
+93
+94
+93
+91
+90
+91
+89
+86
+82
+78
+76
+77
+78
+79
+81
+84
+86
+88
+90
+93
+95
+97
+97
+99
+91
+91
+98
+91
+71
+61
+61
+60
+58
+57
+56
+57
+61
+62
+57
+55
+56
+57
+56
+56
+56
+55
+55
+56
+56
+56
+56
+56
+57
+59
+63
+62
+57
+51
+51
+56
+61
+64
+63
+58
+55
+53
+55
+58
+60
+58
+55
+50
+50
+52
+56
+60
+62
+61
+56
+52
+49
+50
+54
+56
+55
+55
+51
+54
+53
+54
+54
+56
+58
+58
+65
+66
+66
+64
+60
+58
+56
+56
+54
+55
+55
+56
+56
+57
+58
+59
+57
+58
+58
+59
+58
+58
+57
+57
+60
+64
+67
+65
+59
+54
+54
+55
+59
+59
+59
+59
+58
+56
+55
+57
+61
+53
+53
+69
+80
+77
+76
+81
+80
+85
+90
+94
+97
+97
+97
+103
+133
+169
+189
+184
+161
+134
+96
+65
+62
+66
+70
+70
+65
+61
+61
+61
+57
+64
+62
+60
+64
+66
+76
+98
+119
+134
+147
+151
+150
+152
+151
+151
+151
+152
+152
+151
+150
+150
+153
+155
+158
+159
+163
+168
+172
+167
+157
+146
+132
+123
+118
+90
+90
+90
+90
+90
+90
+90
+90
+90
+90
+91
+91
+92
+93
+93
+93
+94
+95
+96
+97
+97
+96
+95
+94
+96
+96
+96
+95
+95
+96
+96
+97
+94
+90
+85
+80
+77
+75
+75
+75
+77
+79
+81
+83
+87
+90
+92
+92
+96
+93
+85
+91
+105
+100
+79
+67
+61
+58
+57
+56
+56
+60
+65
+65
+58
+55
+56
+58
+57
+57
+57
+56
+56
+56
+56
+57
+57
+57
+57
+59
+63
+62
+58
+54
+52
+55
+61
+66
+59
+59
+58
+57
+56
+58
+60
+59
+58
+53
+51
+51
+53
+53
+52
+51
+54
+53
+52
+56
+57
+56
+51
+48
+53
+57
+57
+58
+58
+58
+56
+55
+58
+59
+63
+64
+62
+60
+58
+57
+55
+54
+54
+55
+56
+58
+58
+60
+58
+59
+60
+61
+61
+62
+61
+62
+64
+66
+66
+61
+55
+53
+55
+58
+59
+60
+59
+58
+57
+56
+55
+56
+64
+52
+51
+71
+81
+78
+78
+87
+85
+88
+90
+92
+93
+96
+97
+104
+137
+165
+169
+142
+107
+83
+64
+50
+58
+59
+61
+63
+63
+63
+59
+58
+57
+63
+61
+59
+63
+65
+75
+98
+120
+135
+148
+152
+151
+154
+153
+153
+154
+154
+154
+153
+151
+152
+155
+158
+160
+162
+167
+169
+168
+159
+146
+134
+133
+124
+120
+92
+92
+92
+92
+92
+92
+92
+92
+92
+93
+93
+93
+94
+94
+95
+95
+95
+96
+97
+98
+98
+98
+97
+97
+97
+97
+96
+96
+96
+96
+97
+98
+95
+93
+88
+82
+77
+74
+72
+72
+74
+75
+77
+79
+81
+84
+86
+85
+88
+85
+80
+87
+104
+102
+88
+83
+65
+60
+57
+56
+58
+62
+66
+64
+59
+55
+56
+57
+57
+57
+57
+56
+56
+57
+57
+57
+57
+57
+57
+59
+63
+61
+60
+57
+54
+53
+59
+65
+66
+64
+59
+55
+50
+52
+59
+61
+54
+52
+55
+57
+59
+59
+59
+58
+53
+55
+57
+61
+61
+58
+51
+48
+57
+61
+61
+62
+61
+60
+58
+56
+54
+56
+59
+62
+61
+60
+59
+59
+56
+55
+55
+56
+58
+59
+60
+61
+62
+63
+65
+65
+65
+65
+64
+66
+63
+64
+61
+56
+53
+53
+56
+60
+60
+60
+60
+58
+57
+55
+54
+54
+58
+51
+57
+79
+89
+82
+79
+86
+89
+91
+90
+91
+92
+95
+96
+103
+120
+131
+124
+96
+69
+59
+59
+60
+61
+60
+60
+63
+65
+65
+60
+55
+57
+63
+60
+58
+62
+64
+74
+97
+120
+135
+148
+153
+152
+154
+154
+154
+154
+156
+155
+153
+153
+155
+158
+161
+165
+167
+168
+166
+159
+148
+138
+130
+134
+126
+121
+94
+94
+94
+94
+94
+94
+94
+94
+94
+94
+94
+95
+95
+95
+95
+96
+97
+98
+98
+98
+96
+96
+97
+97
+97
+96
+96
+96
+96
+97
+97
+97
+95
+94
+91
+87
+82
+77
+73
+72
+72
+72
+74
+75
+76
+77
+79
+78
+80
+81
+78
+82
+89
+87
+84
+91
+75
+65
+57
+55
+59
+62
+64
+60
+58
+55
+56
+58
+57
+58
+58
+58
+57
+58
+58
+58
+58
+58
+58
+59
+61
+61
+61
+60
+56
+52
+57
+65
+67
+65
+61
+54
+47
+48
+54
+58
+53
+54
+59
+64
+66
+66
+64
+63
+50
+55
+58
+62
+60
+56
+53
+53
+60
+62
+62
+63
+62
+61
+59
+58
+55
+56
+56
+57
+56
+58
+61
+63
+58
+57
+57
+58
+59
+59
+61
+62
+66
+67
+67
+66
+65
+63
+61
+62
+60
+58
+56
+54
+55
+56
+58
+58
+61
+60
+60
+58
+57
+55
+54
+54
+51
+53
+66
+85
+87
+80
+80
+90
+89
+90
+92
+92
+91
+92
+91
+98
+98
+96
+83
+71
+63
+61
+62
+63
+61
+63
+66
+70
+71
+68
+62
+57
+56
+62
+60
+58
+62
+63
+74
+96
+119
+135
+148
+153
+152
+155
+154
+154
+155
+157
+156
+155
+154
+157
+161
+165
+171
+169
+165
+156
+145
+137
+135
+136
+136
+128
+121
+95
+95
+95
+95
+95
+95
+95
+95
+94
+95
+95
+95
+95
+95
+96
+96
+100
+99
+97
+96
+95
+94
+94
+96
+97
+97
+97
+97
+96
+96
+97
+96
+97
+95
+94
+91
+87
+82
+77
+76
+70
+71
+72
+72
+73
+75
+75
+74
+74
+80
+79
+76
+75
+69
+74
+91
+83
+70
+59
+55
+59
+61
+60
+55
+58
+56
+57
+59
+59
+59
+59
+59
+58
+58
+58
+58
+58
+58
+58
+59
+59
+58
+60
+62
+57
+51
+55
+63
+57
+59
+62
+60
+56
+55
+60
+63
+61
+63
+67
+68
+64
+59
+53
+49
+48
+54
+58
+60
+58
+57
+56
+58
+61
+62
+63
+64
+64
+64
+62
+61
+59
+58
+55
+54
+53
+57
+63
+67
+60
+59
+59
+60
+60
+61
+62
+64
+68
+68
+67
+65
+63
+59
+56
+57
+55
+56
+53
+54
+58
+60
+58
+56
+61
+60
+60
+60
+58
+56
+54
+54
+49
+56
+71
+83
+80
+76
+82
+95
+87
+89
+91
+93
+93
+92
+89
+94
+88
+77
+64
+65
+71
+69
+61
+55
+56
+62
+69
+74
+73
+67
+62
+58
+56
+62
+59
+57
+62
+63
+73
+96
+119
+134
+148
+152
+152
+155
+154
+154
+156
+156
+156
+155
+155
+158
+163
+167
+173
+171
+163
+149
+135
+131
+136
+143
+138
+129
+122
+96
+96
+96
+96
+96
+96
+96
+96
+96
+96
+96
+96
+96
+96
+96
+95
+96
+96
+96
+96
+96
+96
+96
+97
+97
+97
+97
+98
+98
+98
+98
+98
+95
+95
+94
+95
+93
+88
+80
+76
+73
+72
+69
+68
+69
+71
+71
+69
+74
+75
+68
+74
+81
+70
+75
+107
+104
+86
+71
+65
+64
+61
+59
+59
+51
+53
+54
+55
+55
+56
+59
+61
+60
+60
+60
+60
+59
+59
+59
+60
+50
+55
+59
+58
+55
+53
+55
+57
+65
+59
+54
+52
+54
+60
+67
+72
+68
+69
+67
+58
+54
+56
+55
+52
+57
+57
+56
+56
+57
+58
+60
+60
+61
+61
+62
+63
+64
+65
+66
+64
+59
+58
+55
+54
+54
+56
+58
+60
+61
+61
+63
+65
+65
+66
+64
+64
+72
+69
+65
+59
+53
+51
+49
+50
+57
+59
+57
+58
+58
+59
+59
+60
+57
+56
+57
+57
+57
+56
+54
+51
+45
+65
+79
+77
+76
+81
+85
+82
+92
+92
+85
+84
+90
+88
+87
+103
+84
+81
+75
+75
+72
+64
+61
+63
+60
+80
+94
+91
+79
+70
+65
+61
+59
+63
+61
+61
+63
+61
+72
+98
+121
+136
+148
+151
+150
+153
+154
+155
+157
+158
+159
+159
+159
+162
+167
+170
+173
+163
+147
+137
+135
+137
+142
+144
+137
+128
+121
+96
+96
+96
+96
+96
+96
+96
+96
+96
+96
+96
+96
+96
+96
+96
+95
+95
+95
+95
+95
+95
+96
+96
+96
+96
+97
+97
+97
+97
+97
+97
+97
+96
+96
+95
+95
+93
+89
+82
+78
+74
+72
+68
+68
+69
+70
+70
+69
+70
+67
+69
+76
+73
+65
+82
+117
+100
+96
+86
+72
+64
+64
+62
+56
+57
+61
+61
+62
+59
+59
+57
+58
+58
+58
+58
+58
+58
+58
+58
+59
+63
+66
+66
+61
+54
+49
+49
+50
+53
+54
+59
+65
+69
+73
+74
+75
+66
+69
+66
+59
+57
+61
+63
+61
+63
+62
+62
+61
+61
+62
+64
+63
+61
+60
+60
+62
+63
+63
+63
+62
+64
+61
+58
+56
+55
+56
+57
+56
+60
+60
+63
+65
+67
+67
+68
+69
+66
+65
+61
+58
+54
+53
+52
+55
+58
+61
+59
+59
+58
+59
+60
+60
+59
+59
+57
+58
+57
+56
+54
+52
+52
+68
+78
+75
+74
+81
+84
+82
+83
+88
+85
+86
+93
+87
+83
+99
+87
+99
+106
+102
+84
+67
+64
+72
+88
+98
+102
+92
+78
+69
+63
+60
+58
+62
+60
+60
+64
+62
+72
+98
+122
+136
+148
+152
+150
+154
+154
+155
+160
+159
+157
+158
+160
+164
+167
+170
+166
+154
+140
+134
+137
+141
+141
+139
+137
+128
+121
+96
+96
+96
+96
+96
+96
+96
+96
+96
+96
+96
+96
+96
+96
+96
+95
+95
+94
+94
+95
+95
+96
+96
+96
+96
+96
+96
+96
+96
+96
+96
+96
+97
+96
+97
+97
+95
+92
+86
+82
+75
+73
+70
+69
+69
+70
+68
+67
+69
+62
+71
+75
+63
+64
+92
+116
+87
+100
+101
+84
+70
+71
+66
+57
+55
+58
+58
+58
+57
+56
+54
+54
+56
+55
+55
+55
+55
+56
+56
+56
+51
+53
+54
+51
+48
+47
+49
+51
+65
+67
+71
+76
+76
+74
+70
+68
+66
+67
+63
+59
+60
+65
+69
+69
+68
+67
+66
+65
+64
+65
+65
+64
+59
+59
+58
+60
+60
+60
+61
+60
+63
+60
+59
+56
+56
+56
+58
+57
+57
+57
+59
+62
+63
+65
+65
+65
+59
+58
+56
+55
+54
+54
+55
+58
+59
+60
+59
+59
+58
+59
+59
+60
+59
+59
+59
+57
+56
+55
+54
+52
+59
+70
+78
+74
+72
+79
+83
+82
+79
+84
+83
+86
+93
+89
+91
+108
+125
+137
+139
+120
+88
+68
+74
+90
+113
+111
+101
+85
+73
+67
+64
+60
+57
+60
+58
+60
+65
+63
+73
+98
+122
+137
+149
+152
+151
+154
+154
+154
+162
+160
+157
+159
+164
+167
+168
+167
+153
+143
+132
+132
+140
+144
+141
+133
+136
+127
+120
+96
+96
+96
+96
+96
+96
+96
+96
+97
+97
+97
+97
+97
+97
+97
+96
+96
+95
+96
+96
+96
+97
+97
+97
+97
+97
+97
+97
+97
+97
+97
+97
+98
+98
+98
+98
+97
+94
+90
+86
+79
+75
+72
+70
+69
+68
+68
+66
+70
+65
+73
+70
+59
+78
+100
+96
+66
+84
+100
+95
+83
+74
+68
+64
+56
+57
+55
+55
+56
+58
+59
+58
+62
+62
+62
+62
+63
+63
+63
+62
+63
+66
+68
+70
+70
+73
+77
+80
+83
+80
+77
+73
+71
+67
+65
+65
+69
+67
+62
+59
+61
+66
+70
+73
+69
+69
+66
+66
+64
+64
+64
+63
+59
+57
+58
+59
+59
+60
+59
+59
+58
+57
+55
+55
+56
+58
+59
+59
+58
+56
+57
+58
+58
+58
+57
+56
+55
+55
+54
+54
+55
+56
+57
+60
+60
+60
+59
+57
+58
+57
+58
+59
+58
+59
+59
+57
+56
+54
+55
+53
+68
+72
+75
+72
+73
+79
+84
+84
+81
+84
+81
+83
+92
+95
+104
+126
+148
+146
+130
+104
+82
+79
+96
+114
+116
+105
+88
+76
+69
+66
+65
+61
+56
+59
+57
+60
+65
+64
+73
+97
+120
+136
+149
+153
+152
+155
+154
+155
+160
+158
+158
+162
+168
+170
+165
+160
+140
+135
+131
+135
+142
+145
+141
+135
+135
+126
+119
+96
+96
+96
+96
+96
+96
+96
+96
+97
+97
+97
+97
+97
+97
+97
+96
+96
+96
+96
+97
+97
+97
+98
+98
+98
+98
+98
+97
+97
+97
+97
+97
+99
+98
+98
+98
+98
+97
+93
+90
+82
+79
+75
+71
+69
+69
+67
+66
+72
+70
+71
+62
+62
+90
+96
+63
+52
+64
+89
+106
+101
+82
+73
+77
+73
+70
+64
+62
+64
+68
+71
+71
+74
+74
+74
+74
+75
+75
+75
+75
+83
+84
+83
+82
+83
+83
+85
+85
+76
+73
+69
+67
+66
+67
+69
+70
+73
+68
+61
+60
+62
+66
+68
+71
+68
+66
+65
+63
+62
+62
+62
+62
+59
+58
+58
+58
+61
+60
+60
+59
+57
+56
+56
+56
+57
+58
+58
+58
+59
+57
+57
+58
+57
+56
+56
+56
+56
+56
+56
+56
+57
+58
+58
+59
+58
+58
+57
+56
+56
+55
+56
+57
+56
+57
+58
+56
+53
+53
+55
+57
+72
+73
+73
+73
+75
+82
+87
+88
+81
+85
+82
+86
+96
+98
+103
+122
+114
+105
+89
+82
+90
+105
+118
+124
+105
+91
+76
+68
+68
+67
+65
+61
+57
+59
+56
+59
+66
+64
+72
+94
+117
+133
+147
+152
+152
+155
+155
+156
+157
+158
+161
+168
+170
+168
+157
+147
+131
+132
+136
+140
+142
+142
+141
+138
+134
+123
+116
+96
+96
+96
+96
+96
+96
+96
+96
+98
+98
+98
+98
+98
+98
+98
+97
+98
+98
+98
+98
+98
+99
+99
+100
+100
+100
+99
+99
+98
+98
+98
+98
+99
+98
+98
+99
+99
+98
+96
+93
+87
+83
+77
+74
+72
+69
+66
+65
+71
+70
+66
+61
+69
+89
+79
+46
+60
+62
+84
+112
+118
+100
+88
+93
+85
+80
+71
+67
+68
+71
+71
+71
+72
+74
+72
+74
+74
+75
+75
+75
+72
+71
+72
+71
+72
+72
+71
+70
+66
+65
+66
+66
+67
+66
+65
+65
+73
+66
+59
+61
+63
+64
+65
+67
+64
+64
+62
+60
+60
+59
+59
+60
+60
+61
+60
+61
+61
+61
+61
+61
+60
+60
+59
+57
+57
+56
+55
+54
+57
+56
+57
+58
+59
+61
+60
+62
+57
+57
+58
+58
+59
+59
+59
+58
+58
+57
+55
+54
+53
+53
+53
+54
+54
+56
+57
+56
+52
+53
+58
+60
+77
+75
+74
+77
+81
+86
+88
+87
+78
+84
+86
+92
+101
+94
+86
+94
+79
+78
+79
+92
+114
+126
+120
+106
+95
+81
+69
+68
+70
+68
+62
+59
+58
+59
+56
+59
+66
+64
+70
+91
+113
+129
+145
+151
+151
+155
+155
+156
+156
+160
+164
+168
+168
+160
+147
+138
+129
+134
+140
+142
+141
+141
+140
+140
+132
+122
+115
+96
+96
+96
+96
+96
+96
+96
+96
+98
+98
+98
+98
+98
+98
+98
+98
+98
+98
+98
+99
+99
+100
+100
+100
+100
+100
+100
+100
+99
+99
+98
+98
+99
+97
+98
+99
+100
+99
+96
+95
+91
+87
+81
+76
+73
+71
+67
+67
+70
+69
+64
+70
+80
+72
+57
+52
+67
+65
+75
+98
+113
+109
+97
+89
+81
+76
+68
+66
+68
+69
+66
+64
+67
+67
+67
+68
+67
+68
+69
+68
+65
+65
+68
+71
+73
+74
+73
+71
+65
+65
+66
+66
+65
+64
+61
+60
+69
+60
+54
+58
+62
+61
+61
+63
+60
+59
+58
+57
+56
+56
+57
+58
+60
+61
+61
+61
+61
+61
+61
+60
+60
+61
+60
+58
+57
+56
+54
+54
+57
+57
+57
+57
+57
+59
+60
+61
+57
+58
+58
+59
+59
+60
+59
+59
+56
+56
+54
+53
+52
+52
+52
+53
+50
+54
+56
+54
+51
+53
+58
+64
+80
+78
+78
+81
+86
+88
+85
+82
+79
+84
+84
+92
+102
+91
+75
+75
+78
+90
+103
+114
+121
+122
+108
+93
+86
+72
+64
+66
+70
+68
+61
+58
+59
+60
+56
+60
+67
+64
+68
+88
+108
+125
+142
+149
+151
+155
+156
+157
+158
+162
+166
+166
+161
+151
+140
+133
+134
+136
+138
+140
+141
+142
+139
+137
+131
+121
+114
+96
+96
+96
+96
+96
+96
+96
+96
+98
+98
+98
+98
+98
+98
+98
+98
+98
+99
+99
+99
+100
+100
+100
+100
+100
+100
+100
+100
+99
+99
+99
+99
+98
+97
+97
+97
+100
+99
+97
+96
+93
+89
+83
+78
+75
+72
+68
+67
+69
+67
+65
+83
+92
+63
+49
+74
+64
+61
+59
+71
+90
+101
+88
+71
+74
+69
+66
+67
+71
+71
+67
+62
+68
+68
+68
+69
+69
+69
+67
+68
+63
+64
+66
+69
+71
+70
+66
+62
+66
+64
+62
+61
+62
+64
+67
+69
+65
+56
+52
+58
+62
+61
+60
+63
+59
+58
+58
+56
+55
+55
+56
+59
+58
+59
+59
+60
+60
+60
+60
+60
+56
+57
+58
+58
+59
+59
+57
+57
+58
+57
+55
+55
+54
+53
+55
+55
+56
+57
+59
+60
+60
+61
+60
+59
+57
+55
+54
+53
+52
+52
+52
+53
+50
+53
+56
+54
+52
+53
+59
+66
+85
+80
+79
+83
+87
+86
+82
+78
+84
+85
+82
+88
+100
+90
+75
+74
+88
+107
+120
+120
+110
+104
+99
+95
+76
+63
+57
+62
+67
+66
+60
+60
+61
+61
+57
+60
+67
+63
+66
+85
+104
+122
+138
+147
+150
+154
+157
+157
+160
+163
+164
+162
+154
+144
+136
+131
+140
+137
+135
+138
+141
+142
+138
+133
+131
+121
+114
+96
+96
+96
+97
+97
+98
+98
+98
+97
+97
+97
+97
+97
+97
+97
+97
+98
+98
+98
+98
+98
+98
+98
+98
+99
+99
+99
+99
+99
+99
+99
+98
+93
+96
+100
+100
+98
+96
+96
+98
+97
+97
+93
+86
+81
+78
+72
+65
+70
+62
+73
+103
+120
+108
+89
+79
+66
+66
+68
+70
+72
+74
+75
+75
+69
+69
+70
+72
+70
+68
+67
+70
+68
+69
+69
+68
+67
+66
+63
+61
+66
+67
+67
+68
+68
+70
+70
+69
+67
+66
+64
+63
+63
+63
+63
+66
+66
+62
+57
+55
+57
+61
+62
+62
+63
+63
+61
+59
+57
+56
+56
+57
+59
+60
+60
+60
+59
+58
+58
+58
+58
+58
+58
+58
+58
+58
+58
+58
+57
+57
+56
+56
+55
+55
+55
+56
+56
+56
+57
+56
+57
+56
+56
+56
+56
+56
+55
+56
+54
+54
+53
+53
+49
+54
+52
+51
+54
+52
+56
+73
+83
+83
+82
+82
+80
+81
+81
+82
+84
+84
+91
+99
+95
+85
+86
+95
+126
+120
+111
+106
+103
+98
+89
+82
+68
+62
+58
+59
+62
+66
+64
+62
+56
+57
+58
+58
+61
+63
+66
+69
+95
+114
+134
+145
+149
+154
+157
+157
+158
+167
+167
+152
+138
+134
+134
+132
+134
+136
+138
+141
+140
+138
+135
+132
+130
+118
+109
+96
+96
+96
+97
+97
+98
+98
+98
+97
+97
+97
+97
+97
+97
+97
+97
+98
+98
+98
+98
+98
+98
+98
+98
+99
+99
+99
+99
+99
+99
+99
+98
+98
+97
+98
+99
+102
+103
+101
+100
+99
+104
+105
+103
+99
+94
+85
+76
+74
+62
+63
+80
+88
+78
+69
+68
+87
+84
+81
+80
+78
+77
+76
+76
+85
+73
+62
+61
+67
+70
+66
+62
+68
+68
+70
+69
+69
+66
+64
+63
+67
+67
+67
+69
+69
+70
+70
+70
+69
+67
+66
+65
+64
+64
+64
+66
+68
+67
+62
+58
+57
+58
+60
+60
+65
+64
+62
+60
+58
+57
+56
+57
+59
+60
+59
+59
+59
+58
+58
+58
+57
+57
+57
+57
+58
+58
+58
+58
+57
+57
+57
+57
+57
+57
+57
+57
+57
+58
+58
+57
+57
+57
+57
+57
+56
+56
+56
+55
+54
+54
+54
+54
+49
+55
+52
+51
+54
+51
+55
+72
+82
+83
+81
+80
+81
+80
+81
+83
+79
+83
+91
+101
+105
+107
+113
+120
+116
+110
+102
+97
+95
+92
+86
+80
+70
+64
+59
+58
+61
+64
+62
+61
+58
+59
+59
+60
+60
+63
+65
+68
+91
+109
+129
+140
+147
+153
+157
+158
+159
+162
+158
+145
+134
+131
+131
+130
+134
+135
+137
+139
+138
+136
+134
+132
+127
+116
+107
+96
+96
+96
+97
+97
+98
+98
+98
+97
+97
+97
+97
+97
+97
+97
+97
+98
+98
+98
+98
+98
+98
+98
+98
+99
+99
+99
+99
+99
+99
+99
+98
+100
+95
+93
+95
+101
+103
+100
+98
+98
+108
+120
+123
+121
+117
+105
+96
+84
+70
+62
+66
+64
+56
+55
+61
+55
+57
+59
+64
+73
+80
+88
+91
+94
+84
+72
+67
+68
+71
+68
+64
+65
+66
+68
+70
+70
+69
+68
+68
+68
+68
+68
+69
+69
+70
+69
+69
+68
+68
+68
+67
+66
+66
+66
+67
+69
+69
+66
+62
+58
+56
+57
+59
+64
+64
+62
+61
+58
+57
+56
+58
+59
+59
+59
+59
+58
+58
+58
+58
+57
+57
+58
+58
+58
+58
+58
+58
+57
+57
+57
+57
+57
+56
+56
+56
+59
+59
+58
+59
+58
+58
+58
+58
+56
+56
+55
+55
+54
+53
+53
+53
+49
+54
+52
+50
+54
+51
+55
+71
+80
+80
+80
+81
+82
+83
+85
+86
+87
+91
+94
+98
+105
+114
+119
+119
+101
+95
+89
+85
+86
+86
+84
+82
+73
+68
+62
+59
+60
+62
+61
+59
+60
+61
+60
+60
+60
+62
+64
+67
+87
+105
+124
+136
+145
+153
+159
+159
+161
+157
+148
+137
+130
+130
+130
+128
+133
+135
+136
+138
+137
+135
+133
+131
+125
+113
+103
+96
+96
+96
+97
+97
+98
+98
+98
+97
+97
+97
+97
+97
+97
+97
+97
+98
+98
+98
+98
+98
+98
+98
+98
+99
+99
+99
+99
+99
+99
+99
+98
+100
+97
+95
+95
+97
+99
+101
+102
+102
+116
+132
+141
+143
+140
+130
+122
+99
+84
+71
+69
+67
+61
+60
+67
+57
+54
+52
+53
+54
+57
+61
+61
+76
+83
+86
+79
+70
+66
+68
+70
+64
+65
+66
+68
+69
+69
+69
+69
+68
+69
+69
+69
+69
+69
+69
+71
+70
+69
+68
+68
+67
+67
+68
+68
+67
+70
+70
+65
+59
+56
+57
+60
+64
+64
+63
+61
+58
+58
+57
+58
+58
+59
+59
+58
+58
+58
+57
+57
+57
+57
+58
+58
+58
+58
+58
+58
+57
+57
+57
+56
+56
+56
+56
+56
+59
+59
+59
+59
+58
+58
+58
+58
+55
+55
+55
+54
+53
+53
+53
+52
+49
+54
+51
+50
+53
+50
+54
+70
+79
+79
+80
+82
+83
+86
+87
+90
+93
+97
+95
+90
+95
+104
+102
+93
+85
+81
+77
+75
+77
+81
+82
+83
+76
+71
+65
+61
+61
+61
+60
+59
+61
+61
+59
+60
+60
+61
+63
+65
+83
+101
+120
+134
+145
+155
+161
+162
+162
+152
+139
+130
+128
+130
+130
+128
+133
+134
+135
+136
+135
+134
+132
+131
+124
+111
+102
+97
+97
+97
+98
+98
+99
+99
+99
+98
+98
+98
+98
+98
+98
+98
+98
+98
+98
+98
+98
+98
+98
+98
+98
+99
+99
+99
+99
+99
+99
+99
+99
+102
+104
+103
+99
+97
+101
+110
+119
+126
+141
+157
+165
+167
+164
+157
+150
+123
+102
+82
+74
+72
+69
+69
+72
+76
+72
+68
+62
+57
+55
+54
+52
+53
+66
+79
+79
+73
+71
+69
+66
+64
+65
+66
+67
+69
+69
+69
+69
+69
+68
+68
+69
+69
+69
+69
+69
+70
+69
+70
+69
+69
+69
+69
+70
+65
+67
+69
+66
+62
+57
+59
+60
+63
+63
+62
+61
+59
+58
+58
+59
+58
+59
+58
+58
+58
+57
+57
+57
+58
+58
+58
+58
+58
+58
+58
+58
+57
+58
+57
+57
+57
+56
+56
+55
+58
+58
+57
+58
+58
+57
+57
+58
+55
+54
+54
+53
+52
+51
+51
+52
+49
+55
+52
+50
+52
+50
+54
+68
+78
+78
+81
+84
+85
+87
+89
+91
+89
+92
+90
+85
+88
+94
+89
+75
+72
+69
+66
+65
+68
+73
+76
+78
+75
+72
+69
+65
+63
+62
+60
+58
+60
+60
+59
+59
+59
+60
+62
+64
+80
+97
+118
+133
+146
+157
+163
+163
+159
+145
+131
+125
+126
+129
+129
+128
+131
+132
+133
+133
+132
+131
+130
+129
+124
+112
+102
+97
+97
+97
+98
+98
+99
+99
+99
+98
+98
+98
+98
+98
+98
+98
+98
+98
+98
+98
+98
+98
+98
+98
+98
+99
+99
+99
+99
+99
+99
+99
+99
+97
+100
+102
+99
+100
+109
+129
+144
+163
+177
+193
+198
+196
+192
+185
+178
+156
+130
+99
+81
+73
+69
+68
+70
+69
+69
+67
+66
+66
+67
+69
+69
+52
+56
+61
+68
+79
+87
+81
+67
+71
+70
+70
+70
+70
+70
+68
+68
+69
+68
+69
+69
+68
+68
+68
+69
+69
+70
+69
+69
+68
+69
+70
+69
+63
+64
+67
+67
+65
+61
+61
+61
+62
+63
+62
+61
+60
+59
+58
+59
+58
+58
+58
+58
+57
+58
+57
+56
+58
+58
+58
+58
+58
+58
+58
+58
+58
+58
+57
+57
+56
+55
+55
+56
+56
+57
+57
+57
+56
+57
+56
+56
+54
+54
+53
+52
+51
+52
+51
+52
+50
+54
+51
+50
+52
+49
+53
+66
+77
+77
+80
+84
+86
+88
+89
+92
+92
+91
+87
+83
+83
+81
+73
+64
+60
+59
+57
+57
+59
+62
+66
+69
+72
+72
+71
+70
+67
+64
+62
+60
+58
+57
+57
+57
+57
+59
+62
+64
+76
+94
+115
+132
+147
+159
+163
+161
+152
+137
+125
+123
+127
+128
+128
+129
+131
+131
+131
+131
+131
+130
+129
+128
+121
+110
+101
+97
+97
+97
+98
+98
+99
+99
+99
+98
+98
+98
+98
+98
+98
+98
+98
+98
+98
+98
+98
+98
+98
+98
+98
+99
+99
+99
+99
+99
+99
+99
+98
+96
+97
+100
+103
+112
+133
+158
+176
+194
+210
+225
+230
+227
+222
+214
+206
+188
+165
+135
+109
+89
+76
+69
+68
+74
+72
+70
+67
+62
+59
+56
+55
+60
+59
+53
+55
+71
+92
+96
+87
+81
+79
+78
+77
+74
+72
+69
+68
+68
+68
+68
+67
+67
+66
+67
+67
+68
+68
+68
+69
+68
+69
+70
+69
+64
+64
+66
+67
+67
+64
+59
+57
+61
+62
+62
+61
+60
+59
+59
+60
+58
+58
+58
+57
+57
+57
+56
+57
+58
+58
+58
+58
+58
+58
+58
+58
+58
+58
+57
+57
+56
+56
+55
+56
+56
+57
+56
+56
+56
+55
+55
+55
+54
+54
+53
+53
+52
+51
+50
+51
+49
+55
+52
+49
+52
+48
+52
+65
+77
+77
+80
+85
+88
+89
+90
+92
+94
+87
+80
+78
+74
+66
+58
+56
+55
+55
+54
+53
+53
+56
+58
+60
+68
+70
+72
+73
+70
+67
+64
+62
+56
+54
+54
+55
+56
+59
+60
+63
+72
+89
+113
+131
+147
+158
+161
+156
+141
+129
+120
+122
+126
+126
+126
+128
+130
+130
+130
+130
+129
+129
+128
+128
+118
+107
+96
+97
+97
+97
+98
+98
+99
+99
+99
+98
+98
+98
+98
+98
+98
+98
+98
+98
+98
+98
+98
+98
+98
+98
+98
+99
+99
+99
+99
+99
+99
+99
+98
+103
+103
+103
+113
+132
+160
+188
+208
+207
+224
+242
+248
+247
+243
+236
+226
+208
+193
+171
+145
+117
+92
+77
+72
+73
+73
+71
+68
+65
+61
+57
+57
+58
+61
+53
+45
+54
+81
+102
+109
+92
+90
+87
+84
+78
+74
+70
+68
+68
+69
+69
+67
+67
+66
+67
+67
+68
+67
+67
+67
+67
+68
+69
+69
+66
+65
+66
+68
+69
+65
+58
+53
+60
+61
+61
+61
+60
+60
+60
+60
+58
+58
+58
+58
+57
+56
+57
+57
+58
+58
+58
+58
+58
+58
+58
+59
+58
+59
+57
+57
+56
+57
+56
+55
+56
+56
+55
+56
+55
+55
+54
+54
+54
+54
+53
+52
+51
+52
+51
+52
+50
+55
+52
+49
+51
+48
+51
+66
+77
+79
+82
+85
+88
+90
+91
+92
+84
+74
+67
+68
+65
+56
+55
+60
+55
+56
+55
+55
+53
+54
+56
+57
+65
+69
+74
+75
+73
+70
+65
+62
+54
+52
+53
+54
+55
+58
+60
+63
+69
+87
+111
+130
+146
+157
+158
+153
+134
+123
+118
+122
+126
+124
+124
+127
+130
+130
+129
+129
+129
+128
+128
+127
+116
+104
+93
+99
+99
+99
+99
+99
+99
+99
+99
+99
+99
+99
+99
+99
+99
+99
+99
+98
+98
+98
+99
+99
+100
+100
+100
+100
+100
+100
+100
+100
+100
+100
+100
+98
+100
+115
+146
+175
+198
+220
+238
+244
+247
+252
+255
+255
+251
+247
+242
+225
+216
+202
+182
+160
+132
+98
+72
+72
+71
+69
+68
+60
+54
+52
+57
+60
+61
+56
+54
+69
+105
+147
+172
+140
+119
+96
+86
+82
+77
+71
+69
+70
+74
+68
+60
+62
+72
+71
+62
+64
+64
+65
+66
+66
+64
+64
+64
+67
+65
+64
+65
+66
+64
+58
+56
+61
+62
+62
+62
+61
+60
+61
+60
+58
+57
+57
+56
+56
+56
+56
+56
+57
+57
+57
+57
+58
+58
+58
+58
+61
+60
+59
+58
+57
+56
+55
+55
+54
+55
+55
+56
+55
+56
+55
+55
+50
+54
+57
+56
+52
+50
+50
+51
+48
+55
+50
+45
+48
+47
+50
+62
+79
+80
+81
+82
+89
+95
+89
+78
+69
+69
+67
+64
+60
+59
+58
+58
+56
+56
+54
+54
+53
+54
+54
+54
+57
+61
+67
+71
+73
+71
+67
+63
+52
+50
+50
+51
+53
+57
+60
+63
+62
+82
+108
+130
+148
+158
+155
+148
+126
+121
+117
+117
+120
+123
+124
+123
+127
+131
+131
+127
+125
+128
+129
+126
+113
+100
+88
+99
+99
+99
+99
+99
+99
+99
+99
+99
+99
+99
+99
+99
+99
+99
+99
+98
+98
+98
+99
+99
+100
+100
+100
+100
+100
+100
+100
+100
+100
+100
+100
+100
+110
+133
+164
+195
+218
+238
+251
+251
+252
+253
+254
+255
+254
+252
+250
+240
+235
+223
+205
+187
+163
+131
+106
+81
+74
+67
+66
+62
+58
+57
+60
+56
+62
+69
+80
+104
+140
+178
+197
+213
+177
+131
+99
+87
+83
+74
+67
+71
+70
+73
+75
+70
+62
+61
+67
+63
+63
+64
+64
+65
+65
+64
+63
+65
+64
+64
+66
+67
+65
+59
+56
+61
+62
+62
+62
+61
+60
+60
+60
+58
+57
+57
+56
+57
+56
+56
+56
+57
+57
+57
+57
+58
+59
+59
+59
+60
+60
+58
+58
+57
+56
+54
+55
+55
+56
+56
+56
+56
+56
+56
+56
+54
+55
+56
+57
+55
+52
+50
+51
+49
+52
+47
+46
+50
+46
+48
+62
+74
+82
+88
+88
+86
+82
+74
+63
+65
+65
+64
+62
+60
+60
+59
+58
+57
+55
+55
+55
+54
+54
+54
+55
+57
+60
+65
+69
+72
+71
+69
+66
+56
+53
+51
+50
+51
+54
+58
+61
+63
+81
+108
+130
+149
+157
+152
+143
+124
+120
+117
+117
+119
+122
+122
+122
+124
+128
+128
+125
+124
+127
+127
+123
+109
+95
+84
+99
+99
+99
+99
+99
+99
+99
+99
+99
+99
+99
+99
+99
+99
+99
+99
+98
+98
+98
+99
+99
+100
+100
+100
+100
+100
+100
+100
+100
+101
+101
+102
+100
+123
+153
+182
+209
+233
+249
+255
+255
+255
+254
+254
+254
+255
+255
+255
+252
+249
+240
+229
+216
+196
+168
+145
+103
+88
+71
+67
+68
+68
+65
+62
+58
+74
+95
+118
+146
+178
+206
+220
+228
+240
+224
+167
+101
+67
+72
+86
+88
+79
+70
+69
+70
+70
+68
+67
+61
+62
+63
+63
+65
+64
+65
+64
+64
+64
+66
+69
+68
+66
+60
+57
+60
+61
+62
+62
+61
+60
+61
+61
+57
+57
+58
+57
+57
+56
+56
+56
+58
+58
+59
+59
+59
+59
+59
+60
+59
+59
+57
+57
+56
+56
+54
+55
+56
+56
+56
+56
+56
+57
+56
+56
+57
+56
+56
+56
+56
+55
+52
+49
+50
+49
+45
+48
+52
+45
+48
+68
+80
+86
+89
+84
+74
+67
+60
+54
+59
+59
+60
+61
+60
+60
+59
+58
+57
+57
+56
+55
+55
+55
+55
+56
+57
+59
+63
+67
+69
+71
+71
+70
+62
+58
+52
+50
+48
+51
+55
+58
+62
+81
+109
+132
+151
+156
+147
+135
+120
+117
+114
+114
+116
+118
+119
+119
+120
+123
+125
+123
+123
+125
+124
+119
+101
+87
+76
+99
+99
+99
+99
+99
+99
+99
+99
+99
+99
+99
+99
+99
+99
+99
+99
+99
+98
+98
+99
+99
+100
+100
+100
+100
+100
+100
+101
+101
+101
+101
+103
+107
+135
+167
+190
+213
+237
+251
+253
+255
+255
+255
+254
+254
+253
+254
+255
+253
+253
+247
+242
+233
+218
+193
+171
+135
+109
+81
+72
+74
+73
+68
+64
+70
+96
+129
+154
+175
+198
+218
+230
+238
+249
+246
+215
+178
+141
+100
+68
+83
+85
+82
+72
+72
+77
+74
+63
+62
+62
+63
+64
+64
+64
+65
+65
+62
+64
+67
+69
+69
+65
+61
+59
+60
+61
+62
+62
+61
+60
+61
+61
+57
+57
+58
+57
+57
+56
+56
+56
+59
+59
+60
+59
+59
+59
+59
+60
+57
+57
+57
+57
+56
+55
+54
+54
+55
+55
+55
+56
+56
+56
+56
+56
+59
+55
+53
+55
+56
+56
+52
+49
+53
+50
+46
+50
+51
+42
+50
+78
+92
+87
+78
+67
+60
+58
+59
+60
+56
+58
+59
+60
+61
+59
+57
+57
+57
+56
+56
+57
+56
+57
+57
+57
+57
+58
+61
+63
+66
+69
+72
+73
+67
+63
+56
+51
+48
+49
+52
+56
+60
+82
+112
+139
+154
+156
+141
+124
+115
+114
+113
+113
+114
+115
+116
+116
+117
+121
+123
+122
+124
+125
+122
+114
+93
+78
+66
+100
+100
+100
+100
+100
+100
+100
+100
+100
+100
+100
+100
+100
+100
+100
+99
+99
+98
+98
+99
+99
+100
+100
+100
+100
+100
+100
+101
+101
+102
+102
+103
+113
+140
+169
+191
+213
+237
+252
+254
+255
+255
+255
+255
+253
+252
+249
+248
+255
+255
+253
+249
+244
+232
+210
+190
+163
+130
+93
+76
+75
+74
+71
+67
+95
+125
+162
+184
+195
+208
+225
+238
+246
+243
+237
+236
+242
+224
+165
+105
+76
+82
+90
+92
+83
+69
+64
+67
+64
+64
+63
+64
+66
+66
+66
+66
+63
+65
+69
+69
+67
+64
+62
+61
+60
+60
+61
+61
+61
+60
+61
+61
+58
+58
+58
+57
+57
+56
+56
+56
+60
+60
+60
+59
+59
+58
+58
+59
+55
+56
+55
+55
+54
+54
+54
+54
+55
+56
+56
+56
+56
+56
+56
+56
+57
+54
+52
+53
+55
+55
+52
+49
+50
+51
+48
+49
+49
+42
+54
+85
+89
+78
+63
+55
+54
+57
+59
+60
+57
+59
+59
+60
+60
+58
+56
+55
+57
+57
+56
+57
+57
+58
+57
+57
+57
+57
+58
+59
+62
+67
+69
+71
+69
+66
+59
+54
+50
+49
+51
+53
+58
+83
+117
+143
+155
+149
+130
+112
+111
+110
+110
+110
+110
+110
+112
+112
+116
+120
+122
+122
+124
+124
+119
+108
+82
+67
+56
+100
+100
+100
+100
+100
+100
+100
+100
+100
+100
+100
+100
+100
+100
+100
+99
+99
+98
+98
+99
+99
+100
+100
+100
+100
+100
+101
+101
+102
+103
+103
+103
+110
+130
+154
+181
+206
+230
+247
+254
+254
+255
+255
+255
+254
+250
+246
+244
+253
+253
+252
+249
+246
+236
+215
+196
+176
+142
+103
+80
+75
+77
+79
+82
+123
+155
+190
+207
+212
+220
+235
+247
+240
+251
+255
+251
+243
+237
+226
+210
+143
+100
+75
+85
+88
+71
+63
+74
+67
+67
+66
+66
+66
+66
+66
+65
+65
+67
+68
+68
+65
+61
+59
+60
+59
+60
+61
+61
+61
+60
+61
+61
+58
+58
+58
+57
+57
+56
+56
+56
+60
+59
+59
+58
+58
+57
+56
+57
+55
+55
+55
+56
+55
+55
+54
+55
+55
+55
+55
+55
+55
+55
+55
+55
+55
+54
+53
+53
+54
+55
+54
+53
+50
+54
+50
+48
+52
+53
+61
+83
+71
+62
+53
+53
+56
+58
+55
+54
+57
+59
+58
+57
+57
+56
+55
+54
+56
+57
+56
+57
+57
+57
+57
+57
+57
+57
+57
+58
+59
+62
+65
+66
+68
+67
+63
+59
+54
+52
+51
+52
+55
+84
+120
+141
+146
+137
+119
+104
+107
+107
+109
+109
+107
+107
+108
+110
+115
+119
+122
+123
+124
+124
+115
+102
+73
+59
+47
+100
+100
+100
+100
+100
+100
+100
+100
+100
+100
+100
+100
+100
+100
+100
+99
+99
+98
+98
+99
+99
+100
+100
+100
+100
+100
+101
+101
+102
+103
+104
+104
+105
+116
+140
+172
+200
+222
+240
+252
+252
+254
+255
+255
+255
+253
+249
+247
+246
+247
+247
+246
+245
+236
+216
+198
+177
+147
+110
+87
+81
+86
+98
+109
+154
+179
+207
+223
+228
+235
+241
+248
+253
+251
+248
+247
+249
+252
+253
+249
+224
+168
+111
+87
+85
+82
+77
+74
+71
+69
+69
+68
+68
+67
+66
+65
+67
+69
+69
+67
+61
+59
+59
+60
+60
+61
+60
+61
+60
+60
+61
+61
+58
+58
+58
+57
+57
+56
+56
+56
+59
+59
+58
+57
+56
+55
+55
+55
+55
+56
+56
+56
+56
+56
+56
+56
+55
+55
+55
+55
+56
+56
+56
+55
+54
+55
+56
+56
+55
+56
+59
+61
+56
+60
+54
+53
+67
+76
+73
+77
+57
+54
+53
+57
+59
+55
+52
+53
+56
+56
+55
+54
+54
+54
+54
+55
+55
+57
+56
+57
+57
+57
+56
+56
+57
+56
+56
+55
+56
+57
+59
+60
+66
+67
+66
+65
+60
+56
+52
+51
+57
+85
+117
+132
+132
+121
+110
+100
+103
+105
+107
+107
+105
+105
+106
+108
+114
+118
+120
+122
+123
+121
+110
+95
+66
+52
+40
+100
+100
+100
+100
+100
+100
+100
+100
+100
+100
+100
+100
+100
+100
+100
+99
+99
+99
+98
+98
+98
+99
+100
+100
+100
+101
+102
+103
+103
+104
+104
+106
+111
+116
+138
+174
+204
+223
+238
+252
+253
+253
+254
+255
+255
+255
+255
+254
+248
+250
+249
+250
+249
+242
+224
+206
+178
+151
+117
+95
+90
+99
+119
+134
+173
+193
+215
+230
+238
+244
+245
+244
+247
+249
+252
+255
+253
+247
+249
+252
+242
+242
+201
+129
+85
+85
+85
+69
+74
+71
+70
+69
+67
+66
+66
+65
+70
+71
+71
+67
+62
+58
+59
+62
+61
+62
+62
+61
+60
+60
+60
+60
+58
+58
+58
+57
+57
+56
+56
+56
+58
+58
+57
+56
+55
+54
+54
+54
+56
+57
+56
+56
+57
+57
+57
+56
+55
+55
+55
+55
+55
+55
+55
+55
+53
+56
+59
+58
+57
+58
+62
+67
+64
+68
+60
+61
+86
+100
+87
+76
+58
+56
+57
+60
+58
+53
+53
+60
+54
+53
+52
+51
+51
+53
+54
+55
+54
+55
+55
+56
+55
+55
+55
+55
+57
+56
+56
+55
+55
+55
+56
+56
+63
+66
+69
+68
+65
+60
+54
+52
+59
+86
+114
+124
+118
+109
+102
+97
+100
+104
+107
+107
+104
+103
+105
+107
+113
+116
+119
+120
+122
+118
+106
+91
+62
+47
+37
+101
+101
+101
+101
+101
+101
+101
+101
+101
+101
+101
+101
+101
+101
+101
+101
+100
+100
+100
+100
+99
+101
+101
+102
+96
+101
+107
+108
+101
+101
+113
+130
+142
+157
+178
+199
+220
+237
+246
+250
+254
+254
+255
+254
+253
+252
+253
+254
+250
+250
+249
+250
+252
+247
+229
+212
+185
+152
+116
+100
+107
+125
+144
+155
+185
+204
+227
+239
+243
+247
+249
+248
+254
+254
+254
+255
+255
+255
+255
+255
+253
+253
+251
+229
+166
+96
+68
+75
+79
+71
+67
+68
+72
+73
+72
+71
+71
+72
+73
+71
+69
+66
+66
+67
+67
+67
+65
+63
+62
+60
+59
+59
+57
+58
+57
+56
+55
+55
+55
+54
+55
+55
+56
+56
+55
+54
+53
+51
+55
+56
+56
+55
+55
+54
+54
+54
+53
+54
+55
+56
+55
+54
+52
+51
+51
+53
+56
+57
+58
+59
+61
+65
+66
+73
+72
+95
+107
+120
+127
+74
+57
+58
+58
+57
+57
+57
+56
+56
+55
+55
+54
+54
+53
+53
+52
+53
+52
+53
+52
+53
+52
+52
+52
+52
+53
+52
+52
+51
+51
+52
+52
+54
+59
+61
+64
+66
+68
+66
+64
+62
+63
+81
+101
+107
+98
+88
+84
+87
+99
+101
+102
+102
+101
+101
+103
+106
+112
+116
+118
+119
+119
+113
+98
+79
+48
+43
+41
+101
+101
+101
+101
+101
+101
+101
+101
+101
+101
+101
+101
+101
+101
+101
+101
+101
+101
+99
+100
+99
+100
+101
+102
+100
+104
+106
+107
+103
+108
+127
+147
+174
+193
+213
+230
+242
+251
+254
+254
+253
+254
+255
+255
+252
+251
+252
+253
+250
+250
+250
+250
+251
+245
+226
+208
+184
+150
+113
+97
+107
+129
+152
+167
+193
+211
+231
+243
+247
+251
+252
+251
+254
+254
+254
+254
+254
+254
+254
+255
+255
+251
+249
+248
+233
+190
+128
+80
+78
+76
+75
+74
+68
+61
+63
+70
+70
+74
+76
+73
+70
+67
+68
+71
+68
+67
+66
+64
+62
+60
+60
+60
+58
+58
+58
+58
+57
+56
+55
+55
+54
+55
+56
+56
+56
+54
+53
+52
+55
+56
+56
+55
+55
+55
+54
+54
+51
+51
+53
+54
+56
+56
+56
+57
+54
+55
+57
+59
+59
+62
+64
+68
+72
+80
+82
+102
+117
+133
+131
+76
+57
+57
+57
+57
+56
+56
+56
+55
+55
+55
+55
+54
+54
+53
+53
+53
+52
+52
+52
+52
+52
+52
+52
+52
+53
+52
+51
+51
+51
+51
+52
+54
+56
+58
+61
+64
+66
+66
+66
+66
+67
+80
+93
+96
+87
+79
+80
+85
+98
+100
+101
+101
+99
+99
+100
+101
+110
+114
+118
+119
+116
+109
+92
+73
+49
+44
+42
+101
+101
+101
+101
+101
+101
+101
+101
+101
+101
+101
+101
+101
+101
+101
+101
+101
+101
+99
+100
+99
+100
+101
+102
+104
+105
+106
+107
+107
+119
+146
+172
+197
+219
+240
+251
+254
+255
+254
+253
+253
+254
+255
+254
+251
+248
+247
+247
+247
+249
+248
+248
+247
+238
+219
+202
+177
+150
+121
+112
+123
+144
+167
+181
+207
+222
+239
+248
+251
+254
+254
+253
+254
+254
+254
+254
+254
+254
+254
+255
+250
+255
+254
+248
+250
+245
+204
+157
+75
+81
+75
+64
+71
+89
+84
+63
+68
+72
+75
+73
+66
+63
+65
+70
+66
+66
+66
+65
+64
+62
+62
+62
+60
+60
+59
+59
+58
+57
+57
+57
+57
+57
+57
+57
+57
+56
+54
+53
+55
+56
+55
+56
+54
+55
+55
+54
+53
+53
+53
+54
+55
+56
+58
+58
+59
+59
+58
+60
+63
+67
+68
+69
+73
+86
+89
+106
+127
+142
+127
+70
+56
+56
+56
+56
+55
+55
+55
+54
+55
+55
+55
+54
+54
+53
+53
+53
+52
+52
+52
+52
+52
+52
+52
+52
+52
+52
+51
+50
+50
+51
+52
+53
+53
+54
+57
+59
+62
+64
+66
+68
+69
+76
+82
+81
+73
+70
+76
+84
+95
+98
+100
+99
+97
+96
+95
+96
+107
+112
+117
+118
+113
+103
+84
+65
+49
+44
+42
+101
+101
+101
+101
+101
+101
+101
+101
+101
+101
+101
+101
+101
+101
+101
+101
+101
+101
+99
+100
+99
+100
+101
+102
+105
+106
+107
+109
+113
+130
+161
+190
+202
+228
+249
+255
+252
+252
+251
+250
+254
+255
+254
+252
+246
+241
+239
+237
+241
+244
+244
+244
+241
+234
+216
+199
+177
+161
+147
+147
+158
+173
+187
+197
+220
+233
+246
+251
+253
+255
+255
+253
+254
+254
+254
+254
+254
+254
+254
+254
+251
+254
+254
+240
+237
+249
+250
+238
+191
+127
+79
+80
+89
+78
+68
+69
+65
+70
+73
+71
+64
+60
+62
+66
+64
+66
+65
+65
+64
+64
+64
+63
+61
+61
+61
+60
+61
+60
+60
+59
+59
+59
+59
+58
+57
+56
+56
+55
+56
+55
+54
+55
+55
+54
+55
+55
+58
+57
+55
+55
+55
+55
+57
+58
+63
+62
+61
+62
+67
+69
+71
+71
+74
+86
+92
+107
+130
+142
+113
+61
+55
+56
+55
+55
+55
+54
+54
+54
+55
+55
+55
+54
+54
+53
+53
+53
+51
+51
+51
+51
+51
+51
+51
+51
+51
+51
+50
+50
+50
+50
+51
+52
+52
+52
+54
+55
+58
+61
+64
+65
+67
+71
+73
+69
+63
+64
+70
+78
+88
+93
+96
+98
+96
+95
+94
+94
+105
+112
+117
+117
+110
+99
+77
+58
+47
+42
+40
+101
+101
+101
+101
+101
+101
+101
+101
+101
+101
+101
+101
+101
+101
+101
+101
+101
+101
+99
+100
+99
+100
+101
+102
+103
+105
+109
+112
+117
+135
+167
+196
+212
+239
+255
+255
+251
+253
+253
+252
+255
+255
+253
+248
+240
+234
+230
+229
+235
+239
+240
+240
+238
+232
+216
+202
+189
+181
+174
+180
+190
+200
+211
+217
+232
+242
+250
+252
+253
+255
+255
+252
+254
+254
+254
+254
+254
+254
+254
+254
+251
+247
+246
+247
+255
+255
+255
+252
+254
+220
+155
+98
+75
+76
+80
+74
+65
+68
+71
+69
+63
+58
+59
+63
+62
+63
+65
+65
+66
+66
+67
+66
+63
+62
+62
+61
+61
+61
+62
+61
+62
+61
+60
+59
+59
+58
+58
+58
+55
+54
+54
+54
+54
+55
+55
+55
+59
+58
+57
+57
+57
+57
+58
+60
+66
+65
+67
+68
+71
+73
+73
+73
+76
+86
+98
+109
+131
+135
+96
+58
+56
+56
+55
+55
+55
+54
+54
+54
+55
+55
+55
+54
+54
+53
+53
+53
+51
+51
+51
+51
+51
+51
+51
+51
+50
+50
+49
+49
+49
+49
+50
+51
+54
+53
+52
+52
+53
+56
+59
+61
+61
+64
+65
+65
+61
+61
+65
+70
+79
+84
+89
+92
+93
+94
+94
+96
+103
+112
+118
+117
+107
+93
+71
+52
+45
+41
+39
+101
+101
+101
+101
+101
+101
+101
+101
+101
+101
+101
+101
+101
+101
+101
+101
+101
+101
+99
+100
+99
+100
+101
+102
+103
+106
+110
+114
+118
+133
+164
+191
+222
+246
+255
+255
+251
+254
+254
+252
+255
+255
+252
+245
+237
+231
+227
+227
+233
+236
+237
+236
+235
+230
+218
+206
+206
+198
+195
+201
+210
+219
+230
+239
+242
+249
+253
+253
+253
+255
+254
+252
+254
+254
+254
+254
+254
+254
+254
+253
+252
+246
+249
+255
+255
+255
+255
+254
+242
+255
+236
+166
+106
+90
+87
+76
+70
+70
+70
+70
+66
+61
+59
+59
+61
+62
+63
+64
+65
+66
+68
+68
+63
+63
+63
+63
+63
+62
+63
+63
+64
+63
+62
+60
+60
+60
+60
+60
+56
+54
+54
+54
+54
+55
+56
+56
+55
+56
+57
+58
+60
+63
+64
+66
+66
+71
+76
+77
+77
+75
+75
+77
+81
+88
+104
+115
+131
+123
+79
+61
+57
+56
+56
+56
+55
+55
+55
+54
+55
+55
+55
+54
+54
+53
+53
+53
+50
+50
+50
+50
+50
+50
+50
+50
+50
+49
+48
+48
+48
+48
+49
+51
+53
+54
+52
+52
+52
+53
+55
+57
+56
+59
+63
+64
+63
+63
+62
+64
+70
+75
+79
+84
+87
+91
+93
+96
+101
+111
+116
+114
+103
+88
+66
+50
+45
+41
+39
+101
+101
+101
+101
+101
+101
+101
+101
+101
+101
+101
+101
+101
+101
+101
+101
+100
+100
+99
+100
+99
+100
+102
+102
+105
+107
+109
+110
+114
+127
+157
+183
+218
+242
+255
+253
+249
+255
+254
+248
+255
+253
+249
+243
+235
+231
+230
+232
+233
+237
+236
+233
+232
+229
+219
+208
+211
+209
+212
+221
+228
+233
+241
+249
+249
+254
+255
+253
+253
+255
+255
+252
+254
+254
+254
+254
+254
+254
+254
+253
+250
+251
+254
+255
+255
+251
+255
+255
+255
+245
+250
+250
+204
+119
+81
+93
+80
+76
+75
+75
+73
+69
+63
+59
+61
+62
+63
+64
+65
+67
+69
+69
+63
+63
+63
+63
+63
+63
+63
+63
+66
+65
+63
+61
+61
+62
+62
+61
+56
+55
+54
+54
+55
+55
+56
+56
+56
+57
+59
+62
+64
+65
+65
+67
+69
+78
+86
+87
+83
+79
+79
+82
+86
+89
+108
+118
+129
+109
+62
+66
+59
+57
+57
+57
+56
+56
+56
+55
+55
+55
+55
+54
+54
+53
+53
+53
+50
+50
+50
+50
+50
+50
+50
+50
+49
+49
+48
+47
+47
+48
+49
+50
+52
+53
+52
+52
+53
+53
+54
+55
+54
+58
+61
+65
+66
+66
+64
+63
+63
+67
+71
+76
+79
+84
+88
+92
+98
+107
+113
+109
+98
+82
+62
+47
+47
+44
+42
+101
+101
+101
+101
+101
+101
+101
+101
+101
+101
+101
+101
+101
+101
+101
+101
+100
+100
+99
+100
+99
+100
+102
+102
+108
+108
+108
+107
+108
+123
+152
+177
+210
+235
+252
+251
+250
+255
+254
+248
+255
+253
+248
+242
+235
+233
+234
+237
+236
+237
+237
+232
+230
+227
+218
+208
+206
+210
+223
+237
+244
+245
+245
+249
+252
+255
+255
+254
+254
+255
+255
+253
+254
+254
+254
+254
+254
+254
+254
+254
+249
+249
+250
+251
+255
+255
+255
+253
+252
+255
+253
+242
+239
+225
+174
+114
+89
+84
+81
+82
+81
+77
+68
+61
+62
+63
+62
+64
+65
+67
+68
+69
+63
+63
+62
+63
+63
+63
+63
+63
+66
+66
+64
+62
+61
+62
+62
+62
+56
+55
+56
+56
+56
+56
+57
+58
+59
+62
+64
+66
+67
+65
+64
+66
+71
+83
+94
+94
+88
+83
+83
+87
+86
+87
+109
+119
+125
+97
+50
+68
+59
+58
+58
+57
+57
+57
+56
+56
+55
+55
+55
+54
+54
+53
+53
+53
+50
+50
+50
+50
+50
+50
+50
+50
+49
+48
+48
+47
+47
+48
+48
+49
+50
+51
+52
+53
+53
+54
+55
+55
+54
+56
+60
+65
+68
+68
+66
+65
+59
+63
+66
+70
+73
+78
+84
+88
+96
+104
+110
+105
+94
+78
+59
+44
+48
+46
+44
+101
+101
+101
+101
+101
+101
+101
+101
+102
+102
+102
+102
+102
+102
+102
+102
+101
+101
+100
+101
+100
+101
+103
+103
+110
+109
+110
+114
+114
+121
+145
+170
+196
+217
+239
+251
+253
+255
+254
+253
+255
+254
+250
+248
+246
+244
+241
+239
+246
+242
+238
+236
+230
+220
+213
+212
+211
+217
+227
+234
+241
+246
+248
+252
+253
+254
+254
+254
+254
+254
+254
+254
+254
+254
+254
+254
+254
+254
+254
+255
+254
+255
+255
+255
+255
+255
+254
+253
+255
+253
+249
+248
+249
+248
+241
+232
+132
+100
+83
+87
+93
+83
+75
+76
+63
+63
+63
+60
+59
+60
+63
+66
+61
+61
+61
+62
+64
+64
+63
+63
+65
+64
+64
+64
+63
+63
+62
+62
+57
+56
+58
+59
+59
+60
+60
+61
+63
+62
+71
+71
+61
+57
+56
+49
+81
+78
+73
+75
+89
+101
+97
+85
+88
+96
+115
+128
+108
+73
+57
+62
+60
+59
+58
+58
+58
+57
+57
+57
+57
+57
+57
+56
+55
+55
+55
+54
+54
+54
+53
+53
+52
+52
+52
+52
+49
+49
+49
+49
+49
+49
+48
+48
+53
+52
+52
+51
+52
+52
+53
+53
+50
+52
+55
+61
+65
+69
+71
+74
+66
+64
+62
+61
+62
+69
+78
+85
+91
+98
+104
+100
+87
+70
+57
+51
+48
+47
+46
+101
+101
+101
+101
+101
+101
+101
+101
+102
+102
+102
+102
+102
+102
+102
+102
+101
+101
+100
+101
+100
+101
+103
+104
+110
+108
+110
+114
+116
+124
+148
+174
+199
+219
+240
+252
+254
+255
+254
+253
+255
+254
+251
+249
+247
+245
+242
+237
+239
+235
+231
+230
+225
+217
+212
+212
+216
+222
+230
+238
+243
+246
+249
+251
+254
+254
+254
+254
+254
+254
+254
+254
+254
+254
+254
+254
+254
+254
+254
+255
+255
+255
+255
+254
+252
+250
+250
+248
+252
+250
+248
+249
+252
+252
+248
+241
+234
+178
+117
+92
+92
+92
+87
+83
+70
+68
+68
+68
+67
+66
+65
+63
+64
+62
+62
+64
+63
+61
+62
+65
+63
+63
+63
+63
+62
+62
+61
+62
+60
+61
+62
+63
+63
+65
+65
+66
+71
+65
+71
+73
+61
+55
+56
+54
+76
+75
+71
+68
+77
+91
+97
+97
+89
+103
+119
+121
+96
+68
+59
+67
+62
+60
+60
+60
+59
+59
+59
+59
+59
+59
+59
+58
+58
+57
+57
+57
+55
+55
+55
+54
+54
+54
+53
+53
+51
+51
+50
+50
+49
+49
+48
+48
+49
+49
+48
+48
+48
+49
+50
+51
+53
+52
+53
+55
+59
+65
+70
+74
+70
+69
+66
+63
+63
+66
+72
+76
+88
+95
+100
+98
+86
+71
+59
+53
+51
+49
+48
+101
+101
+101
+101
+101
+101
+101
+101
+102
+102
+102
+102
+102
+102
+102
+102
+101
+101
+99
+100
+100
+101
+103
+104
+108
+109
+111
+116
+117
+125
+152
+178
+202
+221
+242
+252
+253
+255
+254
+253
+255
+253
+251
+250
+247
+244
+239
+235
+231
+225
+221
+222
+219
+215
+213
+217
+225
+230
+237
+243
+246
+248
+249
+252
+254
+254
+254
+254
+254
+254
+254
+254
+254
+254
+254
+254
+254
+254
+254
+255
+255
+255
+254
+253
+250
+248
+246
+244
+249
+247
+247
+250
+255
+255
+253
+248
+240
+246
+235
+191
+131
+90
+83
+93
+93
+82
+70
+63
+62
+66
+70
+71
+63
+60
+60
+66
+65
+63
+65
+72
+62
+62
+62
+63
+61
+62
+61
+62
+63
+65
+65
+67
+67
+67
+67
+68
+75
+66
+73
+83
+71
+59
+61
+65
+69
+72
+69
+64
+66
+78
+96
+106
+97
+113
+122
+109
+79
+60
+61
+70
+62
+62
+62
+62
+61
+61
+61
+60
+62
+62
+61
+61
+61
+60
+60
+60
+58
+57
+57
+57
+56
+56
+56
+55
+53
+53
+52
+51
+50
+49
+48
+48
+46
+46
+46
+46
+46
+47
+48
+49
+54
+52
+49
+49
+52
+59
+66
+72
+75
+75
+73
+69
+65
+63
+65
+67
+81
+88
+94
+94
+84
+72
+62
+56
+53
+53
+52
+100
+100
+101
+101
+101
+101
+102
+102
+102
+102
+102
+102
+102
+102
+102
+102
+101
+101
+99
+100
+100
+102
+103
+105
+109
+109
+111
+115
+116
+124
+152
+179
+202
+220
+240
+251
+253
+255
+255
+254
+254
+253
+251
+250
+247
+243
+237
+232
+224
+218
+214
+215
+215
+215
+219
+224
+235
+239
+244
+248
+249
+250
+250
+252
+254
+254
+254
+254
+254
+254
+254
+254
+254
+254
+254
+254
+254
+254
+254
+255
+255
+255
+254
+253
+251
+248
+246
+244
+248
+247
+248
+252
+255
+255
+255
+252
+255
+248
+238
+239
+239
+210
+144
+82
+76
+75
+74
+78
+80
+75
+64
+55
+77
+68
+66
+68
+67
+59
+56
+61
+63
+63
+63
+63
+62
+62
+62
+63
+64
+66
+67
+67
+67
+68
+69
+68
+73
+66
+84
+105
+94
+75
+71
+75
+68
+72
+70
+66
+65
+73
+89
+101
+109
+120
+118
+95
+67
+59
+64
+67
+63
+63
+63
+62
+62
+61
+61
+61
+63
+62
+62
+62
+62
+62
+62
+62
+60
+60
+60
+59
+59
+59
+58
+58
+56
+56
+54
+53
+52
+50
+49
+49
+48
+48
+47
+47
+48
+49
+50
+50
+53
+51
+48
+48
+50
+55
+61
+66
+75
+77
+77
+74
+69
+64
+63
+62
+73
+79
+85
+86
+80
+71
+62
+58
+55
+54
+53
+100
+100
+100
+101
+101
+102
+102
+102
+102
+102
+102
+102
+102
+102
+102
+102
+101
+100
+99
+100
+100
+102
+103
+105
+109
+110
+113
+115
+114
+121
+149
+178
+200
+219
+239
+249
+252
+255
+255
+255
+255
+255
+255
+254
+250
+245
+238
+232
+220
+213
+208
+209
+212
+217
+224
+233
+242
+246
+250
+252
+253
+253
+253
+253
+254
+254
+254
+254
+254
+254
+254
+254
+254
+254
+254
+254
+254
+254
+254
+255
+255
+255
+255
+255
+253
+251
+249
+249
+248
+249
+250
+254
+255
+255
+255
+253
+241
+251
+253
+251
+248
+244
+227
+207
+183
+156
+118
+87
+73
+73
+76
+79
+71
+66
+66
+69
+73
+74
+75
+75
+65
+66
+66
+66
+66
+66
+67
+67
+70
+71
+71
+71
+71
+72
+71
+71
+72
+72
+100
+126
+114
+88
+76
+77
+69
+70
+72
+71
+70
+71
+78
+85
+119
+122
+110
+85
+66
+65
+65
+62
+62
+63
+63
+62
+62
+61
+61
+61
+62
+62
+62
+62
+62
+62
+62
+62
+62
+62
+62
+61
+61
+61
+60
+60
+59
+58
+57
+56
+55
+53
+52
+52
+50
+50
+49
+48
+48
+49
+50
+50
+49
+49
+49
+49
+50
+53
+55
+59
+71
+76
+79
+79
+75
+70
+67
+65
+69
+73
+79
+80
+77
+70
+63
+57
+55
+53
+52
+99
+99
+100
+101
+101
+102
+103
+103
+102
+102
+102
+102
+102
+102
+102
+102
+100
+100
+99
+100
+100
+102
+103
+105
+109
+110
+113
+115
+112
+120
+148
+178
+203
+221
+240
+250
+252
+255
+255
+255
+255
+255
+255
+255
+253
+247
+240
+232
+218
+209
+203
+203
+207
+215
+226
+238
+245
+249
+252
+254
+254
+254
+254
+255
+255
+254
+254
+254
+254
+254
+254
+254
+254
+254
+254
+254
+254
+254
+254
+254
+254
+255
+255
+255
+255
+255
+254
+253
+251
+252
+253
+254
+255
+254
+252
+252
+246
+250
+248
+244
+246
+254
+254
+254
+248
+239
+227
+209
+187
+161
+134
+117
+93
+94
+85
+68
+58
+60
+62
+61
+69
+69
+69
+70
+71
+71
+71
+72
+75
+77
+77
+76
+77
+77
+76
+76
+76
+81
+107
+128
+113
+89
+76
+71
+70
+70
+72
+74
+74
+71
+73
+77
+120
+115
+100
+82
+73
+74
+69
+61
+63
+63
+63
+63
+62
+62
+62
+62
+61
+61
+62
+62
+62
+62
+63
+63
+63
+63
+63
+63
+62
+62
+62
+61
+61
+61
+60
+59
+58
+57
+56
+56
+52
+51
+50
+49
+48
+48
+48
+48
+48
+49
+49
+50
+51
+51
+51
+52
+63
+70
+76
+79
+78
+75
+72
+71
+68
+71
+75
+77
+74
+69
+63
+57
+54
+53
+52
+99
+99
+100
+101
+101
+102
+103
+103
+102
+102
+102
+102
+102
+102
+102
+102
+100
+100
+99
+100
+100
+102
+103
+105
+108
+109
+114
+115
+113
+121
+151
+183
+210
+227
+245
+253
+253
+255
+255
+254
+255
+255
+255
+255
+251
+244
+235
+227
+213
+204
+196
+196
+201
+210
+224
+237
+246
+249
+252
+254
+254
+254
+255
+255
+255
+254
+254
+254
+254
+254
+254
+254
+254
+254
+254
+254
+254
+254
+254
+254
+251
+252
+253
+255
+255
+255
+255
+255
+254
+255
+255
+255
+253
+251
+249
+248
+241
+245
+250
+253
+252
+251
+248
+245
+255
+255
+255
+255
+252
+246
+239
+235
+228
+230
+202
+143
+94
+79
+76
+72
+74
+74
+74
+75
+75
+76
+76
+77
+78
+79
+79
+80
+79
+78
+78
+78
+79
+84
+102
+111
+94
+79
+75
+70
+73
+73
+76
+78
+77
+73
+80
+88
+109
+102
+92
+86
+84
+81
+74
+67
+64
+65
+65
+65
+64
+64
+64
+63
+62
+62
+62
+63
+63
+64
+64
+64
+64
+64
+64
+63
+63
+62
+62
+62
+63
+63
+62
+62
+61
+61
+60
+60
+57
+55
+54
+52
+50
+49
+47
+47
+48
+48
+49
+50
+50
+50
+49
+49
+57
+64
+72
+77
+79
+78
+76
+76
+71
+73
+76
+77
+75
+71
+64
+59
+55
+53
+52
+100
+100
+101
+102
+102
+102
+103
+103
+102
+102
+102
+102
+102
+102
+102
+101
+101
+101
+100
+101
+100
+102
+103
+105
+107
+109
+114
+116
+113
+123
+155
+187
+216
+232
+249
+255
+255
+255
+255
+254
+250
+251
+251
+250
+246
+238
+227
+219
+209
+199
+190
+190
+195
+206
+221
+234
+246
+249
+253
+254
+253
+254
+255
+255
+255
+254
+254
+254
+254
+254
+254
+254
+254
+254
+254
+254
+254
+254
+254
+253
+250
+251
+252
+254
+255
+255
+255
+255
+254
+255
+255
+255
+252
+249
+247
+246
+248
+247
+249
+252
+252
+253
+255
+255
+250
+250
+249
+248
+246
+248
+250
+253
+241
+251
+220
+142
+80
+66
+72
+72
+77
+77
+78
+78
+79
+79
+80
+81
+79
+79
+79
+79
+78
+78
+77
+77
+78
+82
+92
+89
+73
+70
+76
+74
+78
+79
+81
+83
+78
+77
+90
+106
+101
+94
+89
+90
+91
+85
+78
+73
+66
+66
+66
+65
+65
+65
+64
+64
+63
+63
+63
+64
+64
+66
+66
+66
+64
+64
+64
+63
+63
+62
+62
+62
+64
+64
+64
+64
+63
+63
+63
+63
+63
+61
+59
+56
+54
+52
+51
+51
+50
+50
+50
+50
+50
+50
+52
+54
+54
+61
+70
+76
+79
+77
+77
+77
+74
+75
+77
+78
+78
+72
+66
+60
+56
+54
+53
+102
+103
+103
+104
+106
+106
+106
+107
+103
+103
+101
+101
+100
+101
+101
+102
+101
+103
+103
+104
+102
+102
+100
+100
+103
+108
+111
+111
+112
+130
+168
+199
+219
+233
+247
+252
+253
+255
+255
+254
+249
+251
+248
+240
+236
+233
+222
+209
+208
+191
+179
+178
+184
+195
+210
+223
+243
+248
+251
+254
+254
+254
+253
+254
+254
+254
+254
+254
+254
+254
+254
+254
+255
+255
+255
+254
+253
+252
+252
+252
+254
+253
+253
+253
+255
+255
+255
+254
+255
+252
+252
+255
+254
+249
+247
+250
+251
+252
+253
+255
+255
+255
+255
+254
+255
+255
+255
+254
+254
+254
+254
+254
+245
+252
+225
+137
+79
+78
+76
+74
+78
+78
+78
+78
+79
+79
+78
+79
+77
+78
+78
+80
+79
+79
+77
+76
+80
+79
+74
+70
+72
+75
+77
+78
+88
+87
+81
+77
+86
+99
+99
+90
+89
+89
+90
+90
+88
+85
+81
+78
+70
+68
+65
+63
+62
+62
+63
+65
+63
+64
+64
+65
+65
+66
+66
+66
+66
+65
+64
+64
+63
+65
+64
+66
+65
+66
+64
+66
+66
+68
+68
+69
+66
+65
+65
+63
+61
+59
+56
+54
+52
+53
+55
+57
+59
+64
+71
+77
+86
+88
+86
+84
+82
+79
+78
+79
+76
+81
+86
+87
+87
+84
+74
+63
+55
+51
+48
+103
+104
+104
+105
+107
+108
+108
+108
+104
+104
+102
+102
+101
+102
+101
+103
+102
+103
+103
+104
+103
+102
+102
+102
+105
+108
+112
+115
+119
+137
+171
+200
+218
+233
+247
+254
+255
+255
+254
+253
+250
+249
+243
+235
+230
+225
+214
+201
+191
+179
+172
+174
+183
+195
+208
+221
+243
+247
+251
+254
+253
+253
+254
+254
+254
+254
+254
+254
+254
+254
+254
+254
+255
+255
+253
+253
+253
+252
+252
+253
+254
+254
+253
+253
+255
+255
+254
+253
+255
+255
+252
+247
+236
+228
+231
+241
+252
+254
+255
+255
+255
+255
+255
+254
+255
+255
+254
+254
+253
+254
+253
+254
+246
+252
+224
+137
+77
+79
+75
+74
+79
+79
+79
+79
+79
+79
+80
+80
+77
+78
+78
+81
+79
+80
+77
+77
+80
+78
+74
+73
+73
+77
+80
+82
+86
+88
+93
+100
+101
+94
+88
+86
+85
+86
+85
+86
+85
+84
+82
+81
+76
+74
+70
+67
+64
+63
+64
+65
+62
+64
+64
+65
+66
+66
+67
+67
+66
+65
+65
+64
+64
+65
+65
+66
+66
+66
+66
+66
+67
+68
+69
+70
+71
+72
+70
+71
+68
+66
+63
+61
+62
+62
+61
+62
+67
+77
+89
+97
+112
+110
+105
+97
+89
+82
+76
+75
+79
+86
+93
+95
+95
+92
+83
+70
+53
+50
+47
+103
+104
+104
+106
+107
+109
+108
+109
+106
+106
+104
+104
+102
+103
+102
+104
+102
+104
+103
+103
+103
+102
+102
+102
+105
+106
+109
+116
+124
+143
+172
+196
+214
+230
+246
+254
+255
+255
+251
+249
+245
+242
+233
+223
+217
+211
+201
+190
+180
+174
+175
+181
+193
+205
+216
+227
+243
+247
+251
+253
+252
+253
+254
+255
+254
+254
+254
+254
+254
+254
+254
+254
+255
+254
+253
+253
+252
+252
+252
+253
+254
+253
+252
+253
+254
+255
+254
+253
+255
+255
+253
+242
+223
+213
+221
+237
+252
+254
+255
+255
+255
+255
+255
+254
+255
+255
+254
+254
+253
+254
+253
+254
+247
+252
+223
+134
+74
+77
+75
+75
+78
+79
+79
+80
+80
+79
+80
+79
+77
+78
+78
+80
+79
+80
+78
+78
+81
+78
+76
+76
+77
+80
+85
+89
+91
+98
+116
+130
+120
+95
+81
+81
+80
+81
+79
+80
+80
+81
+83
+84
+83
+80
+76
+72
+68
+66
+65
+65
+62
+64
+64
+65
+66
+66
+67
+67
+66
+66
+65
+65
+65
+65
+66
+66
+66
+66
+66
+66
+67
+68
+70
+70
+74
+75
+74
+75
+73
+71
+69
+67
+69
+67
+64
+66
+73
+86
+103
+114
+127
+125
+116
+104
+90
+79
+71
+69
+78
+87
+96
+101
+102
+98
+88
+75
+57
+54
+51
+103
+104
+104
+106
+108
+110
+109
+110
+108
+108
+106
+105
+104
+104
+103
+105
+103
+104
+103
+103
+102
+102
+102
+103
+103
+102
+104
+113
+125
+143
+166
+185
+209
+226
+244
+253
+254
+252
+246
+242
+235
+229
+218
+209
+203
+197
+188
+180
+184
+184
+191
+200
+213
+224
+233
+241
+244
+247
+251
+253
+252
+252
+254
+255
+254
+254
+254
+254
+254
+254
+254
+254
+254
+254
+253
+252
+252
+252
+251
+252
+253
+252
+251
+252
+254
+255
+254
+253
+253
+255
+253
+243
+225
+217
+226
+242
+252
+254
+255
+255
+255
+255
+255
+254
+255
+255
+254
+254
+253
+254
+252
+253
+250
+254
+223
+133
+74
+77
+77
+77
+78
+79
+80
+80
+80
+79
+79
+78
+77
+78
+77
+79
+78
+80
+79
+79
+83
+80
+79
+82
+83
+85
+91
+99
+114
+128
+148
+156
+143
+117
+95
+87
+79
+78
+75
+74
+75
+78
+81
+83
+84
+82
+79
+75
+71
+69
+67
+67
+62
+64
+64
+65
+66
+66
+67
+67
+67
+66
+65
+65
+65
+65
+66
+67
+67
+66
+66
+67
+67
+69
+70
+71
+71
+72
+72
+73
+72
+71
+69
+68
+68
+67
+64
+66
+73
+88
+105
+117
+122
+121
+113
+100
+85
+73
+65
+63
+72
+82
+94
+101
+103
+99
+88
+73
+59
+55
+52
+103
+104
+104
+106
+108
+110
+110
+111
+110
+109
+107
+106
+104
+104
+104
+105
+103
+104
+102
+102
+101
+101
+102
+103
+104
+102
+103
+113
+125
+141
+160
+175
+204
+223
+241
+251
+251
+249
+242
+237
+228
+219
+208
+201
+196
+190
+183
+178
+190
+195
+206
+216
+227
+238
+245
+249
+244
+247
+250
+252
+251
+252
+254
+255
+254
+254
+254
+254
+254
+254
+254
+254
+254
+254
+252
+252
+252
+251
+251
+252
+252
+251
+251
+252
+254
+255
+254
+253
+253
+253
+252
+247
+236
+229
+234
+245
+252
+254
+255
+255
+255
+255
+255
+254
+255
+255
+253
+254
+254
+254
+252
+252
+252
+255
+224
+134
+75
+79
+79
+80
+78
+79
+81
+81
+81
+79
+78
+77
+77
+78
+77
+79
+78
+80
+79
+81
+85
+82
+83
+88
+88
+89
+97
+107
+142
+162
+174
+169
+158
+145
+120
+95
+80
+78
+73
+71
+71
+74
+78
+80
+82
+80
+78
+75
+73
+71
+69
+69
+62
+64
+64
+65
+66
+66
+67
+67
+67
+67
+66
+65
+65
+66
+67
+67
+67
+67
+67
+67
+68
+69
+70
+71
+69
+70
+70
+71
+70
+69
+68
+66
+65
+65
+63
+66
+73
+86
+101
+111
+116
+115
+108
+96
+80
+68
+61
+61
+67
+78
+92
+99
+102
+98
+86
+71
+53
+50
+47
+45
+45
+46
+47
+46
+46
+47
+47
+47
+47
+45
+45
+45
+45
+45
+45
+47
+46
+46
+45
+45
+46
+46
+47
+45
+45
+45
+45
+45
+45
+45
+45
+43
+43
+43
+42
+42
+41
+41
+41
+41
+41
+41
+41
+41
+41
+41
+41
+36
+37
+37
+38
+39
+40
+41
+41
+44
+44
+45
+46
+46
+47
+48
+46
+48
+48
+50
+52
+52
+53
+54
+54
+53
+53
+51
+50
+51
+51
+52
+53
+49
+50
+52
+53
+54
+56
+57
+55
+58
+57
+58
+59
+62
+63
+64
+64
+76
+76
+75
+73
+73
+68
+66
+65
+65
+64
+63
+63
+64
+62
+60
+55
+47
+46
+46
+45
+45
+45
+45
+45
+44
+44
+45
+44
+42
+41
+42
+44
+45
+47
+47
+46
+44
+43
+43
+43
+43
+43
+42
+42
+42
+43
+44
+47
+54
+53
+50
+49
+51
+51
+52
+52
+48
+50
+56
+59
+57
+50
+42
+38
+50
+52
+52
+50
+49
+48
+45
+45
+47
+47
+47
+46
+45
+44
+44
+44
+45
+45
+45
+45
+45
+45
+45
+45
+45
+44
+43
+42
+43
+49
+57
+60
+67
+72
+77
+79
+91
+110
+131
+144
+163
+174
+186
+189
+173
+145
+118
+104
+103
+94
+94
+98
+111
+130
+144
+152
+159
+154
+147
+129
+108
+85
+69
+69
+91
+98
+98
+45
+45
+46
+46
+45
+46
+47
+47
+47
+47
+45
+45
+45
+45
+45
+45
+46
+46
+45
+45
+45
+45
+46
+46
+45
+45
+45
+45
+45
+45
+45
+45
+43
+43
+42
+42
+42
+41
+41
+41
+42
+42
+42
+42
+42
+42
+42
+42
+37
+38
+38
+39
+40
+41
+42
+42
+44
+44
+45
+45
+46
+47
+48
+46
+47
+47
+49
+51
+51
+52
+53
+53
+52
+52
+49
+49
+49
+50
+51
+52
+48
+49
+51
+52
+54
+52
+53
+51
+52
+52
+52
+55
+58
+60
+61
+64
+73
+73
+73
+72
+71
+68
+67
+67
+65
+64
+63
+63
+64
+62
+60
+54
+47
+46
+45
+45
+45
+44
+45
+45
+44
+43
+45
+43
+42
+41
+42
+44
+45
+47
+46
+46
+44
+43
+43
+43
+43
+42
+42
+42
+42
+43
+44
+47
+53
+53
+51
+49
+51
+52
+52
+53
+50
+54
+56
+59
+58
+51
+42
+41
+51
+53
+52
+51
+50
+49
+46
+46
+47
+47
+47
+46
+45
+44
+44
+44
+45
+45
+45
+45
+45
+45
+45
+45
+45
+45
+43
+42
+43
+48
+55
+58
+61
+65
+73
+76
+86
+106
+125
+142
+162
+174
+185
+187
+169
+141
+117
+105
+101
+95
+95
+95
+102
+116
+136
+149
+151
+148
+143
+131
+111
+89
+76
+74
+90
+97
+97
+44
+44
+45
+46
+45
+45
+46
+46
+46
+46
+46
+46
+44
+44
+44
+44
+46
+46
+45
+45
+45
+45
+46
+47
+46
+46
+46
+46
+46
+46
+46
+46
+44
+43
+43
+43
+42
+42
+42
+42
+43
+43
+43
+43
+43
+43
+43
+42
+39
+39
+40
+41
+41
+42
+42
+43
+44
+44
+44
+45
+46
+47
+47
+46
+46
+46
+48
+50
+52
+53
+51
+51
+49
+49
+49
+49
+47
+48
+49
+50
+49
+49
+50
+50
+51
+50
+50
+48
+45
+43
+46
+50
+54
+58
+61
+62
+69
+70
+71
+70
+70
+69
+68
+68
+64
+63
+64
+64
+64
+61
+59
+53
+46
+45
+45
+44
+45
+45
+44
+44
+45
+45
+44
+43
+44
+42
+42
+43
+45
+46
+46
+46
+43
+43
+43
+43
+44
+44
+43
+43
+44
+44
+43
+46
+54
+53
+51
+50
+52
+53
+53
+53
+56
+59
+61
+61
+59
+52
+44
+44
+52
+55
+54
+52
+49
+48
+47
+47
+47
+47
+47
+46
+45
+44
+44
+44
+45
+45
+45
+45
+45
+45
+45
+45
+47
+46
+45
+43
+43
+47
+52
+54
+55
+57
+64
+68
+77
+96
+118
+136
+158
+173
+185
+183
+164
+137
+118
+107
+101
+99
+99
+94
+92
+101
+121
+136
+134
+136
+133
+124
+108
+88
+77
+76
+91
+96
+96
+43
+44
+44
+45
+44
+45
+45
+45
+45
+45
+45
+45
+43
+43
+43
+43
+45
+45
+44
+44
+44
+44
+45
+45
+46
+46
+46
+46
+46
+46
+46
+46
+43
+43
+43
+42
+42
+42
+41
+41
+44
+44
+44
+44
+44
+44
+44
+44
+43
+41
+41
+42
+42
+43
+43
+43
+43
+43
+44
+45
+46
+46
+47
+45
+45
+45
+46
+48
+50
+50
+49
+49
+49
+47
+46
+47
+47
+46
+48
+48
+50
+52
+52
+51
+50
+49
+47
+45
+41
+39
+42
+45
+51
+56
+60
+62
+67
+67
+67
+67
+68
+67
+67
+65
+64
+63
+64
+64
+64
+61
+57
+51
+45
+44
+44
+44
+44
+44
+44
+43
+45
+44
+43
+42
+43
+42
+41
+42
+44
+46
+46
+45
+43
+43
+42
+42
+43
+43
+42
+42
+43
+44
+45
+45
+54
+53
+50
+52
+54
+56
+55
+55
+60
+63
+64
+62
+58
+52
+46
+45
+53
+54
+55
+52
+50
+49
+48
+48
+47
+47
+47
+46
+45
+44
+44
+45
+46
+46
+46
+46
+46
+46
+46
+46
+48
+48
+47
+45
+44
+45
+49
+50
+49
+51
+55
+59
+68
+85
+108
+130
+152
+171
+181
+181
+162
+139
+121
+112
+104
+103
+102
+94
+86
+90
+102
+113
+120
+119
+118
+111
+97
+84
+76
+76
+89
+93
+94
+45
+45
+43
+44
+45
+46
+44
+45
+44
+44
+43
+43
+43
+43
+41
+41
+44
+44
+43
+43
+43
+43
+44
+44
+45
+45
+45
+45
+45
+45
+45
+45
+43
+43
+42
+42
+42
+41
+41
+41
+44
+44
+44
+44
+44
+44
+44
+44
+44
+44
+44
+44
+44
+45
+45
+45
+45
+45
+46
+46
+47
+48
+49
+47
+45
+44
+46
+47
+47
+48
+48
+46
+46
+46
+46
+45
+46
+47
+48
+49
+54
+53
+53
+53
+51
+49
+47
+44
+41
+41
+42
+44
+50
+56
+61
+63
+66
+67
+66
+66
+66
+65
+64
+62
+63
+60
+62
+62
+62
+58
+53
+48
+45
+44
+44
+44
+45
+45
+45
+45
+46
+45
+44
+43
+44
+43
+42
+42
+44
+46
+45
+45
+45
+44
+44
+44
+44
+44
+44
+44
+44
+45
+46
+46
+52
+52
+49
+51
+55
+57
+56
+55
+59
+63
+67
+64
+59
+50
+45
+43
+51
+53
+53
+51
+50
+49
+48
+47
+47
+47
+47
+46
+46
+45
+45
+45
+46
+46
+46
+46
+46
+46
+46
+46
+48
+48
+48
+46
+44
+44
+47
+46
+46
+46
+49
+51
+59
+75
+101
+128
+151
+170
+183
+180
+166
+148
+131
+119
+109
+104
+101
+96
+89
+88
+87
+85
+99
+98
+97
+92
+84
+77
+77
+80
+86
+88
+90
+44
+44
+43
+43
+44
+45
+44
+44
+43
+43
+42
+42
+42
+42
+40
+42
+43
+43
+42
+41
+41
+42
+43
+43
+43
+43
+43
+43
+43
+43
+43
+43
+42
+42
+42
+42
+41
+41
+41
+40
+43
+43
+43
+43
+43
+43
+43
+43
+44
+44
+44
+44
+44
+44
+44
+44
+44
+45
+45
+46
+47
+48
+48
+46
+44
+43
+44
+45
+46
+46
+46
+46
+47
+45
+45
+46
+47
+46
+48
+49
+54
+54
+53
+54
+51
+50
+48
+45
+43
+41
+42
+44
+49
+53
+58
+61
+64
+65
+65
+64
+65
+62
+63
+60
+60
+59
+61
+61
+61
+56
+50
+44
+44
+44
+43
+43
+45
+44
+44
+44
+45
+44
+44
+44
+43
+42
+41
+42
+43
+45
+45
+45
+44
+44
+44
+43
+44
+43
+43
+43
+45
+44
+47
+46
+52
+50
+50
+53
+57
+58
+58
+59
+57
+64
+71
+69
+61
+52
+47
+45
+51
+53
+52
+51
+49
+48
+47
+47
+47
+47
+47
+46
+46
+45
+45
+45
+47
+47
+47
+47
+47
+47
+47
+47
+47
+48
+48
+47
+45
+44
+46
+44
+45
+41
+43
+48
+54
+70
+100
+133
+159
+178
+188
+187
+175
+161
+143
+126
+114
+104
+99
+96
+94
+88
+79
+70
+74
+74
+74
+73
+70
+69
+73
+79
+83
+83
+85
+43
+43
+44
+45
+44
+44
+45
+45
+42
+42
+42
+42
+41
+41
+41
+41
+42
+44
+43
+43
+43
+43
+44
+44
+43
+43
+43
+43
+43
+43
+43
+43
+44
+44
+44
+43
+43
+43
+42
+42
+45
+45
+45
+45
+45
+45
+45
+43
+44
+44
+44
+43
+43
+43
+43
+43
+44
+44
+45
+46
+47
+47
+48
+46
+43
+44
+45
+46
+47
+45
+45
+44
+46
+46
+47
+45
+47
+48
+50
+51
+54
+52
+53
+52
+50
+50
+46
+44
+44
+42
+41
+42
+46
+50
+55
+56
+60
+62
+62
+62
+64
+63
+64
+62
+58
+58
+60
+60
+59
+54
+47
+41
+45
+45
+45
+44
+46
+46
+45
+45
+46
+46
+45
+45
+44
+42
+42
+41
+43
+45
+45
+44
+46
+46
+45
+45
+45
+45
+44
+44
+47
+46
+48
+47
+50
+49
+49
+54
+58
+60
+61
+61
+65
+74
+82
+81
+73
+62
+55
+54
+51
+50
+49
+48
+47
+46
+47
+46
+46
+46
+47
+46
+46
+45
+45
+45
+47
+47
+47
+47
+47
+47
+47
+47
+46
+47
+48
+47
+45
+44
+45
+44
+43
+41
+41
+45
+52
+70
+106
+141
+171
+190
+199
+198
+189
+175
+154
+130
+113
+103
+99
+95
+93
+87
+78
+72
+69
+71
+72
+73
+72
+71
+75
+77
+79
+78
+79
+43
+43
+44
+44
+45
+44
+45
+45
+42
+42
+42
+42
+41
+41
+41
+42
+44
+43
+43
+42
+42
+43
+43
+44
+42
+42
+42
+42
+42
+42
+42
+42
+44
+44
+44
+43
+43
+42
+42
+42
+44
+44
+44
+44
+44
+44
+44
+44
+44
+43
+43
+43
+43
+43
+43
+43
+44
+44
+45
+46
+46
+47
+48
+48
+44
+43
+44
+45
+46
+46
+46
+44
+47
+46
+47
+47
+49
+49
+50
+51
+52
+52
+53
+52
+50
+50
+48
+45
+46
+42
+41
+40
+44
+47
+52
+53
+58
+59
+62
+63
+64
+65
+65
+64
+59
+59
+59
+59
+58
+52
+45
+40
+45
+45
+44
+46
+46
+45
+45
+47
+46
+46
+46
+45
+43
+42
+41
+43
+45
+45
+45
+44
+46
+45
+45
+45
+45
+46
+46
+46
+47
+47
+49
+49
+50
+49
+52
+54
+59
+62
+62
+65
+76
+84
+92
+93
+84
+73
+65
+63
+50
+50
+49
+48
+46
+45
+46
+46
+46
+46
+47
+46
+46
+45
+45
+45
+47
+47
+47
+47
+47
+47
+47
+47
+45
+46
+48
+48
+46
+45
+45
+44
+44
+41
+42
+48
+54
+72
+110
+148
+182
+198
+207
+204
+198
+182
+159
+132
+110
+100
+97
+94
+89
+86
+80
+75
+82
+85
+87
+88
+85
+84
+83
+83
+76
+74
+74
+47
+47
+47
+45
+45
+45
+43
+43
+44
+44
+42
+41
+41
+41
+40
+40
+42
+42
+42
+42
+42
+42
+42
+43
+42
+42
+42
+42
+42
+42
+42
+42
+42
+42
+42
+43
+43
+44
+44
+45
+44
+44
+44
+44
+44
+44
+44
+44
+41
+42
+43
+44
+44
+44
+44
+44
+44
+44
+44
+44
+45
+46
+47
+47
+45
+44
+45
+46
+47
+46
+46
+46
+46
+44
+45
+46
+47
+48
+49
+50
+52
+53
+54
+53
+51
+49
+48
+43
+46
+45
+43
+44
+47
+48
+49
+48
+51
+52
+56
+58
+61
+62
+63
+64
+63
+65
+65
+62
+56
+49
+46
+44
+46
+45
+44
+46
+45
+45
+46
+47
+44
+44
+45
+45
+44
+43
+42
+42
+43
+43
+45
+44
+44
+44
+45
+45
+47
+47
+47
+48
+51
+50
+53
+52
+53
+52
+57
+62
+64
+62
+65
+71
+82
+95
+102
+104
+100
+94
+83
+70
+66
+61
+53
+47
+44
+43
+44
+43
+46
+46
+45
+45
+45
+44
+43
+43
+46
+46
+46
+46
+46
+46
+46
+46
+47
+47
+47
+47
+47
+47
+47
+47
+48
+51
+50
+47
+54
+79
+121
+159
+187
+207
+217
+211
+198
+183
+167
+148
+116
+100
+93
+88
+85
+86
+92
+98
+110
+120
+124
+117
+111
+104
+95
+80
+70
+68
+71
+47
+47
+47
+47
+45
+45
+45
+43
+44
+43
+41
+41
+40
+40
+40
+40
+41
+41
+41
+41
+42
+42
+42
+42
+42
+42
+42
+42
+42
+42
+42
+42
+42
+42
+42
+43
+43
+43
+44
+44
+44
+44
+44
+44
+44
+44
+44
+44
+43
+41
+42
+43
+44
+44
+43
+43
+43
+43
+43
+43
+44
+45
+46
+47
+46
+46
+47
+46
+47
+48
+48
+45
+46
+46
+46
+45
+46
+48
+50
+51
+53
+53
+54
+54
+52
+50
+48
+47
+48
+46
+45
+45
+46
+49
+49
+49
+51
+51
+53
+56
+58
+60
+61
+61
+64
+64
+65
+62
+56
+50
+45
+45
+46
+45
+46
+45
+45
+45
+46
+46
+44
+44
+45
+44
+43
+43
+42
+44
+43
+43
+44
+44
+44
+43
+45
+45
+47
+47
+49
+49
+50
+54
+55
+54
+57
+55
+60
+64
+66
+65
+70
+78
+92
+102
+111
+111
+109
+101
+90
+77
+65
+61
+55
+52
+49
+46
+44
+41
+45
+45
+44
+43
+44
+43
+43
+43
+46
+46
+46
+46
+46
+46
+46
+46
+47
+47
+47
+47
+47
+47
+47
+49
+52
+55
+51
+51
+58
+84
+124
+158
+185
+202
+212
+207
+194
+184
+173
+158
+128
+113
+106
+106
+104
+109
+118
+127
+127
+135
+137
+129
+121
+113
+101
+84
+67
+62
+67
+47
+47
+47
+47
+47
+45
+45
+45
+43
+43
+43
+42
+40
+39
+39
+39
+41
+43
+43
+43
+42
+42
+42
+42
+44
+44
+44
+44
+44
+44
+44
+44
+43
+43
+44
+44
+44
+45
+45
+45
+45
+45
+45
+46
+46
+46
+46
+44
+43
+43
+44
+45
+45
+45
+45
+44
+44
+44
+44
+44
+45
+46
+47
+46
+46
+46
+47
+48
+49
+47
+47
+47
+48
+46
+46
+46
+48
+49
+51
+52
+53
+54
+55
+54
+54
+53
+50
+46
+48
+46
+44
+47
+47
+48
+48
+49
+51
+52
+51
+51
+54
+56
+58
+58
+64
+64
+66
+63
+58
+51
+46
+46
+47
+46
+46
+45
+45
+45
+47
+48
+45
+45
+46
+46
+45
+44
+43
+43
+42
+42
+44
+43
+45
+45
+45
+45
+48
+48
+50
+51
+52
+56
+58
+57
+61
+59
+62
+68
+70
+71
+77
+86
+103
+113
+122
+123
+119
+111
+98
+85
+68
+64
+59
+56
+52
+46
+43
+38
+41
+41
+42
+42
+42
+42
+45
+45
+45
+45
+45
+45
+45
+45
+45
+45
+46
+46
+46
+46
+46
+46
+46
+50
+57
+57
+52
+51
+62
+89
+124
+154
+177
+191
+199
+195
+187
+182
+178
+171
+154
+143
+135
+130
+126
+126
+133
+141
+148
+152
+148
+138
+131
+123
+105
+84
+62
+58
+62
+48
+48
+48
+48
+48
+48
+46
+46
+43
+43
+42
+42
+39
+39
+39
+41
+43
+42
+42
+42
+42
+41
+41
+41
+43
+43
+43
+43
+43
+43
+43
+43
+43
+43
+43
+43
+43
+44
+44
+44
+44
+45
+45
+45
+45
+46
+46
+46
+42
+43
+44
+44
+44
+44
+43
+43
+43
+43
+43
+43
+44
+45
+46
+47
+47
+48
+49
+49
+49
+49
+49
+47
+47
+47
+47
+45
+46
+48
+49
+50
+51
+52
+53
+54
+54
+52
+51
+48
+50
+48
+47
+47
+48
+47
+49
+49
+52
+52
+50
+49
+50
+53
+55
+58
+62
+64
+65
+62
+58
+53
+48
+46
+45
+45
+45
+44
+44
+44
+46
+46
+44
+44
+46
+45
+44
+43
+45
+44
+41
+41
+43
+43
+44
+44
+45
+44
+47
+49
+49
+53
+55
+58
+60
+60
+64
+60
+62
+67
+73
+76
+86
+94
+111
+121
+130
+131
+128
+120
+106
+93
+74
+70
+64
+58
+54
+48
+44
+40
+41
+40
+41
+40
+41
+41
+44
+45
+44
+44
+44
+44
+44
+44
+44
+44
+45
+45
+45
+45
+45
+45
+45
+49
+58
+56
+49
+49
+63
+88
+122
+147
+163
+176
+182
+178
+175
+178
+182
+179
+171
+163
+158
+152
+143
+137
+139
+144
+154
+155
+151
+141
+132
+124
+105
+79
+59
+56
+57
+50
+50
+50
+50
+48
+48
+46
+46
+45
+45
+43
+42
+42
+41
+41
+41
+43
+43
+43
+42
+42
+41
+41
+41
+43
+43
+43
+43
+43
+43
+43
+43
+43
+43
+43
+43
+43
+42
+42
+42
+43
+44
+44
+45
+45
+46
+46
+46
+42
+43
+43
+43
+43
+43
+42
+41
+42
+42
+42
+42
+43
+44
+46
+47
+49
+48
+49
+50
+50
+49
+48
+48
+48
+46
+46
+46
+47
+48
+47
+48
+51
+52
+53
+54
+54
+52
+52
+48
+50
+48
+48
+47
+49
+49
+50
+50
+54
+53
+53
+51
+51
+53
+54
+56
+59
+61
+62
+61
+56
+53
+48
+47
+45
+45
+46
+45
+44
+44
+47
+47
+46
+45
+47
+46
+45
+44
+44
+44
+43
+42
+42
+42
+43
+43
+44
+46
+48
+49
+52
+54
+57
+61
+64
+63
+65
+61
+63
+69
+76
+81
+93
+104
+119
+128
+135
+135
+131
+125
+113
+101
+82
+76
+67
+58
+54
+50
+47
+45
+41
+40
+40
+39
+40
+42
+44
+45
+44
+44
+44
+44
+44
+44
+44
+44
+45
+45
+45
+45
+45
+45
+45
+49
+58
+53
+43
+44
+56
+81
+112
+135
+150
+160
+165
+163
+162
+169
+177
+179
+168
+167
+168
+165
+156
+146
+144
+148
+150
+149
+143
+133
+129
+120
+100
+73
+57
+56
+57
+51
+51
+51
+51
+49
+49
+47
+47
+46
+46
+44
+43
+43
+43
+42
+42
+44
+44
+44
+43
+42
+41
+41
+41
+42
+42
+42
+42
+42
+42
+42
+42
+43
+43
+42
+42
+42
+41
+41
+41
+43
+43
+43
+44
+45
+45
+46
+46
+42
+42
+43
+43
+42
+42
+41
+40
+43
+43
+42
+43
+44
+45
+46
+47
+50
+50
+49
+50
+50
+49
+48
+47
+48
+47
+45
+45
+46
+47
+46
+46
+49
+50
+51
+52
+52
+52
+52
+47
+49
+47
+47
+45
+46
+47
+48
+49
+53
+53
+53
+52
+52
+52
+52
+52
+53
+56
+58
+59
+55
+52
+49
+48
+46
+43
+44
+44
+43
+43
+46
+46
+45
+45
+46
+45
+44
+44
+43
+43
+42
+42
+41
+41
+43
+42
+45
+45
+49
+51
+54
+56
+60
+63
+66
+67
+65
+62
+67
+74
+82
+90
+101
+114
+125
+131
+138
+136
+132
+126
+117
+106
+92
+83
+74
+64
+58
+53
+50
+49
+44
+42
+41
+39
+41
+42
+43
+44
+43
+43
+43
+43
+43
+43
+43
+43
+44
+44
+44
+44
+44
+44
+44
+46
+55
+49
+40
+38
+49
+71
+100
+121
+138
+148
+154
+152
+151
+158
+165
+173
+173
+176
+177
+172
+159
+145
+141
+144
+142
+143
+138
+130
+123
+114
+93
+69
+54
+53
+53
+51
+51
+51
+51
+49
+49
+49
+49
+47
+47
+47
+47
+44
+44
+43
+43
+46
+45
+45
+44
+43
+42
+42
+41
+42
+42
+42
+42
+42
+42
+42
+42
+42
+42
+42
+41
+41
+41
+40
+40
+42
+42
+43
+44
+45
+45
+46
+46
+42
+42
+42
+42
+42
+41
+40
+39
+43
+43
+43
+43
+44
+45
+47
+47
+50
+51
+51
+52
+50
+49
+49
+48
+47
+47
+47
+46
+45
+45
+46
+47
+48
+48
+51
+52
+53
+51
+50
+48
+46
+43
+43
+43
+44
+45
+46
+46
+52
+53
+51
+51
+50
+49
+50
+48
+49
+52
+55
+57
+54
+53
+50
+50
+45
+45
+44
+43
+42
+42
+45
+45
+46
+46
+45
+45
+46
+45
+44
+44
+41
+41
+41
+40
+42
+42
+44
+44
+49
+52
+55
+57
+62
+65
+70
+70
+65
+64
+70
+79
+88
+98
+110
+121
+129
+134
+139
+136
+132
+128
+119
+110
+97
+91
+81
+73
+67
+59
+54
+52
+47
+44
+43
+39
+41
+41
+42
+44
+42
+42
+42
+42
+42
+42
+42
+42
+43
+43
+43
+43
+43
+43
+43
+45
+50
+45
+37
+33
+38
+59
+87
+109
+125
+134
+140
+138
+137
+142
+148
+157
+171
+174
+173
+165
+151
+135
+132
+134
+133
+136
+134
+123
+116
+107
+87
+66
+51
+48
+48
+49
+49
+49
+49
+47
+47
+47
+47
+46
+46
+46
+45
+45
+43
+44
+44
+45
+44
+44
+43
+44
+43
+42
+42
+42
+42
+42
+42
+42
+42
+44
+42
+44
+42
+44
+41
+41
+40
+40
+39
+41
+42
+43
+41
+44
+43
+44
+44
+42
+42
+42
+42
+41
+40
+39
+39
+44
+42
+42
+42
+43
+44
+45
+46
+49
+49
+50
+50
+49
+48
+47
+47
+47
+47
+46
+46
+44
+45
+46
+46
+45
+46
+49
+49
+50
+50
+49
+47
+43
+44
+41
+42
+43
+45
+46
+47
+50
+51
+50
+50
+51
+49
+49
+47
+47
+50
+54
+55
+55
+52
+50
+49
+47
+46
+45
+44
+44
+44
+46
+47
+46
+46
+47
+46
+45
+45
+44
+44
+43
+43
+42
+42
+43
+42
+44
+46
+50
+53
+54
+58
+61
+66
+69
+71
+67
+68
+74
+84
+96
+105
+117
+128
+133
+137
+139
+135
+132
+127
+121
+111
+98
+93
+85
+79
+72
+65
+56
+51
+46
+46
+44
+41
+41
+41
+42
+43
+44
+42
+44
+42
+44
+44
+44
+44
+45
+45
+45
+45
+45
+45
+45
+47
+47
+43
+37
+33
+37
+56
+81
+103
+116
+122
+126
+122
+123
+130
+136
+144
+153
+157
+154
+149
+138
+128
+130
+137
+127
+133
+130
+120
+111
+102
+83
+63
+50
+47
+48
+43
+43
+43
+44
+44
+44
+45
+45
+46
+47
+47
+47
+46
+44
+44
+44
+45
+45
+44
+43
+44
+44
+43
+43
+45
+45
+47
+47
+46
+45
+46
+43
+47
+45
+47
+45
+45
+45
+43
+43
+42
+42
+42
+41
+43
+41
+42
+42
+45
+45
+45
+46
+44
+45
+43
+43
+42
+41
+42
+43
+42
+44
+42
+43
+45
+45
+48
+48
+48
+47
+46
+45
+46
+45
+47
+46
+46
+47
+47
+46
+41
+41
+42
+45
+45
+46
+46
+45
+41
+39
+39
+38
+40
+44
+48
+48
+48
+47
+49
+51
+51
+48
+47
+45
+47
+46
+49
+50
+50
+48
+46
+44
+48
+50
+49
+48
+48
+47
+46
+46
+49
+48
+49
+48
+47
+46
+45
+45
+43
+51
+46
+41
+45
+45
+45
+50
+47
+52
+57
+63
+65
+66
+67
+69
+73
+80
+89
+97
+106
+113
+124
+130
+135
+137
+138
+140
+136
+130
+123
+117
+105
+95
+88
+85
+83
+78
+69
+61
+54
+51
+46
+42
+41
+43
+43
+42
+45
+42
+44
+41
+43
+44
+45
+45
+46
+46
+48
+48
+49
+49
+49
+48
+45
+43
+40
+35
+42
+64
+88
+103
+117
+115
+118
+119
+118
+117
+123
+134
+143
+143
+138
+131
+125
+124
+123
+126
+125
+126
+124
+117
+109
+99
+85
+70
+61
+51
+46
+42
+43
+43
+43
+44
+44
+44
+45
+46
+46
+47
+47
+46
+45
+44
+44
+44
+44
+44
+44
+43
+42
+43
+43
+45
+46
+48
+47
+49
+47
+46
+45
+47
+47
+47
+47
+45
+45
+43
+43
+42
+42
+41
+41
+42
+42
+41
+42
+46
+48
+46
+46
+44
+44
+42
+43
+42
+40
+41
+40
+41
+42
+41
+42
+44
+44
+46
+46
+46
+45
+46
+46
+46
+45
+46
+46
+46
+46
+47
+46
+42
+41
+43
+43
+45
+44
+45
+45
+43
+41
+40
+39
+41
+45
+49
+47
+47
+45
+48
+50
+52
+51
+50
+49
+46
+47
+46
+48
+49
+49
+47
+49
+50
+50
+50
+48
+48
+47
+47
+46
+49
+47
+48
+46
+46
+44
+44
+44
+44
+49
+45
+43
+46
+46
+42
+44
+49
+53
+58
+61
+64
+65
+67
+69
+72
+82
+93
+102
+112
+119
+127
+134
+136
+138
+141
+141
+137
+131
+125
+118
+105
+96
+90
+88
+88
+83
+74
+67
+59
+55
+51
+45
+43
+42
+43
+42
+43
+44
+44
+44
+44
+45
+48
+48
+48
+48
+49
+49
+49
+51
+51
+49
+49
+45
+41
+37
+44
+66
+93
+105
+111
+108
+110
+112
+112
+112
+119
+128
+135
+132
+129
+123
+120
+119
+121
+124
+124
+127
+123
+117
+110
+101
+87
+72
+59
+51
+45
+44
+44
+44
+44
+45
+45
+46
+46
+47
+47
+48
+48
+48
+47
+46
+45
+45
+45
+44
+43
+44
+43
+44
+44
+46
+46
+49
+48
+47
+46
+47
+46
+47
+47
+45
+45
+45
+45
+43
+43
+43
+43
+42
+42
+41
+42
+42
+43
+45
+47
+47
+47
+45
+44
+42
+42
+43
+42
+43
+42
+43
+42
+43
+44
+45
+45
+46
+46
+47
+46
+45
+45
+46
+45
+46
+46
+46
+46
+47
+46
+43
+43
+43
+45
+47
+46
+47
+46
+44
+42
+40
+40
+41
+42
+45
+44
+44
+45
+48
+52
+54
+53
+52
+52
+50
+50
+50
+51
+50
+51
+53
+53
+50
+47
+49
+46
+47
+44
+46
+44
+46
+44
+45
+42
+44
+41
+43
+43
+49
+49
+47
+47
+49
+49
+46
+45
+53
+56
+61
+63
+65
+65
+67
+70
+72
+81
+92
+101
+110
+116
+123
+131
+135
+137
+140
+140
+137
+131
+125
+120
+109
+101
+97
+96
+96
+93
+86
+80
+69
+63
+57
+50
+44
+41
+41
+40
+40
+42
+42
+42
+42
+43
+46
+47
+46
+46
+48
+48
+48
+49
+49
+48
+50
+46
+39
+34
+42
+65
+91
+105
+107
+106
+106
+110
+110
+109
+113
+120
+124
+122
+120
+118
+118
+117
+119
+121
+121
+125
+121
+116
+109
+99
+85
+70
+58
+50
+44
+45
+45
+46
+46
+46
+47
+47
+47
+48
+49
+49
+50
+50
+49
+48
+48
+47
+46
+46
+45
+45
+44
+46
+46
+48
+48
+48
+50
+49
+48
+47
+46
+48
+46
+46
+46
+46
+44
+44
+42
+44
+44
+43
+43
+43
+43
+43
+44
+47
+49
+48
+46
+46
+43
+43
+42
+44
+44
+43
+44
+43
+45
+45
+46
+47
+47
+48
+47
+49
+48
+46
+46
+46
+46
+47
+46
+46
+47
+48
+46
+46
+46
+46
+48
+47
+46
+47
+46
+46
+43
+41
+41
+40
+41
+42
+41
+47
+47
+51
+54
+56
+57
+55
+54
+56
+56
+57
+57
+55
+55
+55
+53
+49
+47
+46
+46
+45
+44
+43
+43
+42
+42
+42
+41
+41
+40
+40
+42
+49
+46
+46
+49
+45
+47
+51
+50
+55
+58
+61
+63
+64
+66
+68
+72
+74
+81
+91
+98
+103
+109
+118
+124
+131
+135
+137
+138
+135
+130
+126
+121
+111
+105
+103
+101
+103
+101
+95
+91
+80
+74
+63
+54
+47
+42
+40
+37
+38
+40
+40
+40
+40
+43
+44
+45
+43
+45
+45
+45
+47
+47
+47
+45
+43
+43
+39
+34
+44
+65
+89
+99
+104
+104
+105
+108
+109
+107
+109
+114
+116
+113
+112
+112
+115
+118
+120
+120
+120
+122
+119
+113
+106
+98
+82
+71
+57
+48
+42
+47
+47
+47
+48
+48
+48
+49
+49
+50
+50
+51
+52
+52
+52
+51
+51
+49
+49
+48
+48
+48
+47
+46
+46
+48
+49
+49
+50
+49
+48
+47
+46
+48
+46
+46
+46
+46
+44
+44
+44
+46
+44
+44
+44
+44
+44
+45
+46
+48
+48
+48
+48
+48
+46
+46
+45
+46
+47
+45
+45
+46
+47
+47
+47
+49
+49
+50
+49
+48
+47
+47
+47
+47
+47
+46
+46
+48
+48
+49
+49
+49
+49
+50
+52
+51
+50
+49
+49
+48
+45
+43
+42
+41
+41
+41
+41
+49
+51
+55
+58
+58
+59
+59
+58
+55
+56
+56
+57
+58
+58
+57
+55
+50
+49
+48
+47
+46
+46
+45
+45
+43
+43
+43
+43
+43
+42
+42
+42
+45
+39
+47
+52
+43
+42
+54
+55
+58
+60
+62
+63
+66
+68
+71
+74
+78
+81
+89
+93
+98
+105
+117
+124
+126
+130
+133
+134
+132
+128
+125
+119
+112
+108
+108
+107
+109
+108
+103
+100
+88
+82
+72
+61
+52
+44
+38
+36
+39
+39
+39
+38
+38
+40
+41
+42
+40
+42
+42
+42
+44
+44
+44
+42
+36
+39
+42
+42
+53
+70
+87
+94
+101
+98
+101
+105
+107
+104
+105
+107
+110
+108
+109
+110
+115
+117
+119
+119
+117
+119
+116
+111
+104
+95
+80
+69
+55
+47
+41
+48
+48
+49
+49
+50
+50
+50
+50
+51
+52
+53
+54
+54
+54
+53
+53
+52
+52
+51
+50
+51
+50
+49
+49
+49
+51
+52
+51
+50
+49
+50
+47
+48
+46
+48
+46
+46
+46
+46
+44
+45
+45
+45
+46
+45
+45
+46
+46
+47
+49
+50
+48
+49
+48
+48
+47
+48
+47
+46
+47
+48
+48
+49
+50
+51
+51
+51
+51
+50
+48
+49
+48
+49
+49
+48
+47
+49
+50
+51
+51
+50
+50
+53
+54
+54
+53
+53
+50
+50
+48
+45
+43
+41
+40
+41
+41
+43
+44
+48
+52
+55
+55
+55
+54
+53
+52
+54
+53
+57
+56
+57
+56
+51
+49
+49
+48
+47
+46
+46
+45
+44
+44
+44
+44
+44
+44
+44
+44
+42
+44
+69
+81
+56
+48
+59
+61
+58
+60
+62
+63
+66
+69
+74
+76
+79
+82
+88
+93
+98
+105
+115
+122
+122
+124
+127
+129
+130
+126
+121
+118
+112
+111
+112
+112
+112
+112
+109
+107
+98
+92
+83
+71
+62
+51
+42
+39
+39
+40
+39
+40
+39
+39
+39
+40
+40
+40
+42
+42
+42
+42
+42
+40
+36
+44
+52
+56
+64
+75
+86
+90
+93
+92
+93
+98
+101
+100
+101
+102
+109
+106
+105
+110
+114
+118
+118
+118
+116
+118
+114
+107
+102
+94
+79
+69
+54
+47
+41
+49
+50
+50
+50
+51
+51
+51
+52
+52
+53
+54
+55
+55
+55
+55
+55
+55
+55
+54
+53
+52
+52
+51
+51
+51
+52
+52
+52
+51
+50
+51
+48
+48
+46
+48
+46
+46
+46
+46
+45
+45
+45
+45
+45
+46
+46
+47
+47
+48
+48
+49
+50
+51
+52
+52
+51
+48
+47
+48
+48
+49
+48
+49
+49
+52
+52
+52
+51
+51
+49
+47
+46
+49
+48
+50
+49
+49
+50
+50
+51
+52
+53
+54
+55
+54
+54
+54
+52
+48
+47
+45
+43
+44
+42
+43
+42
+38
+39
+45
+51
+56
+57
+58
+59
+62
+58
+54
+51
+51
+52
+55
+55
+53
+51
+50
+50
+49
+48
+47
+47
+46
+46
+46
+47
+47
+47
+47
+47
+43
+56
+102
+121
+84
+60
+65
+64
+60
+61
+63
+64
+64
+68
+74
+79
+79
+85
+91
+95
+99
+102
+107
+111
+119
+122
+126
+128
+129
+126
+121
+118
+114
+114
+114
+114
+114
+115
+112
+112
+105
+101
+92
+81
+71
+59
+48
+43
+43
+44
+42
+42
+41
+40
+39
+41
+42
+42
+43
+43
+43
+43
+43
+40
+45
+52
+62
+68
+74
+81
+86
+87
+91
+87
+87
+92
+97
+97
+98
+102
+107
+106
+105
+110
+116
+120
+119
+118
+115
+118
+114
+108
+99
+91
+77
+67
+59
+51
+45
+50
+50
+51
+51
+51
+52
+52
+52
+53
+54
+55
+56
+56
+56
+56
+56
+56
+56
+56
+55
+54
+53
+53
+52
+53
+53
+53
+53
+53
+51
+49
+48
+46
+46
+46
+46
+47
+46
+46
+46
+45
+45
+46
+46
+46
+47
+47
+47
+48
+49
+50
+51
+52
+52
+53
+51
+47
+47
+47
+47
+48
+49
+50
+50
+53
+53
+52
+52
+51
+50
+48
+47
+50
+50
+51
+50
+50
+51
+52
+52
+50
+51
+53
+55
+54
+54
+53
+52
+46
+44
+43
+43
+42
+43
+41
+39
+42
+44
+51
+57
+64
+68
+71
+70
+74
+68
+59
+48
+45
+45
+49
+52
+53
+55
+54
+53
+53
+52
+51
+51
+51
+51
+51
+51
+51
+51
+51
+49
+38
+59
+122
+146
+99
+64
+64
+58
+60
+61
+62
+62
+64
+69
+76
+80
+81
+85
+92
+94
+95
+92
+91
+92
+117
+120
+124
+126
+128
+125
+120
+118
+114
+116
+117
+117
+117
+115
+115
+114
+110
+106
+97
+87
+78
+66
+53
+47
+45
+45
+44
+42
+40
+38
+39
+39
+41
+41
+43
+43
+43
+43
+43
+39
+52
+60
+70
+76
+79
+86
+88
+88
+90
+86
+86
+93
+98
+98
+100
+105
+108
+107
+106
+109
+118
+120
+121
+117
+117
+117
+113
+107
+101
+91
+77
+66
+63
+58
+51
+52
+52
+52
+52
+52
+53
+55
+55
+55
+55
+56
+56
+57
+58
+59
+59
+60
+60
+58
+57
+57
+56
+56
+55
+53
+53
+53
+53
+55
+53
+52
+52
+51
+51
+51
+50
+52
+49
+49
+49
+49
+49
+48
+47
+46
+46
+47
+47
+49
+49
+49
+48
+49
+50
+50
+49
+49
+49
+50
+50
+51
+50
+51
+53
+55
+55
+54
+53
+51
+50
+50
+50
+48
+47
+49
+48
+48
+48
+51
+51
+47
+61
+58
+51
+57
+50
+43
+54
+45
+46
+43
+39
+37
+44
+49
+48
+61
+59
+63
+65
+62
+55
+54
+59
+68
+69
+74
+75
+66
+53
+48
+54
+56
+56
+53
+50
+52
+56
+54
+49
+52
+50
+48
+48
+50
+51
+49
+44
+73
+97
+68
+85
+118
+79
+60
+70
+61
+65
+70
+72
+69
+68
+76
+84
+76
+93
+104
+93
+76
+69
+72
+76
+89
+92
+101
+114
+124
+125
+127
+130
+118
+119
+120
+120
+120
+119
+121
+120
+112
+110
+106
+98
+90
+78
+67
+63
+60
+50
+50
+49
+39
+35
+45
+49
+46
+44
+45
+46
+44
+42
+45
+47
+52
+58
+66
+69
+78
+90
+93
+89
+87
+90
+93
+97
+98
+100
+102
+104
+106
+111
+113
+111
+116
+120
+124
+122
+121
+114
+106
+102
+100
+90
+77
+68
+64
+66
+64
+52
+52
+52
+52
+53
+54
+56
+57
+56
+56
+57
+57
+58
+59
+59
+59
+61
+60
+58
+58
+57
+57
+56
+56
+56
+56
+56
+53
+54
+52
+52
+49
+50
+50
+50
+50
+51
+51
+51
+51
+49
+49
+48
+48
+47
+46
+47
+47
+49
+47
+47
+48
+49
+49
+48
+48
+48
+47
+49
+48
+50
+50
+51
+51
+53
+55
+54
+52
+51
+50
+50
+50
+49
+48
+49
+49
+49
+49
+52
+50
+51
+49
+43
+44
+54
+57
+59
+67
+63
+64
+65
+62
+66
+72
+76
+71
+55
+52
+54
+56
+51
+45
+45
+48
+53
+48
+48
+51
+54
+54
+58
+69
+77
+76
+68
+59
+56
+58
+56
+51
+48
+59
+65
+56
+43
+46
+68
+87
+78
+77
+61
+63
+92
+81
+53
+68
+73
+64
+63
+73
+79
+74
+75
+78
+88
+91
+90
+78
+69
+68
+72
+73
+78
+78
+82
+90
+94
+93
+93
+98
+105
+108
+110
+113
+114
+116
+119
+119
+125
+123
+121
+117
+115
+111
+108
+108
+110
+95
+85
+81
+75
+73
+57
+27
+45
+42
+43
+47
+49
+50
+54
+56
+53
+57
+65
+69
+79
+93
+98
+94
+95
+95
+96
+96
+100
+100
+100
+102
+105
+114
+120
+120
+125
+132
+135
+133
+131
+122
+111
+104
+100
+91
+77
+69
+67
+68
+69
+51
+51
+51
+52
+54
+55
+57
+58
+58
+58
+59
+59
+59
+59
+59
+59
+59
+59
+59
+58
+58
+58
+56
+55
+58
+57
+56
+53
+54
+51
+51
+49
+49
+49
+49
+49
+52
+52
+52
+52
+48
+48
+49
+48
+47
+47
+46
+46
+47
+47
+47
+46
+47
+47
+48
+48
+49
+48
+49
+49
+50
+48
+49
+48
+53
+52
+51
+50
+51
+50
+49
+48
+49
+49
+48
+48
+50
+51
+51
+52
+60
+46
+51
+71
+87
+96
+102
+98
+62
+63
+65
+66
+74
+82
+83
+75
+52
+48
+48
+49
+46
+43
+43
+47
+54
+43
+36
+39
+45
+47
+50
+58
+50
+66
+76
+82
+82
+76
+62
+49
+47
+44
+42
+45
+55
+71
+87
+91
+73
+51
+57
+49
+75
+93
+63
+74
+76
+67
+69
+79
+81
+74
+78
+89
+98
+90
+81
+73
+74
+78
+77
+72
+79
+75
+74
+76
+77
+75
+76
+80
+88
+91
+93
+97
+99
+101
+104
+107
+107
+106
+106
+105
+109
+112
+115
+118
+133
+124
+116
+108
+108
+114
+93
+50
+39
+44
+52
+53
+45
+41
+49
+57
+51
+54
+63
+68
+84
+101
+105
+100
+105
+101
+100
+99
+101
+104
+105
+106
+118
+126
+133
+138
+144
+150
+153
+153
+146
+134
+121
+109
+98
+89
+77
+71
+67
+70
+73
+50
+50
+51
+52
+54
+56
+58
+59
+60
+60
+60
+60
+60
+60
+60
+60
+60
+60
+60
+59
+59
+57
+57
+57
+60
+57
+56
+55
+53
+51
+50
+49
+48
+48
+49
+50
+50
+51
+53
+53
+49
+48
+50
+49
+48
+47
+47
+47
+47
+45
+46
+44
+46
+46
+48
+47
+48
+46
+48
+47
+48
+48
+47
+48
+50
+52
+51
+50
+51
+49
+49
+48
+50
+50
+49
+49
+51
+52
+53
+51
+49
+38
+63
+96
+101
+102
+99
+79
+48
+47
+48
+51
+61
+71
+72
+64
+55
+53
+51
+51
+51
+51
+52
+54
+53
+47
+41
+40
+40
+40
+38
+40
+55
+61
+62
+60
+66
+76
+83
+83
+55
+42
+37
+49
+75
+87
+81
+64
+57
+42
+52
+52
+64
+85
+75
+70
+64
+73
+83
+81
+74
+75
+91
+105
+87
+80
+74
+73
+78
+81
+76
+72
+83
+77
+75
+75
+74
+73
+78
+83
+84
+86
+87
+87
+90
+92
+94
+97
+102
+103
+101
+103
+105
+109
+115
+115
+117
+117
+118
+113
+110
+120
+118
+98
+53
+47
+42
+44
+47
+46
+47
+47
+46
+56
+67
+78
+96
+114
+118
+113
+113
+115
+115
+111
+109
+111
+117
+122
+138
+149
+157
+161
+167
+174
+176
+173
+162
+148
+130
+113
+99
+88
+78
+72
+67
+69
+72
+49
+49
+50
+51
+53
+55
+57
+58
+60
+60
+60
+60
+60
+61
+61
+61
+60
+60
+60
+61
+59
+59
+59
+57
+58
+57
+56
+54
+52
+49
+48
+47
+47
+47
+47
+49
+49
+49
+50
+50
+47
+47
+49
+48
+49
+48
+48
+47
+46
+46
+46
+45
+46
+47
+48
+47
+49
+47
+49
+48
+48
+48
+47
+48
+50
+51
+51
+49
+48
+47
+48
+48
+49
+49
+49
+49
+50
+51
+54
+52
+46
+50
+83
+105
+95
+81
+69
+43
+41
+40
+38
+41
+51
+61
+63
+59
+53
+52
+50
+50
+53
+57
+59
+60
+47
+47
+43
+41
+41
+44
+47
+49
+65
+65
+63
+57
+60
+69
+78
+79
+62
+67
+76
+77
+74
+66
+62
+55
+46
+46
+43
+52
+52
+57
+80
+67
+57
+73
+80
+70
+70
+84
+100
+104
+75
+68
+67
+68
+72
+75
+76
+77
+83
+77
+73
+72
+71
+70
+76
+82
+86
+88
+88
+90
+93
+95
+98
+101
+105
+107
+108
+109
+111
+111
+113
+111
+112
+104
+109
+112
+104
+107
+114
+115
+99
+68
+36
+34
+51
+61
+55
+45
+51
+67
+86
+103
+121
+139
+140
+131
+128
+136
+141
+136
+130
+130
+142
+153
+167
+174
+182
+185
+189
+193
+195
+190
+177
+162
+140
+118
+101
+89
+79
+74
+66
+67
+71
+48
+48
+49
+50
+51
+53
+55
+56
+58
+58
+59
+60
+61
+61
+62
+62
+61
+61
+61
+62
+60
+60
+58
+59
+58
+56
+56
+53
+52
+51
+50
+49
+49
+49
+48
+48
+49
+49
+50
+49
+48
+48
+49
+49
+50
+49
+48
+48
+46
+46
+44
+45
+45
+47
+47
+48
+48
+48
+47
+48
+48
+48
+47
+47
+50
+51
+50
+49
+48
+47
+48
+47
+48
+48
+49
+49
+50
+51
+54
+52
+52
+69
+95
+98
+81
+70
+59
+43
+39
+37
+33
+32
+38
+46
+50
+49
+44
+45
+45
+44
+49
+56
+59
+58
+50
+48
+44
+39
+41
+48
+59
+61
+45
+54
+63
+66
+65
+62
+55
+48
+53
+66
+76
+71
+57
+48
+50
+55
+40
+47
+34
+49
+44
+47
+92
+92
+67
+67
+63
+61
+76
+97
+98
+84
+75
+70
+64
+62
+62
+66
+77
+87
+82
+77
+71
+70
+70
+68
+71
+78
+83
+84
+86
+87
+92
+97
+101
+107
+101
+104
+106
+108
+110
+110
+108
+105
+114
+97
+100
+110
+110
+109
+111
+110
+130
+106
+76
+56
+45
+43
+50
+58
+65
+85
+110
+130
+145
+159
+159
+152
+155
+164
+172
+168
+163
+163
+176
+188
+192
+197
+204
+205
+206
+209
+207
+202
+192
+175
+152
+126
+107
+91
+82
+78
+71
+72
+72
+48
+48
+48
+48
+49
+51
+52
+53
+55
+56
+57
+59
+60
+62
+63
+63
+61
+62
+62
+62
+61
+61
+60
+60
+58
+57
+57
+55
+54
+51
+51
+51
+50
+50
+49
+48
+49
+48
+49
+49
+49
+49
+50
+49
+50
+50
+49
+49
+47
+45
+45
+45
+46
+47
+47
+48
+48
+49
+48
+48
+48
+48
+45
+47
+49
+49
+48
+47
+48
+46
+47
+47
+47
+47
+48
+48
+49
+50
+52
+49
+47
+75
+86
+68
+54
+51
+47
+41
+33
+35
+33
+31
+32
+35
+37
+37
+41
+45
+44
+44
+49
+58
+60
+54
+55
+52
+47
+43
+48
+56
+61
+55
+45
+45
+43
+38
+37
+43
+49
+52
+42
+43
+44
+44
+44
+44
+45
+43
+37
+38
+38
+44
+46
+55
+85
+113
+83
+66
+58
+73
+91
+95
+84
+73
+77
+68
+63
+60
+56
+55
+65
+76
+78
+75
+72
+72
+72
+69
+71
+77
+80
+82
+82
+85
+88
+93
+97
+103
+106
+108
+112
+115
+116
+116
+115
+111
+109
+97
+101
+106
+107
+116
+122
+116
+126
+126
+119
+97
+65
+47
+55
+74
+92
+118
+144
+161
+171
+182
+185
+179
+189
+197
+202
+202
+202
+205
+214
+219
+216
+219
+221
+220
+223
+224
+222
+216
+203
+186
+163
+135
+113
+98
+87
+83
+80
+79
+79
+49
+49
+49
+48
+49
+49
+50
+51
+54
+55
+56
+58
+60
+60
+61
+62
+62
+62
+60
+61
+59
+59
+59
+58
+59
+59
+58
+59
+59
+61
+63
+61
+55
+53
+51
+50
+50
+49
+50
+50
+49
+51
+50
+52
+51
+52
+51
+49
+47
+47
+47
+48
+49
+50
+50
+51
+53
+51
+50
+49
+48
+48
+45
+47
+49
+51
+50
+51
+49
+49
+48
+50
+47
+47
+47
+47
+48
+47
+48
+44
+55
+91
+89
+54
+42
+43
+37
+35
+38
+42
+44
+39
+38
+38
+35
+35
+42
+48
+48
+46
+52
+60
+59
+53
+48
+47
+46
+48
+57
+65
+60
+44
+36
+40
+46
+44
+42
+43
+43
+39
+42
+43
+44
+44
+42
+41
+40
+37
+42
+31
+48
+41
+45
+53
+54
+96
+89
+66
+65
+90
+98
+82
+70
+74
+68
+61
+60
+57
+52
+44
+46
+52
+72
+69
+68
+72
+73
+71
+73
+78
+85
+86
+84
+84
+85
+90
+94
+99
+104
+107
+110
+111
+112
+113
+115
+112
+106
+109
+115
+104
+96
+115
+133
+130
+119
+120
+123
+125
+120
+103
+88
+81
+119
+146
+173
+186
+195
+204
+207
+207
+216
+216
+218
+223
+228
+233
+235
+235
+230
+230
+232
+230
+232
+233
+231
+226
+209
+194
+169
+143
+120
+104
+95
+90
+89
+88
+86
+47
+48
+49
+49
+53
+52
+52
+52
+53
+54
+53
+55
+57
+57
+59
+59
+64
+62
+60
+59
+56
+55
+56
+56
+57
+58
+59
+67
+77
+80
+79
+69
+62
+52
+52
+53
+57
+56
+52
+48
+53
+53
+51
+52
+53
+53
+52
+50
+53
+52
+54
+53
+55
+55
+56
+57
+58
+55
+54
+52
+48
+45
+43
+44
+50
+52
+51
+52
+53
+55
+57
+58
+58
+48
+45
+49
+43
+35
+36
+46
+92
+65
+44
+41
+43
+39
+38
+43
+36
+38
+42
+41
+41
+38
+37
+37
+39
+41
+42
+46
+50
+52
+50
+49
+44
+44
+44
+47
+52
+56
+49
+38
+43
+42
+43
+45
+45
+46
+47
+45
+44
+45
+44
+44
+42
+41
+41
+40
+38
+31
+32
+39
+39
+40
+53
+73
+67
+75
+87
+90
+82
+67
+63
+71
+70
+68
+65
+57
+51
+47
+47
+48
+64
+67
+67
+63
+65
+71
+73
+71
+81
+81
+82
+85
+86
+85
+90
+100
+107
+106
+103
+103
+109
+115
+121
+122
+121
+117
+116
+113
+106
+106
+119
+135
+128
+105
+118
+120
+109
+125
+92
+109
+132
+156
+187
+208
+218
+224
+231
+235
+237
+238
+241
+242
+243
+244
+244
+243
+240
+239
+238
+237
+235
+232
+227
+225
+212
+202
+184
+160
+137
+120
+111
+107
+115
+109
+107
+47
+48
+48
+50
+51
+50
+51
+50
+52
+53
+53
+55
+55
+57
+56
+59
+62
+62
+60
+57
+54
+54
+53
+56
+56
+61
+69
+82
+96
+106
+106
+96
+75
+63
+58
+56
+57
+58
+56
+53
+56
+54
+52
+52
+53
+53
+53
+50
+47
+47
+50
+52
+54
+57
+58
+57
+58
+57
+54
+52
+48
+45
+43
+44
+46
+50
+53
+54
+55
+55
+55
+55
+57
+54
+49
+49
+42
+37
+46
+58
+66
+45
+35
+38
+39
+36
+37
+42
+37
+40
+43
+45
+44
+42
+40
+41
+41
+42
+41
+43
+46
+49
+47
+46
+44
+40
+43
+54
+57
+49
+43
+41
+43
+44
+46
+45
+47
+46
+47
+45
+45
+43
+43
+43
+41
+40
+39
+36
+39
+35
+37
+42
+42
+38
+47
+60
+63
+68
+77
+81
+73
+64
+65
+72
+69
+67
+65
+56
+49
+45
+45
+46
+53
+63
+69
+67
+62
+66
+70
+74
+74
+76
+80
+84
+83
+83
+88
+97
+104
+105
+105
+106
+112
+118
+122
+123
+120
+115
+111
+116
+122
+123
+118
+112
+107
+107
+104
+102
+111
+116
+72
+115
+137
+165
+200
+220
+230
+237
+242
+243
+249
+250
+253
+253
+254
+253
+254
+251
+246
+244
+243
+241
+239
+237
+236
+234
+224
+216
+197
+174
+154
+140
+133
+131
+134
+128
+126
+44
+45
+46
+47
+47
+48
+50
+49
+52
+50
+52
+54
+54
+56
+57
+58
+61
+59
+59
+56
+55
+55
+55
+57
+58
+66
+83
+102
+120
+133
+138
+131
+105
+92
+82
+75
+71
+69
+65
+60
+59
+55
+52
+51
+50
+51
+49
+48
+45
+46
+48
+50
+51
+52
+53
+51
+52
+52
+51
+48
+48
+47
+45
+44
+39
+42
+47
+48
+51
+52
+50
+49
+52
+53
+50
+44
+39
+44
+57
+67
+48
+36
+32
+39
+41
+36
+34
+38
+38
+41
+45
+47
+46
+45
+45
+47
+46
+46
+43
+43
+43
+45
+45
+44
+45
+40
+46
+61
+58
+42
+38
+46
+44
+43
+44
+46
+47
+46
+47
+44
+45
+43
+43
+41
+39
+38
+34
+33
+36
+35
+39
+47
+46
+41
+44
+55
+53
+56
+65
+73
+74
+67
+65
+67
+65
+63
+61
+52
+46
+42
+42
+43
+41
+56
+69
+69
+64
+65
+73
+80
+71
+73
+79
+84
+85
+85
+88
+95
+102
+105
+107
+112
+119
+123
+124
+122
+116
+116
+113
+116
+124
+128
+118
+99
+109
+119
+92
+94
+132
+123
+59
+112
+129
+166
+208
+228
+239
+249
+253
+251
+255
+255
+255
+255
+255
+255
+255
+252
+250
+248
+247
+245
+245
+243
+243
+242
+234
+225
+206
+185
+168
+158
+153
+151
+158
+150
+148
+44
+44
+45
+44
+45
+46
+47
+48
+48
+49
+51
+53
+53
+55
+56
+57
+60
+59
+57
+57
+56
+56
+56
+59
+62
+76
+98
+122
+146
+161
+168
+166
+151
+138
+123
+109
+100
+90
+80
+72
+70
+63
+55
+51
+48
+47
+46
+47
+48
+49
+51
+50
+49
+49
+47
+45
+47
+46
+47
+47
+48
+47
+48
+47
+42
+44
+46
+48
+50
+51
+53
+52
+52
+53
+49
+43
+43
+54
+65
+65
+46
+40
+40
+45
+44
+38
+35
+38
+38
+41
+44
+47
+47
+48
+49
+50
+51
+50
+46
+42
+43
+44
+44
+42
+44
+45
+52
+57
+51
+39
+40
+47
+43
+42
+45
+45
+46
+44
+44
+42
+44
+43
+41
+40
+38
+36
+32
+31
+30
+31
+36
+46
+47
+46
+50
+58
+45
+48
+53
+64
+73
+73
+63
+56
+57
+56
+52
+47
+43
+42
+43
+45
+38
+51
+64
+67
+64
+68
+76
+85
+69
+69
+77
+85
+87
+87
+88
+94
+99
+102
+109
+114
+121
+124
+123
+121
+113
+122
+122
+112
+110
+117
+117
+106
+102
+103
+85
+113
+164
+141
+51
+64
+109
+155
+202
+226
+241
+254
+255
+254
+255
+255
+255
+255
+253
+254
+251
+250
+249
+247
+247
+246
+246
+245
+247
+246
+239
+228
+210
+193
+180
+172
+169
+170
+180
+172
+166
+44
+44
+43
+43
+44
+44
+46
+47
+47
+48
+49
+51
+51
+53
+55
+56
+58
+58
+58
+58
+57
+58
+58
+61
+68
+85
+113
+141
+168
+185
+195
+198
+192
+182
+169
+154
+141
+126
+110
+97
+88
+77
+66
+56
+50
+47
+44
+44
+49
+51
+49
+49
+47
+43
+42
+41
+44
+43
+44
+47
+48
+50
+52
+51
+52
+53
+51
+50
+50
+52
+52
+53
+51
+49
+46
+47
+56
+68
+71
+60
+48
+43
+46
+47
+45
+41
+39
+42
+36
+39
+43
+46
+45
+46
+48
+51
+54
+51
+47
+44
+44
+43
+43
+43
+43
+53
+56
+46
+38
+41
+45
+43
+43
+41
+45
+44
+44
+43
+42
+42
+44
+42
+41
+39
+35
+33
+31
+30
+30
+30
+34
+41
+45
+48
+54
+61
+62
+55
+53
+57
+68
+71
+62
+49
+49
+48
+47
+44
+42
+43
+45
+48
+45
+50
+58
+63
+66
+72
+79
+86
+69
+67
+76
+85
+89
+88
+89
+93
+95
+100
+108
+115
+122
+124
+121
+118
+114
+124
+122
+111
+108
+116
+115
+105
+95
+93
+104
+158
+184
+155
+69
+42
+98
+142
+192
+220
+239
+253
+255
+253
+255
+255
+255
+255
+255
+254
+251
+249
+247
+247
+247
+246
+247
+246
+247
+247
+243
+234
+218
+205
+195
+191
+192
+194
+200
+191
+183
+49
+46
+46
+43
+43
+44
+45
+46
+46
+47
+48
+50
+50
+52
+54
+52
+56
+56
+56
+59
+58
+59
+60
+65
+73
+94
+124
+157
+184
+204
+216
+222
+218
+212
+201
+191
+181
+167
+150
+135
+119
+105
+89
+74
+63
+56
+52
+50
+53
+55
+52
+50
+46
+43
+42
+42
+42
+43
+44
+48
+52
+54
+57
+58
+58
+58
+55
+53
+53
+52
+49
+48
+53
+43
+41
+50
+65
+71
+64
+52
+47
+43
+45
+45
+44
+42
+43
+45
+37
+40
+43
+45
+44
+46
+48
+52
+53
+52
+49
+46
+46
+47
+46
+44
+45
+57
+55
+38
+35
+47
+52
+42
+44
+40
+43
+42
+43
+43
+42
+42
+42
+41
+41
+40
+36
+34
+32
+31
+35
+35
+36
+38
+41
+44
+49
+54
+81
+74
+65
+59
+60
+63
+59
+49
+42
+40
+42
+41
+40
+43
+48
+51
+54
+51
+54
+61
+69
+72
+77
+80
+70
+67
+73
+84
+89
+90
+92
+95
+95
+97
+105
+112
+119
+122
+120
+118
+119
+118
+116
+115
+121
+123
+111
+94
+107
+99
+113
+154
+145
+134
+98
+76
+101
+137
+183
+215
+237
+247
+253
+254
+255
+255
+255
+255
+254
+252
+250
+248
+247
+248
+249
+249
+249
+247
+246
+242
+239
+230
+219
+210
+206
+207
+210
+214
+220
+211
+201
+52
+49
+48
+43
+42
+42
+43
+44
+45
+46
+47
+49
+49
+51
+53
+52
+55
+55
+56
+59
+59
+61
+63
+67
+75
+99
+130
+166
+197
+218
+234
+241
+239
+235
+229
+221
+214
+202
+189
+177
+161
+145
+126
+107
+92
+82
+76
+74
+75
+71
+64
+58
+52
+47
+45
+44
+42
+43
+47
+52
+55
+59
+62
+65
+67
+70
+72
+75
+76
+75
+71
+66
+65
+52
+48
+59
+70
+64
+53
+45
+47
+44
+42
+43
+44
+45
+45
+42
+39
+41
+42
+44
+45
+46
+49
+53
+52
+51
+49
+49
+50
+50
+48
+47
+53
+53
+49
+40
+42
+50
+51
+42
+42
+39
+42
+41
+41
+41
+40
+40
+41
+41
+41
+40
+39
+37
+33
+32
+37
+37
+37
+37
+40
+43
+46
+47
+71
+80
+83
+73
+62
+57
+55
+47
+42
+38
+40
+39
+40
+42
+48
+52
+59
+55
+58
+67
+72
+71
+74
+75
+72
+68
+73
+83
+90
+93
+93
+96
+94
+97
+102
+108
+117
+120
+120
+119
+119
+117
+118
+120
+123
+119
+107
+95
+106
+102
+93
+107
+89
+96
+96
+96
+100
+124
+166
+207
+231
+240
+247
+253
+255
+255
+255
+253
+252
+249
+247
+245
+246
+247
+250
+249
+247
+242
+240
+237
+228
+221
+213
+210
+213
+219
+225
+229
+236
+227
+215
+54
+51
+48
+45
+43
+43
+43
+44
+45
+45
+47
+49
+49
+51
+52
+51
+55
+55
+56
+58
+59
+60
+63
+67
+77
+102
+136
+171
+203
+227
+245
+253
+255
+250
+243
+238
+234
+225
+214
+204
+196
+180
+159
+139
+124
+112
+104
+101
+99
+94
+83
+72
+62
+54
+49
+47
+47
+48
+51
+55
+61
+64
+68
+72
+82
+92
+99
+106
+110
+109
+104
+97
+87
+69
+63
+73
+76
+60
+49
+46
+48
+47
+45
+45
+46
+47
+43
+38
+40
+43
+43
+45
+45
+47
+49
+52
+50
+50
+50
+50
+52
+52
+51
+47
+58
+47
+42
+47
+53
+53
+49
+44
+41
+39
+40
+41
+41
+41
+40
+40
+41
+41
+41
+41
+39
+38
+36
+35
+34
+37
+36
+38
+41
+43
+43
+42
+43
+71
+92
+89
+70
+55
+50
+45
+41
+39
+38
+37
+38
+42
+47
+50
+57
+57
+63
+72
+73
+68
+69
+71
+73
+68
+72
+83
+90
+92
+94
+97
+94
+96
+100
+105
+114
+120
+121
+122
+116
+119
+126
+125
+113
+103
+105
+109
+108
+116
+94
+102
+97
+104
+94
+94
+93
+111
+150
+195
+225
+233
+242
+253
+255
+255
+255
+253
+252
+249
+247
+246
+244
+245
+248
+248
+245
+239
+235
+229
+221
+217
+211
+213
+221
+229
+236
+242
+246
+236
+223
+53
+52
+51
+49
+47
+45
+43
+42
+41
+41
+42
+43
+48
+51
+54
+54
+55
+55
+56
+57
+58
+59
+65
+72
+77
+96
+129
+167
+202
+227
+246
+255
+255
+255
+255
+252
+249
+243
+236
+232
+218
+210
+193
+177
+161
+146
+135
+126
+122
+118
+110
+95
+77
+64
+58
+56
+52
+53
+58
+61
+62
+66
+72
+84
+106
+126
+137
+136
+139
+139
+126
+106
+101
+91
+87
+81
+68
+51
+40
+40
+42
+42
+44
+46
+45
+45
+44
+44
+39
+40
+42
+45
+45
+47
+49
+51
+52
+53
+54
+51
+49
+49
+51
+51
+60
+54
+48
+55
+82
+99
+84
+54
+41
+41
+42
+41
+38
+37
+38
+40
+43
+44
+43
+39
+35
+34
+36
+40
+38
+40
+41
+42
+44
+43
+44
+45
+56
+49
+65
+94
+81
+60
+59
+42
+38
+36
+38
+38
+40
+43
+48
+50
+52
+59
+74
+82
+74
+58
+58
+68
+71
+69
+75
+84
+87
+86
+88
+92
+102
+102
+101
+102
+108
+115
+118
+118
+119
+118
+117
+120
+120
+115
+110
+106
+117
+103
+109
+108
+88
+88
+101
+101
+103
+101
+139
+178
+207
+231
+238
+247
+249
+253
+254
+252
+252
+252
+248
+244
+246
+246
+244
+241
+244
+243
+232
+217
+213
+206
+208
+222
+231
+231
+232
+243
+248
+239
+226
+54
+51
+52
+50
+48
+46
+45
+44
+42
+42
+42
+43
+47
+50
+53
+53
+54
+54
+55
+56
+56
+57
+62
+69
+78
+95
+127
+164
+201
+226
+245
+254
+255
+255
+255
+255
+255
+252
+248
+245
+235
+227
+216
+201
+187
+174
+160
+152
+142
+136
+127
+116
+98
+84
+73
+67
+58
+61
+65
+63
+64
+69
+82
+99
+131
+150
+157
+155
+154
+150
+136
+117
+107
+98
+88
+71
+57
+47
+41
+41
+37
+37
+38
+40
+39
+40
+40
+40
+37
+40
+45
+50
+51
+53
+53
+53
+57
+55
+55
+57
+61
+61
+60
+59
+58
+57
+55
+47
+40
+43
+62
+79
+54
+44
+35
+35
+41
+45
+43
+40
+46
+47
+49
+46
+41
+38
+37
+38
+39
+39
+40
+40
+42
+41
+41
+40
+47
+45
+54
+74
+81
+72
+63
+40
+40
+38
+39
+39
+40
+40
+44
+47
+52
+56
+70
+80
+73
+61
+59
+67
+72
+70
+76
+82
+87
+86
+86
+90
+102
+104
+105
+107
+109
+113
+116
+117
+108
+115
+121
+123
+117
+110
+105
+101
+102
+98
+104
+104
+94
+99
+105
+94
+95
+87
+125
+165
+197
+222
+233
+245
+247
+253
+254
+252
+252
+252
+251
+245
+245
+245
+243
+241
+244
+244
+233
+219
+212
+203
+204
+219
+229
+231
+232
+239
+246
+238
+225
+54
+53
+52
+50
+48
+46
+45
+44
+43
+43
+42
+43
+47
+50
+52
+52
+53
+55
+56
+54
+54
+55
+60
+67
+75
+93
+121
+156
+194
+220
+240
+250
+254
+254
+255
+255
+255
+255
+255
+255
+249
+244
+235
+224
+211
+199
+188
+179
+162
+155
+145
+133
+119
+104
+86
+76
+60
+64
+66
+66
+66
+74
+93
+115
+149
+165
+167
+162
+154
+147
+131
+110
+94
+92
+82
+62
+48
+43
+41
+39
+41
+41
+41
+42
+44
+45
+45
+46
+42
+46
+49
+53
+56
+55
+51
+52
+49
+46
+45
+51
+59
+63
+60
+53
+52
+44
+43
+45
+39
+32
+42
+58
+62
+54
+45
+41
+42
+44
+44
+44
+41
+43
+46
+46
+43
+40
+39
+39
+40
+41
+40
+41
+42
+42
+43
+44
+43
+52
+53
+55
+78
+87
+69
+47
+44
+40
+42
+41
+41
+40
+42
+44
+51
+54
+65
+75
+71
+62
+58
+62
+68
+67
+73
+80
+84
+83
+83
+87
+100
+104
+112
+114
+110
+108
+108
+112
+106
+116
+123
+121
+113
+107
+107
+109
+104
+104
+109
+107
+103
+110
+109
+95
+87
+70
+102
+148
+182
+209
+223
+244
+247
+253
+255
+252
+252
+254
+253
+247
+244
+242
+242
+242
+244
+244
+236
+226
+215
+203
+201
+216
+228
+232
+231
+236
+242
+235
+225
+57
+56
+54
+52
+51
+49
+48
+47
+45
+44
+44
+44
+47
+49
+51
+53
+54
+55
+55
+53
+52
+53
+56
+62
+75
+87
+113
+150
+186
+212
+233
+245
+249
+249
+253
+255
+255
+255
+255
+255
+252
+248
+242
+234
+226
+215
+205
+197
+182
+170
+158
+144
+132
+117
+99
+81
+68
+66
+67
+69
+74
+85
+100
+120
+141
+153
+152
+143
+131
+120
+103
+85
+72
+80
+79
+60
+49
+50
+44
+36
+34
+36
+36
+38
+40
+43
+45
+47
+54
+55
+54
+54
+53
+51
+46
+44
+40
+39
+40
+45
+52
+52
+49
+45
+45
+34
+31
+44
+54
+48
+37
+31
+55
+60
+63
+55
+42
+37
+41
+50
+46
+46
+46
+44
+42
+42
+41
+39
+42
+43
+43
+45
+47
+48
+51
+51
+42
+66
+69
+48
+70
+92
+75
+63
+47
+43
+42
+42
+42
+42
+43
+42
+48
+50
+57
+66
+68
+60
+55
+55
+63
+63
+69
+75
+79
+76
+77
+80
+96
+103
+113
+117
+109
+103
+103
+107
+112
+116
+115
+110
+108
+111
+117
+120
+117
+111
+109
+108
+108
+106
+104
+97
+84
+60
+85
+129
+169
+197
+217
+243
+246
+252
+255
+254
+254
+255
+255
+248
+245
+242
+243
+245
+247
+247
+241
+232
+218
+204
+202
+214
+228
+232
+229
+233
+238
+232
+224
+58
+57
+56
+54
+54
+52
+51
+50
+48
+47
+46
+46
+48
+49
+51
+52
+56
+56
+56
+54
+51
+50
+54
+59
+71
+82
+104
+139
+177
+206
+227
+238
+247
+249
+253
+253
+255
+254
+255
+253
+251
+248
+244
+239
+233
+226
+217
+209
+201
+187
+172
+158
+146
+132
+115
+98
+89
+81
+76
+77
+84
+93
+98
+104
+112
+118
+117
+110
+99
+89
+74
+63
+69
+77
+75
+60
+54
+58
+52
+41
+43
+45
+45
+47
+48
+52
+55
+58
+57
+55
+53
+50
+45
+44
+43
+42
+42
+45
+46
+48
+48
+47
+46
+44
+38
+43
+43
+35
+34
+41
+45
+41
+45
+55
+65
+63
+52
+45
+45
+50
+55
+53
+48
+44
+42
+44
+45
+43
+49
+49
+49
+50
+48
+48
+48
+49
+43
+76
+90
+54
+58
+81
+72
+81
+52
+47
+44
+44
+45
+46
+45
+44
+45
+46
+51
+57
+59
+54
+50
+48
+60
+60
+66
+73
+77
+75
+75
+79
+96
+104
+114
+120
+113
+101
+101
+107
+117
+116
+111
+106
+111
+119
+119
+115
+116
+109
+107
+114
+117
+102
+92
+97
+86
+57
+74
+114
+156
+193
+214
+239
+246
+252
+255
+254
+254
+255
+255
+250
+248
+244
+245
+248
+250
+249
+244
+241
+226
+210
+204
+215
+228
+230
+229
+233
+234
+231
+225
+61
+60
+59
+57
+57
+55
+54
+54
+51
+50
+49
+48
+50
+50
+52
+53
+56
+57
+57
+54
+51
+50
+51
+55
+67
+76
+99
+133
+171
+200
+222
+235
+248
+251
+253
+255
+255
+254
+253
+253
+249
+247
+242
+240
+237
+232
+227
+222
+218
+205
+192
+178
+169
+157
+142
+125
+120
+106
+95
+92
+92
+93
+87
+83
+83
+84
+85
+81
+77
+70
+60
+54
+76
+74
+65
+52
+50
+55
+53
+46
+54
+54
+55
+56
+56
+58
+60
+61
+51
+49
+47
+44
+42
+43
+44
+45
+49
+52
+52
+51
+48
+45
+44
+45
+36
+48
+46
+34
+29
+38
+41
+38
+39
+41
+47
+57
+64
+62
+55
+47
+46
+42
+41
+40
+44
+52
+56
+57
+53
+52
+51
+49
+45
+42
+40
+38
+40
+69
+99
+65
+50
+67
+66
+86
+60
+52
+46
+43
+45
+47
+47
+46
+43
+45
+48
+50
+50
+46
+46
+45
+54
+57
+63
+71
+76
+73
+76
+78
+99
+103
+116
+122
+117
+106
+105
+111
+115
+113
+110
+110
+120
+127
+115
+98
+109
+109
+111
+125
+138
+124
+104
+106
+88
+58
+71
+103
+146
+191
+216
+235
+245
+251
+255
+254
+255
+255
+255
+253
+251
+244
+246
+250
+250
+248
+246
+245
+232
+219
+213
+221
+229
+229
+226
+231
+234
+231
+229
+61
+60
+61
+59
+57
+55
+56
+55
+52
+51
+51
+50
+51
+52
+54
+55
+59
+59
+57
+55
+50
+48
+49
+53
+63
+70
+94
+130
+167
+196
+218
+231
+246
+250
+252
+254
+255
+254
+251
+251
+246
+244
+241
+240
+238
+237
+232
+230
+226
+219
+210
+202
+194
+183
+168
+154
+136
+122
+105
+95
+89
+82
+73
+65
+62
+60
+61
+60
+60
+53
+50
+49
+73
+63
+55
+51
+53
+54
+52
+48
+46
+46
+46
+46
+43
+42
+39
+38
+42
+42
+40
+41
+42
+44
+46
+47
+51
+50
+49
+47
+45
+44
+42
+41
+38
+37
+37
+38
+41
+42
+36
+28
+38
+37
+39
+49
+60
+64
+61
+55
+49
+46
+45
+46
+51
+58
+61
+61
+54
+51
+49
+47
+42
+40
+37
+36
+36
+49
+95
+76
+53
+63
+61
+83
+72
+61
+51
+46
+46
+48
+48
+47
+42
+45
+46
+45
+42
+40
+43
+44
+48
+50
+56
+66
+72
+70
+73
+76
+101
+102
+114
+123
+120
+107
+106
+114
+114
+115
+113
+116
+128
+136
+121
+100
+116
+124
+117
+119
+149
+159
+138
+124
+85
+60
+70
+92
+136
+190
+217
+230
+245
+251
+255
+255
+255
+255
+255
+253
+251
+243
+243
+247
+248
+246
+245
+246
+240
+226
+220
+226
+230
+227
+225
+230
+236
+235
+234
+63
+62
+62
+60
+58
+56
+55
+56
+53
+52
+51
+49
+50
+50
+51
+54
+57
+58
+58
+55
+50
+48
+50
+53
+61
+69
+93
+128
+168
+197
+216
+231
+242
+247
+250
+253
+255
+254
+253
+251
+245
+242
+238
+235
+237
+238
+237
+238
+230
+227
+221
+213
+203
+190
+175
+160
+127
+114
+99
+88
+78
+72
+67
+62
+58
+55
+55
+55
+52
+47
+44
+45
+69
+60
+55
+61
+67
+64
+57
+51
+57
+56
+56
+53
+50
+44
+41
+39
+40
+40
+42
+44
+46
+46
+46
+44
+55
+49
+44
+44
+45
+45
+41
+37
+40
+32
+33
+40
+39
+34
+37
+48
+38
+42
+44
+46
+47
+51
+57
+62
+75
+70
+66
+61
+61
+58
+54
+49
+49
+47
+46
+46
+43
+42
+41
+40
+33
+31
+89
+83
+58
+67
+59
+77
+81
+69
+54
+47
+46
+47
+45
+43
+44
+45
+46
+41
+37
+38
+41
+46
+41
+43
+49
+58
+64
+65
+66
+69
+95
+96
+106
+119
+117
+105
+101
+109
+116
+116
+112
+114
+127
+139
+132
+115
+121
+134
+113
+102
+145
+180
+162
+135
+80
+57
+63
+85
+129
+191
+217
+227
+244
+251
+255
+255
+255
+255
+255
+253
+249
+240
+241
+244
+247
+241
+242
+244
+243
+232
+226
+229
+231
+226
+224
+233
+241
+240
+239
+64
+64
+63
+62
+60
+59
+58
+59
+55
+54
+53
+51
+50
+50
+50
+52
+58
+57
+56
+54
+53
+52
+52
+57
+68
+77
+98
+131
+167
+195
+215
+231
+246
+249
+252
+252
+255
+255
+255
+252
+245
+241
+236
+237
+239
+243
+246
+246
+246
+238
+222
+211
+203
+188
+155
+120
+93
+84
+77
+73
+71
+69
+69
+68
+65
+61
+66
+52
+59
+60
+41
+69
+73
+69
+66
+63
+63
+62
+59
+57
+59
+55
+59
+65
+62
+48
+41
+44
+43
+44
+45
+42
+42
+43
+47
+46
+53
+43
+36
+38
+43
+45
+38
+31
+31
+31
+33
+34
+34
+37
+39
+41
+38
+41
+41
+42
+40
+38
+39
+41
+41
+46
+50
+51
+50
+50
+52
+53
+51
+47
+44
+45
+46
+44
+40
+37
+28
+34
+72
+78
+51
+73
+49
+72
+80
+74
+64
+54
+48
+44
+43
+43
+42
+40
+38
+40
+41
+41
+43
+44
+44
+48
+49
+51
+51
+52
+53
+55
+97
+105
+95
+106
+113
+100
+109
+121
+122
+120
+111
+105
+106
+110
+111
+111
+123
+133
+108
+119
+112
+175
+154
+117
+81
+58
+56
+90
+136
+176
+211
+240
+245
+249
+251
+253
+255
+255
+255
+254
+243
+232
+233
+237
+245
+244
+242
+240
+241
+238
+234
+230
+227
+225
+225
+229
+241
+250
+250
+65
+64
+64
+62
+61
+60
+59
+58
+54
+53
+52
+51
+50
+50
+50
+52
+56
+57
+56
+54
+53
+52
+55
+58
+69
+77
+99
+131
+166
+192
+211
+225
+236
+241
+244
+249
+253
+255
+255
+251
+244
+237
+232
+232
+234
+237
+238
+237
+243
+235
+220
+205
+189
+166
+130
+98
+77
+70
+67
+65
+67
+67
+68
+70
+67
+63
+68
+59
+63
+61
+49
+80
+70
+68
+66
+63
+59
+57
+56
+55
+63
+53
+52
+62
+65
+53
+44
+43
+42
+43
+45
+45
+46
+47
+51
+52
+50
+45
+41
+38
+39
+39
+34
+31
+36
+34
+37
+38
+43
+44
+44
+42
+46
+45
+43
+41
+38
+34
+33
+34
+36
+38
+43
+44
+45
+47
+50
+51
+46
+45
+46
+46
+42
+39
+39
+39
+46
+25
+53
+49
+62
+80
+63
+65
+86
+82
+72
+62
+53
+46
+43
+40
+42
+40
+39
+41
+43
+45
+47
+46
+44
+48
+48
+49
+48
+49
+51
+53
+92
+100
+91
+102
+108
+97
+108
+120
+126
+124
+114
+102
+96
+102
+112
+120
+119
+126
+100
+112
+110
+169
+147
+107
+79
+59
+59
+92
+141
+184
+220
+241
+248
+249
+250
+251
+253
+254
+255
+250
+242
+232
+229
+234
+240
+241
+241
+240
+239
+237
+233
+229
+224
+221
+223
+228
+239
+246
+249
+66
+65
+65
+63
+62
+61
+60
+60
+57
+56
+55
+53
+53
+53
+53
+55
+57
+59
+57
+55
+54
+53
+55
+58
+67
+78
+98
+129
+161
+185
+203
+214
+222
+227
+233
+238
+244
+247
+248
+244
+239
+232
+227
+224
+224
+225
+227
+226
+221
+214
+204
+189
+169
+145
+111
+81
+76
+68
+65
+63
+65
+67
+68
+70
+67
+61
+65
+64
+63
+56
+54
+87
+67
+66
+63
+60
+56
+54
+54
+54
+65
+49
+43
+53
+62
+58
+47
+41
+41
+41
+44
+46
+48
+49
+53
+57
+42
+42
+42
+42
+42
+41
+42
+44
+33
+31
+33
+34
+41
+41
+40
+37
+59
+56
+51
+46
+41
+36
+34
+35
+37
+36
+38
+39
+42
+45
+47
+47
+41
+43
+45
+44
+38
+37
+38
+42
+47
+32
+69
+48
+59
+63
+73
+85
+84
+81
+77
+67
+59
+50
+43
+38
+38
+37
+38
+39
+42
+45
+44
+44
+44
+47
+46
+47
+46
+48
+52
+55
+81
+93
+89
+103
+109
+96
+103
+113
+94
+107
+113
+109
+103
+105
+113
+119
+117
+117
+93
+104
+109
+161
+138
+96
+72
+61
+65
+93
+146
+194
+230
+241
+247
+248
+248
+251
+253
+253
+251
+246
+237
+226
+221
+224
+229
+231
+234
+236
+233
+234
+230
+224
+216
+213
+217
+223
+239
+244
+249
+66
+66
+65
+64
+63
+63
+62
+62
+59
+58
+57
+56
+56
+56
+56
+58
+59
+60
+59
+57
+55
+54
+56
+59
+66
+75
+96
+126
+155
+178
+194
+206
+210
+214
+219
+227
+232
+236
+237
+235
+232
+223
+218
+213
+213
+214
+214
+210
+189
+182
+175
+162
+143
+120
+97
+75
+74
+67
+65
+65
+67
+69
+70
+70
+70
+62
+64
+68
+60
+49
+58
+89
+66
+67
+64
+61
+57
+55
+56
+56
+59
+46
+40
+47
+55
+54
+47
+40
+41
+41
+46
+47
+48
+49
+55
+56
+43
+42
+44
+44
+45
+46
+46
+47
+40
+41
+43
+44
+46
+48
+54
+53
+64
+60
+55
+49
+42
+37
+38
+37
+40
+39
+37
+37
+40
+44
+44
+42
+42
+44
+43
+41
+39
+37
+40
+42
+40
+44
+80
+60
+47
+44
+64
+88
+115
+111
+103
+89
+71
+55
+40
+32
+39
+40
+38
+41
+44
+45
+44
+45
+46
+46
+47
+45
+45
+46
+51
+55
+65
+87
+91
+108
+114
+97
+97
+100
+84
+101
+114
+111
+108
+112
+118
+118
+115
+110
+88
+98
+107
+150
+131
+89
+67
+63
+69
+95
+148
+202
+232
+240
+239
+242
+245
+249
+250
+248
+243
+235
+222
+210
+204
+206
+210
+213
+219
+225
+225
+227
+227
+219
+209
+205
+209
+217
+234
+240
+243
+66
+66
+65
+65
+64
+63
+63
+63
+61
+60
+59
+59
+58
+59
+59
+61
+60
+61
+60
+58
+56
+55
+57
+60
+65
+73
+93
+120
+147
+165
+183
+194
+195
+200
+207
+212
+220
+224
+223
+222
+220
+214
+206
+199
+197
+195
+193
+184
+159
+150
+143
+134
+118
+101
+85
+75
+71
+67
+65
+65
+67
+71
+72
+72
+73
+64
+63
+69
+56
+44
+60
+80
+67
+67
+64
+63
+61
+60
+59
+60
+50
+42
+41
+42
+45
+45
+43
+41
+42
+42
+47
+47
+47
+47
+51
+53
+53
+50
+48
+49
+50
+48
+43
+39
+39
+45
+48
+46
+45
+48
+59
+64
+59
+54
+49
+44
+38
+34
+35
+37
+41
+38
+38
+39
+44
+48
+47
+45
+49
+45
+39
+37
+39
+41
+41
+40
+45
+42
+50
+58
+45
+58
+52
+54
+51
+54
+62
+67
+73
+72
+72
+71
+48
+46
+44
+45
+45
+46
+47
+48
+46
+46
+46
+44
+44
+46
+51
+54
+65
+88
+93
+108
+114
+99
+101
+103
+118
+122
+118
+104
+102
+113
+123
+124
+115
+106
+87
+93
+104
+141
+131
+93
+73
+73
+80
+102
+150
+204
+233
+237
+237
+240
+242
+243
+241
+234
+224
+215
+200
+189
+186
+188
+192
+196
+204
+211
+216
+222
+223
+217
+210
+205
+207
+214
+222
+224
+226
+65
+65
+65
+64
+64
+63
+63
+63
+62
+62
+61
+60
+60
+61
+61
+62
+62
+62
+62
+59
+57
+55
+57
+59
+63
+71
+87
+110
+131
+150
+165
+177
+180
+185
+193
+200
+207
+212
+213
+211
+211
+202
+192
+184
+178
+173
+171
+156
+140
+123
+120
+113
+102
+87
+78
+72
+69
+66
+66
+66
+69
+71
+73
+74
+72
+67
+62
+68
+52
+44
+64
+70
+65
+61
+59
+59
+61
+63
+60
+58
+42
+40
+42
+40
+39
+38
+40
+40
+41
+44
+46
+46
+46
+46
+47
+48
+50
+47
+48
+50
+55
+55
+53
+49
+42
+47
+50
+50
+49
+52
+61
+68
+54
+50
+47
+44
+41
+39
+40
+40
+36
+36
+40
+44
+50
+53
+53
+54
+56
+49
+40
+38
+41
+42
+42
+38
+43
+41
+39
+60
+47
+65
+50
+44
+47
+46
+49
+48
+46
+42
+38
+35
+53
+50
+46
+42
+41
+43
+44
+44
+47
+48
+47
+46
+43
+44
+47
+50
+71
+94
+95
+105
+111
+104
+113
+120
+123
+126
+117
+107
+110
+122
+126
+117
+112
+102
+89
+91
+102
+131
+134
+107
+93
+90
+96
+114
+152
+194
+222
+229
+239
+238
+238
+234
+227
+217
+205
+193
+173
+167
+168
+171
+175
+178
+186
+193
+204
+212
+218
+216
+212
+209
+207
+211
+211
+211
+210
+62
+62
+62
+62
+61
+61
+61
+61
+60
+60
+59
+59
+59
+60
+60
+63
+63
+62
+61
+60
+58
+58
+58
+60
+63
+69
+82
+98
+115
+129
+144
+157
+164
+169
+178
+188
+198
+203
+204
+202
+200
+191
+181
+173
+167
+164
+160
+142
+117
+97
+96
+98
+90
+79
+71
+69
+64
+62
+64
+66
+69
+71
+73
+74
+68
+68
+61
+66
+47
+44
+70
+60
+56
+52
+48
+49
+56
+59
+57
+53
+40
+40
+42
+39
+37
+38
+39
+38
+38
+41
+44
+43
+43
+43
+43
+45
+43
+45
+51
+52
+55
+55
+56
+56
+59
+60
+62
+65
+68
+70
+72
+69
+53
+50
+50
+47
+45
+42
+43
+44
+38
+42
+47
+50
+52
+52
+53
+54
+60
+55
+49
+44
+41
+39
+42
+41
+39
+47
+56
+62
+47
+46
+54
+54
+45
+46
+48
+49
+49
+48
+48
+47
+63
+58
+49
+42
+41
+40
+42
+42
+45
+47
+48
+47
+43
+43
+46
+48
+65
+90
+94
+105
+115
+110
+122
+127
+112
+121
+121
+115
+118
+127
+125
+111
+110
+98
+91
+89
+97
+123
+137
+122
+107
+102
+104
+117
+142
+173
+196
+209
+220
+215
+207
+199
+191
+182
+174
+164
+149
+144
+148
+154
+158
+162
+168
+177
+187
+196
+206
+213
+214
+210
+205
+202
+201
+198
+193
+62
+61
+61
+61
+61
+61
+60
+60
+61
+60
+60
+59
+59
+60
+61
+63
+62
+62
+62
+60
+60
+58
+58
+60
+65
+68
+76
+90
+102
+113
+127
+141
+150
+156
+167
+181
+191
+197
+200
+199
+191
+183
+173
+167
+165
+162
+160
+141
+93
+75
+75
+82
+82
+73
+67
+64
+61
+59
+63
+65
+66
+70
+72
+73
+65
+68
+60
+63
+46
+47
+75
+53
+51
+44
+38
+42
+51
+57
+54
+47
+42
+41
+41
+39
+40
+41
+39
+37
+36
+37
+41
+42
+42
+42
+41
+42
+51
+56
+60
+58
+50
+45
+45
+49
+51
+48
+49
+54
+63
+65
+57
+47
+48
+46
+49
+47
+44
+43
+41
+42
+43
+48
+54
+55
+52
+49
+48
+50
+61
+60
+55
+47
+40
+37
+41
+45
+42
+45
+60
+50
+49
+32
+57
+51
+40
+41
+41
+41
+43
+42
+43
+43
+78
+70
+59
+50
+47
+46
+49
+49
+45
+47
+48
+46
+44
+42
+44
+45
+50
+81
+93
+112
+121
+114
+124
+125
+131
+137
+128
+113
+112
+124
+127
+116
+106
+97
+94
+87
+94
+116
+139
+132
+110
+103
+104
+113
+130
+150
+173
+189
+185
+178
+167
+158
+151
+144
+140
+134
+130
+127
+133
+140
+144
+146
+154
+162
+170
+181
+196
+205
+210
+207
+201
+195
+189
+184
+180
+61
+61
+61
+61
+61
+61
+61
+61
+59
+59
+59
+60
+60
+61
+61
+61
+63
+63
+61
+61
+61
+60
+60
+62
+61
+67
+72
+79
+88
+98
+105
+114
+129
+142
+155
+167
+179
+193
+201
+199
+192
+188
+178
+168
+167
+171
+163
+132
+82
+60
+64
+67
+67
+62
+62
+69
+60
+58
+61
+64
+67
+72
+73
+72
+62
+57
+54
+51
+47
+48
+56
+68
+49
+54
+46
+46
+59
+51
+39
+44
+37
+39
+41
+40
+37
+38
+39
+40
+39
+40
+40
+36
+34
+37
+46
+53
+51
+49
+46
+43
+41
+40
+40
+40
+42
+41
+46
+55
+62
+59
+54
+49
+54
+43
+42
+45
+45
+39
+40
+47
+50
+52
+54
+53
+50
+47
+44
+44
+50
+49
+49
+75
+26
+35
+62
+38
+40
+55
+64
+55
+42
+42
+49
+55
+52
+46
+41
+38
+42
+46
+48
+46
+88
+79
+58
+44
+47
+45
+39
+42
+37
+38
+38
+37
+39
+42
+46
+49
+48
+59
+87
+112
+118
+124
+131
+124
+132
+128
+123
+122
+124
+124
+120
+115
+110
+92
+92
+91
+86
+107
+128
+122
+109
+102
+99
+106
+119
+129
+131
+132
+127
+124
+118
+113
+111
+114
+118
+117
+119
+121
+127
+132
+134
+135
+140
+144
+147
+154
+167
+185
+199
+202
+196
+188
+183
+174
+168
+61
+61
+61
+61
+61
+61
+61
+61
+59
+59
+59
+60
+60
+61
+61
+61
+63
+61
+61
+61
+59
+60
+60
+62
+64
+67
+70
+74
+81
+88
+94
+102
+116
+131
+145
+157
+172
+188
+196
+196
+193
+186
+171
+162
+164
+168
+158
+125
+69
+46
+46
+53
+59
+58
+58
+61
+61
+60
+62
+65
+69
+70
+70
+67
+55
+52
+49
+47
+44
+43
+53
+65
+64
+61
+51
+49
+57
+56
+43
+35
+39
+40
+42
+42
+40
+40
+40
+40
+40
+38
+37
+37
+42
+46
+48
+49
+39
+38
+38
+39
+40
+42
+44
+47
+45
+43
+46
+55
+59
+55
+51
+48
+47
+56
+59
+48
+43
+47
+49
+45
+62
+61
+58
+54
+52
+51
+53
+55
+45
+53
+50
+63
+63
+43
+46
+30
+49
+58
+64
+56
+45
+44
+48
+49
+46
+42
+39
+40
+43
+48
+50
+47
+89
+78
+56
+43
+49
+48
+44
+47
+43
+42
+42
+41
+41
+40
+40
+41
+48
+57
+84
+106
+116
+124
+132
+128
+132
+128
+125
+125
+125
+123
+118
+113
+110
+93
+92
+92
+89
+104
+119
+111
+98
+92
+93
+99
+107
+112
+112
+109
+93
+93
+92
+94
+95
+101
+105
+107
+116
+118
+124
+125
+127
+130
+134
+137
+134
+139
+151
+168
+183
+191
+188
+186
+181
+172
+163
+60
+60
+60
+60
+60
+60
+60
+60
+58
+58
+58
+59
+59
+60
+60
+60
+61
+61
+61
+61
+59
+60
+60
+60
+65
+65
+68
+70
+75
+78
+83
+90
+103
+118
+133
+145
+164
+181
+190
+189
+193
+183
+169
+158
+162
+165
+152
+118
+70
+49
+45
+50
+56
+59
+58
+57
+62
+62
+63
+66
+69
+69
+66
+63
+52
+48
+43
+42
+40
+42
+51
+60
+62
+54
+52
+55
+61
+69
+60
+35
+40
+39
+41
+43
+44
+43
+41
+41
+41
+35
+35
+42
+51
+54
+49
+43
+39
+38
+37
+37
+37
+38
+40
+41
+45
+43
+47
+54
+58
+55
+51
+51
+55
+58
+64
+64
+66
+67
+62
+55
+60
+59
+57
+55
+51
+49
+49
+50
+44
+57
+52
+57
+106
+65
+45
+44
+55
+60
+59
+54
+46
+45
+43
+42
+39
+37
+39
+41
+46
+49
+49
+49
+89
+77
+51
+40
+51
+54
+51
+54
+56
+55
+54
+50
+49
+46
+42
+41
+47
+54
+77
+101
+114
+126
+136
+131
+131
+129
+127
+127
+127
+124
+117
+111
+109
+94
+90
+92
+90
+97
+101
+90
+81
+79
+82
+88
+93
+94
+92
+88
+77
+80
+85
+89
+96
+103
+106
+109
+114
+116
+120
+121
+121
+122
+126
+129
+127
+128
+134
+146
+162
+174
+178
+180
+173
+165
+155
+59
+59
+59
+59
+59
+59
+59
+59
+58
+58
+58
+59
+59
+60
+60
+60
+61
+61
+60
+61
+59
+60
+60
+60
+64
+64
+66
+67
+69
+70
+73
+79
+95
+109
+123
+137
+156
+173
+183
+179
+186
+180
+170
+161
+159
+156
+140
+108
+82
+66
+63
+61
+60
+59
+59
+60
+65
+65
+68
+69
+72
+68
+64
+59
+54
+49
+43
+42
+41
+42
+48
+58
+55
+49
+57
+63
+63
+76
+74
+43
+41
+36
+37
+41
+44
+44
+42
+41
+38
+38
+41
+47
+55
+54
+46
+38
+41
+41
+42
+40
+41
+41
+41
+43
+44
+44
+49
+57
+60
+59
+61
+65
+74
+54
+58
+89
+105
+90
+73
+72
+56
+56
+57
+58
+55
+49
+42
+37
+45
+50
+47
+64
+112
+83
+59
+68
+58
+57
+53
+48
+45
+42
+38
+35
+35
+36
+38
+44
+47
+45
+47
+50
+81
+71
+48
+41
+55
+58
+53
+53
+57
+57
+57
+56
+53
+50
+46
+45
+44
+49
+72
+95
+111
+127
+136
+133
+127
+127
+127
+128
+128
+123
+116
+110
+104
+92
+86
+90
+92
+90
+82
+71
+66
+67
+73
+80
+86
+88
+88
+87
+90
+92
+98
+104
+108
+111
+113
+112
+113
+116
+117
+118
+118
+118
+119
+122
+124
+123
+124
+133
+150
+164
+175
+181
+175
+165
+153
+59
+59
+59
+59
+59
+59
+59
+59
+58
+58
+58
+59
+59
+60
+60
+60
+60
+60
+60
+61
+59
+60
+60
+60
+60
+62
+62
+63
+65
+66
+69
+74
+89
+100
+113
+125
+145
+162
+168
+164
+167
+171
+169
+158
+148
+137
+119
+95
+84
+78
+78
+72
+62
+60
+62
+62
+66
+67
+71
+74
+73
+70
+63
+57
+55
+47
+43
+42
+41
+42
+46
+54
+65
+59
+66
+65
+54
+66
+76
+62
+50
+40
+35
+40
+45
+42
+41
+43
+37
+41
+47
+52
+53
+48
+43
+39
+43
+44
+48
+48
+53
+54
+56
+58
+53
+54
+61
+67
+70
+71
+78
+82
+77
+63
+75
+105
+118
+100
+83
+82
+68
+65
+62
+60
+57
+51
+42
+36
+42
+40
+50
+84
+90
+86
+63
+70
+64
+55
+48
+45
+45
+43
+39
+35
+35
+36
+40
+45
+44
+41
+46
+53
+71
+65
+48
+45
+57
+58
+49
+49
+48
+49
+50
+51
+50
+47
+46
+46
+42
+43
+66
+89
+108
+128
+137
+131
+124
+126
+127
+129
+129
+124
+117
+112
+101
+93
+86
+90
+93
+82
+66
+60
+63
+67
+75
+81
+86
+90
+95
+97
+101
+104
+109
+113
+114
+114
+112
+111
+114
+116
+116
+116
+116
+114
+116
+119
+123
+120
+120
+130
+149
+167
+181
+193
+191
+182
+168
+58
+58
+58
+58
+58
+58
+58
+58
+58
+58
+58
+59
+59
+60
+60
+60
+60
+60
+60
+61
+59
+60
+60
+60
+59
+59
+60
+63
+63
+64
+65
+70
+80
+93
+101
+115
+133
+151
+157
+151
+150
+159
+161
+150
+133
+117
+100
+80
+72
+78
+81
+74
+64
+60
+63
+66
+70
+70
+71
+72
+73
+69
+62
+54
+53
+45
+40
+40
+41
+42
+45
+51
+69
+63
+62
+56
+47
+58
+80
+91
+67
+51
+37
+39
+43
+43
+43
+44
+38
+45
+52
+52
+48
+44
+43
+45
+56
+59
+61
+60
+61
+61
+60
+62
+65
+66
+75
+78
+78
+79
+88
+95
+72
+91
+108
+107
+99
+95
+88
+74
+81
+71
+58
+50
+45
+45
+43
+42
+47
+40
+66
+99
+71
+75
+57
+57
+74
+60
+48
+45
+47
+43
+41
+40
+38
+37
+41
+45
+41
+39
+47
+59
+65
+61
+50
+46
+55
+54
+46
+45
+45
+44
+47
+49
+49
+49
+49
+50
+41
+41
+58
+82
+104
+125
+137
+132
+125
+127
+128
+128
+127
+121
+115
+111
+99
+96
+88
+91
+95
+78
+58
+56
+69
+73
+83
+89
+93
+96
+103
+108
+108
+109
+111
+112
+111
+110
+108
+108
+113
+113
+114
+114
+111
+112
+114
+116
+118
+116
+119
+132
+153
+175
+190
+204
+202
+192
+175
+56
+56
+56
+56
+56
+56
+56
+56
+56
+56
+56
+57
+57
+58
+58
+58
+60
+60
+60
+61
+59
+60
+60
+60
+58
+59
+59
+62
+62
+62
+60
+65
+77
+87
+95
+109
+128
+146
+152
+145
+142
+148
+148
+135
+121
+108
+91
+75
+66
+75
+79
+73
+67
+66
+67
+66
+69
+69
+70
+70
+70
+66
+60
+53
+51
+43
+39
+41
+42
+44
+49
+55
+58
+57
+51
+50
+50
+52
+69
+97
+91
+67
+47
+45
+46
+42
+43
+47
+44
+47
+51
+50
+47
+44
+47
+53
+66
+68
+69
+65
+63
+60
+56
+55
+65
+69
+77
+80
+80
+84
+96
+104
+87
+108
+116
+100
+89
+90
+84
+66
+82
+67
+49
+40
+36
+38
+38
+39
+46
+44
+77
+81
+62
+62
+51
+55
+81
+64
+49
+45
+44
+40
+40
+41
+39
+38
+38
+42
+40
+40
+52
+70
+65
+64
+54
+48
+51
+49
+43
+45
+47
+45
+47
+47
+47
+49
+49
+50
+46
+40
+50
+72
+94
+122
+138
+135
+129
+130
+132
+130
+124
+117
+111
+108
+96
+97
+87
+89
+93
+71
+49
+54
+68
+78
+91
+99
+104
+106
+110
+115
+116
+116
+114
+112
+110
+109
+108
+108
+110
+110
+111
+111
+108
+107
+110
+114
+116
+116
+119
+133
+154
+175
+189
+204
+201
+189
+171
+56
+56
+56
+56
+56
+56
+56
+56
+56
+56
+56
+57
+57
+58
+58
+58
+60
+60
+60
+61
+61
+60
+60
+60
+62
+61
+63
+63
+63
+62
+59
+63
+75
+84
+92
+107
+127
+148
+156
+151
+148
+149
+144
+133
+122
+111
+91
+76
+69
+78
+81
+76
+74
+73
+70
+64
+68
+67
+67
+65
+65
+61
+56
+52
+49
+43
+40
+44
+46
+49
+55
+61
+52
+53
+46
+48
+54
+39
+41
+71
+106
+80
+55
+48
+48
+42
+43
+48
+48
+50
+51
+50
+49
+50
+54
+60
+53
+56
+56
+56
+55
+53
+52
+53
+50
+57
+66
+71
+74
+77
+92
+104
+115
+106
+98
+93
+93
+89
+76
+59
+70
+59
+46
+40
+39
+40
+38
+37
+39
+43
+74
+50
+56
+49
+47
+64
+83
+65
+49
+42
+40
+37
+36
+40
+40
+38
+37
+42
+38
+37
+53
+74
+65
+66
+54
+46
+49
+47
+43
+50
+47
+46
+45
+43
+42
+42
+44
+44
+49
+40
+46
+66
+88
+119
+139
+138
+133
+133
+134
+130
+122
+114
+108
+105
+92
+94
+85
+86
+90
+67
+45
+53
+63
+74
+92
+103
+108
+110
+114
+118
+122
+119
+114
+109
+105
+103
+103
+105
+107
+109
+109
+108
+104
+105
+106
+111
+115
+114
+120
+132
+152
+169
+181
+194
+196
+183
+164
+55
+55
+55
+55
+55
+55
+55
+55
+56
+56
+56
+56
+56
+56
+56
+58
+60
+61
+62
+60
+60
+61
+63
+65
+66
+63
+64
+65
+66
+66
+65
+66
+76
+80
+91
+108
+134
+156
+170
+173
+166
+166
+159
+144
+128
+115
+102
+96
+87
+79
+74
+76
+79
+75
+69
+70
+66
+63
+61
+58
+57
+54
+48
+44
+38
+48
+44
+40
+53
+61
+53
+50
+53
+49
+46
+45
+42
+42
+39
+37
+48
+76
+79
+57
+42
+46
+51
+45
+42
+66
+47
+59
+62
+56
+77
+51
+50
+50
+50
+39
+42
+47
+47
+38
+41
+55
+46
+55
+64
+57
+112
+66
+108
+105
+99
+92
+87
+77
+64
+52
+55
+55
+49
+38
+33
+35
+39
+41
+45
+47
+63
+55
+49
+52
+52
+67
+72
+69
+59
+48
+41
+40
+41
+42
+47
+44
+35
+30
+36
+47
+59
+63
+70
+61
+48
+42
+44
+49
+51
+52
+49
+49
+49
+46
+46
+45
+45
+47
+48
+37
+49
+51
+89
+113
+143
+134
+140
+141
+135
+123
+116
+115
+110
+101
+99
+89
+91
+89
+105
+59
+45
+54
+66
+77
+93
+99
+103
+106
+110
+111
+110
+109
+108
+105
+104
+102
+101
+102
+108
+109
+108
+107
+103
+102
+103
+105
+109
+114
+118
+124
+137
+153
+164
+174
+173
+158
+141
+55
+55
+55
+55
+55
+55
+55
+55
+56
+56
+56
+56
+56
+56
+56
+58
+59
+62
+63
+62
+61
+61
+63
+66
+67
+65
+66
+66
+68
+70
+72
+73
+78
+84
+97
+116
+142
+166
+183
+187
+199
+182
+160
+142
+133
+125
+111
+100
+99
+90
+82
+83
+86
+80
+74
+69
+63
+60
+58
+56
+55
+52
+47
+44
+43
+45
+40
+44
+54
+52
+49
+55
+48
+45
+42
+40
+38
+38
+37
+39
+46
+59
+68
+60
+47
+40
+41
+46
+51
+69
+49
+60
+65
+60
+77
+50
+44
+40
+44
+44
+43
+40
+40
+44
+39
+40
+44
+68
+38
+65
+80
+51
+117
+106
+97
+93
+83
+67
+56
+54
+44
+53
+54
+44
+31
+26
+25
+27
+37
+54
+80
+71
+52
+53
+61
+85
+66
+63
+57
+47
+41
+44
+47
+48
+51
+49
+46
+45
+46
+51
+57
+61
+64
+56
+45
+42
+44
+49
+51
+51
+50
+50
+49
+48
+46
+45
+45
+45
+49
+36
+47
+50
+87
+115
+144
+136
+140
+138
+132
+121
+116
+114
+110
+103
+97
+90
+95
+96
+92
+55
+46
+57
+67
+75
+89
+95
+98
+102
+105
+106
+105
+105
+104
+101
+100
+100
+99
+101
+106
+108
+108
+105
+101
+99
+99
+99
+104
+107
+112
+115
+124
+132
+135
+139
+126
+111
+95
+56
+56
+56
+56
+56
+56
+56
+56
+56
+56
+56
+56
+56
+56
+56
+56
+58
+62
+64
+64
+63
+62
+63
+67
+69
+71
+71
+73
+77
+79
+84
+86
+88
+96
+112
+134
+161
+185
+201
+206
+210
+196
+178
+159
+147
+138
+122
+109
+105
+92
+81
+79
+82
+81
+75
+69
+61
+58
+57
+55
+55
+52
+48
+45
+45
+43
+44
+54
+63
+50
+41
+50
+47
+46
+44
+44
+40
+38
+38
+42
+45
+46
+57
+67
+58
+37
+35
+50
+53
+68
+50
+59
+63
+61
+80
+59
+48
+38
+39
+51
+47
+39
+37
+50
+41
+57
+48
+48
+60
+93
+73
+101
+102
+92
+84
+82
+73
+59
+52
+57
+44
+50
+53
+49
+45
+41
+35
+32
+30
+42
+67
+58
+44
+53
+66
+93
+58
+59
+57
+51
+47
+52
+56
+59
+60
+59
+59
+63
+62
+58
+61
+68
+57
+52
+44
+43
+45
+49
+50
+50
+50
+50
+49
+48
+46
+45
+45
+45
+50
+37
+43
+48
+84
+119
+146
+138
+137
+137
+129
+120
+114
+111
+107
+102
+95
+92
+98
+103
+72
+51
+50
+60
+69
+78
+90
+94
+95
+99
+103
+103
+102
+102
+99
+98
+98
+97
+98
+99
+102
+104
+104
+101
+97
+96
+96
+96
+106
+110
+115
+116
+119
+117
+110
+108
+87
+76
+62
+57
+57
+57
+57
+57
+57
+57
+57
+57
+57
+57
+57
+57
+57
+57
+57
+56
+58
+60
+62
+63
+62
+67
+69
+72
+79
+84
+89
+95
+99
+102
+104
+108
+116
+134
+155
+181
+200
+214
+220
+212
+208
+194
+167
+144
+130
+124
+123
+116
+103
+92
+84
+80
+77
+71
+66
+59
+56
+55
+55
+54
+52
+49
+46
+42
+45
+48
+58
+71
+63
+46
+41
+49
+49
+48
+49
+45
+39
+38
+43
+45
+43
+52
+66
+61
+44
+42
+54
+45
+58
+48
+53
+58
+62
+86
+79
+69
+56
+38
+49
+44
+50
+42
+46
+57
+28
+54
+49
+63
+76
+98
+85
+67
+68
+70
+65
+61
+57
+56
+55
+51
+49
+50
+58
+72
+83
+78
+64
+50
+53
+73
+76
+82
+90
+81
+86
+49
+54
+57
+55
+53
+57
+60
+59
+64
+61
+61
+67
+63
+56
+61
+74
+51
+48
+43
+44
+46
+48
+49
+49
+50
+50
+49
+48
+46
+45
+45
+45
+51
+39
+40
+46
+79
+121
+146
+139
+137
+135
+126
+118
+111
+106
+102
+98
+92
+94
+100
+104
+53
+48
+56
+67
+75
+80
+89
+92
+94
+98
+101
+102
+100
+97
+97
+96
+96
+96
+97
+99
+102
+103
+102
+98
+96
+93
+93
+95
+103
+110
+116
+115
+117
+113
+105
+100
+84
+75
+64
+59
+59
+59
+59
+59
+59
+59
+59
+59
+59
+59
+59
+59
+59
+59
+57
+53
+53
+57
+59
+62
+64
+70
+75
+81
+92
+104
+115
+121
+123
+125
+127
+129
+138
+153
+172
+193
+208
+220
+225
+224
+214
+190
+159
+130
+115
+111
+107
+109
+108
+105
+96
+87
+77
+66
+61
+59
+56
+56
+55
+55
+53
+48
+47
+41
+51
+48
+49
+72
+81
+67
+48
+48
+45
+47
+51
+49
+42
+39
+42
+44
+48
+53
+57
+57
+51
+50
+50
+38
+50
+47
+48
+50
+59
+84
+94
+95
+83
+49
+51
+45
+69
+54
+44
+45
+63
+52
+54
+104
+66
+49
+52
+42
+61
+69
+58
+55
+61
+59
+48
+51
+59
+70
+83
+99
+108
+107
+97
+62
+64
+91
+103
+112
+106
+75
+59
+48
+55
+60
+59
+53
+52
+49
+49
+59
+55
+54
+56
+52
+51
+60
+75
+47
+46
+43
+44
+46
+48
+47
+49
+50
+50
+49
+48
+46
+45
+45
+45
+51
+42
+37
+45
+71
+121
+145
+140
+137
+132
+124
+116
+109
+102
+96
+93
+92
+97
+101
+97
+43
+48
+62
+73
+77
+83
+92
+95
+95
+99
+99
+98
+96
+96
+95
+95
+95
+96
+97
+98
+100
+101
+100
+96
+94
+90
+92
+94
+97
+103
+109
+112
+115
+114
+110
+106
+100
+94
+84
+60
+60
+60
+60
+60
+60
+60
+60
+60
+60
+60
+60
+60
+60
+60
+58
+52
+52
+56
+58
+62
+69
+77
+84
+97
+112
+129
+140
+145
+147
+147
+148
+149
+157
+170
+183
+196
+207
+216
+218
+218
+201
+180
+162
+145
+123
+93
+64
+66
+73
+82
+85
+82
+77
+67
+58
+60
+59
+57
+56
+56
+54
+48
+47
+44
+54
+43
+36
+63
+92
+90
+73
+50
+41
+41
+48
+48
+44
+41
+45
+42
+49
+50
+47
+48
+53
+51
+43
+39
+45
+49
+46
+45
+53
+71
+87
+98
+97
+60
+60
+44
+75
+57
+47
+53
+40
+41
+89
+65
+61
+58
+35
+43
+62
+69
+57
+50
+55
+53
+46
+55
+78
+101
+110
+108
+105
+108
+107
+76
+74
+90
+84
+77
+70
+50
+47
+60
+68
+72
+67
+56
+51
+46
+45
+58
+58
+55
+52
+52
+58
+67
+74
+46
+44
+44
+44
+45
+47
+47
+47
+50
+50
+49
+48
+46
+45
+45
+45
+49
+45
+36
+44
+61
+118
+141
+141
+135
+129
+120
+114
+107
+98
+92
+90
+92
+99
+96
+77
+43
+48
+64
+73
+78
+82
+91
+95
+96
+100
+99
+96
+93
+92
+92
+93
+94
+95
+97
+98
+98
+98
+98
+95
+91
+89
+89
+90
+95
+101
+107
+109
+115
+117
+115
+114
+112
+109
+102
+61
+61
+61
+61
+61
+61
+61
+61
+60
+60
+60
+60
+60
+60
+60
+58
+54
+54
+57
+60
+65
+75
+86
+97
+118
+134
+151
+161
+165
+163
+165
+167
+171
+178
+184
+191
+196
+200
+206
+205
+198
+187
+179
+176
+169
+148
+109
+76
+50
+52
+52
+57
+68
+78
+75
+67
+63
+61
+59
+58
+56
+53
+49
+48
+48
+54
+44
+39
+63
+86
+91
+87
+66
+50
+41
+44
+48
+44
+43
+48
+44
+47
+47
+46
+49
+52
+48
+37
+41
+42
+47
+46
+46
+51
+55
+67
+82
+94
+75
+87
+55
+74
+60
+69
+56
+46
+51
+73
+59
+58
+37
+61
+59
+62
+65
+60
+54
+50
+59
+68
+83
+101
+115
+115
+106
+103
+104
+102
+100
+86
+84
+61
+48
+52
+51
+64
+69
+75
+76
+65
+55
+51
+49
+51
+55
+62
+61
+55
+58
+69
+72
+66
+47
+45
+45
+44
+45
+44
+47
+48
+50
+50
+49
+48
+46
+45
+45
+45
+47
+48
+37
+44
+53
+113
+138
+141
+132
+124
+116
+112
+106
+97
+93
+94
+95
+102
+91
+54
+48
+49
+64
+69
+77
+82
+91
+94
+97
+100
+97
+93
+89
+87
+88
+88
+92
+93
+95
+96
+95
+94
+94
+92
+89
+87
+86
+88
+95
+100
+104
+108
+111
+113
+109
+106
+104
+101
+96
+61
+61
+61
+61
+61
+61
+61
+61
+60
+60
+60
+60
+60
+60
+60
+58
+57
+57
+60
+64
+71
+82
+97
+109
+138
+152
+168
+176
+176
+175
+176
+181
+190
+195
+196
+196
+193
+191
+190
+188
+187
+180
+175
+169
+166
+162
+150
+136
+84
+71
+53
+48
+63
+81
+86
+79
+67
+63
+61
+59
+58
+53
+49
+48
+48
+53
+51
+53
+69
+77
+79
+88
+85
+62
+45
+46
+49
+45
+44
+48
+48
+45
+46
+51
+55
+52
+45
+37
+43
+37
+45
+45
+50
+53
+47
+52
+70
+93
+92
+117
+74
+77
+67
+96
+115
+64
+128
+112
+84
+63
+50
+62
+75
+62
+63
+70
+66
+56
+74
+103
+119
+114
+110
+103
+107
+111
+110
+101
+93
+73
+71
+52
+48
+52
+46
+53
+63
+68
+65
+56
+47
+47
+49
+54
+47
+60
+61
+54
+58
+69
+65
+52
+46
+46
+45
+44
+42
+44
+47
+49
+49
+50
+49
+48
+46
+45
+45
+45
+46
+50
+37
+44
+49
+111
+136
+142
+128
+120
+113
+111
+106
+97
+95
+96
+98
+103
+87
+39
+51
+47
+60
+63
+76
+81
+91
+95
+98
+100
+95
+90
+85
+85
+85
+86
+90
+92
+93
+93
+91
+91
+91
+88
+87
+85
+84
+88
+90
+95
+99
+100
+102
+102
+93
+88
+81
+82
+76
+60
+62
+64
+64
+63
+63
+63
+65
+66
+63
+61
+61
+65
+67
+66
+62
+63
+62
+64
+73
+80
+90
+112
+137
+154
+165
+177
+185
+186
+183
+180
+182
+198
+202
+202
+198
+195
+190
+187
+180
+181
+176
+172
+165
+163
+161
+156
+152
+136
+103
+70
+103
+101
+63
+78
+99
+76
+65
+57
+58
+57
+53
+49
+54
+49
+46
+59
+51
+63
+75
+65
+86
+84
+73
+57
+47
+45
+47
+47
+47
+45
+44
+48
+52
+48
+41
+40
+44
+36
+38
+41
+45
+48
+48
+49
+52
+57
+78
+93
+83
+61
+60
+96
+132
+128
+113
+107
+109
+107
+97
+92
+96
+90
+75
+66
+65
+62
+57
+62
+72
+95
+105
+114
+112
+109
+110
+111
+103
+83
+64
+53
+49
+49
+46
+49
+52
+61
+58
+55
+52
+48
+49
+51
+54
+60
+59
+59
+60
+59
+57
+51
+47
+44
+46
+46
+43
+43
+44
+44
+48
+50
+51
+50
+49
+47
+46
+46
+46
+53
+44
+44
+38
+55
+87
+154
+131
+128
+124
+114
+104
+101
+101
+100
+96
+108
+100
+63
+32
+38
+46
+53
+67
+69
+77
+90
+98
+96
+92
+89
+89
+83
+82
+83
+84
+88
+90
+93
+91
+88
+87
+88
+87
+87
+85
+84
+83
+91
+93
+94
+91
+85
+77
+67
+62
+46
+47
+46
+59
+62
+64
+64
+64
+63
+64
+65
+66
+64
+63
+64
+66
+67
+66
+64
+71
+70
+71
+83
+97
+111
+131
+150
+162
+174
+184
+185
+181
+180
+182
+190
+206
+211
+209
+206
+199
+193
+186
+177
+172
+167
+167
+164
+164
+163
+158
+154
+154
+128
+100
+119
+109
+74
+91
+112
+91
+76
+64
+62
+64
+59
+54
+52
+56
+51
+56
+46
+51
+64
+59
+77
+96
+81
+58
+41
+38
+45
+45
+41
+49
+53
+55
+51
+46
+41
+42
+42
+46
+43
+43
+43
+44
+44
+46
+50
+55
+64
+76
+91
+98
+100
+101
+105
+87
+82
+86
+100
+111
+107
+95
+84
+58
+53
+54
+57
+53
+45
+54
+67
+90
+100
+108
+109
+110
+109
+104
+90
+69
+55
+52
+51
+53
+48
+47
+50
+57
+55
+52
+51
+49
+50
+53
+54
+59
+58
+58
+57
+57
+53
+49
+44
+44
+45
+44
+44
+43
+44
+44
+48
+50
+51
+50
+49
+47
+46
+46
+46
+51
+50
+46
+42
+52
+91
+147
+125
+122
+118
+111
+105
+102
+98
+99
+99
+104
+86
+56
+35
+35
+40
+47
+56
+65
+74
+88
+95
+93
+88
+86
+84
+79
+80
+81
+82
+86
+88
+91
+89
+88
+87
+87
+87
+84
+81
+82
+81
+80
+78
+76
+70
+63
+54
+47
+43
+45
+45
+45
+60
+62
+65
+65
+65
+65
+66
+67
+68
+67
+66
+67
+68
+68
+67
+67
+77
+77
+82
+98
+116
+132
+149
+164
+172
+182
+187
+181
+176
+175
+184
+196
+213
+217
+217
+216
+209
+202
+193
+184
+173
+169
+167
+166
+167
+165
+160
+154
+144
+129
+107
+112
+96
+71
+85
+105
+117
+95
+76
+68
+68
+64
+58
+54
+58
+54
+58
+48
+44
+51
+47
+56
+92
+91
+77
+54
+40
+43
+45
+44
+50
+62
+67
+54
+41
+39
+39
+37
+42
+41
+41
+41
+44
+47
+52
+57
+40
+51
+67
+88
+98
+97
+91
+91
+80
+81
+87
+101
+116
+115
+93
+66
+53
+52
+60
+62
+57
+52
+69
+87
+83
+87
+95
+102
+107
+105
+89
+73
+55
+49
+53
+56
+59
+53
+49
+48
+51
+50
+48
+48
+49
+51
+54
+56
+57
+57
+55
+56
+56
+52
+48
+43
+45
+45
+44
+44
+41
+41
+44
+48
+50
+51
+50
+49
+47
+46
+46
+46
+48
+57
+48
+46
+46
+98
+136
+119
+120
+115
+109
+108
+102
+93
+95
+102
+103
+74
+52
+44
+39
+40
+47
+48
+60
+69
+81
+91
+90
+85
+82
+79
+77
+75
+76
+80
+84
+85
+88
+87
+89
+87
+85
+84
+82
+77
+77
+76
+71
+69
+65
+59
+51
+45
+42
+39
+48
+49
+50
+58
+61
+63
+65
+64
+65
+66
+68
+67
+67
+67
+68
+68
+67
+66
+68
+77
+86
+99
+115
+134
+149
+163
+173
+180
+183
+180
+175
+172
+177
+190
+202
+221
+225
+225
+225
+217
+208
+198
+189
+179
+175
+174
+171
+170
+167
+158
+150
+139
+132
+118
+113
+99
+87
+96
+109
+137
+116
+93
+78
+71
+68
+63
+60
+56
+56
+63
+59
+48
+47
+41
+35
+59
+82
+92
+69
+44
+39
+43
+45
+50
+75
+88
+70
+48
+42
+43
+40
+38
+37
+37
+37
+41
+44
+48
+52
+39
+44
+54
+66
+72
+73
+78
+86
+93
+98
+97
+100
+111
+115
+94
+61
+55
+52
+54
+52
+50
+52
+73
+95
+73
+73
+76
+86
+96
+93
+77
+56
+51
+51
+56
+62
+63
+59
+53
+50
+50
+49
+48
+48
+49
+51
+54
+55
+55
+57
+55
+56
+54
+52
+46
+43
+44
+45
+44
+44
+41
+41
+43
+47
+50
+51
+50
+49
+47
+46
+46
+46
+47
+60
+49
+46
+44
+106
+128
+116
+121
+113
+107
+106
+99
+89
+94
+104
+101
+66
+55
+59
+49
+45
+51
+45
+54
+62
+76
+85
+88
+82
+80
+75
+73
+74
+75
+77
+80
+84
+87
+86
+88
+85
+83
+80
+77
+74
+72
+71
+68
+65
+61
+56
+54
+54
+55
+56
+56
+56
+58
+56
+58
+62
+63
+64
+64
+66
+68
+66
+67
+68
+68
+67
+66
+66
+73
+82
+104
+123
+137
+151
+161
+171
+180
+183
+179
+173
+171
+176
+187
+198
+206
+223
+224
+228
+228
+225
+217
+209
+202
+194
+191
+188
+182
+181
+175
+163
+151
+140
+128
+121
+113
+107
+105
+101
+105
+132
+126
+114
+100
+89
+78
+69
+64
+55
+55
+61
+63
+51
+51
+53
+35
+34
+59
+75
+64
+47
+42
+42
+42
+50
+85
+104
+88
+62
+51
+50
+48
+45
+44
+43
+41
+39
+36
+36
+35
+44
+39
+41
+53
+65
+71
+71
+72
+80
+91
+97
+97
+104
+109
+95
+68
+60
+55
+56
+56
+61
+67
+83
+95
+63
+59
+59
+68
+79
+77
+65
+51
+49
+53
+56
+57
+57
+55
+51
+48
+50
+49
+48
+48
+50
+51
+52
+53
+56
+56
+56
+57
+55
+53
+47
+44
+45
+46
+45
+42
+41
+41
+41
+45
+50
+51
+50
+49
+47
+46
+46
+46
+47
+58
+48
+45
+51
+112
+122
+116
+116
+109
+102
+100
+99
+94
+100
+109
+91
+62
+61
+70
+59
+52
+54
+46
+51
+56
+70
+78
+83
+82
+77
+74
+72
+72
+73
+76
+79
+83
+86
+85
+86
+85
+82
+76
+75
+72
+70
+70
+66
+63
+59
+56
+58
+61
+64
+67
+63
+61
+63
+53
+56
+59
+61
+62
+63
+65
+67
+67
+68
+68
+68
+67
+67
+69
+80
+99
+124
+144
+154
+161
+169
+176
+180
+179
+176
+171
+174
+185
+199
+209
+209
+220
+221
+226
+228
+227
+224
+219
+214
+209
+204
+198
+192
+190
+184
+168
+153
+134
+116
+113
+101
+101
+103
+91
+91
+109
+117
+123
+121
+112
+99
+84
+71
+63
+58
+54
+59
+49
+58
+74
+50
+41
+44
+46
+47
+49
+53
+49
+45
+47
+77
+93
+83
+63
+52
+49
+48
+51
+50
+50
+49
+47
+44
+43
+41
+24
+34
+50
+62
+64
+58
+59
+64
+67
+83
+95
+98
+102
+104
+89
+67
+62
+59
+67
+74
+84
+89
+93
+94
+58
+53
+51
+58
+65
+63
+56
+50
+50
+53
+54
+50
+48
+48
+48
+46
+52
+52
+51
+50
+51
+51
+51
+51
+56
+56
+56
+57
+55
+53
+47
+44
+45
+44
+43
+42
+40
+40
+40
+44
+50
+51
+50
+49
+47
+46
+46
+46
+49
+51
+49
+45
+67
+117
+117
+113
+105
+102
+97
+94
+98
+100
+105
+105
+70
+58
+60
+67
+62
+55
+52
+46
+46
+50
+62
+72
+77
+79
+75
+71
+70
+71
+72
+74
+78
+82
+85
+85
+85
+81
+78
+75
+72
+69
+70
+71
+69
+68
+65
+63
+64
+66
+71
+71
+66
+64
+64
+50
+53
+57
+59
+60
+62
+64
+66
+69
+70
+70
+69
+67
+69
+74
+89
+119
+142
+153
+160
+166
+173
+175
+175
+172
+174
+176
+182
+192
+205
+216
+214
+210
+210
+217
+222
+223
+224
+223
+221
+217
+212
+204
+196
+193
+186
+170
+153
+139
+113
+111
+101
+101
+106
+89
+95
+84
+96
+110
+118
+119
+115
+102
+87
+78
+66
+54
+61
+52
+61
+82
+48
+48
+43
+40
+46
+51
+51
+49
+51
+54
+62
+67
+64
+55
+49
+47
+47
+51
+51
+51
+51
+53
+53
+56
+54
+24
+37
+56
+61
+53
+43
+48
+62
+74
+85
+97
+101
+100
+97
+82
+64
+47
+47
+57
+64
+72
+74
+73
+70
+59
+54
+54
+60
+57
+52
+50
+52
+48
+53
+52
+46
+42
+44
+46
+44
+53
+52
+52
+51
+53
+53
+53
+53
+55
+55
+55
+56
+54
+52
+46
+43
+46
+45
+43
+42
+38
+38
+40
+44
+50
+51
+50
+49
+47
+46
+46
+46
+51
+43
+53
+48
+88
+120
+110
+105
+96
+102
+98
+93
+98
+104
+101
+89
+47
+55
+58
+59
+62
+56
+48
+48
+44
+46
+54
+64
+71
+74
+73
+70
+68
+66
+69
+72
+76
+79
+82
+83
+82
+80
+78
+74
+72
+70
+72
+72
+72
+72
+71
+70
+72
+75
+79
+78
+66
+64
+64
+51
+54
+57
+60
+61
+63
+63
+65
+70
+71
+72
+70
+73
+77
+85
+102
+137
+154
+158
+159
+164
+173
+175
+169
+169
+175
+184
+191
+200
+211
+221
+222
+211
+209
+216
+221
+223
+223
+223
+222
+217
+213
+203
+196
+193
+185
+170
+150
+132
+103
+102
+90
+88
+95
+80
+93
+70
+77
+88
+99
+114
+122
+119
+106
+92
+79
+66
+73
+61
+64
+79
+34
+39
+39
+46
+54
+45
+34
+39
+55
+63
+55
+46
+48
+53
+53
+52
+52
+52
+50
+46
+43
+41
+43
+44
+45
+62
+50
+41
+45
+50
+53
+52
+51
+78
+81
+85
+89
+93
+88
+79
+64
+43
+43
+47
+50
+52
+54
+56
+54
+62
+59
+63
+66
+62
+53
+51
+57
+51
+55
+57
+47
+43
+46
+49
+47
+52
+52
+52
+52
+54
+54
+54
+54
+54
+53
+53
+52
+53
+49
+45
+40
+44
+43
+43
+40
+38
+36
+38
+42
+48
+50
+50
+47
+47
+44
+44
+46
+52
+38
+57
+53
+103
+121
+105
+99
+93
+104
+101
+93
+97
+104
+93
+70
+35
+56
+58
+54
+63
+57
+45
+49
+39
+40
+49
+58
+69
+73
+74
+72
+67
+66
+67
+69
+72
+77
+80
+81
+80
+77
+74
+73
+71
+70
+72
+73
+71
+70
+71
+73
+75
+77
+78
+78
+67
+63
+66
+54
+56
+59
+62
+62
+62
+62
+63
+62
+63
+66
+71
+82
+95
+110
+126
+147
+160
+168
+169
+166
+163
+162
+164
+173
+181
+192
+204
+214
+223
+231
+232
+223
+218
+219
+220
+220
+219
+216
+213
+210
+207
+201
+198
+193
+184
+171
+155
+124
+108
+96
+90
+85
+80
+78
+79
+73
+80
+80
+83
+100
+114
+124
+134
+113
+115
+93
+76
+65
+84
+49
+42
+42
+40
+39
+38
+40
+43
+46
+49
+46
+50
+52
+48
+40
+39
+47
+53
+48
+48
+46
+43
+41
+42
+44
+47
+46
+52
+58
+60
+59
+52
+44
+38
+55
+66
+76
+83
+86
+82
+73
+58
+42
+40
+44
+46
+47
+50
+51
+54
+62
+63
+63
+63
+63
+63
+60
+60
+55
+56
+59
+57
+54
+53
+54
+58
+52
+51
+52
+53
+53
+53
+51
+52
+53
+54
+52
+52
+51
+47
+44
+41
+44
+42
+40
+38
+38
+37
+37
+38
+45
+47
+48
+46
+44
+43
+42
+44
+48
+46
+53
+64
+117
+113
+106
+99
+105
+90
+94
+103
+99
+107
+87
+35
+32
+39
+52
+60
+57
+49
+47
+47
+38
+37
+46
+56
+68
+75
+78
+74
+70
+66
+64
+66
+70
+74
+80
+81
+76
+72
+71
+72
+74
+73
+72
+71
+74
+73
+71
+71
+74
+72
+71
+67
+60
+61
+66
+52
+54
+60
+63
+63
+62
+62
+61
+59
+60
+65
+73
+88
+105
+121
+134
+149
+158
+162
+162
+159
+159
+161
+164
+176
+186
+197
+207
+217
+224
+230
+229
+221
+217
+218
+219
+218
+217
+214
+211
+210
+205
+200
+198
+192
+183
+170
+154
+123
+105
+94
+89
+83
+77
+74
+75
+75
+82
+82
+82
+97
+106
+111
+119
+133
+133
+115
+100
+83
+85
+44
+37
+41
+38
+37
+38
+39
+42
+45
+47
+44
+44
+44
+44
+43
+43
+43
+44
+49
+48
+46
+44
+42
+40
+38
+38
+42
+48
+53
+56
+57
+55
+52
+49
+45
+54
+64
+71
+73
+70
+59
+42
+37
+36
+41
+44
+47
+51
+55
+58
+64
+65
+65
+65
+64
+60
+61
+58
+57
+56
+58
+59
+57
+58
+58
+60
+52
+53
+52
+53
+53
+53
+51
+50
+53
+54
+52
+52
+49
+47
+44
+41
+42
+42
+40
+38
+38
+37
+37
+37
+43
+43
+44
+42
+42
+40
+41
+42
+49
+43
+51
+88
+114
+111
+98
+104
+99
+95
+91
+97
+109
+98
+64
+37
+39
+40
+44
+49
+48
+45
+46
+44
+29
+39
+60
+74
+82
+81
+79
+76
+70
+65
+64
+64
+68
+72
+77
+78
+75
+71
+72
+70
+74
+73
+74
+72
+75
+73
+72
+70
+71
+71
+69
+65
+62
+63
+66
+46
+49
+55
+58
+59
+60
+61
+60
+60
+60
+66
+77
+93
+108
+123
+137
+148
+153
+152
+149
+148
+152
+160
+166
+181
+191
+202
+210
+216
+220
+224
+221
+215
+211
+211
+211
+212
+211
+208
+206
+205
+199
+194
+191
+186
+175
+162
+145
+119
+102
+91
+86
+82
+75
+72
+72
+81
+89
+89
+87
+98
+105
+107
+113
+132
+134
+129
+121
+104
+88
+43
+38
+41
+39
+38
+37
+38
+40
+43
+44
+45
+41
+39
+42
+47
+47
+40
+34
+46
+45
+44
+44
+43
+41
+38
+36
+41
+44
+46
+48
+51
+54
+55
+56
+49
+54
+59
+60
+62
+61
+54
+43
+37
+38
+44
+47
+51
+53
+57
+60
+59
+61
+61
+59
+58
+55
+55
+54
+55
+53
+55
+59
+60
+62
+60
+59
+52
+53
+52
+53
+53
+53
+51
+50
+54
+55
+53
+53
+49
+47
+44
+40
+41
+41
+39
+37
+37
+36
+36
+37
+39
+41
+42
+40
+40
+40
+41
+43
+50
+42
+54
+112
+108
+104
+91
+108
+92
+100
+90
+98
+113
+82
+41
+42
+43
+39
+38
+41
+42
+40
+41
+38
+29
+52
+84
+100
+96
+83
+76
+71
+67
+63
+64
+64
+69
+74
+77
+78
+77
+72
+72
+71
+75
+75
+76
+74
+75
+74
+70
+71
+72
+71
+70
+66
+68
+69
+72
+42
+45
+52
+55
+58
+59
+60
+60
+60
+61
+68
+79
+98
+114
+128
+140
+149
+148
+143
+139
+142
+152
+162
+173
+187
+195
+206
+213
+217
+219
+220
+217
+212
+209
+209
+210
+211
+210
+209
+206
+202
+196
+191
+187
+180
+169
+154
+137
+112
+96
+89
+84
+81
+73
+70
+69
+76
+89
+91
+92
+103
+107
+108
+115
+118
+115
+126
+129
+123
+97
+50
+41
+40
+39
+38
+37
+38
+39
+41
+42
+46
+42
+39
+41
+46
+46
+40
+33
+41
+41
+40
+41
+43
+43
+42
+41
+45
+47
+48
+47
+49
+49
+51
+51
+60
+59
+57
+51
+52
+55
+56
+49
+39
+41
+46
+49
+53
+54
+55
+58
+57
+59
+59
+60
+60
+58
+58
+58
+54
+54
+55
+59
+62
+63
+59
+56
+52
+53
+52
+53
+53
+53
+51
+52
+55
+55
+54
+53
+50
+47
+44
+42
+42
+40
+40
+38
+38
+36
+36
+36
+37
+40
+39
+40
+40
+40
+41
+43
+49
+46
+74
+119
+104
+94
+95
+102
+91
+97
+99
+108
+101
+61
+33
+46
+39
+39
+44
+46
+43
+36
+36
+36
+48
+77
+114
+124
+109
+87
+74
+69
+67
+64
+65
+67
+74
+76
+79
+79
+78
+73
+73
+72
+76
+76
+78
+77
+76
+74
+71
+72
+72
+73
+71
+68
+72
+73
+76
+39
+43
+49
+54
+57
+58
+61
+61
+61
+62
+68
+81
+101
+117
+129
+138
+144
+143
+136
+134
+141
+154
+170
+180
+193
+201
+208
+214
+217
+216
+217
+214
+209
+206
+209
+210
+210
+211
+211
+207
+205
+199
+192
+185
+175
+162
+146
+129
+104
+90
+84
+82
+79
+72
+68
+66
+68
+82
+87
+89
+100
+106
+108
+113
+110
+104
+118
+123
+126
+96
+50
+40
+40
+39
+39
+39
+39
+39
+40
+41
+47
+46
+44
+43
+43
+42
+41
+40
+43
+43
+44
+43
+42
+42
+44
+45
+48
+48
+50
+47
+48
+44
+45
+42
+55
+53
+52
+46
+48
+49
+50
+44
+37
+41
+48
+53
+56
+57
+59
+60
+63
+63
+64
+64
+65
+63
+63
+64
+56
+55
+55
+58
+61
+61
+56
+52
+52
+53
+54
+55
+53
+53
+53
+52
+56
+56
+54
+54
+50
+47
+44
+42
+42
+40
+40
+38
+38
+38
+38
+38
+37
+38
+39
+40
+40
+42
+44
+46
+47
+56
+100
+111
+103
+89
+104
+95
+95
+88
+108
+113
+79
+46
+45
+48
+41
+43
+47
+43
+34
+30
+40
+53
+83
+108
+139
+141
+119
+91
+75
+70
+68
+66
+68
+71
+78
+80
+83
+83
+78
+73
+73
+71
+76
+76
+79
+78
+74
+73
+72
+73
+73
+72
+71
+68
+73
+75
+78
+37
+42
+48
+51
+55
+58
+59
+60
+60
+61
+68
+82
+102
+117
+127
+134
+137
+138
+133
+135
+147
+163
+179
+190
+202
+209
+214
+216
+217
+215
+213
+212
+205
+204
+205
+207
+210
+210
+212
+208
+210
+201
+192
+182
+169
+155
+138
+120
+97
+86
+81
+80
+77
+73
+69
+67
+69
+82
+90
+90
+99
+103
+106
+111
+114
+104
+116
+106
+109
+81
+43
+35
+39
+40
+40
+40
+40
+41
+42
+42
+43
+45
+46
+44
+41
+39
+41
+44
+46
+50
+52
+49
+42
+38
+41
+44
+44
+44
+47
+45
+47
+43
+43
+40
+44
+47
+52
+51
+54
+51
+46
+35
+37
+42
+50
+57
+59
+60
+63
+63
+64
+64
+64
+61
+60
+57
+57
+55
+59
+58
+58
+58
+59
+58
+54
+51
+52
+53
+54
+55
+53
+53
+53
+52
+57
+57
+55
+54
+52
+47
+45
+42
+43
+41
+41
+39
+39
+37
+39
+37
+36
+37
+38
+39
+40
+42
+46
+48
+49
+72
+113
+98
+100
+90
+108
+92
+96
+87
+106
+102
+57
+43
+58
+51
+48
+48
+45
+35
+24
+29
+58
+84
+119
+135
+151
+147
+125
+98
+81
+70
+66
+66
+70
+74
+79
+82
+85
+84
+78
+75
+72
+70
+75
+76
+78
+79
+75
+74
+73
+73
+73
+72
+71
+67
+74
+77
+80
+35
+39
+45
+48
+52
+53
+56
+56
+60
+60
+67
+81
+101
+116
+124
+130
+136
+138
+138
+144
+160
+179
+196
+205
+216
+219
+222
+221
+216
+214
+212
+209
+203
+202
+205
+207
+211
+212
+214
+211
+210
+200
+188
+176
+163
+146
+127
+109
+91
+81
+78
+79
+77
+73
+71
+69
+70
+84
+91
+90
+97
+100
+101
+108
+115
+106
+111
+80
+80
+56
+39
+41
+39
+38
+39
+40
+42
+42
+42
+42
+39
+41
+44
+44
+42
+40
+40
+41
+42
+52
+61
+58
+47
+38
+39
+44
+41
+41
+43
+41
+43
+41
+43
+41
+43
+46
+52
+51
+54
+53
+49
+41
+46
+52
+57
+62
+62
+62
+64
+63
+60
+60
+57
+55
+53
+50
+50
+49
+57
+58
+59
+57
+55
+53
+54
+54
+54
+55
+54
+55
+55
+55
+55
+54
+58
+58
+58
+55
+52
+48
+45
+42
+42
+42
+42
+40
+40
+38
+40
+38
+34
+34
+36
+37
+40
+42
+45
+49
+54
+91
+111
+97
+95
+96
+102
+98
+95
+99
+96
+72
+51
+52
+61
+55
+54
+49
+43
+34
+30
+46
+80
+113
+138
+142
+146
+141
+125
+101
+81
+69
+64
+64
+68
+74
+80
+83
+85
+83
+78
+74
+71
+69
+74
+75
+78
+78
+75
+73
+73
+72
+74
+73
+72
+69
+76
+78
+81
+33
+37
+43
+46
+49
+52
+53
+54
+61
+60
+66
+81
+100
+112
+121
+126
+137
+140
+145
+154
+173
+192
+209
+220
+225
+228
+227
+225
+219
+213
+210
+206
+204
+201
+204
+206
+211
+214
+215
+212
+208
+196
+183
+171
+155
+136
+117
+99
+85
+76
+75
+77
+77
+73
+70
+70
+63
+77
+83
+82
+90
+92
+96
+101
+109
+102
+104
+59
+55
+37
+38
+50
+37
+38
+39
+41
+43
+44
+44
+44
+35
+37
+41
+44
+45
+42
+39
+36
+35
+50
+65
+64
+52
+41
+41
+47
+43
+42
+40
+39
+39
+40
+42
+43
+46
+47
+45
+42
+44
+49
+50
+49
+56
+61
+65
+66
+65
+60
+59
+58
+59
+57
+56
+56
+55
+54
+54
+55
+54
+58
+59
+57
+53
+52
+54
+58
+54
+55
+54
+55
+55
+55
+55
+54
+58
+58
+58
+57
+53
+50
+47
+43
+43
+42
+43
+42
+42
+40
+42
+40
+34
+34
+36
+37
+40
+43
+46
+49
+62
+102
+103
+100
+91
+103
+92
+104
+91
+111
+85
+45
+51
+63
+58
+57
+54
+49
+41
+38
+42
+63
+97
+127
+140
+139
+139
+132
+122
+101
+80
+64
+63
+62
+67
+74
+79
+82
+84
+82
+78
+73
+70
+68
+73
+75
+78
+78
+75
+74
+71
+70
+72
+71
+71
+68
+76
+79
+82
+33
+34
+38
+40
+45
+49
+51
+52
+53
+56
+64
+75
+89
+101
+115
+125
+130
+139
+150
+163
+182
+200
+216
+226
+238
+240
+236
+228
+220
+214
+211
+206
+198
+197
+201
+206
+208
+211
+210
+207
+197
+188
+175
+160
+143
+122
+103
+88
+81
+77
+76
+75
+73
+72
+71
+70
+59
+65
+79
+89
+88
+84
+91
+96
+101
+80
+60
+48
+47
+49
+47
+43
+40
+38
+40
+41
+41
+42
+44
+44
+37
+41
+44
+47
+47
+45
+42
+39
+41
+34
+74
+63
+35
+49
+47
+40
+43
+41
+40
+39
+38
+38
+38
+38
+41
+46
+50
+48
+44
+45
+52
+60
+69
+63
+60
+63
+64
+59
+58
+61
+62
+59
+56
+56
+57
+57
+56
+55
+61
+60
+58
+55
+53
+52
+53
+53
+55
+56
+57
+58
+59
+60
+60
+60
+59
+58
+58
+58
+57
+53
+48
+44
+43
+41
+43
+41
+41
+40
+42
+41
+35
+39
+35
+30
+37
+51
+54
+44
+101
+103
+98
+92
+88
+89
+99
+105
+111
+81
+51
+44
+54
+60
+56
+49
+51
+46
+38
+40
+61
+95
+119
+130
+140
+130
+128
+126
+110
+82
+66
+63
+62
+65
+68
+73
+76
+78
+79
+78
+73
+68
+66
+66
+73
+75
+76
+74
+77
+78
+75
+72
+69
+69
+73
+74
+81
+82
+83
+34
+35
+39
+40
+44
+48
+49
+50
+52
+55
+61
+71
+84
+97
+107
+117
+127
+137
+148
+164
+186
+206
+223
+233
+239
+240
+235
+226
+216
+210
+207
+204
+199
+199
+201
+204
+207
+206
+204
+200
+188
+177
+161
+147
+130
+112
+96
+83
+79
+75
+75
+75
+73
+72
+71
+69
+71
+67
+70
+76
+80
+83
+88
+95
+83
+69
+57
+48
+47
+48
+44
+40
+38
+38
+40
+41
+41
+42
+44
+44
+39
+41
+43
+45
+47
+45
+42
+40
+41
+46
+69
+60
+40
+45
+44
+38
+44
+43
+42
+42
+41
+41
+41
+40
+42
+44
+44
+41
+39
+40
+46
+53
+71
+62
+57
+58
+61
+59
+60
+63
+58
+54
+50
+56
+66
+70
+67
+62
+55
+56
+55
+54
+53
+53
+56
+56
+55
+56
+57
+58
+59
+60
+60
+59
+58
+57
+56
+56
+56
+53
+47
+43
+42
+42
+42
+42
+42
+41
+43
+41
+36
+41
+37
+31
+39
+47
+50
+61
+103
+100
+91
+87
+91
+96
+100
+101
+76
+62
+50
+47
+48
+50
+58
+61
+46
+47
+53
+69
+91
+112
+125
+129
+125
+128
+131
+120
+94
+69
+61
+66
+64
+64
+67
+72
+75
+76
+77
+77
+71
+67
+66
+68
+74
+76
+78
+77
+79
+77
+75
+71
+70
+69
+73
+76
+81
+82
+83
+34
+35
+38
+41
+45
+47
+47
+45
+48
+49
+55
+65
+76
+87
+97
+105
+116
+127
+140
+160
+183
+206
+223
+234
+239
+237
+231
+223
+211
+203
+200
+195
+196
+196
+198
+199
+201
+197
+191
+183
+175
+161
+145
+129
+114
+99
+88
+81
+76
+75
+74
+74
+73
+72
+71
+69
+73
+63
+61
+68
+79
+83
+84
+83
+60
+55
+52
+49
+47
+46
+43
+40
+38
+36
+38
+39
+41
+42
+44
+44
+40
+40
+41
+43
+45
+45
+43
+40
+39
+61
+58
+53
+47
+40
+43
+38
+41
+41
+41
+42
+41
+41
+40
+39
+45
+44
+42
+42
+43
+47
+51
+56
+61
+57
+55
+56
+60
+60
+64
+67
+59
+65
+75
+85
+85
+76
+62
+52
+50
+50
+50
+50
+53
+54
+56
+56
+55
+56
+58
+59
+60
+60
+60
+59
+56
+55
+55
+55
+55
+52
+47
+44
+43
+43
+43
+43
+43
+41
+43
+41
+38
+42
+36
+36
+43
+39
+48
+84
+105
+96
+85
+86
+93
+102
+100
+97
+57
+54
+50
+48
+44
+41
+43
+47
+35
+44
+66
+95
+116
+123
+122
+123
+120
+133
+133
+109
+75
+53
+56
+66
+63
+64
+68
+71
+73
+74
+76
+75
+68
+67
+68
+70
+75
+78
+79
+78
+79
+79
+77
+74
+72
+72
+75
+77
+86
+87
+88
+38
+38
+41
+43
+45
+46
+46
+43
+45
+45
+51
+57
+68
+78
+87
+93
+100
+111
+126
+148
+172
+195
+214
+227
+234
+235
+226
+217
+204
+195
+191
+189
+189
+190
+193
+193
+189
+183
+174
+166
+157
+143
+127
+112
+99
+90
+83
+78
+75
+74
+74
+74
+75
+74
+73
+70
+65
+59
+61
+70
+80
+80
+73
+65
+47
+47
+49
+48
+46
+43
+41
+41
+36
+36
+38
+39
+41
+42
+44
+45
+41
+39
+38
+40
+43
+45
+43
+41
+39
+73
+49
+44
+52
+37
+43
+43
+40
+39
+40
+41
+41
+41
+40
+39
+42
+41
+41
+44
+51
+55
+57
+58
+53
+57
+59
+59
+58
+57
+61
+64
+86
+98
+106
+100
+81
+60
+51
+47
+49
+49
+49
+50
+53
+54
+55
+56
+56
+57
+59
+60
+60
+60
+60
+60
+58
+56
+55
+55
+55
+52
+47
+44
+42
+42
+41
+41
+43
+41
+42
+40
+39
+44
+38
+39
+45
+34
+52
+103
+100
+92
+85
+88
+95
+100
+95
+90
+65
+57
+50
+49
+48
+42
+35
+30
+29
+42
+72
+102
+116
+116
+115
+120
+133
+138
+125
+91
+58
+48
+55
+63
+64
+64
+67
+70
+72
+71
+72
+74
+66
+66
+69
+72
+77
+79
+81
+82
+80
+78
+76
+74
+71
+71
+75
+79
+88
+90
+90
+40
+42
+44
+46
+48
+48
+47
+43
+45
+45
+46
+52
+62
+70
+78
+82
+83
+93
+108
+129
+155
+178
+199
+211
+225
+226
+220
+211
+196
+186
+181
+179
+181
+182
+183
+181
+176
+166
+155
+146
+135
+124
+108
+95
+88
+83
+79
+76
+76
+76
+76
+75
+76
+75
+75
+71
+65
+61
+65
+70
+72
+64
+56
+51
+45
+47
+47
+46
+44
+41
+40
+40
+36
+36
+38
+39
+41
+42
+44
+45
+43
+41
+37
+39
+43
+46
+46
+44
+48
+84
+53
+43
+53
+36
+40
+43
+41
+42
+43
+44
+45
+45
+45
+45
+42
+41
+43
+49
+55
+58
+55
+52
+53
+60
+63
+57
+53
+58
+70
+79
+119
+110
+91
+67
+51
+46
+51
+58
+51
+49
+50
+50
+50
+51
+54
+54
+56
+57
+59
+60
+62
+62
+61
+59
+59
+57
+58
+58
+58
+55
+50
+47
+42
+42
+42
+41
+42
+40
+41
+41
+40
+42
+39
+42
+45
+41
+67
+114
+94
+91
+89
+91
+94
+93
+87
+85
+63
+57
+52
+49
+45
+39
+35
+35
+46
+60
+84
+102
+109
+110
+114
+125
+136
+128
+100
+67
+48
+49
+57
+61
+66
+66
+67
+69
+70
+70
+72
+71
+66
+67
+72
+74
+78
+80
+82
+83
+78
+79
+77
+75
+73
+73
+75
+79
+89
+88
+88
+46
+46
+49
+51
+53
+52
+50
+47
+47
+45
+46
+51
+58
+65
+73
+72
+74
+78
+92
+114
+137
+161
+183
+196
+209
+211
+207
+199
+186
+175
+166
+165
+169
+171
+170
+166
+161
+149
+137
+129
+115
+104
+94
+86
+82
+80
+78
+78
+77
+77
+77
+77
+77
+77
+77
+73
+79
+71
+64
+61
+55
+46
+43
+43
+49
+47
+46
+45
+41
+39
+38
+40
+36
+36
+38
+39
+41
+42
+44
+45
+44
+40
+35
+35
+41
+46
+47
+45
+55
+84
+65
+48
+51
+38
+32
+41
+39
+39
+39
+40
+41
+42
+44
+45
+51
+50
+51
+55
+58
+57
+53
+49
+54
+57
+58
+58
+64
+80
+99
+112
+101
+80
+54
+43
+48
+55
+58
+55
+53
+50
+52
+51
+51
+51
+53
+54
+57
+57
+59
+60
+62
+61
+61
+58
+60
+57
+58
+58
+58
+55
+50
+47
+41
+41
+41
+40
+40
+39
+38
+40
+41
+40
+41
+42
+42
+56
+88
+112
+92
+93
+92
+91
+90
+86
+82
+82
+55
+57
+53
+43
+27
+23
+37
+54
+84
+92
+101
+100
+102
+107
+116
+124
+109
+92
+67
+48
+44
+49
+59
+61
+68
+66
+68
+70
+70
+70
+70
+71
+67
+70
+75
+77
+79
+79
+81
+82
+81
+79
+80
+76
+74
+74
+78
+81
+94
+93
+92
+48
+51
+54
+57
+59
+59
+54
+51
+48
+45
+45
+50
+57
+63
+69
+68
+67
+68
+79
+97
+120
+144
+166
+181
+191
+195
+193
+186
+174
+161
+151
+148
+154
+158
+154
+150
+142
+131
+120
+110
+97
+89
+83
+80
+79
+80
+78
+78
+78
+78
+78
+79
+79
+79
+78
+77
+83
+69
+56
+50
+45
+40
+41
+44
+48
+47
+45
+44
+42
+40
+37
+37
+34
+34
+36
+39
+41
+42
+44
+45
+45
+40
+33
+33
+40
+46
+47
+45
+51
+73
+77
+57
+53
+46
+29
+40
+44
+43
+42
+41
+43
+46
+49
+51
+61
+60
+59
+59
+59
+58
+56
+53
+53
+53
+52
+58
+74
+91
+99
+95
+57
+50
+46
+49
+61
+64
+59
+50
+53
+51
+52
+52
+52
+52
+55
+55
+57
+58
+59
+60
+62
+61
+61
+58
+58
+57
+57
+57
+57
+54
+49
+46
+41
+41
+40
+39
+40
+39
+39
+38
+43
+37
+43
+41
+39
+75
+109
+102
+94
+92
+87
+83
+83
+82
+81
+85
+56
+55
+47
+36
+27
+35
+61
+86
+111
+113
+104
+89
+89
+99
+100
+95
+67
+56
+45
+42
+44
+48
+55
+62
+70
+67
+69
+70
+71
+70
+71
+71
+70
+73
+78
+79
+79
+78
+79
+81
+84
+83
+83
+80
+78
+78
+82
+85
+96
+95
+93
+51
+54
+57
+58
+59
+59
+57
+53
+51
+50
+50
+52
+59
+62
+68
+65
+62
+62
+72
+84
+104
+126
+147
+160
+167
+171
+173
+166
+157
+143
+133
+130
+133
+134
+134
+128
+120
+110
+101
+94
+84
+80
+77
+76
+77
+79
+79
+78
+79
+79
+78
+79
+78
+78
+76
+76
+72
+60
+47
+45
+47
+45
+45
+45
+47
+45
+44
+44
+44
+41
+39
+36
+36
+36
+38
+39
+41
+42
+44
+45
+47
+39
+33
+32
+39
+46
+47
+46
+42
+59
+84
+64
+55
+55
+31
+44
+55
+53
+51
+50
+51
+55
+60
+63
+59
+57
+55
+52
+52
+53
+55
+57
+57
+54
+53
+58
+72
+76
+57
+35
+38
+45
+55
+59
+57
+56
+59
+61
+54
+54
+54
+54
+53
+54
+57
+58
+56
+56
+59
+59
+60
+59
+58
+58
+58
+56
+56
+56
+56
+53
+49
+45
+40
+42
+41
+40
+39
+38
+40
+39
+45
+34
+46
+42
+38
+88
+124
+95
+100
+91
+82
+79
+80
+85
+85
+86
+56
+42
+28
+27
+43
+68
+102
+126
+118
+115
+97
+77
+81
+94
+86
+64
+41
+37
+40
+50
+50
+43
+50
+62
+72
+70
+71
+71
+71
+71
+71
+71
+74
+77
+80
+80
+77
+75
+74
+76
+84
+85
+83
+81
+79
+82
+85
+90
+91
+91
+90
+59
+59
+61
+61
+61
+61
+61
+59
+60
+61
+62
+63
+64
+68
+69
+69
+72
+72
+76
+82
+91
+105
+116
+123
+132
+136
+139
+137
+132
+123
+114
+106
+105
+101
+98
+94
+89
+85
+82
+79
+79
+75
+75
+73
+71
+72
+70
+72
+79
+84
+74
+66
+74
+80
+76
+76
+61
+52
+44
+40
+45
+48
+49
+45
+47
+46
+46
+46
+46
+43
+41
+41
+41
+41
+41
+41
+43
+43
+43
+44
+43
+45
+40
+32
+33
+42
+47
+46
+43
+45
+48
+56
+62
+57
+44
+35
+70
+64
+60
+59
+63
+64
+62
+58
+52
+55
+58
+58
+55
+52
+51
+55
+62
+57
+47
+40
+38
+41
+47
+51
+48
+51
+55
+58
+59
+57
+57
+58
+58
+58
+58
+57
+55
+55
+53
+53
+48
+49
+53
+54
+57
+58
+58
+59
+62
+59
+57
+58
+61
+59
+54
+49
+41
+43
+42
+40
+38
+37
+38
+38
+48
+45
+35
+38
+74
+111
+111
+90
+78
+79
+77
+79
+79
+82
+84
+83
+47
+22
+15
+41
+80
+111
+121
+120
+115
+97
+76
+67
+66
+66
+57
+48
+44
+50
+49
+48
+51
+48
+50
+62
+66
+72
+75
+75
+71
+73
+75
+74
+80
+83
+83
+80
+77
+74
+74
+73
+76
+77
+78
+80
+82
+85
+89
+94
+101
+92
+82
+63
+63
+63
+63
+63
+63
+63
+63
+64
+65
+65
+67
+68
+69
+70
+71
+74
+73
+77
+79
+85
+93
+100
+104
+108
+112
+114
+114
+109
+103
+95
+89
+86
+82
+79
+75
+73
+72
+72
+71
+75
+73
+73
+72
+71
+70
+71
+73
+77
+84
+77
+70
+77
+79
+74
+69
+57
+48
+44
+41
+44
+48
+50
+48
+46
+46
+46
+46
+45
+45
+44
+43
+43
+43
+43
+43
+43
+43
+43
+44
+46
+46
+40
+32
+32
+41
+46
+46
+45
+42
+41
+48
+58
+66
+67
+67
+63
+59
+53
+52
+55
+56
+54
+51
+55
+56
+57
+56
+55
+55
+57
+58
+55
+52
+44
+39
+38
+41
+45
+49
+52
+54
+55
+56
+55
+55
+54
+58
+58
+60
+58
+57
+55
+53
+53
+53
+50
+51
+53
+54
+56
+56
+57
+57
+59
+59
+61
+61
+59
+54
+50
+45
+43
+42
+43
+41
+40
+38
+37
+37
+39
+41
+42
+53
+80
+101
+97
+77
+76
+77
+80
+81
+83
+83
+86
+81
+47
+42
+51
+79
+110
+124
+112
+98
+72
+66
+59
+55
+55
+53
+49
+45
+47
+52
+52
+50
+51
+48
+51
+62
+69
+72
+77
+76
+72
+72
+76
+75
+81
+84
+83
+81
+76
+72
+72
+72
+74
+74
+76
+81
+84
+88
+88
+94
+89
+83
+73
+69
+69
+69
+69
+69
+69
+69
+69
+67
+68
+69
+70
+71
+72
+73
+71
+74
+72
+74
+76
+81
+85
+89
+91
+93
+94
+95
+95
+92
+89
+83
+81
+77
+75
+72
+67
+66
+67
+67
+66
+71
+69
+70
+70
+72
+72
+74
+76
+77
+85
+80
+78
+85
+81
+69
+64
+55
+49
+47
+43
+43
+44
+47
+47
+46
+45
+45
+46
+45
+44
+44
+43
+43
+43
+43
+43
+43
+43
+43
+44
+48
+46
+40
+32
+31
+38
+44
+46
+48
+43
+40
+42
+48
+57
+63
+68
+54
+51
+48
+50
+55
+60
+60
+60
+60
+58
+55
+54
+56
+57
+58
+58
+45
+43
+39
+37
+37
+40
+43
+46
+53
+54
+56
+55
+52
+52
+53
+57
+57
+57
+57
+55
+55
+53
+53
+51
+51
+52
+54
+54
+56
+57
+57
+56
+58
+60
+62
+61
+57
+49
+43
+40
+44
+43
+43
+41
+40
+38
+37
+38
+35
+37
+44
+61
+79
+84
+79
+70
+72
+76
+80
+83
+87
+87
+86
+80
+70
+86
+110
+128
+135
+123
+91
+60
+36
+43
+47
+50
+48
+46
+48
+47
+46
+51
+52
+49
+51
+47
+51
+61
+71
+74
+79
+78
+74
+74
+78
+78
+84
+85
+83
+80
+75
+73
+72
+73
+76
+76
+78
+83
+88
+91
+87
+88
+74
+69
+62
+73
+73
+73
+73
+73
+73
+73
+73
+71
+72
+72
+73
+74
+75
+76
+74
+72
+71
+73
+76
+79
+80
+82
+83
+87
+87
+87
+85
+84
+81
+80
+78
+77
+74
+70
+66
+64
+62
+64
+63
+65
+65
+67
+68
+71
+74
+76
+77
+81
+85
+79
+81
+92
+88
+68
+58
+56
+54
+48
+45
+41
+42
+46
+47
+45
+44
+45
+45
+45
+44
+44
+43
+43
+43
+43
+43
+43
+43
+43
+44
+49
+46
+39
+32
+29
+34
+41
+46
+45
+43
+42
+42
+43
+46
+47
+50
+53
+52
+50
+52
+56
+60
+63
+62
+60
+56
+54
+53
+56
+55
+53
+49
+40
+39
+38
+38
+38
+40
+41
+42
+49
+52
+55
+56
+53
+53
+54
+55
+56
+56
+56
+54
+54
+52
+52
+52
+50
+50
+52
+55
+56
+56
+55
+57
+58
+60
+61
+59
+50
+43
+39
+40
+42
+41
+41
+40
+38
+36
+35
+37
+42
+35
+39
+58
+72
+71
+71
+76
+74
+76
+79
+82
+86
+86
+87
+84
+95
+120
+142
+136
+116
+89
+56
+27
+28
+37
+46
+51
+51
+50
+52
+53
+45
+50
+51
+49
+50
+47
+50
+60
+72
+75
+80
+79
+76
+76
+80
+79
+84
+85
+82
+80
+74
+72
+74
+75
+77
+78
+83
+88
+93
+91
+83
+77
+69
+65
+60
+75
+75
+75
+75
+75
+75
+75
+75
+75
+75
+76
+76
+77
+78
+78
+76
+71
+72
+73
+76
+78
+79
+80
+79
+84
+81
+81
+78
+78
+77
+77
+78
+78
+76
+71
+66
+62
+58
+58
+58
+60
+62
+64
+64
+67
+70
+72
+75
+81
+81
+74
+82
+99
+96
+77
+67
+61
+57
+52
+48
+43
+41
+43
+43
+43
+41
+42
+43
+43
+42
+42
+41
+41
+41
+41
+41
+41
+41
+41
+44
+49
+48
+40
+34
+30
+32
+38
+45
+42
+44
+44
+45
+46
+48
+48
+52
+60
+60
+57
+56
+56
+56
+56
+53
+60
+57
+58
+58
+60
+54
+49
+40
+40
+40
+40
+40
+40
+40
+38
+38
+43
+47
+51
+55
+56
+56
+54
+55
+54
+54
+54
+52
+52
+51
+51
+51
+50
+50
+53
+55
+58
+60
+59
+61
+60
+60
+58
+53
+45
+40
+40
+42
+41
+41
+42
+40
+38
+37
+36
+37
+45
+34
+37
+58
+73
+70
+71
+78
+76
+76
+78
+78
+82
+85
+87
+87
+102
+122
+129
+106
+72
+52
+38
+25
+38
+42
+46
+51
+52
+52
+51
+48
+45
+49
+50
+48
+49
+46
+49
+60
+73
+76
+81
+80
+77
+78
+82
+81
+83
+83
+81
+77
+75
+73
+76
+79
+81
+83
+89
+94
+95
+86
+74
+67
+73
+69
+65
+77
+77
+77
+77
+77
+77
+77
+77
+77
+78
+78
+78
+79
+79
+80
+78
+74
+73
+76
+77
+79
+79
+80
+80
+80
+78
+77
+75
+75
+73
+74
+75
+77
+74
+72
+66
+61
+57
+55
+54
+56
+57
+59
+61
+63
+65
+69
+69
+76
+73
+69
+78
+97
+97
+85
+82
+67
+62
+55
+48
+46
+43
+42
+40
+42
+40
+41
+42
+42
+42
+42
+41
+41
+41
+41
+41
+41
+41
+41
+44
+49
+47
+41
+36
+31
+29
+34
+42
+46
+47
+44
+42
+40
+43
+48
+56
+58
+60
+61
+62
+62
+62
+61
+60
+56
+58
+62
+62
+62
+54
+47
+39
+43
+42
+42
+42
+41
+40
+39
+37
+37
+41
+48
+51
+53
+55
+56
+55
+55
+53
+53
+53
+52
+52
+52
+52
+53
+55
+58
+59
+62
+63
+61
+63
+58
+56
+51
+45
+40
+39
+40
+42
+40
+41
+40
+38
+39
+37
+36
+37
+41
+33
+42
+65
+78
+71
+69
+74
+78
+77
+77
+77
+81
+84
+87
+87
+88
+94
+90
+66
+44
+37
+42
+46
+50
+49
+50
+54
+57
+54
+48
+43
+43
+49
+49
+47
+48
+45
+48
+59
+73
+76
+81
+81
+78
+78
+83
+82
+81
+80
+79
+75
+74
+76
+79
+82
+88
+90
+93
+93
+87
+79
+69
+66
+77
+71
+66
+79
+79
+79
+79
+79
+79
+79
+79
+79
+79
+79
+80
+80
+80
+80
+79
+80
+79
+79
+79
+79
+79
+78
+78
+78
+75
+75
+73
+73
+71
+71
+71
+76
+75
+73
+68
+63
+58
+56
+54
+54
+54
+57
+58
+59
+60
+63
+63
+67
+70
+67
+68
+77
+76
+76
+89
+74
+66
+57
+50
+49
+45
+42
+36
+41
+40
+41
+42
+42
+42
+42
+42
+41
+41
+41
+41
+41
+41
+41
+44
+48
+47
+44
+41
+32
+27
+32
+41
+45
+47
+47
+43
+37
+39
+46
+56
+57
+62
+65
+67
+69
+67
+65
+63
+50
+54
+60
+59
+57
+49
+46
+41
+45
+43
+43
+44
+43
+40
+39
+39
+37
+39
+43
+46
+48
+52
+57
+59
+55
+53
+53
+52
+52
+52
+52
+52
+55
+57
+60
+59
+61
+60
+59
+57
+51
+47
+43
+40
+39
+41
+41
+40
+41
+42
+41
+39
+40
+38
+37
+36
+35
+37
+50
+69
+75
+67
+68
+76
+77
+78
+81
+81
+84
+85
+86
+85
+69
+61
+52
+44
+42
+44
+51
+54
+54
+56
+59
+61
+60
+54
+47
+42
+42
+48
+49
+47
+48
+44
+48
+58
+72
+76
+81
+81
+78
+79
+83
+80
+79
+78
+77
+76
+75
+78
+84
+88
+96
+97
+93
+85
+76
+71
+69
+73
+79
+73
+66
+80
+80
+80
+80
+80
+80
+80
+80
+79
+80
+80
+80
+80
+80
+81
+81
+85
+84
+82
+81
+80
+79
+77
+77
+78
+76
+76
+76
+73
+73
+71
+73
+75
+76
+75
+72
+68
+63
+60
+58
+52
+52
+55
+55
+57
+58
+58
+58
+62
+68
+65
+60
+58
+53
+62
+83
+79
+69
+58
+53
+51
+47
+41
+34
+41
+39
+40
+42
+42
+42
+42
+42
+41
+41
+41
+41
+41
+41
+41
+44
+48
+46
+44
+43
+35
+26
+30
+39
+35
+41
+48
+49
+46
+47
+53
+61
+66
+68
+69
+67
+63
+55
+48
+46
+44
+49
+54
+54
+50
+46
+44
+43
+45
+43
+44
+45
+45
+43
+42
+42
+42
+40
+40
+41
+43
+48
+57
+62
+55
+53
+53
+52
+53
+52
+53
+53
+57
+58
+59
+57
+58
+54
+53
+51
+45
+40
+39
+39
+41
+42
+41
+38
+42
+43
+42
+41
+39
+37
+38
+38
+35
+42
+56
+67
+66
+61
+69
+83
+76
+78
+82
+84
+86
+86
+84
+81
+59
+40
+30
+38
+50
+52
+50
+46
+49
+54
+60
+63
+59
+49
+42
+38
+40
+48
+48
+46
+48
+44
+47
+58
+72
+75
+81
+80
+78
+79
+83
+80
+77
+76
+76
+75
+76
+79
+86
+92
+101
+100
+92
+80
+69
+65
+72
+80
+81
+74
+67
+81
+81
+81
+81
+81
+81
+81
+81
+81
+81
+81
+81
+81
+81
+81
+83
+87
+87
+87
+87
+86
+86
+84
+82
+82
+80
+80
+79
+79
+79
+77
+77
+74
+74
+73
+73
+73
+67
+61
+58
+55
+55
+54
+53
+55
+56
+56
+55
+61
+61
+52
+54
+59
+47
+57
+93
+96
+83
+69
+64
+61
+53
+48
+45
+37
+38
+39
+40
+40
+41
+44
+46
+45
+45
+45
+45
+44
+44
+44
+45
+40
+46
+47
+41
+34
+31
+30
+34
+45
+43
+41
+42
+47
+55
+63
+69
+69
+72
+67
+54
+49
+48
+46
+43
+47
+46
+46
+45
+44
+43
+43
+43
+43
+42
+43
+44
+45
+44
+45
+45
+42
+40
+40
+41
+43
+45
+51
+52
+54
+54
+56
+55
+57
+54
+54
+53
+61
+59
+56
+50
+47
+45
+42
+43
+45
+42
+43
+42
+41
+41
+43
+43
+39
+40
+40
+40
+40
+39
+38
+36
+32
+52
+67
+65
+64
+69
+74
+71
+82
+82
+77
+76
+85
+83
+84
+90
+53
+42
+40
+44
+47
+43
+45
+49
+49
+67
+80
+74
+58
+46
+39
+37
+41
+49
+50
+50
+49
+42
+46
+60
+74
+77
+81
+79
+76
+77
+83
+81
+76
+75
+78
+78
+80
+85
+92
+98
+102
+94
+79
+71
+69
+74
+80
+84
+83
+76
+69
+81
+81
+81
+81
+81
+81
+81
+81
+81
+81
+81
+81
+81
+81
+81
+83
+89
+91
+91
+89
+89
+87
+86
+84
+84
+82
+82
+82
+82
+82
+80
+80
+77
+75
+74
+74
+74
+69
+63
+58
+58
+55
+54
+53
+55
+55
+55
+54
+56
+53
+49
+53
+48
+39
+58
+98
+88
+90
+84
+71
+62
+61
+57
+48
+43
+44
+46
+45
+45
+43
+43
+42
+44
+43
+44
+43
+44
+43
+44
+46
+53
+58
+55
+47
+35
+29
+29
+29
+35
+40
+47
+56
+63
+68
+70
+72
+65
+68
+62
+51
+47
+48
+49
+48
+49
+50
+48
+47
+47
+46
+46
+44
+42
+42
+43
+44
+43
+43
+44
+44
+46
+45
+44
+44
+43
+45
+48
+47
+50
+50
+53
+55
+57
+57
+57
+56
+54
+52
+51
+48
+47
+46
+44
+44
+46
+44
+44
+43
+42
+42
+42
+44
+42
+41
+41
+41
+40
+39
+39
+36
+39
+55
+67
+63
+62
+68
+73
+71
+74
+79
+79
+80
+88
+82
+79
+84
+53
+57
+66
+66
+54
+41
+42
+52
+71
+81
+84
+70
+55
+42
+35
+34
+40
+48
+49
+49
+50
+43
+46
+60
+75
+77
+81
+80
+76
+78
+83
+81
+79
+76
+76
+77
+81
+87
+95
+99
+97
+85
+74
+68
+74
+78
+78
+79
+83
+76
+69
+81
+81
+81
+81
+81
+81
+81
+81
+81
+81
+81
+81
+81
+81
+81
+85
+91
+94
+94
+93
+89
+87
+86
+84
+84
+84
+84
+84
+84
+84
+86
+84
+79
+76
+78
+78
+76
+72
+67
+62
+60
+57
+56
+54
+54
+54
+54
+53
+53
+45
+49
+51
+37
+39
+67
+96
+74
+90
+98
+83
+72
+72
+68
+54
+43
+42
+44
+42
+44
+41
+41
+39
+43
+41
+43
+41
+43
+42
+44
+46
+45
+47
+45
+40
+34
+30
+32
+36
+50
+55
+63
+70
+71
+70
+66
+64
+65
+65
+58
+49
+47
+49
+52
+51
+51
+52
+50
+48
+48
+47
+46
+46
+42
+43
+41
+42
+43
+43
+42
+42
+46
+45
+43
+42
+43
+45
+46
+47
+46
+48
+48
+51
+51
+52
+51
+52
+44
+44
+45
+43
+43
+44
+46
+47
+47
+44
+45
+44
+43
+43
+43
+44
+43
+42
+44
+42
+41
+40
+41
+38
+49
+60
+66
+61
+60
+66
+72
+73
+73
+79
+81
+83
+90
+85
+84
+91
+88
+94
+97
+82
+52
+35
+46
+64
+89
+87
+77
+62
+48
+40
+35
+36
+39
+46
+47
+49
+51
+44
+47
+60
+75
+78
+82
+80
+77
+78
+83
+80
+81
+76
+76
+79
+86
+92
+96
+96
+85
+77
+69
+69
+77
+81
+78
+72
+82
+76
+69
+81
+81
+81
+81
+81
+81
+81
+81
+82
+82
+82
+82
+82
+82
+82
+86
+92
+95
+94
+92
+90
+88
+87
+85
+85
+85
+85
+85
+87
+87
+88
+87
+82
+80
+79
+79
+78
+75
+71
+69
+62
+60
+58
+56
+55
+54
+53
+51
+52
+45
+51
+48
+37
+57
+79
+78
+53
+76
+95
+94
+85
+79
+72
+65
+49
+45
+43
+43
+45
+47
+48
+48
+52
+52
+52
+52
+53
+53
+53
+55
+59
+62
+62
+61
+60
+62
+64
+68
+72
+71
+71
+69
+66
+63
+61
+61
+66
+63
+55
+48
+46
+48
+51
+54
+52
+51
+51
+49
+48
+46
+46
+45
+44
+44
+43
+44
+44
+45
+43
+43
+43
+41
+41
+42
+44
+47
+47
+48
+47
+46
+47
+46
+46
+44
+43
+42
+41
+40
+41
+42
+43
+45
+47
+48
+46
+45
+44
+42
+42
+42
+42
+43
+44
+44
+44
+42
+42
+40
+41
+41
+56
+61
+63
+58
+60
+68
+75
+76
+76
+80
+79
+79
+88
+88
+94
+106
+112
+102
+87
+63
+43
+42
+60
+81
+85
+75
+61
+49
+43
+41
+40
+39
+40
+45
+46
+49
+51
+45
+47
+59
+73
+77
+82
+81
+78
+79
+83
+80
+79
+77
+77
+82
+93
+97
+94
+91
+74
+69
+68
+72
+79
+80
+76
+72
+81
+75
+68
+81
+81
+81
+81
+81
+81
+81
+81
+82
+82
+82
+82
+82
+82
+82
+84
+90
+92
+90
+88
+87
+85
+83
+83
+83
+83
+83
+85
+87
+87
+88
+87
+85
+82
+81
+81
+81
+79
+77
+74
+66
+62
+60
+56
+54
+53
+51
+49
+49
+47
+49
+43
+45
+76
+83
+52
+43
+57
+85
+103
+101
+85
+78
+80
+65
+60
+54
+52
+54
+58
+61
+62
+65
+65
+66
+66
+67
+67
+68
+69
+82
+84
+82
+79
+76
+76
+76
+78
+72
+70
+66
+64
+64
+64
+66
+68
+70
+64
+55
+50
+50
+49
+51
+52
+51
+51
+51
+48
+49
+48
+47
+47
+46
+46
+46
+46
+45
+45
+45
+45
+42
+42
+43
+42
+43
+45
+46
+47
+47
+45
+45
+44
+44
+43
+42
+42
+41
+41
+40
+41
+42
+44
+45
+45
+45
+44
+43
+42
+41
+43
+43
+43
+44
+45
+45
+43
+42
+41
+43
+43
+59
+60
+61
+59
+63
+70
+77
+79
+77
+81
+80
+81
+89
+87
+91
+100
+81
+64
+48
+40
+48
+63
+78
+86
+69
+58
+46
+41
+44
+45
+45
+44
+43
+45
+45
+48
+52
+45
+46
+56
+70
+74
+80
+80
+78
+79
+84
+81
+77
+76
+80
+89
+97
+96
+88
+81
+65
+69
+73
+77
+77
+75
+74
+76
+80
+73
+66
+81
+81
+81
+81
+81
+81
+81
+81
+83
+83
+83
+83
+83
+83
+83
+85
+89
+89
+89
+86
+86
+82
+82
+81
+81
+81
+82
+84
+86
+88
+88
+88
+85
+82
+81
+82
+82
+81
+80
+77
+71
+67
+63
+59
+57
+54
+51
+47
+46
+45
+45
+45
+58
+82
+74
+43
+57
+59
+82
+110
+118
+104
+94
+95
+81
+70
+64
+58
+61
+62
+65
+63
+67
+66
+68
+67
+70
+68
+71
+71
+72
+73
+72
+71
+68
+68
+66
+66
+65
+66
+65
+66
+66
+64
+62
+63
+71
+63
+54
+51
+51
+48
+48
+51
+50
+49
+49
+49
+48
+49
+49
+49
+49
+49
+51
+49
+49
+47
+49
+47
+47
+45
+45
+44
+44
+42
+43
+41
+46
+46
+45
+47
+46
+46
+47
+46
+41
+40
+42
+43
+44
+43
+44
+43
+44
+43
+41
+40
+41
+41
+41
+41
+42
+44
+44
+42
+41
+41
+45
+48
+64
+60
+60
+61
+67
+72
+77
+78
+73
+79
+82
+85
+92
+80
+70
+71
+45
+41
+40
+50
+69
+81
+75
+64
+55
+45
+38
+42
+49
+52
+48
+45
+44
+45
+45
+48
+52
+45
+44
+53
+66
+70
+78
+79
+77
+79
+84
+81
+76
+79
+85
+92
+96
+91
+81
+72
+66
+71
+77
+77
+74
+71
+71
+76
+78
+72
+65
+81
+81
+81
+81
+81
+81
+81
+81
+83
+83
+83
+83
+83
+83
+83
+83
+88
+86
+86
+82
+82
+79
+79
+77
+77
+77
+79
+81
+82
+84
+86
+86
+85
+83
+83
+84
+85
+84
+81
+79
+75
+71
+65
+60
+57
+54
+51
+46
+43
+42
+43
+57
+76
+72
+60
+57
+69
+64
+73
+96
+112
+112
+101
+92
+78
+68
+63
+59
+63
+62
+62
+57
+63
+61
+64
+63
+65
+64
+67
+67
+68
+68
+70
+72
+72
+73
+73
+72
+67
+68
+69
+69
+65
+62
+58
+58
+70
+60
+51
+50
+52
+49
+48
+49
+47
+48
+49
+48
+49
+51
+52
+52
+51
+51
+52
+51
+51
+49
+51
+48
+48
+46
+46
+45
+44
+41
+42
+42
+46
+46
+45
+46
+46
+46
+46
+45
+41
+41
+42
+42
+43
+42
+43
+42
+42
+44
+42
+41
+40
+40
+42
+42
+41
+44
+45
+43
+41
+42
+47
+51
+66
+63
+61
+64
+70
+73
+74
+73
+73
+78
+79
+86
+90
+74
+55
+49
+48
+57
+67
+74
+79
+76
+62
+47
+45
+36
+33
+42
+53
+57
+54
+51
+46
+46
+45
+49
+53
+45
+42
+50
+61
+66
+75
+77
+77
+79
+85
+82
+80
+81
+87
+90
+89
+82
+74
+69
+72
+73
+75
+75
+74
+72
+70
+73
+77
+71
+64
+81
+81
+81
+81
+81
+81
+81
+81
+83
+83
+83
+83
+83
+83
+83
+83
+86
+84
+84
+82
+81
+79
+79
+77
+77
+79
+79
+81
+82
+84
+84
+84
+84
+83
+83
+83
+85
+84
+82
+80
+77
+73
+67
+62
+56
+53
+49
+46
+42
+40
+44
+71
+88
+65
+51
+78
+69
+62
+60
+71
+91
+102
+91
+72
+71
+66
+63
+62
+66
+66
+62
+55
+61
+61
+64
+65
+66
+67
+69
+70
+67
+68
+69
+69
+71
+70
+67
+63
+68
+67
+65
+62
+62
+63
+64
+67
+66
+56
+48
+52
+54
+51
+47
+50
+47
+48
+48
+49
+51
+51
+52
+53
+50
+50
+50
+50
+48
+48
+48
+48
+44
+45
+46
+46
+45
+45
+44
+44
+47
+47
+46
+44
+42
+42
+42
+40
+42
+42
+43
+45
+45
+44
+44
+43
+44
+45
+44
+42
+42
+41
+41
+44
+40
+43
+45
+43
+41
+42
+48
+54
+71
+66
+64
+68
+73
+74
+71
+71
+78
+78
+75
+77
+83
+68
+50
+44
+57
+73
+84
+81
+69
+61
+56
+52
+38
+30
+29
+41
+53
+56
+55
+53
+50
+48
+46
+49
+53
+45
+41
+49
+59
+67
+77
+78
+78
+81
+83
+82
+85
+88
+91
+90
+85
+78
+72
+68
+78
+75
+72
+73
+74
+75
+69
+69
+77
+71
+64
+81
+81
+81
+82
+82
+83
+83
+83
+82
+82
+82
+82
+82
+82
+82
+82
+83
+83
+83
+83
+81
+81
+81
+81
+82
+82
+82
+82
+84
+84
+84
+84
+80
+81
+87
+87
+86
+84
+83
+84
+83
+81
+77
+67
+61
+56
+50
+41
+44
+36
+51
+87
+109
+101
+87
+79
+69
+69
+71
+72
+75
+75
+77
+77
+69
+69
+68
+69
+66
+61
+60
+60
+56
+57
+60
+63
+64
+67
+68
+67
+70
+68
+68
+69
+69
+68
+68
+68
+67
+64
+63
+62
+62
+61
+61
+63
+63
+58
+51
+48
+48
+50
+51
+50
+50
+51
+50
+51
+51
+51
+49
+50
+48
+46
+46
+45
+47
+46
+46
+46
+45
+45
+45
+45
+47
+47
+47
+47
+48
+48
+48
+46
+46
+46
+46
+44
+44
+44
+44
+45
+45
+44
+44
+44
+46
+46
+45
+45
+44
+43
+42
+43
+39
+44
+41
+40
+43
+41
+45
+61
+72
+74
+71
+72
+72
+74
+75
+76
+77
+75
+78
+81
+72
+58
+55
+59
+89
+81
+72
+67
+64
+59
+53
+49
+38
+35
+35
+39
+48
+53
+54
+51
+45
+45
+46
+47
+47
+46
+44
+40
+59
+70
+82
+85
+81
+83
+83
+85
+90
+101
+101
+89
+75
+71
+72
+71
+73
+75
+77
+78
+77
+75
+72
+71
+76
+68
+59
+81
+81
+81
+82
+82
+83
+83
+83
+82
+82
+82
+82
+82
+82
+82
+82
+83
+83
+83
+83
+83
+83
+83
+83
+84
+84
+84
+84
+84
+84
+84
+84
+83
+82
+85
+86
+90
+90
+88
+86
+87
+89
+89
+84
+79
+72
+61
+52
+48
+37
+41
+61
+71
+66
+61
+63
+86
+84
+81
+79
+77
+77
+74
+74
+84
+71
+62
+58
+64
+65
+59
+52
+57
+57
+61
+62
+66
+68
+69
+69
+70
+68
+68
+69
+67
+68
+68
+68
+65
+64
+63
+62
+61
+61
+61
+63
+63
+60
+54
+48
+48
+47
+48
+48
+50
+51
+52
+51
+51
+49
+49
+48
+46
+45
+44
+44
+45
+44
+44
+44
+45
+45
+45
+45
+47
+47
+47
+47
+48
+48
+48
+48
+48
+48
+48
+48
+48
+48
+48
+47
+47
+47
+46
+46
+47
+47
+46
+45
+44
+44
+43
+43
+38
+44
+41
+40
+43
+40
+44
+62
+73
+76
+74
+74
+76
+77
+78
+79
+71
+72
+75
+80
+80
+76
+81
+84
+77
+71
+63
+58
+58
+58
+55
+52
+45
+41
+39
+41
+47
+50
+50
+48
+48
+48
+49
+48
+47
+46
+44
+42
+57
+68
+82
+82
+83
+82
+83
+86
+94
+101
+97
+84
+73
+70
+70
+69
+73
+74
+76
+78
+77
+75
+73
+73
+76
+66
+57
+81
+81
+81
+82
+82
+83
+83
+83
+82
+82
+82
+82
+82
+82
+82
+82
+83
+83
+83
+83
+83
+83
+83
+83
+84
+84
+84
+84
+84
+84
+84
+84
+84
+80
+80
+82
+89
+92
+89
+86
+87
+96
+105
+106
+105
+98
+86
+74
+60
+46
+40
+46
+47
+40
+42
+51
+48
+49
+53
+58
+66
+74
+80
+82
+89
+78
+69
+63
+66
+67
+64
+58
+59
+60
+62
+64
+67
+70
+70
+70
+68
+68
+68
+68
+69
+69
+67
+67
+66
+66
+63
+62
+61
+61
+61
+62
+64
+63
+60
+53
+49
+45
+44
+45
+50
+49
+50
+49
+49
+49
+49
+48
+46
+44
+44
+44
+44
+44
+46
+46
+45
+45
+47
+47
+47
+47
+47
+47
+48
+48
+48
+48
+48
+47
+47
+47
+49
+49
+48
+48
+47
+47
+47
+47
+46
+46
+45
+45
+44
+43
+42
+42
+38
+43
+41
+39
+42
+39
+43
+61
+73
+73
+74
+76
+77
+78
+80
+80
+79
+80
+79
+78
+81
+85
+89
+85
+66
+58
+54
+51
+54
+57
+56
+56
+48
+45
+42
+42
+46
+48
+47
+46
+50
+50
+50
+48
+47
+48
+45
+41
+53
+64
+77
+78
+81
+82
+85
+87
+96
+96
+87
+76
+69
+69
+69
+67
+72
+74
+75
+77
+76
+74
+72
+72
+74
+66
+56
+81
+81
+81
+82
+82
+83
+83
+83
+82
+82
+82
+82
+82
+82
+82
+82
+83
+83
+83
+83
+83
+83
+83
+83
+84
+84
+84
+84
+84
+84
+84
+84
+87
+84
+82
+83
+87
+90
+91
+93
+93
+105
+120
+129
+129
+126
+114
+103
+78
+62
+50
+49
+48
+44
+44
+52
+43
+42
+42
+41
+43
+47
+49
+49
+66
+74
+79
+75
+68
+66
+67
+70
+62
+63
+62
+64
+67
+68
+68
+68
+68
+68
+68
+68
+68
+68
+66
+67
+66
+65
+62
+62
+60
+60
+61
+62
+60
+63
+62
+56
+49
+44
+43
+45
+48
+49
+48
+47
+49
+47
+47
+46
+45
+44
+44
+43
+44
+44
+45
+45
+45
+45
+47
+47
+47
+47
+47
+47
+48
+48
+48
+47
+47
+47
+47
+46
+49
+48
+48
+48
+47
+47
+47
+47
+45
+45
+45
+44
+43
+42
+42
+41
+38
+43
+40
+38
+41
+38
+42
+60
+71
+74
+75
+77
+78
+80
+80
+81
+82
+85
+80
+71
+73
+79
+75
+64
+56
+52
+48
+46
+51
+55
+58
+59
+52
+50
+47
+44
+46
+46
+45
+45
+51
+53
+52
+50
+49
+47
+44
+42
+52
+62
+73
+76
+81
+84
+87
+90
+97
+91
+78
+69
+67
+69
+69
+67
+72
+73
+74
+75
+74
+73
+71
+74
+74
+64
+55
+81
+81
+81
+82
+82
+83
+83
+83
+82
+82
+82
+82
+82
+82
+82
+82
+83
+83
+83
+83
+83
+83
+83
+83
+84
+84
+84
+84
+84
+84
+84
+84
+88
+92
+91
+89
+88
+93
+104
+112
+119
+134
+148
+156
+156
+153
+145
+135
+107
+83
+63
+55
+53
+50
+50
+53
+60
+57
+53
+48
+44
+43
+42
+40
+42
+56
+72
+75
+71
+73
+73
+69
+66
+66
+65
+66
+65
+65
+65
+65
+68
+70
+70
+70
+68
+68
+68
+67
+66
+65
+62
+61
+61
+61
+61
+62
+58
+59
+61
+57
+51
+45
+46
+47
+48
+47
+46
+45
+47
+45
+45
+46
+45
+45
+44
+44
+44
+43
+45
+45
+47
+47
+47
+47
+49
+49
+49
+49
+49
+49
+49
+48
+48
+47
+47
+46
+49
+49
+48
+48
+48
+47
+47
+47
+47
+46
+46
+45
+44
+43
+43
+43
+40
+45
+42
+40
+42
+39
+43
+59
+71
+72
+74
+76
+79
+80
+82
+81
+77
+79
+74
+66
+68
+72
+65
+51
+47
+46
+43
+43
+46
+51
+55
+57
+54
+53
+50
+47
+47
+46
+44
+44
+52
+53
+53
+52
+48
+47
+45
+41
+49
+58
+71
+75
+82
+86
+89
+91
+96
+87
+73
+67
+68
+71
+71
+70
+73
+74
+75
+75
+74
+73
+72
+73
+73
+66
+56
+81
+81
+81
+82
+82
+83
+83
+83
+82
+82
+82
+82
+82
+82
+82
+82
+83
+83
+83
+83
+83
+83
+83
+83
+84
+84
+84
+84
+84
+84
+84
+84
+85
+90
+92
+90
+92
+103
+124
+140
+160
+174
+188
+193
+190
+186
+177
+168
+143
+114
+84
+63
+56
+51
+49
+50
+51
+51
+50
+51
+52
+56
+58
+57
+40
+47
+54
+65
+79
+91
+86
+73
+74
+70
+70
+68
+66
+66
+63
+65
+68
+70
+70
+70
+67
+67
+67
+67
+65
+65
+64
+61
+60
+60
+61
+61
+56
+57
+58
+57
+55
+48
+47
+46
+47
+47
+46
+45
+45
+45
+45
+46
+44
+44
+44
+44
+43
+43
+45
+44
+47
+47
+47
+47
+49
+49
+49
+49
+49
+49
+48
+48
+47
+46
+46
+46
+47
+47
+47
+46
+46
+46
+45
+45
+46
+46
+45
+44
+43
+43
+42
+42
+40
+44
+41
+39
+41
+38
+42
+57
+71
+72
+74
+76
+79
+78
+79
+81
+78
+76
+70
+66
+66
+63
+54
+44
+43
+42
+40
+40
+42
+45
+49
+52
+55
+53
+52
+50
+50
+47
+45
+44
+51
+53
+53
+50
+49
+46
+45
+42
+47
+55
+68
+77
+83
+89
+89
+89
+89
+79
+67
+65
+69
+70
+70
+71
+73
+73
+73
+73
+73
+72
+71
+74
+73
+64
+57
+81
+81
+81
+82
+82
+83
+83
+83
+82
+82
+82
+82
+82
+82
+82
+82
+83
+83
+83
+83
+83
+83
+83
+83
+84
+84
+84
+84
+84
+84
+84
+86
+86
+88
+90
+94
+106
+128
+154
+174
+192
+208
+223
+228
+224
+218
+211
+200
+178
+151
+122
+93
+73
+58
+49
+47
+54
+55
+53
+52
+53
+51
+51
+48
+51
+50
+49
+52
+72
+95
+100
+90
+83
+79
+75
+74
+71
+68
+65
+66
+68
+70
+70
+69
+69
+68
+66
+66
+67
+64
+63
+63
+60
+60
+61
+61
+58
+58
+58
+58
+58
+52
+47
+43
+47
+46
+45
+44
+44
+44
+44
+45
+44
+44
+44
+43
+45
+45
+46
+46
+47
+47
+49
+49
+49
+49
+49
+49
+49
+49
+48
+48
+47
+46
+45
+45
+46
+46
+45
+45
+45
+44
+44
+44
+45
+45
+44
+44
+43
+42
+41
+41
+39
+44
+41
+38
+41
+37
+41
+56
+71
+72
+74
+76
+78
+79
+79
+78
+78
+71
+65
+61
+58
+49
+43
+41
+43
+45
+44
+43
+41
+43
+43
+45
+52
+53
+55
+55
+53
+49
+44
+45
+48
+50
+50
+49
+50
+48
+46
+41
+43
+53
+67
+76
+86
+91
+89
+86
+80
+73
+64
+66
+70
+70
+70
+72
+74
+74
+74
+74
+73
+73
+72
+74
+73
+64
+55
+81
+81
+81
+82
+82
+83
+83
+83
+82
+82
+82
+82
+82
+82
+82
+82
+83
+83
+83
+83
+83
+83
+83
+83
+84
+84
+84
+84
+84
+84
+84
+86
+94
+95
+97
+106
+127
+156
+186
+207
+207
+224
+242
+249
+246
+240
+233
+223
+198
+181
+157
+129
+98
+71
+55
+50
+50
+52
+53
+55
+55
+57
+55
+54
+53
+55
+49
+43
+54
+82
+105
+109
+92
+87
+83
+78
+75
+72
+68
+67
+70
+70
+70
+69
+69
+68
+66
+66
+67
+66
+63
+62
+62
+60
+60
+61
+61
+57
+58
+59
+58
+54
+45
+38
+47
+46
+45
+44
+44
+44
+42
+45
+44
+44
+44
+43
+45
+44
+46
+46
+47
+47
+49
+49
+49
+49
+49
+49
+49
+49
+48
+47
+46
+46
+45
+44
+45
+45
+44
+44
+44
+43
+43
+43
+45
+45
+44
+43
+42
+42
+41
+41
+39
+44
+41
+38
+40
+37
+40
+56
+71
+73
+74
+77
+79
+79
+77
+76
+68
+58
+52
+54
+50
+43
+42
+50
+48
+49
+50
+48
+46
+44
+45
+44
+51
+53
+57
+57
+55
+51
+44
+45
+46
+48
+49
+48
+49
+47
+46
+43
+42
+52
+65
+77
+86
+92
+88
+85
+73
+67
+62
+66
+70
+68
+68
+71
+74
+74
+73
+73
+73
+72
+72
+76
+73
+65
+55
+83
+83
+83
+83
+83
+83
+83
+83
+83
+83
+83
+83
+83
+83
+83
+83
+83
+83
+83
+84
+84
+85
+85
+85
+85
+85
+85
+85
+85
+85
+85
+87
+90
+93
+110
+142
+173
+197
+219
+239
+246
+249
+254
+255
+253
+250
+244
+236
+212
+199
+181
+159
+135
+105
+70
+45
+47
+48
+49
+53
+51
+48
+50
+57
+57
+58
+55
+53
+70
+106
+146
+169
+136
+112
+90
+81
+79
+76
+73
+72
+71
+75
+70
+62
+64
+74
+73
+64
+64
+64
+64
+62
+62
+60
+59
+57
+62
+57
+57
+57
+56
+53
+46
+42
+48
+47
+46
+45
+44
+43
+42
+44
+43
+45
+45
+44
+46
+45
+45
+45
+48
+48
+48
+48
+49
+49
+49
+49
+53
+52
+51
+50
+49
+47
+46
+46
+45
+45
+45
+45
+45
+45
+45
+45
+43
+47
+50
+49
+45
+42
+42
+43
+40
+46
+41
+35
+38
+37
+40
+54
+74
+75
+74
+74
+77
+81
+73
+62
+53
+53
+50
+48
+47
+48
+48
+48
+51
+51
+52
+49
+48
+47
+46
+43
+43
+45
+50
+54
+54
+52
+46
+46
+43
+46
+46
+45
+47
+46
+47
+43
+38
+49
+67
+82
+93
+95
+87
+82
+68
+68
+64
+64
+67
+70
+71
+70
+74
+78
+78
+74
+72
+75
+76
+77
+75
+66
+55
+83
+83
+83
+83
+83
+83
+83
+83
+83
+83
+83
+83
+83
+83
+83
+83
+83
+83
+83
+84
+84
+85
+85
+85
+85
+85
+85
+85
+85
+85
+85
+89
+93
+106
+131
+162
+194
+219
+239
+252
+254
+255
+255
+254
+253
+250
+249
+243
+224
+212
+197
+178
+157
+132
+99
+75
+51
+47
+46
+47
+50
+51
+53
+57
+55
+63
+69
+80
+103
+139
+174
+191
+207
+168
+123
+93
+85
+83
+77
+69
+70
+69
+72
+75
+70
+63
+63
+69
+63
+63
+64
+64
+62
+61
+60
+57
+60
+59
+57
+58
+59
+54
+49
+45
+48
+47
+46
+45
+44
+43
+44
+44
+43
+45
+45
+44
+46
+45
+45
+45
+48
+48
+48
+48
+49
+50
+50
+50
+52
+51
+50
+49
+48
+46
+45
+45
+45
+45
+45
+45
+45
+45
+45
+45
+46
+48
+49
+49
+47
+44
+42
+42
+40
+42
+37
+36
+40
+36
+38
+53
+69
+76
+82
+79
+75
+68
+58
+47
+49
+48
+48
+48
+49
+49
+49
+51
+52
+53
+53
+50
+49
+47
+46
+44
+43
+46
+48
+52
+53
+52
+50
+49
+47
+46
+45
+43
+43
+43
+45
+44
+40
+51
+69
+85
+96
+98
+89
+80
+68
+67
+64
+64
+66
+69
+69
+69
+71
+75
+75
+72
+71
+74
+74
+77
+74
+66
+55
+83
+83
+83
+83
+83
+83
+83
+83
+83
+83
+83
+83
+83
+83
+83
+83
+83
+83
+83
+84
+84
+85
+85
+85
+85
+85
+85
+85
+85
+86
+86
+90
+95
+120
+152
+183
+210
+236
+252
+255
+255
+255
+255
+254
+252
+251
+250
+244
+231
+221
+209
+196
+180
+159
+131
+108
+69
+55
+44
+46
+52
+55
+56
+58
+57
+75
+95
+118
+144
+175
+200
+211
+217
+229
+214
+159
+97
+68
+75
+89
+85
+76
+66
+66
+69
+70
+68
+68
+63
+64
+63
+63
+64
+63
+61
+58
+58
+58
+58
+60
+60
+55
+50
+46
+48
+48
+47
+46
+45
+44
+45
+45
+45
+45
+47
+46
+46
+45
+47
+47
+49
+49
+50
+50
+50
+50
+52
+52
+50
+49
+48
+47
+46
+45
+44
+44
+45
+45
+45
+45
+45
+45
+45
+45
+49
+48
+48
+48
+48
+46
+43
+40
+41
+39
+35
+38
+42
+35
+38
+60
+74
+80
+81
+73
+63
+55
+45
+40
+42
+43
+46
+47
+49
+49
+49
+51
+52
+54
+51
+50
+50
+48
+47
+45
+43
+45
+46
+50
+52
+52
+52
+53
+51
+50
+45
+40
+40
+40
+42
+41
+39
+53
+74
+90
+102
+102
+90
+75
+67
+67
+64
+64
+66
+68
+69
+69
+70
+73
+75
+73
+73
+75
+74
+75
+72
+64
+53
+83
+83
+83
+83
+83
+83
+83
+83
+83
+83
+83
+83
+83
+83
+83
+83
+83
+83
+83
+84
+84
+85
+85
+85
+85
+85
+85
+86
+86
+86
+86
+91
+102
+136
+168
+193
+216
+239
+253
+255
+255
+255
+255
+251
+249
+248
+247
+243
+230
+222
+216
+206
+195
+180
+153
+134
+101
+76
+54
+48
+53
+58
+57
+55
+68
+95
+128
+153
+172
+194
+212
+221
+229
+239
+235
+207
+172
+140
+100
+66
+76
+78
+73
+65
+66
+74
+71
+62
+62
+63
+62
+63
+63
+63
+61
+61
+57
+58
+61
+63
+62
+57
+53
+50
+49
+48
+47
+46
+47
+44
+45
+45
+45
+45
+47
+46
+46
+45
+47
+47
+50
+50
+51
+50
+50
+50
+52
+52
+48
+47
+47
+46
+45
+44
+43
+43
+44
+44
+44
+44
+44
+44
+44
+44
+50
+47
+45
+46
+47
+47
+43
+39
+43
+40
+36
+40
+41
+32
+40
+69
+86
+82
+71
+58
+51
+46
+45
+46
+41
+42
+46
+47
+50
+49
+48
+48
+52
+51
+51
+50
+49
+47
+46
+46
+43
+44
+44
+46
+49
+52
+54
+56
+56
+52
+46
+39
+37
+36
+38
+39
+39
+56
+80
+100
+110
+105
+88
+69
+65
+64
+63
+63
+64
+65
+66
+66
+67
+71
+73
+72
+74
+75
+72
+73
+68
+60
+48
+83
+83
+83
+83
+83
+83
+83
+83
+83
+83
+83
+83
+83
+83
+83
+83
+83
+83
+83
+84
+84
+85
+85
+85
+85
+85
+85
+86
+86
+87
+87
+93
+111
+143
+172
+194
+216
+239
+254
+255
+255
+255
+252
+250
+245
+241
+237
+234
+232
+228
+225
+217
+210
+197
+173
+153
+129
+98
+66
+53
+55
+57
+57
+56
+88
+122
+159
+181
+193
+205
+221
+233
+239
+233
+226
+227
+234
+219
+162
+99
+64
+68
+78
+82
+73
+61
+59
+64
+61
+62
+63
+64
+63
+63
+63
+61
+59
+60
+64
+64
+62
+57
+53
+51
+49
+50
+49
+48
+49
+46
+47
+47
+47
+47
+47
+46
+48
+47
+47
+47
+51
+51
+51
+50
+52
+51
+51
+51
+48
+48
+47
+47
+46
+45
+45
+45
+46
+46
+46
+46
+46
+46
+46
+46
+50
+47
+45
+46
+48
+48
+45
+42
+43
+43
+40
+40
+40
+33
+45
+76
+82
+72
+56
+46
+44
+45
+46
+49
+45
+46
+47
+48
+48
+47
+45
+46
+48
+50
+49
+47
+47
+47
+46
+44
+43
+43
+44
+45
+46
+50
+53
+55
+56
+53
+47
+40
+37
+36
+37
+36
+37
+59
+87
+107
+114
+103
+81
+61
+62
+62
+62
+62
+62
+62
+64
+64
+68
+72
+74
+74
+76
+76
+71
+69
+63
+57
+46
+83
+83
+83
+83
+83
+83
+83
+83
+83
+83
+83
+83
+83
+83
+83
+83
+83
+83
+83
+84
+84
+85
+85
+85
+85
+85
+86
+86
+87
+88
+88
+93
+109
+133
+160
+183
+208
+232
+249
+255
+253
+252
+250
+249
+243
+237
+232
+227
+234
+232
+229
+223
+219
+205
+185
+165
+146
+114
+79
+59
+58
+61
+66
+71
+115
+148
+184
+204
+211
+219
+233
+244
+235
+244
+246
+241
+234
+229
+218
+199
+127
+81
+58
+70
+74
+60
+55
+68
+62
+63
+63
+64
+62
+62
+62
+61
+60
+63
+65
+63
+61
+56
+53
+52
+51
+50
+51
+50
+49
+48
+49
+47
+47
+47
+47
+46
+48
+47
+47
+47
+51
+50
+50
+49
+51
+50
+49
+49
+48
+47
+47
+47
+46
+46
+45
+45
+45
+45
+45
+45
+45
+45
+45
+45
+48
+47
+46
+46
+47
+48
+47
+46
+42
+46
+41
+39
+43
+44
+52
+74
+64
+54
+47
+44
+47
+47
+44
+43
+46
+47
+47
+46
+46
+45
+44
+43
+44
+44
+46
+44
+46
+44
+44
+44
+43
+43
+43
+44
+43
+46
+49
+50
+53
+50
+47
+45
+41
+39
+37
+37
+37
+62
+92
+109
+108
+95
+75
+57
+60
+59
+61
+61
+59
+59
+60
+62
+67
+71
+74
+75
+76
+76
+67
+66
+56
+51
+42
+83
+83
+83
+83
+83
+83
+83
+83
+83
+83
+83
+83
+83
+83
+83
+83
+83
+83
+83
+84
+84
+85
+85
+85
+85
+85
+86
+86
+87
+88
+89
+94
+107
+122
+148
+177
+205
+226
+242
+252
+251
+249
+247
+246
+242
+236
+231
+231
+234
+235
+232
+230
+226
+214
+195
+175
+154
+125
+91
+70
+67
+75
+90
+100
+141
+168
+198
+217
+227
+235
+244
+249
+251
+248
+243
+237
+237
+240
+241
+234
+203
+144
+89
+68
+69
+70
+65
+65
+63
+63
+64
+64
+62
+61
+60
+60
+63
+64
+65
+61
+57
+53
+53
+54
+51
+52
+53
+52
+51
+48
+49
+49
+47
+47
+47
+46
+48
+47
+47
+47
+50
+50
+51
+50
+49
+48
+48
+47
+48
+47
+47
+47
+47
+46
+46
+46
+45
+45
+45
+45
+45
+45
+45
+45
+47
+48
+49
+49
+48
+49
+51
+53
+48
+52
+45
+44
+58
+67
+64
+68
+48
+46
+47
+49
+50
+46
+43
+44
+45
+45
+44
+43
+43
+43
+41
+41
+40
+41
+43
+41
+43
+41
+41
+41
+42
+41
+43
+42
+43
+44
+46
+45
+49
+48
+48
+49
+46
+42
+38
+36
+39
+63
+91
+103
+98
+84
+69
+56
+59
+59
+61
+61
+59
+59
+60
+62
+68
+72
+74
+76
+77
+75
+64
+59
+52
+47
+38
+83
+83
+83
+83
+83
+83
+83
+83
+83
+83
+83
+83
+83
+83
+83
+83
+83
+83
+85
+86
+86
+87
+85
+85
+85
+85
+86
+87
+90
+92
+94
+101
+114
+122
+144
+179
+209
+225
+241
+254
+250
+249
+247
+244
+242
+241
+238
+240
+239
+241
+239
+237
+233
+223
+203
+183
+155
+129
+98
+78
+76
+87
+110
+125
+162
+181
+207
+226
+238
+244
+247
+245
+247
+247
+247
+249
+244
+238
+238
+239
+225
+224
+184
+113
+71
+72
+74
+59
+64
+64
+62
+62
+61
+60
+59
+59
+62
+62
+62
+59
+53
+50
+51
+54
+53
+52
+53
+52
+51
+48
+49
+49
+47
+47
+49
+48
+48
+47
+47
+47
+49
+49
+50
+49
+48
+47
+47
+46
+48
+48
+47
+47
+47
+47
+47
+46
+45
+45
+45
+45
+45
+45
+45
+45
+46
+49
+52
+51
+50
+48
+52
+56
+53
+59
+50
+50
+74
+90
+77
+65
+49
+49
+50
+53
+48
+43
+44
+51
+43
+42
+41
+40
+40
+42
+43
+44
+41
+41
+42
+42
+42
+42
+42
+42
+44
+43
+45
+44
+44
+44
+45
+43
+48
+49
+52
+52
+51
+46
+39
+36
+42
+66
+91
+97
+88
+75
+65
+58
+59
+60
+63
+63
+60
+57
+61
+61
+69
+72
+75
+76
+78
+77
+65
+59
+52
+47
+37
+86
+86
+86
+86
+86
+86
+86
+86
+86
+86
+86
+86
+86
+86
+86
+86
+86
+86
+88
+89
+90
+90
+88
+86
+78
+82
+88
+93
+92
+97
+114
+134
+146
+160
+181
+202
+223
+238
+248
+249
+253
+252
+250
+246
+242
+241
+242
+243
+242
+242
+237
+235
+231
+222
+202
+182
+155
+124
+89
+77
+88
+108
+130
+144
+178
+199
+222
+235
+242
+246
+248
+247
+252
+252
+252
+250
+250
+250
+250
+250
+248
+248
+246
+223
+159
+88
+61
+66
+69
+61
+57
+59
+63
+64
+64
+61
+56
+56
+56
+56
+53
+52
+53
+53
+53
+54
+52
+51
+50
+49
+49
+49
+49
+49
+49
+48
+47
+47
+46
+45
+46
+46
+47
+47
+46
+45
+43
+43
+47
+49
+49
+48
+48
+47
+47
+47
+46
+47
+48
+49
+48
+47
+45
+44
+45
+47
+48
+48
+48
+46
+48
+51
+50
+58
+58
+79
+92
+106
+111
+61
+46
+48
+48
+47
+47
+47
+46
+46
+45
+45
+45
+44
+44
+43
+43
+43
+45
+45
+45
+45
+45
+45
+45
+45
+46
+45
+45
+44
+44
+45
+45
+46
+50
+50
+53
+55
+54
+52
+48
+45
+46
+61
+78
+81
+72
+60
+56
+54
+62
+62
+61
+61
+60
+58
+62
+63
+71
+75
+79
+80
+82
+78
+63
+54
+42
+46
+44
+86
+86
+86
+86
+86
+86
+86
+86
+86
+86
+86
+86
+86
+86
+86
+86
+86
+86
+89
+90
+92
+91
+90
+86
+81
+83
+87
+91
+95
+108
+132
+154
+180
+195
+216
+233
+244
+253
+255
+255
+251
+250
+250
+249
+244
+242
+242
+243
+241
+239
+237
+233
+229
+218
+195
+175
+151
+118
+85
+73
+85
+111
+138
+156
+188
+209
+229
+241
+245
+249
+250
+249
+252
+252
+252
+252
+252
+252
+252
+254
+255
+252
+248
+247
+230
+185
+119
+70
+65
+63
+63
+61
+56
+52
+54
+58
+55
+55
+58
+55
+54
+50
+54
+55
+55
+56
+55
+53
+52
+51
+49
+51
+50
+50
+49
+49
+48
+47
+46
+46
+45
+46
+46
+46
+46
+44
+42
+43
+47
+49
+49
+48
+48
+48
+47
+47
+44
+44
+46
+47
+49
+49
+49
+50
+48
+49
+48
+49
+47
+49
+48
+50
+54
+61
+65
+83
+101
+115
+114
+60
+46
+47
+47
+47
+46
+46
+46
+45
+45
+45
+45
+44
+44
+43
+43
+43
+46
+46
+46
+46
+46
+46
+46
+46
+47
+46
+45
+45
+45
+45
+46
+47
+48
+50
+51
+54
+54
+54
+52
+49
+49
+62
+73
+73
+64
+54
+55
+58
+64
+63
+64
+62
+60
+58
+59
+60
+69
+75
+81
+84
+84
+79
+62
+53
+45
+48
+46
+86
+86
+86
+86
+86
+86
+86
+86
+86
+86
+86
+86
+86
+86
+86
+86
+86
+86
+89
+90
+92
+91
+90
+86
+85
+84
+87
+91
+99
+119
+151
+178
+203
+221
+243
+254
+255
+255
+255
+254
+251
+250
+250
+248
+243
+239
+235
+235
+236
+235
+234
+229
+225
+212
+191
+171
+146
+121
+96
+90
+105
+129
+156
+173
+202
+220
+237
+246
+249
+252
+252
+251
+252
+252
+252
+252
+252
+252
+252
+254
+253
+255
+254
+246
+244
+235
+193
+143
+60
+65
+58
+49
+59
+77
+73
+51
+55
+58
+61
+59
+55
+51
+55
+59
+57
+57
+56
+54
+53
+52
+52
+52
+52
+52
+51
+51
+50
+49
+49
+49
+48
+48
+48
+48
+47
+46
+44
+43
+47
+49
+49
+49
+48
+48
+48
+47
+46
+46
+46
+47
+48
+49
+51
+51
+52
+51
+48
+49
+50
+52
+50
+50
+55
+65
+71
+86
+109
+123
+109
+54
+45
+46
+46
+46
+45
+45
+45
+44
+45
+45
+45
+44
+44
+43
+43
+43
+46
+46
+46
+46
+46
+46
+46
+46
+46
+46
+45
+44
+44
+45
+46
+46
+45
+46
+47
+49
+50
+52
+52
+51
+51
+58
+62
+58
+50
+45
+51
+57
+64
+64
+66
+63
+61
+57
+56
+57
+68
+76
+83
+86
+84
+75
+56
+46
+45
+48
+46
+86
+86
+86
+86
+86
+86
+86
+86
+86
+86
+86
+86
+86
+86
+86
+86
+86
+86
+89
+90
+92
+91
+90
+86
+86
+85
+87
+93
+105
+129
+166
+196
+208
+230
+252
+255
+254
+254
+252
+248
+252
+251
+249
+244
+238
+230
+227
+223
+226
+229
+227
+223
+220
+208
+188
+171
+149
+137
+125
+128
+145
+162
+180
+191
+218
+231
+244
+249
+251
+253
+253
+251
+252
+252
+252
+252
+252
+252
+252
+254
+253
+255
+255
+237
+230
+240
+236
+222
+173
+110
+63
+64
+75
+64
+56
+58
+54
+59
+63
+61
+57
+52
+54
+60
+59
+60
+58
+59
+57
+57
+56
+56
+52
+52
+52
+51
+51
+50
+50
+49
+48
+48
+48
+47
+46
+45
+45
+46
+50
+50
+49
+49
+49
+48
+48
+48
+51
+50
+48
+47
+47
+47
+49
+49
+54
+52
+49
+50
+51
+53
+51
+50
+54
+64
+73
+86
+111
+122
+95
+44
+44
+46
+45
+45
+45
+44
+44
+44
+45
+45
+45
+44
+44
+43
+43
+43
+45
+45
+45
+45
+45
+45
+45
+45
+45
+45
+44
+44
+44
+44
+45
+45
+44
+44
+44
+45
+46
+49
+50
+51
+50
+53
+55
+49
+43
+41
+47
+52
+60
+61
+65
+64
+63
+59
+58
+58
+69
+78
+86
+88
+83
+73
+52
+40
+44
+46
+44
+86
+86
+86
+86
+86
+86
+86
+86
+86
+86
+86
+86
+86
+86
+86
+86
+86
+86
+89
+90
+92
+91
+90
+86
+84
+84
+89
+96
+109
+134
+172
+202
+218
+241
+255
+255
+253
+255
+254
+250
+253
+251
+248
+240
+232
+223
+218
+213
+218
+219
+219
+217
+214
+208
+191
+177
+167
+160
+157
+167
+181
+195
+206
+215
+230
+240
+248
+250
+251
+253
+253
+250
+252
+252
+252
+252
+252
+252
+252
+252
+254
+250
+245
+243
+248
+248
+244
+234
+236
+200
+137
+80
+59
+60
+64
+60
+55
+59
+63
+61
+59
+55
+56
+59
+59
+60
+61
+61
+60
+59
+59
+59
+54
+54
+54
+53
+53
+53
+53
+52
+52
+51
+50
+49
+49
+48
+48
+48
+50
+50
+50
+49
+49
+49
+48
+48
+52
+51
+49
+48
+48
+48
+49
+50
+54
+53
+52
+53
+53
+54
+51
+50
+54
+63
+77
+87
+111
+114
+76
+40
+44
+46
+45
+45
+45
+44
+44
+44
+45
+45
+45
+44
+44
+43
+43
+43
+45
+45
+45
+45
+45
+45
+45
+45
+44
+44
+43
+43
+43
+43
+44
+44
+46
+45
+43
+43
+44
+45
+45
+47
+45
+47
+48
+45
+41
+41
+45
+47
+53
+56
+61
+64
+63
+61
+62
+63
+71
+81
+90
+90
+83
+71
+52
+37
+42
+44
+42
+86
+86
+86
+86
+86
+86
+86
+86
+86
+86
+86
+86
+86
+86
+86
+86
+86
+86
+89
+90
+92
+91
+90
+86
+84
+85
+89
+97
+109
+132
+168
+199
+227
+248
+255
+255
+255
+255
+255
+250
+251
+250
+244
+234
+226
+217
+213
+209
+211
+213
+214
+212
+211
+207
+196
+184
+186
+182
+184
+193
+206
+216
+229
+237
+240
+247
+251
+251
+251
+253
+252
+250
+252
+252
+252
+252
+252
+252
+252
+252
+253
+247
+248
+253
+253
+250
+243
+239
+226
+237
+217
+147
+87
+70
+69
+59
+58
+60
+62
+63
+62
+58
+57
+57
+60
+61
+61
+59
+60
+59
+59
+59
+56
+54
+54
+54
+54
+53
+53
+53
+54
+53
+52
+50
+49
+49
+49
+50
+51
+50
+50
+50
+49
+49
+49
+49
+48
+48
+48
+49
+50
+52
+53
+54
+52
+56
+58
+59
+56
+54
+51
+52
+57
+63
+82
+91
+110
+101
+58
+42
+45
+46
+46
+46
+45
+45
+45
+44
+45
+45
+45
+44
+44
+43
+43
+43
+44
+44
+44
+44
+44
+44
+44
+44
+44
+43
+42
+42
+42
+42
+43
+44
+46
+46
+43
+43
+43
+44
+44
+43
+42
+43
+47
+47
+46
+43
+45
+44
+47
+51
+56
+58
+60
+63
+66
+68
+74
+83
+90
+90
+82
+69
+49
+37
+42
+44
+42
+86
+86
+86
+86
+86
+86
+86
+86
+86
+86
+86
+86
+86
+86
+86
+86
+86
+86
+89
+90
+92
+91
+90
+86
+86
+86
+88
+93
+104
+125
+160
+190
+223
+247
+255
+255
+253
+255
+255
+246
+251
+248
+241
+232
+222
+216
+214
+211
+210
+211
+211
+209
+208
+206
+199
+190
+195
+198
+203
+216
+227
+234
+244
+251
+247
+252
+253
+251
+251
+253
+253
+250
+252
+252
+252
+252
+252
+252
+252
+252
+249
+250
+253
+253
+252
+245
+248
+253
+250
+231
+234
+232
+185
+98
+58
+73
+62
+61
+62
+64
+64
+62
+58
+55
+57
+58
+57
+58
+58
+58
+58
+60
+56
+56
+56
+56
+56
+56
+56
+56
+58
+57
+55
+53
+52
+53
+53
+54
+51
+51
+50
+50
+50
+49
+49
+49
+47
+48
+49
+51
+52
+53
+53
+53
+52
+60
+66
+67
+60
+56
+53
+55
+60
+62
+85
+94
+107
+85
+40
+46
+46
+47
+47
+47
+46
+46
+46
+45
+45
+45
+45
+44
+44
+43
+43
+43
+44
+44
+44
+44
+44
+44
+44
+44
+43
+43
+42
+41
+41
+42
+43
+43
+45
+45
+44
+44
+44
+44
+43
+44
+43
+44
+47
+49
+50
+49
+48
+46
+45
+46
+51
+53
+56
+58
+63
+66
+73
+84
+90
+88
+80
+65
+48
+37
+44
+44
+42
+86
+86
+86
+86
+86
+86
+86
+86
+86
+86
+86
+86
+86
+86
+86
+86
+86
+86
+89
+90
+92
+91
+90
+86
+89
+87
+87
+90
+98
+120
+154
+184
+215
+240
+255
+254
+254
+255
+255
+244
+250
+245
+238
+229
+221
+216
+216
+214
+210
+210
+210
+206
+207
+207
+200
+195
+196
+204
+219
+235
+246
+249
+251
+252
+253
+253
+253
+252
+252
+253
+253
+251
+252
+252
+252
+252
+252
+252
+252
+250
+247
+247
+248
+250
+254
+255
+255
+250
+248
+250
+241
+226
+219
+203
+150
+91
+68
+64
+62
+65
+66
+64
+60
+53
+55
+54
+56
+55
+55
+54
+56
+56
+56
+56
+56
+56
+56
+56
+56
+56
+59
+58
+56
+54
+53
+53
+54
+55
+51
+51
+51
+50
+50
+49
+49
+49
+50
+51
+52
+53
+53
+51
+50
+49
+52
+62
+71
+72
+63
+57
+55
+58
+59
+59
+85
+94
+102
+73
+28
+48
+46
+48
+48
+47
+47
+47
+46
+46
+45
+45
+45
+44
+44
+43
+43
+43
+44
+44
+44
+44
+44
+44
+44
+44
+43
+42
+42
+41
+41
+42
+42
+43
+43
+43
+44
+45
+44
+45
+46
+44
+43
+45
+49
+51
+54
+52
+52
+49
+43
+45
+48
+50
+53
+55
+61
+63
+73
+84
+90
+87
+77
+64
+47
+35
+44
+44
+44
+86
+86
+86
+86
+86
+86
+86
+86
+87
+87
+87
+87
+87
+87
+87
+87
+87
+87
+90
+91
+93
+92
+91
+87
+91
+87
+89
+96
+103
+118
+147
+176
+201
+222
+243
+254
+255
+255
+255
+249
+250
+246
+240
+235
+232
+227
+223
+216
+218
+212
+209
+210
+209
+201
+200
+202
+205
+216
+227
+237
+243
+250
+255
+255
+254
+252
+252
+252
+252
+252
+252
+252
+252
+252
+252
+252
+252
+252
+252
+250
+250
+251
+253
+255
+255
+255
+255
+255
+255
+251
+243
+238
+233
+226
+217
+207
+105
+75
+58
+64
+71
+65
+58
+61
+50
+50
+51
+47
+46
+45
+49
+52
+53
+55
+56
+56
+58
+58
+57
+56
+58
+57
+57
+57
+56
+55
+55
+55
+50
+50
+51
+52
+52
+51
+51
+50
+51
+49
+57
+57
+45
+40
+39
+30
+59
+55
+48
+50
+62
+74
+68
+55
+60
+67
+90
+102
+85
+49
+35
+42
+47
+49
+48
+48
+48
+47
+47
+47
+47
+47
+47
+46
+45
+45
+45
+44
+48
+48
+47
+47
+46
+46
+46
+46
+43
+43
+43
+43
+43
+43
+42
+42
+46
+45
+45
+44
+45
+44
+45
+45
+42
+44
+47
+50
+54
+56
+60
+60
+50
+47
+45
+41
+42
+47
+56
+63
+71
+78
+87
+84
+73
+59
+46
+42
+44
+43
+44
+86
+86
+86
+86
+86
+86
+86
+86
+87
+87
+87
+87
+87
+87
+87
+87
+87
+87
+90
+91
+93
+92
+91
+87
+90
+86
+89
+96
+105
+120
+150
+180
+204
+224
+244
+255
+255
+255
+252
+249
+250
+244
+239
+235
+230
+225
+221
+214
+209
+203
+202
+204
+204
+201
+202
+206
+215
+222
+233
+242
+247
+250
+253
+254
+252
+252
+252
+252
+252
+252
+252
+252
+252
+252
+252
+252
+252
+252
+252
+252
+249
+249
+252
+255
+255
+255
+255
+255
+255
+253
+246
+242
+239
+234
+226
+215
+206
+149
+91
+67
+66
+68
+67
+64
+51
+52
+51
+51
+51
+49
+49
+49
+56
+56
+57
+58
+57
+54
+55
+58
+56
+56
+56
+55
+55
+54
+54
+54
+52
+53
+54
+54
+54
+54
+53
+53
+57
+50
+55
+56
+43
+36
+37
+33
+52
+50
+44
+42
+49
+63
+67
+66
+61
+74
+94
+95
+73
+44
+37
+47
+49
+50
+50
+50
+49
+49
+49
+49
+49
+49
+49
+48
+48
+47
+47
+47
+49
+49
+49
+48
+48
+48
+47
+47
+45
+45
+44
+44
+43
+43
+42
+42
+42
+42
+41
+41
+41
+42
+42
+43
+45
+44
+45
+47
+51
+54
+62
+63
+56
+53
+49
+46
+43
+46
+50
+54
+68
+75
+84
+82
+75
+60
+50
+44
+44
+45
+44
+86
+86
+86
+86
+86
+86
+86
+86
+87
+87
+87
+87
+87
+87
+87
+87
+87
+87
+90
+91
+93
+92
+91
+87
+88
+86
+89
+97
+105
+121
+153
+184
+208
+226
+246
+255
+255
+254
+252
+248
+247
+243
+237
+233
+228
+222
+216
+209
+201
+194
+193
+198
+200
+203
+207
+215
+225
+234
+241
+247
+250
+251
+252
+252
+252
+252
+252
+252
+252
+252
+252
+252
+252
+252
+252
+252
+252
+252
+252
+252
+250
+250
+253
+253
+254
+255
+255
+254
+255
+252
+247
+245
+246
+242
+236
+227
+214
+219
+208
+166
+105
+66
+60
+71
+72
+62
+50
+42
+42
+45
+51
+54
+52
+51
+52
+57
+56
+53
+55
+62
+52
+52
+52
+52
+51
+51
+51
+51
+53
+54
+54
+55
+55
+54
+53
+53
+59
+49
+55
+64
+51
+38
+40
+43
+44
+46
+42
+37
+37
+50
+65
+75
+69
+84
+97
+83
+57
+37
+40
+51
+50
+52
+52
+52
+51
+51
+51
+50
+52
+52
+51
+51
+51
+50
+50
+50
+52
+51
+51
+51
+50
+50
+50
+49
+47
+47
+46
+45
+44
+43
+42
+42
+40
+40
+40
+40
+40
+41
+42
+43
+48
+46
+43
+43
+46
+52
+60
+64
+61
+58
+55
+51
+45
+43
+42
+44
+61
+68
+77
+77
+72
+60
+52
+47
+46
+46
+45
+85
+85
+86
+86
+86
+86
+87
+87
+87
+87
+87
+87
+87
+87
+87
+87
+87
+87
+90
+91
+93
+92
+91
+87
+88
+86
+89
+96
+104
+119
+152
+185
+208
+227
+246
+255
+255
+254
+253
+249
+246
+241
+237
+231
+226
+220
+213
+206
+192
+187
+188
+194
+199
+205
+217
+224
+239
+245
+250
+253
+252
+250
+250
+251
+252
+252
+252
+252
+252
+252
+252
+252
+252
+252
+252
+252
+252
+252
+252
+252
+253
+253
+253
+253
+253
+254
+253
+250
+251
+250
+248
+249
+248
+248
+244
+238
+237
+228
+219
+219
+217
+188
+121
+60
+54
+53
+53
+57
+59
+54
+45
+38
+64
+58
+56
+58
+56
+48
+45
+49
+51
+51
+51
+51
+50
+50
+50
+50
+52
+53
+53
+53
+53
+52
+52
+51
+54
+47
+63
+83
+72
+52
+48
+51
+42
+45
+42
+38
+35
+44
+58
+70
+81
+92
+94
+70
+46
+37
+43
+49
+51
+53
+53
+52
+52
+51
+51
+51
+53
+52
+52
+52
+52
+52
+52
+52
+54
+54
+54
+53
+53
+53
+52
+52
+50
+50
+48
+47
+46
+44
+43
+43
+42
+42
+41
+41
+42
+43
+44
+44
+47
+45
+42
+42
+46
+49
+57
+58
+61
+59
+59
+54
+49
+44
+40
+39
+53
+59
+67
+69
+66
+59
+52
+48
+47
+47
+46
+85
+85
+85
+86
+86
+87
+87
+87
+87
+87
+87
+87
+87
+87
+87
+87
+87
+87
+90
+91
+93
+92
+91
+87
+88
+87
+90
+95
+101
+116
+149
+183
+206
+226
+245
+253
+255
+254
+253
+250
+248
+243
+241
+235
+229
+222
+214
+204
+191
+185
+185
+190
+200
+209
+223
+237
+248
+251
+255
+255
+254
+251
+249
+249
+252
+252
+252
+252
+252
+252
+252
+252
+252
+252
+252
+252
+252
+252
+252
+254
+255
+255
+255
+255
+254
+251
+250
+248
+246
+247
+247
+249
+251
+251
+250
+248
+234
+243
+244
+241
+235
+228
+210
+188
+163
+135
+97
+67
+53
+53
+57
+60
+55
+51
+50
+53
+57
+58
+59
+59
+49
+49
+49
+49
+49
+49
+49
+51
+54
+54
+54
+54
+54
+53
+52
+51
+51
+50
+77
+102
+90
+64
+52
+51
+42
+43
+43
+43
+40
+42
+47
+54
+91
+94
+86
+61
+46
+44
+46
+45
+51
+53
+53
+52
+52
+51
+51
+51
+52
+52
+52
+52
+52
+52
+52
+52
+56
+56
+56
+55
+55
+55
+54
+54
+53
+52
+51
+50
+49
+47
+46
+46
+46
+46
+45
+44
+44
+45
+46
+46
+45
+45
+45
+45
+49
+49
+54
+52
+57
+57
+60
+58
+54
+47
+44
+42
+46
+52
+60
+63
+62
+55
+50
+45
+46
+45
+44
+84
+84
+85
+86
+86
+87
+88
+88
+87
+87
+87
+87
+87
+87
+87
+87
+87
+87
+90
+91
+93
+92
+91
+87
+88
+87
+90
+95
+99
+114
+148
+183
+209
+228
+246
+254
+255
+254
+253
+250
+248
+244
+243
+239
+232
+224
+213
+204
+189
+181
+180
+186
+197
+209
+227
+243
+253
+255
+255
+255
+252
+249
+248
+249
+250
+252
+252
+252
+252
+252
+252
+252
+252
+252
+252
+252
+252
+252
+252
+254
+255
+255
+255
+255
+253
+250
+248
+245
+241
+244
+248
+250
+253
+254
+255
+255
+252
+254
+250
+241
+240
+244
+241
+237
+230
+220
+208
+189
+167
+141
+115
+99
+75
+76
+67
+50
+40
+42
+44
+42
+50
+50
+50
+50
+51
+51
+51
+51
+55
+58
+58
+57
+57
+56
+54
+54
+53
+57
+83
+103
+88
+63
+50
+44
+43
+43
+43
+46
+44
+42
+42
+46
+92
+87
+77
+59
+54
+54
+51
+45
+52
+53
+53
+53
+52
+52
+52
+52
+51
+51
+52
+52
+52
+52
+53
+53
+57
+57
+57
+57
+56
+56
+56
+55
+55
+55
+54
+53
+52
+51
+50
+50
+48
+47
+46
+45
+44
+44
+44
+44
+44
+45
+48
+49
+50
+50
+50
+45
+49
+51
+55
+58
+55
+52
+49
+48
+45
+48
+54
+58
+57
+54
+50
+45
+45
+45
+44
+84
+84
+85
+86
+86
+87
+88
+88
+87
+87
+87
+87
+87
+87
+87
+87
+87
+87
+90
+91
+93
+92
+91
+87
+87
+86
+90
+95
+100
+115
+151
+187
+216
+234
+251
+255
+255
+254
+253
+249
+245
+242
+240
+236
+230
+221
+208
+199
+185
+179
+176
+180
+191
+207
+227
+242
+254
+255
+255
+255
+252
+249
+247
+248
+250
+252
+252
+252
+252
+252
+252
+252
+252
+252
+252
+252
+252
+252
+252
+254
+255
+255
+255
+254
+250
+248
+243
+240
+238
+242
+246
+250
+254
+255
+255
+255
+255
+255
+255
+255
+255
+249
+240
+233
+241
+239
+237
+237
+234
+229
+223
+218
+209
+208
+180
+120
+71
+56
+53
+48
+50
+50
+50
+51
+51
+52
+52
+54
+56
+58
+58
+58
+57
+56
+55
+54
+55
+59
+76
+84
+67
+52
+48
+43
+46
+46
+47
+50
+47
+44
+49
+58
+82
+75
+70
+64
+65
+62
+57
+51
+53
+55
+55
+55
+54
+54
+54
+53
+52
+52
+52
+53
+53
+54
+54
+54
+58
+58
+58
+57
+57
+56
+56
+56
+57
+57
+56
+56
+55
+55
+54
+54
+53
+51
+50
+48
+46
+45
+46
+46
+47
+47
+48
+49
+51
+51
+50
+45
+42
+45
+50
+55
+55
+52
+50
+50
+47
+49
+54
+58
+57
+55
+51
+46
+46
+45
+44
+82
+82
+83
+84
+86
+87
+88
+88
+87
+87
+87
+87
+87
+87
+87
+87
+87
+87
+89
+91
+93
+92
+91
+87
+86
+87
+90
+96
+103
+117
+157
+194
+222
+239
+255
+255
+255
+254
+250
+246
+238
+237
+233
+229
+225
+215
+202
+195
+184
+177
+172
+177
+188
+204
+224
+242
+254
+255
+255
+255
+251
+249
+249
+250
+252
+252
+252
+252
+252
+252
+252
+252
+252
+252
+252
+252
+252
+252
+252
+254
+255
+255
+255
+253
+251
+247
+244
+241
+240
+242
+246
+250
+251
+252
+255
+255
+255
+255
+255
+255
+255
+252
+251
+250
+240
+238
+236
+234
+231
+231
+234
+234
+219
+228
+197
+119
+55
+41
+47
+47
+51
+51
+52
+52
+53
+53
+54
+56
+55
+57
+57
+56
+55
+54
+53
+52
+53
+56
+65
+60
+44
+40
+46
+42
+46
+47
+50
+50
+48
+46
+59
+78
+73
+69
+67
+70
+71
+66
+59
+56
+52
+53
+53
+54
+54
+54
+55
+55
+53
+53
+53
+54
+54
+55
+55
+55
+57
+57
+58
+56
+57
+55
+56
+55
+58
+57
+58
+57
+57
+56
+57
+57
+56
+57
+52
+50
+48
+46
+47
+47
+49
+49
+46
+46
+43
+42
+41
+37
+30
+33
+43
+49
+54
+53
+53
+53
+50
+51
+53
+54
+56
+53
+48
+45
+45
+46
+45
+78
+79
+80
+81
+85
+86
+87
+88
+85
+85
+86
+86
+86
+87
+89
+88
+87
+88
+91
+93
+94
+91
+88
+85
+85
+86
+90
+93
+103
+127
+172
+208
+228
+240
+253
+255
+251
+251
+248
+243
+235
+235
+230
+221
+217
+214
+201
+189
+189
+175
+164
+169
+180
+196
+215
+231
+251
+255
+255
+255
+255
+253
+250
+251
+254
+254
+254
+254
+254
+254
+252
+252
+253
+253
+251
+250
+250
+249
+249
+249
+255
+254
+253
+253
+255
+253
+252
+248
+250
+246
+247
+250
+248
+244
+243
+249
+255
+255
+255
+255
+255
+252
+252
+253
+255
+255
+253
+249
+242
+237
+234
+232
+223
+230
+202
+114
+53
+51
+47
+45
+49
+49
+49
+49
+50
+50
+52
+52
+50
+53
+53
+54
+55
+54
+54
+53
+54
+52
+45
+39
+38
+42
+43
+41
+48
+47
+41
+40
+52
+67
+68
+62
+63
+66
+68
+70
+69
+66
+62
+59
+51
+49
+48
+48
+49
+50
+53
+54
+54
+54
+54
+54
+52
+52
+52
+52
+55
+54
+56
+53
+55
+54
+56
+55
+57
+55
+56
+55
+58
+57
+60
+61
+58
+57
+56
+52
+48
+46
+46
+48
+48
+49
+47
+45
+41
+38
+39
+39
+43
+44
+49
+52
+56
+57
+59
+57
+54
+55
+60
+59
+60
+59
+52
+44
+44
+43
+40
+77
+78
+80
+81
+83
+84
+88
+88
+86
+86
+87
+87
+87
+88
+90
+89
+88
+88
+91
+93
+94
+91
+90
+86
+87
+86
+93
+98
+110
+136
+178
+209
+227
+238
+253
+255
+253
+249
+245
+239
+236
+231
+226
+216
+211
+206
+196
+184
+175
+166
+160
+166
+181
+196
+214
+228
+254
+255
+255
+255
+255
+255
+253
+253
+254
+254
+254
+254
+254
+254
+252
+252
+253
+253
+250
+250
+250
+249
+248
+248
+253
+252
+253
+253
+255
+255
+254
+253
+253
+251
+249
+241
+229
+219
+222
+234
+253
+255
+254
+253
+251
+250
+254
+255
+255
+255
+255
+252
+244
+236
+231
+229
+223
+231
+202
+112
+51
+50
+46
+45
+47
+47
+49
+49
+50
+50
+52
+52
+50
+50
+53
+54
+55
+54
+54
+53
+53
+49
+45
+39
+40
+43
+44
+43
+43
+42
+51
+60
+64
+60
+58
+57
+61
+62
+65
+66
+66
+65
+61
+60
+54
+52
+51
+48
+49
+50
+52
+54
+54
+54
+54
+54
+52
+52
+50
+50
+55
+54
+54
+53
+53
+54
+54
+55
+55
+55
+55
+55
+56
+57
+58
+59
+63
+62
+59
+55
+53
+51
+51
+54
+55
+54
+52
+45
+41
+42
+47
+49
+59
+59
+61
+62
+63
+61
+58
+56
+57
+60
+65
+65
+67
+64
+57
+48
+42
+42
+39
+77
+78
+80
+82
+83
+85
+88
+89
+88
+88
+89
+89
+88
+89
+91
+90
+88
+89
+91
+92
+94
+91
+90
+86
+87
+84
+90
+99
+115
+142
+179
+205
+223
+235
+252
+255
+253
+248
+242
+235
+231
+224
+216
+204
+198
+192
+183
+173
+164
+161
+163
+173
+191
+206
+222
+234
+254
+255
+255
+255
+255
+255
+253
+254
+254
+254
+254
+254
+254
+254
+252
+252
+253
+252
+250
+250
+249
+249
+248
+248
+253
+251
+252
+253
+254
+255
+254
+253
+253
+251
+250
+236
+216
+204
+212
+230
+253
+255
+254
+253
+251
+250
+254
+255
+255
+255
+255
+252
+244
+236
+231
+229
+224
+231
+201
+109
+48
+48
+46
+46
+46
+47
+49
+50
+51
+50
+52
+51
+50
+50
+53
+53
+55
+54
+55
+54
+54
+49
+47
+42
+44
+46
+49
+50
+48
+52
+73
+90
+83
+61
+51
+52
+56
+57
+59
+60
+61
+62
+62
+63
+61
+58
+57
+53
+53
+53
+53
+54
+54
+54
+54
+54
+52
+52
+50
+50
+55
+55
+54
+54
+54
+54
+55
+55
+55
+55
+55
+55
+56
+57
+59
+59
+66
+65
+63
+59
+58
+56
+57
+60
+62
+59
+55
+49
+47
+51
+61
+66
+74
+74
+72
+69
+64
+58
+53
+50
+56
+61
+68
+71
+74
+70
+62
+53
+46
+46
+43
+77
+78
+80
+82
+84
+86
+89
+90
+90
+90
+91
+90
+90
+90
+92
+91
+89
+89
+91
+92
+93
+91
+90
+87
+85
+80
+85
+96
+116
+142
+173
+194
+218
+231
+250
+255
+252
+245
+237
+228
+221
+211
+201
+190
+184
+178
+170
+163
+168
+171
+179
+192
+211
+225
+239
+248
+255
+255
+255
+255
+255
+254
+253
+254
+254
+254
+254
+254
+254
+254
+252
+252
+252
+252
+250
+249
+249
+249
+247
+247
+252
+250
+251
+252
+254
+255
+254
+253
+251
+251
+250
+237
+218
+208
+217
+235
+253
+255
+254
+253
+251
+250
+254
+255
+255
+255
+255
+252
+244
+236
+230
+228
+227
+233
+201
+108
+48
+48
+48
+48
+46
+47
+50
+50
+51
+50
+51
+50
+50
+50
+52
+52
+54
+54
+56
+55
+56
+51
+50
+48
+50
+51
+55
+60
+71
+82
+105
+116
+106
+83
+65
+57
+55
+54
+55
+54
+56
+59
+60
+62
+62
+60
+60
+56
+56
+56
+55
+56
+54
+54
+54
+54
+52
+52
+50
+50
+56
+55
+54
+54
+54
+54
+55
+56
+56
+55
+55
+56
+56
+58
+59
+60
+63
+62
+61
+57
+57
+56
+57
+61
+61
+59
+55
+49
+47
+53
+63
+69
+69
+70
+69
+65
+59
+52
+47
+44
+50
+56
+66
+71
+75
+71
+62
+51
+48
+47
+44
+77
+78
+80
+82
+84
+86
+90
+91
+92
+91
+92
+91
+90
+90
+93
+91
+89
+89
+90
+91
+92
+90
+90
+87
+86
+80
+84
+96
+116
+140
+167
+184
+213
+228
+247
+253
+249
+242
+233
+223
+214
+201
+191
+182
+177
+171
+165
+161
+174
+182
+194
+208
+225
+239
+251
+255
+255
+255
+255
+255
+255
+254
+253
+255
+254
+254
+254
+254
+254
+254
+252
+252
+252
+252
+249
+249
+249
+248
+247
+247
+251
+249
+251
+252
+254
+255
+254
+253
+251
+249
+249
+241
+229
+220
+225
+238
+253
+255
+254
+253
+251
+250
+254
+255
+255
+255
+255
+252
+245
+236
+230
+227
+229
+235
+202
+109
+49
+50
+50
+51
+46
+47
+51
+51
+52
+50
+50
+49
+50
+50
+52
+52
+54
+54
+56
+57
+58
+53
+54
+54
+55
+55
+61
+68
+98
+115
+131
+129
+121
+111
+90
+65
+56
+54
+53
+51
+52
+55
+57
+59
+60
+58
+59
+56
+58
+58
+57
+58
+54
+54
+54
+54
+52
+52
+50
+50
+56
+56
+55
+54
+54
+55
+56
+56
+56
+56
+56
+56
+57
+58
+59
+60
+61
+60
+59
+55
+55
+54
+56
+59
+58
+57
+54
+49
+47
+51
+59
+63
+63
+64
+64
+61
+54
+47
+43
+42
+45
+52
+64
+69
+74
+70
+60
+49
+42
+42
+39

Added: packages/libhdf4/branches/upstream/current/mfhdf/hrepack/image8.txt
===================================================================
--- packages/libhdf4/branches/upstream/current/mfhdf/hrepack/image8.txt	                        (rev 0)
+++ packages/libhdf4/branches/upstream/current/mfhdf/hrepack/image8.txt	2007-05-15 09:53:05 UTC (rev 831)
@@ -0,0 +1,120006 @@
+components
+1
+height
+400
+width
+300
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+12
+8
+5
+2
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+61
+52
+39
+25
+10
+2
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+93
+86
+77
+65
+48
+16
+6
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+108
+106
+104
+99
+88
+48
+23
+8
+2
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+109
+107
+106
+106
+105
+98
+60
+26
+5
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+107
+105
+104
+104
+105
+105
+100
+73
+37
+6
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+108
+105
+104
+104
+105
+105
+104
+93
+69
+29
+3
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+109
+105
+103
+103
+104
+106
+106
+103
+89
+59
+12
+4
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+111
+105
+103
+103
+104
+106
+107
+106
+100
+86
+29
+10
+2
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+113
+105
+102
+101
+102
+105
+107
+108
+106
+100
+55
+20
+5
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+115
+107
+102
+101
+100
+101
+104
+107
+108
+107
+88
+42
+15
+2
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+118
+109
+103
+100
+99
+100
+102
+105
+108
+108
+99
+63
+30
+7
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+119
+111
+104
+100
+97
+100
+101
+103
+106
+109
+105
+82
+48
+17
+3
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+2
+2
+3
+3
+4
+5
+6
+7
+7
+8
+9
+9
+9
+9
+9
+8
+7
+7
+6
+4
+3
+2
+2
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+119
+113
+106
+100
+97
+100
+101
+102
+104
+108
+108
+95
+65
+30
+6
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+2
+3
+4
+6
+7
+9
+11
+13
+16
+18
+20
+22
+24
+26
+27
+27
+28
+28
+27
+25
+24
+22
+20
+16
+13
+11
+8
+6
+3
+2
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+119
+115
+109
+102
+97
+100
+103
+104
+104
+106
+108
+103
+79
+46
+15
+2
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+3
+4
+6
+9
+12
+17
+21
+25
+30
+34
+40
+44
+48
+52
+55
+58
+60
+61
+62
+62
+60
+58
+56
+52
+48
+41
+35
+29
+23
+18
+11
+7
+4
+2
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+115
+114
+111
+106
+99
+97
+104
+106
+106
+106
+107
+106
+91
+65
+30
+7
+3
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+2
+3
+6
+9
+13
+20
+26
+33
+41
+49
+59
+66
+74
+80
+87
+94
+98
+102
+106
+109
+112
+113
+114
+115
+115
+115
+114
+112
+109
+105
+98
+91
+82
+72
+61
+46
+36
+26
+18
+12
+5
+2
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+109
+111
+110
+107
+103
+97
+104
+107
+108
+107
+107
+107
+97
+77
+44
+16
+7
+2
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+2
+4
+6
+11
+17
+24
+31
+40
+52
+62
+71
+79
+87
+95
+100
+104
+107
+110
+113
+115
+117
+119
+120
+121
+122
+123
+124
+124
+125
+125
+124
+124
+123
+120
+118
+113
+108
+101
+87
+75
+62
+49
+36
+21
+13
+7
+4
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+102
+104
+106
+107
+106
+98
+101
+106
+109
+108
+108
+107
+101
+85
+56
+27
+14
+6
+2
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+3
+6
+10
+15
+22
+33
+43
+53
+64
+74
+85
+93
+99
+104
+109
+113
+115
+117
+119
+120
+121
+122
+123
+124
+124
+125
+126
+126
+127
+128
+128
+129
+129
+129
+129
+129
+129
+127
+125
+122
+115
+106
+96
+84
+70
+50
+37
+25
+16
+9
+2
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+95
+97
+101
+104
+106
+100
+99
+104
+109
+110
+108
+108
+104
+92
+67
+38
+23
+12
+4
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+2
+3
+6
+12
+18
+27
+36
+48
+63
+75
+85
+95
+103
+110
+113
+116
+117
+118
+119
+120
+120
+121
+121
+122
+122
+122
+123
+123
+124
+124
+125
+126
+126
+127
+128
+129
+129
+130
+130
+130
+131
+131
+130
+129
+127
+122
+114
+104
+85
+69
+53
+38
+25
+11
+6
+3
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+90
+92
+95
+99
+105
+105
+98
+102
+108
+111
+110
+109
+106
+98
+79
+48
+33
+19
+9
+2
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+2
+5
+10
+17
+29
+41
+55
+69
+83
+99
+107
+112
+115
+116
+117
+118
+118
+119
+119
+120
+120
+120
+120
+120
+119
+119
+119
+119
+119
+119
+119
+120
+121
+122
+123
+124
+126
+127
+128
+129
+130
+131
+131
+131
+131
+131
+131
+129
+128
+120
+108
+91
+73
+53
+31
+18
+10
+5
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+89
+90
+93
+96
+99
+105
+100
+98
+101
+110
+111
+110
+108
+101
+85
+68
+54
+37
+21
+7
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+3
+9
+16
+26
+38
+52
+74
+88
+100
+109
+114
+115
+116
+117
+117
+118
+118
+117
+117
+115
+113
+111
+110
+109
+108
+108
+108
+109
+109
+110
+110
+111
+112
+113
+114
+115
+116
+117
+118
+119
+121
+123
+124
+126
+128
+129
+131
+131
+131
+131
+132
+131
+130
+127
+120
+108
+83
+62
+43
+26
+14
+4
+2
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+88
+89
+91
+95
+98
+104
+103
+99
+98
+106
+110
+110
+108
+102
+90
+71
+62
+50
+36
+18
+3
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+4
+8
+15
+29
+42
+58
+73
+88
+102
+108
+111
+114
+116
+116
+116
+116
+115
+113
+110
+108
+107
+106
+105
+105
+105
+106
+106
+107
+107
+108
+109
+109
+110
+111
+112
+113
+114
+115
+116
+117
+118
+119
+120
+121
+123
+124
+125
+126
+128
+129
+130
+131
+132
+132
+132
+131
+129
+126
+115
+101
+83
+63
+44
+21
+11
+5
+2
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+87
+88
+90
+93
+99
+103
+104
+101
+97
+99
+107
+109
+108
+103
+92
+74
+65
+57
+47
+31
+9
+3
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+3
+8
+15
+25
+38
+59
+74
+88
+99
+107
+114
+115
+115
+115
+115
+113
+111
+109
+107
+105
+103
+102
+102
+102
+102
+103
+104
+105
+106
+108
+109
+111
+112
+113
+114
+116
+117
+118
+118
+119
+119
+120
+120
+120
+121
+122
+122
+123
+124
+125
+126
+128
+129
+130
+131
+132
+132
+133
+133
+133
+130
+124
+113
+99
+81
+53
+34
+20
+10
+4
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+87
+87
+88
+92
+100
+103
+104
+103
+99
+93
+101
+104
+105
+101
+93
+75
+66
+60
+54
+44
+18
+7
+2
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+2
+4
+11
+22
+35
+51
+68
+90
+102
+110
+114
+115
+115
+115
+113
+111
+110
+106
+103
+100
+99
+98
+99
+100
+101
+102
+104
+106
+108
+110
+113
+115
+118
+120
+123
+124
+126
+128
+129
+130
+130
+130
+130
+129
+129
+128
+127
+126
+126
+126
+126
+126
+126
+127
+128
+129
+130
+131
+132
+133
+133
+134
+134
+133
+131
+125
+115
+90
+68
+46
+27
+13
+3
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+87
+87
+88
+92
+102
+105
+105
+104
+102
+95
+90
+97
+99
+97
+93
+76
+66
+61
+57
+54
+32
+13
+4
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+2
+6
+12
+28
+46
+66
+86
+104
+113
+114
+115
+115
+115
+114
+112
+107
+102
+98
+95
+95
+96
+96
+98
+99
+101
+103
+106
+109
+114
+119
+124
+129
+133
+138
+142
+145
+148
+150
+152
+153
+153
+153
+152
+150
+149
+147
+144
+142
+138
+136
+133
+131
+129
+128
+128
+128
+129
+129
+130
+131
+132
+133
+134
+134
+135
+135
+134
+133
+125
+108
+84
+58
+33
+11
+5
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+90
+90
+91
+95
+104
+108
+107
+106
+104
+102
+91
+86
+86
+89
+89
+83
+71
+63
+60
+58
+48
+25
+10
+2
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+5
+13
+26
+44
+74
+94
+107
+113
+114
+115
+115
+114
+112
+108
+100
+96
+94
+93
+93
+95
+96
+97
+100
+103
+110
+117
+125
+133
+141
+151
+158
+164
+169
+174
+178
+181
+183
+185
+186
+187
+187
+187
+187
+186
+185
+183
+182
+179
+176
+172
+168
+164
+159
+154
+148
+143
+139
+136
+133
+132
+132
+132
+133
+133
+134
+135
+135
+135
+135
+134
+132
+125
+110
+87
+49
+25
+11
+4
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+93
+93
+96
+102
+107
+108
+107
+106
+105
+104
+96
+88
+83
+81
+82
+80
+75
+69
+64
+61
+55
+35
+16
+4
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+2
+9
+20
+38
+59
+81
+101
+108
+112
+114
+114
+113
+110
+105
+100
+96
+93
+92
+92
+93
+94
+98
+102
+109
+117
+127
+139
+149
+157
+164
+171
+178
+182
+185
+187
+189
+191
+192
+193
+193
+194
+194
+194
+193
+193
+193
+192
+191
+189
+188
+186
+184
+181
+179
+176
+173
+169
+164
+160
+155
+150
+143
+140
+137
+135
+134
+134
+135
+135
+135
+135
+135
+134
+132
+127
+117
+89
+61
+36
+17
+5
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+96
+97
+101
+106
+109
+109
+107
+106
+105
+105
+101
+95
+87
+80
+77
+76
+75
+71
+67
+63
+59
+43
+23
+7
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+4
+9
+27
+47
+69
+88
+103
+112
+113
+113
+113
+111
+105
+100
+96
+92
+90
+91
+92
+94
+98
+103
+114
+123
+134
+145
+155
+167
+174
+179
+184
+188
+192
+193
+195
+195
+196
+196
+196
+196
+196
+195
+195
+194
+194
+193
+193
+192
+192
+191
+190
+189
+188
+186
+185
+183
+182
+179
+177
+174
+170
+166
+160
+155
+150
+145
+141
+138
+136
+136
+135
+135
+135
+135
+135
+134
+131
+117
+96
+71
+44
+22
+5
+2
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+99
+100
+104
+109
+110
+108
+106
+105
+105
+105
+104
+101
+95
+86
+76
+72
+72
+71
+69
+66
+62
+50
+30
+11
+2
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+2
+5
+13
+26
+55
+78
+96
+108
+112
+113
+112
+111
+108
+103
+95
+91
+89
+89
+89
+93
+97
+103
+112
+122
+139
+152
+163
+172
+180
+187
+190
+193
+195
+196
+196
+196
+196
+196
+196
+195
+194
+193
+192
+191
+189
+188
+187
+186
+186
+185
+185
+185
+185
+185
+185
+184
+184
+183
+183
+182
+181
+181
+179
+178
+174
+170
+165
+159
+153
+146
+142
+139
+137
+136
+136
+135
+135
+135
+135
+132
+123
+105
+80
+51
+19
+8
+3
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+102
+103
+107
+110
+110
+104
+103
+103
+104
+105
+105
+105
+101
+94
+81
+70
+69
+69
+68
+67
+64
+56
+36
+15
+2
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+5
+14
+30
+55
+93
+104
+110
+113
+114
+112
+110
+104
+97
+90
+87
+87
+87
+89
+91
+99
+110
+124
+140
+155
+171
+180
+186
+190
+193
+195
+196
+197
+197
+197
+197
+196
+195
+193
+192
+189
+186
+184
+181
+179
+175
+173
+172
+170
+169
+169
+169
+170
+171
+173
+175
+177
+178
+179
+180
+181
+181
+181
+180
+179
+178
+178
+176
+173
+170
+162
+155
+149
+143
+139
+137
+136
+136
+135
+135
+135
+134
+129
+116
+92
+47
+23
+9
+2
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+103
+105
+108
+110
+110
+103
+101
+102
+103
+105
+105
+105
+103
+98
+87
+70
+68
+67
+67
+66
+65
+60
+42
+20
+4
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+7
+23
+47
+75
+100
+109
+112
+113
+113
+111
+104
+95
+89
+86
+84
+86
+88
+92
+100
+111
+135
+151
+165
+177
+185
+191
+194
+195
+196
+197
+197
+196
+195
+194
+192
+189
+185
+181
+177
+172
+165
+159
+154
+149
+144
+138
+134
+130
+127
+125
+123
+123
+124
+125
+127
+132
+136
+141
+146
+151
+158
+164
+169
+173
+176
+177
+177
+177
+176
+175
+174
+172
+168
+163
+156
+146
+141
+138
+136
+136
+135
+135
+135
+132
+128
+104
+68
+37
+14
+3
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+104
+105
+107
+109
+110
+103
+101
+101
+102
+104
+104
+104
+101
+95
+86
+70
+67
+66
+66
+66
+65
+61
+44
+23
+4
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+2
+7
+27
+54
+79
+97
+107
+112
+112
+111
+108
+101
+92
+87
+85
+85
+86
+90
+99
+112
+128
+144
+164
+175
+183
+188
+193
+195
+196
+196
+196
+195
+194
+192
+189
+185
+180
+173
+167
+160
+153
+145
+135
+128
+122
+115
+110
+103
+99
+95
+92
+89
+87
+87
+87
+87
+88
+91
+94
+98
+103
+108
+117
+125
+133
+141
+149
+159
+165
+170
+173
+174
+174
+173
+172
+170
+167
+161
+154
+148
+142
+138
+136
+136
+135
+134
+133
+124
+104
+76
+45
+18
+3
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+103
+105
+107
+109
+110
+105
+102
+101
+102
+104
+104
+102
+97
+91
+84
+71
+66
+65
+65
+65
+65
+62
+46
+24
+5
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+3
+10
+24
+58
+82
+98
+107
+111
+112
+110
+105
+98
+91
+84
+83
+84
+87
+92
+106
+122
+138
+155
+170
+182
+188
+192
+195
+196
+196
+196
+195
+193
+191
+186
+182
+176
+169
+162
+151
+142
+133
+124
+115
+104
+97
+91
+85
+80
+76
+73
+71
+69
+67
+66
+66
+66
+66
+66
+68
+69
+72
+74
+78
+84
+89
+96
+103
+112
+125
+135
+145
+153
+161
+168
+171
+172
+172
+171
+168
+164
+159
+154
+147
+141
+138
+136
+135
+135
+133
+124
+107
+81
+48
+15
+6
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+103
+104
+106
+108
+109
+106
+103
+102
+103
+104
+103
+99
+92
+85
+82
+74
+67
+64
+64
+65
+65
+62
+46
+24
+5
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+2
+10
+26
+51
+88
+101
+108
+111
+112
+109
+103
+96
+88
+84
+81
+84
+88
+95
+107
+130
+150
+165
+177
+187
+192
+195
+196
+196
+196
+195
+193
+190
+187
+182
+174
+166
+157
+148
+137
+123
+112
+103
+93
+85
+76
+71
+67
+63
+61
+59
+58
+57
+57
+57
+57
+57
+57
+57
+57
+57
+58
+58
+59
+60
+62
+64
+67
+72
+78
+88
+98
+110
+121
+134
+150
+158
+164
+168
+170
+171
+170
+168
+165
+159
+150
+144
+140
+137
+136
+135
+133
+127
+112
+85
+39
+18
+6
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+102
+103
+105
+106
+107
+107
+105
+104
+104
+105
+104
+93
+85
+80
+80
+78
+69
+65
+64
+65
+65
+62
+45
+23
+4
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+8
+25
+52
+86
+106
+109
+110
+111
+111
+103
+92
+85
+81
+80
+82
+87
+98
+114
+135
+161
+175
+185
+191
+195
+197
+197
+197
+196
+194
+191
+187
+182
+176
+169
+156
+144
+132
+120
+107
+91
+81
+73
+66
+61
+57
+56
+55
+55
+54
+54
+54
+54
+54
+55
+55
+55
+55
+55
+55
+56
+56
+56
+56
+57
+57
+57
+58
+59
+60
+62
+66
+72
+80
+92
+112
+129
+143
+156
+165
+170
+171
+171
+170
+169
+163
+155
+147
+141
+137
+136
+135
+134
+130
+122
+79
+42
+17
+4
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+100
+101
+102
+103
+104
+107
+106
+106
+107
+108
+97
+85
+80
+80
+81
+80
+73
+67
+64
+65
+65
+61
+42
+19
+3
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+9
+33
+64
+92
+106
+109
+110
+110
+107
+101
+87
+82
+79
+79
+82
+93
+110
+131
+153
+171
+186
+191
+195
+197
+197
+197
+195
+193
+190
+187
+180
+172
+162
+151
+138
+119
+104
+91
+80
+70
+61
+58
+55
+54
+53
+53
+53
+53
+53
+53
+54
+54
+54
+54
+54
+54
+54
+55
+55
+55
+55
+55
+55
+56
+56
+56
+56
+56
+57
+57
+57
+58
+59
+60
+62
+68
+76
+89
+105
+123
+145
+159
+166
+170
+170
+169
+167
+164
+157
+148
+140
+137
+136
+135
+133
+124
+94
+58
+26
+6
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+99
+99
+99
+100
+102
+103
+105
+106
+107
+109
+91
+82
+80
+81
+82
+80
+72
+67
+65
+65
+65
+57
+36
+14
+2
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+2
+6
+31
+64
+88
+103
+108
+109
+109
+105
+98
+89
+81
+79
+79
+84
+93
+116
+138
+157
+174
+185
+194
+196
+197
+197
+196
+193
+191
+187
+182
+176
+164
+151
+138
+123
+108
+90
+78
+69
+63
+58
+55
+54
+53
+53
+53
+53
+53
+53
+53
+53
+53
+53
+54
+54
+54
+54
+54
+54
+54
+54
+55
+55
+55
+55
+55
+55
+56
+56
+56
+56
+57
+57
+58
+58
+59
+61
+64
+69
+76
+86
+106
+124
+139
+153
+164
+168
+168
+168
+165
+160
+150
+144
+139
+136
+135
+131
+119
+94
+62
+26
+4
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+98
+98
+97
+97
+99
+100
+103
+105
+107
+109
+88
+81
+80
+81
+81
+78
+70
+66
+65
+65
+64
+52
+30
+10
+2
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+2
+7
+21
+61
+87
+101
+107
+109
+109
+105
+98
+89
+81
+77
+79
+85
+96
+113
+142
+162
+177
+187
+194
+197
+197
+196
+195
+193
+189
+184
+178
+169
+159
+141
+125
+110
+96
+82
+69
+62
+58
+55
+53
+52
+52
+52
+52
+52
+53
+53
+53
+53
+53
+53
+53
+53
+53
+53
+53
+53
+53
+53
+53
+54
+54
+54
+54
+54
+54
+55
+55
+55
+56
+56
+56
+57
+57
+57
+58
+59
+60
+62
+66
+78
+90
+105
+122
+139
+156
+164
+168
+168
+166
+160
+154
+147
+142
+137
+135
+131
+118
+95
+61
+19
+7
+2
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+98
+97
+96
+95
+96
+98
+100
+103
+106
+109
+90
+82
+81
+81
+78
+74
+68
+66
+65
+66
+63
+44
+22
+6
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+6
+19
+45
+88
+101
+107
+108
+108
+106
+98
+88
+81
+77
+78
+84
+97
+115
+138
+167
+181
+190
+195
+198
+198
+196
+194
+191
+188
+182
+174
+164
+151
+137
+114
+98
+84
+73
+64
+57
+54
+53
+52
+52
+52
+52
+52
+52
+52
+52
+52
+52
+52
+53
+53
+53
+53
+53
+53
+52
+52
+52
+52
+52
+52
+52
+53
+53
+53
+53
+53
+54
+54
+54
+55
+55
+56
+56
+56
+57
+57
+58
+58
+59
+62
+66
+75
+89
+106
+132
+148
+159
+165
+167
+166
+163
+157
+150
+143
+137
+135
+131
+120
+98
+47
+21
+7
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+98
+97
+96
+95
+95
+96
+96
+99
+104
+109
+98
+83
+80
+80
+73
+70
+67
+66
+66
+66
+60
+33
+14
+3
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+2
+15
+39
+75
+103
+106
+108
+108
+107
+99
+87
+80
+76
+75
+82
+96
+117
+141
+165
+185
+192
+196
+198
+198
+196
+193
+190
+187
+182
+172
+160
+144
+127
+109
+87
+74
+65
+58
+54
+52
+52
+52
+52
+52
+52
+52
+52
+52
+52
+52
+52
+52
+52
+52
+52
+52
+52
+52
+52
+52
+52
+51
+51
+51
+51
+51
+51
+51
+51
+52
+52
+52
+52
+53
+53
+54
+54
+55
+55
+56
+57
+57
+57
+58
+58
+59
+61
+65
+71
+94
+116
+136
+153
+164
+167
+168
+166
+162
+153
+141
+138
+135
+132
+126
+88
+46
+18
+4
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+97
+97
+96
+95
+95
+95
+95
+96
+100
+107
+107
+79
+76
+80
+73
+70
+68
+67
+66
+64
+40
+17
+5
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+2
+14
+41
+73
+100
+107
+108
+107
+105
+99
+85
+78
+75
+76
+80
+101
+126
+150
+172
+188
+196
+198
+199
+198
+195
+191
+188
+183
+176
+167
+147
+129
+110
+92
+77
+63
+58
+54
+52
+52
+51
+51
+51
+51
+51
+51
+52
+52
+52
+52
+52
+52
+52
+52
+52
+51
+51
+51
+51
+51
+51
+51
+51
+51
+51
+51
+51
+51
+51
+51
+51
+51
+51
+51
+51
+51
+51
+52
+52
+53
+53
+54
+55
+56
+56
+57
+58
+58
+59
+60
+64
+72
+87
+108
+132
+158
+165
+167
+166
+164
+157
+148
+141
+137
+134
+125
+96
+58
+23
+4
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+97
+97
+96
+95
+95
+95
+95
+96
+98
+102
+108
+78
+75
+80
+75
+71
+69
+67
+63
+54
+23
+9
+3
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+8
+32
+64
+91
+104
+107
+107
+105
+99
+90
+77
+75
+76
+82
+94
+125
+150
+171
+186
+194
+198
+199
+197
+195
+191
+186
+181
+173
+162
+147
+122
+104
+87
+74
+63
+56
+54
+52
+51
+51
+51
+51
+51
+51
+51
+51
+52
+52
+52
+52
+52
+52
+52
+51
+51
+51
+51
+51
+51
+51
+51
+51
+51
+51
+50
+50
+50
+50
+50
+50
+50
+50
+50
+50
+51
+51
+51
+51
+51
+51
+52
+52
+53
+54
+54
+56
+56
+57
+58
+59
+60
+63
+70
+80
+96
+125
+144
+157
+164
+165
+164
+159
+151
+143
+138
+132
+120
+93
+58
+21
+3
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+97
+97
+96
+96
+96
+96
+95
+95
+96
+99
+108
+80
+75
+78
+76
+72
+69
+64
+55
+38
+11
+4
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+3
+21
+55
+83
+101
+106
+107
+105
+99
+91
+81
+74
+75
+81
+94
+114
+149
+171
+185
+194
+198
+199
+197
+194
+191
+187
+180
+171
+158
+143
+124
+99
+83
+71
+62
+56
+53
+52
+51
+51
+51
+51
+51
+51
+51
+51
+51
+52
+52
+52
+52
+52
+51
+51
+51
+51
+50
+50
+50
+50
+50
+50
+50
+50
+50
+50
+50
+50
+50
+49
+49
+49
+49
+49
+49
+50
+50
+50
+50
+50
+50
+51
+51
+51
+52
+52
+54
+54
+55
+56
+57
+58
+60
+62
+66
+73
+92
+113
+132
+149
+160
+166
+164
+159
+153
+145
+137
+132
+117
+92
+54
+14
+5
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+96
+97
+96
+96
+96
+97
+96
+95
+95
+96
+107
+87
+77
+74
+77
+72
+67
+58
+43
+22
+5
+2
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+3
+8
+41
+76
+96
+105
+107
+105
+100
+92
+83
+74
+73
+78
+91
+111
+138
+171
+186
+194
+198
+199
+198
+194
+190
+186
+181
+171
+157
+140
+121
+101
+78
+67
+59
+55
+52
+51
+51
+51
+50
+50
+50
+51
+51
+51
+51
+52
+52
+52
+52
+52
+51
+51
+51
+50
+50
+50
+50
+50
+50
+50
+50
+50
+49
+49
+49
+49
+49
+48
+48
+48
+48
+48
+48
+48
+48
+48
+49
+49
+49
+50
+50
+50
+50
+51
+51
+52
+52
+53
+54
+56
+57
+58
+59
+60
+62
+69
+83
+102
+123
+145
+161
+164
+164
+161
+154
+144
+138
+132
+119
+92
+38
+15
+4
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+96
+96
+96
+96
+96
+97
+98
+97
+95
+95
+103
+101
+83
+69
+75
+69
+61
+47
+29
+11
+2
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+2
+7
+17
+65
+91
+103
+106
+106
+102
+95
+84
+76
+72
+74
+86
+107
+133
+161
+188
+195
+198
+199
+198
+195
+190
+186
+181
+174
+158
+139
+118
+98
+79
+63
+57
+54
+52
+51
+51
+50
+50
+50
+50
+50
+51
+51
+51
+52
+52
+52
+52
+52
+51
+51
+50
+50
+50
+50
+50
+49
+49
+49
+49
+49
+49
+48
+48
+48
+47
+47
+47
+47
+47
+46
+46
+46
+46
+46
+46
+47
+47
+47
+48
+49
+49
+50
+50
+50
+51
+51
+51
+52
+53
+55
+56
+57
+58
+59
+61
+65
+75
+91
+114
+147
+159
+164
+164
+163
+155
+145
+139
+133
+125
+79
+36
+12
+2
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+96
+96
+96
+96
+96
+97
+99
+99
+98
+95
+96
+103
+90
+72
+66
+65
+53
+36
+19
+7
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+4
+16
+42
+92
+101
+105
+106
+103
+94
+83
+75
+71
+72
+85
+108
+135
+162
+185
+198
+199
+198
+197
+195
+189
+184
+178
+170
+157
+132
+110
+90
+74
+62
+54
+53
+52
+51
+51
+50
+50
+50
+50
+50
+51
+51
+52
+52
+52
+52
+52
+51
+51
+50
+49
+49
+49
+49
+49
+49
+49
+49
+49
+48
+48
+48
+48
+47
+47
+47
+47
+47
+46
+46
+46
+46
+46
+45
+45
+45
+45
+45
+45
+45
+46
+46
+47
+48
+49
+50
+50
+51
+51
+51
+52
+53
+54
+56
+57
+59
+60
+62
+66
+74
+101
+126
+146
+160
+165
+164
+159
+150
+142
+136
+124
+88
+48
+15
+2
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+96
+96
+96
+95
+95
+97
+99
+101
+101
+97
+96
+102
+98
+86
+65
+57
+49
+34
+18
+6
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+10
+30
+64
+99
+104
+105
+103
+99
+87
+77
+72
+72
+76
+101
+129
+156
+179
+194
+199
+199
+197
+195
+191
+184
+178
+169
+157
+139
+111
+91
+75
+63
+56
+53
+52
+51
+51
+50
+50
+50
+50
+50
+51
+52
+52
+52
+52
+52
+52
+51
+50
+50
+49
+49
+49
+49
+49
+49
+49
+49
+49
+48
+48
+48
+48
+47
+47
+47
+47
+47
+47
+47
+47
+46
+46
+46
+46
+46
+45
+45
+45
+45
+45
+45
+45
+45
+46
+46
+48
+49
+50
+50
+51
+51
+52
+52
+53
+54
+57
+58
+60
+62
+65
+77
+95
+117
+138
+156
+164
+163
+159
+152
+143
+133
+117
+85
+47
+13
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+95
+95
+95
+95
+95
+97
+99
+101
+103
+101
+96
+99
+101
+94
+72
+50
+41
+29
+16
+6
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+4
+19
+45
+82
+103
+105
+104
+100
+94
+80
+73
+72
+75
+86
+120
+149
+173
+190
+199
+199
+198
+195
+191
+186
+179
+170
+158
+141
+120
+91
+75
+64
+56
+53
+52
+51
+50
+50
+50
+50
+50
+50
+51
+51
+52
+52
+52
+52
+52
+51
+50
+50
+49
+49
+49
+49
+49
+49
+49
+49
+48
+48
+48
+48
+48
+48
+48
+48
+48
+48
+48
+48
+48
+48
+48
+48
+47
+47
+47
+47
+46
+46
+45
+45
+44
+44
+44
+44
+45
+45
+46
+47
+49
+50
+51
+51
+51
+52
+53
+54
+56
+58
+59
+61
+66
+75
+91
+111
+134
+156
+162
+162
+159
+152
+141
+132
+113
+83
+42
+8
+2
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+95
+95
+95
+95
+95
+97
+99
+101
+104
+104
+98
+98
+100
+98
+84
+48
+34
+22
+13
+4
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+8
+30
+60
+95
+105
+105
+102
+96
+88
+74
+71
+73
+82
+100
+139
+167
+186
+197
+200
+198
+196
+192
+187
+181
+172
+160
+143
+123
+100
+75
+63
+56
+53
+52
+51
+50
+50
+50
+49
+50
+50
+51
+52
+52
+53
+53
+52
+52
+51
+50
+49
+49
+49
+49
+49
+49
+49
+49
+49
+48
+48
+48
+48
+48
+48
+48
+48
+48
+48
+48
+49
+49
+49
+49
+49
+49
+49
+49
+49
+48
+48
+47
+47
+46
+45
+45
+44
+44
+44
+44
+44
+45
+46
+48
+49
+50
+51
+51
+51
+52
+53
+55
+57
+59
+61
+64
+72
+85
+105
+137
+153
+161
+162
+160
+149
+141
+132
+114
+80
+25
+9
+2
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+95
+95
+94
+95
+95
+97
+99
+102
+104
+106
+103
+98
+99
+101
+98
+57
+33
+17
+7
+2
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+2
+15
+43
+76
+101
+106
+103
+98
+91
+81
+70
+70
+77
+92
+117
+159
+183
+195
+200
+200
+196
+193
+188
+183
+176
+164
+147
+126
+104
+82
+63
+56
+53
+52
+51
+50
+50
+49
+49
+49
+50
+51
+52
+52
+53
+53
+53
+52
+51
+50
+49
+49
+49
+49
+49
+49
+49
+49
+49
+48
+48
+48
+48
+48
+48
+49
+49
+49
+49
+49
+49
+49
+49
+49
+49
+49
+50
+50
+50
+50
+51
+51
+50
+50
+49
+47
+46
+45
+44
+44
+44
+44
+44
+44
+45
+47
+48
+50
+51
+51
+51
+52
+53
+54
+56
+59
+61
+63
+68
+77
+106
+134
+152
+162
+163
+160
+150
+140
+131
+119
+59
+22
+5
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+94
+94
+94
+95
+95
+99
+102
+104
+105
+107
+107
+102
+100
+100
+103
+89
+47
+20
+6
+2
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+5
+27
+61
+92
+104
+105
+100
+93
+83
+73
+68
+74
+88
+111
+142
+182
+194
+200
+200
+198
+193
+188
+182
+175
+167
+147
+125
+102
+82
+65
+55
+53
+52
+51
+50
+49
+49
+49
+49
+50
+51
+52
+53
+53
+53
+53
+52
+51
+50
+49
+49
+49
+49
+49
+49
+49
+49
+49
+48
+48
+48
+49
+49
+49
+49
+49
+49
+49
+49
+49
+49
+49
+49
+49
+49
+49
+49
+50
+50
+50
+51
+51
+51
+52
+52
+52
+51
+50
+48
+46
+44
+44
+43
+43
+43
+44
+45
+47
+48
+50
+51
+51
+52
+52
+52
+55
+58
+60
+62
+64
+73
+93
+119
+143
+160
+163
+161
+153
+143
+133
+115
+66
+28
+5
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+94
+94
+94
+95
+96
+101
+103
+105
+107
+107
+108
+105
+102
+100
+102
+97
+67
+34
+9
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+9
+39
+72
+97
+104
+104
+96
+87
+78
+70
+69
+79
+99
+127
+160
+191
+198
+200
+198
+195
+190
+183
+177
+168
+157
+131
+108
+87
+70
+58
+53
+52
+51
+50
+49
+49
+49
+49
+50
+51
+52
+53
+53
+53
+53
+52
+51
+50
+49
+49
+49
+49
+49
+49
+49
+49
+49
+49
+49
+49
+49
+49
+49
+49
+49
+49
+49
+48
+47
+47
+46
+46
+46
+46
+46
+47
+47
+48
+48
+49
+50
+51
+51
+52
+52
+53
+53
+52
+52
+50
+48
+46
+45
+44
+43
+43
+44
+44
+46
+47
+50
+51
+51
+52
+52
+53
+54
+57
+59
+62
+66
+75
+91
+114
+140
+159
+161
+159
+153
+142
+127
+101
+61
+23
+3
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+93
+94
+94
+95
+97
+102
+104
+106
+107
+108
+109
+108
+104
+101
+102
+101
+84
+51
+18
+2
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+2
+16
+51
+81
+100
+103
+102
+92
+82
+74
+69
+72
+87
+113
+144
+176
+198
+200
+199
+196
+192
+186
+179
+171
+160
+145
+115
+92
+74
+62
+55
+52
+51
+50
+50
+49
+49
+49
+50
+50
+52
+53
+53
+53
+53
+53
+51
+50
+50
+49
+49
+49
+49
+49
+49
+49
+49
+49
+49
+49
+49
+49
+49
+49
+49
+48
+47
+46
+46
+45
+44
+44
+44
+44
+44
+45
+45
+46
+47
+48
+48
+50
+50
+51
+52
+52
+53
+53
+54
+53
+53
+51
+50
+48
+46
+44
+43
+43
+43
+44
+45
+47
+49
+50
+51
+52
+52
+53
+54
+56
+59
+62
+66
+74
+89
+112
+145
+156
+160
+159
+152
+136
+122
+92
+53
+15
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+93
+94
+94
+96
+98
+103
+105
+107
+107
+108
+109
+109
+106
+103
+101
+102
+96
+68
+32
+5
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+3
+25
+63
+88
+102
+103
+99
+88
+78
+72
+69
+75
+97
+127
+160
+188
+202
+200
+198
+194
+189
+181
+174
+164
+150
+131
+99
+79
+65
+56
+53
+51
+51
+50
+49
+49
+49
+49
+50
+51
+53
+53
+54
+53
+53
+52
+51
+50
+49
+49
+49
+49
+49
+49
+49
+49
+49
+49
+49
+49
+49
+49
+49
+48
+48
+46
+45
+44
+43
+43
+43
+43
+43
+43
+44
+44
+45
+46
+46
+47
+48
+49
+50
+51
+52
+52
+53
+54
+54
+54
+54
+54
+53
+51
+49
+47
+44
+44
+43
+43
+44
+45
+47
+49
+50
+51
+52
+52
+52
+54
+56
+60
+62
+66
+72
+85
+120
+143
+156
+161
+160
+146
+135
+116
+86
+38
+5
+2
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+92
+93
+94
+96
+100
+105
+106
+107
+108
+108
+109
+109
+108
+106
+101
+102
+101
+83
+52
+12
+2
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+2
+5
+33
+74
+95
+102
+103
+95
+83
+75
+70
+69
+80
+109
+143
+174
+197
+203
+199
+195
+191
+185
+177
+168
+155
+138
+116
+84
+68
+58
+54
+52
+51
+50
+49
+49
+49
+49
+50
+51
+52
+53
+54
+54
+53
+52
+51
+50
+49
+49
+49
+49
+49
+49
+49
+49
+49
+49
+49
+50
+50
+50
+49
+48
+47
+45
+43
+42
+42
+42
+42
+42
+43
+43
+43
+44
+44
+45
+46
+47
+47
+48
+49
+50
+51
+52
+52
+53
+54
+54
+54
+55
+55
+55
+54
+53
+51
+47
+45
+44
+43
+43
+43
+44
+46
+48
+50
+52
+52
+52
+52
+53
+56
+60
+62
+65
+69
+88
+119
+143
+158
+162
+158
+144
+132
+112
+77
+15
+4
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+92
+93
+95
+97
+102
+106
+107
+107
+107
+108
+108
+109
+109
+108
+103
+102
+102
+96
+77
+35
+3
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+3
+8
+49
+83
+98
+101
+101
+90
+79
+73
+70
+71
+91
+128
+162
+188
+201
+202
+196
+192
+187
+180
+170
+158
+142
+121
+96
+69
+59
+54
+52
+51
+50
+49
+48
+48
+48
+49
+51
+52
+53
+54
+54
+53
+53
+52
+50
+49
+49
+49
+49
+49
+49
+49
+49
+49
+49
+50
+50
+50
+50
+49
+47
+44
+43
+42
+41
+42
+42
+42
+43
+43
+44
+45
+46
+47
+47
+48
+49
+49
+49
+50
+50
+51
+51
+52
+52
+53
+54
+54
+54
+55
+55
+55
+55
+55
+54
+52
+50
+47
+45
+43
+43
+43
+44
+45
+47
+50
+51
+52
+52
+52
+53
+55
+58
+62
+64
+69
+83
+109
+137
+157
+161
+157
+145
+131
+118
+57
+20
+4
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+92
+94
+96
+99
+103
+107
+107
+107
+107
+107
+107
+108
+109
+108
+106
+102
+102
+100
+86
+54
+10
+3
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+4
+13
+60
+88
+99
+101
+100
+85
+76
+71
+70
+73
+102
+142
+174
+195
+202
+201
+194
+189
+183
+175
+164
+150
+130
+107
+83
+62
+56
+53
+52
+51
+49
+48
+48
+48
+49
+50
+52
+53
+54
+54
+54
+53
+52
+51
+50
+49
+49
+49
+49
+49
+49
+49
+49
+49
+50
+50
+50
+49
+48
+46
+43
+42
+41
+41
+41
+42
+43
+44
+45
+46
+47
+48
+48
+49
+49
+50
+50
+50
+50
+50
+51
+51
+52
+52
+53
+53
+54
+54
+55
+55
+55
+55
+55
+55
+55
+54
+52
+50
+48
+46
+44
+43
+43
+44
+45
+48
+50
+51
+52
+52
+53
+54
+55
+58
+62
+66
+72
+86
+108
+138
+159
+159
+154
+143
+127
+94
+46
+16
+2
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+92
+94
+96
+100
+104
+107
+107
+107
+107
+106
+106
+107
+108
+109
+108
+103
+103
+102
+94
+73
+17
+6
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+6
+19
+69
+91
+100
+100
+98
+82
+74
+70
+71
+77
+115
+155
+183
+199
+202
+199
+191
+186
+180
+171
+157
+140
+118
+94
+73
+57
+54
+52
+51
+50
+49
+48
+48
+48
+49
+51
+52
+53
+54
+54
+54
+53
+52
+51
+50
+49
+49
+49
+49
+49
+49
+49
+49
+50
+50
+50
+49
+48
+46
+43
+41
+41
+41
+41
+42
+44
+45
+46
+47
+48
+49
+49
+50
+50
+50
+50
+50
+50
+50
+50
+51
+51
+51
+52
+52
+53
+54
+54
+55
+55
+55
+55
+55
+55
+55
+55
+54
+52
+50
+48
+45
+44
+43
+43
+44
+45
+48
+50
+51
+52
+53
+53
+54
+56
+58
+63
+66
+73
+87
+111
+146
+157
+158
+152
+140
+116
+75
+37
+9
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+92
+94
+97
+101
+105
+107
+107
+107
+107
+106
+105
+106
+107
+109
+109
+104
+103
+102
+99
+88
+29
+9
+2
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+2
+8
+25
+77
+94
+100
+99
+95
+78
+72
+69
+72
+82
+128
+167
+190
+201
+202
+196
+188
+182
+176
+166
+150
+129
+106
+83
+64
+54
+53
+51
+50
+49
+48
+48
+48
+49
+50
+51
+53
+53
+54
+54
+53
+52
+51
+50
+50
+49
+49
+49
+49
+49
+49
+49
+50
+50
+50
+50
+48
+46
+43
+41
+40
+41
+42
+43
+44
+46
+48
+48
+49
+49
+50
+50
+50
+50
+50
+50
+50
+50
+50
+50
+50
+50
+51
+51
+51
+52
+53
+54
+54
+55
+55
+55
+55
+55
+55
+55
+55
+54
+53
+51
+47
+45
+44
+43
+43
+44
+46
+48
+50
+52
+53
+53
+53
+54
+56
+60
+63
+67
+73
+85
+124
+147
+157
+158
+152
+130
+103
+62
+24
+3
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+93
+95
+98
+102
+106
+107
+107
+107
+106
+105
+104
+105
+106
+108
+109
+105
+103
+103
+101
+97
+46
+16
+3
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+2
+11
+32
+84
+96
+100
+98
+93
+75
+70
+68
+73
+89
+141
+177
+196
+202
+201
+193
+186
+179
+172
+162
+141
+118
+94
+73
+59
+53
+52
+51
+50
+48
+48
+48
+48
+49
+50
+52
+53
+53
+54
+54
+53
+52
+51
+50
+50
+50
+49
+49
+49
+49
+49
+50
+50
+50
+50
+49
+46
+43
+41
+40
+40
+41
+43
+45
+47
+48
+49
+49
+49
+50
+50
+50
+50
+50
+50
+51
+51
+51
+50
+50
+50
+50
+49
+49
+49
+50
+51
+53
+53
+54
+55
+55
+55
+55
+55
+55
+55
+55
+54
+53
+50
+47
+45
+44
+43
+43
+44
+46
+48
+50
+52
+53
+53
+54
+54
+57
+61
+64
+67
+71
+93
+127
+149
+160
+160
+142
+126
+90
+47
+10
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+93
+95
+98
+103
+107
+107
+107
+106
+106
+105
+103
+104
+105
+106
+109
+107
+104
+103
+102
+101
+65
+27
+8
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+3
+15
+42
+90
+97
+100
+97
+88
+72
+69
+69
+78
+100
+157
+186
+199
+202
+201
+189
+182
+175
+166
+154
+128
+103
+81
+64
+55
+52
+51
+50
+49
+48
+48
+48
+49
+49
+51
+53
+53
+53
+53
+53
+53
+51
+50
+50
+50
+50
+50
+49
+49
+50
+50
+50
+50
+50
+50
+46
+42
+40
+40
+40
+42
+44
+46
+48
+48
+49
+49
+49
+50
+50
+51
+52
+53
+54
+55
+56
+56
+55
+54
+53
+51
+50
+49
+49
+48
+47
+47
+48
+50
+51
+53
+54
+54
+55
+55
+55
+55
+55
+55
+54
+52
+50
+48
+46
+44
+43
+44
+44
+46
+48
+51
+52
+53
+53
+54
+55
+58
+61
+64
+67
+73
+92
+122
+149
+161
+159
+140
+120
+88
+35
+5
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+94
+95
+99
+103
+107
+107
+107
+106
+105
+104
+103
+103
+104
+105
+108
+107
+104
+103
+102
+102
+78
+34
+11
+2
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+5
+19
+49
+93
+98
+99
+95
+85
+70
+68
+70
+82
+109
+167
+190
+200
+201
+199
+186
+179
+171
+161
+147
+118
+93
+73
+59
+54
+52
+51
+50
+48
+48
+48
+48
+49
+50
+51
+53
+53
+53
+53
+53
+52
+51
+50
+50
+50
+50
+50
+50
+50
+50
+50
+50
+50
+50
+48
+42
+40
+40
+40
+41
+44
+46
+47
+48
+48
+49
+49
+50
+51
+53
+58
+62
+67
+71
+74
+77
+77
+76
+74
+71
+65
+60
+56
+52
+49
+47
+47
+47
+47
+48
+50
+51
+53
+54
+54
+55
+55
+55
+55
+54
+53
+52
+50
+47
+45
+44
+44
+44
+45
+46
+49
+51
+52
+53
+54
+55
+57
+59
+62
+65
+69
+78
+99
+126
+154
+161
+153
+136
+108
+68
+15
+5
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+94
+95
+99
+103
+107
+107
+107
+106
+105
+103
+103
+103
+103
+105
+108
+108
+104
+103
+103
+102
+87
+42
+15
+2
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+7
+23
+55
+94
+98
+98
+94
+83
+69
+68
+72
+87
+118
+175
+194
+201
+201
+197
+183
+176
+168
+156
+139
+108
+85
+67
+56
+53
+51
+50
+49
+48
+48
+48
+48
+49
+50
+51
+53
+53
+53
+53
+53
+52
+51
+50
+50
+50
+50
+50
+50
+50
+50
+50
+50
+50
+49
+45
+40
+39
+39
+40
+42
+46
+47
+48
+48
+48
+49
+51
+53
+58
+64
+73
+80
+86
+91
+96
+100
+101
+101
+100
+97
+91
+84
+76
+69
+61
+54
+50
+48
+46
+47
+48
+49
+51
+52
+53
+54
+54
+54
+54
+54
+54
+53
+51
+49
+47
+45
+44
+44
+44
+45
+48
+50
+52
+53
+53
+54
+56
+58
+60
+63
+67
+71
+82
+103
+134
+160
+159
+147
+127
+99
+34
+12
+3
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+94
+96
+99
+104
+107
+107
+107
+106
+104
+103
+102
+102
+103
+104
+108
+108
+104
+103
+103
+102
+93
+50
+20
+3
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+2
+2
+2
+2
+2
+2
+2
+2
+2
+2
+2
+2
+3
+5
+6
+7
+7
+6
+5
+3
+2
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+2
+8
+26
+61
+95
+98
+98
+93
+81
+69
+68
+73
+91
+126
+183
+196
+201
+200
+195
+181
+173
+164
+151
+131
+99
+77
+62
+55
+53
+51
+50
+49
+48
+48
+48
+49
+49
+50
+51
+52
+53
+53
+53
+53
+51
+50
+50
+50
+50
+50
+50
+50
+50
+50
+50
+50
+49
+47
+42
+39
+39
+40
+41
+44
+47
+47
+48
+48
+48
+50
+54
+60
+68
+77
+88
+96
+102
+108
+112
+117
+119
+121
+121
+121
+117
+111
+103
+94
+83
+69
+61
+54
+50
+47
+47
+48
+49
+50
+52
+53
+53
+54
+54
+54
+54
+53
+52
+50
+48
+46
+44
+44
+44
+44
+46
+49
+51
+52
+53
+54
+55
+57
+59
+62
+66
+68
+72
+84
+108
+150
+159
+155
+142
+122
+61
+25
+7
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+94
+96
+99
+104
+107
+107
+107
+106
+104
+103
+102
+102
+102
+104
+108
+108
+105
+103
+103
+103
+97
+58
+25
+4
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+2
+3
+4
+5
+6
+6
+6
+6
+5
+5
+4
+4
+4
+6
+8
+14
+18
+21
+21
+19
+14
+9
+5
+2
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+2
+10
+29
+67
+96
+98
+97
+91
+79
+68
+68
+75
+95
+134
+189
+198
+202
+199
+192
+179
+170
+160
+145
+123
+90
+70
+59
+54
+52
+51
+49
+48
+48
+48
+48
+49
+50
+50
+51
+52
+52
+53
+53
+52
+51
+50
+50
+50
+50
+50
+50
+50
+50
+50
+50
+50
+48
+45
+40
+39
+39
+40
+43
+46
+47
+47
+47
+48
+49
+54
+62
+71
+82
+90
+98
+103
+108
+112
+116
+120
+123
+125
+127
+129
+131
+131
+129
+124
+114
+96
+82
+69
+58
+50
+47
+47
+47
+48
+50
+52
+52
+53
+53
+54
+54
+53
+53
+51
+50
+47
+45
+44
+44
+44
+45
+47
+50
+52
+53
+54
+54
+56
+58
+61
+65
+68
+70
+74
+82
+127
+153
+161
+154
+134
+93
+44
+15
+3
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+94
+96
+99
+103
+107
+107
+107
+106
+104
+102
+102
+102
+102
+104
+108
+108
+105
+103
+103
+103
+100
+65
+30
+5
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+2
+5
+9
+14
+23
+30
+36
+41
+44
+45
+44
+41
+37
+33
+28
+27
+28
+32
+41
+57
+69
+76
+79
+79
+71
+57
+41
+25
+12
+3
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+3
+12
+34
+74
+97
+98
+96
+90
+77
+68
+68
+76
+99
+143
+193
+200
+202
+198
+189
+176
+167
+154
+137
+113
+80
+64
+56
+53
+52
+50
+49
+48
+48
+48
+48
+49
+50
+51
+51
+52
+52
+52
+52
+52
+51
+50
+50
+50
+50
+50
+50
+50
+50
+50
+51
+49
+46
+42
+39
+38
+39
+42
+45
+46
+47
+47
+47
+49
+53
+63
+73
+81
+87
+92
+99
+103
+107
+109
+112
+115
+118
+121
+125
+128
+132
+133
+134
+134
+134
+130
+119
+104
+88
+71
+56
+50
+48
+47
+48
+50
+51
+52
+53
+53
+53
+53
+53
+52
+51
+49
+47
+45
+44
+43
+44
+46
+48
+50
+53
+54
+54
+55
+57
+59
+65
+67
+69
+70
+73
+90
+129
+152
+160
+156
+125
+77
+37
+10
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+94
+95
+99
+103
+107
+107
+107
+106
+105
+103
+102
+102
+103
+105
+108
+108
+104
+102
+102
+103
+101
+69
+33
+6
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+2
+3
+10
+20
+32
+44
+55
+65
+70
+74
+77
+79
+80
+79
+78
+76
+73
+69
+65
+64
+67
+73
+85
+91
+95
+97
+98
+96
+90
+82
+70
+53
+25
+12
+4
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+3
+14
+38
+78
+97
+98
+96
+89
+76
+67
+68
+77
+102
+149
+195
+200
+202
+197
+187
+174
+164
+150
+131
+106
+74
+61
+54
+52
+52
+50
+48
+48
+48
+48
+48
+49
+50
+50
+51
+51
+52
+52
+52
+52
+51
+50
+50
+50
+50
+50
+50
+50
+50
+51
+50
+48
+44
+40
+38
+38
+40
+43
+46
+46
+46
+47
+48
+51
+57
+68
+75
+81
+87
+90
+92
+91
+89
+87
+86
+86
+89
+93
+98
+105
+116
+123
+129
+133
+135
+135
+132
+126
+116
+100
+76
+63
+54
+49
+47
+48
+50
+51
+52
+52
+53
+53
+53
+52
+52
+50
+48
+46
+45
+44
+44
+45
+47
+49
+52
+54
+54
+55
+56
+58
+63
+67
+69
+70
+72
+79
+105
+135
+158
+161
+138
+104
+61
+23
+4
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+94
+95
+98
+103
+107
+107
+107
+107
+105
+103
+103
+102
+104
+106
+109
+108
+103
+102
+102
+104
+102
+72
+35
+7
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+2
+5
+12
+23
+41
+53
+64
+73
+80
+86
+88
+90
+92
+93
+94
+94
+93
+93
+92
+90
+88
+88
+89
+92
+98
+101
+103
+105
+105
+105
+104
+101
+95
+85
+64
+43
+23
+9
+2
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+4
+16
+42
+81
+97
+98
+96
+88
+75
+67
+68
+78
+104
+152
+196
+201
+202
+197
+185
+172
+162
+146
+125
+99
+69
+59
+54
+52
+51
+49
+48
+48
+48
+48
+49
+49
+50
+50
+51
+51
+51
+52
+51
+51
+51
+50
+50
+50
+50
+50
+50
+50
+51
+51
+50
+47
+43
+39
+38
+38
+41
+44
+46
+46
+46
+46
+49
+53
+60
+70
+75
+79
+81
+80
+75
+70
+67
+64
+62
+62
+64
+66
+70
+75
+86
+96
+106
+117
+127
+135
+137
+136
+132
+124
+103
+84
+68
+57
+50
+48
+49
+50
+51
+52
+53
+53
+53
+52
+52
+50
+49
+47
+45
+44
+44
+44
+46
+48
+51
+53
+54
+54
+55
+57
+61
+67
+70
+71
+72
+74
+87
+115
+145
+162
+152
+125
+85
+42
+11
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+93
+95
+98
+102
+107
+107
+107
+107
+106
+104
+103
+103
+105
+107
+109
+108
+103
+101
+102
+104
+103
+74
+37
+7
+2
+2
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+4
+11
+22
+36
+53
+74
+83
+88
+90
+91
+91
+91
+91
+92
+93
+94
+95
+96
+96
+97
+99
+99
+99
+100
+101
+103
+104
+105
+105
+106
+106
+106
+105
+105
+104
+97
+79
+54
+29
+9
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+4
+19
+45
+84
+98
+98
+95
+88
+74
+67
+68
+79
+106
+155
+197
+202
+202
+196
+183
+170
+159
+142
+120
+93
+65
+57
+53
+52
+51
+49
+48
+48
+48
+48
+49
+49
+50
+50
+51
+51
+51
+51
+51
+51
+51
+50
+50
+50
+50
+50
+50
+50
+51
+51
+50
+46
+41
+38
+37
+39
+42
+45
+46
+46
+46
+47
+49
+55
+61
+69
+73
+73
+71
+65
+56
+52
+49
+47
+47
+47
+47
+48
+49
+51
+57
+65
+76
+90
+105
+123
+131
+136
+139
+139
+128
+110
+90
+71
+57
+49
+49
+49
+50
+51
+52
+52
+53
+52
+52
+51
+49
+48
+46
+45
+44
+44
+45
+47
+50
+53
+54
+54
+55
+56
+60
+66
+70
+73
+73
+73
+76
+95
+125
+157
+162
+142
+107
+66
+23
+3
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+93
+95
+97
+101
+106
+107
+107
+108
+107
+105
+104
+105
+107
+109
+109
+106
+101
+101
+102
+105
+103
+75
+38
+8
+3
+3
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+2
+13
+34
+57
+77
+87
+90
+91
+92
+91
+90
+86
+84
+84
+83
+84
+87
+90
+93
+95
+98
+100
+101
+102
+103
+103
+104
+105
+105
+105
+105
+105
+105
+106
+106
+106
+105
+103
+93
+69
+28
+3
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+4
+21
+48
+85
+98
+98
+95
+88
+74
+67
+67
+79
+107
+156
+198
+202
+201
+195
+182
+168
+157
+138
+115
+88
+62
+56
+53
+52
+51
+49
+48
+48
+48
+48
+49
+49
+50
+50
+50
+51
+51
+51
+51
+51
+51
+50
+50
+50
+50
+50
+50
+51
+51
+51
+49
+44
+40
+38
+37
+39
+43
+45
+46
+46
+46
+47
+50
+55
+61
+67
+67
+64
+57
+48
+45
+44
+44
+43
+43
+44
+44
+44
+44
+45
+45
+47
+50
+55
+66
+92
+114
+129
+139
+142
+142
+135
+118
+95
+71
+53
+50
+49
+49
+50
+52
+52
+52
+52
+52
+51
+50
+49
+47
+45
+44
+44
+45
+46
+49
+53
+54
+54
+55
+56
+59
+64
+70
+74
+76
+74
+74
+80
+101
+144
+164
+152
+128
+92
+41
+7
+2
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+92
+95
+97
+100
+106
+107
+107
+108
+108
+108
+107
+108
+108
+109
+109
+103
+100
+100
+102
+105
+102
+73
+37
+9
+6
+7
+3
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+4
+13
+31
+68
+82
+88
+90
+91
+88
+82
+75
+70
+65
+62
+61
+61
+62
+64
+68
+73
+79
+86
+93
+100
+102
+103
+104
+104
+104
+103
+103
+103
+102
+102
+102
+102
+103
+104
+105
+105
+104
+100
+90
+30
+10
+2
+1
+1
+3
+3
+2
+2
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+5
+23
+51
+85
+98
+98
+95
+88
+75
+67
+67
+79
+107
+156
+198
+202
+201
+195
+181
+165
+153
+134
+109
+83
+59
+55
+52
+51
+50
+48
+48
+48
+48
+48
+49
+50
+50
+50
+50
+50
+51
+51
+51
+51
+51
+51
+50
+50
+50
+50
+51
+51
+51
+51
+49
+43
+39
+37
+37
+40
+44
+45
+45
+45
+45
+46
+50
+54
+59
+59
+57
+51
+46
+44
+43
+43
+43
+43
+43
+43
+43
+43
+44
+44
+44
+44
+44
+45
+46
+51
+64
+85
+110
+133
+143
+145
+142
+131
+108
+73
+59
+52
+49
+50
+51
+52
+52
+52
+52
+52
+51
+49
+48
+46
+45
+44
+44
+45
+47
+51
+53
+54
+55
+55
+58
+62
+69
+75
+80
+79
+76
+76
+83
+103
+158
+163
+151
+121
+75
+20
+7
+2
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+92
+94
+96
+99
+106
+107
+107
+108
+108
+108
+109
+109
+109
+109
+108
+101
+100
+100
+102
+105
+101
+69
+36
+12
+9
+9
+4
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+2
+11
+29
+50
+69
+82
+87
+88
+86
+82
+74
+69
+65
+62
+60
+58
+57
+58
+59
+61
+65
+70
+77
+85
+93
+100
+101
+102
+102
+102
+103
+102
+102
+102
+102
+101
+100
+99
+99
+99
+101
+102
+103
+103
+100
+73
+34
+12
+2
+1
+2
+7
+9
+8
+5
+2
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+5
+24
+52
+85
+98
+98
+95
+88
+75
+67
+68
+78
+106
+156
+198
+202
+201
+194
+180
+164
+151
+131
+105
+79
+58
+54
+52
+51
+50
+48
+48
+48
+48
+49
+49
+50
+50
+50
+50
+50
+50
+51
+51
+51
+51
+51
+51
+51
+51
+51
+51
+51
+51
+51
+48
+42
+38
+37
+37
+41
+44
+45
+45
+45
+45
+46
+49
+53
+55
+55
+51
+47
+44
+43
+43
+43
+43
+43
+43
+43
+43
+43
+43
+44
+44
+44
+44
+44
+44
+46
+50
+59
+74
+97
+130
+141
+145
+142
+133
+101
+76
+61
+52
+50
+50
+51
+52
+52
+52
+52
+51
+50
+49
+47
+45
+44
+44
+45
+46
+51
+53
+54
+55
+55
+57
+61
+67
+73
+81
+83
+80
+77
+78
+85
+140
+159
+156
+136
+103
+38
+14
+4
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+91
+94
+96
+98
+105
+107
+107
+107
+108
+109
+109
+109
+109
+108
+106
+100
+99
+100
+102
+104
+99
+65
+35
+15
+13
+12
+4
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+3
+20
+39
+57
+73
+84
+86
+85
+82
+78
+73
+66
+63
+60
+58
+57
+56
+56
+57
+58
+60
+64
+70
+77
+85
+94
+100
+101
+101
+102
+102
+102
+102
+101
+100
+98
+97
+96
+95
+95
+95
+96
+97
+99
+101
+103
+95
+66
+36
+11
+3
+3
+8
+15
+20
+19
+12
+5
+2
+1
+1
+1
+1
+1
+1
+1
+1
+5
+24
+52
+85
+98
+98
+95
+88
+76
+67
+68
+77
+103
+154
+198
+202
+201
+194
+180
+164
+150
+128
+103
+76
+57
+54
+52
+51
+50
+48
+48
+48
+48
+49
+49
+50
+50
+50
+50
+50
+50
+50
+51
+51
+51
+51
+51
+51
+51
+51
+51
+51
+51
+51
+48
+41
+38
+37
+37
+41
+44
+45
+45
+45
+45
+45
+48
+50
+51
+51
+47
+45
+43
+43
+43
+43
+43
+43
+43
+43
+43
+43
+43
+43
+43
+43
+43
+43
+43
+43
+44
+47
+54
+67
+101
+125
+139
+146
+145
+126
+99
+76
+59
+52
+50
+51
+51
+52
+52
+52
+52
+51
+49
+48
+45
+45
+44
+45
+46
+50
+53
+54
+55
+55
+56
+60
+65
+72
+81
+86
+84
+81
+78
+77
+113
+148
+159
+150
+127
+61
+26
+8
+2
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+89
+93
+95
+97
+104
+106
+106
+107
+108
+109
+109
+109
+108
+106
+103
+99
+98
+100
+103
+104
+96
+60
+33
+18
+17
+13
+4
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+2
+8
+19
+47
+69
+79
+82
+83
+82
+79
+74
+70
+67
+63
+61
+59
+58
+57
+56
+56
+56
+58
+60
+65
+71
+78
+87
+95
+101
+101
+102
+102
+103
+102
+100
+97
+95
+93
+91
+90
+90
+91
+92
+93
+93
+95
+97
+101
+102
+93
+66
+34
+11
+5
+7
+17
+29
+36
+29
+17
+8
+3
+1
+1
+1
+1
+1
+1
+1
+5
+23
+52
+85
+98
+98
+95
+89
+76
+67
+68
+76
+100
+151
+198
+202
+202
+194
+180
+163
+149
+126
+100
+74
+56
+53
+52
+51
+50
+48
+48
+48
+49
+49
+50
+50
+50
+50
+50
+50
+50
+50
+50
+51
+51
+51
+51
+51
+51
+51
+51
+51
+51
+51
+48
+41
+38
+37
+37
+41
+43
+44
+44
+44
+44
+45
+47
+48
+49
+48
+45
+44
+43
+43
+43
+43
+43
+43
+43
+43
+43
+43
+43
+43
+43
+43
+43
+43
+43
+43
+43
+43
+45
+48
+68
+99
+124
+141
+148
+144
+123
+97
+72
+56
+51
+51
+51
+52
+52
+52
+52
+51
+50
+48
+46
+45
+45
+45
+45
+49
+52
+54
+55
+55
+56
+59
+65
+72
+81
+88
+88
+85
+81
+76
+88
+132
+156
+161
+145
+86
+42
+15
+3
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+88
+93
+95
+97
+102
+106
+106
+106
+106
+108
+108
+108
+107
+104
+99
+97
+97
+100
+103
+104
+93
+55
+32
+22
+20
+11
+4
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+8
+24
+56
+77
+81
+82
+81
+78
+72
+70
+68
+66
+64
+63
+61
+59
+58
+57
+56
+56
+57
+59
+62
+67
+72
+79
+88
+96
+103
+105
+105
+104
+103
+99
+94
+90
+87
+85
+84
+84
+85
+87
+90
+92
+92
+93
+93
+95
+101
+102
+97
+76
+32
+10
+11
+15
+26
+50
+53
+40
+22
+7
+2
+1
+1
+1
+1
+1
+1
+4
+22
+50
+83
+98
+98
+96
+89
+77
+67
+67
+74
+97
+146
+198
+203
+202
+195
+180
+163
+148
+125
+99
+73
+56
+53
+52
+51
+50
+48
+48
+48
+49
+49
+50
+50
+50
+50
+50
+50
+50
+50
+50
+50
+51
+51
+51
+51
+51
+51
+51
+51
+51
+51
+48
+41
+38
+36
+37
+41
+43
+44
+44
+44
+44
+44
+45
+47
+47
+46
+44
+44
+43
+43
+43
+43
+43
+43
+43
+43
+43
+43
+43
+43
+42
+42
+42
+42
+42
+42
+42
+42
+43
+43
+47
+67
+97
+127
+145
+149
+142
+120
+92
+65
+52
+51
+51
+51
+52
+52
+52
+51
+50
+49
+46
+45
+45
+45
+45
+48
+51
+54
+55
+55
+56
+58
+64
+71
+79
+90
+91
+89
+85
+79
+77
+115
+148
+165
+157
+113
+61
+26
+6
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+85
+92
+94
+96
+100
+106
+106
+106
+105
+105
+106
+106
+104
+100
+96
+96
+97
+100
+103
+103
+84
+50
+32
+25
+22
+8
+3
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+2
+18
+46
+72
+80
+79
+75
+73
+72
+71
+69
+68
+67
+66
+65
+64
+63
+61
+59
+57
+56
+56
+59
+62
+66
+70
+78
+89
+99
+106
+107
+106
+104
+100
+95
+86
+83
+81
+80
+80
+80
+81
+83
+86
+89
+91
+92
+92
+92
+93
+94
+100
+102
+101
+96
+53
+30
+23
+26
+32
+64
+66
+58
+39
+12
+2
+1
+1
+1
+1
+1
+3
+18
+44
+79
+97
+98
+96
+91
+79
+67
+67
+72
+91
+136
+195
+202
+202
+196
+182
+164
+147
+124
+98
+71
+55
+53
+52
+51
+49
+49
+48
+49
+49
+49
+50
+50
+50
+50
+50
+50
+50
+50
+50
+50
+51
+51
+51
+51
+51
+51
+51
+51
+51
+51
+48
+42
+38
+36
+36
+40
+42
+44
+44
+44
+44
+44
+44
+45
+45
+45
+44
+44
+44
+44
+44
+44
+44
+44
+43
+43
+43
+42
+42
+42
+42
+42
+41
+40
+40
+39
+40
+40
+41
+42
+43
+46
+63
+91
+128
+147
+148
+141
+123
+90
+59
+53
+51
+51
+52
+52
+52
+52
+51
+49
+47
+46
+45
+45
+45
+47
+51
+53
+55
+55
+56
+57
+63
+70
+77
+90
+93
+94
+92
+85
+76
+87
+123
+157
+164
+142
+92
+48
+16
+3
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+83
+92
+94
+95
+98
+106
+106
+106
+104
+103
+103
+103
+100
+97
+96
+95
+98
+101
+103
+102
+76
+46
+32
+26
+21
+5
+2
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+3
+24
+52
+69
+76
+76
+74
+73
+72
+72
+73
+71
+69
+68
+67
+67
+66
+64
+61
+59
+57
+57
+58
+62
+66
+70
+80
+92
+100
+105
+107
+106
+103
+97
+91
+85
+80
+78
+76
+75
+74
+75
+77
+80
+83
+87
+91
+92
+92
+92
+93
+94
+96
+99
+101
+101
+89
+71
+51
+36
+37
+51
+65
+67
+59
+40
+9
+3
+1
+1
+1
+1
+2
+15
+39
+75
+97
+98
+97
+92
+81
+68
+67
+70
+87
+127
+191
+202
+203
+197
+183
+165
+148
+125
+98
+71
+55
+53
+52
+51
+49
+49
+48
+49
+49
+50
+50
+50
+50
+50
+50
+50
+50
+50
+50
+50
+51
+51
+51
+51
+51
+51
+51
+51
+51
+51
+49
+42
+38
+36
+36
+39
+42
+43
+44
+43
+43
+43
+44
+44
+45
+45
+45
+44
+44
+44
+44
+44
+44
+44
+43
+43
+42
+42
+42
+41
+41
+41
+40
+39
+38
+37
+37
+38
+39
+41
+42
+44
+51
+68
+101
+139
+146
+146
+136
+113
+72
+59
+53
+52
+52
+52
+52
+52
+51
+50
+48
+46
+45
+45
+45
+47
+50
+53
+55
+55
+56
+57
+62
+70
+77
+89
+94
+97
+95
+91
+79
+80
+108
+142
+165
+155
+115
+69
+28
+6
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+81
+91
+94
+95
+97
+105
+106
+106
+105
+102
+101
+100
+98
+96
+95
+96
+99
+101
+102
+99
+67
+44
+32
+26
+17
+3
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+6
+18
+52
+70
+75
+75
+73
+74
+77
+77
+76
+75
+73
+70
+69
+69
+68
+66
+64
+61
+59
+58
+59
+62
+67
+72
+78
+90
+100
+105
+107
+106
+102
+96
+89
+83
+78
+73
+71
+69
+68
+68
+70
+72
+76
+80
+84
+90
+91
+92
+92
+93
+94
+95
+96
+99
+101
+101
+93
+79
+64
+51
+50
+61
+68
+68
+60
+28
+11
+3
+1
+1
+1
+2
+11
+32
+69
+95
+97
+97
+93
+83
+68
+67
+69
+83
+117
+186
+200
+204
+198
+185
+166
+149
+126
+99
+72
+55
+53
+51
+51
+49
+49
+49
+49
+49
+50
+50
+50
+50
+50
+50
+50
+50
+50
+50
+50
+51
+51
+51
+51
+51
+51
+51
+51
+51
+51
+50
+43
+39
+36
+36
+38
+41
+42
+43
+43
+43
+43
+43
+44
+44
+45
+44
+44
+44
+44
+44
+44
+44
+43
+43
+42
+42
+41
+40
+40
+40
+40
+39
+38
+37
+36
+35
+35
+36
+38
+41
+42
+45
+54
+75
+124
+141
+147
+143
+131
+89
+67
+56
+52
+52
+52
+52
+52
+52
+51
+48
+47
+45
+45
+45
+46
+50
+53
+55
+56
+56
+57
+62
+69
+77
+87
+95
+98
+98
+96
+84
+79
+94
+123
+161
+161
+135
+90
+44
+12
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+79
+90
+94
+94
+95
+104
+105
+106
+105
+102
+99
+98
+97
+96
+96
+97
+100
+101
+100
+93
+59
+41
+31
+24
+12
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+6
+18
+42
+74
+75
+74
+72
+75
+80
+84
+85
+82
+76
+73
+71
+70
+69
+68
+66
+64
+61
+60
+60
+63
+67
+72
+78
+86
+99
+104
+106
+105
+103
+95
+87
+81
+75
+71
+66
+63
+62
+62
+63
+65
+68
+72
+76
+81
+88
+90
+92
+92
+93
+95
+95
+95
+96
+98
+100
+100
+98
+90
+71
+60
+60
+66
+71
+72
+51
+25
+9
+3
+1
+1
+1
+8
+26
+61
+94
+97
+97
+94
+86
+70
+67
+68
+79
+107
+179
+198
+204
+199
+187
+167
+150
+127
+100
+73
+55
+53
+51
+51
+49
+49
+49
+49
+49
+50
+50
+50
+50
+50
+50
+50
+50
+50
+50
+50
+50
+51
+51
+51
+51
+51
+51
+51
+51
+51
+50
+45
+40
+37
+36
+37
+39
+41
+42
+43
+43
+43
+43
+43
+44
+44
+44
+44
+44
+44
+44
+44
+43
+43
+42
+41
+40
+40
+40
+39
+39
+39
+38
+38
+37
+34
+33
+33
+33
+35
+40
+41
+43
+46
+55
+103
+132
+144
+147
+143
+108
+78
+61
+53
+52
+52
+52
+52
+52
+51
+49
+47
+46
+45
+45
+46
+49
+53
+55
+56
+56
+57
+61
+68
+77
+86
+94
+99
+100
+100
+90
+81
+84
+106
+153
+164
+150
+111
+64
+21
+3
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+77
+90
+94
+94
+94
+102
+105
+106
+105
+102
+99
+97
+96
+96
+96
+98
+100
+101
+97
+86
+50
+37
+29
+20
+7
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+2
+16
+39
+71
+76
+72
+70
+74
+84
+92
+92
+90
+86
+77
+73
+71
+70
+70
+68
+66
+64
+63
+62
+62
+66
+70
+77
+85
+94
+104
+105
+105
+103
+96
+84
+78
+72
+67
+61
+58
+58
+59
+60
+61
+62
+64
+67
+72
+77
+85
+89
+91
+92
+93
+95
+96
+96
+95
+94
+94
+95
+95
+94
+93
+77
+69
+67
+71
+76
+73
+46
+22
+6
+2
+1
+1
+5
+19
+52
+91
+96
+97
+95
+89
+72
+67
+67
+75
+96
+170
+196
+205
+201
+190
+170
+152
+129
+102
+75
+55
+53
+51
+51
+49
+49
+49
+49
+49
+50
+50
+50
+50
+50
+50
+50
+49
+49
+50
+50
+50
+51
+51
+51
+51
+51
+51
+51
+51
+51
+51
+46
+41
+37
+36
+37
+38
+40
+41
+42
+43
+43
+43
+43
+43
+43
+44
+44
+44
+44
+44
+43
+42
+41
+40
+40
+40
+39
+39
+39
+39
+38
+38
+37
+36
+33
+32
+31
+31
+32
+37
+40
+42
+44
+46
+78
+119
+140
+147
+147
+126
+91
+68
+55
+52
+52
+52
+52
+52
+52
+49
+47
+46
+45
+45
+46
+49
+52
+55
+56
+56
+57
+61
+67
+77
+86
+93
+99
+102
+102
+96
+84
+81
+95
+138
+164
+159
+130
+86
+34
+5
+2
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+75
+89
+93
+93
+94
+99
+103
+105
+106
+105
+100
+98
+97
+97
+97
+100
+100
+99
+92
+74
+43
+30
+22
+14
+3
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+2
+15
+43
+68
+75
+71
+70
+77
+87
+98
+101
+100
+95
+88
+81
+74
+73
+73
+72
+71
+67
+65
+64
+64
+66
+74
+85
+95
+103
+107
+106
+101
+95
+87
+79
+71
+65
+59
+56
+55
+56
+56
+56
+56
+55
+56
+57
+60
+64
+69
+77
+84
+88
+90
+92
+94
+97
+98
+98
+98
+97
+95
+93
+92
+91
+90
+83
+77
+74
+75
+79
+75
+54
+28
+7
+1
+1
+3
+12
+36
+84
+94
+97
+96
+92
+75
+69
+67
+71
+83
+155
+190
+204
+203
+193
+173
+156
+133
+106
+78
+56
+53
+51
+51
+50
+49
+49
+49
+49
+50
+50
+50
+50
+50
+50
+50
+49
+49
+50
+50
+50
+51
+51
+52
+52
+51
+51
+51
+51
+52
+51
+49
+44
+39
+37
+37
+38
+38
+39
+39
+41
+42
+42
+43
+43
+43
+43
+43
+43
+42
+41
+40
+40
+40
+40
+40
+40
+40
+40
+39
+39
+39
+38
+37
+36
+33
+31
+29
+29
+29
+33
+38
+41
+43
+44
+56
+96
+127
+145
+147
+140
+109
+81
+60
+53
+52
+52
+52
+52
+52
+50
+48
+47
+46
+46
+46
+49
+52
+55
+56
+56
+57
+60
+67
+76
+86
+91
+98
+102
+103
+102
+90
+83
+87
+109
+160
+161
+147
+114
+58
+12
+4
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+73
+88
+93
+93
+93
+97
+101
+104
+106
+106
+102
+101
+100
+99
+99
+100
+100
+96
+85
+65
+35
+25
+17
+9
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+9
+37
+59
+72
+73
+70
+74
+85
+96
+104
+106
+104
+99
+93
+87
+81
+79
+77
+75
+72
+68
+67
+69
+74
+84
+93
+99
+101
+102
+102
+95
+88
+83
+77
+70
+59
+56
+53
+52
+51
+51
+50
+51
+51
+53
+54
+55
+57
+59
+63
+70
+77
+82
+86
+89
+92
+95
+97
+98
+99
+99
+99
+98
+97
+95
+93
+90
+84
+78
+76
+78
+77
+69
+51
+23
+3
+1
+2
+8
+24
+74
+91
+96
+96
+94
+79
+70
+67
+69
+77
+139
+182
+202
+204
+196
+177
+160
+137
+110
+81
+57
+53
+51
+51
+50
+49
+49
+49
+49
+50
+50
+51
+50
+50
+50
+50
+49
+49
+49
+50
+50
+51
+51
+52
+52
+52
+51
+51
+51
+52
+52
+50
+46
+41
+38
+37
+38
+38
+38
+38
+39
+40
+40
+41
+41
+42
+42
+41
+41
+40
+39
+39
+39
+40
+40
+40
+41
+41
+42
+42
+42
+42
+41
+40
+38
+34
+31
+29
+28
+28
+31
+36
+40
+42
+44
+51
+82
+116
+141
+147
+143
+120
+91
+66
+54
+53
+53
+53
+52
+52
+51
+49
+47
+46
+46
+46
+49
+52
+55
+56
+57
+57
+60
+66
+76
+85
+90
+96
+101
+104
+103
+95
+86
+84
+94
+151
+159
+154
+130
+80
+21
+7
+2
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+72
+87
+93
+93
+92
+95
+98
+103
+106
+106
+104
+102
+101
+101
+101
+101
+99
+91
+75
+53
+27
+20
+12
+5
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+3
+24
+53
+68
+73
+71
+70
+80
+92
+102
+107
+108
+105
+101
+97
+91
+86
+83
+81
+77
+74
+72
+77
+82
+89
+96
+101
+101
+98
+95
+92
+85
+78
+70
+63
+57
+51
+48
+47
+45
+44
+44
+44
+46
+48
+50
+52
+53
+54
+55
+57
+63
+69
+75
+81
+84
+87
+90
+93
+95
+98
+100
+101
+101
+100
+99
+97
+96
+92
+88
+83
+80
+79
+76
+67
+45
+11
+4
+2
+5
+15
+62
+86
+95
+96
+95
+82
+72
+67
+68
+73
+122
+173
+198
+205
+199
+180
+164
+141
+115
+85
+59
+54
+52
+51
+50
+49
+49
+49
+49
+50
+51
+51
+51
+50
+50
+50
+50
+49
+50
+50
+50
+51
+51
+52
+52
+52
+51
+51
+51
+52
+52
+51
+49
+44
+39
+38
+38
+38
+38
+38
+38
+38
+39
+39
+39
+40
+39
+39
+39
+39
+39
+39
+40
+40
+41
+43
+44
+44
+45
+45
+46
+46
+45
+44
+42
+37
+32
+29
+28
+28
+29
+34
+39
+42
+43
+48
+71
+105
+136
+147
+145
+128
+101
+73
+56
+53
+53
+53
+53
+52
+51
+49
+47
+46
+46
+47
+49
+52
+55
+56
+57
+57
+60
+66
+76
+85
+89
+94
+99
+104
+104
+99
+90
+83
+86
+138
+156
+158
+142
+102
+33
+12
+3
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+71
+87
+92
+92
+92
+93
+96
+101
+105
+106
+105
+103
+102
+102
+102
+101
+96
+83
+64
+40
+20
+14
+8
+3
+1
+1
+1
+1
+1
+1
+1
+1
+1
+3
+8
+44
+65
+73
+72
+69
+73
+87
+98
+106
+109
+108
+106
+103
+100
+95
+90
+87
+84
+82
+80
+81
+89
+95
+100
+101
+100
+96
+90
+85
+79
+72
+65
+57
+51
+46
+44
+42
+40
+38
+37
+37
+39
+41
+43
+46
+48
+50
+51
+52
+53
+56
+61
+67
+73
+78
+82
+85
+87
+91
+94
+98
+100
+101
+102
+101
+101
+100
+99
+97
+92
+84
+82
+80
+76
+66
+26
+10
+3
+4
+8
+48
+79
+93
+96
+96
+86
+74
+68
+67
+70
+107
+161
+192
+205
+202
+185
+168
+146
+120
+90
+61
+55
+52
+51
+50
+49
+49
+49
+49
+50
+51
+51
+51
+51
+50
+50
+50
+50
+50
+50
+50
+51
+51
+52
+52
+52
+52
+51
+51
+51
+52
+52
+51
+48
+42
+39
+38
+38
+38
+38
+38
+38
+38
+38
+38
+38
+38
+38
+38
+38
+39
+40
+41
+42
+44
+45
+46
+47
+47
+48
+49
+49
+49
+49
+47
+41
+34
+30
+28
+28
+29
+33
+38
+41
+43
+46
+63
+96
+130
+146
+146
+134
+108
+79
+58
+53
+53
+53
+53
+53
+51
+49
+48
+47
+47
+47
+50
+53
+55
+57
+57
+58
+60
+66
+75
+85
+88
+93
+97
+103
+104
+102
+93
+85
+84
+122
+151
+160
+150
+123
+48
+18
+5
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+70
+86
+92
+92
+91
+91
+92
+98
+104
+106
+105
+104
+103
+103
+102
+101
+88
+71
+50
+28
+13
+9
+5
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+6
+19
+63
+72
+73
+71
+69
+76
+92
+103
+108
+110
+108
+107
+105
+102
+99
+95
+92
+91
+90
+91
+96
+98
+99
+99
+98
+93
+89
+83
+75
+65
+52
+46
+43
+42
+40
+37
+35
+35
+34
+34
+34
+35
+36
+38
+40
+44
+46
+48
+48
+49
+50
+53
+58
+65
+71
+78
+80
+82
+84
+87
+94
+98
+101
+102
+102
+101
+101
+100
+99
+98
+91
+86
+83
+81
+78
+51
+20
+7
+4
+5
+32
+69
+88
+96
+96
+89
+77
+70
+67
+68
+92
+147
+185
+204
+204
+189
+173
+152
+126
+96
+64
+56
+52
+51
+50
+49
+49
+49
+49
+50
+51
+51
+51
+51
+51
+50
+50
+50
+50
+50
+50
+51
+51
+52
+52
+52
+52
+51
+51
+51
+52
+52
+52
+50
+47
+40
+39
+39
+39
+39
+38
+38
+38
+38
+38
+38
+38
+38
+38
+39
+41
+43
+44
+46
+47
+47
+48
+48
+48
+48
+49
+51
+52
+52
+51
+46
+38
+32
+28
+28
+29
+33
+38
+41
+43
+45
+58
+89
+124
+145
+146
+138
+114
+85
+61
+54
+53
+53
+53
+53
+52
+50
+48
+47
+47
+47
+50
+53
+56
+57
+57
+58
+61
+66
+75
+85
+88
+91
+95
+101
+104
+103
+96
+87
+83
+107
+145
+159
+156
+140
+66
+27
+8
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+69
+86
+91
+91
+91
+89
+88
+92
+98
+105
+106
+105
+105
+103
+101
+89
+71
+50
+30
+14
+7
+5
+3
+1
+1
+1
+1
+1
+1
+1
+1
+1
+4
+16
+42
+73
+75
+72
+68
+68
+79
+95
+104
+109
+109
+109
+108
+107
+106
+105
+103
+102
+101
+100
+100
+99
+98
+97
+93
+86
+72
+63
+55
+48
+43
+40
+38
+37
+36
+35
+35
+34
+34
+34
+34
+34
+34
+34
+35
+37
+40
+42
+44
+45
+45
+45
+45
+47
+51
+56
+66
+72
+77
+80
+81
+84
+90
+95
+99
+101
+101
+101
+101
+101
+102
+101
+97
+92
+87
+85
+76
+46
+21
+6
+6
+16
+52
+79
+94
+95
+93
+81
+72
+67
+67
+78
+124
+169
+201
+207
+195
+180
+160
+136
+105
+69
+58
+53
+51
+50
+49
+49
+49
+49
+49
+51
+51
+51
+51
+51
+51
+50
+50
+50
+50
+50
+50
+51
+52
+52
+52
+52
+52
+51
+51
+51
+52
+52
+52
+51
+46
+42
+40
+40
+40
+40
+40
+39
+39
+39
+39
+40
+41
+42
+44
+46
+46
+47
+47
+47
+48
+48
+48
+48
+48
+49
+51
+53
+53
+53
+50
+41
+34
+30
+29
+30
+33
+38
+41
+43
+45
+55
+84
+118
+144
+146
+140
+119
+91
+64
+54
+54
+53
+53
+53
+52
+50
+49
+48
+48
+48
+51
+54
+56
+57
+57
+58
+61
+67
+75
+84
+87
+89
+92
+97
+103
+103
+99
+91
+84
+93
+135
+155
+159
+153
+92
+42
+14
+3
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+68
+85
+91
+91
+90
+88
+85
+85
+90
+100
+103
+103
+101
+97
+91
+74
+53
+33
+17
+9
+6
+3
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+9
+27
+59
+75
+74
+70
+67
+67
+80
+95
+104
+108
+109
+109
+108
+108
+107
+106
+104
+102
+101
+100
+99
+96
+91
+82
+72
+62
+51
+46
+43
+40
+38
+37
+37
+37
+38
+38
+38
+38
+38
+38
+37
+36
+35
+35
+35
+36
+38
+40
+41
+43
+43
+43
+43
+43
+44
+46
+52
+58
+64
+71
+75
+80
+83
+89
+94
+98
+99
+100
+100
+100
+100
+101
+99
+96
+93
+89
+84
+66
+39
+15
+7
+12
+38
+67
+89
+95
+94
+85
+75
+68
+67
+72
+107
+153
+193
+207
+199
+185
+167
+143
+114
+75
+61
+54
+51
+50
+49
+49
+49
+49
+49
+50
+51
+51
+51
+51
+51
+51
+50
+50
+50
+50
+50
+51
+52
+53
+53
+52
+52
+52
+51
+51
+52
+52
+52
+52
+50
+46
+43
+42
+41
+41
+42
+42
+42
+42
+43
+43
+44
+45
+46
+47
+47
+47
+47
+48
+48
+48
+48
+49
+49
+50
+52
+54
+55
+55
+51
+42
+35
+31
+30
+31
+35
+39
+42
+43
+45
+54
+83
+117
+143
+146
+141
+121
+93
+66
+55
+54
+53
+53
+53
+52
+51
+49
+48
+48
+49
+51
+54
+57
+57
+58
+58
+61
+67
+76
+83
+85
+87
+89
+94
+102
+103
+100
+94
+84
+89
+126
+150
+161
+157
+110
+55
+21
+4
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+67
+84
+90
+91
+90
+89
+82
+79
+81
+89
+94
+95
+91
+84
+75
+51
+33
+20
+11
+7
+4
+2
+1
+1
+1
+1
+1
+1
+1
+1
+1
+3
+17
+40
+70
+77
+72
+68
+66
+67
+80
+94
+103
+108
+109
+108
+108
+108
+107
+105
+103
+101
+99
+95
+90
+79
+70
+61
+53
+46
+41
+40
+39
+39
+40
+41
+42
+43
+44
+44
+45
+45
+44
+43
+42
+40
+38
+37
+36
+35
+37
+38
+40
+41
+42
+42
+42
+42
+42
+42
+44
+48
+52
+57
+63
+69
+74
+80
+87
+94
+98
+99
+99
+99
+99
+100
+100
+99
+96
+93
+90
+80
+56
+30
+11
+11
+27
+55
+82
+94
+94
+88
+79
+70
+66
+69
+92
+137
+181
+205
+203
+191
+174
+152
+123
+82
+65
+55
+52
+50
+49
+49
+49
+49
+49
+50
+51
+52
+52
+52
+52
+52
+51
+51
+50
+50
+50
+51
+52
+53
+53
+53
+52
+52
+51
+51
+52
+52
+52
+52
+52
+50
+47
+45
+43
+42
+43
+43
+43
+44
+44
+45
+45
+46
+46
+47
+47
+47
+47
+48
+48
+48
+49
+49
+50
+51
+54
+55
+56
+56
+51
+42
+35
+31
+31
+32
+36
+39
+42
+43
+45
+55
+83
+117
+143
+145
+141
+121
+94
+66
+55
+54
+53
+53
+53
+52
+51
+50
+49
+49
+49
+52
+55
+57
+58
+58
+58
+62
+68
+76
+82
+84
+85
+87
+91
+100
+102
+101
+96
+85
+87
+117
+144
+161
+160
+126
+69
+29
+7
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+67
+84
+90
+90
+90
+89
+81
+74
+71
+75
+80
+80
+74
+65
+53
+28
+17
+11
+8
+6
+2
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+7
+27
+53
+75
+77
+70
+66
+65
+66
+80
+93
+101
+106
+107
+107
+107
+106
+104
+102
+98
+94
+89
+82
+72
+58
+50
+44
+41
+40
+40
+41
+42
+43
+44
+47
+48
+49
+49
+50
+50
+50
+50
+49
+48
+45
+43
+40
+38
+36
+36
+37
+38
+39
+41
+41
+41
+41
+41
+41
+41
+42
+43
+45
+49
+57
+62
+69
+76
+85
+94
+97
+98
+99
+99
+99
+100
+100
+99
+96
+93
+89
+73
+48
+18
+12
+19
+44
+72
+92
+93
+91
+82
+72
+66
+67
+81
+119
+166
+202
+205
+195
+181
+160
+132
+90
+69
+58
+52
+50
+49
+49
+49
+49
+49
+50
+51
+52
+52
+53
+53
+53
+52
+51
+51
+51
+51
+51
+52
+53
+53
+53
+53
+52
+52
+51
+51
+52
+52
+52
+52
+52
+51
+49
+47
+45
+44
+44
+44
+45
+45
+46
+46
+46
+47
+47
+47
+48
+48
+48
+49
+49
+50
+50
+51
+54
+56
+57
+57
+57
+51
+41
+35
+32
+32
+33
+37
+40
+43
+44
+46
+58
+86
+119
+143
+145
+140
+120
+93
+66
+55
+54
+54
+53
+53
+52
+51
+50
+49
+49
+50
+53
+56
+58
+58
+58
+59
+62
+68
+77
+81
+82
+83
+84
+87
+98
+101
+101
+97
+87
+86
+109
+138
+160
+161
+139
+83
+39
+10
+2
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+66
+83
+89
+90
+90
+89
+81
+71
+64
+62
+63
+58
+50
+39
+26
+17
+14
+10
+7
+4
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+2
+12
+37
+63
+78
+77
+68
+65
+64
+65
+78
+90
+98
+103
+105
+105
+103
+102
+99
+95
+86
+76
+66
+56
+48
+43
+42
+41
+41
+41
+45
+46
+48
+49
+49
+49
+50
+50
+50
+51
+51
+52
+52
+52
+52
+50
+48
+45
+42
+39
+36
+36
+37
+38
+40
+40
+41
+41
+41
+41
+41
+41
+41
+41
+42
+44
+47
+53
+60
+69
+84
+92
+96
+98
+98
+99
+99
+100
+99
+99
+96
+94
+87
+68
+32
+15
+17
+33
+59
+87
+93
+92
+85
+76
+67
+66
+73
+103
+146
+195
+205
+200
+188
+169
+143
+99
+75
+61
+53
+51
+50
+49
+49
+49
+49
+50
+51
+52
+53
+54
+54
+54
+53
+52
+51
+51
+51
+51
+52
+53
+53
+53
+53
+53
+52
+51
+51
+51
+52
+52
+53
+53
+52
+52
+50
+48
+47
+46
+46
+46
+46
+46
+46
+47
+47
+48
+48
+48
+48
+49
+50
+50
+51
+52
+53
+56
+58
+58
+58
+57
+48
+39
+34
+32
+32
+34
+38
+41
+43
+44
+47
+61
+91
+122
+143
+144
+138
+118
+91
+66
+55
+54
+54
+53
+53
+53
+51
+50
+50
+50
+51
+54
+57
+58
+58
+58
+59
+62
+69
+77
+80
+80
+81
+82
+84
+95
+100
+101
+98
+89
+86
+102
+132
+158
+162
+149
+97
+49
+14
+2
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+66
+82
+88
+89
+89
+90
+87
+74
+60
+53
+49
+41
+35
+30
+24
+17
+14
+9
+4
+2
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+4
+22
+50
+74
+80
+75
+67
+63
+63
+63
+71
+79
+84
+87
+88
+87
+81
+76
+70
+62
+53
+48
+45
+44
+43
+43
+44
+45
+47
+49
+49
+49
+49
+49
+49
+49
+49
+50
+50
+51
+52
+52
+53
+54
+54
+54
+54
+52
+49
+46
+41
+38
+36
+36
+37
+39
+39
+40
+40
+40
+40
+40
+40
+40
+41
+41
+42
+43
+45
+48
+60
+75
+87
+95
+98
+99
+99
+99
+100
+99
+98
+97
+95
+85
+64
+23
+20
+25
+42
+74
+92
+92
+89
+82
+70
+66
+68
+85
+119
+175
+206
+204
+195
+180
+158
+114
+86
+67
+56
+51
+50
+49
+49
+49
+48
+49
+51
+52
+53
+54
+55
+55
+55
+54
+53
+52
+52
+52
+52
+53
+54
+54
+54
+53
+53
+52
+51
+51
+51
+51
+52
+52
+53
+53
+53
+53
+52
+51
+50
+49
+49
+48
+48
+48
+48
+49
+49
+49
+50
+51
+52
+52
+53
+54
+56
+59
+59
+59
+57
+53
+43
+37
+34
+34
+34
+37
+41
+43
+45
+45
+50
+70
+101
+129
+144
+144
+134
+112
+85
+63
+55
+54
+54
+54
+54
+53
+52
+51
+51
+51
+52
+56
+58
+58
+59
+59
+59
+63
+70
+77
+78
+78
+78
+78
+80
+91
+98
+100
+98
+91
+85
+95
+124
+154
+162
+156
+114
+65
+23
+4
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+65
+81
+87
+88
+88
+90
+88
+79
+66
+54
+49
+42
+37
+32
+27
+19
+15
+9
+3
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+9
+33
+59
+78
+81
+74
+66
+62
+61
+61
+65
+69
+72
+72
+71
+68
+62
+58
+54
+50
+47
+45
+44
+44
+45
+46
+47
+48
+48
+49
+49
+48
+48
+48
+48
+48
+48
+48
+49
+50
+51
+52
+53
+55
+56
+57
+57
+55
+53
+50
+46
+42
+39
+37
+36
+37
+38
+38
+39
+39
+40
+40
+40
+40
+40
+41
+41
+41
+42
+43
+48
+56
+68
+82
+93
+98
+99
+99
+100
+100
+99
+98
+97
+92
+82
+39
+27
+25
+35
+59
+88
+91
+90
+85
+74
+66
+67
+76
+102
+154
+200
+204
+200
+188
+169
+127
+96
+74
+59
+52
+50
+49
+49
+49
+48
+49
+50
+52
+53
+55
+56
+56
+56
+56
+55
+53
+53
+53
+53
+53
+54
+54
+54
+54
+53
+52
+51
+51
+51
+51
+51
+52
+52
+53
+53
+53
+53
+53
+52
+52
+51
+51
+51
+51
+51
+51
+51
+52
+52
+53
+53
+54
+55
+56
+58
+59
+59
+58
+55
+49
+39
+36
+35
+35
+36
+40
+43
+44
+45
+46
+54
+80
+110
+135
+144
+143
+129
+105
+80
+61
+55
+54
+54
+54
+54
+53
+52
+52
+52
+52
+54
+57
+58
+59
+59
+59
+59
+64
+70
+77
+77
+76
+75
+76
+77
+88
+96
+99
+98
+92
+85
+92
+120
+150
+163
+159
+125
+76
+31
+6
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+65
+80
+86
+87
+87
+89
+89
+84
+73
+59
+52
+47
+41
+36
+32
+22
+16
+8
+2
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+2
+15
+43
+67
+81
+82
+73
+65
+61
+60
+59
+60
+61
+61
+60
+58
+55
+51
+49
+47
+45
+45
+45
+45
+46
+47
+48
+48
+49
+49
+48
+48
+48
+48
+48
+47
+47
+47
+48
+48
+49
+51
+52
+54
+55
+57
+58
+59
+59
+57
+55
+50
+46
+43
+40
+37
+37
+37
+38
+38
+39
+39
+39
+39
+40
+40
+40
+40
+40
+41
+41
+43
+46
+54
+65
+80
+93
+97
+99
+99
+100
+99
+98
+98
+96
+92
+59
+36
+28
+32
+46
+82
+88
+90
+87
+79
+67
+66
+70
+88
+129
+191
+202
+202
+195
+179
+141
+108
+82
+64
+54
+50
+50
+49
+49
+48
+49
+50
+51
+53
+55
+57
+57
+57
+57
+57
+55
+54
+54
+54
+54
+54
+54
+54
+54
+54
+53
+52
+51
+51
+51
+51
+51
+52
+52
+53
+53
+53
+53
+53
+53
+53
+53
+53
+53
+53
+53
+53
+53
+54
+54
+55
+56
+57
+58
+59
+60
+58
+55
+50
+44
+37
+36
+36
+36
+38
+42
+44
+45
+46
+48
+63
+92
+119
+139
+144
+141
+122
+97
+74
+59
+55
+54
+54
+54
+54
+53
+52
+52
+52
+53
+56
+58
+59
+59
+59
+59
+60
+65
+71
+76
+76
+74
+74
+73
+74
+85
+94
+98
+97
+93
+85
+90
+115
+145
+163
+161
+135
+88
+39
+8
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+64
+79
+85
+86
+86
+89
+89
+87
+80
+66
+57
+53
+48
+43
+39
+27
+17
+8
+2
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+3
+22
+53
+74
+83
+83
+72
+65
+61
+59
+57
+56
+55
+54
+52
+50
+48
+46
+46
+45
+45
+45
+46
+47
+48
+48
+49
+49
+49
+49
+49
+49
+48
+48
+47
+47
+47
+47
+48
+48
+49
+52
+54
+55
+57
+58
+60
+61
+61
+61
+59
+54
+50
+47
+43
+40
+37
+37
+37
+38
+38
+39
+39
+39
+39
+39
+39
+39
+39
+40
+40
+41
+42
+44
+50
+62
+82
+92
+97
+99
+99
+99
+99
+98
+98
+96
+78
+49
+35
+32
+38
+72
+85
+89
+88
+83
+69
+66
+67
+78
+105
+176
+197
+204
+200
+189
+155
+122
+93
+70
+57
+51
+50
+49
+49
+48
+48
+49
+51
+53
+55
+58
+58
+59
+58
+58
+57
+56
+55
+55
+55
+55
+55
+55
+55
+55
+54
+52
+51
+51
+51
+50
+51
+51
+51
+52
+53
+53
+53
+53
+53
+54
+54
+54
+54
+54
+54
+54
+55
+55
+55
+56
+58
+59
+59
+60
+59
+56
+51
+45
+40
+36
+36
+37
+38
+41
+44
+45
+46
+48
+52
+75
+105
+128
+142
+144
+137
+113
+88
+68
+57
+55
+54
+54
+54
+54
+53
+53
+53
+53
+54
+58
+59
+60
+60
+59
+59
+60
+65
+71
+76
+76
+73
+72
+71
+72
+82
+93
+97
+97
+93
+85
+88
+111
+141
+163
+162
+143
+98
+48
+11
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+62
+78
+83
+84
+85
+87
+89
+89
+85
+76
+64
+60
+56
+52
+45
+33
+19
+9
+2
+1
+1
+1
+1
+1
+1
+1
+1
+1
+2
+5
+30
+62
+79
+85
+84
+71
+65
+61
+59
+56
+52
+51
+49
+47
+46
+46
+45
+45
+45
+45
+47
+48
+48
+49
+49
+50
+51
+51
+51
+51
+49
+49
+48
+47
+47
+47
+47
+48
+49
+50
+54
+57
+59
+60
+61
+62
+62
+63
+63
+62
+60
+55
+50
+46
+44
+40
+38
+38
+38
+38
+39
+39
+38
+38
+37
+37
+37
+38
+38
+39
+40
+41
+42
+43
+45
+63
+81
+92
+97
+99
+99
+99
+99
+98
+98
+91
+63
+44
+34
+35
+60
+80
+88
+89
+87
+73
+67
+66
+71
+85
+156
+190
+203
+203
+197
+169
+136
+105
+79
+61
+52
+50
+49
+49
+48
+48
+49
+50
+52
+54
+58
+59
+60
+60
+59
+58
+57
+57
+56
+56
+55
+55
+55
+55
+55
+54
+53
+52
+51
+51
+50
+50
+50
+50
+51
+52
+52
+53
+53
+53
+54
+54
+54
+55
+55
+55
+55
+55
+56
+57
+58
+59
+59
+59
+59
+56
+51
+45
+41
+38
+37
+37
+39
+41
+44
+46
+46
+47
+51
+59
+90
+119
+136
+144
+143
+130
+102
+79
+62
+55
+55
+54
+54
+54
+54
+54
+54
+54
+54
+56
+59
+60
+60
+60
+59
+59
+61
+66
+72
+75
+75
+72
+70
+70
+70
+80
+91
+96
+97
+94
+85
+87
+108
+136
+163
+163
+150
+108
+57
+15
+2
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+60
+75
+81
+82
+82
+85
+88
+89
+88
+83
+72
+66
+62
+58
+52
+39
+21
+9
+2
+1
+1
+1
+1
+1
+1
+1
+1
+1
+3
+9
+43
+72
+84
+86
+85
+71
+65
+62
+59
+56
+50
+48
+47
+46
+46
+46
+46
+46
+46
+47
+49
+49
+50
+51
+51
+52
+52
+52
+52
+51
+48
+47
+47
+47
+47
+48
+50
+52
+55
+58
+60
+61
+61
+62
+62
+63
+63
+64
+64
+64
+63
+61
+57
+51
+47
+44
+42
+41
+41
+40
+39
+39
+38
+38
+37
+37
+37
+37
+38
+38
+39
+40
+41
+42
+42
+44
+55
+72
+88
+97
+98
+98
+99
+98
+98
+96
+82
+59
+41
+38
+47
+71
+84
+88
+88
+80
+70
+66
+67
+72
+120
+169
+196
+206
+204
+186
+157
+125
+95
+71
+55
+52
+50
+49
+49
+48
+48
+49
+51
+53
+57
+59
+60
+61
+61
+60
+60
+59
+58
+57
+57
+57
+57
+56
+56
+55
+54
+53
+52
+51
+50
+50
+49
+49
+49
+49
+50
+50
+51
+52
+52
+53
+53
+53
+54
+55
+55
+56
+57
+57
+58
+58
+58
+57
+53
+47
+43
+40
+39
+38
+39
+41
+43
+45
+46
+47
+48
+51
+61
+78
+112
+133
+142
+143
+139
+112
+86
+68
+57
+55
+55
+55
+55
+54
+54
+54
+55
+55
+56
+59
+61
+61
+61
+60
+60
+60
+62
+67
+73
+75
+74
+70
+69
+68
+69
+77
+89
+95
+96
+94
+85
+86
+104
+131
+162
+164
+156
+119
+69
+21
+3
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+57
+73
+79
+80
+80
+82
+86
+88
+88
+86
+78
+73
+69
+65
+59
+45
+25
+10
+2
+1
+1
+1
+1
+1
+1
+1
+1
+1
+5
+14
+52
+77
+86
+87
+85
+71
+65
+62
+60
+56
+50
+48
+46
+46
+45
+46
+46
+47
+48
+49
+50
+50
+51
+51
+52
+52
+51
+51
+49
+48
+47
+46
+47
+48
+49
+53
+55
+57
+58
+59
+60
+61
+61
+62
+62
+63
+63
+63
+63
+63
+63
+63
+60
+57
+52
+46
+44
+43
+42
+41
+40
+40
+39
+38
+37
+37
+37
+38
+38
+38
+39
+40
+41
+41
+42
+42
+46
+55
+69
+88
+97
+98
+98
+98
+98
+97
+90
+70
+50
+40
+44
+63
+78
+87
+88
+83
+73
+67
+66
+68
+98
+149
+184
+202
+206
+196
+172
+142
+110
+82
+60
+54
+51
+49
+49
+48
+48
+49
+50
+52
+56
+58
+60
+61
+62
+62
+61
+60
+60
+59
+58
+58
+58
+58
+57
+57
+55
+54
+52
+51
+50
+49
+49
+49
+48
+48
+49
+49
+50
+50
+51
+51
+52
+52
+53
+54
+54
+55
+56
+56
+56
+55
+52
+49
+46
+43
+41
+40
+40
+40
+42
+44
+45
+46
+47
+48
+51
+60
+76
+97
+127
+138
+142
+138
+129
+96
+75
+62
+56
+55
+55
+55
+55
+55
+55
+55
+56
+57
+58
+60
+62
+62
+61
+60
+60
+60
+62
+68
+73
+74
+73
+70
+68
+68
+68
+76
+88
+94
+95
+93
+84
+86
+102
+128
+161
+165
+159
+126
+79
+27
+3
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+55
+71
+77
+78
+77
+78
+85
+88
+88
+87
+81
+77
+74
+70
+65
+48
+26
+11
+2
+1
+1
+1
+1
+1
+1
+1
+1
+2
+7
+18
+60
+80
+88
+89
+86
+72
+66
+63
+61
+58
+51
+48
+46
+45
+45
+46
+46
+47
+48
+50
+50
+51
+51
+51
+51
+51
+50
+49
+47
+46
+46
+48
+49
+51
+54
+56
+58
+59
+59
+60
+60
+60
+60
+60
+60
+60
+60
+60
+61
+61
+62
+62
+61
+59
+55
+50
+47
+45
+43
+42
+41
+40
+39
+38
+38
+38
+38
+39
+40
+40
+40
+40
+41
+41
+42
+42
+43
+46
+55
+70
+90
+96
+98
+98
+98
+98
+94
+79
+60
+43
+44
+56
+72
+85
+87
+85
+77
+69
+65
+65
+82
+127
+167
+196
+206
+203
+185
+159
+128
+96
+68
+58
+52
+50
+49
+48
+48
+48
+49
+50
+54
+57
+59
+61
+62
+63
+62
+62
+61
+60
+59
+59
+59
+59
+59
+58
+57
+55
+54
+52
+50
+49
+49
+48
+47
+47
+47
+47
+48
+48
+49
+49
+50
+51
+51
+52
+52
+53
+52
+52
+50
+49
+46
+44
+43
+41
+41
+41
+42
+43
+44
+46
+46
+47
+48
+50
+59
+75
+94
+115
+136
+140
+138
+130
+113
+81
+66
+58
+55
+55
+55
+55
+55
+55
+56
+56
+57
+59
+60
+62
+62
+62
+61
+60
+60
+60
+63
+69
+73
+74
+72
+69
+68
+68
+68
+75
+87
+93
+94
+93
+84
+85
+100
+125
+160
+166
+161
+133
+88
+33
+5
+2
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+52
+68
+74
+75
+74
+75
+82
+87
+88
+88
+84
+81
+77
+73
+68
+48
+25
+10
+2
+1
+1
+1
+1
+1
+1
+1
+1
+3
+9
+23
+66
+83
+90
+90
+87
+73
+66
+63
+62
+60
+53
+48
+46
+46
+45
+46
+46
+47
+48
+49
+50
+50
+51
+50
+50
+49
+47
+47
+46
+47
+48
+51
+53
+56
+57
+58
+58
+58
+58
+58
+57
+56
+55
+55
+54
+54
+54
+55
+55
+56
+58
+59
+59
+59
+57
+53
+49
+46
+44
+43
+42
+41
+40
+39
+39
+39
+40
+41
+42
+42
+42
+42
+42
+42
+43
+43
+42
+43
+45
+52
+77
+90
+96
+98
+98
+98
+97
+86
+69
+48
+45
+52
+67
+81
+87
+86
+80
+72
+66
+64
+71
+104
+147
+185
+204
+207
+196
+175
+146
+113
+78
+64
+55
+51
+50
+49
+48
+48
+48
+49
+52
+55
+58
+61
+62
+63
+63
+63
+62
+62
+61
+60
+60
+60
+60
+59
+58
+57
+55
+54
+51
+50
+49
+48
+47
+46
+46
+45
+45
+46
+46
+47
+47
+48
+48
+48
+48
+48
+47
+46
+45
+43
+42
+42
+42
+41
+42
+43
+44
+45
+46
+47
+47
+48
+50
+58
+75
+94
+113
+130
+140
+138
+131
+117
+95
+68
+59
+56
+55
+55
+55
+56
+56
+56
+57
+58
+59
+61
+62
+63
+63
+62
+61
+60
+60
+60
+64
+69
+73
+73
+71
+69
+68
+68
+68
+75
+86
+92
+94
+92
+84
+84
+98
+123
+159
+167
+163
+138
+96
+40
+6
+2
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+49
+64
+70
+71
+71
+72
+79
+85
+88
+88
+85
+82
+79
+74
+67
+45
+22
+8
+2
+1
+1
+1
+1
+1
+1
+1
+1
+3
+10
+26
+72
+86
+91
+91
+88
+74
+67
+64
+63
+61
+55
+50
+47
+46
+45
+46
+46
+47
+48
+49
+50
+49
+49
+48
+47
+46
+46
+46
+47
+50
+54
+56
+57
+58
+58
+58
+57
+55
+54
+52
+49
+48
+47
+47
+46
+46
+46
+47
+47
+48
+51
+52
+54
+56
+56
+55
+51
+48
+46
+44
+43
+42
+41
+40
+40
+40
+42
+43
+44
+44
+44
+44
+45
+45
+45
+44
+43
+43
+43
+44
+57
+78
+91
+97
+98
+98
+97
+91
+77
+54
+46
+49
+62
+77
+86
+86
+83
+75
+67
+63
+66
+84
+123
+167
+200
+208
+203
+189
+165
+133
+92
+72
+60
+53
+50
+49
+49
+48
+48
+48
+50
+53
+56
+60
+62
+63
+64
+64
+63
+63
+62
+61
+61
+61
+60
+60
+59
+58
+57
+55
+53
+51
+49
+48
+47
+45
+44
+44
+43
+42
+42
+42
+42
+42
+42
+42
+42
+41
+41
+41
+41
+41
+41
+41
+42
+43
+44
+45
+46
+47
+47
+48
+48
+50
+54
+75
+97
+115
+129
+138
+139
+132
+118
+99
+76
+59
+56
+55
+55
+56
+56
+56
+57
+58
+59
+60
+61
+63
+63
+63
+63
+63
+61
+60
+60
+61
+66
+70
+73
+73
+70
+68
+68
+68
+68
+74
+85
+91
+93
+91
+83
+84
+96
+121
+158
+168
+165
+143
+104
+47
+7
+2
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+46
+58
+64
+65
+65
+66
+74
+81
+86
+87
+85
+81
+77
+69
+58
+35
+16
+5
+1
+1
+1
+1
+1
+1
+1
+1
+1
+4
+14
+33
+76
+87
+92
+92
+90
+76
+68
+64
+63
+63
+59
+54
+49
+46
+45
+45
+45
+46
+46
+46
+46
+46
+46
+46
+46
+47
+50
+53
+55
+57
+58
+57
+57
+55
+52
+49
+47
+45
+44
+43
+43
+42
+42
+42
+43
+43
+43
+43
+43
+43
+44
+45
+46
+47
+47
+48
+48
+48
+46
+45
+43
+43
+42
+42
+42
+43
+43
+44
+44
+44
+44
+45
+46
+48
+52
+51
+49
+46
+43
+43
+44
+57
+75
+90
+97
+98
+98
+94
+83
+60
+47
+48
+58
+71
+85
+86
+85
+79
+71
+64
+63
+70
+96
+134
+178
+207
+208
+202
+187
+161
+118
+91
+71
+59
+52
+49
+49
+49
+48
+48
+48
+50
+53
+56
+59
+63
+64
+64
+64
+64
+64
+63
+63
+63
+62
+62
+61
+60
+58
+56
+54
+52
+50
+49
+47
+45
+44
+43
+42
+42
+41
+40
+40
+40
+40
+40
+40
+40
+40
+41
+42
+42
+44
+45
+46
+47
+47
+47
+47
+48
+49
+50
+54
+64
+82
+110
+124
+133
+137
+138
+128
+112
+93
+75
+60
+56
+55
+56
+56
+56
+57
+58
+59
+60
+61
+63
+64
+64
+64
+64
+64
+62
+61
+60
+60
+62
+67
+71
+73
+73
+69
+68
+68
+68
+68
+74
+84
+90
+91
+90
+83
+83
+95
+119
+157
+169
+166
+149
+113
+56
+10
+3
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+43
+53
+58
+60
+60
+60
+66
+75
+81
+83
+82
+78
+71
+61
+48
+25
+11
+3
+1
+1
+1
+1
+1
+1
+1
+1
+2
+6
+16
+37
+79
+88
+92
+92
+91
+79
+69
+64
+63
+63
+61
+58
+54
+49
+47
+46
+46
+46
+46
+46
+46
+46
+47
+48
+51
+54
+56
+57
+57
+57
+54
+51
+49
+47
+45
+44
+43
+42
+42
+42
+42
+42
+42
+42
+42
+42
+43
+43
+43
+43
+44
+44
+45
+45
+46
+46
+46
+45
+45
+44
+43
+43
+43
+43
+43
+44
+44
+44
+45
+45
+45
+45
+46
+49
+55
+58
+57
+53
+48
+44
+43
+48
+62
+80
+94
+98
+97
+94
+84
+63
+47
+48
+56
+68
+83
+86
+85
+81
+74
+66
+62
+66
+81
+110
+155
+195
+205
+207
+198
+180
+140
+110
+86
+68
+57
+51
+50
+49
+48
+48
+48
+48
+50
+52
+55
+59
+62
+63
+64
+65
+64
+64
+64
+64
+64
+64
+63
+62
+61
+59
+56
+54
+52
+50
+48
+46
+45
+44
+43
+42
+41
+41
+41
+41
+41
+41
+42
+43
+44
+45
+46
+46
+47
+47
+47
+48
+48
+48
+48
+49
+52
+60
+73
+90
+109
+128
+133
+136
+136
+130
+109
+91
+75
+63
+57
+55
+56
+56
+57
+58
+59
+60
+61
+62
+63
+64
+65
+65
+64
+64
+63
+62
+61
+61
+61
+63
+69
+72
+73
+72
+69
+68
+68
+68
+69
+74
+84
+89
+91
+89
+82
+82
+94
+118
+156
+169
+167
+152
+118
+62
+12
+4
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+41
+48
+52
+53
+53
+51
+56
+63
+70
+73
+72
+67
+59
+48
+35
+14
+6
+2
+1
+1
+1
+1
+1
+1
+1
+1
+2
+7
+18
+39
+81
+89
+93
+93
+91
+81
+70
+65
+63
+63
+63
+61
+58
+55
+52
+49
+48
+48
+48
+49
+50
+51
+53
+54
+56
+57
+56
+55
+53
+50
+47
+46
+44
+43
+42
+42
+41
+41
+41
+41
+42
+42
+42
+42
+42
+42
+43
+43
+43
+43
+43
+44
+44
+45
+45
+45
+45
+45
+44
+44
+44
+44
+44
+44
+44
+44
+45
+45
+45
+45
+46
+47
+49
+52
+58
+65
+65
+63
+57
+49
+44
+45
+53
+67
+87
+96
+96
+94
+85
+64
+47
+48
+54
+66
+81
+86
+86
+83
+77
+69
+63
+63
+71
+91
+129
+178
+198
+207
+206
+196
+163
+132
+104
+81
+64
+54
+51
+50
+49
+48
+48
+48
+48
+50
+52
+56
+59
+61
+63
+64
+64
+64
+64
+64
+64
+64
+64
+64
+63
+62
+59
+58
+56
+54
+52
+50
+48
+47
+46
+45
+45
+44
+44
+44
+45
+45
+46
+46
+47
+47
+48
+48
+48
+48
+48
+48
+48
+49
+51
+56
+67
+83
+99
+114
+127
+136
+136
+133
+125
+112
+89
+74
+64
+57
+55
+56
+57
+57
+58
+59
+61
+62
+63
+64
+65
+65
+65
+65
+64
+64
+63
+62
+61
+61
+61
+65
+70
+72
+73
+72
+68
+68
+68
+68
+69
+73
+83
+88
+89
+88
+81
+82
+93
+118
+156
+170
+168
+155
+124
+68
+14
+5
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+40
+43
+45
+46
+46
+42
+43
+47
+51
+53
+53
+48
+40
+30
+20
+5
+3
+1
+1
+1
+1
+1
+1
+1
+1
+1
+2
+7
+19
+42
+83
+90
+93
+93
+91
+83
+72
+65
+62
+62
+63
+63
+62
+60
+58
+54
+53
+53
+53
+53
+55
+57
+58
+58
+57
+55
+52
+49
+46
+44
+42
+42
+41
+41
+41
+41
+41
+41
+41
+41
+42
+42
+42
+42
+43
+43
+43
+43
+43
+43
+44
+44
+44
+44
+45
+45
+45
+45
+45
+44
+44
+44
+44
+45
+45
+45
+45
+46
+47
+48
+49
+53
+56
+60
+65
+73
+73
+72
+68
+59
+46
+45
+47
+56
+74
+92
+93
+92
+83
+63
+47
+47
+53
+64
+80
+86
+86
+84
+79
+72
+64
+62
+65
+77
+103
+156
+184
+202
+209
+206
+184
+156
+126
+99
+76
+59
+54
+51
+50
+49
+48
+48
+48
+48
+49
+52
+55
+57
+60
+62
+63
+64
+64
+64
+64
+64
+64
+64
+64
+63
+62
+60
+59
+57
+56
+54
+52
+51
+50
+50
+49
+49
+49
+49
+49
+50
+49
+49
+49
+49
+49
+49
+48
+49
+49
+49
+52
+55
+62
+72
+92
+109
+122
+132
+136
+137
+132
+122
+107
+90
+70
+62
+58
+56
+56
+57
+58
+59
+60
+61
+63
+64
+65
+66
+66
+66
+65
+65
+64
+64
+63
+61
+61
+61
+61
+67
+71
+72
+72
+71
+68
+68
+68
+69
+69
+73
+82
+87
+88
+87
+81
+81
+93
+117
+156
+170
+169
+157
+128
+74
+17
+6
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+38
+39
+39
+39
+39
+31
+29
+27
+26
+24
+22
+17
+12
+7
+4
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+2
+3
+8
+21
+46
+84
+91
+93
+93
+91
+85
+75
+67
+61
+61
+61
+62
+62
+62
+61
+60
+60
+59
+59
+59
+59
+59
+58
+55
+50
+45
+43
+42
+42
+41
+41
+41
+41
+41
+41
+41
+41
+41
+42
+42
+42
+43
+43
+44
+44
+45
+45
+45
+45
+45
+45
+45
+45
+45
+45
+45
+45
+45
+45
+46
+46
+46
+46
+46
+46
+47
+47
+48
+50
+52
+56
+62
+68
+75
+79
+82
+83
+82
+80
+74
+52
+47
+46
+49
+57
+82
+87
+86
+78
+59
+45
+46
+52
+63
+79
+86
+86
+85
+81
+75
+67
+63
+63
+68
+81
+129
+165
+191
+206
+212
+202
+179
+151
+121
+93
+68
+59
+54
+51
+50
+49
+48
+48
+48
+48
+49
+50
+52
+55
+58
+61
+62
+63
+64
+64
+64
+64
+64
+64
+63
+62
+61
+61
+60
+59
+57
+56
+56
+55
+54
+53
+53
+52
+52
+51
+51
+50
+50
+49
+49
+49
+49
+49
+49
+50
+52
+59
+70
+84
+101
+123
+131
+135
+136
+137
+133
+119
+102
+84
+68
+59
+57
+56
+57
+57
+59
+60
+61
+62
+63
+65
+66
+67
+67
+67
+66
+65
+65
+64
+64
+62
+61
+61
+61
+62
+69
+72
+73
+72
+70
+68
+68
+68
+69
+70
+73
+81
+86
+87
+86
+80
+81
+93
+117
+156
+171
+169
+160
+132
+79
+20
+7
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+37
+36
+34
+32
+30
+25
+22
+18
+15
+13
+8
+7
+5
+3
+3
+2
+2
+1
+1
+1
+1
+1
+2
+2
+3
+3
+5
+11
+24
+47
+85
+91
+93
+93
+92
+86
+77
+68
+61
+57
+58
+59
+61
+61
+61
+61
+60
+59
+58
+56
+49
+44
+42
+42
+42
+41
+41
+41
+41
+40
+40
+41
+41
+41
+41
+42
+43
+45
+46
+48
+50
+52
+54
+55
+56
+58
+58
+58
+58
+58
+58
+57
+56
+55
+53
+52
+51
+51
+50
+50
+50
+50
+51
+52
+53
+56
+59
+62
+66
+71
+80
+86
+92
+98
+105
+106
+103
+99
+95
+92
+73
+56
+48
+47
+49
+59
+66
+67
+63
+52
+44
+44
+51
+63
+79
+87
+87
+85
+82
+78
+70
+65
+62
+62
+65
+94
+131
+165
+191
+207
+212
+202
+184
+158
+129
+93
+74
+61
+54
+51
+49
+49
+48
+48
+48
+48
+48
+48
+49
+50
+52
+54
+56
+57
+59
+60
+61
+61
+62
+62
+61
+61
+60
+59
+58
+57
+56
+56
+55
+54
+53
+52
+52
+51
+50
+50
+49
+49
+49
+49
+49
+50
+52
+57
+64
+81
+97
+112
+125
+133
+135
+136
+136
+132
+124
+101
+83
+71
+63
+59
+57
+57
+58
+59
+60
+61
+63
+64
+65
+67
+68
+68
+68
+67
+67
+66
+65
+65
+64
+63
+62
+61
+61
+62
+65
+71
+72
+72
+72
+70
+68
+68
+69
+70
+71
+73
+80
+84
+86
+85
+80
+80
+92
+117
+156
+171
+170
+162
+137
+86
+23
+8
+2
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+37
+35
+33
+30
+28
+24
+21
+18
+14
+12
+9
+8
+7
+6
+5
+4
+3
+3
+2
+2
+2
+2
+2
+3
+3
+4
+5
+11
+24
+47
+84
+90
+93
+93
+92
+87
+78
+69
+61
+56
+54
+55
+56
+57
+57
+55
+54
+51
+49
+47
+45
+44
+43
+43
+42
+40
+40
+40
+40
+40
+42
+43
+45
+47
+49
+53
+55
+58
+60
+62
+65
+67
+69
+70
+72
+73
+74
+75
+75
+76
+76
+75
+75
+75
+74
+73
+72
+71
+71
+70
+71
+71
+73
+74
+77
+80
+84
+89
+94
+99
+107
+112
+117
+121
+124
+125
+123
+118
+111
+105
+91
+69
+55
+48
+48
+51
+53
+52
+49
+43
+41
+42
+51
+65
+80
+87
+87
+86
+83
+79
+72
+68
+64
+61
+61
+74
+104
+138
+170
+195
+210
+208
+199
+182
+158
+121
+96
+77
+64
+56
+52
+51
+50
+49
+49
+48
+48
+48
+48
+49
+50
+50
+51
+52
+53
+55
+55
+56
+56
+56
+56
+56
+56
+55
+54
+54
+53
+52
+52
+51
+50
+50
+50
+49
+49
+49
+49
+50
+51
+52
+58
+65
+74
+86
+100
+116
+124
+130
+133
+136
+135
+130
+121
+109
+93
+76
+68
+63
+59
+58
+58
+59
+60
+61
+62
+64
+66
+67
+68
+68
+69
+68
+68
+67
+67
+66
+65
+64
+64
+63
+62
+62
+62
+64
+67
+72
+72
+72
+71
+69
+69
+69
+70
+71
+71
+73
+79
+83
+85
+84
+79
+80
+92
+117
+157
+172
+171
+163
+140
+91
+26
+9
+2
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+37
+35
+32
+29
+27
+23
+21
+19
+17
+16
+14
+13
+12
+11
+10
+7
+6
+5
+4
+3
+3
+3
+3
+3
+3
+4
+6
+13
+26
+49
+83
+90
+93
+93
+92
+88
+80
+71
+62
+55
+52
+51
+51
+52
+52
+52
+51
+51
+50
+49
+47
+44
+41
+40
+39
+39
+40
+41
+43
+46
+49
+53
+56
+59
+61
+65
+67
+70
+72
+74
+77
+78
+80
+82
+83
+85
+86
+87
+88
+89
+90
+90
+91
+92
+92
+92
+93
+93
+93
+94
+95
+97
+99
+101
+104
+109
+113
+117
+122
+127
+133
+136
+139
+141
+143
+142
+141
+136
+129
+121
+109
+86
+66
+52
+49
+48
+47
+44
+40
+38
+38
+41
+52
+67
+81
+87
+88
+86
+84
+80
+74
+70
+66
+63
+59
+64
+82
+110
+143
+175
+202
+208
+207
+198
+183
+150
+124
+101
+82
+67
+56
+53
+52
+51
+50
+49
+49
+49
+49
+49
+49
+49
+49
+50
+50
+51
+51
+51
+51
+52
+52
+51
+51
+51
+51
+51
+50
+50
+50
+50
+49
+49
+49
+50
+51
+53
+56
+60
+66
+73
+86
+96
+106
+116
+125
+133
+135
+135
+134
+130
+120
+109
+96
+84
+73
+64
+61
+59
+59
+59
+60
+61
+62
+64
+65
+67
+68
+69
+69
+69
+69
+68
+68
+67
+66
+65
+65
+64
+63
+63
+62
+62
+64
+66
+70
+72
+72
+72
+71
+69
+69
+70
+71
+72
+72
+74
+78
+82
+83
+83
+79
+80
+92
+118
+158
+172
+171
+164
+142
+95
+29
+10
+2
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+36
+34
+31
+28
+27
+24
+23
+22
+21
+21
+20
+20
+19
+17
+16
+14
+11
+9
+7
+5
+4
+3
+3
+4
+4
+5
+8
+15
+29
+52
+83
+90
+93
+93
+93
+90
+83
+73
+63
+55
+50
+49
+48
+48
+49
+50
+51
+51
+51
+49
+46
+41
+37
+36
+37
+39
+42
+45
+49
+54
+60
+64
+67
+70
+73
+75
+77
+79
+81
+82
+84
+86
+88
+89
+91
+93
+94
+96
+97
+99
+100
+102
+103
+105
+106
+108
+110
+111
+113
+115
+117
+120
+123
+126
+130
+135
+139
+143
+146
+150
+153
+156
+157
+159
+159
+158
+156
+153
+147
+137
+126
+105
+81
+60
+50
+48
+45
+40
+36
+35
+36
+41
+55
+70
+83
+88
+88
+87
+85
+82
+77
+72
+69
+65
+60
+60
+66
+85
+114
+148
+186
+201
+208
+208
+201
+178
+155
+130
+106
+85
+66
+59
+55
+52
+51
+50
+50
+49
+49
+49
+49
+49
+49
+49
+49
+49
+48
+48
+48
+48
+49
+49
+49
+49
+49
+49
+49
+50
+50
+51
+52
+54
+56
+59
+63
+70
+77
+85
+94
+105
+119
+127
+134
+137
+138
+136
+133
+128
+122
+113
+95
+82
+72
+66
+62
+60
+60
+59
+60
+61
+62
+64
+65
+67
+68
+70
+70
+70
+70
+70
+69
+68
+68
+67
+66
+65
+65
+64
+63
+63
+63
+64
+66
+68
+71
+72
+72
+71
+70
+69
+69
+71
+73
+73
+74
+74
+78
+81
+82
+81
+79
+80
+92
+119
+160
+172
+172
+165
+144
+100
+31
+11
+2
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+36
+34
+31
+28
+27
+25
+25
+24
+24
+24
+24
+24
+24
+24
+23
+22
+20
+17
+13
+8
+5
+4
+4
+4
+5
+7
+10
+18
+33
+56
+83
+89
+92
+93
+93
+91
+86
+77
+65
+56
+51
+49
+48
+48
+50
+52
+52
+48
+41
+34
+32
+33
+34
+36
+38
+43
+49
+54
+60
+64
+69
+72
+74
+76
+78
+80
+82
+83
+85
+86
+89
+91
+92
+94
+96
+98
+100
+102
+103
+105
+107
+109
+111
+112
+114
+117
+119
+121
+124
+126
+131
+135
+139
+143
+147
+152
+155
+158
+161
+164
+167
+168
+169
+170
+171
+171
+169
+167
+163
+154
+141
+126
+100
+73
+52
+49
+45
+40
+36
+35
+36
+44
+58
+73
+84
+88
+88
+87
+86
+83
+79
+74
+71
+67
+62
+60
+59
+66
+84
+115
+162
+188
+204
+211
+212
+201
+184
+162
+137
+112
+84
+69
+60
+55
+53
+51
+51
+50
+50
+49
+49
+49
+48
+48
+48
+48
+48
+48
+48
+48
+48
+49
+49
+49
+50
+50
+51
+52
+53
+55
+60
+66
+74
+84
+95
+110
+121
+130
+136
+140
+141
+142
+141
+140
+137
+131
+120
+106
+92
+78
+67
+64
+62
+61
+60
+60
+60
+61
+62
+63
+66
+68
+69
+70
+71
+71
+71
+71
+70
+70
+69
+68
+68
+67
+66
+65
+65
+64
+64
+64
+64
+66
+68
+71
+72
+72
+72
+71
+70
+70
+70
+73
+74
+75
+75
+75
+77
+79
+81
+80
+78
+79
+93
+120
+161
+173
+172
+166
+146
+103
+34
+12
+3
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+36
+33
+30
+27
+27
+25
+25
+25
+25
+25
+25
+26
+25
+25
+25
+24
+24
+24
+24
+23
+17
+12
+9
+8
+12
+20
+27
+35
+44
+58
+79
+87
+91
+91
+91
+91
+89
+84
+75
+63
+54
+53
+53
+54
+54
+51
+43
+36
+31
+31
+33
+35
+36
+37
+40
+46
+52
+58
+64
+69
+74
+77
+80
+82
+85
+88
+91
+93
+96
+99
+102
+105
+107
+110
+112
+115
+117
+119
+121
+123
+125
+127
+129
+131
+133
+136
+139
+142
+145
+149
+155
+159
+162
+165
+168
+171
+172
+174
+175
+176
+177
+178
+178
+179
+179
+179
+178
+178
+176
+173
+161
+150
+130
+102
+68
+52
+48
+42
+37
+35
+37
+47
+61
+75
+85
+89
+90
+89
+87
+84
+80
+77
+74
+71
+67
+62
+60
+59
+62
+72
+113
+148
+178
+200
+210
+212
+207
+198
+184
+164
+134
+112
+92
+75
+64
+57
+55
+53
+52
+51
+51
+50
+50
+50
+50
+50
+51
+51
+52
+53
+55
+58
+61
+65
+71
+80
+89
+98
+107
+117
+129
+135
+140
+142
+144
+145
+146
+146
+145
+143
+139
+133
+123
+111
+98
+81
+73
+68
+64
+63
+62
+61
+61
+61
+61
+62
+63
+65
+67
+69
+71
+72
+72
+72
+72
+72
+71
+71
+70
+70
+69
+68
+68
+67
+66
+65
+65
+65
+65
+65
+67
+69
+71
+72
+72
+72
+71
+71
+70
+70
+72
+76
+77
+78
+77
+76
+77
+78
+79
+79
+78
+79
+93
+121
+163
+174
+173
+167
+148
+107
+37
+14
+3
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+37
+33
+30
+27
+26
+25
+25
+26
+26
+26
+27
+27
+28
+27
+27
+25
+24
+24
+24
+24
+23
+22
+21
+20
+22
+35
+45
+52
+57
+63
+77
+84
+89
+90
+90
+90
+89
+86
+81
+72
+63
+60
+58
+57
+54
+44
+36
+32
+32
+33
+35
+36
+37
+38
+40
+48
+55
+63
+69
+75
+81
+84
+88
+91
+94
+98
+101
+104
+107
+110
+114
+116
+119
+121
+124
+127
+129
+131
+134
+136
+139
+142
+145
+148
+152
+157
+161
+165
+168
+171
+174
+175
+176
+177
+177
+178
+179
+179
+179
+180
+180
+180
+180
+180
+180
+180
+180
+180
+180
+179
+173
+164
+150
+126
+92
+59
+51
+45
+41
+38
+39
+47
+61
+75
+86
+91
+91
+91
+89
+86
+81
+77
+75
+73
+70
+66
+62
+60
+59
+62
+80
+109
+140
+170
+195
+209
+210
+207
+201
+193
+175
+157
+139
+121
+104
+87
+78
+71
+67
+64
+62
+62
+63
+64
+66
+70
+74
+79
+85
+91
+99
+106
+112
+118
+123
+128
+131
+135
+138
+141
+143
+144
+144
+144
+143
+139
+134
+127
+120
+112
+100
+92
+85
+79
+74
+68
+65
+63
+62
+62
+61
+61
+62
+63
+64
+66
+68
+70
+71
+72
+73
+73
+73
+73
+73
+72
+72
+71
+71
+70
+69
+68
+68
+67
+67
+66
+66
+67
+67
+68
+70
+71
+72
+72
+72
+72
+71
+71
+71
+71
+74
+79
+80
+80
+79
+77
+77
+78
+78
+78
+77
+79
+94
+123
+165
+174
+173
+168
+150
+110
+39
+14
+3
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+38
+34
+30
+27
+26
+25
+25
+26
+26
+27
+27
+27
+28
+29
+29
+27
+25
+24
+24
+24
+24
+25
+27
+31
+35
+46
+57
+66
+72
+75
+81
+85
+87
+88
+89
+89
+89
+88
+85
+79
+70
+66
+62
+56
+49
+36
+32
+31
+32
+34
+36
+37
+38
+39
+41
+50
+59
+67
+75
+81
+87
+90
+94
+98
+101
+105
+109
+112
+115
+118
+121
+124
+126
+129
+131
+135
+137
+140
+143
+146
+150
+154
+158
+163
+167
+172
+175
+178
+179
+181
+181
+181
+181
+181
+181
+181
+181
+181
+181
+181
+181
+181
+181
+181
+181
+181
+181
+181
+181
+181
+179
+174
+165
+148
+118
+75
+59
+49
+43
+41
+41
+48
+60
+74
+85
+92
+93
+92
+90
+87
+82
+78
+76
+74
+72
+69
+65
+62
+59
+58
+64
+80
+103
+131
+162
+191
+202
+207
+207
+205
+196
+187
+175
+163
+149
+132
+122
+114
+108
+104
+101
+101
+103
+104
+107
+112
+116
+120
+124
+128
+133
+136
+139
+141
+143
+144
+144
+144
+142
+140
+135
+130
+126
+121
+116
+108
+102
+96
+90
+84
+76
+71
+68
+66
+64
+63
+62
+62
+62
+62
+63
+64
+65
+67
+69
+71
+72
+73
+74
+74
+74
+74
+74
+74
+74
+73
+72
+72
+71
+71
+70
+69
+69
+68
+68
+68
+68
+69
+69
+70
+71
+72
+72
+72
+72
+72
+71
+71
+71
+72
+77
+82
+84
+84
+82
+77
+77
+77
+77
+77
+77
+78
+95
+125
+166
+175
+174
+168
+151
+113
+41
+15
+4
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+40
+36
+32
+28
+26
+25
+25
+25
+26
+26
+26
+26
+27
+29
+30
+29
+26
+24
+23
+23
+23
+24
+28
+34
+39
+47
+59
+71
+81
+85
+86
+86
+87
+87
+88
+88
+88
+87
+86
+83
+76
+69
+62
+53
+42
+32
+31
+31
+32
+35
+37
+38
+39
+40
+43
+54
+64
+72
+79
+85
+91
+95
+99
+103
+107
+112
+115
+118
+121
+124
+128
+131
+133
+136
+139
+143
+146
+149
+152
+155
+161
+166
+171
+175
+178
+182
+183
+183
+183
+183
+182
+182
+182
+181
+181
+181
+181
+182
+182
+182
+182
+182
+182
+182
+182
+181
+181
+181
+181
+181
+181
+180
+176
+165
+145
+98
+72
+55
+47
+44
+44
+49
+59
+73
+85
+93
+94
+94
+92
+89
+84
+80
+77
+75
+73
+71
+69
+65
+61
+58
+59
+63
+75
+94
+120
+158
+181
+195
+203
+205
+204
+201
+197
+191
+184
+173
+165
+158
+153
+148
+145
+145
+145
+147
+148
+150
+151
+152
+151
+151
+149
+146
+144
+140
+137
+133
+130
+126
+121
+116
+108
+102
+96
+89
+83
+76
+72
+69
+67
+65
+64
+64
+63
+63
+63
+63
+63
+64
+64
+65
+67
+69
+70
+72
+73
+75
+75
+76
+76
+76
+75
+75
+75
+75
+74
+74
+73
+72
+72
+72
+71
+70
+70
+70
+70
+70
+70
+71
+71
+72
+72
+72
+72
+72
+72
+72
+71
+71
+72
+73
+81
+86
+88
+87
+86
+78
+77
+76
+76
+76
+76
+78
+96
+127
+168
+176
+174
+169
+152
+115
+43
+16
+4
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+45
+42
+36
+30
+26
+24
+24
+24
+24
+25
+24
+24
+26
+28
+29
+29
+26
+24
+23
+23
+24
+24
+23
+23
+24
+32
+48
+64
+77
+85
+89
+89
+89
+88
+88
+87
+86
+86
+85
+83
+77
+69
+59
+48
+36
+31
+31
+31
+33
+36
+39
+40
+41
+42
+44
+57
+67
+76
+83
+89
+95
+100
+105
+109
+113
+118
+122
+125
+128
+132
+136
+139
+142
+145
+148
+153
+157
+160
+165
+169
+177
+181
+184
+186
+186
+185
+184
+184
+183
+182
+181
+181
+181
+181
+181
+182
+182
+183
+183
+184
+185
+185
+184
+184
+183
+182
+181
+181
+181
+181
+182
+182
+181
+178
+168
+127
+91
+66
+51
+46
+46
+49
+58
+71
+84
+93
+95
+95
+94
+91
+86
+82
+79
+76
+73
+72
+71
+68
+65
+60
+59
+59
+62
+68
+81
+112
+141
+167
+188
+199
+203
+201
+199
+197
+194
+190
+187
+183
+180
+176
+173
+170
+167
+165
+162
+159
+157
+154
+151
+148
+142
+135
+127
+119
+110
+98
+90
+83
+78
+73
+69
+68
+66
+65
+65
+64
+64
+64
+64
+63
+63
+63
+63
+63
+64
+65
+66
+68
+69
+71
+73
+74
+75
+76
+77
+77
+77
+77
+77
+77
+76
+76
+75
+75
+75
+74
+73
+73
+73
+72
+72
+72
+72
+72
+72
+72
+72
+72
+72
+72
+72
+72
+72
+72
+72
+72
+72
+72
+73
+75
+86
+90
+92
+92
+90
+80
+77
+76
+76
+76
+76
+78
+97
+129
+170
+176
+174
+169
+152
+117
+45
+17
+4
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+26
+33
+36
+37
+36
+34
+32
+30
+30
+30
+32
+32
+32
+30
+29
+23
+22
+22
+22
+23
+26
+28
+28
+28
+26
+25
+27
+33
+44
+59
+77
+83
+87
+89
+89
+88
+87
+86
+84
+82
+77
+69
+59
+48
+37
+32
+32
+33
+36
+41
+42
+42
+42
+44
+49
+65
+76
+85
+92
+98
+106
+111
+116
+120
+125
+130
+134
+137
+141
+144
+149
+153
+156
+160
+163
+169
+173
+179
+184
+189
+191
+190
+190
+188
+187
+183
+181
+180
+180
+180
+180
+181
+182
+184
+186
+189
+191
+194
+196
+198
+199
+199
+199
+198
+196
+192
+188
+184
+182
+181
+181
+181
+182
+182
+181
+166
+131
+95
+66
+50
+47
+48
+54
+65
+80
+93
+96
+97
+97
+94
+89
+85
+81
+78
+75
+72
+72
+71
+69
+66
+61
+60
+59
+60
+61
+68
+84
+105
+128
+151
+175
+185
+191
+192
+192
+189
+186
+183
+179
+176
+171
+167
+163
+158
+152
+141
+131
+120
+108
+97
+84
+78
+73
+70
+67
+66
+65
+65
+64
+64
+64
+64
+64
+64
+65
+65
+65
+65
+66
+66
+67
+69
+70
+71
+73
+74
+75
+76
+77
+77
+78
+79
+79
+79
+79
+79
+78
+78
+77
+77
+76
+76
+75
+75
+75
+74
+74
+74
+74
+74
+73
+73
+73
+73
+73
+72
+72
+72
+72
+72
+72
+72
+72
+72
+72
+72
+73
+74
+77
+81
+92
+97
+99
+98
+96
+84
+78
+76
+75
+75
+75
+78
+99
+132
+172
+177
+175
+169
+153
+119
+47
+18
+4
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+16
+18
+19
+20
+21
+21
+21
+21
+22
+22
+22
+22
+22
+22
+21
+21
+21
+23
+25
+29
+34
+36
+36
+36
+35
+30
+29
+29
+33
+37
+46
+53
+61
+70
+79
+86
+87
+86
+85
+83
+78
+72
+63
+52
+41
+37
+38
+41
+44
+45
+43
+42
+43
+47
+56
+73
+83
+91
+98
+104
+112
+117
+121
+126
+130
+136
+140
+144
+148
+151
+156
+160
+163
+168
+172
+179
+184
+188
+191
+192
+192
+189
+186
+183
+180
+179
+179
+179
+180
+182
+185
+188
+190
+193
+196
+200
+203
+205
+207
+209
+210
+211
+211
+210
+209
+206
+202
+197
+192
+186
+182
+181
+182
+182
+182
+177
+157
+126
+92
+62
+49
+49
+52
+60
+74
+90
+96
+99
+99
+98
+92
+87
+83
+79
+76
+73
+72
+72
+71
+69
+65
+63
+61
+59
+59
+61
+67
+76
+89
+104
+125
+138
+149
+158
+164
+166
+166
+163
+159
+154
+145
+136
+127
+117
+107
+96
+89
+83
+79
+75
+71
+70
+68
+68
+67
+67
+68
+69
+69
+70
+71
+72
+72
+73
+74
+74
+75
+75
+76
+77
+77
+78
+78
+79
+79
+80
+80
+80
+80
+81
+80
+80
+80
+80
+79
+79
+78
+78
+77
+77
+76
+76
+75
+75
+75
+75
+74
+74
+74
+74
+74
+73
+73
+73
+73
+73
+73
+73
+73
+73
+73
+72
+72
+72
+73
+73
+75
+78
+81
+86
+97
+103
+104
+104
+101
+87
+80
+76
+75
+74
+75
+78
+100
+134
+173
+178
+175
+170
+154
+120
+48
+18
+5
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+19
+19
+19
+19
+19
+20
+20
+20
+20
+20
+20
+20
+21
+22
+23
+25
+27
+30
+34
+37
+41
+42
+43
+42
+42
+38
+35
+33
+32
+31
+34
+37
+42
+49
+57
+65
+72
+78
+82
+82
+80
+76
+70
+63
+53
+50
+51
+52
+51
+47
+43
+42
+46
+53
+66
+81
+89
+97
+104
+110
+117
+122
+127
+132
+136
+143
+147
+151
+155
+159
+164
+167
+172
+178
+183
+189
+192
+193
+194
+192
+187
+182
+179
+178
+176
+178
+180
+183
+185
+188
+191
+194
+197
+200
+203
+207
+210
+212
+214
+215
+217
+217
+217
+217
+216
+215
+212
+208
+203
+197
+188
+184
+182
+182
+182
+181
+173
+153
+122
+86
+56
+51
+50
+55
+65
+85
+93
+98
+100
+100
+96
+90
+85
+81
+77
+74
+73
+72
+71
+70
+68
+66
+64
+61
+59
+58
+60
+63
+68
+75
+87
+97
+106
+115
+122
+127
+127
+125
+121
+116
+107
+99
+92
+86
+80
+74
+72
+70
+70
+70
+71
+72
+73
+74
+75
+76
+77
+77
+78
+79
+79
+80
+80
+81
+81
+81
+82
+82
+82
+82
+83
+83
+83
+83
+83
+82
+82
+82
+82
+82
+81
+81
+80
+80
+79
+78
+78
+78
+77
+77
+76
+76
+76
+75
+75
+75
+75
+75
+74
+74
+74
+74
+73
+73
+73
+73
+73
+73
+73
+73
+73
+73
+73
+73
+74
+75
+78
+82
+87
+92
+103
+108
+110
+110
+107
+91
+82
+77
+75
+74
+74
+78
+101
+136
+175
+179
+175
+170
+154
+121
+49
+19
+5
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+29
+28
+28
+27
+26
+26
+25
+25
+25
+25
+25
+26
+27
+28
+30
+33
+37
+40
+42
+45
+46
+47
+47
+47
+47
+46
+43
+40
+38
+35
+34
+34
+33
+34
+37
+42
+51
+62
+70
+73
+75
+76
+74
+70
+64
+61
+59
+57
+52
+46
+42
+45
+52
+63
+76
+89
+96
+103
+110
+116
+123
+129
+134
+139
+144
+150
+154
+159
+163
+167
+172
+177
+183
+189
+193
+196
+196
+194
+191
+186
+179
+175
+174
+175
+177
+181
+184
+188
+191
+193
+196
+199
+202
+205
+209
+213
+215
+216
+218
+219
+219
+220
+220
+220
+220
+220
+219
+216
+213
+209
+199
+190
+185
+183
+182
+182
+181
+171
+151
+118
+72
+58
+51
+52
+57
+76
+88
+96
+101
+102
+100
+95
+89
+83
+78
+75
+74
+73
+72
+71
+70
+69
+67
+64
+61
+59
+59
+59
+60
+61
+64
+68
+73
+78
+84
+88
+88
+86
+84
+80
+74
+71
+70
+69
+69
+70
+71
+72
+73
+75
+77
+79
+81
+82
+83
+84
+85
+85
+85
+85
+85
+85
+85
+85
+85
+85
+85
+85
+85
+85
+85
+85
+84
+84
+84
+83
+83
+82
+82
+81
+81
+80
+80
+79
+79
+78
+78
+77
+77
+77
+76
+76
+76
+76
+75
+75
+75
+75
+75
+75
+74
+74
+74
+74
+73
+73
+73
+73
+73
+73
+74
+74
+74
+75
+76
+78
+82
+87
+93
+98
+109
+114
+116
+116
+113
+96
+84
+78
+75
+74
+74
+78
+103
+139
+176
+179
+175
+170
+154
+122
+50
+19
+5
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+38
+38
+38
+37
+37
+36
+36
+35
+35
+35
+35
+36
+37
+39
+40
+43
+45
+46
+47
+48
+50
+50
+50
+50
+50
+49
+48
+46
+44
+42
+39
+37
+35
+34
+34
+34
+35
+37
+42
+48
+59
+65
+66
+65
+63
+58
+52
+46
+42
+40
+42
+51
+64
+76
+86
+96
+103
+110
+117
+123
+130
+136
+141
+147
+152
+158
+163
+167
+171
+175
+182
+188
+194
+198
+199
+198
+195
+189
+182
+173
+172
+172
+174
+177
+183
+189
+190
+192
+193
+194
+198
+201
+205
+210
+213
+217
+219
+220
+220
+221
+221
+221
+221
+221
+221
+221
+222
+221
+219
+216
+210
+202
+193
+185
+183
+183
+182
+181
+172
+153
+101
+72
+56
+50
+51
+63
+80
+92
+99
+103
+103
+100
+94
+87
+80
+76
+74
+73
+72
+71
+71
+71
+70
+68
+65
+61
+59
+59
+59
+60
+60
+61
+62
+63
+64
+65
+65
+65
+65
+65
+65
+66
+67
+69
+71
+74
+77
+79
+81
+83
+84
+85
+85
+86
+86
+86
+86
+86
+86
+86
+86
+86
+86
+86
+86
+85
+85
+85
+85
+85
+85
+85
+84
+84
+84
+83
+82
+82
+81
+80
+80
+79
+79
+78
+78
+78
+77
+77
+77
+77
+76
+76
+76
+76
+76
+76
+76
+76
+76
+75
+75
+75
+75
+75
+75
+75
+75
+75
+75
+75
+75
+76
+77
+78
+79
+83
+88
+94
+100
+105
+114
+120
+122
+122
+120
+101
+87
+79
+75
+73
+74
+78
+104
+141
+177
+180
+176
+170
+155
+122
+50
+19
+5
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+51
+51
+50
+50
+50
+49
+49
+49
+49
+49
+49
+49
+50
+51
+52
+54
+55
+56
+57
+58
+60
+60
+60
+60
+60
+59
+57
+56
+54
+52
+50
+48
+46
+44
+42
+39
+38
+37
+37
+37
+38
+39
+39
+39
+39
+39
+39
+40
+42
+46
+61
+72
+81
+89
+95
+106
+113
+120
+126
+131
+139
+145
+150
+155
+161
+167
+171
+176
+180
+186
+195
+200
+201
+201
+199
+190
+177
+170
+167
+168
+172
+179
+184
+188
+190
+191
+191
+192
+193
+196
+203
+209
+213
+216
+218
+219
+219
+219
+218
+216
+213
+213
+213
+214
+216
+219
+221
+222
+223
+223
+219
+215
+207
+198
+188
+183
+183
+183
+181
+177
+147
+110
+79
+58
+50
+51
+62
+77
+91
+100
+104
+104
+102
+97
+90
+80
+76
+74
+72
+72
+71
+71
+71
+70
+69
+67
+64
+63
+61
+61
+61
+60
+60
+60
+61
+61
+62
+63
+64
+65
+68
+71
+73
+75
+76
+77
+76
+75
+73
+70
+67
+66
+66
+67
+68
+69
+71
+74
+77
+79
+81
+81
+82
+82
+83
+83
+83
+83
+83
+83
+82
+82
+82
+82
+81
+81
+80
+80
+80
+79
+79
+79
+78
+78
+78
+78
+78
+78
+78
+79
+79
+80
+80
+80
+80
+80
+80
+80
+80
+80
+80
+80
+80
+80
+80
+80
+79
+80
+80
+80
+81
+82
+83
+84
+87
+92
+97
+103
+109
+113
+121
+127
+129
+130
+128
+110
+93
+82
+76
+73
+74
+79
+106
+144
+178
+180
+176
+170
+155
+123
+51
+20
+5
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+60
+60
+60
+60
+59
+59
+59
+59
+58
+58
+59
+59
+59
+60
+61
+62
+63
+64
+65
+65
+66
+67
+67
+67
+66
+65
+64
+63
+61
+60
+58
+56
+55
+53
+51
+49
+48
+46
+45
+43
+43
+43
+43
+43
+44
+46
+48
+52
+58
+65
+76
+83
+90
+97
+104
+114
+121
+127
+132
+138
+146
+152
+157
+162
+168
+174
+179
+184
+190
+197
+201
+202
+201
+196
+186
+171
+168
+167
+168
+173
+183
+186
+188
+189
+190
+189
+189
+191
+194
+200
+207
+211
+214
+216
+217
+215
+212
+208
+203
+199
+196
+194
+195
+196
+198
+203
+209
+215
+219
+222
+222
+220
+216
+208
+199
+187
+184
+183
+182
+181
+169
+141
+109
+80
+58
+50
+54
+63
+76
+92
+102
+103
+103
+101
+97
+88
+82
+77
+74
+72
+71
+71
+71
+70
+70
+69
+68
+66
+65
+64
+62
+61
+61
+61
+61
+62
+63
+65
+67
+70
+73
+74
+74
+73
+70
+65
+61
+57
+54
+52
+50
+49
+48
+47
+47
+49
+50
+52
+54
+56
+62
+66
+71
+74
+77
+79
+80
+81
+81
+81
+81
+81
+81
+81
+81
+80
+80
+80
+80
+79
+79
+79
+80
+80
+81
+82
+82
+83
+84
+85
+86
+86
+86
+87
+87
+87
+87
+88
+88
+87
+87
+87
+87
+86
+86
+86
+86
+86
+86
+86
+87
+88
+89
+91
+95
+99
+105
+110
+115
+118
+124
+131
+134
+135
+134
+117
+98
+84
+77
+73
+74
+79
+108
+145
+179
+180
+176
+170
+155
+123
+51
+20
+5
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+70
+70
+69
+69
+69
+69
+68
+68
+68
+68
+68
+68
+69
+69
+70
+71
+71
+72
+72
+73
+73
+73
+73
+73
+73
+72
+71
+70
+69
+67
+65
+64
+63
+61
+60
+58
+57
+56
+55
+53
+52
+52
+52
+53
+55
+58
+62
+66
+72
+78
+86
+92
+99
+106
+113
+122
+128
+134
+139
+145
+153
+159
+164
+170
+174
+181
+187
+193
+198
+203
+203
+200
+191
+181
+171
+163
+165
+170
+176
+182
+188
+189
+189
+188
+186
+186
+187
+191
+196
+202
+209
+211
+213
+213
+211
+206
+200
+195
+190
+186
+184
+184
+185
+186
+189
+194
+198
+204
+210
+216
+222
+223
+221
+217
+209
+196
+188
+185
+183
+183
+179
+163
+138
+107
+77
+55
+52
+54
+63
+77
+95
+100
+102
+102
+100
+95
+89
+84
+79
+75
+72
+72
+71
+71
+70
+70
+69
+68
+67
+66
+64
+63
+62
+62
+63
+65
+67
+69
+71
+73
+74
+72
+69
+65
+61
+57
+55
+53
+53
+52
+52
+53
+53
+52
+51
+49
+47
+45
+44
+44
+47
+50
+54
+57
+61
+67
+70
+74
+76
+78
+79
+80
+80
+80
+80
+80
+80
+80
+80
+81
+81
+82
+83
+84
+86
+88
+89
+90
+91
+92
+93
+94
+94
+94
+95
+95
+95
+95
+95
+95
+95
+95
+94
+94
+94
+93
+93
+93
+93
+93
+94
+95
+97
+99
+102
+106
+111
+115
+119
+122
+127
+134
+138
+140
+139
+125
+103
+88
+78
+74
+74
+80
+109
+147
+180
+181
+176
+170
+154
+123
+51
+20
+5
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+79
+79
+79
+79
+79
+78
+78
+78
+78
+78
+78
+78
+78
+78
+79
+79
+79
+80
+80
+80
+81
+81
+80
+80
+80
+79
+78
+77
+76
+75
+73
+72
+71
+70
+69
+68
+67
+66
+65
+64
+64
+64
+65
+66
+68
+72
+75
+80
+84
+89
+95
+102
+109
+115
+122
+129
+135
+141
+146
+152
+160
+166
+171
+177
+181
+189
+195
+201
+205
+205
+200
+190
+177
+165
+160
+163
+170
+178
+185
+189
+189
+188
+186
+184
+183
+183
+186
+191
+198
+204
+208
+210
+210
+208
+203
+195
+189
+184
+180
+178
+178
+180
+181
+183
+186
+189
+192
+195
+200
+207
+218
+222
+223
+222
+218
+206
+195
+188
+185
+184
+183
+178
+162
+137
+105
+69
+57
+51
+53
+61
+83
+94
+99
+101
+101
+99
+95
+91
+86
+81
+76
+74
+73
+72
+71
+71
+70
+70
+69
+68
+66
+66
+66
+66
+67
+70
+72
+74
+74
+74
+71
+66
+61
+57
+54
+53
+54
+55
+57
+59
+62
+64
+66
+67
+66
+62
+58
+53
+48
+44
+41
+40
+40
+42
+45
+51
+56
+61
+65
+69
+72
+74
+76
+77
+78
+79
+80
+80
+81
+82
+83
+85
+87
+89
+91
+94
+95
+97
+98
+99
+100
+101
+101
+102
+102
+103
+103
+103
+103
+103
+102
+102
+102
+102
+101
+101
+101
+100
+101
+101
+101
+102
+104
+106
+109
+113
+116
+120
+123
+125
+129
+137
+142
+144
+144
+133
+110
+92
+79
+74
+74
+80
+110
+149
+180
+181
+176
+169
+154
+123
+50
+19
+5
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+89
+89
+88
+88
+88
+88
+88
+87
+87
+87
+87
+87
+87
+87
+87
+88
+88
+88
+88
+88
+88
+88
+88
+87
+87
+86
+85
+84
+83
+82
+81
+80
+79
+78
+77
+76
+76
+75
+75
+75
+75
+75
+76
+78
+80
+83
+86
+90
+94
+99
+107
+113
+119
+124
+129
+137
+142
+148
+153
+159
+167
+173
+178
+183
+188
+198
+204
+206
+206
+204
+188
+168
+159
+157
+159
+171
+182
+188
+190
+189
+187
+183
+181
+180
+180
+181
+185
+192
+198
+204
+206
+206
+205
+201
+196
+187
+182
+178
+176
+176
+177
+179
+181
+183
+186
+189
+192
+195
+198
+200
+209
+217
+222
+224
+223
+216
+205
+195
+187
+184
+184
+183
+177
+163
+137
+93
+70
+55
+49
+51
+64
+82
+94
+99
+99
+98
+96
+94
+92
+88
+83
+80
+76
+74
+73
+72
+71
+71
+71
+70
+70
+71
+72
+73
+75
+76
+76
+75
+74
+71
+62
+56
+53
+52
+52
+53
+53
+55
+56
+59
+63
+67
+72
+76
+80
+82
+80
+75
+68
+59
+48
+42
+39
+37
+37
+38
+39
+42
+45
+50
+57
+62
+66
+70
+73
+76
+78
+80
+81
+82
+84
+87
+89
+92
+95
+98
+99
+101
+102
+103
+104
+105
+106
+107
+108
+108
+109
+109
+109
+109
+109
+109
+108
+108
+108
+108
+107
+107
+107
+108
+108
+109
+110
+112
+114
+117
+119
+122
+125
+128
+131
+139
+145
+149
+149
+141
+117
+97
+81
+75
+75
+81
+111
+150
+181
+181
+176
+170
+154
+122
+50
+19
+5
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+101
+101
+101
+101
+101
+101
+100
+100
+100
+100
+100
+99
+99
+99
+99
+99
+99
+99
+99
+99
+98
+98
+98
+97
+97
+96
+95
+94
+93
+92
+91
+90
+90
+89
+88
+88
+87
+87
+87
+87
+88
+89
+90
+92
+94
+98
+101
+105
+109
+113
+119
+124
+129
+134
+140
+147
+152
+157
+163
+169
+177
+182
+187
+193
+200
+207
+208
+206
+198
+182
+154
+153
+155
+161
+176
+189
+190
+190
+188
+183
+178
+178
+179
+179
+179
+181
+186
+192
+199
+202
+203
+203
+200
+195
+187
+178
+174
+172
+172
+174
+178
+182
+187
+192
+195
+198
+199
+199
+200
+201
+204
+209
+216
+222
+224
+223
+217
+207
+197
+187
+184
+184
+183
+179
+170
+135
+104
+78
+59
+49
+50
+59
+74
+88
+96
+95
+94
+94
+92
+91
+89
+87
+85
+83
+81
+79
+78
+78
+77
+77
+77
+78
+78
+78
+78
+77
+75
+71
+65
+57
+52
+51
+51
+52
+52
+52
+53
+53
+53
+53
+57
+63
+71
+78
+85
+91
+92
+91
+87
+81
+71
+63
+56
+49
+44
+39
+38
+38
+38
+39
+40
+42
+45
+49
+53
+60
+66
+71
+75
+79
+83
+86
+89
+92
+95
+99
+100
+102
+103
+104
+106
+107
+108
+109
+110
+111
+112
+112
+112
+113
+113
+113
+113
+113
+113
+112
+112
+113
+113
+113
+114
+115
+115
+116
+118
+120
+121
+124
+127
+130
+133
+141
+148
+153
+154
+149
+128
+105
+85
+76
+75
+82
+113
+152
+182
+182
+176
+170
+154
+121
+48
+19
+5
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+111
+111
+111
+110
+110
+110
+110
+110
+109
+109
+109
+109
+108
+108
+108
+108
+107
+107
+107
+107
+106
+106
+105
+105
+104
+103
+103
+102
+101
+100
+99
+98
+98
+97
+96
+96
+96
+96
+96
+97
+98
+99
+100
+102
+104
+108
+111
+114
+118
+122
+128
+133
+138
+143
+147
+154
+159
+164
+170
+176
+183
+188
+194
+201
+207
+208
+206
+193
+176
+157
+150
+154
+165
+178
+187
+190
+189
+186
+181
+178
+177
+177
+177
+178
+178
+180
+187
+193
+198
+201
+202
+201
+196
+189
+180
+173
+171
+171
+174
+178
+188
+196
+202
+207
+211
+213
+213
+212
+210
+207
+206
+209
+213
+218
+223
+225
+222
+215
+206
+195
+186
+185
+184
+183
+179
+160
+133
+105
+80
+61
+49
+52
+59
+71
+84
+92
+92
+91
+90
+88
+88
+87
+86
+85
+83
+82
+81
+81
+80
+80
+80
+80
+79
+79
+78
+74
+69
+63
+57
+52
+51
+51
+51
+52
+52
+52
+52
+53
+53
+53
+56
+61
+68
+77
+87
+96
+100
+100
+98
+93
+84
+76
+68
+61
+54
+48
+45
+42
+41
+39
+40
+41
+43
+46
+49
+55
+61
+66
+71
+76
+81
+85
+89
+92
+95
+99
+101
+102
+104
+105
+107
+108
+110
+111
+112
+113
+113
+114
+114
+114
+114
+114
+114
+114
+114
+114
+114
+114
+114
+115
+115
+116
+117
+118
+119
+121
+122
+125
+129
+132
+136
+142
+150
+156
+158
+155
+136
+112
+89
+77
+76
+82
+114
+153
+182
+182
+176
+170
+153
+119
+47
+18
+5
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+120
+120
+120
+120
+120
+120
+119
+119
+119
+119
+118
+118
+118
+117
+117
+116
+116
+116
+115
+115
+114
+114
+113
+112
+112
+111
+110
+109
+108
+108
+107
+106
+105
+105
+105
+104
+104
+105
+105
+106
+107
+108
+110
+112
+114
+117
+121
+124
+128
+132
+137
+141
+146
+150
+155
+161
+166
+171
+177
+182
+189
+196
+202
+207
+209
+206
+191
+173
+157
+147
+153
+166
+178
+187
+191
+189
+185
+180
+177
+176
+176
+176
+177
+178
+178
+181
+188
+194
+198
+200
+200
+197
+191
+183
+175
+171
+171
+173
+179
+187
+200
+208
+214
+219
+222
+223
+223
+221
+220
+217
+212
+211
+213
+216
+221
+225
+224
+220
+214
+204
+191
+187
+185
+184
+183
+175
+157
+133
+106
+81
+58
+52
+52
+58
+69
+82
+87
+87
+86
+85
+84
+84
+84
+84
+84
+83
+82
+82
+81
+81
+81
+80
+78
+77
+74
+67
+61
+56
+52
+50
+50
+50
+51
+51
+51
+51
+51
+52
+53
+53
+55
+60
+67
+77
+87
+100
+105
+107
+106
+103
+94
+86
+78
+70
+63
+56
+52
+48
+46
+44
+43
+43
+43
+45
+48
+54
+59
+64
+69
+74
+80
+85
+89
+92
+96
+99
+102
+104
+106
+107
+110
+111
+113
+114
+115
+116
+117
+117
+117
+117
+117
+117
+116
+116
+116
+116
+116
+116
+116
+116
+117
+118
+118
+119
+120
+123
+124
+127
+131
+135
+139
+144
+152
+159
+162
+159
+145
+120
+94
+78
+77
+83
+115
+153
+182
+182
+177
+170
+153
+118
+46
+17
+4
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+130
+130
+130
+129
+129
+129
+129
+129
+128
+128
+127
+127
+127
+126
+126
+125
+125
+124
+123
+123
+122
+121
+121
+120
+119
+118
+117
+117
+116
+115
+114
+114
+113
+113
+113
+113
+113
+113
+114
+114
+116
+117
+119
+121
+123
+127
+130
+133
+137
+140
+145
+149
+153
+157
+162
+168
+173
+178
+184
+188
+196
+203
+208
+210
+208
+194
+169
+153
+145
+149
+164
+180
+188
+190
+189
+184
+179
+176
+175
+175
+176
+177
+177
+178
+179
+182
+188
+194
+197
+198
+197
+193
+186
+178
+171
+170
+172
+178
+187
+199
+212
+219
+224
+226
+228
+228
+228
+228
+227
+225
+220
+216
+215
+216
+219
+224
+225
+224
+220
+212
+198
+190
+187
+185
+185
+183
+174
+157
+134
+107
+76
+60
+53
+52
+55
+69
+77
+81
+82
+81
+79
+79
+79
+80
+80
+81
+81
+81
+81
+80
+79
+77
+75
+71
+67
+58
+53
+51
+49
+49
+50
+50
+49
+49
+48
+49
+50
+52
+53
+53
+55
+59
+67
+77
+88
+102
+109
+113
+113
+111
+102
+94
+86
+78
+71
+63
+58
+55
+52
+50
+48
+47
+47
+48
+50
+55
+60
+65
+69
+74
+80
+85
+89
+93
+97
+101
+103
+106
+108
+110
+113
+115
+116
+118
+119
+120
+121
+121
+121
+121
+120
+120
+120
+119
+119
+118
+118
+118
+118
+118
+119
+120
+120
+121
+123
+126
+127
+130
+133
+138
+143
+147
+154
+161
+165
+164
+152
+128
+100
+80
+78
+84
+115
+154
+183
+182
+177
+170
+152
+116
+44
+17
+4
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+139
+139
+139
+139
+139
+139
+138
+138
+138
+137
+137
+136
+136
+135
+135
+134
+133
+132
+132
+131
+130
+129
+128
+128
+127
+126
+125
+124
+123
+123
+122
+122
+121
+121
+121
+121
+121
+121
+122
+123
+125
+126
+128
+130
+132
+136
+139
+142
+145
+149
+153
+157
+161
+165
+168
+174
+180
+185
+190
+194
+205
+210
+211
+209
+204
+164
+147
+142
+146
+158
+185
+190
+191
+189
+185
+177
+175
+175
+175
+175
+176
+178
+179
+180
+181
+183
+188
+193
+196
+196
+195
+190
+182
+174
+169
+170
+174
+184
+197
+210
+222
+226
+228
+229
+229
+230
+230
+229
+229
+229
+228
+223
+220
+218
+219
+223
+225
+225
+224
+219
+206
+196
+189
+186
+185
+185
+183
+175
+159
+136
+101
+78
+62
+53
+50
+55
+62
+70
+75
+75
+73
+71
+70
+70
+72
+75
+77
+78
+78
+78
+75
+72
+67
+62
+56
+50
+49
+48
+48
+49
+49
+48
+47
+46
+46
+46
+49
+51
+52
+53
+55
+59
+67
+78
+90
+105
+113
+118
+119
+117
+109
+102
+94
+86
+78
+69
+64
+60
+57
+55
+54
+54
+55
+56
+57
+60
+63
+67
+71
+75
+81
+86
+90
+94
+98
+103
+105
+108
+111
+113
+116
+118
+120
+121
+123
+124
+125
+125
+125
+125
+125
+125
+124
+124
+123
+123
+122
+122
+122
+122
+122
+123
+124
+125
+126
+129
+131
+134
+137
+142
+147
+150
+156
+163
+167
+167
+160
+136
+106
+82
+80
+85
+116
+155
+183
+182
+177
+170
+152
+114
+43
+16
+4
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+152
+152
+152
+152
+151
+151
+151
+151
+150
+150
+149
+149
+148
+147
+147
+145
+145
+144
+143
+142
+141
+140
+139
+138
+137
+136
+135
+134
+133
+133
+132
+132
+131
+131
+131
+131
+132
+132
+133
+134
+136
+138
+140
+142
+144
+147
+150
+153
+156
+159
+163
+167
+170
+173
+177
+184
+188
+193
+198
+206
+212
+212
+208
+194
+162
+138
+138
+148
+165
+186
+191
+190
+187
+182
+176
+174
+174
+175
+176
+179
+182
+183
+183
+183
+183
+184
+188
+192
+194
+195
+193
+185
+176
+170
+169
+171
+182
+197
+211
+223
+229
+229
+229
+230
+230
+230
+230
+230
+230
+230
+229
+228
+226
+223
+221
+223
+225
+226
+226
+224
+216
+206
+196
+189
+186
+186
+186
+184
+179
+168
+141
+116
+92
+72
+57
+49
+50
+53
+57
+64
+68
+67
+65
+62
+60
+57
+58
+59
+60
+60
+59
+58
+55
+52
+49
+47
+47
+47
+47
+47
+46
+44
+43
+43
+43
+45
+48
+51
+53
+53
+55
+61
+70
+81
+93
+109
+117
+123
+125
+124
+117
+109
+101
+93
+85
+76
+70
+66
+63
+62
+61
+62
+63
+64
+66
+69
+71
+73
+76
+79
+84
+89
+94
+98
+102
+106
+109
+112
+114
+117
+120
+122
+123
+125
+126
+127
+128
+128
+129
+129
+130
+130
+130
+130
+129
+129
+129
+129
+129
+129
+130
+130
+131
+132
+134
+137
+139
+142
+144
+149
+154
+156
+160
+165
+170
+170
+166
+146
+116
+86
+82
+88
+118
+155
+183
+182
+177
+169
+150
+111
+40
+15
+3
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+161
+161
+161
+161
+161
+161
+160
+160
+160
+159
+159
+158
+157
+156
+156
+154
+153
+152
+151
+150
+149
+148
+147
+146
+144
+143
+142
+141
+141
+140
+139
+139
+139
+139
+139
+139
+139
+140
+141
+142
+144
+146
+148
+150
+152
+156
+158
+161
+164
+166
+170
+173
+176
+180
+184
+190
+194
+199
+206
+212
+213
+209
+191
+165
+141
+136
+148
+165
+181
+190
+190
+186
+181
+177
+175
+174
+175
+178
+182
+186
+187
+187
+185
+184
+183
+184
+188
+191
+193
+193
+191
+181
+173
+169
+168
+174
+190
+206
+219
+226
+229
+229
+229
+229
+229
+229
+229
+229
+229
+230
+229
+229
+228
+226
+224
+224
+225
+226
+226
+225
+220
+212
+203
+194
+188
+186
+186
+186
+184
+180
+163
+144
+122
+100
+79
+60
+54
+52
+53
+56
+59
+60
+60
+59
+58
+55
+53
+52
+50
+49
+48
+48
+47
+46
+45
+45
+46
+46
+46
+45
+43
+42
+41
+41
+42
+46
+49
+51
+53
+54
+56
+63
+73
+85
+97
+113
+121
+127
+130
+129
+121
+113
+105
+96
+87
+78
+73
+69
+67
+66
+66
+67
+68
+70
+71
+73
+74
+76
+79
+82
+88
+93
+97
+101
+105
+109
+112
+114
+117
+120
+122
+124
+126
+127
+128
+130
+130
+131
+131
+131
+132
+132
+132
+132
+132
+133
+133
+134
+134
+135
+135
+137
+138
+139
+140
+143
+146
+149
+151
+155
+160
+162
+164
+168
+172
+172
+170
+152
+124
+91
+85
+90
+119
+156
+183
+182
+177
+169
+149
+108
+38
+14
+3
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+171
+171
+171
+171
+170
+170
+170
+170
+169
+169
+168
+167
+166
+166
+165
+163
+162
+161
+160
+158
+157
+156
+154
+153
+152
+151
+150
+149
+148
+148
+147
+147
+146
+146
+146
+147
+147
+148
+149
+150
+152
+154
+156
+158
+161
+164
+166
+169
+171
+173
+177
+180
+183
+186
+191
+195
+200
+206
+212
+214
+211
+193
+167
+144
+133
+144
+164
+180
+189
+190
+186
+181
+177
+175
+174
+175
+179
+185
+190
+193
+193
+192
+188
+185
+184
+184
+188
+190
+192
+192
+189
+178
+171
+168
+168
+178
+198
+213
+224
+228
+229
+229
+229
+229
+229
+229
+229
+229
+229
+229
+229
+229
+229
+228
+226
+225
+226
+226
+226
+226
+223
+218
+209
+200
+192
+187
+187
+187
+186
+185
+178
+165
+148
+128
+107
+82
+68
+59
+54
+53
+54
+56
+56
+57
+56
+54
+52
+49
+47
+46
+44
+43
+43
+42
+42
+43
+43
+43
+43
+42
+41
+41
+41
+41
+43
+47
+50
+52
+53
+54
+58
+67
+77
+89
+102
+117
+127
+133
+135
+134
+125
+116
+107
+98
+89
+80
+75
+72
+70
+70
+70
+71
+72
+74
+75
+76
+77
+79
+82
+86
+92
+97
+101
+104
+107
+112
+115
+117
+120
+123
+125
+127
+129
+130
+132
+133
+133
+134
+134
+134
+135
+135
+135
+135
+135
+136
+137
+138
+138
+139
+141
+142
+143
+145
+147
+150
+153
+155
+158
+161
+166
+167
+169
+171
+174
+174
+172
+158
+132
+96
+87
+92
+121
+157
+183
+182
+177
+169
+147
+105
+36
+13
+3
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+180
+180
+180
+180
+180
+180
+180
+179
+179
+178
+177
+177
+176
+175
+174
+172
+171
+169
+168
+167
+165
+163
+162
+161
+159
+158
+157
+156
+155
+155
+154
+154
+154
+154
+154
+154
+155
+155
+157
+158
+160
+162
+164
+166
+168
+171
+174
+176
+178
+180
+184
+186
+189
+193
+196
+201
+207
+212
+215
+214
+201
+169
+145
+133
+136
+161
+180
+189
+190
+188
+180
+177
+175
+174
+175
+179
+186
+193
+199
+200
+200
+197
+191
+185
+183
+184
+187
+190
+191
+191
+186
+175
+169
+167
+168
+184
+205
+219
+227
+229
+229
+229
+229
+229
+229
+229
+229
+229
+229
+229
+229
+229
+229
+229
+228
+227
+227
+227
+227
+227
+225
+221
+215
+207
+198
+189
+188
+187
+187
+187
+186
+180
+169
+155
+136
+109
+91
+75
+64
+57
+54
+53
+54
+54
+54
+54
+52
+50
+48
+46
+44
+42
+41
+40
+40
+40
+41
+41
+41
+41
+40
+41
+41
+42
+45
+49
+52
+53
+54
+55
+61
+72
+83
+94
+106
+123
+133
+139
+141
+138
+129
+118
+108
+98
+89
+80
+76
+74
+73
+73
+73
+74
+75
+76
+77
+78
+80
+83
+86
+91
+96
+100
+104
+107
+110
+115
+118
+121
+123
+126
+129
+131
+132
+134
+135
+136
+137
+137
+138
+138
+138
+138
+138
+138
+139
+140
+140
+141
+142
+144
+145
+147
+149
+150
+152
+156
+159
+161
+164
+167
+171
+173
+174
+175
+176
+176
+175
+163
+140
+102
+91
+95
+123
+158
+183
+182
+177
+168
+146
+101
+33
+12
+3
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+190
+190
+190
+190
+190
+189
+189
+189
+188
+188
+187
+186
+185
+184
+183
+181
+180
+178
+177
+175
+173
+171
+169
+168
+166
+164
+163
+162
+161
+161
+160
+160
+160
+160
+160
+160
+161
+162
+163
+165
+167
+170
+172
+174
+176
+179
+181
+183
+185
+187
+189
+192
+195
+199
+201
+208
+214
+216
+215
+213
+174
+142
+131
+135
+149
+184
+189
+190
+188
+182
+176
+174
+173
+174
+177
+187
+196
+203
+207
+208
+207
+201
+193
+185
+183
+183
+187
+189
+190
+189
+184
+173
+167
+167
+169
+191
+212
+223
+228
+229
+229
+229
+229
+229
+229
+229
+229
+229
+229
+229
+229
+229
+229
+229
+229
+228
+228
+228
+227
+227
+226
+224
+219
+213
+204
+192
+189
+187
+187
+187
+188
+187
+183
+175
+163
+140
+121
+102
+85
+70
+59
+53
+51
+51
+52
+52
+52
+51
+50
+48
+45
+43
+42
+41
+40
+40
+40
+40
+40
+40
+41
+41
+43
+45
+48
+51
+53
+54
+55
+56
+66
+78
+89
+100
+112
+130
+141
+146
+146
+143
+131
+119
+108
+97
+88
+80
+77
+76
+75
+75
+76
+76
+77
+77
+78
+80
+83
+87
+91
+96
+101
+104
+107
+111
+114
+118
+121
+124
+127
+129
+132
+134
+135
+137
+138
+139
+140
+140
+141
+141
+142
+142
+143
+143
+144
+145
+145
+146
+147
+148
+150
+151
+153
+155
+157
+160
+163
+166
+169
+172
+176
+178
+178
+178
+178
+178
+177
+168
+146
+108
+94
+99
+126
+160
+184
+182
+177
+167
+144
+97
+30
+11
+2
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+202
+202
+202
+202
+202
+202
+202
+202
+201
+201
+200
+199
+198
+196
+195
+193
+191
+189
+188
+186
+184
+182
+180
+179
+177
+176
+175
+174
+173
+172
+172
+171
+171
+171
+171
+172
+173
+174
+175
+177
+179
+181
+183
+185
+186
+189
+190
+192
+193
+195
+197
+200
+203
+206
+210
+217
+217
+216
+208
+185
+133
+129
+136
+154
+183
+191
+190
+186
+181
+175
+172
+172
+175
+181
+190
+202
+208
+212
+215
+215
+214
+205
+194
+185
+182
+183
+185
+187
+188
+188
+181
+171
+166
+166
+170
+199
+217
+226
+229
+229
+229
+229
+229
+229
+229
+229
+229
+229
+229
+229
+229
+229
+229
+229
+229
+229
+229
+228
+228
+228
+227
+225
+223
+219
+213
+201
+193
+189
+188
+188
+188
+188
+188
+187
+183
+172
+158
+143
+126
+108
+87
+75
+64
+57
+53
+53
+52
+52
+51
+51
+50
+48
+47
+46
+44
+43
+43
+43
+43
+43
+45
+46
+48
+50
+51
+53
+54
+55
+57
+61
+77
+89
+99
+109
+122
+143
+153
+156
+154
+147
+131
+117
+104
+93
+85
+79
+77
+76
+76
+77
+77
+78
+78
+80
+82
+87
+91
+95
+98
+102
+106
+109
+112
+116
+119
+124
+127
+129
+132
+134
+137
+138
+140
+141
+142
+143
+143
+144
+145
+146
+147
+148
+149
+150
+151
+153
+154
+155
+156
+157
+159
+160
+161
+163
+164
+167
+169
+171
+173
+176
+181
+182
+182
+182
+181
+180
+179
+173
+154
+117
+100
+104
+130
+162
+184
+181
+177
+166
+140
+91
+26
+9
+2
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+212
+212
+212
+212
+212
+212
+212
+212
+211
+211
+210
+209
+207
+206
+205
+202
+200
+198
+196
+194
+191
+188
+186
+184
+182
+180
+179
+178
+177
+177
+177
+176
+176
+176
+177
+177
+178
+179
+181
+182
+185
+187
+189
+190
+192
+194
+196
+198
+199
+201
+204
+207
+209
+212
+215
+218
+218
+209
+189
+149
+128
+134
+153
+175
+189
+190
+187
+181
+176
+171
+171
+175
+182
+190
+199
+208
+212
+215
+216
+217
+215
+206
+195
+186
+182
+182
+184
+186
+187
+186
+180
+169
+165
+166
+171
+203
+220
+227
+229
+229
+229
+229
+229
+229
+229
+229
+229
+229
+229
+229
+229
+229
+229
+229
+229
+229
+229
+229
+229
+229
+227
+226
+224
+221
+217
+207
+199
+193
+189
+188
+188
+188
+189
+189
+188
+184
+176
+166
+154
+139
+118
+104
+90
+78
+68
+59
+56
+54
+53
+52
+51
+50
+50
+49
+48
+47
+47
+47
+47
+48
+48
+49
+50
+52
+53
+54
+54
+56
+62
+71
+87
+97
+106
+118
+133
+156
+162
+163
+158
+147
+127
+112
+100
+90
+83
+78
+77
+77
+77
+78
+79
+80
+83
+85
+88
+93
+96
+99
+102
+106
+110
+113
+117
+120
+124
+128
+131
+134
+136
+138
+140
+142
+143
+144
+145
+146
+147
+148
+149
+151
+152
+154
+155
+156
+158
+159
+160
+162
+163
+164
+165
+167
+168
+169
+170
+172
+174
+175
+176
+178
+182
+184
+184
+184
+183
+182
+181
+175
+159
+123
+105
+109
+134
+164
+184
+181
+176
+164
+137
+86
+24
+8
+2
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+221
+221
+221
+222
+222
+222
+222
+222
+221
+221
+220
+218
+217
+215
+214
+211
+209
+207
+205
+203
+200
+197
+195
+192
+190
+187
+186
+184
+183
+183
+182
+182
+182
+182
+182
+183
+185
+186
+188
+190
+193
+195
+197
+199
+200
+202
+204
+205
+207
+208
+211
+213
+215
+216
+218
+219
+214
+192
+162
+132
+130
+150
+171
+187
+191
+188
+182
+176
+171
+169
+173
+181
+190
+199
+206
+212
+215
+216
+217
+217
+216
+207
+196
+186
+182
+182
+184
+185
+186
+185
+179
+168
+164
+165
+172
+206
+221
+228
+229
+229
+229
+229
+229
+229
+229
+229
+229
+229
+229
+229
+229
+229
+229
+229
+229
+229
+229
+229
+229
+229
+228
+226
+224
+223
+220
+213
+205
+198
+192
+189
+188
+188
+189
+190
+190
+190
+187
+182
+174
+164
+147
+133
+119
+105
+92
+77
+70
+64
+59
+56
+53
+52
+51
+51
+50
+50
+50
+50
+50
+50
+51
+51
+52
+53
+54
+55
+57
+62
+71
+83
+97
+105
+116
+130
+148
+168
+171
+168
+159
+144
+121
+106
+95
+86
+81
+78
+78
+78
+79
+81
+83
+86
+88
+91
+94
+98
+101
+104
+107
+110
+115
+119
+122
+126
+129
+133
+135
+138
+140
+142
+144
+145
+146
+148
+149
+151
+152
+153
+155
+157
+159
+160
+162
+163
+165
+166
+168
+169
+170
+171
+172
+173
+174
+175
+176
+177
+178
+179
+180
+181
+184
+185
+186
+186
+185
+183
+182
+178
+162
+129
+110
+114
+137
+166
+184
+181
+176
+163
+133
+81
+21
+7
+2
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+231
+231
+231
+231
+232
+232
+232
+232
+231
+231
+230
+229
+227
+225
+223
+220
+218
+215
+213
+210
+207
+205
+203
+200
+198
+195
+193
+192
+190
+189
+189
+188
+188
+188
+189
+191
+192
+194
+197
+199
+202
+204
+205
+207
+208
+210
+211
+212
+213
+214
+216
+217
+218
+219
+219
+217
+201
+169
+138
+127
+143
+170
+185
+190
+189
+184
+176
+171
+168
+170
+179
+189
+198
+205
+210
+214
+216
+217
+218
+218
+216
+208
+197
+187
+182
+181
+183
+184
+184
+184
+178
+168
+163
+165
+172
+208
+222
+228
+229
+229
+229
+229
+229
+229
+229
+229
+229
+229
+229
+229
+229
+229
+229
+229
+229
+230
+230
+230
+230
+229
+228
+226
+225
+223
+222
+217
+211
+204
+197
+191
+188
+188
+189
+189
+190
+192
+192
+190
+188
+183
+171
+160
+147
+134
+120
+103
+91
+81
+73
+66
+60
+57
+55
+53
+52
+52
+52
+51
+52
+52
+52
+53
+54
+54
+55
+58
+64
+73
+83
+94
+105
+114
+128
+145
+165
+179
+178
+170
+157
+138
+114
+100
+89
+83
+79
+78
+79
+81
+83
+85
+89
+92
+95
+97
+100
+103
+106
+109
+112
+116
+121
+124
+128
+131
+134
+137
+140
+142
+144
+145
+148
+149
+151
+152
+154
+156
+158
+160
+162
+164
+166
+168
+169
+171
+172
+174
+175
+175
+176
+177
+178
+179
+179
+180
+181
+182
+182
+183
+183
+183
+185
+186
+187
+187
+186
+185
+184
+180
+166
+135
+115
+119
+141
+168
+183
+181
+176
+161
+129
+75
+18
+6
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+240
+241
+241
+241
+242
+242
+241
+241
+241
+241
+241
+240
+239
+237
+235
+231
+227
+223
+219
+215
+212
+209
+207
+206
+204
+202
+200
+199
+198
+197
+196
+196
+196
+197
+197
+199
+201
+203
+205
+207
+209
+210
+211
+212
+213
+214
+214
+215
+216
+217
+218
+219
+219
+220
+219
+213
+173
+142
+127
+130
+170
+186
+191
+189
+186
+179
+170
+167
+168
+173
+189
+196
+203
+208
+212
+216
+217
+218
+218
+218
+216
+209
+198
+187
+181
+181
+182
+183
+183
+183
+178
+167
+163
+164
+171
+208
+222
+228
+229
+229
+229
+229
+229
+229
+229
+229
+229
+229
+229
+229
+229
+229
+229
+229
+229
+230
+230
+230
+230
+230
+229
+227
+225
+224
+223
+221
+216
+209
+202
+195
+190
+188
+188
+188
+189
+191
+193
+194
+194
+193
+188
+181
+171
+161
+148
+131
+118
+106
+95
+85
+74
+68
+63
+59
+56
+54
+54
+53
+54
+54
+55
+55
+55
+56
+57
+66
+77
+87
+97
+104
+114
+127
+144
+163
+182
+187
+182
+169
+151
+129
+105
+93
+85
+80
+79
+80
+82
+85
+88
+91
+95
+98
+100
+102
+105
+108
+111
+115
+118
+122
+127
+130
+134
+137
+139
+142
+144
+146
+148
+150
+152
+154
+155
+157
+160
+163
+165
+168
+170
+172
+174
+176
+177
+178
+179
+180
+181
+182
+182
+183
+183
+184
+184
+184
+185
+185
+185
+186
+186
+186
+187
+187
+188
+188
+187
+186
+185
+181
+169
+141
+121
+124
+145
+170
+183
+181
+176
+159
+125
+70
+16
+5
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+252
+251
+249
+246
+244
+241
+240
+239
+239
+240
+241
+241
+242
+243
+243
+242
+241
+240
+237
+233
+226
+221
+216
+212
+210
+207
+206
+205
+204
+204
+203
+203
+203
+204
+204
+206
+208
+210
+212
+214
+215
+215
+216
+216
+217
+217
+218
+219
+220
+221
+221
+221
+221
+219
+214
+162
+133
+125
+136
+166
+192
+191
+189
+185
+181
+166
+164
+166
+172
+185
+195
+201
+207
+212
+216
+218
+219
+219
+219
+219
+217
+209
+199
+189
+182
+181
+181
+182
+182
+182
+178
+168
+163
+163
+168
+206
+222
+228
+229
+229
+228
+229
+229
+229
+229
+229
+229
+229
+229
+229
+229
+229
+229
+229
+230
+230
+230
+230
+230
+230
+229
+227
+226
+224
+223
+222
+220
+216
+210
+202
+194
+191
+189
+188
+188
+189
+191
+193
+195
+197
+197
+195
+191
+185
+177
+163
+152
+140
+128
+117
+104
+95
+87
+81
+75
+69
+66
+64
+62
+61
+61
+62
+65
+70
+78
+90
+97
+103
+110
+118
+135
+153
+172
+187
+196
+192
+177
+157
+134
+112
+91
+84
+82
+81
+82
+87
+91
+95
+98
+100
+103
+105
+107
+110
+113
+117
+120
+124
+128
+131
+135
+138
+141
+143
+146
+148
+150
+152
+154
+157
+160
+162
+165
+168
+171
+174
+176
+178
+180
+182
+183
+185
+186
+186
+187
+187
+187
+187
+187
+187
+187
+187
+187
+187
+187
+187
+187
+187
+187
+188
+188
+188
+188
+189
+188
+187
+186
+183
+172
+147
+127
+131
+150
+172
+183
+180
+175
+155
+118
+62
+13
+4
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+180
+181
+182
+185
+190
+194
+199
+200
+200
+198
+196
+198
+201
+205
+211
+220
+227
+233
+236
+235
+233
+230
+226
+221
+217
+213
+210
+209
+208
+207
+207
+207
+207
+208
+209
+213
+215
+216
+216
+216
+215
+215
+215
+215
+215
+217
+218
+219
+219
+216
+203
+192
+178
+161
+143
+124
+124
+141
+165
+186
+192
+189
+186
+181
+173
+162
+162
+168
+177
+188
+198
+205
+211
+215
+218
+219
+219
+219
+219
+219
+217
+211
+201
+191
+184
+180
+181
+181
+181
+181
+178
+169
+163
+161
+165
+200
+220
+227
+228
+228
+228
+228
+229
+229
+229
+229
+229
+229
+229
+229
+229
+229
+229
+230
+230
+230
+230
+230
+230
+230
+229
+227
+226
+224
+223
+222
+222
+219
+214
+208
+199
+194
+191
+189
+188
+188
+190
+191
+194
+196
+198
+199
+198
+195
+190
+180
+170
+160
+149
+139
+125
+115
+107
+99
+92
+85
+81
+78
+76
+76
+78
+81
+85
+90
+96
+102
+107
+114
+125
+138
+158
+175
+189
+198
+200
+187
+165
+140
+117
+99
+86
+84
+83
+85
+89
+94
+98
+100
+103
+105
+108
+110
+113
+116
+119
+124
+128
+131
+135
+138
+142
+144
+147
+149
+151
+154
+157
+159
+162
+164
+168
+171
+174
+177
+179
+182
+184
+186
+187
+188
+188
+189
+189
+189
+189
+189
+189
+189
+189
+189
+188
+188
+188
+188
+188
+188
+188
+188
+188
+188
+188
+189
+189
+189
+189
+188
+187
+184
+174
+150
+132
+136
+154
+175
+183
+180
+174
+151
+112
+56
+10
+3
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+148
+162
+177
+189
+197
+202
+206
+207
+207
+205
+204
+204
+204
+204
+204
+208
+214
+220
+226
+232
+235
+234
+232
+228
+224
+219
+216
+213
+212
+211
+210
+211
+212
+214
+216
+219
+218
+217
+212
+202
+197
+198
+201
+203
+203
+198
+187
+175
+160
+145
+132
+128
+125
+121
+115
+121
+140
+164
+184
+193
+190
+186
+182
+176
+164
+159
+162
+170
+180
+190
+202
+209
+214
+217
+219
+219
+219
+219
+219
+219
+218
+212
+204
+194
+186
+181
+180
+180
+181
+180
+178
+170
+163
+160
+162
+193
+216
+226
+228
+228
+228
+228
+228
+229
+229
+229
+229
+230
+230
+230
+230
+230
+230
+230
+230
+230
+230
+230
+230
+230
+229
+227
+226
+224
+223
+223
+222
+221
+218
+212
+203
+197
+193
+190
+189
+188
+189
+190
+192
+194
+198
+200
+201
+201
+198
+192
+185
+176
+167
+157
+144
+134
+126
+118
+111
+103
+99
+97
+95
+95
+96
+99
+102
+105
+108
+114
+122
+133
+146
+160
+179
+192
+201
+203
+198
+173
+146
+122
+103
+90
+85
+86
+88
+92
+97
+101
+104
+106
+108
+110
+114
+117
+120
+124
+127
+132
+136
+139
+142
+145
+148
+151
+153
+155
+158
+161
+164
+167
+170
+173
+177
+180
+183
+185
+187
+189
+189
+190
+191
+191
+192
+192
+192
+192
+192
+191
+191
+191
+191
+191
+190
+190
+190
+190
+190
+189
+189
+189
+189
+189
+189
+189
+189
+189
+189
+188
+188
+185
+176
+153
+137
+140
+158
+177
+183
+180
+173
+147
+105
+49
+9
+3
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+152
+178
+200
+216
+224
+226
+226
+226
+226
+226
+226
+225
+222
+217
+211
+207
+206
+209
+214
+223
+232
+234
+234
+232
+230
+225
+222
+219
+216
+215
+215
+216
+218
+220
+222
+217
+205
+194
+182
+165
+154
+155
+156
+157
+153
+140
+123
+105
+86
+71
+71
+80
+94
+108
+119
+141
+168
+185
+194
+193
+186
+184
+178
+169
+157
+157
+163
+172
+183
+193
+206
+213
+216
+218
+219
+219
+219
+219
+219
+219
+219
+214
+207
+197
+189
+182
+180
+180
+180
+180
+178
+171
+164
+160
+160
+184
+211
+224
+228
+228
+228
+228
+228
+228
+228
+229
+229
+230
+230
+230
+230
+230
+230
+230
+230
+230
+230
+230
+230
+230
+228
+227
+225
+224
+223
+223
+223
+222
+220
+215
+207
+200
+195
+192
+190
+189
+188
+189
+190
+193
+197
+200
+203
+204
+204
+200
+195
+188
+181
+172
+160
+151
+143
+136
+129
+122
+118
+116
+114
+113
+113
+114
+115
+118
+121
+131
+143
+156
+170
+182
+197
+204
+206
+201
+188
+151
+124
+105
+92
+87
+88
+91
+95
+100
+104
+108
+110
+112
+114
+117
+121
+125
+128
+132
+136
+141
+144
+147
+149
+152
+155
+157
+160
+163
+166
+170
+173
+177
+180
+183
+186
+188
+190
+192
+193
+193
+194
+194
+194
+194
+195
+195
+195
+195
+195
+194
+194
+194
+194
+194
+193
+193
+192
+192
+192
+192
+191
+191
+191
+191
+191
+190
+190
+190
+190
+189
+188
+186
+177
+156
+141
+145
+162
+179
+183
+180
+171
+143
+98
+43
+7
+2
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+186
+210
+221
+226
+227
+227
+226
+226
+225
+225
+225
+225
+225
+225
+224
+217
+210
+207
+207
+210
+225
+231
+234
+234
+234
+230
+228
+225
+222
+220
+221
+223
+224
+224
+222
+202
+160
+129
+109
+98
+83
+72
+62
+50
+36
+23
+23
+28
+39
+54
+80
+99
+114
+128
+143
+177
+190
+195
+193
+189
+184
+181
+172
+161
+153
+154
+162
+173
+184
+196
+210
+215
+217
+218
+218
+219
+219
+219
+219
+219
+219
+217
+210
+202
+192
+184
+181
+180
+179
+179
+178
+172
+165
+160
+158
+174
+205
+222
+228
+228
+228
+228
+227
+227
+228
+228
+229
+229
+230
+230
+230
+230
+230
+230
+230
+230
+230
+230
+230
+229
+228
+226
+225
+224
+223
+223
+223
+223
+221
+218
+209
+203
+198
+194
+191
+189
+189
+189
+190
+192
+197
+200
+203
+205
+206
+205
+201
+196
+190
+184
+174
+166
+159
+152
+145
+139
+134
+131
+127
+125
+123
+123
+126
+132
+141
+159
+171
+181
+190
+199
+208
+210
+205
+192
+165
+123
+103
+92
+88
+88
+93
+98
+103
+107
+109
+112
+114
+117
+120
+124
+129
+133
+137
+141
+145
+149
+151
+154
+156
+159
+163
+166
+169
+173
+176
+181
+184
+187
+190
+192
+194
+195
+195
+196
+196
+197
+198
+198
+199
+199
+199
+199
+199
+199
+199
+199
+199
+199
+198
+198
+197
+197
+196
+196
+196
+195
+195
+194
+193
+193
+192
+192
+191
+191
+190
+189
+189
+187
+178
+159
+145
+150
+165
+180
+183
+179
+170
+138
+91
+37
+5
+2
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+197
+216
+224
+226
+226
+224
+223
+223
+223
+224
+224
+224
+224
+225
+225
+224
+218
+212
+207
+207
+211
+220
+228
+233
+234
+233
+232
+229
+227
+227
+230
+230
+218
+184
+115
+59
+41
+27
+18
+11
+8
+5
+4
+6
+10
+28
+49
+73
+97
+118
+135
+141
+152
+166
+185
+196
+196
+193
+189
+184
+182
+174
+162
+152
+150
+152
+160
+172
+186
+201
+214
+216
+217
+217
+217
+218
+219
+219
+219
+220
+220
+219
+215
+208
+199
+188
+183
+180
+179
+179
+178
+174
+167
+161
+158
+162
+190
+212
+226
+228
+228
+227
+227
+227
+227
+227
+228
+228
+229
+229
+229
+229
+230
+230
+230
+230
+229
+229
+229
+228
+226
+225
+224
+224
+224
+223
+223
+223
+222
+218
+210
+203
+198
+194
+191
+189
+189
+189
+190
+193
+198
+201
+204
+207
+209
+209
+207
+204
+199
+192
+183
+176
+169
+163
+157
+149
+145
+143
+141
+141
+146
+153
+162
+171
+180
+188
+194
+200
+206
+211
+211
+204
+182
+151
+117
+95
+92
+92
+94
+99
+107
+111
+114
+116
+118
+122
+125
+129
+133
+138
+143
+147
+151
+154
+157
+160
+163
+166
+169
+173
+178
+181
+185
+188
+191
+194
+196
+197
+198
+199
+200
+200
+201
+202
+203
+204
+204
+204
+205
+205
+205
+206
+206
+206
+206
+206
+206
+205
+205
+204
+204
+203
+202
+202
+201
+200
+200
+199
+198
+197
+196
+195
+194
+193
+192
+190
+189
+187
+179
+161
+151
+156
+170
+182
+183
+179
+166
+130
+80
+29
+4
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+205
+219
+225
+226
+225
+223
+223
+223
+223
+224
+224
+224
+224
+224
+225
+225
+222
+216
+210
+207
+211
+219
+227
+232
+234
+234
+233
+232
+231
+231
+226
+189
+138
+87
+47
+24
+17
+12
+8
+6
+4
+5
+13
+27
+50
+83
+103
+120
+133
+141
+152
+162
+175
+186
+194
+197
+194
+189
+185
+183
+181
+167
+156
+149
+148
+150
+158
+172
+188
+205
+216
+216
+216
+216
+216
+217
+219
+219
+219
+220
+220
+220
+218
+214
+206
+193
+186
+182
+179
+179
+177
+175
+169
+163
+158
+159
+177
+200
+220
+227
+228
+227
+227
+227
+227
+227
+227
+227
+227
+228
+228
+228
+228
+228
+228
+228
+228
+227
+227
+226
+225
+225
+224
+224
+224
+224
+224
+223
+220
+216
+207
+201
+196
+193
+190
+189
+190
+191
+194
+197
+202
+206
+209
+211
+212
+212
+210
+207
+204
+198
+190
+184
+178
+173
+168
+164
+163
+163
+164
+167
+172
+177
+183
+188
+192
+199
+204
+209
+211
+212
+199
+171
+142
+116
+101
+94
+95
+98
+103
+108
+114
+116
+119
+122
+125
+131
+135
+140
+144
+148
+154
+157
+161
+164
+168
+173
+176
+180
+184
+187
+191
+193
+196
+197
+199
+200
+201
+202
+203
+203
+204
+205
+205
+205
+206
+206
+206
+207
+207
+207
+207
+207
+208
+208
+208
+208
+208
+208
+207
+207
+207
+207
+206
+205
+205
+204
+203
+202
+201
+200
+199
+197
+196
+195
+193
+191
+190
+187
+180
+162
+154
+160
+172
+183
+183
+178
+162
+123
+72
+24
+3
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+207
+220
+225
+226
+225
+222
+222
+223
+224
+225
+224
+224
+224
+224
+225
+225
+223
+217
+211
+209
+211
+219
+227
+233
+234
+234
+234
+233
+230
+222
+171
+117
+70
+34
+16
+8
+6
+5
+4
+3
+6
+19
+39
+65
+92
+120
+134
+145
+153
+159
+171
+181
+190
+196
+197
+195
+190
+186
+184
+183
+176
+160
+151
+147
+147
+149
+157
+172
+191
+209
+217
+216
+215
+213
+213
+216
+218
+219
+220
+220
+220
+221
+220
+217
+212
+200
+191
+185
+180
+179
+177
+176
+172
+166
+159
+157
+166
+187
+210
+225
+228
+227
+227
+227
+227
+226
+226
+226
+226
+227
+227
+227
+227
+227
+227
+227
+226
+226
+226
+225
+225
+224
+224
+224
+224
+224
+223
+221
+217
+211
+203
+197
+194
+191
+191
+192
+194
+197
+200
+204
+208
+210
+212
+214
+214
+213
+211
+209
+206
+202
+197
+192
+188
+184
+181
+180
+179
+180
+182
+184
+189
+192
+195
+199
+203
+207
+210
+211
+206
+194
+161
+134
+114
+101
+97
+99
+104
+108
+113
+117
+121
+124
+128
+132
+136
+143
+148
+152
+156
+160
+165
+170
+174
+178
+182
+186
+190
+192
+195
+197
+199
+200
+201
+202
+203
+204
+204
+204
+205
+205
+206
+206
+206
+207
+207
+207
+207
+207
+207
+208
+208
+208
+208
+208
+209
+209
+209
+209
+209
+209
+209
+209
+209
+208
+208
+207
+206
+205
+204
+204
+202
+200
+199
+197
+194
+191
+190
+188
+180
+164
+158
+164
+175
+183
+183
+177
+158
+115
+64
+19
+2
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+206
+220
+225
+225
+225
+222
+221
+222
+224
+225
+224
+224
+224
+224
+225
+224
+222
+217
+212
+210
+214
+222
+229
+233
+235
+234
+233
+227
+210
+180
+95
+48
+22
+11
+6
+4
+4
+4
+4
+5
+18
+45
+75
+104
+126
+143
+151
+159
+166
+175
+187
+194
+198
+198
+196
+193
+187
+185
+184
+183
+170
+155
+148
+147
+147
+148
+156
+173
+194
+213
+216
+215
+212
+211
+211
+215
+217
+219
+219
+220
+220
+221
+221
+220
+217
+207
+197
+189
+183
+179
+177
+176
+173
+169
+161
+157
+159
+173
+195
+218
+226
+227
+227
+227
+227
+226
+226
+226
+226
+226
+226
+226
+226
+226
+226
+225
+225
+225
+225
+225
+224
+224
+224
+224
+224
+223
+221
+217
+211
+205
+197
+193
+191
+190
+191
+195
+199
+202
+206
+209
+212
+213
+214
+215
+214
+213
+211
+209
+206
+204
+201
+198
+196
+194
+193
+192
+192
+193
+194
+196
+199
+201
+203
+206
+209
+211
+208
+199
+183
+159
+121
+106
+100
+100
+102
+108
+114
+118
+122
+125
+130
+134
+139
+145
+150
+157
+161
+166
+170
+174
+179
+183
+187
+191
+194
+198
+200
+201
+202
+203
+203
+203
+203
+204
+204
+204
+204
+204
+204
+204
+204
+204
+205
+205
+205
+206
+206
+207
+207
+207
+208
+208
+208
+208
+209
+209
+209
+209
+210
+210
+210
+210
+210
+210
+210
+209
+209
+208
+207
+206
+205
+203
+201
+199
+196
+192
+191
+188
+180
+165
+161
+168
+177
+184
+182
+176
+152
+106
+55
+15
+2
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+205
+219
+225
+225
+225
+222
+221
+221
+222
+224
+225
+225
+225
+225
+225
+222
+218
+215
+213
+212
+219
+228
+233
+235
+235
+234
+230
+207
+161
+88
+28
+15
+7
+4
+3
+3
+3
+3
+5
+10
+44
+81
+110
+130
+144
+157
+166
+174
+183
+191
+198
+199
+199
+197
+194
+188
+185
+184
+184
+183
+162
+151
+147
+147
+147
+148
+156
+174
+197
+214
+216
+213
+210
+207
+208
+213
+216
+217
+219
+220
+220
+221
+221
+221
+221
+215
+205
+195
+187
+180
+177
+176
+174
+171
+165
+157
+156
+161
+176
+203
+224
+226
+227
+227
+227
+226
+226
+226
+226
+226
+226
+225
+225
+225
+225
+225
+225
+225
+225
+225
+224
+224
+224
+224
+224
+222
+216
+209
+202
+196
+190
+188
+188
+190
+192
+197
+200
+204
+207
+210
+212
+213
+214
+214
+213
+212
+210
+208
+205
+203
+201
+200
+199
+198
+197
+197
+198
+199
+201
+203
+206
+208
+210
+211
+212
+208
+193
+166
+136
+111
+102
+102
+104
+108
+114
+119
+122
+125
+128
+133
+140
+146
+152
+158
+163
+170
+176
+181
+187
+191
+196
+199
+200
+201
+202
+202
+203
+203
+204
+204
+204
+203
+203
+202
+202
+201
+201
+201
+200
+200
+199
+199
+199
+200
+201
+202
+203
+204
+205
+206
+207
+207
+208
+208
+208
+209
+209
+209
+210
+210
+210
+210
+211
+211
+211
+211
+211
+210
+209
+209
+207
+206
+204
+201
+198
+193
+192
+188
+180
+166
+164
+172
+180
+184
+182
+175
+145
+97
+47
+11
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+198
+216
+224
+225
+226
+222
+221
+221
+221
+221
+221
+221
+221
+220
+219
+217
+217
+217
+220
+225
+232
+234
+234
+234
+232
+216
+166
+106
+52
+21
+8
+4
+3
+2
+2
+3
+3
+5
+15
+39
+91
+117
+137
+152
+166
+180
+187
+193
+197
+199
+200
+199
+197
+193
+191
+186
+185
+185
+184
+180
+155
+149
+147
+147
+147
+148
+155
+176
+200
+216
+216
+210
+205
+202
+203
+208
+211
+214
+216
+218
+219
+220
+221
+221
+222
+220
+215
+207
+197
+187
+179
+177
+175
+173
+171
+161
+157
+156
+160
+171
+205
+219
+225
+227
+227
+226
+226
+226
+226
+226
+226
+225
+225
+225
+225
+225
+225
+225
+224
+224
+224
+223
+222
+220
+216
+207
+200
+194
+190
+187
+186
+186
+187
+189
+191
+195
+197
+199
+201
+202
+204
+204
+204
+204
+204
+203
+203
+202
+202
+202
+201
+201
+201
+201
+202
+204
+206
+207
+208
+208
+209
+209
+207
+201
+186
+149
+125
+111
+105
+104
+106
+111
+116
+121
+125
+132
+137
+144
+150
+157
+165
+171
+177
+182
+188
+194
+197
+199
+200
+201
+201
+202
+202
+202
+201
+199
+198
+196
+194
+192
+188
+184
+181
+177
+174
+171
+170
+169
+168
+168
+168
+169
+171
+173
+176
+180
+184
+187
+191
+195
+200
+202
+205
+206
+208
+209
+209
+209
+210
+210
+210
+210
+211
+212
+212
+212
+212
+212
+211
+211
+210
+208
+207
+204
+200
+194
+192
+188
+180
+168
+167
+176
+182
+184
+182
+171
+134
+84
+36
+7
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+189
+211
+221
+224
+226
+224
+223
+222
+221
+221
+221
+221
+221
+221
+221
+221
+223
+226
+228
+230
+233
+232
+227
+215
+191
+127
+80
+45
+21
+9
+4
+2
+2
+2
+2
+2
+4
+14
+36
+73
+117
+139
+157
+171
+182
+191
+194
+197
+199
+200
+199
+197
+195
+193
+190
+186
+186
+186
+183
+176
+152
+150
+149
+149
+148
+149
+156
+178
+203
+216
+215
+208
+202
+198
+198
+202
+206
+209
+211
+214
+216
+218
+220
+220
+221
+221
+219
+214
+207
+196
+184
+179
+176
+174
+172
+166
+160
+157
+157
+160
+178
+201
+215
+223
+226
+226
+226
+225
+225
+225
+225
+225
+225
+225
+224
+224
+224
+223
+223
+222
+219
+216
+212
+208
+202
+196
+192
+189
+187
+186
+186
+186
+188
+189
+191
+193
+195
+196
+198
+199
+200
+201
+201
+202
+202
+202
+202
+203
+203
+203
+204
+205
+206
+206
+207
+207
+207
+207
+207
+206
+200
+187
+171
+153
+136
+120
+114
+111
+112
+116
+121
+126
+130
+134
+139
+146
+152
+159
+166
+174
+183
+188
+191
+194
+196
+199
+200
+200
+199
+198
+196
+192
+188
+184
+179
+172
+167
+162
+158
+154
+151
+149
+147
+145
+143
+141
+140
+139
+139
+139
+141
+142
+144
+146
+149
+154
+158
+163
+169
+175
+184
+189
+195
+199
+203
+206
+208
+209
+210
+210
+210
+210
+211
+211
+212
+213
+213
+212
+212
+212
+211
+210
+208
+206
+201
+195
+193
+187
+179
+169
+170
+179
+183
+184
+181
+168
+124
+73
+29
+5
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+175
+202
+215
+221
+225
+224
+224
+223
+223
+222
+222
+222
+223
+223
+224
+225
+226
+228
+229
+228
+222
+205
+181
+149
+111
+56
+30
+14
+6
+3
+2
+1
+2
+2
+2
+3
+8
+30
+64
+104
+141
+160
+174
+185
+192
+196
+198
+199
+200
+199
+198
+196
+194
+192
+190
+186
+187
+187
+183
+173
+152
+152
+152
+151
+149
+149
+157
+180
+205
+216
+214
+205
+198
+194
+192
+195
+199
+202
+205
+208
+212
+215
+217
+218
+220
+221
+220
+218
+214
+206
+193
+185
+180
+176
+173
+170
+164
+159
+156
+155
+162
+178
+196
+211
+221
+225
+225
+225
+225
+224
+224
+223
+223
+222
+221
+220
+219
+218
+216
+214
+210
+207
+203
+199
+195
+191
+189
+188
+187
+186
+187
+188
+189
+191
+192
+195
+196
+198
+199
+200
+202
+202
+203
+204
+205
+206
+206
+206
+207
+207
+208
+208
+208
+208
+207
+205
+202
+197
+189
+180
+164
+151
+138
+126
+117
+113
+115
+117
+120
+125
+132
+138
+144
+150
+157
+167
+173
+179
+184
+189
+194
+196
+197
+198
+197
+193
+190
+185
+180
+175
+168
+163
+158
+154
+149
+144
+140
+137
+134
+132
+130
+129
+128
+128
+127
+126
+125
+125
+125
+125
+125
+126
+127
+129
+131
+134
+138
+142
+148
+154
+164
+172
+180
+188
+194
+201
+204
+207
+209
+210
+210
+210
+211
+211
+212
+213
+213
+213
+213
+213
+212
+211
+210
+207
+202
+195
+193
+187
+179
+171
+173
+181
+184
+184
+180
+163
+113
+63
+23
+4
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+157
+188
+204
+212
+220
+222
+223
+223
+223
+223
+223
+223
+224
+224
+224
+223
+221
+217
+210
+199
+176
+145
+108
+69
+34
+11
+6
+3
+1
+1
+1
+1
+1
+1
+1
+4
+19
+54
+95
+131
+161
+177
+187
+194
+197
+198
+199
+200
+199
+199
+197
+195
+194
+193
+190
+188
+188
+188
+183
+170
+154
+155
+155
+154
+150
+149
+158
+183
+207
+216
+213
+203
+195
+190
+186
+187
+191
+193
+196
+200
+204
+209
+212
+215
+217
+220
+220
+220
+219
+215
+204
+194
+186
+180
+175
+172
+168
+163
+158
+155
+153
+160
+173
+190
+207
+220
+222
+223
+224
+223
+222
+221
+220
+219
+218
+216
+214
+212
+210
+207
+203
+200
+197
+195
+193
+191
+191
+190
+190
+191
+192
+193
+195
+197
+198
+201
+202
+203
+205
+206
+207
+207
+208
+208
+209
+209
+210
+210
+209
+209
+207
+206
+203
+200
+196
+188
+181
+171
+159
+145
+129
+122
+118
+116
+117
+120
+124
+129
+134
+139
+148
+154
+162
+170
+178
+187
+191
+195
+196
+197
+195
+193
+190
+186
+181
+173
+166
+159
+152
+145
+138
+133
+130
+127
+125
+124
+123
+123
+122
+122
+121
+121
+121
+121
+121
+121
+121
+121
+121
+120
+119
+119
+119
+119
+120
+122
+124
+127
+130
+135
+145
+154
+163
+173
+182
+192
+198
+203
+206
+209
+209
+210
+210
+211
+212
+213
+213
+214
+214
+214
+213
+212
+211
+208
+202
+196
+193
+186
+178
+173
+175
+183
+185
+183
+179
+155
+102
+53
+17
+3
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+138
+167
+185
+197
+209
+215
+218
+220
+220
+221
+221
+221
+221
+220
+218
+212
+202
+183
+157
+123
+72
+42
+22
+10
+3
+2
+1
+1
+1
+1
+1
+1
+1
+1
+1
+8
+40
+83
+125
+154
+179
+190
+195
+197
+197
+199
+199
+199
+199
+198
+197
+196
+195
+194
+191
+189
+190
+189
+183
+168
+157
+158
+159
+157
+151
+150
+160
+185
+209
+215
+211
+201
+192
+186
+180
+179
+181
+182
+185
+189
+194
+200
+204
+208
+212
+217
+218
+220
+220
+219
+215
+206
+196
+187
+179
+174
+172
+168
+163
+156
+153
+152
+154
+162
+179
+206
+215
+221
+224
+223
+223
+221
+220
+219
+217
+214
+212
+210
+208
+206
+202
+200
+198
+196
+195
+195
+195
+197
+199
+201
+205
+207
+209
+211
+212
+213
+214
+214
+214
+214
+213
+213
+213
+212
+211
+210
+210
+209
+207
+205
+201
+195
+186
+176
+163
+146
+135
+127
+122
+119
+117
+117
+118
+120
+124
+133
+140
+148
+157
+165
+176
+183
+189
+193
+195
+197
+197
+197
+196
+193
+184
+174
+163
+152
+142
+133
+128
+126
+124
+123
+122
+122
+122
+121
+121
+121
+122
+122
+122
+123
+123
+123
+123
+123
+123
+123
+122
+122
+121
+121
+120
+119
+118
+118
+117
+117
+117
+118
+120
+122
+128
+136
+145
+156
+166
+180
+189
+196
+202
+206
+209
+209
+210
+211
+212
+213
+213
+214
+214
+214
+214
+213
+212
+209
+203
+197
+193
+186
+178
+174
+179
+185
+185
+182
+177
+146
+89
+43
+12
+2
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+114
+131
+144
+154
+166
+173
+177
+180
+180
+178
+172
+165
+154
+139
+121
+92
+70
+50
+34
+21
+10
+6
+3
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+3
+23
+78
+122
+155
+176
+193
+195
+196
+197
+197
+199
+199
+199
+199
+198
+198
+198
+197
+195
+192
+191
+192
+191
+184
+169
+163
+164
+164
+160
+151
+150
+164
+188
+210
+215
+209
+198
+189
+182
+173
+169
+167
+166
+167
+170
+175
+181
+187
+193
+199
+207
+211
+215
+218
+219
+219
+216
+211
+203
+193
+181
+176
+173
+170
+167
+158
+154
+151
+150
+150
+158
+174
+191
+206
+217
+220
+221
+221
+220
+219
+218
+216
+215
+214
+213
+212
+211
+211
+212
+213
+214
+214
+215
+215
+216
+216
+216
+215
+215
+215
+214
+213
+213
+212
+210
+208
+205
+202
+198
+193
+185
+177
+169
+161
+153
+141
+135
+130
+127
+125
+124
+124
+125
+126
+128
+133
+138
+144
+149
+154
+159
+165
+171
+178
+185
+191
+194
+197
+197
+196
+188
+177
+164
+151
+139
+129
+125
+123
+122
+121
+121
+121
+121
+121
+122
+124
+126
+128
+130
+132
+136
+138
+141
+143
+146
+148
+148
+148
+148
+146
+144
+141
+139
+135
+132
+127
+124
+122
+120
+118
+116
+115
+115
+115
+115
+117
+121
+127
+135
+145
+161
+172
+183
+192
+200
+205
+207
+209
+210
+211
+212
+213
+214
+214
+215
+214
+214
+213
+210
+203
+197
+193
+185
+178
+176
+182
+186
+185
+181
+174
+130
+72
+31
+7
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+102
+110
+115
+119
+123
+125
+122
+120
+115
+109
+100
+94
+86
+77
+67
+54
+44
+34
+25
+17
+9
+5
+3
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+3
+7
+48
+105
+144
+170
+186
+195
+195
+196
+196
+197
+199
+199
+199
+199
+199
+200
+200
+198
+196
+193
+193
+194
+192
+186
+172
+168
+168
+167
+161
+150
+150
+166
+191
+211
+214
+208
+197
+188
+180
+170
+163
+159
+156
+155
+156
+158
+163
+169
+175
+182
+192
+199
+205
+211
+215
+218
+217
+215
+211
+206
+195
+186
+179
+174
+171
+166
+161
+157
+153
+150
+150
+155
+160
+167
+179
+194
+203
+210
+214
+215
+216
+216
+215
+215
+214
+214
+213
+213
+213
+213
+213
+213
+213
+212
+212
+210
+208
+205
+202
+198
+192
+187
+183
+178
+173
+167
+163
+158
+154
+150
+146
+143
+140
+137
+134
+131
+130
+128
+128
+127
+128
+130
+132
+136
+140
+146
+153
+161
+169
+177
+187
+191
+195
+197
+198
+194
+186
+175
+164
+153
+142
+136
+131
+127
+124
+122
+121
+121
+122
+123
+126
+129
+134
+139
+144
+152
+157
+162
+167
+171
+175
+178
+179
+180
+181
+182
+182
+181
+180
+179
+176
+173
+169
+164
+159
+151
+145
+138
+131
+125
+120
+117
+114
+113
+113
+113
+115
+119
+124
+133
+147
+159
+171
+182
+192
+201
+204
+207
+208
+210
+212
+213
+214
+215
+215
+215
+214
+213
+210
+203
+198
+191
+184
+178
+178
+185
+186
+184
+179
+170
+115
+59
+23
+5
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+94
+97
+98
+97
+95
+92
+88
+84
+80
+75
+69
+65
+61
+56
+51
+47
+42
+35
+28
+21
+12
+6
+3
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+5
+13
+76
+130
+162
+180
+192
+195
+195
+195
+196
+197
+199
+199
+199
+199
+200
+201
+201
+199
+197
+194
+195
+195
+194
+189
+177
+172
+172
+169
+161
+150
+150
+169
+193
+211
+214
+208
+196
+187
+178
+168
+159
+154
+148
+145
+144
+144
+147
+151
+157
+163
+174
+181
+190
+198
+205
+213
+215
+216
+215
+213
+206
+198
+190
+182
+176
+171
+168
+164
+159
+155
+151
+149
+148
+149
+154
+165
+171
+178
+183
+187
+193
+195
+197
+198
+199
+200
+199
+199
+198
+196
+194
+192
+190
+187
+184
+180
+176
+172
+169
+165
+160
+157
+153
+150
+146
+142
+140
+137
+135
+133
+132
+131
+130
+130
+130
+131
+132
+133
+135
+137
+142
+148
+154
+161
+167
+176
+182
+187
+192
+196
+197
+193
+187
+179
+171
+161
+152
+144
+135
+128
+123
+121
+120
+120
+121
+124
+128
+132
+138
+144
+152
+159
+165
+171
+176
+182
+186
+190
+193
+196
+198
+199
+200
+200
+201
+201
+201
+200
+200
+199
+197
+195
+192
+188
+184
+177
+169
+161
+152
+142
+131
+124
+118
+114
+112
+111
+111
+113
+117
+123
+135
+147
+159
+172
+184
+195
+200
+204
+207
+209
+211
+213
+214
+215
+215
+215
+215
+213
+209
+203
+198
+190
+183
+179
+180
+187
+186
+183
+176
+163
+99
+47
+17
+3
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+89
+89
+89
+87
+83
+75
+71
+68
+66
+65
+64
+64
+63
+62
+61
+58
+54
+47
+39
+30
+16
+8
+3
+1
+1
+1
+1
+1
+1
+1
+1
+1
+2
+8
+22
+104
+151
+175
+187
+195
+195
+194
+194
+195
+198
+200
+199
+199
+200
+201
+203
+202
+200
+197
+196
+197
+197
+196
+191
+181
+176
+175
+169
+160
+149
+150
+172
+195
+212
+214
+208
+196
+186
+178
+168
+157
+151
+144
+138
+135
+132
+133
+136
+139
+144
+153
+161
+169
+179
+189
+201
+208
+212
+214
+214
+213
+209
+203
+195
+186
+178
+174
+170
+167
+163
+157
+153
+150
+147
+145
+145
+146
+148
+151
+156
+163
+167
+170
+172
+173
+174
+174
+173
+171
+169
+166
+163
+160
+156
+152
+147
+144
+141
+139
+137
+135
+134
+133
+133
+132
+132
+132
+132
+132
+133
+133
+134
+135
+136
+137
+141
+144
+148
+153
+159
+167
+174
+182
+189
+196
+201
+201
+199
+195
+191
+181
+170
+158
+145
+133
+124
+120
+118
+118
+118
+120
+122
+125
+129
+134
+142
+149
+158
+166
+174
+184
+191
+196
+199
+202
+205
+206
+207
+207
+208
+208
+209
+209
+209
+209
+209
+209
+209
+209
+209
+208
+207
+206
+204
+202
+197
+191
+184
+175
+164
+149
+137
+127
+119
+114
+110
+109
+110
+112
+115
+125
+135
+148
+161
+174
+188
+196
+201
+205
+207
+210
+212
+214
+215
+215
+215
+215
+213
+209
+203
+197
+188
+182
+180
+182
+188
+186
+182
+173
+154
+82
+36
+12
+2
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+85
+86
+86
+85
+83
+74
+70
+67
+65
+65
+69
+73
+77
+80
+82
+78
+72
+64
+54
+41
+22
+11
+4
+1
+1
+1
+1
+1
+1
+1
+1
+1
+3
+12
+36
+129
+164
+182
+190
+196
+194
+192
+193
+195
+198
+200
+199
+199
+200
+202
+204
+203
+200
+198
+198
+199
+199
+197
+193
+185
+179
+176
+168
+158
+149
+150
+174
+197
+212
+213
+208
+196
+187
+178
+168
+157
+150
+142
+135
+131
+126
+124
+124
+125
+127
+132
+138
+146
+155
+165
+182
+194
+204
+212
+214
+215
+214
+213
+210
+204
+190
+181
+175
+171
+168
+166
+163
+160
+157
+152
+147
+145
+143
+142
+142
+141
+142
+142
+142
+142
+142
+142
+141
+141
+140
+139
+138
+137
+136
+136
+136
+135
+135
+135
+134
+134
+134
+134
+134
+134
+135
+135
+136
+137
+138
+141
+144
+147
+151
+155
+163
+171
+179
+187
+195
+203
+207
+210
+212
+211
+201
+185
+169
+153
+140
+128
+123
+119
+116
+115
+115
+115
+116
+117
+119
+125
+133
+143
+155
+167
+182
+191
+197
+201
+204
+206
+207
+208
+208
+209
+209
+209
+209
+209
+210
+210
+210
+210
+210
+210
+210
+210
+210
+210
+210
+210
+210
+210
+210
+210
+208
+206
+201
+195
+186
+171
+157
+142
+129
+119
+111
+108
+108
+108
+110
+116
+126
+137
+150
+164
+181
+190
+198
+202
+206
+209
+212
+214
+215
+215
+215
+215
+213
+208
+203
+195
+187
+182
+182
+184
+189
+185
+180
+168
+142
+66
+26
+7
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+83
+84
+85
+85
+84
+77
+73
+71
+71
+74
+94
+102
+106
+106
+105
+95
+86
+74
+60
+45
+25
+12
+5
+1
+1
+1
+1
+1
+1
+1
+1
+1
+4
+19
+55
+150
+175
+187
+192
+196
+193
+191
+192
+194
+198
+198
+198
+199
+201
+204
+205
+203
+201
+201
+201
+202
+202
+199
+194
+187
+178
+173
+164
+155
+148
+150
+176
+198
+212
+213
+209
+200
+190
+180
+172
+160
+152
+144
+137
+131
+126
+122
+120
+119
+118
+119
+120
+122
+126
+131
+143
+155
+170
+184
+199
+210
+213
+214
+214
+214
+212
+206
+198
+188
+179
+172
+169
+166
+165
+163
+160
+158
+156
+153
+151
+149
+147
+146
+145
+144
+143
+142
+142
+141
+140
+140
+140
+140
+140
+140
+140
+140
+141
+142
+143
+143
+144
+145
+147
+149
+152
+154
+157
+161
+167
+175
+182
+189
+195
+201
+208
+211
+213
+214
+213
+199
+180
+162
+146
+136
+129
+124
+121
+118
+116
+114
+113
+113
+113
+114
+117
+124
+134
+146
+161
+180
+190
+197
+202
+205
+207
+207
+208
+208
+209
+209
+209
+209
+209
+210
+210
+210
+210
+210
+210
+210
+210
+210
+210
+210
+210
+210
+210
+210
+211
+211
+211
+211
+211
+211
+211
+210
+210
+208
+204
+194
+182
+167
+150
+134
+117
+110
+107
+106
+106
+109
+116
+126
+138
+151
+170
+183
+192
+199
+204
+208
+211
+213
+215
+216
+216
+215
+212
+207
+202
+192
+185
+183
+183
+187
+189
+184
+177
+159
+121
+45
+16
+4
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+83
+85
+86
+87
+86
+82
+79
+78
+81
+91
+112
+116
+117
+116
+111
+99
+87
+72
+57
+40
+23
+11
+4
+1
+1
+1
+1
+1
+1
+1
+1
+1
+5
+23
+64
+157
+177
+187
+192
+196
+193
+191
+191
+192
+195
+196
+197
+200
+203
+206
+206
+204
+203
+203
+204
+204
+202
+198
+191
+182
+172
+167
+160
+153
+148
+150
+175
+197
+211
+213
+210
+203
+196
+188
+179
+167
+158
+150
+143
+137
+130
+126
+123
+121
+119
+118
+118
+118
+119
+121
+125
+130
+138
+149
+163
+183
+195
+205
+211
+214
+214
+212
+209
+205
+200
+191
+184
+177
+172
+168
+164
+162
+160
+159
+157
+155
+153
+152
+151
+150
+149
+149
+149
+149
+148
+148
+148
+148
+148
+148
+149
+149
+150
+151
+153
+156
+159
+163
+168
+173
+180
+185
+190
+195
+199
+203
+205
+207
+208
+206
+188
+171
+159
+152
+149
+144
+139
+133
+128
+123
+119
+115
+112
+111
+111
+111
+113
+119
+128
+139
+157
+169
+179
+187
+193
+200
+203
+205
+207
+208
+208
+209
+209
+209
+210
+210
+211
+211
+211
+212
+212
+212
+213
+213
+213
+213
+213
+213
+213
+212
+212
+212
+212
+211
+211
+211
+211
+211
+211
+211
+211
+211
+210
+210
+208
+203
+195
+182
+167
+149
+126
+115
+108
+105
+104
+106
+111
+119
+130
+142
+163
+177
+188
+196
+202
+207
+211
+213
+215
+216
+216
+215
+211
+206
+201
+190
+185
+183
+185
+189
+188
+182
+172
+148
+101
+31
+11
+2
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+83
+86
+89
+90
+90
+87
+85
+85
+91
+107
+124
+126
+126
+122
+114
+99
+83
+66
+50
+35
+18
+9
+3
+1
+1
+1
+1
+1
+1
+1
+1
+1
+5
+24
+68
+158
+177
+187
+192
+196
+194
+192
+191
+191
+193
+196
+198
+202
+206
+207
+207
+205
+205
+206
+206
+204
+199
+191
+181
+170
+164
+161
+156
+151
+147
+149
+173
+194
+209
+211
+210
+206
+201
+195
+189
+178
+170
+162
+155
+148
+139
+134
+130
+126
+123
+120
+118
+117
+117
+117
+117
+119
+122
+127
+135
+150
+163
+177
+190
+201
+209
+212
+213
+213
+211
+205
+200
+195
+190
+185
+178
+174
+171
+169
+166
+164
+162
+161
+160
+159
+158
+157
+157
+156
+157
+157
+158
+159
+161
+162
+166
+169
+172
+175
+178
+183
+186
+190
+193
+197
+201
+204
+205
+202
+193
+173
+167
+165
+164
+163
+153
+142
+135
+129
+126
+123
+120
+116
+113
+110
+109
+107
+108
+112
+118
+131
+142
+154
+164
+175
+188
+195
+201
+204
+206
+208
+208
+209
+209
+210
+210
+211
+211
+212
+213
+213
+214
+214
+214
+215
+215
+215
+215
+215
+216
+216
+216
+215
+215
+215
+215
+214
+214
+213
+213
+212
+212
+212
+211
+211
+211
+211
+211
+211
+210
+208
+203
+194
+181
+164
+137
+121
+111
+105
+103
+104
+108
+114
+123
+135
+155
+171
+184
+194
+201
+207
+210
+213
+215
+216
+216
+215
+210
+205
+199
+188
+185
+184
+186
+190
+186
+180
+165
+135
+82
+20
+7
+2
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+83
+89
+93
+95
+96
+93
+92
+94
+103
+122
+132
+133
+131
+124
+113
+93
+74
+56
+41
+28
+14
+6
+2
+1
+1
+1
+1
+1
+1
+1
+1
+1
+5
+23
+66
+156
+175
+185
+191
+196
+196
+193
+192
+192
+194
+197
+201
+205
+208
+208
+208
+208
+208
+207
+206
+199
+188
+175
+163
+154
+154
+155
+154
+150
+146
+147
+168
+190
+206
+209
+209
+208
+205
+202
+199
+191
+185
+178
+171
+165
+154
+148
+142
+137
+132
+126
+123
+120
+118
+117
+116
+116
+116
+117
+118
+123
+132
+144
+159
+174
+191
+200
+206
+210
+212
+213
+213
+211
+208
+203
+197
+192
+188
+184
+182
+178
+177
+175
+174
+173
+172
+171
+171
+172
+172
+174
+176
+178
+180
+183
+187
+192
+196
+200
+204
+207
+206
+203
+199
+194
+189
+186
+183
+176
+162
+132
+125
+122
+122
+122
+124
+124
+123
+121
+117
+113
+109
+106
+103
+103
+108
+114
+122
+133
+145
+165
+180
+191
+199
+203
+206
+207
+208
+208
+209
+210
+210
+211
+211
+212
+213
+214
+214
+215
+216
+216
+217
+217
+217
+217
+218
+218
+218
+218
+218
+218
+218
+217
+217
+217
+217
+217
+216
+216
+215
+214
+214
+213
+212
+212
+211
+211
+211
+211
+210
+210
+208
+203
+193
+177
+149
+129
+115
+106
+102
+102
+105
+110
+118
+128
+149
+166
+181
+192
+200
+206
+210
+213
+215
+216
+217
+214
+209
+203
+196
+186
+185
+185
+188
+191
+184
+177
+156
+119
+62
+12
+4
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+84
+93
+99
+102
+102
+99
+98
+105
+117
+134
+139
+138
+132
+121
+107
+80
+60
+44
+31
+18
+10
+4
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+4
+20
+58
+150
+171
+182
+189
+197
+198
+197
+195
+195
+196
+202
+206
+209
+210
+210
+210
+210
+209
+207
+203
+185
+165
+149
+138
+132
+144
+150
+151
+149
+145
+145
+162
+184
+203
+207
+208
+208
+207
+206
+206
+203
+201
+197
+192
+186
+176
+168
+160
+153
+146
+138
+132
+128
+124
+120
+117
+116
+115
+115
+115
+115
+116
+118
+123
+132
+152
+169
+184
+197
+206
+212
+214
+214
+214
+214
+214
+213
+211
+208
+204
+200
+198
+196
+195
+195
+197
+198
+200
+201
+202
+205
+207
+209
+210
+211
+212
+213
+213
+212
+212
+208
+198
+181
+160
+138
+117
+110
+108
+111
+119
+129
+136
+138
+138
+133
+126
+118
+109
+100
+96
+93
+94
+95
+99
+106
+127
+149
+169
+186
+197
+203
+205
+207
+207
+208
+208
+209
+209
+210
+211
+212
+213
+214
+215
+216
+217
+217
+217
+218
+218
+218
+218
+218
+218
+218
+218
+218
+218
+218
+218
+218
+218
+218
+218
+218
+218
+218
+218
+218
+217
+217
+216
+215
+214
+213
+212
+211
+211
+211
+211
+210
+210
+207
+201
+189
+162
+139
+121
+108
+102
+100
+103
+107
+113
+122
+143
+163
+179
+191
+199
+206
+211
+214
+215
+216
+217
+213
+207
+201
+193
+186
+185
+187
+189
+191
+182
+173
+145
+101
+43
+7
+2
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+85
+99
+106
+109
+109
+108
+110
+120
+133
+143
+144
+138
+128
+111
+87
+55
+42
+29
+19
+10
+4
+2
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+3
+14
+43
+133
+160
+173
+181
+192
+199
+200
+201
+202
+204
+209
+210
+211
+211
+211
+211
+209
+205
+194
+176
+141
+120
+108
+103
+103
+128
+142
+148
+148
+144
+142
+150
+172
+193
+201
+204
+206
+207
+207
+207
+207
+207
+207
+207
+206
+202
+197
+190
+183
+175
+165
+157
+150
+143
+136
+130
+125
+121
+119
+116
+115
+114
+114
+114
+114
+117
+120
+127
+136
+149
+167
+180
+192
+201
+208
+213
+216
+218
+220
+221
+221
+220
+219
+218
+217
+215
+215
+215
+215
+215
+214
+213
+212
+209
+205
+193
+175
+156
+137
+122
+106
+105
+108
+116
+129
+144
+148
+149
+149
+145
+137
+124
+111
+99
+92
+90
+89
+89
+90
+93
+102
+118
+139
+162
+183
+197
+202
+205
+206
+207
+208
+208
+209
+209
+210
+211
+213
+214
+215
+216
+217
+217
+217
+218
+218
+218
+218
+218
+218
+218
+219
+219
+219
+219
+219
+219
+219
+219
+219
+219
+219
+219
+219
+219
+219
+219
+219
+219
+218
+218
+218
+218
+217
+216
+215
+214
+212
+212
+211
+211
+210
+210
+210
+207
+200
+176
+151
+130
+113
+102
+99
+101
+104
+108
+116
+139
+160
+177
+190
+199
+207
+211
+214
+216
+217
+216
+211
+205
+197
+190
+186
+186
+189
+190
+189
+178
+163
+124
+73
+23
+3
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+86
+102
+110
+113
+114
+115
+121
+131
+141
+147
+145
+134
+116
+94
+72
+53
+39
+25
+15
+8
+3
+2
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+2
+9
+29
+114
+148
+163
+169
+177
+196
+202
+204
+206
+209
+211
+212
+212
+212
+211
+209
+202
+187
+166
+140
+116
+105
+98
+95
+95
+110
+132
+142
+145
+144
+140
+142
+159
+179
+191
+196
+201
+204
+205
+205
+207
+207
+208
+208
+208
+207
+205
+202
+198
+192
+183
+176
+169
+161
+154
+145
+140
+135
+130
+127
+122
+119
+117
+115
+114
+114
+115
+117
+119
+123
+129
+135
+142
+150
+159
+169
+176
+183
+188
+193
+196
+199
+200
+202
+202
+201
+198
+192
+184
+174
+160
+152
+144
+137
+130
+125
+124
+127
+131
+136
+142
+144
+145
+146
+149
+149
+141
+131
+120
+109
+101
+97
+93
+90
+89
+89
+94
+102
+114
+131
+158
+172
+184
+193
+200
+204
+206
+207
+208
+208
+209
+210
+212
+213
+214
+215
+216
+216
+217
+217
+218
+218
+218
+218
+218
+219
+219
+219
+220
+221
+222
+222
+223
+223
+224
+224
+224
+224
+224
+224
+223
+222
+221
+221
+220
+220
+219
+219
+219
+219
+219
+218
+218
+218
+217
+215
+214
+213
+212
+211
+210
+210
+210
+208
+205
+185
+160
+137
+118
+104
+99
+101
+102
+106
+113
+137
+159
+177
+191
+200
+208
+212
+215
+216
+217
+215
+209
+202
+195
+188
+186
+187
+190
+190
+185
+174
+150
+104
+53
+14
+2
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+87
+105
+114
+117
+118
+122
+131
+141
+147
+150
+143
+126
+106
+87
+71
+57
+44
+30
+17
+9
+3
+2
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+5
+16
+89
+134
+152
+156
+160
+180
+196
+203
+207
+210
+211
+212
+212
+211
+209
+198
+182
+160
+138
+121
+106
+99
+95
+92
+91
+98
+117
+133
+143
+144
+138
+137
+147
+162
+176
+182
+189
+194
+197
+198
+202
+204
+206
+207
+208
+208
+209
+208
+206
+203
+196
+191
+184
+176
+169
+159
+153
+147
+142
+139
+134
+130
+126
+123
+120
+117
+116
+114
+114
+113
+114
+116
+119
+123
+128
+134
+139
+143
+146
+149
+151
+153
+154
+154
+152
+149
+146
+143
+138
+132
+127
+127
+128
+128
+127
+129
+133
+139
+146
+152
+157
+157
+154
+148
+139
+125
+115
+107
+98
+91
+87
+87
+88
+91
+96
+107
+122
+138
+155
+171
+190
+198
+202
+205
+206
+207
+208
+209
+210
+211
+213
+214
+215
+216
+216
+217
+217
+218
+218
+218
+218
+218
+219
+220
+220
+221
+222
+223
+224
+225
+227
+227
+228
+229
+229
+230
+229
+229
+229
+229
+228
+227
+226
+225
+224
+223
+222
+221
+220
+219
+219
+219
+219
+219
+218
+217
+216
+214
+212
+211
+210
+210
+210
+209
+207
+192
+168
+144
+122
+106
+99
+100
+101
+104
+110
+137
+160
+179
+192
+201
+209
+213
+215
+216
+216
+213
+206
+199
+192
+187
+187
+189
+191
+189
+181
+169
+133
+83
+36
+7
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+88
+109
+118
+121
+122
+130
+141
+148
+151
+151
+138
+118
+102
+90
+83
+73
+60
+45
+31
+18
+7
+3
+2
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+2
+7
+59
+115
+140
+146
+145
+157
+180
+194
+202
+207
+209
+209
+208
+205
+199
+178
+155
+135
+120
+114
+108
+104
+101
+98
+93
+93
+104
+122
+138
+143
+137
+133
+135
+143
+156
+163
+170
+176
+180
+182
+189
+193
+196
+200
+203
+205
+207
+209
+209
+208
+205
+201
+196
+190
+182
+173
+166
+159
+153
+149
+145
+142
+138
+135
+131
+126
+123
+120
+118
+117
+115
+114
+114
+114
+114
+114
+114
+115
+115
+115
+114
+114
+114
+113
+112
+111
+111
+112
+113
+115
+123
+132
+140
+148
+153
+159
+161
+163
+163
+162
+156
+149
+140
+129
+114
+96
+90
+87
+86
+86
+88
+91
+96
+105
+117
+140
+160
+177
+192
+200
+205
+206
+207
+208
+208
+209
+210
+212
+213
+214
+216
+217
+217
+217
+217
+218
+218
+218
+218
+219
+219
+220
+221
+222
+223
+225
+226
+227
+229
+230
+231
+232
+232
+233
+233
+233
+233
+233
+233
+233
+232
+231
+231
+230
+228
+227
+225
+224
+222
+221
+220
+219
+219
+219
+219
+218
+217
+215
+213
+212
+211
+210
+210
+210
+209
+197
+175
+150
+127
+107
+99
+99
+100
+103
+109
+138
+162
+180
+194
+203
+210
+214
+216
+216
+216
+211
+203
+196
+190
+187
+187
+190
+191
+187
+177
+160
+112
+62
+22
+4
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+90
+112
+121
+124
+126
+138
+148
+153
+153
+150
+130
+113
+106
+105
+106
+105
+89
+76
+60
+39
+16
+6
+2
+2
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+3
+25
+92
+127
+139
+137
+132
+149
+172
+192
+198
+204
+204
+200
+192
+178
+148
+130
+122
+118
+116
+117
+121
+121
+114
+100
+93
+95
+109
+126
+139
+140
+132
+128
+128
+133
+140
+144
+148
+153
+154
+160
+167
+174
+181
+189
+196
+202
+206
+209
+210
+211
+210
+208
+203
+196
+187
+178
+169
+161
+155
+151
+149
+147
+146
+144
+141
+138
+135
+132
+130
+126
+123
+120
+118
+116
+115
+114
+114
+113
+113
+114
+115
+117
+121
+126
+135
+141
+145
+148
+151
+155
+159
+161
+163
+165
+166
+166
+165
+163
+159
+143
+124
+108
+96
+89
+86
+85
+85
+86
+87
+95
+102
+116
+133
+154
+184
+195
+202
+205
+206
+207
+207
+208
+209
+210
+213
+215
+216
+217
+217
+217
+217
+218
+218
+218
+218
+218
+219
+220
+221
+222
+223
+224
+225
+226
+228
+229
+230
+230
+231
+232
+233
+233
+234
+234
+234
+234
+234
+234
+233
+233
+233
+232
+232
+231
+230
+229
+228
+226
+224
+221
+220
+220
+219
+219
+219
+218
+217
+215
+212
+211
+210
+210
+210
+209
+201
+180
+156
+131
+109
+99
+99
+100
+103
+109
+141
+165
+183
+196
+204
+212
+215
+216
+216
+216
+208
+200
+193
+189
+187
+188
+192
+190
+184
+173
+146
+89
+42
+11
+2
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+93
+116
+126
+128
+131
+145
+153
+156
+154
+146
+124
+120
+121
+124
+125
+119
+110
+103
+92
+73
+49
+27
+12
+3
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+4
+38
+90
+133
+139
+119
+117
+124
+137
+152
+159
+162
+159
+151
+136
+126
+124
+123
+125
+134
+147
+150
+152
+150
+144
+114
+100
+98
+108
+132
+140
+137
+130
+122
+121
+119
+118
+118
+118
+117
+117
+119
+122
+127
+134
+149
+164
+180
+194
+204
+211
+214
+216
+216
+213
+208
+202
+193
+183
+172
+161
+156
+152
+150
+149
+148
+147
+146
+145
+145
+144
+144
+143
+143
+143
+143
+143
+143
+144
+144
+145
+147
+149
+151
+153
+155
+155
+157
+159
+163
+167
+170
+173
+174
+174
+170
+165
+155
+142
+125
+105
+97
+91
+88
+86
+85
+87
+89
+94
+103
+118
+139
+161
+182
+197
+204
+206
+207
+207
+208
+209
+210
+212
+214
+216
+217
+217
+217
+217
+217
+218
+218
+218
+218
+219
+220
+221
+222
+223
+224
+224
+225
+226
+226
+227
+228
+229
+230
+231
+232
+232
+233
+233
+233
+233
+233
+232
+232
+232
+232
+232
+232
+232
+232
+231
+231
+230
+229
+229
+228
+225
+223
+221
+220
+220
+219
+219
+218
+216
+214
+211
+210
+210
+210
+210
+204
+186
+161
+135
+112
+100
+99
+99
+103
+112
+148
+171
+187
+199
+207
+213
+216
+217
+216
+214
+203
+195
+191
+188
+188
+191
+192
+185
+175
+166
+115
+58
+22
+4
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+93
+118
+129
+131
+133
+148
+155
+157
+153
+142
+128
+129
+132
+136
+137
+131
+123
+115
+105
+91
+72
+52
+32
+15
+3
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+2
+14
+51
+97
+135
+130
+117
+113
+117
+126
+138
+140
+138
+134
+129
+126
+126
+130
+137
+144
+150
+152
+154
+154
+154
+142
+122
+106
+101
+112
+137
+138
+132
+124
+120
+117
+114
+113
+112
+112
+110
+110
+110
+110
+111
+114
+122
+134
+149
+166
+188
+200
+207
+212
+214
+213
+211
+207
+201
+194
+179
+171
+164
+158
+154
+152
+150
+149
+148
+148
+147
+147
+146
+146
+146
+146
+147
+147
+148
+149
+150
+152
+154
+157
+159
+163
+166
+169
+172
+174
+176
+177
+177
+175
+171
+161
+149
+137
+124
+112
+99
+93
+89
+87
+86
+88
+93
+100
+110
+124
+152
+173
+188
+198
+204
+206
+207
+208
+208
+210
+212
+214
+215
+216
+217
+217
+217
+217
+217
+218
+218
+218
+219
+220
+221
+222
+222
+223
+223
+224
+224
+225
+225
+225
+226
+227
+228
+229
+229
+230
+230
+230
+230
+229
+229
+229
+229
+228
+228
+229
+229
+229
+230
+230
+230
+230
+230
+230
+229
+228
+227
+225
+223
+221
+220
+220
+219
+219
+217
+214
+212
+211
+210
+210
+210
+205
+188
+164
+137
+113
+100
+99
+99
+104
+117
+155
+176
+191
+202
+209
+214
+216
+216
+215
+210
+199
+193
+189
+188
+189
+192
+192
+182
+168
+153
+85
+38
+12
+2
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+93
+120
+131
+133
+135
+149
+156
+158
+153
+141
+133
+136
+140
+144
+144
+141
+135
+128
+118
+105
+85
+70
+52
+32
+12
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+3
+22
+56
+105
+134
+125
+115
+110
+112
+120
+126
+128
+129
+128
+128
+132
+137
+143
+148
+150
+152
+154
+156
+157
+155
+142
+123
+106
+101
+122
+134
+135
+129
+121
+117
+114
+112
+111
+110
+108
+106
+105
+103
+102
+100
+101
+105
+112
+122
+145
+167
+184
+198
+207
+213
+214
+213
+211
+207
+197
+188
+179
+171
+165
+160
+157
+156
+154
+153
+152
+151
+151
+151
+151
+151
+152
+153
+154
+155
+158
+160
+163
+165
+168
+171
+174
+177
+179
+180
+181
+179
+176
+172
+165
+151
+139
+127
+115
+104
+94
+90
+88
+88
+89
+95
+103
+116
+132
+152
+180
+194
+201
+205
+206
+207
+208
+210
+211
+213
+215
+216
+217
+217
+217
+217
+217
+217
+218
+218
+219
+220
+220
+221
+222
+223
+223
+223
+223
+223
+223
+223
+223
+224
+225
+226
+227
+228
+228
+228
+228
+228
+228
+227
+227
+227
+227
+227
+227
+227
+227
+227
+228
+228
+229
+229
+229
+229
+229
+228
+228
+226
+225
+223
+221
+220
+220
+219
+218
+215
+212
+211
+210
+210
+210
+206
+189
+165
+138
+114
+101
+99
+100
+107
+123
+163
+182
+195
+204
+211
+216
+216
+216
+213
+207
+195
+191
+189
+189
+190
+193
+188
+177
+159
+132
+58
+23
+6
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+93
+121
+132
+135
+137
+149
+156
+158
+153
+141
+137
+142
+147
+149
+150
+149
+145
+139
+130
+117
+95
+81
+67
+50
+27
+4
+2
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+4
+20
+58
+117
+128
+123
+114
+109
+108
+117
+123
+128
+130
+131
+137
+142
+145
+147
+149
+151
+153
+155
+157
+158
+156
+142
+121
+100
+103
+124
+135
+136
+126
+119
+116
+113
+112
+110
+109
+108
+106
+104
+102
+97
+94
+91
+89
+88
+101
+125
+149
+171
+189
+207
+212
+213
+214
+214
+209
+203
+195
+187
+178
+170
+166
+164
+161
+160
+158
+157
+156
+156
+156
+156
+157
+158
+160
+162
+166
+168
+171
+173
+176
+179
+180
+182
+183
+183
+182
+179
+174
+167
+158
+143
+132
+120
+109
+99
+90
+89
+89
+90
+94
+105
+119
+137
+158
+180
+199
+204
+206
+207
+207
+209
+210
+212
+214
+216
+217
+217
+217
+217
+217
+217
+217
+218
+218
+219
+220
+221
+221
+222
+222
+222
+222
+222
+221
+221
+221
+221
+222
+223
+224
+226
+226
+227
+227
+227
+227
+227
+227
+227
+227
+226
+226
+226
+226
+226
+226
+226
+226
+226
+227
+228
+228
+229
+229
+228
+228
+227
+226
+224
+222
+220
+220
+219
+218
+215
+212
+211
+210
+210
+210
+206
+190
+165
+138
+115
+101
+99
+101
+110
+133
+171
+187
+199
+207
+212
+216
+216
+215
+210
+202
+192
+190
+189
+190
+191
+192
+181
+169
+146
+106
+34
+12
+3
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+91
+121
+133
+137
+138
+149
+156
+157
+153
+142
+141
+148
+152
+154
+154
+153
+152
+148
+141
+129
+104
+88
+75
+63
+50
+11
+4
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+2
+7
+65
+114
+131
+128
+117
+106
+107
+115
+125
+132
+137
+140
+142
+144
+145
+146
+148
+150
+154
+157
+159
+158
+155
+142
+111
+93
+107
+127
+140
+137
+123
+120
+117
+114
+113
+113
+112
+112
+110
+108
+100
+95
+90
+85
+81
+77
+85
+105
+130
+157
+191
+205
+211
+213
+215
+213
+211
+207
+201
+192
+182
+176
+171
+169
+167
+164
+163
+162
+161
+161
+161
+162
+163
+165
+167
+169
+171
+174
+177
+179
+183
+185
+186
+187
+186
+183
+178
+172
+163
+153
+138
+125
+112
+101
+94
+90
+90
+92
+96
+102
+119
+140
+162
+183
+200
+205
+206
+207
+208
+209
+211
+214
+216
+217
+217
+217
+217
+217
+217
+217
+217
+218
+219
+219
+220
+221
+221
+221
+222
+221
+221
+220
+219
+219
+219
+220
+221
+222
+223
+225
+226
+226
+227
+227
+227
+227
+227
+227
+227
+227
+227
+227
+226
+226
+226
+226
+226
+226
+226
+226
+226
+227
+227
+228
+228
+228
+227
+226
+225
+223
+221
+220
+220
+218
+215
+212
+211
+210
+210
+210
+206
+189
+165
+138
+115
+101
+100
+103
+116
+144
+179
+193
+203
+209
+215
+216
+216
+213
+207
+197
+190
+189
+189
+191
+193
+191
+174
+157
+129
+74
+16
+5
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+87
+118
+133
+137
+139
+148
+156
+157
+153
+146
+146
+152
+155
+155
+155
+154
+154
+153
+152
+150
+127
+101
+82
+68
+61
+35
+12
+2
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+4
+34
+81
+121
+133
+127
+115
+111
+113
+118
+127
+134
+138
+139
+139
+139
+141
+145
+151
+157
+160
+160
+159
+156
+149
+99
+91
+100
+119
+141
+139
+130
+125
+122
+120
+122
+125
+127
+129
+129
+124
+117
+106
+93
+82
+74
+69
+67
+73
+91
+137
+167
+190
+204
+212
+215
+213
+213
+211
+207
+198
+189
+182
+176
+172
+169
+167
+165
+164
+163
+164
+165
+166
+169
+171
+176
+179
+182
+184
+186
+188
+188
+188
+188
+187
+182
+176
+169
+159
+148
+131
+118
+107
+98
+93
+91
+93
+97
+105
+118
+147
+170
+189
+202
+206
+207
+207
+209
+210
+212
+216
+216
+217
+217
+217
+217
+217
+217
+217
+217
+218
+219
+219
+220
+220
+220
+220
+220
+219
+218
+217
+218
+218
+219
+219
+220
+222
+223
+225
+225
+226
+226
+226
+227
+227
+227
+227
+227
+227
+227
+227
+227
+227
+227
+227
+227
+226
+226
+226
+226
+226
+226
+226
+227
+227
+227
+227
+226
+225
+224
+222
+221
+220
+218
+215
+212
+211
+210
+210
+210
+206
+187
+161
+135
+114
+101
+102
+109
+128
+162
+189
+199
+207
+213
+216
+216
+215
+208
+200
+192
+189
+189
+190
+192
+192
+182
+165
+136
+94
+37
+5
+2
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+84
+113
+130
+137
+140
+147
+155
+157
+154
+148
+149
+154
+155
+155
+154
+154
+154
+154
+155
+154
+146
+120
+93
+71
+62
+47
+21
+7
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+10
+28
+56
+94
+119
+122
+123
+123
+123
+124
+126
+128
+128
+128
+130
+136
+142
+148
+155
+161
+161
+160
+159
+156
+132
+102
+91
+97
+114
+139
+137
+134
+130
+127
+128
+130
+132
+133
+133
+132
+131
+126
+117
+103
+81
+71
+64
+62
+63
+83
+114
+146
+177
+202
+213
+213
+213
+212
+210
+206
+202
+195
+188
+181
+176
+173
+171
+169
+168
+168
+168
+170
+172
+174
+179
+181
+184
+186
+188
+189
+189
+190
+189
+187
+182
+175
+167
+157
+145
+127
+114
+104
+97
+93
+93
+97
+105
+119
+138
+168
+187
+199
+205
+207
+208
+209
+211
+213
+215
+216
+217
+217
+217
+217
+217
+217
+217
+217
+218
+219
+219
+219
+220
+220
+219
+218
+217
+217
+217
+217
+217
+218
+219
+220
+222
+224
+225
+226
+226
+226
+226
+227
+227
+227
+227
+227
+227
+227
+227
+227
+227
+227
+227
+227
+227
+227
+227
+226
+226
+226
+226
+226
+226
+227
+227
+226
+226
+225
+224
+222
+222
+220
+218
+215
+211
+211
+210
+210
+210
+204
+184
+158
+132
+112
+102
+103
+118
+142
+175
+195
+203
+210
+215
+216
+216
+211
+204
+196
+191
+190
+190
+191
+192
+191
+169
+152
+113
+64
+19
+2
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+82
+107
+126
+137
+140
+147
+155
+157
+154
+149
+152
+155
+155
+155
+154
+154
+154
+155
+157
+158
+156
+138
+108
+77
+60
+52
+33
+14
+2
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+5
+18
+42
+70
+94
+109
+118
+123
+128
+130
+131
+131
+132
+134
+139
+144
+149
+154
+160
+161
+162
+161
+159
+150
+123
+100
+87
+92
+117
+132
+137
+137
+134
+133
+133
+134
+135
+135
+136
+136
+136
+132
+124
+103
+84
+69
+58
+52
+54
+71
+98
+133
+171
+204
+210
+213
+213
+212
+210
+208
+203
+198
+191
+183
+179
+176
+174
+172
+170
+171
+171
+173
+176
+180
+184
+186
+188
+190
+190
+191
+190
+190
+188
+181
+174
+165
+154
+142
+123
+111
+102
+96
+93
+95
+103
+116
+134
+156
+184
+198
+204
+207
+208
+209
+211
+213
+215
+216
+217
+217
+217
+217
+217
+217
+217
+217
+218
+218
+219
+219
+219
+219
+218
+217
+216
+216
+216
+216
+217
+218
+219
+221
+223
+225
+225
+226
+226
+226
+226
+226
+226
+226
+226
+226
+226
+226
+226
+227
+227
+227
+227
+227
+227
+227
+227
+227
+227
+226
+226
+226
+226
+226
+226
+226
+226
+226
+225
+224
+223
+222
+220
+217
+214
+211
+211
+210
+210
+209
+201
+179
+154
+129
+109
+104
+107
+129
+159
+185
+199
+207
+213
+216
+216
+214
+207
+199
+193
+190
+190
+191
+192
+190
+184
+160
+133
+87
+39
+9
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+81
+102
+121
+135
+141
+147
+154
+157
+155
+151
+154
+155
+155
+154
+153
+153
+154
+156
+159
+161
+161
+153
+125
+89
+58
+51
+42
+22
+4
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+3
+19
+48
+70
+87
+101
+117
+125
+130
+135
+139
+143
+147
+150
+153
+155
+159
+161
+162
+162
+160
+158
+145
+120
+94
+80
+89
+113
+129
+138
+140
+137
+137
+136
+136
+136
+136
+137
+139
+139
+139
+128
+106
+83
+64
+51
+43
+44
+58
+85
+124
+180
+199
+210
+214
+214
+212
+210
+208
+205
+200
+191
+186
+181
+178
+175
+173
+172
+173
+174
+177
+182
+185
+188
+191
+191
+191
+191
+191
+190
+188
+181
+173
+163
+152
+139
+120
+109
+100
+96
+94
+100
+111
+128
+149
+172
+196
+204
+207
+208
+209
+210
+213
+215
+216
+217
+217
+217
+217
+217
+217
+217
+217
+218
+218
+218
+219
+218
+218
+217
+216
+215
+215
+215
+215
+216
+218
+219
+221
+223
+225
+226
+226
+226
+226
+226
+226
+226
+226
+226
+225
+225
+225
+225
+226
+226
+226
+226
+226
+227
+227
+227
+227
+227
+227
+227
+226
+226
+226
+226
+226
+226
+226
+225
+225
+223
+223
+222
+219
+216
+213
+211
+210
+210
+210
+209
+197
+173
+148
+126
+108
+106
+115
+144
+175
+193
+203
+211
+215
+216
+216
+211
+201
+195
+191
+190
+190
+192
+191
+186
+173
+151
+107
+59
+20
+3
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+80
+96
+115
+132
+142
+147
+154
+157
+155
+152
+155
+156
+155
+153
+153
+153
+154
+158
+162
+165
+166
+162
+143
+108
+57
+43
+43
+26
+7
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+2
+7
+18
+39
+72
+91
+109
+124
+138
+151
+155
+157
+157
+157
+159
+160
+162
+162
+162
+160
+157
+144
+120
+82
+72
+79
+103
+128
+141
+142
+140
+139
+137
+136
+136
+138
+139
+141
+142
+142
+133
+110
+82
+54
+41
+37
+37
+44
+65
+133
+177
+202
+213
+215
+214
+211
+210
+208
+206
+199
+192
+187
+182
+178
+175
+174
+175
+176
+178
+183
+187
+190
+191
+192
+192
+192
+191
+190
+187
+180
+172
+162
+150
+136
+117
+106
+99
+96
+96
+105
+122
+142
+164
+186
+205
+207
+208
+209
+210
+212
+214
+216
+216
+217
+217
+217
+217
+217
+217
+217
+217
+218
+218
+218
+218
+217
+216
+215
+215
+214
+214
+215
+215
+217
+220
+223
+225
+226
+226
+226
+226
+226
+226
+225
+225
+224
+224
+224
+224
+224
+224
+224
+224
+225
+225
+225
+226
+226
+226
+227
+227
+227
+227
+227
+226
+226
+226
+225
+225
+225
+225
+225
+224
+223
+223
+222
+219
+215
+212
+210
+210
+210
+210
+209
+192
+167
+142
+120
+108
+108
+131
+162
+188
+198
+208
+214
+216
+216
+215
+205
+196
+192
+190
+190
+192
+192
+190
+181
+161
+135
+77
+33
+7
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+81
+91
+109
+129
+143
+149
+155
+157
+156
+154
+155
+155
+154
+153
+153
+153
+155
+161
+168
+174
+175
+171
+161
+135
+85
+37
+39
+29
+14
+2
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+2
+3
+7
+15
+29
+48
+72
+106
+127
+141
+151
+155
+157
+159
+160
+161
+162
+161
+160
+158
+150
+130
+77
+67
+66
+80
+113
+141
+142
+143
+142
+140
+138
+139
+140
+142
+144
+145
+143
+135
+117
+85
+44
+36
+32
+30
+31
+52
+103
+156
+197
+215
+216
+214
+212
+210
+209
+206
+202
+196
+191
+185
+180
+177
+176
+177
+178
+184
+187
+190
+192
+192
+193
+192
+192
+190
+187
+180
+171
+160
+147
+133
+114
+104
+98
+97
+100
+117
+137
+158
+180
+199
+207
+208
+209
+210
+211
+214
+216
+216
+217
+217
+217
+217
+217
+217
+217
+217
+217
+218
+217
+217
+216
+215
+214
+214
+213
+214
+214
+216
+219
+222
+225
+226
+226
+226
+226
+226
+225
+224
+224
+223
+223
+223
+223
+223
+223
+223
+222
+222
+222
+222
+222
+223
+223
+224
+225
+226
+227
+227
+227
+227
+227
+226
+225
+225
+225
+225
+225
+224
+224
+223
+223
+220
+217
+213
+211
+210
+210
+210
+208
+205
+181
+159
+133
+113
+109
+118
+159
+184
+198
+203
+214
+216
+216
+214
+210
+196
+192
+191
+191
+191
+192
+190
+179
+164
+151
+89
+38
+11
+2
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+81
+89
+107
+128
+144
+150
+155
+157
+157
+155
+156
+155
+154
+153
+153
+153
+155
+162
+169
+177
+179
+177
+169
+148
+110
+34
+27
+22
+15
+3
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+2
+5
+10
+18
+31
+59
+85
+108
+127
+140
+149
+153
+156
+158
+160
+161
+160
+159
+156
+149
+113
+79
+62
+59
+71
+115
+135
+143
+144
+143
+142
+142
+143
+144
+146
+147
+146
+140
+128
+107
+63
+41
+30
+27
+26
+33
+55
+98
+149
+196
+216
+216
+215
+213
+210
+207
+204
+200
+195
+189
+183
+180
+178
+178
+179
+184
+188
+191
+192
+193
+193
+193
+192
+190
+187
+179
+170
+159
+145
+130
+111
+102
+98
+99
+106
+126
+147
+169
+189
+203
+208
+209
+210
+211
+213
+215
+216
+216
+217
+217
+217
+217
+217
+217
+217
+217
+217
+217
+217
+216
+215
+214
+213
+213
+213
+214
+216
+219
+222
+225
+226
+226
+226
+226
+225
+224
+223
+223
+223
+223
+223
+223
+223
+222
+222
+221
+221
+220
+220
+220
+221
+221
+222
+223
+224
+225
+226
+227
+227
+227
+227
+226
+225
+225
+224
+224
+224
+224
+223
+223
+222
+219
+215
+212
+210
+210
+210
+209
+206
+199
+175
+145
+124
+113
+112
+146
+177
+193
+202
+209
+215
+216
+215
+211
+202
+193
+191
+191
+191
+192
+191
+183
+170
+151
+127
+52
+19
+5
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+81
+87
+106
+129
+145
+151
+156
+157
+157
+155
+156
+155
+154
+153
+153
+154
+155
+161
+169
+179
+182
+180
+175
+160
+129
+38
+22
+17
+14
+3
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+2
+5
+10
+25
+46
+68
+91
+112
+129
+138
+145
+150
+154
+157
+158
+159
+158
+157
+139
+105
+74
+51
+45
+76
+112
+133
+144
+145
+145
+145
+146
+147
+149
+150
+149
+145
+136
+122
+81
+49
+31
+23
+22
+25
+32
+57
+97
+152
+205
+213
+216
+215
+212
+210
+206
+203
+199
+194
+187
+183
+181
+181
+181
+184
+189
+191
+192
+193
+193
+193
+192
+190
+187
+179
+169
+157
+144
+128
+109
+101
+99
+102
+111
+135
+157
+178
+195
+206
+209
+209
+210
+212
+214
+216
+216
+216
+216
+216
+216
+217
+217
+217
+217
+217
+217
+217
+216
+215
+214
+213
+212
+213
+213
+216
+219
+222
+224
+226
+226
+226
+225
+224
+223
+222
+222
+223
+223
+223
+223
+223
+222
+221
+220
+220
+220
+220
+220
+220
+220
+220
+221
+222
+223
+225
+226
+227
+227
+227
+226
+225
+225
+224
+224
+224
+224
+223
+223
+222
+220
+217
+213
+211
+210
+210
+209
+208
+203
+194
+161
+133
+119
+117
+126
+171
+190
+200
+206
+213
+216
+216
+212
+205
+196
+191
+191
+191
+191
+192
+187
+173
+158
+134
+91
+25
+8
+2
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+81
+86
+106
+130
+146
+152
+156
+158
+157
+155
+156
+154
+154
+154
+154
+154
+155
+160
+167
+178
+183
+182
+180
+169
+144
+49
+22
+13
+10
+3
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+2
+6
+16
+32
+52
+75
+99
+114
+126
+135
+142
+149
+153
+155
+157
+158
+154
+132
+97
+60
+34
+39
+77
+111
+136
+145
+147
+148
+149
+150
+152
+153
+152
+149
+142
+131
+98
+61
+35
+20
+17
+20
+22
+31
+54
+98
+177
+203
+214
+217
+215
+212
+209
+206
+203
+199
+192
+187
+184
+183
+183
+184
+189
+191
+193
+193
+193
+193
+192
+190
+187
+179
+169
+156
+142
+126
+108
+101
+100
+106
+117
+143
+165
+185
+200
+208
+209
+210
+211
+213
+215
+216
+216
+216
+216
+216
+216
+216
+217
+217
+217
+217
+216
+216
+215
+214
+212
+212
+212
+213
+214
+218
+221
+224
+225
+226
+225
+224
+223
+222
+221
+221
+222
+223
+223
+223
+223
+222
+221
+220
+220
+220
+220
+220
+220
+220
+220
+220
+221
+221
+223
+225
+226
+227
+227
+227
+226
+225
+224
+224
+224
+223
+223
+223
+222
+221
+218
+214
+212
+210
+210
+209
+209
+206
+199
+184
+143
+125
+119
+126
+149
+189
+198
+205
+210
+215
+216
+213
+206
+198
+192
+191
+191
+191
+191
+190
+178
+162
+142
+108
+52
+8
+2
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+82
+87
+108
+132
+147
+153
+157
+158
+157
+156
+156
+155
+155
+155
+155
+155
+155
+157
+162
+173
+181
+182
+181
+174
+159
+69
+25
+8
+5
+3
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+3
+7
+16
+31
+58
+78
+94
+108
+120
+133
+142
+149
+154
+156
+156
+151
+126
+86
+35
+18
+34
+73
+116
+143
+147
+149
+151
+152
+154
+156
+155
+153
+148
+140
+114
+78
+44
+19
+12
+13
+18
+23
+31
+48
+130
+182
+208
+217
+216
+215
+212
+209
+205
+201
+196
+191
+187
+186
+186
+187
+190
+191
+193
+193
+193
+193
+192
+190
+187
+178
+168
+155
+140
+124
+106
+101
+102
+110
+124
+150
+172
+191
+204
+209
+210
+211
+212
+214
+215
+216
+216
+216
+216
+216
+216
+216
+216
+216
+216
+216
+216
+215
+214
+213
+212
+212
+212
+213
+216
+220
+223
+225
+226
+226
+224
+223
+221
+221
+220
+221
+222
+223
+224
+224
+223
+221
+220
+220
+220
+220
+220
+220
+220
+220
+220
+220
+221
+222
+223
+225
+226
+227
+227
+227
+226
+225
+224
+223
+223
+223
+222
+222
+221
+220
+216
+212
+210
+210
+209
+209
+208
+204
+192
+167
+125
+121
+125
+143
+179
+199
+204
+209
+214
+216
+215
+208
+200
+193
+191
+191
+191
+191
+190
+185
+164
+152
+118
+70
+19
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+83
+90
+113
+136
+147
+154
+157
+158
+157
+156
+156
+155
+156
+157
+157
+155
+155
+155
+157
+162
+178
+182
+182
+178
+165
+86
+31
+8
+3
+2
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+2
+4
+12
+23
+38
+54
+72
+95
+114
+130
+143
+151
+155
+154
+148
+124
+71
+14
+10
+22
+54
+106
+142
+147
+151
+153
+155
+156
+155
+153
+151
+147
+126
+99
+64
+32
+11
+7
+9
+14
+21
+28
+56
+122
+175
+208
+217
+216
+215
+213
+210
+206
+201
+198
+194
+191
+190
+190
+191
+192
+193
+193
+193
+193
+192
+190
+187
+178
+167
+153
+138
+121
+105
+102
+105
+115
+131
+158
+179
+196
+206
+210
+211
+211
+213
+214
+215
+216
+216
+216
+216
+216
+216
+216
+216
+216
+216
+216
+215
+214
+213
+212
+211
+212
+213
+215
+218
+222
+224
+225
+225
+224
+222
+220
+219
+219
+220
+222
+223
+224
+224
+224
+222
+221
+220
+220
+220
+220
+220
+220
+220
+220
+220
+220
+221
+222
+224
+226
+226
+227
+227
+226
+225
+223
+223
+222
+222
+222
+221
+221
+220
+216
+212
+210
+209
+209
+209
+208
+205
+191
+167
+134
+125
+127
+150
+179
+198
+205
+211
+214
+215
+215
+208
+198
+193
+192
+191
+191
+191
+189
+181
+167
+153
+119
+69
+23
+2
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+84
+95
+117
+139
+148
+155
+158
+158
+157
+156
+156
+156
+157
+158
+159
+157
+156
+155
+155
+158
+172
+180
+182
+179
+171
+98
+37
+10
+3
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+2
+4
+8
+14
+23
+36
+60
+83
+106
+127
+141
+151
+153
+150
+134
+97
+22
+9
+9
+23
+52
+108
+133
+145
+151
+154
+155
+154
+152
+150
+146
+129
+103
+71
+38
+13
+6
+6
+9
+13
+22
+40
+79
+136
+187
+212
+216
+216
+215
+213
+210
+204
+201
+198
+195
+193
+193
+193
+193
+194
+194
+194
+193
+192
+190
+187
+178
+166
+153
+137
+120
+105
+103
+108
+119
+135
+162
+183
+198
+208
+210
+211
+212
+213
+214
+215
+216
+216
+216
+216
+216
+216
+216
+216
+216
+216
+216
+215
+214
+213
+211
+211
+212
+213
+215
+219
+223
+224
+224
+224
+223
+220
+219
+218
+219
+220
+223
+224
+224
+224
+224
+222
+221
+221
+220
+220
+220
+220
+220
+220
+220
+220
+221
+222
+224
+225
+226
+226
+226
+226
+225
+223
+222
+222
+221
+221
+221
+221
+219
+216
+212
+210
+209
+209
+208
+208
+206
+193
+169
+146
+132
+129
+151
+174
+194
+204
+210
+213
+215
+214
+211
+199
+194
+192
+192
+191
+191
+188
+180
+169
+159
+128
+76
+35
+8
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+85
+99
+122
+142
+149
+157
+159
+159
+157
+156
+156
+157
+158
+159
+159
+159
+157
+155
+155
+156
+166
+177
+182
+180
+174
+106
+42
+12
+3
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+2
+4
+8
+14
+30
+51
+77
+103
+127
+144
+148
+148
+137
+109
+28
+10
+3
+7
+19
+61
+97
+124
+141
+149
+152
+152
+150
+146
+142
+127
+105
+75
+42
+14
+6
+5
+6
+8
+13
+27
+52
+98
+151
+199
+214
+216
+215
+214
+213
+208
+204
+201
+199
+197
+195
+195
+195
+194
+194
+194
+194
+193
+190
+187
+177
+166
+152
+136
+119
+105
+104
+110
+122
+138
+165
+185
+200
+208
+211
+211
+212
+213
+214
+215
+216
+216
+216
+216
+216
+216
+216
+216
+216
+216
+215
+214
+213
+212
+211
+211
+212
+213
+216
+219
+223
+223
+223
+223
+221
+218
+217
+217
+218
+220
+224
+224
+224
+224
+224
+223
+222
+222
+221
+220
+220
+220
+220
+220
+221
+222
+223
+224
+225
+226
+226
+226
+225
+224
+223
+221
+221
+221
+221
+221
+220
+218
+215
+212
+210
+208
+208
+208
+208
+206
+194
+172
+152
+138
+133
+148
+174
+192
+203
+208
+213
+214
+213
+210
+203
+194
+192
+192
+192
+192
+189
+181
+171
+158
+141
+86
+40
+13
+2
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+87
+104
+126
+144
+150
+158
+159
+159
+157
+156
+156
+157
+159
+160
+160
+159
+159
+157
+155
+155
+161
+174
+181
+181
+175
+111
+46
+14
+3
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+2
+3
+10
+24
+45
+71
+100
+126
+135
+137
+129
+107
+31
+10
+2
+2
+3
+20
+54
+87
+116
+136
+143
+145
+144
+141
+137
+122
+104
+75
+44
+14
+5
+5
+4
+5
+6
+17
+34
+65
+112
+175
+210
+214
+216
+215
+214
+212
+207
+205
+202
+200
+197
+197
+196
+195
+195
+194
+194
+193
+191
+187
+178
+166
+151
+135
+117
+106
+106
+112
+124
+141
+167
+187
+200
+209
+211
+212
+212
+213
+214
+215
+215
+216
+216
+216
+216
+216
+216
+216
+216
+216
+215
+214
+213
+212
+211
+211
+212
+213
+216
+219
+222
+222
+222
+221
+219
+216
+216
+216
+217
+220
+224
+225
+225
+225
+225
+224
+223
+223
+222
+222
+221
+221
+221
+222
+222
+224
+225
+225
+226
+226
+226
+225
+224
+222
+221
+220
+220
+220
+220
+219
+217
+214
+211
+209
+208
+208
+208
+207
+204
+198
+174
+152
+142
+140
+144
+174
+193
+203
+209
+212
+214
+213
+210
+204
+196
+192
+192
+192
+191
+190
+182
+171
+159
+140
+109
+41
+14
+3
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+87
+110
+131
+147
+151
+158
+160
+159
+157
+156
+156
+158
+159
+160
+160
+160
+159
+158
+156
+155
+158
+171
+179
+181
+177
+115
+48
+14
+3
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+2
+5
+14
+30
+54
+94
+107
+111
+105
+92
+29
+10
+2
+1
+1
+3
+13
+37
+71
+108
+126
+133
+134
+132
+129
+116
+98
+73
+43
+13
+4
+4
+4
+4
+4
+7
+21
+45
+81
+134
+201
+211
+215
+216
+215
+214
+211
+207
+204
+203
+199
+198
+198
+197
+196
+195
+194
+193
+191
+187
+178
+166
+151
+134
+117
+107
+108
+114
+126
+143
+169
+187
+201
+209
+211
+212
+213
+213
+214
+215
+215
+216
+216
+216
+216
+216
+216
+216
+216
+216
+215
+214
+213
+212
+211
+211
+212
+213
+216
+219
+221
+221
+221
+220
+218
+215
+215
+215
+216
+220
+224
+225
+225
+225
+225
+225
+225
+224
+224
+224
+224
+224
+224
+225
+225
+225
+226
+226
+226
+226
+225
+223
+222
+221
+220
+220
+220
+219
+217
+216
+212
+210
+208
+208
+208
+208
+207
+205
+196
+178
+149
+144
+142
+148
+168
+197
+205
+209
+212
+214
+214
+210
+203
+196
+192
+192
+192
+191
+189
+184
+171
+162
+144
+111
+58
+9
+3
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+89
+118
+138
+149
+152
+159
+161
+159
+157
+157
+157
+158
+159
+160
+160
+160
+160
+159
+157
+155
+157
+169
+178
+181
+177
+117
+48
+14
+2
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+2
+2
+4
+7
+24
+36
+39
+37
+30
+10
+4
+2
+1
+1
+1
+2
+6
+16
+39
+80
+97
+106
+108
+106
+95
+80
+55
+29
+7
+2
+2
+3
+3
+3
+4
+7
+21
+47
+88
+169
+200
+213
+216
+216
+215
+214
+210
+207
+205
+203
+201
+199
+198
+197
+195
+194
+193
+191
+188
+178
+166
+151
+134
+117
+108
+109
+116
+127
+143
+168
+186
+200
+209
+211
+212
+213
+213
+214
+214
+215
+215
+215
+216
+216
+216
+216
+216
+216
+216
+215
+214
+213
+211
+211
+211
+211
+213
+215
+218
+220
+220
+219
+218
+216
+214
+213
+213
+215
+219
+224
+225
+225
+225
+225
+225
+225
+225
+225
+225
+225
+225
+225
+225
+225
+225
+226
+225
+225
+224
+222
+220
+220
+219
+218
+217
+215
+214
+212
+210
+208
+208
+208
+208
+207
+205
+198
+183
+166
+152
+147
+148
+161
+180
+199
+209
+211
+213
+213
+213
+208
+200
+195
+192
+192
+192
+191
+186
+180
+172
+160
+136
+94
+48
+11
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+91
+124
+143
+151
+153
+160
+161
+159
+157
+157
+157
+158
+159
+160
+160
+160
+160
+159
+157
+155
+157
+169
+178
+181
+177
+114
+46
+13
+2
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+2
+3
+8
+12
+13
+12
+10
+4
+2
+1
+1
+1
+1
+1
+3
+6
+14
+37
+59
+74
+81
+82
+74
+61
+41
+20
+5
+2
+2
+2
+3
+3
+3
+5
+13
+30
+61
+133
+182
+206
+214
+216
+216
+215
+213
+210
+206
+204
+202
+201
+200
+199
+196
+195
+193
+191
+188
+179
+167
+152
+135
+118
+109
+110
+117
+128
+143
+166
+184
+198
+208
+211
+212
+213
+213
+214
+214
+215
+215
+215
+215
+216
+216
+216
+216
+216
+216
+215
+214
+213
+212
+211
+211
+211
+212
+214
+217
+218
+218
+218
+217
+215
+212
+212
+212
+213
+216
+223
+224
+225
+225
+225
+225
+225
+225
+225
+225
+225
+225
+225
+225
+225
+224
+224
+222
+221
+220
+218
+217
+216
+215
+214
+213
+212
+210
+210
+209
+208
+208
+207
+205
+203
+190
+176
+165
+157
+152
+155
+168
+184
+199
+208
+211
+212
+213
+212
+208
+199
+195
+193
+192
+192
+189
+185
+179
+172
+163
+133
+90
+50
+19
+4
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+94
+129
+147
+153
+154
+160
+161
+160
+158
+157
+157
+158
+159
+159
+160
+160
+160
+159
+157
+156
+157
+169
+178
+181
+176
+108
+43
+12
+2
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+2
+2
+3
+2
+2
+1
+1
+1
+1
+1
+1
+1
+1
+2
+4
+13
+28
+41
+51
+56
+51
+41
+27
+13
+4
+1
+1
+1
+2
+3
+3
+4
+7
+18
+39
+101
+158
+194
+212
+215
+216
+216
+215
+212
+209
+206
+204
+203
+201
+200
+197
+195
+194
+192
+188
+180
+168
+153
+136
+119
+110
+111
+117
+127
+141
+163
+181
+196
+206
+211
+212
+213
+213
+214
+214
+215
+215
+215
+215
+215
+216
+216
+216
+216
+216
+215
+214
+213
+212
+211
+211
+211
+212
+213
+215
+217
+217
+217
+216
+215
+212
+211
+211
+211
+213
+220
+223
+224
+225
+225
+225
+225
+225
+224
+224
+224
+224
+223
+223
+222
+221
+220
+218
+217
+216
+215
+214
+213
+212
+212
+210
+210
+209
+208
+208
+207
+205
+201
+195
+187
+174
+165
+159
+157
+159
+174
+189
+201
+208
+211
+212
+212
+210
+206
+201
+195
+193
+192
+191
+189
+184
+179
+171
+159
+139
+89
+48
+21
+5
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+98
+133
+150
+155
+156
+161
+161
+160
+158
+157
+157
+158
+158
+159
+160
+160
+160
+159
+157
+156
+157
+170
+179
+181
+174
+100
+38
+10
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+2
+3
+7
+16
+24
+30
+28
+23
+15
+8
+3
+1
+1
+1
+1
+2
+2
+3
+4
+9
+22
+72
+128
+175
+206
+214
+215
+216
+216
+215
+212
+208
+207
+205
+203
+201
+198
+196
+194
+192
+189
+181
+170
+155
+138
+120
+111
+112
+117
+127
+139
+160
+177
+192
+204
+210
+212
+213
+213
+214
+214
+214
+214
+215
+215
+215
+215
+216
+216
+216
+216
+215
+214
+213
+212
+211
+211
+211
+211
+212
+214
+216
+216
+216
+215
+214
+211
+210
+209
+209
+210
+216
+221
+223
+224
+225
+225
+224
+224
+223
+223
+222
+222
+221
+220
+219
+217
+216
+215
+214
+213
+212
+211
+211
+210
+210
+209
+208
+208
+207
+206
+202
+197
+190
+181
+171
+163
+161
+162
+166
+175
+195
+205
+210
+212
+212
+212
+209
+205
+200
+195
+193
+192
+191
+188
+185
+178
+171
+157
+134
+99
+42
+17
+5
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+102
+136
+151
+156
+157
+161
+161
+160
+158
+157
+157
+157
+158
+159
+159
+159
+159
+159
+157
+156
+158
+172
+180
+180
+171
+87
+32
+8
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+2
+3
+5
+8
+9
+7
+5
+3
+2
+1
+1
+1
+1
+1
+2
+2
+3
+4
+7
+44
+98
+154
+197
+212
+215
+216
+216
+216
+216
+211
+209
+207
+205
+202
+200
+196
+194
+192
+190
+182
+171
+157
+140
+122
+113
+113
+117
+125
+137
+156
+172
+188
+200
+208
+211
+213
+213
+214
+214
+214
+214
+214
+215
+215
+215
+215
+215
+215
+215
+215
+215
+214
+213
+212
+211
+211
+211
+212
+213
+214
+215
+215
+214
+214
+211
+209
+208
+208
+208
+210
+216
+220
+223
+224
+224
+224
+223
+222
+222
+220
+219
+218
+217
+216
+214
+213
+212
+212
+211
+211
+210
+210
+209
+209
+208
+207
+206
+204
+200
+190
+181
+174
+168
+164
+163
+164
+172
+184
+200
+210
+211
+212
+212
+212
+209
+203
+198
+195
+193
+192
+190
+187
+183
+179
+172
+159
+130
+91
+45
+9
+3
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+108
+137
+152
+157
+158
+162
+162
+161
+159
+157
+157
+157
+158
+158
+159
+159
+159
+158
+157
+156
+160
+175
+181
+177
+162
+65
+22
+5
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+2
+2
+3
+5
+19
+58
+113
+168
+206
+214
+215
+216
+217
+217
+215
+212
+210
+208
+205
+201
+198
+195
+193
+191
+184
+174
+160
+144
+126
+114
+114
+117
+124
+133
+149
+164
+180
+193
+203
+209
+211
+213
+213
+214
+214
+214
+214
+214
+214
+215
+215
+215
+215
+215
+215
+215
+214
+214
+213
+212
+211
+211
+211
+212
+213
+213
+213
+213
+213
+211
+209
+208
+206
+206
+205
+207
+211
+215
+218
+221
+222
+221
+221
+220
+219
+218
+217
+215
+214
+213
+212
+211
+211
+210
+210
+209
+208
+207
+206
+202
+197
+192
+185
+179
+173
+170
+169
+168
+167
+176
+189
+200
+207
+211
+212
+212
+211
+209
+206
+199
+196
+194
+193
+192
+188
+184
+180
+176
+170
+145
+105
+63
+28
+7
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+111
+138
+152
+158
+159
+162
+162
+161
+159
+158
+157
+158
+158
+158
+159
+159
+159
+158
+157
+157
+164
+178
+182
+173
+146
+47
+15
+3
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+2
+2
+3
+12
+38
+83
+138
+194
+212
+214
+215
+216
+217
+216
+214
+212
+210
+206
+202
+198
+196
+193
+192
+185
+176
+163
+148
+130
+116
+115
+117
+123
+131
+144
+157
+172
+186
+197
+205
+209
+212
+213
+213
+214
+214
+214
+214
+214
+214
+215
+215
+215
+215
+215
+215
+215
+214
+213
+212
+212
+211
+211
+212
+212
+212
+212
+212
+212
+211
+209
+208
+206
+205
+204
+204
+205
+207
+209
+212
+214
+216
+216
+217
+216
+215
+215
+214
+213
+211
+210
+209
+208
+207
+205
+203
+200
+197
+194
+188
+184
+181
+178
+175
+172
+172
+174
+179
+185
+196
+203
+208
+210
+211
+211
+209
+207
+204
+200
+196
+194
+192
+189
+187
+183
+180
+173
+161
+140
+92
+54
+27
+10
+2
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+115
+139
+152
+159
+160
+163
+163
+161
+160
+158
+158
+158
+158
+158
+158
+159
+158
+158
+157
+157
+169
+180
+181
+165
+124
+31
+10
+2
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+2
+6
+23
+57
+107
+171
+208
+212
+214
+215
+217
+217
+216
+214
+211
+208
+203
+199
+196
+194
+192
+186
+178
+166
+152
+134
+118
+116
+118
+122
+128
+139
+151
+164
+178
+190
+200
+206
+209
+212
+213
+213
+214
+214
+214
+214
+214
+214
+214
+215
+215
+215
+215
+215
+214
+214
+213
+212
+212
+212
+212
+212
+212
+212
+212
+212
+211
+209
+208
+207
+205
+203
+203
+202
+203
+203
+205
+206
+207
+208
+209
+209
+208
+208
+207
+206
+205
+204
+202
+200
+199
+196
+193
+191
+188
+185
+181
+179
+177
+176
+176
+178
+181
+187
+193
+200
+207
+210
+211
+211
+210
+208
+205
+202
+199
+196
+193
+190
+188
+185
+182
+178
+169
+152
+127
+93
+45
+22
+8
+2
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+118
+139
+152
+159
+161
+163
+163
+162
+160
+158
+158
+158
+158
+158
+158
+159
+158
+158
+157
+159
+175
+181
+178
+154
+96
+17
+6
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+2
+12
+36
+77
+139
+200
+209
+213
+214
+216
+217
+216
+215
+213
+209
+204
+200
+197
+195
+193
+188
+180
+170
+156
+139
+121
+118
+118
+121
+126
+135
+144
+156
+168
+181
+194
+200
+205
+209
+212
+213
+213
+213
+213
+214
+214
+214
+214
+214
+214
+215
+215
+215
+215
+214
+214
+213
+213
+212
+212
+212
+212
+212
+212
+211
+211
+210
+209
+207
+206
+204
+203
+202
+201
+200
+200
+200
+200
+200
+200
+200
+200
+200
+199
+198
+197
+195
+194
+192
+190
+187
+185
+183
+182
+181
+179
+179
+179
+181
+183
+189
+195
+201
+206
+210
+212
+211
+210
+209
+207
+204
+200
+197
+195
+193
+189
+186
+184
+180
+177
+165
+145
+116
+81
+45
+13
+5
+2
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+120
+140
+152
+159
+161
+164
+164
+163
+161
+158
+158
+158
+158
+158
+158
+159
+158
+157
+158
+161
+181
+182
+173
+138
+64
+8
+3
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+2
+5
+19
+49
+102
+187
+204
+212
+214
+214
+216
+216
+215
+213
+211
+205
+201
+198
+196
+194
+189
+182
+173
+161
+145
+124
+120
+119
+121
+125
+132
+138
+147
+158
+171
+185
+193
+200
+205
+209
+212
+213
+213
+213
+213
+213
+213
+214
+214
+214
+214
+214
+214
+214
+214
+214
+214
+213
+213
+212
+212
+212
+212
+211
+211
+211
+210
+209
+208
+207
+204
+203
+202
+201
+200
+198
+198
+197
+196
+195
+194
+194
+193
+192
+191
+190
+189
+188
+187
+186
+184
+184
+183
+182
+181
+182
+184
+187
+192
+198
+205
+209
+211
+211
+212
+211
+209
+207
+205
+202
+199
+196
+193
+190
+187
+184
+182
+180
+175
+167
+138
+101
+63
+31
+10
+2
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+123
+140
+152
+159
+162
+164
+164
+164
+162
+160
+158
+158
+158
+158
+159
+159
+158
+158
+161
+170
+183
+181
+152
+100
+29
+3
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+3
+9
+25
+59
+145
+188
+207
+213
+214
+215
+215
+215
+214
+211
+207
+203
+200
+197
+195
+191
+186
+178
+167
+154
+132
+124
+121
+121
+124
+129
+133
+138
+146
+156
+170
+180
+188
+195
+201
+207
+210
+211
+212
+213
+213
+213
+213
+213
+213
+213
+214
+214
+214
+214
+214
+214
+214
+213
+213
+213
+212
+212
+212
+211
+211
+210
+210
+209
+208
+207
+205
+204
+202
+200
+199
+198
+197
+196
+195
+194
+193
+192
+192
+191
+190
+189
+188
+187
+187
+186
+187
+188
+191
+194
+199
+203
+207
+209
+210
+211
+211
+211
+210
+208
+206
+204
+202
+199
+197
+193
+190
+186
+184
+182
+179
+174
+164
+145
+114
+65
+34
+14
+4
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+124
+139
+151
+159
+162
+165
+165
+164
+163
+161
+159
+159
+159
+159
+159
+159
+158
+159
+164
+177
+181
+171
+124
+64
+12
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+2
+5
+15
+36
+103
+165
+198
+211
+213
+214
+215
+215
+214
+212
+208
+205
+201
+199
+196
+192
+188
+181
+173
+162
+141
+129
+124
+122
+124
+128
+131
+134
+139
+146
+158
+167
+176
+184
+192
+200
+204
+207
+210
+211
+212
+212
+212
+212
+213
+213
+213
+213
+213
+214
+214
+214
+214
+213
+213
+213
+213
+213
+212
+212
+212
+211
+211
+210
+210
+209
+208
+206
+205
+204
+202
+201
+200
+198
+197
+196
+195
+195
+194
+194
+193
+194
+194
+195
+195
+197
+199
+201
+203
+205
+207
+209
+209
+210
+210
+210
+209
+208
+206
+205
+202
+200
+197
+194
+190
+186
+184
+182
+180
+177
+168
+150
+124
+93
+60
+26
+13
+5
+2
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+125
+139
+150
+158
+162
+165
+165
+165
+164
+162
+160
+159
+159
+160
+160
+158
+158
+162
+170
+180
+179
+148
+91
+35
+5
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+2
+7
+18
+68
+134
+180
+207
+213
+214
+214
+214
+214
+213
+209
+206
+203
+200
+197
+194
+190
+185
+178
+169
+150
+137
+128
+124
+124
+127
+129
+132
+135
+139
+148
+156
+164
+172
+180
+190
+196
+201
+205
+208
+210
+211
+212
+212
+212
+212
+212
+212
+212
+213
+213
+213
+213
+213
+213
+213
+213
+213
+213
+213
+212
+212
+212
+212
+211
+210
+210
+209
+208
+207
+206
+205
+204
+203
+203
+202
+201
+201
+201
+201
+201
+202
+202
+203
+204
+206
+207
+208
+209
+210
+210
+210
+209
+209
+209
+207
+206
+204
+203
+200
+197
+194
+191
+187
+184
+181
+179
+176
+170
+161
+135
+107
+77
+48
+25
+7
+3
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+126
+139
+149
+157
+162
+165
+165
+165
+164
+163
+161
+161
+161
+161
+160
+158
+160
+167
+175
+181
+170
+115
+57
+14
+2
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+3
+7
+39
+98
+155
+197
+211
+213
+214
+214
+214
+213
+210
+207
+204
+201
+199
+195
+192
+188
+182
+175
+160
+146
+135
+128
+126
+126
+129
+131
+133
+135
+140
+146
+152
+160
+167
+178
+185
+191
+197
+201
+206
+208
+210
+211
+211
+211
+211
+212
+212
+212
+212
+212
+213
+213
+213
+213
+213
+213
+213
+213
+213
+213
+212
+212
+212
+212
+211
+211
+211
+211
+210
+209
+209
+209
+208
+208
+208
+208
+208
+208
+208
+209
+209
+209
+210
+210
+210
+210
+210
+210
+209
+209
+208
+207
+206
+204
+202
+200
+198
+195
+190
+187
+184
+181
+179
+176
+172
+163
+149
+128
+89
+59
+34
+16
+5
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+127
+138
+148
+156
+161
+164
+165
+165
+165
+164
+163
+163
+162
+161
+159
+159
+163
+172
+179
+178
+149
+72
+25
+3
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+2
+3
+14
+61
+122
+177
+208
+213
+213
+214
+214
+214
+211
+209
+206
+203
+200
+196
+194
+190
+185
+180
+168
+156
+144
+134
+128
+128
+129
+130
+132
+133
+135
+138
+143
+148
+154
+164
+171
+179
+185
+192
+199
+203
+206
+208
+210
+210
+211
+211
+211
+211
+211
+211
+211
+212
+212
+212
+212
+212
+213
+213
+213
+213
+212
+212
+212
+212
+212
+212
+212
+212
+212
+212
+212
+211
+211
+211
+211
+211
+211
+211
+211
+211
+210
+210
+210
+210
+210
+209
+209
+208
+207
+206
+206
+204
+203
+201
+198
+194
+191
+187
+182
+180
+178
+177
+175
+169
+157
+136
+109
+76
+39
+18
+7
+3
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+127
+138
+147
+155
+160
+163
+164
+165
+165
+164
+164
+163
+161
+159
+159
+161
+170
+174
+172
+160
+76
+28
+6
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+2
+7
+24
+70
+130
+191
+211
+213
+213
+214
+214
+212
+210
+208
+205
+202
+199
+196
+193
+189
+185
+178
+169
+158
+148
+138
+132
+131
+131
+132
+133
+135
+135
+137
+139
+142
+148
+154
+160
+167
+173
+182
+188
+193
+198
+202
+206
+208
+209
+209
+210
+210
+210
+210
+210
+210
+210
+211
+211
+211
+211
+211
+212
+212
+212
+212
+212
+212
+212
+212
+212
+212
+211
+211
+211
+211
+211
+211
+211
+210
+210
+210
+209
+209
+209
+208
+207
+207
+207
+206
+206
+204
+203
+200
+197
+194
+189
+185
+182
+179
+177
+176
+174
+171
+166
+156
+128
+100
+70
+42
+23
+5
+3
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+128
+138
+147
+153
+158
+163
+164
+164
+165
+164
+164
+162
+161
+160
+161
+167
+173
+171
+154
+111
+39
+15
+4
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+3
+13
+43
+89
+153
+204
+211
+213
+213
+213
+213
+211
+209
+207
+204
+201
+198
+195
+192
+188
+183
+176
+168
+159
+150
+140
+137
+135
+134
+134
+135
+136
+137
+138
+140
+143
+146
+150
+154
+160
+167
+173
+179
+184
+190
+196
+200
+203
+205
+207
+208
+209
+209
+209
+209
+209
+209
+209
+209
+210
+210
+210
+210
+210
+210
+210
+210
+210
+210
+210
+210
+210
+210
+210
+210
+209
+209
+209
+209
+209
+208
+208
+208
+207
+207
+206
+205
+204
+202
+200
+197
+194
+190
+187
+183
+179
+177
+175
+174
+172
+169
+162
+150
+133
+111
+77
+51
+31
+18
+8
+2
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+128
+139
+147
+152
+157
+161
+163
+164
+164
+164
+162
+161
+160
+161
+162
+170
+171
+156
+123
+73
+23
+10
+3
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+6
+23
+56
+111
+185
+204
+212
+213
+213
+213
+212
+210
+208
+206
+203
+200
+197
+194
+191
+186
+182
+177
+170
+162
+152
+146
+143
+140
+138
+137
+138
+138
+139
+139
+141
+143
+145
+148
+151
+156
+161
+165
+170
+176
+183
+188
+192
+196
+199
+202
+204
+206
+207
+207
+208
+208
+208
+208
+208
+208
+208
+209
+209
+209
+209
+209
+209
+209
+209
+209
+209
+209
+208
+208
+208
+208
+207
+207
+207
+206
+206
+205
+204
+203
+200
+198
+196
+193
+190
+186
+183
+180
+177
+175
+173
+171
+169
+166
+161
+147
+131
+111
+89
+65
+36
+20
+11
+5
+2
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+129
+140
+147
+152
+155
+160
+162
+163
+164
+163
+161
+160
+161
+162
+164
+171
+162
+132
+91
+49
+19
+9
+3
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+10
+31
+69
+153
+190
+207
+212
+213
+213
+213
+211
+210
+208
+205
+202
+199
+197
+194
+190
+187
+183
+178
+173
+164
+158
+153
+149
+145
+142
+141
+141
+140
+141
+141
+142
+143
+145
+146
+149
+152
+155
+159
+163
+169
+174
+178
+183
+187
+193
+196
+199
+201
+203
+204
+205
+206
+206
+207
+207
+207
+207
+207
+207
+207
+207
+207
+207
+207
+207
+207
+207
+206
+206
+206
+205
+205
+204
+203
+202
+200
+199
+197
+195
+191
+188
+185
+182
+179
+176
+173
+172
+170
+169
+166
+163
+157
+148
+136
+111
+88
+66
+45
+28
+9
+5
+3
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+130
+141
+147
+151
+154
+159
+162
+163
+162
+160
+160
+161
+161
+163
+167
+169
+144
+107
+70
+44
+23
+11
+4
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+3
+12
+32
+108
+166
+198
+211
+213
+213
+213
+212
+211
+209
+207
+204
+201
+199
+196
+192
+190
+187
+185
+182
+175
+170
+166
+162
+158
+153
+150
+147
+145
+143
+142
+142
+143
+144
+145
+146
+149
+150
+152
+154
+158
+161
+165
+169
+172
+178
+182
+186
+190
+193
+197
+199
+201
+203
+204
+204
+205
+205
+205
+205
+205
+205
+205
+204
+204
+204
+204
+203
+203
+202
+201
+200
+199
+197
+196
+193
+190
+188
+185
+182
+178
+175
+173
+171
+169
+168
+167
+166
+165
+163
+157
+147
+132
+114
+91
+61
+41
+26
+15
+5
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+131
+142
+148
+151
+153
+159
+160
+159
+159
+160
+161
+159
+159
+162
+170
+155
+117
+90
+70
+52
+25
+12
+5
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+3
+10
+48
+109
+163
+200
+211
+212
+213
+213
+212
+211
+209
+207
+204
+202
+199
+196
+193
+191
+190
+188
+185
+182
+179
+177
+175
+172
+169
+166
+163
+159
+154
+151
+148
+146
+146
+146
+148
+149
+150
+152
+154
+155
+157
+158
+160
+162
+165
+167
+169
+172
+175
+178
+181
+184
+186
+189
+191
+192
+194
+194
+195
+195
+195
+195
+194
+194
+192
+191
+190
+188
+186
+184
+182
+180
+178
+175
+173
+171
+169
+167
+166
+165
+164
+164
+163
+161
+158
+153
+144
+131
+107
+87
+68
+49
+31
+13
+9
+5
+2
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+131
+143
+149
+151
+153
+158
+158
+159
+160
+161
+159
+157
+161
+167
+168
+131
+108
+95
+83
+65
+32
+16
+6
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+3
+24
+68
+121
+170
+203
+211
+212
+212
+212
+212
+210
+209
+206
+204
+202
+198
+196
+194
+192
+191
+190
+188
+186
+184
+183
+181
+180
+178
+176
+174
+171
+168
+164
+161
+157
+152
+151
+150
+150
+151
+153
+154
+155
+156
+158
+160
+161
+162
+164
+165
+167
+168
+169
+170
+172
+173
+174
+175
+177
+177
+178
+179
+179
+180
+180
+179
+179
+178
+177
+176
+174
+173
+171
+170
+168
+166
+165
+164
+163
+163
+162
+161
+159
+156
+152
+141
+129
+115
+100
+83
+60
+45
+32
+20
+10
+5
+3
+2
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+133
+144
+149
+151
+153
+157
+158
+159
+160
+160
+156
+156
+164
+168
+158
+120
+113
+110
+105
+92
+52
+27
+11
+3
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+9
+35
+79
+130
+180
+207
+210
+212
+212
+212
+211
+210
+208
+206
+204
+201
+199
+196
+194
+193
+192
+191
+191
+190
+188
+188
+187
+186
+186
+185
+183
+181
+178
+176
+172
+167
+163
+160
+157
+155
+155
+155
+155
+156
+157
+158
+159
+160
+161
+162
+163
+163
+164
+164
+165
+165
+166
+166
+166
+167
+167
+167
+168
+168
+167
+167
+167
+166
+166
+165
+164
+163
+163
+162
+161
+160
+159
+159
+158
+157
+153
+148
+142
+134
+123
+105
+90
+73
+57
+43
+27
+19
+12
+6
+2
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+134
+145
+149
+151
+153
+157
+159
+161
+161
+157
+154
+160
+168
+166
+144
+121
+127
+130
+130
+123
+84
+49
+23
+7
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+2
+12
+41
+85
+143
+194
+206
+211
+212
+212
+212
+211
+210
+208
+207
+204
+202
+199
+197
+195
+194
+193
+193
+193
+192
+192
+192
+192
+191
+191
+191
+190
+189
+188
+186
+183
+179
+175
+171
+166
+162
+161
+159
+159
+158
+159
+159
+160
+161
+161
+162
+162
+163
+163
+163
+163
+163
+162
+162
+162
+162
+161
+161
+161
+160
+160
+159
+159
+159
+158
+158
+158
+157
+157
+157
+156
+155
+154
+151
+148
+138
+128
+116
+102
+86
+65
+49
+35
+24
+15
+7
+5
+3
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+136
+146
+150
+151
+153
+157
+163
+163
+159
+153
+154
+169
+172
+160
+131
+135
+145
+150
+150
+148
+127
+82
+43
+15
+3
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+13
+42
+92
+166
+195
+208
+211
+212
+212
+212
+211
+210
+209
+207
+204
+202
+200
+197
+195
+195
+194
+194
+194
+195
+195
+195
+195
+195
+195
+195
+194
+194
+193
+193
+192
+191
+189
+186
+181
+177
+172
+168
+165
+162
+161
+161
+161
+162
+162
+163
+163
+163
+163
+163
+163
+163
+162
+162
+162
+161
+161
+160
+160
+159
+159
+158
+158
+158
+157
+156
+156
+155
+154
+153
+151
+147
+141
+133
+114
+99
+83
+66
+49
+29
+18
+11
+6
+2
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+137
+146
+150
+151
+154
+162
+164
+161
+156
+155
+168
+177
+163
+144
+135
+153
+155
+155
+153
+151
+146
+127
+86
+41
+10
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+2
+10
+30
+96
+151
+187
+207
+211
+211
+212
+212
+211
+210
+209
+208
+206
+204
+202
+199
+197
+196
+195
+195
+195
+196
+196
+196
+196
+196
+196
+197
+197
+197
+197
+197
+197
+197
+196
+195
+193
+192
+190
+187
+184
+181
+179
+176
+174
+172
+171
+171
+170
+170
+170
+169
+169
+169
+168
+167
+167
+166
+166
+165
+164
+163
+163
+162
+161
+160
+159
+157
+156
+154
+150
+144
+134
+120
+102
+77
+60
+44
+30
+18
+8
+4
+2
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+138
+146
+150
+153
+158
+167
+164
+160
+158
+162
+179
+179
+159
+140
+144
+157
+157
+156
+153
+150
+147
+139
+110
+69
+22
+3
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+4
+12
+49
+97
+145
+185
+206
+211
+211
+212
+212
+212
+210
+209
+208
+207
+205
+203
+201
+199
+198
+197
+196
+196
+196
+196
+196
+196
+197
+197
+197
+198
+198
+198
+198
+198
+198
+198
+197
+197
+196
+196
+194
+193
+191
+190
+189
+187
+185
+184
+183
+183
+182
+181
+181
+180
+180
+179
+178
+178
+177
+177
+175
+174
+172
+170
+169
+165
+162
+159
+156
+152
+144
+132
+115
+96
+76
+52
+37
+24
+14
+7
+3
+2
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+139
+147
+150
+154
+162
+169
+163
+161
+164
+174
+184
+174
+154
+140
+151
+160
+160
+157
+153
+149
+146
+143
+125
+91
+38
+5
+2
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+3
+20
+53
+97
+143
+183
+207
+210
+211
+212
+212
+211
+211
+210
+209
+208
+206
+205
+203
+201
+200
+199
+199
+198
+198
+197
+197
+197
+198
+198
+198
+199
+199
+199
+199
+199
+199
+199
+199
+199
+200
+199
+199
+198
+198
+198
+197
+196
+195
+194
+193
+192
+191
+191
+190
+189
+188
+187
+186
+185
+184
+181
+179
+177
+174
+171
+167
+162
+157
+150
+141
+123
+105
+86
+67
+50
+31
+20
+11
+5
+2
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+141
+147
+151
+156
+166
+170
+163
+164
+171
+185
+186
+166
+149
+142
+156
+163
+162
+157
+152
+147
+145
+143
+134
+107
+54
+9
+3
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+5
+21
+51
+92
+141
+189
+202
+209
+211
+211
+212
+211
+211
+210
+210
+209
+207
+206
+205
+204
+203
+202
+201
+200
+200
+199
+199
+199
+199
+200
+200
+200
+201
+201
+201
+200
+200
+201
+201
+201
+201
+201
+202
+202
+202
+202
+202
+202
+201
+201
+200
+199
+198
+197
+196
+194
+193
+191
+189
+186
+182
+179
+176
+172
+167
+159
+151
+142
+131
+116
+91
+72
+54
+39
+26
+15
+9
+4
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+143
+148
+152
+158
+170
+169
+164
+168
+177
+188
+186
+157
+145
+147
+159
+164
+163
+157
+151
+145
+143
+142
+137
+117
+70
+13
+4
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+5
+19
+44
+82
+147
+184
+203
+210
+210
+211
+212
+211
+211
+211
+210
+210
+209
+208
+207
+206
+205
+204
+203
+202
+202
+202
+202
+202
+202
+203
+203
+203
+203
+202
+202
+202
+202
+202
+201
+201
+202
+202
+203
+203
+204
+204
+204
+204
+204
+204
+203
+201
+200
+198
+195
+193
+190
+187
+184
+179
+175
+169
+162
+154
+137
+123
+107
+90
+73
+52
+37
+25
+15
+8
+5
+3
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+144
+148
+155
+163
+173
+166
+165
+173
+184
+189
+181
+150
+141
+147
+160
+161
+155
+149
+144
+143
+143
+142
+138
+122
+83
+19
+6
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+3
+10
+26
+68
+110
+150
+183
+204
+210
+211
+212
+212
+212
+212
+212
+211
+211
+211
+211
+211
+210
+210
+210
+209
+209
+208
+208
+208
+207
+207
+207
+206
+206
+205
+204
+203
+203
+202
+202
+202
+202
+203
+203
+203
+204
+204
+205
+205
+203
+201
+198
+195
+191
+185
+180
+172
+164
+154
+140
+128
+115
+102
+88
+71
+58
+44
+32
+23
+14
+10
+6
+2
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+144
+149
+157
+166
+173
+164
+165
+176
+187
+190
+173
+147
+141
+146
+155
+151
+147
+144
+143
+142
+141
+140
+137
+123
+88
+21
+7
+2
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+3
+9
+32
+60
+93
+127
+159
+189
+200
+206
+209
+211
+211
+212
+212
+212
+212
+212
+211
+211
+211
+211
+211
+211
+210
+210
+210
+209
+209
+208
+208
+207
+206
+205
+205
+204
+203
+202
+202
+202
+202
+203
+203
+202
+202
+201
+198
+191
+185
+178
+170
+161
+148
+138
+127
+116
+105
+89
+78
+67
+56
+45
+35
+26
+19
+13
+8
+5
+3
+2
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+146
+150
+159
+167
+170
+162
+167
+179
+189
+189
+164
+144
+139
+143
+146
+144
+142
+142
+141
+141
+139
+139
+136
+123
+90
+23
+8
+2
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+2
+11
+27
+48
+74
+104
+140
+161
+177
+189
+198
+204
+206
+208
+209
+209
+210
+210
+210
+210
+210
+210
+210
+210
+210
+209
+209
+209
+208
+208
+207
+206
+205
+204
+203
+202
+201
+201
+201
+201
+200
+199
+196
+192
+186
+178
+164
+154
+143
+131
+119
+103
+91
+80
+70
+60
+48
+39
+31
+24
+19
+13
+8
+6
+4
+2
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+147
+151
+159
+166
+166
+160
+170
+181
+190
+188
+156
+141
+138
+139
+139
+140
+141
+141
+140
+139
+138
+137
+135
+122
+90
+23
+8
+2
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+7
+18
+33
+52
+83
+106
+128
+147
+163
+176
+183
+188
+192
+195
+197
+199
+200
+201
+201
+202
+202
+202
+203
+203
+203
+203
+203
+203
+203
+202
+201
+201
+200
+199
+197
+196
+195
+193
+190
+184
+177
+168
+157
+144
+126
+112
+99
+86
+74
+59
+49
+40
+32
+25
+19
+14
+9
+6
+5
+2
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+147
+152
+160
+165
+162
+159
+174
+184
+189
+184
+148
+139
+136
+136
+137
+141
+141
+140
+139
+137
+137
+136
+133
+120
+87
+22
+7
+2
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+3
+8
+17
+34
+50
+66
+81
+96
+115
+128
+139
+149
+157
+165
+169
+172
+175
+178
+180
+182
+184
+186
+188
+189
+190
+191
+192
+192
+192
+192
+191
+190
+189
+187
+184
+179
+174
+166
+153
+140
+126
+112
+98
+80
+67
+55
+43
+33
+24
+18
+12
+8
+5
+4
+2
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+147
+152
+157
+159
+155
+159
+180
+187
+183
+172
+142
+137
+136
+138
+141
+141
+141
+140
+138
+137
+136
+136
+132
+115
+77
+17
+6
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+2
+6
+11
+18
+24
+31
+37
+41
+45
+50
+54
+60
+64
+67
+71
+74
+78
+81
+85
+89
+93
+100
+104
+108
+112
+115
+119
+121
+122
+122
+121
+117
+112
+106
+99
+91
+79
+70
+60
+50
+41
+30
+23
+17
+11
+6
+4
+2
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+145
+151
+154
+154
+152
+168
+183
+184
+176
+163
+141
+139
+139
+141
+142
+142
+141
+140
+140
+138
+137
+136
+130
+110
+67
+13
+4
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+2
+4
+6
+9
+11
+14
+15
+17
+18
+20
+22
+23
+25
+26
+28
+30
+31
+33
+35
+38
+41
+44
+47
+50
+53
+56
+58
+60
+61
+61
+59
+56
+53
+49
+45
+38
+33
+27
+22
+17
+11
+8
+6
+4
+2
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+142
+148
+150
+150
+153
+177
+183
+178
+167
+154
+141
+141
+142
+143
+142
+142
+142
+142
+142
+141
+139
+137
+128
+103
+55
+9
+3
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+2
+3
+3
+4
+4
+4
+4
+5
+5
+6
+6
+7
+8
+8
+9
+10
+11
+12
+14
+15
+17
+18
+20
+21
+22
+23
+23
+23
+22
+20
+19
+17
+14
+11
+9
+7
+5
+3
+2
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+138
+144
+147
+150
+158
+182
+179
+169
+157
+148
+143
+144
+143
+143
+143
+143
+145
+145
+145
+143
+141
+137
+123
+93
+43
+6
+2
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+2
+2
+2
+2
+3
+3
+3
+3
+4
+4
+4
+5
+5
+5
+5
+4
+4
+3
+2
+2
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+138
+142
+145
+153
+171
+181
+171
+159
+150
+145
+145
+144
+143
+143
+143
+146
+148
+149
+148
+146
+143
+138
+117
+81
+31
+4
+2
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+139
+143
+151
+162
+175
+168
+157
+150
+146
+145
+145
+143
+144
+146
+150
+156
+157
+155
+153
+149
+145
+136
+104
+62
+18
+2
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+142
+148
+158
+167
+170
+157
+150
+147
+146
+145
+143
+144
+148
+153
+157
+159
+158
+156
+153
+150
+146
+130
+92
+47
+12
+2
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+145
+153
+161
+165
+159
+149
+147
+146
+145
+144
+143
+149
+154
+158
+160
+160
+159
+157
+154
+152
+146
+120
+78
+35
+7
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+148
+157
+160
+158
+148
+145
+145
+145
+145
+144
+146
+155
+158
+159
+159
+159
+158
+157
+155
+153
+143
+108
+64
+24
+4
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+148
+157
+154
+147
+143
+144
+145
+145
+145
+144
+155
+158
+157
+156
+155
+157
+157
+157
+156
+153
+139
+93
+49
+15
+3
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+148
+148
+143
+138
+143
+144
+145
+144
+145
+148
+159
+153
+151
+150
+151
+153
+155
+156
+155
+151
+118
+68
+30
+7
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+143
+139
+137
+138
+143
+144
+145
+145
+147
+153
+155
+151
+149
+149
+150
+151
+152
+152
+149
+141
+92
+47
+18
+4
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+138
+134
+135
+138
+143
+145
+145
+145
+148
+154
+152
+150
+149
+149
+149
+149
+149
+147
+138
+121
+65
+29
+10
+2
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+134
+131
+134
+138
+143
+145
+145
+145
+148
+153
+151
+150
+149
+149
+148
+147
+145
+138
+123
+94
+40
+16
+4
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+130
+130
+134
+139
+143
+145
+144
+145
+148
+151
+150
+150
+149
+149
+148
+146
+140
+126
+101
+64
+19
+7
+2
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+128
+130
+134
+139
+144
+145
+144
+146
+149
+150
+151
+150
+150
+149
+148
+144
+129
+101
+67
+31
+6
+2
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+128
+130
+134
+139
+144
+145
+144
+146
+149
+150
+151
+151
+150
+148
+147
+141
+115
+81
+46
+17
+3
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+128
+130
+134
+139
+144
+145
+144
+146
+148
+150
+151
+150
+149
+148
+146
+135
+99
+61
+29
+8
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+128
+130
+134
+139
+145
+145
+144
+146
+148
+150
+151
+150
+148
+147
+145
+126
+82
+44
+16
+4
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+128
+130
+134
+140
+145
+145
+145
+146
+148
+150
+150
+149
+148
+146
+143
+112
+64
+28
+7
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+128
+130
+134
+139
+145
+145
+145
+146
+147
+149
+149
+148
+146
+143
+137
+87
+39
+13
+2
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+128
+129
+133
+139
+145
+145
+145
+146
+147
+149
+148
+146
+144
+140
+129
+62
+25
+7
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+128
+129
+133
+139
+145
+146
+146
+147
+148
+148
+147
+145
+143
+134
+112
+39
+14
+3
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+128
+128
+132
+138
+145
+146
+147
+147
+148
+147
+145
+144
+140
+124
+88
+21
+7
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+127
+128
+131
+137
+145
+146
+147
+147
+147
+145
+143
+142
+135
+111
+58
+7
+3
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+127
+127
+130
+136
+143
+146
+146
+145
+144
+142
+142
+139
+118
+78
+22
+2
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+127
+127
+130
+134
+139
+144
+143
+142
+142
+142
+141
+130
+93
+46
+9
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+127
+127
+130
+133
+137
+140
+140
+141
+141
+141
+137
+108
+64
+22
+3
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+128
+128
+129
+132
+135
+138
+139
+140
+140
+139
+123
+76
+35
+7
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+128
+128
+129
+132
+135
+136
+139
+140
+139
+136
+94
+39
+11
+2
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+129
+130
+131
+132
+134
+138
+139
+138
+129
+107
+29
+9
+2
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+130
+131
+132
+133
+136
+139
+138
+127
+101
+52
+10
+3
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+132
+133
+134
+136
+138
+137
+126
+97
+59
+18
+2
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+135
+135
+136
+137
+137
+125
+97
+57
+20
+3
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+137
+137
+137
+137
+134
+94
+44
+16
+3
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+136
+134
+125
+104
+66
+18
+6
+2
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+105
+88
+67
+45
+22
+6
+2
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+55
+41
+26
+13
+4
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+13
+7
+4
+2
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1
+1

Added: packages/libhdf4/branches/upstream/current/mfhdf/hrepack/info.txt
===================================================================
--- packages/libhdf4/branches/upstream/current/mfhdf/hrepack/info.txt	                        (rev 0)
+++ packages/libhdf4/branches/upstream/current/mfhdf/hrepack/info.txt	2007-05-15 09:53:05 UTC (rev 831)
@@ -0,0 +1 @@
+-t "dset4:GZIP 6" -c "dset4:2x2"

Added: packages/libhdf4/branches/upstream/current/mfhdf/hrepack/pal_rgb.h
===================================================================
--- packages/libhdf4/branches/upstream/current/mfhdf/hrepack/pal_rgb.h	                        (rev 0)
+++ packages/libhdf4/branches/upstream/current/mfhdf/hrepack/pal_rgb.h	2007-05-15 09:53:05 UTC (rev 831)
@@ -0,0 +1,267 @@
+
+
+#if !defined(_PAL_RGB_H)
+#define _PAL_RGB_H
+
+unsigned char pal_rgb[256*3] = {0,0,0,
+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,0,255,
+0,3,255,
+0,7,255,
+0,11,255,
+0,15,255,
+0,19,255,
+0,23,255,
+0,27,255,
+0,31,255,
+0,35,255,
+0,39,255,
+0,43,255,
+0,47,255,
+0,51,255,
+0,55,255,
+0,59,255,
+0,63,255,
+0,67,255,
+0,71,255,
+0,75,255,
+0,79,255,
+0,83,255,
+0,87,255,
+0,91,255,
+0,95,255,
+0,99,255,
+0,103,255,
+0,107,255,
+0,111,255,
+0,115,255,
+0,119,255,
+0,123,255,
+0,127,255,
+0,131,255,
+0,135,255,
+0,139,255,
+0,143,255,
+0,147,255,
+0,151,255,
+0,155,255,
+0,159,255,
+0,163,255,
+0,167,255,
+0,171,255,
+0,175,255,
+0,179,255,
+0,183,255,
+0,187,255,
+0,191,255,
+0,195,255,
+0,199,255,
+0,203,255,
+0,207,255,
+0,211,255,
+0,215,255,
+0,219,255,
+0,223,255,
+0,227,255,
+0,231,255,
+0,235,255,
+0,239,255,
+0,243,255,
+0,247,255,
+0,251,255,
+0,255,255,
+0,255,255,
+3,255,251,
+7,255,247,
+11,255,243,
+15,255,239,
+19,255,235,
+23,255,231,
+27,255,227,
+31,255,223,
+35,255,219,
+39,255,215,
+43,255,211,
+47,255,207,
+51,255,203,
+55,255,199,
+59,255,195,
+63,255,191,
+67,255,187,
+71,255,183,
+75,255,179,
+79,255,175,
+83,255,171,
+87,255,167,
+91,255,163,
+95,255,159,
+99,255,155,
+103,255,151,
+107,255,147,
+111,255,143,
+115,255,139,
+119,255,135,
+123,255,131,
+127,255,127,
+131,255,123,
+135,255,119,
+139,255,115,
+143,255,111,
+147,255,107,
+151,255,103,
+155,255,99,
+159,255,95,
+163,255,91,
+167,255,87,
+171,255,83,
+175,255,79,
+179,255,75,
+183,255,71,
+187,255,67,
+191,255,63,
+195,255,59,
+199,255,55,
+203,255,51,
+207,255,47,
+211,255,43,
+215,255,39,
+219,255,35,
+223,255,31,
+227,255,27,
+231,255,23,
+235,255,19,
+239,255,15,
+243,255,11,
+247,255,7,
+251,255,3,
+255,255,0,
+255,251,0,
+255,247,0,
+255,243,0,
+255,239,0,
+255,235,0,
+255,231,0,
+255,227,0,
+255,223,0,
+255,219,0,
+255,215,0,
+255,211,0,
+255,207,0,
+255,203,0,
+255,199,0,
+255,195,0,
+255,191,0,
+255,187,0,
+255,183,0,
+255,179,0,
+255,175,0,
+255,171,0,
+255,167,0,
+255,163,0,
+255,159,0,
+255,155,0,
+255,151,0,
+255,147,0,
+255,143,0,
+255,139,0,
+255,135,0,
+255,131,0,
+255,127,0,
+255,123,0,
+255,119,0,
+255,115,0,
+255,111,0,
+255,107,0,
+255,103,0,
+255,99,0,
+255,95,0,
+255,91,0,
+255,87,0,
+255,83,0,
+255,79,0,
+255,75,0,
+255,71,0,
+255,67,0,
+255,63,0,
+255,59,0,
+255,55,0,
+255,51,0,
+255,47,0,
+255,43,0,
+255,39,0,
+255,35,0,
+255,31,0,
+255,27,0,
+255,23,0,
+255,19,0,
+255,15,0,
+255,11,0,
+255,7,0,
+255,3,0,
+255,0,0,
+250,0,0,
+246,0,0,
+241,0,0,
+237,0,0,
+233,0,0,
+228,0,0,
+224,0,0,
+219,0,0,
+215,0,0,
+211,0,0,
+206,0,0,
+202,0,0,
+197,0,0,
+193,0,0,
+189,0,0,
+184,0,0,
+180,0,0,
+175,0,0,
+171,0,0,
+167,0,0,
+162,0,0,
+158,0,0,
+153,0,0,
+149,0,0,
+145,0,0,
+140,0,0,
+136,0,0,
+131,0,0,
+127,0,0
+};
+ 
+#endif
+
+
+

Added: packages/libhdf4/branches/upstream/current/mfhdf/hrepack/test_hrepack.sh
===================================================================
--- packages/libhdf4/branches/upstream/current/mfhdf/hrepack/test_hrepack.sh	                        (rev 0)
+++ packages/libhdf4/branches/upstream/current/mfhdf/hrepack/test_hrepack.sh	2007-05-15 09:53:05 UTC (rev 831)
@@ -0,0 +1,140 @@
+#! /bin/sh
+# Tests for the hrepack  tool
+
+HZIP=hrepack              # The tool name
+HZIP_BIN=`pwd`/$HZIP      # The path of the tool binary
+
+CMP='cmp -s'
+DIFF='diff -c'
+
+nerrors=0
+verbose=yes
+
+# The build (current) directory might be different than the source directory.
+if test -z "$srcdir"; then
+   srcdir=.
+fi
+
+test -d testfiles || mkdir testfiles
+
+
+
+# Print message with formats according to message level ($1)
+MESG() {
+  level=$1
+  shift
+  case $level in
+    0)
+      echo '============================='
+      echo $*
+      echo '============================='
+      ;;
+    3)
+      echo '-----------------------------'
+      echo $*
+      echo '-----------------------------'
+      ;;
+    6)
+      echo "*** $* ***"
+      ;;
+    *)
+      echo "MESG(): Unknown level ($level)"
+      exit 1
+      ;;
+  esac
+}
+
+
+# Report the result and exit
+FINISH()
+{
+    if [ $nerrors -eq 0 ]
+    then
+	MESG 0 "All hrepack tests passed"
+    else
+	MESG 0 "hrepack tests failed: $nerrors"
+    fi
+    exit $nerrors
+}
+
+
+
+# Print a line-line message left justified in a field of 70 characters
+# beginning with the word "Testing".
+#
+TESTING() {
+   SPACES="                                                               "
+   echo "Testing $* $SPACES" | cut -c1-70 | tr -d '\012'
+}
+
+# Run a test and print PASS or *FAIL*.  If a test fails then increment
+# the `nerrors' global variable and (if $verbose is set) display the
+# difference between the actual output and the expected output. The
+# expected output is given as the first argument to this function and
+# the actual output file is calculated by replacing the `.ddl' with
+# `.out'.  The actual output is not removed if $HDF_NOCLEANUP has a
+# non-zero value.
+#
+TOOLTEST() {
+   expect="$srcdir/testfiles/$1"
+   actual="testfiles/`basename $1 .txt`.out"
+   actual_err="testfiles/`basename $1 .txt`.err"
+   shift
+
+   # Run test.
+   # Tflops interprets "$@" as "" when no parameter is given (e.g., the
+   # case of missing file name).  Changed it to use $@ till Tflops fixes it.
+   TESTING $HDIFF $@
+   (
+      echo "#############################"
+      echo "Expected output for '$HDIFF $@'" 
+      echo "#############################"
+      cd $srcdir/testfiles
+      if [ "`uname -s`" = "TFLOPS O/S" ]; then
+        $RUNSERIAL $HDIFF_BIN $@
+      else
+        $RUNSERIAL $HDIFF_BIN "$@"
+      fi
+   ) >$actual 2>$actual_err
+   cat $actual_err >> $actual
+
+   if [ ! -f $expect ]; then
+   # Create the expect file if it doesn't yet exist.
+      echo " CREATED"
+      cp $actual $expect
+   elif $CMP $expect $actual; then
+      echo " PASSED"
+   else
+      echo "*FAILED*"
+      echo "    Expected result (*.txt) differs from actual result (*.out)"
+      nerrors="`expr $nerrors + 1`"
+      test yes = "$verbose" && $DIFF $expect $actual |sed 's/^/    /'
+   fi
+
+   # Clean up output file
+     if test -z "$HDF_NOCLEANUP"; then
+     rm -f $actual $actual_err
+     fi
+}
+
+##############################################################################
+##############################################################################
+###			  T H E   T E S T S                                            ###
+##############################################################################
+##############################################################################
+
+
+# Print a beginning banner
+MESG 0 "Running hrepack tests"
+
+# just run the program test_hrepack; this has several runs with 
+# different compression and chunking options
+./test_hrepack
+
+# save the exit code from the run
+exit_code=$?
+nerrors=$exit_code
+
+# End of test, return exit code
+FINISH
+


Property changes on: packages/libhdf4/branches/upstream/current/mfhdf/hrepack/test_hrepack.sh
___________________________________________________________________
Name: svn:executable
   + *

Added: packages/libhdf4/branches/upstream/current/mfhdf/hrepack/test_hrepack_add.c
===================================================================
--- packages/libhdf4/branches/upstream/current/mfhdf/hrepack/test_hrepack_add.c	                        (rev 0)
+++ packages/libhdf4/branches/upstream/current/mfhdf/hrepack/test_hrepack_add.c	2007-05-15 09:53:05 UTC (rev 831)
@@ -0,0 +1,1589 @@
+/****************************************************************************
+ * NCSA HDF                                                                 *
+ * Software Development Group                                               *
+ * National Center for Supercomputing Applications                          *
+ * University of Illinois at Urbana-Champaign                               *
+ * 605 E. Springfield, Champaign IL 61820                                   *
+ *                                                                          *
+ * For conditions of distribution and use, see the accompanying             *
+ * hdf/COPYING file.                                                        *
+ *                                                                          *
+ ****************************************************************************/
+
+
+#include "hdf.h"
+#include "mfhdf.h"
+
+#include "hrepack.h"
+#include "pal_rgb.h"
+#include "test_hrepack_add.h"
+
+
+
+/* globals for read image data, used in gr, r8 and r24 add */
+int      X_LENGTH;
+int      Y_LENGTH;
+int      N_COMPS;
+unsigned char *image_data = 0;   
+
+
+
+static void set_chunk_def( int32 comp_type, 
+                           int32 *dim,
+                           int32 ncomps,
+                           int32 bits_per_pixel, /* for szip */
+                           HDF_CHUNK_DEF *chunk_def );
+
+
+/*-------------------------------------------------------------------------
+ * Function: add_gr_ffile
+ *
+ * Purpose: utility function to read an image data file and save the image with the
+ *  GR - Multifile General Raster Image Interface,
+ *  optionally inserting the image into the group VGROUP_ID
+ *
+ * Return: int
+ *
+ * Programmer: Pedro Vicente, pvn at ncsa.uiuc.edu
+ *
+ * Date: July 3, 2003
+ *
+ *-------------------------------------------------------------------------
+ */
+
+int add_gr_ffile(const char* name_file,
+                  int32 gr_id,
+                  const char* gr_name,
+                  int32 interlace_mode,
+                  int32 file_id,
+                  int32 vgroup_id)
+{
+ int32  ri_id,          /* raster image identifier */
+        gr_ref,         /* reference number of the GR image */
+        start[2],       /* start position to write for each dimension */
+        edges[2],       /* number of elements to be written along each dimension */
+        dim_gr[2],      /* dimension sizes of the image array */
+        data_type;      /* data type of the image data */
+ char   *srcdir = getenv("srcdir"); /* the source directory */
+ char   data_file[512]="";          /* buffer to hold name of existing data file */
+ uint8  attr_values[2]={1,2};
+ int    n_values;
+ 
+ /* compose the name of the file to open, using the srcdir, if appropriate */
+ if ( srcdir )
+ {
+  strcpy(data_file, srcdir);
+  strcat(data_file, "/");
+ }
+ strcat( data_file, name_file);
+ if ( read_data(data_file)>0)
+ {
+  /* set the data type, interlace mode, and dimensions of the image */
+  data_type = DFNT_UINT8;
+  dim_gr[0] = X_LENGTH;
+  dim_gr[1] = Y_LENGTH;
+  
+  /* create the raster image array */
+  if ((ri_id = GRcreate (gr_id, gr_name, N_COMPS, data_type, interlace_mode, dim_gr))== FAIL)
+  {
+   printf("Error: Could not create GR <%s>\n", gr_name);
+   return FAIL;
+  }
+  
+  /* define the size of the data to be written */
+  start[0] = start[1] = 0;
+  edges[0] = X_LENGTH;
+  edges[1] = Y_LENGTH;
+  
+  
+  /* write the data in the buffer into the image array */
+  if (GRwriteimage(ri_id, start, NULL, edges, (VOIDP)image_data)==FAIL)
+  {
+   printf("Error: Could not write GR <%s>\n", gr_name);
+  }
+
+  /* assign an attribute to the SDS */
+  n_values = 2;
+  if(GRsetattr(ri_id, "Myattr", DFNT_UINT8, n_values, (VOIDP)attr_values)==FAIL)
+  {
+   printf("Error: Could not write attributes for GR <%s>\n", gr_name);
+   return FAIL;
+  }
+  
+  /* obtain the reference number of the GR using its identifier */
+  gr_ref = GRidtoref (ri_id);
+
+
+#if defined( HZIP_DEBUG)
+  printf("add_gr %d\n",gr_ref); 
+#endif
+  
+  /* add the GR to the vgroup. the tag DFTAG_RIG is used */
+  if (vgroup_id) {
+   if (Vaddtagref (vgroup_id, TAG_GRP_IMAGE, gr_ref)==FAIL)
+   {
+    printf("Error: Could not add GR <%s> to group\n", gr_name);
+    return FAIL;
+   }
+  }
+   
+   /* terminate access to the raster image */
+   if (GRendaccess (ri_id)==FAIL)
+   {
+    printf("Error: Could not close GR <%s>\n", gr_name);
+    return FAIL;
+   }
+ 
+   /* add an annotation and label to the object */
+   if (add_an(file_id, DFTAG_RI, gr_ref)<0)
+    return FAIL;
+
+ }  /* read data */
+
+ if ( image_data )
+ {
+  free( image_data );
+  image_data=NULL;
+ }
+
+ return SUCCESS;
+}
+
+
+/*-------------------------------------------------------------------------
+ * Function: add_gr
+ *
+ * Purpose: utility function to write images with the
+ *  GR - Multifile General Raster Image Interface,
+ *  optionally inserting the image into the group VGROUP_ID
+ *
+ * Return: int
+ *
+ * Programmer: Pedro Vicente, pvn at ncsa.uiuc.edu
+ *
+ * Date: August 18, 2003
+ *
+ *-------------------------------------------------------------------------
+ */
+
+/* dimensions of image */
+#define X_DIM_GR     60
+#define Y_DIM_GR     400
+
+int add_gr(const char* gr_name,     /* gr name */
+            int32 file_id,           /* file ID */
+            int32 gr_id,             /* GR ID */
+            int32 vgroup_id,         /* group ID */
+            int32 chunk_flags,       /* chunk flags */
+            comp_coder_t comp_type,  /* compression flag */
+            comp_info *comp_info     /* compression structure */ )
+{
+ int32  ri_id,          /* raster image identifier */
+        gr_ref,         /* reference number of the GR image */
+        start[2],       /* start position to write for each dimension */
+        edges[2],       /* number of elements to be written along each dimension */
+        dim_gr[2],      /* dimension sizes of the image array */
+        interlace_mode, /* interlace mode of the image */
+        data_type,      /* data type of the image data */
+        data[Y_DIM_GR][X_DIM_GR];
+ int    i, j, n=0, ncomps=1;
+ HDF_CHUNK_DEF chunk_def;           /* Chunking definitions */ 
+ 
+ /* set the data type, interlace mode, and dimensions of the image */
+ data_type = DFNT_UINT32;
+ interlace_mode = MFGR_INTERLACE_PIXEL;
+ dim_gr[0] = Y_DIM_GR;
+ dim_gr[1] = X_DIM_GR;
+
+ /* data set data initialization */
+ for (j = 0; j < Y_DIM_GR; j++) {
+  for (i = 0; i < X_DIM_GR; i++)
+   data[j][i] = n++;
+ }
+
+ /*define some compression specific parameters */
+ switch(comp_type)
+ {
+ default:
+  break;
+ case COMP_CODE_RLE:
+  break;
+
+ case COMP_CODE_SKPHUFF:
+  comp_info->skphuff.skp_size = 1;
+  break;
+
+ case COMP_CODE_DEFLATE:
+  comp_info->deflate.level = 6;
+  break;
+  
+ case COMP_CODE_SZIP:
+#ifdef H4_GR_SZIP
+/* not supported for GR */
+#ifdef H4_HAVE_LIBSZ
+  if (SZ_encoder_enabled()) {
+  comp_info->szip.pixels_per_block = 2;
+  comp_info->szip.options_mask = SZ_EC_OPTION_MASK;
+  comp_info->szip.options_mask |= SZ_RAW_OPTION_MASK;
+  comp_info->szip.pixels = 0;
+   comp_info->szip.pixels_per_scanline = 0;
+  comp_info->szip.bits_per_pixel = 0;
+  } else {
+  printf("Warning: SZIP encoding not available\n");
+  }
+#else
+  printf("Warning: SZIP compression not available\n");
+#endif
+#endif
+  printf("Warning: SZIP compression not available for GR\n");
+  break;
+ }
+ 
+ /* create the raster image array */
+ if ((ri_id = GRcreate (gr_id, gr_name, ncomps, data_type, interlace_mode, dim_gr))== FAIL)
+ {
+  printf("Error: Could not create GR <%s>\n", gr_name);
+  return FAIL;
+ }
+
+ /* set chunk */
+ if ( (chunk_flags == HDF_CHUNK) || (chunk_flags == (HDF_CHUNK | HDF_COMP)) )
+ {
+  /* Define chunk's dimensions */
+  chunk_def.chunk_lengths[0] = Y_DIM_GR/2;
+  chunk_def.chunk_lengths[1] = X_DIM_GR/2;
+  /* To use chunking with RLE, Skipping Huffman, and GZIP compression */
+  chunk_def.comp.chunk_lengths[0] = Y_DIM_GR/2;
+  chunk_def.comp.chunk_lengths[1] = X_DIM_GR/2;
+
+  /*define some compression specific parameters */
+  switch(comp_type)
+  {
+  default:
+   break;
+  case COMP_CODE_RLE:
+   chunk_def.comp.comp_type = COMP_CODE_RLE;
+   break;
+   
+  case COMP_CODE_SKPHUFF:
+   chunk_def.comp.comp_type = COMP_CODE_SKPHUFF;
+   chunk_def.comp.cinfo.skphuff.skp_size = 1;
+   break;
+   
+  case COMP_CODE_DEFLATE:
+   /* GZIP compression, set compression type, flag and deflate level*/
+   chunk_def.comp.comp_type = COMP_CODE_DEFLATE;
+   chunk_def.comp.cinfo.deflate.level = 6;
+   break;
+   
+  case COMP_CODE_SZIP:
+#ifdef H4_GR_SZIP
+#ifdef H4_HAVE_LIBSZ
+  if (SZ_encoder_enabled()) {
+   chunk_def.comp.cinfo.szip.pixels_per_block = 2;
+   chunk_def.comp.cinfo.szip.options_mask = SZ_EC_OPTION_MASK;
+   chunk_def.comp.cinfo.szip.options_mask |= SZ_RAW_OPTION_MASK;
+   chunk_def.comp.cinfo.szip.pixels = 0;
+    chunk_def.comp.cinfo.szip.pixels_per_scanline = 0;
+   chunk_def.comp.cinfo.szip.bits_per_pixel = 0;
+  } else {
+  printf("Warning: SZIP encoding not available\n");
+  }
+#else
+  printf("Warning: SZIP compression not available\n");
+#endif
+#endif
+  printf("Warning: SZIP compression not available for GR\n");
+   break;
+  }
+  if(GRsetchunk (ri_id, chunk_def, chunk_flags)==FAIL)
+  {
+   printf("Error: Could not set chunk for GR <%s>\n", gr_name);
+   return FAIL;
+  }
+ }
+ 
+ /* use compress without chunk-in */
+ else if ( (chunk_flags==HDF_NONE || chunk_flags==HDF_CHUNK) && 
+  comp_type>COMP_CODE_NONE && comp_type<COMP_CODE_INVALID)
+ {
+  if(GRsetcompress (ri_id, comp_type, comp_info)==FAIL)
+  {
+   printf("Error: Could not set compress for GR <%s>\n", gr_name);
+   return FAIL;
+  }
+ }
+
+ 
+ /* define the size of the data to be written */
+ start[0] = start[1] = 0;
+ edges[0] = Y_DIM_GR;
+ edges[1] = X_DIM_GR;
+ 
+ /* write the data in the buffer into the image array */
+ if (GRwriteimage(ri_id, start, NULL, edges, (VOIDP)data)==FAIL)
+ {
+  printf("Error: Could not set write GR <%s>\n", gr_name);
+  return FAIL;
+ }
+   
+ /* obtain the reference number of the GR using its identifier */
+ gr_ref = GRidtoref (ri_id);
+ 
+#if defined( HZIP_DEBUG)
+ printf("add_gr %d\n",gr_ref); 
+#endif
+ 
+ /* add the GR to the vgroup. the tag DFTAG_RIG is used */
+ if (vgroup_id)
+  if (Vaddtagref (vgroup_id, TAG_GRP_IMAGE, gr_ref)==FAIL)
+  {
+   printf("Error: Could not add GR <%s> to group\n", gr_name);
+   return FAIL;
+  }
+ 
+ /* terminate access to the raster image */
+ if (GRendaccess (ri_id)==FAIL)
+ {
+  printf("Error: Could not close GR <%s>\n", gr_name);
+  return FAIL;
+ }
+
+ /* add an annotation and label to the object */
+ if (add_an(file_id, DFTAG_RI, gr_ref)<0)
+  return FAIL;
+
+ return SUCCESS;
+ 
+}
+
+/*-------------------------------------------------------------------------
+ * Function: add_glb_attrs
+ *
+ * Purpose: utility function to write global attributes
+ *
+ * Return: int
+ *
+ * Programmer: Pedro Vicente, pvn at ncsa.uiuc.edu
+ *
+ * Date: July 30, 2003
+ *
+ *-------------------------------------------------------------------------
+ */
+
+int add_glb_attrs(const char *fname,
+                   int32 file_id,
+                   int32 sd_id,
+                   int32 gr_id)
+                   
+{
+ uint8 attr_values[2]={1,2};
+ int   n_values=2;
+     
+/*-------------------------------------------------------------------------
+ * make SDS global attributes
+ *-------------------------------------------------------------------------
+ */ 
+ /* assign an attribute to the SD */
+ if (SDsetattr(sd_id, "MySDgattr", DFNT_UINT8, n_values, (VOIDP)attr_values)==FAIL){
+  printf("Could not set SDS attr\n");
+  return FAIL;
+ }
+
+/*-------------------------------------------------------------------------
+ * make GR global attributes
+ *-------------------------------------------------------------------------
+ */ 
+
+ /* assign an attribute to the GR */
+ if (GRsetattr(gr_id, "MyGRgattr", DFNT_UINT8, n_values, (VOIDP)attr_values)==FAIL){
+  printf("Could not set GR attr\n");
+  return FAIL;
+ }
+
+ return SUCCESS;
+}
+
+
+/*-------------------------------------------------------------------------
+ * Function: add_r8
+ *
+ * Purpose: utility function to read an image data file and save the image with the
+ *  DFR8 - Single-file 8-Bit Raster Image Interface,
+ *  optionally inserting the image into the group VGROUP_ID
+ *
+ * Return: int
+ *
+ * Programmer: Pedro Vicente, pvn at ncsa.uiuc.edu
+ *
+ * Date: July 3, 2003
+ *
+ *-------------------------------------------------------------------------
+ */
+
+int add_r8(const char* image_file,
+            const char *fname,
+            int32 file_id,
+            int32 vgroup_id)
+{
+ int32  ri_ref;         /* reference number of the GR image */
+ char   *srcdir = getenv("srcdir"); /* the source directory */
+ char   data_file[512]="";          /* buffer to hold name of existing data file */
+ 
+ /* compose the name of the file to open, using the srcdir, if appropriate */
+ if ( srcdir )
+ {
+  strcpy(data_file, srcdir);
+  strcat(data_file, "/");
+ }
+ strcat( data_file, image_file);
+ if ( read_data(data_file)>0)
+ {
+  /* add a palette */
+  if (DFR8setpalette(pal_rgb)==FAIL){
+   printf( "Could not set palette for image\n");
+   return FAIL;
+  }
+
+  /* write the image */
+  if (DFR8addimage(fname, image_data, X_LENGTH, Y_LENGTH, 0)==FAIL){
+   printf( "Could not write palette for image\n");
+   return FAIL;
+  }
+  
+  /* obtain the reference number of the RIS8 */
+  ri_ref = DFR8lastref();
+
+#if defined( HZIP_DEBUG)
+  printf("add_r8 %d\n",ri_ref); 
+#endif
+  
+  /* add the image to the vgroup. the tag DFTAG_RIG is used */
+  if (vgroup_id)
+   if (Vaddtagref (vgroup_id, TAG_GRP_IMAGE, ri_ref)==FAIL){
+   printf( "Could not add image to group\n");
+   return FAIL;
+  }
+
+  /* add an annotation and label to the object */
+  if (add_an(file_id, TAG_GRP_IMAGE, ri_ref)<0)
+   return FAIL;
+ }
+
+ if ( image_data )
+ {
+  free( image_data );
+  image_data=NULL;
+ }
+
+ return SUCCESS;
+}
+
+
+/*-------------------------------------------------------------------------
+ * Function: add_r24
+ *
+ * Purpose: utility function to read an image data file and save the image with the
+ *  DF24 - Single-file 24-Bit Raster Image Interface,
+ *  optionally inserting the image into the group VGROUP_ID
+ *
+ * Return: int
+ *
+ * Programmer: Pedro Vicente, pvn at ncsa.uiuc.edu
+ *
+ * Date: July 3, 2003
+ *
+ *-------------------------------------------------------------------------
+ */
+
+int add_r24(const char* image_file,
+             const char *fname,
+             int32 file_id,
+             intn il,
+             int32 vgroup_id)
+{
+ int32  ri_ref;         /* reference number of the GR image */
+ char   *srcdir = getenv("srcdir"); /* the source directory */
+ char   data_file[512]="";          /* buffer to hold name of existing data file */
+ 
+ /* compose the name of the file to open, using the srcdir, if appropriate */
+ if ( srcdir )
+ {
+  strcpy(data_file, srcdir);
+  strcat(data_file, "/");
+ }
+ strcat( data_file, image_file);
+ if ( read_data(data_file)>0)
+ {
+  /* set pixel interlace */
+  if (DF24setil(il)==FAIL){
+   printf( "Could not set interlace for image\n");
+   return FAIL;
+  }
+
+  /* write the image */
+  if (DF24addimage(fname, image_data, X_LENGTH, Y_LENGTH)==FAIL){
+   printf( "Could not write image\n");
+   return FAIL;
+  }
+  
+  /* obtain the reference number of the RIS24 */
+  ri_ref = DF24lastref();
+
+#if defined( HZIP_DEBUG)
+  printf("add_r24 %d\n",ri_ref); 
+#endif
+  
+  /* add the image to the vgroup. the tag DFTAG_RIG is used */
+  if (vgroup_id)
+   if (Vaddtagref (vgroup_id, TAG_GRP_IMAGE, ri_ref)==FAIL){
+   printf( "Could not set group for image\n");
+   return FAIL;
+  }
+
+  /* add an annotation and label to the object */
+  if (add_an(file_id, TAG_GRP_IMAGE, ri_ref)<0)
+   return FAIL;
+ }
+
+ if ( image_data )
+ {
+  free( image_data );
+  image_data=NULL;
+ }
+
+ return SUCCESS;
+}
+
+
+
+/*-------------------------------------------------------------------------
+ * Function: add_sd
+ *
+ * Purpose: utility function to write with
+ *  SD - Multifile Scientific Data Interface,
+ *  optionally :
+ *   1)inserting the SD into the group VGROUP_ID
+ *   2)making the dataset chunked and/or compressed
+ *
+ * Return: int
+ *
+ * Programmer: Pedro Vicente, pvn at ncsa.uiuc.edu
+ *
+ * Date: July 3, 2003
+ *
+ *-------------------------------------------------------------------------
+ */
+
+
+/* dimensions of dataset */
+#define X_DIM      20
+#define Y_DIM      800
+#define Z_DIM      2
+
+
+int add_sd(const char *fname,       /* file name */
+            int32 file_id,           /* file ID */
+            int32 sd_id,             /* SD id */
+            const char* sds_name,    /* sds name */
+            int32 vgroup_id,         /* group ID */
+            int32 chunk_flags,       /* chunk flags */
+            comp_coder_t comp_type,  /* compression flag */
+            comp_info *comp_info     /* compression structure */ )
+
+{
+ int32  sds_id,       /* data set identifier */
+        sds_ref,      /* reference number of the data set */
+        dim_sds[2],   /* dimension of the data set */
+        rank = 2,     /* rank of the data set array */
+        n_values,     /* number of values of attribute */
+        dim_index,    /* dimension index */
+        dim_id,       /* dimension ID */
+        start[2],     /* write start */
+        edges[2],     /* write edges */
+        fill_value=2, /* fill value */
+        data[Y_DIM][X_DIM],
+        bits_per_pixel=32;
+ float32 sds_values[2] = {2., 10.}; /* values of the SDS attribute  */
+ int16   data_X[X_DIM];             /* X dimension dimension scale */
+ float64 data_Y[Y_DIM];             /* Y dimension dimension scale */
+ int     i, j;
+ HDF_CHUNK_DEF chunk_def;           /* Chunking definitions */ 
+
+ /* set the size of the SDS's dimension */
+ dim_sds[0] = Y_DIM;
+ dim_sds[1] = X_DIM;
+
+ /*define some compression specific parameters */
+ switch(comp_type)
+ {
+ default:
+  break;
+ case COMP_CODE_RLE:
+  break;
+
+ case COMP_CODE_SKPHUFF:
+  comp_info->skphuff.skp_size = 1;
+  break;
+
+ case COMP_CODE_DEFLATE:
+  comp_info->deflate.level = 6;
+  break;
+  
+ case COMP_CODE_SZIP:
+#ifdef H4_HAVE_LIBSZ
+  if (SZ_encoder_enabled()) {
+  comp_info->szip.pixels_per_block = 2;
+  comp_info->szip.options_mask = SZ_EC_OPTION_MASK;
+  comp_info->szip.options_mask |= SZ_RAW_OPTION_MASK;
+  comp_info->szip.pixels = 0;
+  comp_info->szip.pixels_per_scanline = 0;
+  comp_info->szip.bits_per_pixel = 0;
+  } else {
+  printf("Warning: SZIP encoding not available\n");
+  }
+#else
+  printf("Warning: SZIP compression not available\n");
+#endif
+  break;
+ }
+ 
+ /* data set data initialization */
+ for (j = 0; j < Y_DIM; j++) {
+  for (i = 0; i < X_DIM; i++)
+   data[j][i] = (i + j) + 1;
+ }
+/* initialize dimension scales */
+ for (i=0; i < X_DIM; i++) data_X[i] = i;
+ for (i=0; i < Y_DIM; i++) data_Y[i] = 0.1 * i;
+ 
+ /* create the SDS */
+ if ((sds_id = SDcreate (sd_id, sds_name, DFNT_INT32, rank, dim_sds))<0)
+ {
+   printf( "Could not create SDS <%s>\n",sds_name);
+   return FAIL;
+ }
+
+ /* set chunk */
+ if ( (chunk_flags == HDF_CHUNK) || (chunk_flags == (HDF_CHUNK | HDF_COMP)) )
+ {
+  set_chunk_def(comp_type, 
+                dim_sds,
+                1,
+                bits_per_pixel,
+                &chunk_def);
+  if (SDsetchunk (sds_id, chunk_def, chunk_flags)==FAIL)  {
+   printf( "Failed to set chunk for SDS <%s>\n", sds_name);
+   goto fail;
+  }
+ }
+ 
+ /* use compress without chunk-in */
+ else if ( chunk_flags==HDF_NONE && 
+           comp_type>COMP_CODE_NONE && comp_type<COMP_CODE_INVALID)
+ {
+  if(SDsetcompress (sds_id, comp_type, comp_info)==FAIL){
+   printf( "Failed to set compress for SDS <%s>\n", sds_name);
+   goto fail;
+  } 
+ }
+
+ /* set a fill value */
+ if (SDsetfillvalue (sds_id, (VOIDP)&fill_value)==FAIL){
+   printf( "Failed to set fillvaclue for SDS <%s>\n", sds_name);
+   goto fail;
+  } 
+  
+ /* define the location and size of the data to be written to the data set */
+ start[0] = 0;
+ start[1] = 0;
+ edges[0] = Y_DIM;
+ edges[1] = X_DIM;
+ 
+ /* write the stored data to the data set */
+ if (SDwritedata (sds_id, start, NULL, edges, (VOIDP)data)==FAIL){
+   printf( "Failed to set write for SDS <%s>\n", sds_name);
+   goto fail;
+  } 
+
+/* assign an attribute to the SDS */
+ n_values = 2;
+ if (SDsetattr(sds_id,"Valid_range",DFNT_FLOAT32,n_values,(VOIDP)sds_values)==FAIL){
+   printf( "Failed to set attr for SDS <%s>\n", sds_name);
+   goto fail;
+  } 
+   
+/*  For each dimension of the data set specified in SDS_NAME,
+ *  get its dimension identifier and set dimension name
+ *  and dimension scale. Note that data type of dimension scale 
+ *  can be different between dimensions and can be different from 
+ *  SDS data type.
+ */
+ for (dim_index = 0; dim_index < rank; dim_index++) 
+ {
+ /* select the dimension at position dim_index */
+  dim_id = SDgetdimid (sds_id, dim_index);
+  
+ /* assign name and dimension scale to selected dimension */
+  switch (dim_index)
+  {
+  case 0: 
+   n_values = Y_DIM;
+   
+   if (SDsetdimname (dim_id, "Y_Axis")==FAIL){
+    printf( "Failed to set dims for SDS <%s>\n", sds_name);
+    goto fail;
+   } 
+   if (SDsetdimscale (dim_id,n_values,DFNT_FLOAT64,(VOIDP)data_Y)==FAIL){
+    printf( "Failed to set dims for SDS <%s>\n", sds_name);
+    goto fail;
+   }   
+   if (SDsetattr (dim_id, "info", DFNT_CHAR8, 7,"meters")==FAIL){
+    printf( "Failed to set dims for SDS <%s>\n", sds_name);
+    goto fail;
+   } 
+   break;
+  case 1: 
+   n_values = X_DIM; 
+
+   if (SDsetdimname (dim_id, "X_Axis")==FAIL){
+    printf( "Failed to set dims for SDS <%s>\n", sds_name);
+    goto fail;
+   } 
+   if (SDsetdimscale (dim_id,n_values,DFNT_INT16,(VOIDP)data_X)==FAIL){
+    printf( "Failed to set dims for SDS <%s>\n", sds_name);
+    goto fail;
+   } 
+   if (SDsetattr (dim_id, "info", DFNT_CHAR8, 5,"feet")==FAIL){
+    printf( "Failed to set dims for SDS <%s>\n", sds_name);
+    goto fail;
+   } 
+   break;
+  default: 
+   break;
+  }
+ }
+
+ /* obtain the reference number of the SDS using its identifier */
+ sds_ref = SDidtoref (sds_id);
+ 
+#if defined( HZIP_DEBUG)
+ printf("add_sd %d\n",sds_ref); 
+#endif
+ 
+ /* add the SDS to the vgroup. the tag DFTAG_NDG is used */
+ if (vgroup_id)
+  if (Vaddtagref (vgroup_id, TAG_GRP_DSET, sds_ref)==FAIL){
+    printf( "Failed to add ref for SDS <%s>\n", sds_name);
+    goto fail;
+   } 
+ 
+ /* add an annotation and label to the object */
+ add_an(file_id, TAG_GRP_DSET, sds_ref);
+
+ /* terminate access to the SDS */
+ if (SDendaccess (sds_id)==FAIL){
+  printf( "Failed to end SDS <%s>\n", sds_name);
+  goto fail;
+ } 
+
+ return SUCCESS;
+
+fail:
+ SDendaccess (sds_id);
+ return FAIL;
+}
+
+
+/*-------------------------------------------------------------------------
+ * Function: add_sd3d
+ *
+ * Purpose: utility function to write with
+ *  SD - Multifile Scientific Data Interface,
+ *  optionally :
+ *   1)inserting the SD into the group VGROUP_ID
+ *   2)making the dataset chunked and/or compressed
+ *
+ * Return: int
+ *
+ * Programmer: Pedro Vicente, pvn at ncsa.uiuc.edu
+ *
+ * Date: July 3, 2003
+ *
+ *-------------------------------------------------------------------------
+ */
+
+int add_sd3d(const char *fname,       /* file name */
+              int32 file_id,           /* file ID */
+              int32  sd_id,            /* SD interface identifier */
+              const char* sds_name,    /* sds name */
+              int32 vgroup_id,         /* group ID */
+              int32 chunk_flags,       /* chunk flags */
+              comp_coder_t comp_type,  /* compression flag */
+              comp_info *comp_info     /* compression structure */ )
+
+{
+ int32  sds_id,       /* data set identifier */
+        sds_ref,      /* reference number of the data set */
+        dim_sds[3],   /* dimension of the data set */
+        rank = 3,     /* rank of the data set array */
+        start[3],     /* write start */
+        fill_value=2, /* fill value */
+        data[Z_DIM][Y_DIM][X_DIM];
+ int    i, j, k;
+ HDF_CHUNK_DEF chunk_def;           /* Chunking definitions */ 
+ 
+ 
+ /* Define chunk's dimensions */
+ chunk_def.chunk_lengths[0] = Z_DIM/2;
+ chunk_def.chunk_lengths[1] = Y_DIM/2;
+ chunk_def.chunk_lengths[2] = X_DIM/2;
+ /* To use chunking with RLE, Skipping Huffman, and GZIP compression */
+ chunk_def.comp.chunk_lengths[0] = Y_DIM/2;
+ chunk_def.comp.chunk_lengths[1] = Y_DIM/2;
+ chunk_def.comp.chunk_lengths[2] = X_DIM/2;
+ 
+ /* GZIP compression, set compression type, flag and deflate level*/
+ chunk_def.comp.comp_type = COMP_CODE_DEFLATE;
+ chunk_def.comp.cinfo.deflate.level = 6;             
+
+ /* data set data initialization */
+ for (k = 0; k < Z_DIM; k++){
+  for (j = 0; j < Y_DIM; j++) 
+   for (i = 0; i < X_DIM; i++)
+    data[k][j][i] = (i + j) + 1;
+ }
+ 
+ /* set the size of the SDS's dimension */
+ dim_sds[0] = Z_DIM;
+ dim_sds[1] = Y_DIM;
+ dim_sds[2] = X_DIM;
+ 
+ /* create the SDS */
+ if ((sds_id = SDcreate (sd_id, sds_name, DFNT_INT32, rank, dim_sds))<0)
+ {
+   printf( "Could not create SDS <%s>\n",sds_name);
+   return FAIL;
+ }
+
+ /* set chunk */
+ if ( (chunk_flags == HDF_CHUNK) || (chunk_flags == (HDF_CHUNK | HDF_COMP)) )
+ {
+  if (SDsetchunk (sds_id, chunk_def, chunk_flags)==FAIL){
+   printf( "Failed to set chunk for SDS <%s>\n", sds_name);
+   goto fail;
+  } 
+ }
+ 
+ /* use compress without chunk-in */
+ else if ( (chunk_flags==HDF_NONE) && 
+            comp_type>COMP_CODE_NONE && comp_type<COMP_CODE_INVALID)
+ {
+  if (SDsetcompress (sds_id, comp_type, comp_info)==FAIL){
+   printf( "Failed to set compress for SDS <%s>\n", sds_name);
+   goto fail;
+  }  
+ }
+
+ /* set a fill value */
+ if (SDsetfillvalue (sds_id, (VOIDP)&fill_value)==FAIL){
+  printf( "Failed to set fill for SDS <%s>\n", sds_name);
+  goto fail;
+ } 
+  
+ /* define the location and size of the data to be written to the data set */
+ start[0] = 0;
+ start[1] = 0;
+ start[2] = 0;
+ 
+ /* write the stored data to the data set */
+ if (SDwritedata (sds_id, start, NULL, dim_sds, (VOIDP)data)==FAIL){
+  printf( "Failed to write SDS <%s>\n", sds_name);
+  goto fail;
+ } 
+
+ /* obtain the reference number of the SDS using its identifier */
+ sds_ref = SDidtoref (sds_id);
+ 
+#if defined( HZIP_DEBUG)
+ printf("add_sd %d\n",sds_ref); 
+#endif
+ 
+ /* add the SDS to the vgroup. the tag DFTAG_NDG is used */
+ if (vgroup_id)
+  if (Vaddtagref (vgroup_id, TAG_GRP_DSET, sds_ref)==FAIL){
+  printf( "Failed to set ref for SDS <%s>\n", sds_name);
+  goto fail;
+ } 
+
+ /* add an annotation and label to the object */
+ add_an(file_id, TAG_GRP_DSET, sds_ref);
+ 
+ /* terminate access to the SDS */
+ if (SDendaccess (sds_id)==FAIL){
+  printf( "Failed to end SDS <%s>\n", sds_name);
+  goto fail;
+ } 
+ 
+ return SUCCESS;
+
+fail:
+ SDendaccess (sds_id);
+ return FAIL;
+}
+
+
+/*-------------------------------------------------------------------------
+ * Function: add_vs
+ *
+ * Purpose: utility function to write with
+ *  VS - Vdata Interface,
+ *  optionally inserting the VS into the group VGROUP_ID
+ *
+ * Return: int
+ *
+ * Programmer: Pedro Vicente, pvn at ncsa.uiuc.edu
+ *
+ * Date: July 3, 2003
+ *
+ *-------------------------------------------------------------------------
+ */
+
+
+#define  N_RECORDS        3         /* number of records the vdata contains */
+#define  ORDER_1          3         /* order of first field */
+#define  ORDER_2          1         /* order of second field */
+#define  ORDER_3          2         /* order of third field */
+#define  CLASS_NAME       "Particle"
+#define  FIELD1_NAME      "Position"      /* contains x, y, z values */
+#define  FIELD2_NAME      "Mass"          /* contains weight values */
+#define  FIELD3_NAME      "Temperature"   /* contains min and max values */
+#define  FIELDNAME_LIST   "Position,Mass,Temperature" /* No spaces b/w names */
+#define  N_VALS_PER_REC   (ORDER_1 + ORDER_2 + ORDER_3)  /* number of values per record */
+
+int add_vs(const char* vs_name,
+            int32 file_id,
+            int32 vgroup_id)
+{
+ int32   vdata_ref,      /* reference number of the vdata */
+         vdata_tag,      /* tag number of the vdata */
+         vdata_id;       /* vdata id */
+ int32   attr_n_values   = 3; /* number of values in the vdata attribute */
+ int32   field_n_values  = 4; /* number of values in the field attribute */
+ char    vd_attr[3]      = {'A', 'B', 'C'};/* vdata attribute values*/
+ int32   fld_attr[4]     = {2, 4, 6, 8};   /* field attribute values*/
+ float32 data_buf[N_RECORDS][N_VALS_PER_REC]; /* buffer for vdata values */
+ int     i;
+
+ /* Initialize the VS interface */
+ Vstart (file_id);
+ 
+ /* Create a new vdata, set to -1 to create  */
+ vdata_ref = -1,    
+ vdata_id = VSattach (file_id, vdata_ref, "w");
+ 
+ /* Set name and class name of the vdata */
+ if (VSsetname (vdata_id, vs_name)==FAIL){
+  printf( "Could not set name for VS\n");
+  return FAIL;
+ }
+ if (VSsetclass (vdata_id, CLASS_NAME)==FAIL){
+  printf( "Could not set class for VS\n");
+  return FAIL;
+ }
+ 
+ /* Introduce each field's name, data type, and order */
+ VSfdefine (vdata_id, FIELD1_NAME, DFNT_FLOAT32, ORDER_1 );
+ VSfdefine (vdata_id, FIELD2_NAME, DFNT_FLOAT32, ORDER_2 );
+ VSfdefine (vdata_id, FIELD3_NAME, DFNT_FLOAT32, ORDER_3 );
+ 
+ /* Finalize the definition of the fields */
+ if (VSsetfields (vdata_id, FIELDNAME_LIST)==FAIL){
+  printf( "Could not set fields for VS\n");
+  return FAIL;
+ }
+ 
+/* 
+ * Buffer the data by the record for fully interlaced mode.  Note that the
+ * first three elements contain the three values of the first field, the
+ * fourth element contains the value of the second field, and the last two
+ * elements contain the two values of the third field.
+ */
+ for (i = 0; i < N_RECORDS; i++)
+ {
+  data_buf[i][0] = (float32)1.0 * i;
+  data_buf[i][1] = (float32)2.0 * i;
+  data_buf[i][2] = (float32)3.0 * i;
+  data_buf[i][3] = (float32)0.1 + i;
+  data_buf[i][4] = 0.0;
+  data_buf[i][5] = 65.0;
+ }
+ 
+/* Write the data from data_buf to the vdata with full interlacing mode */
+ if (VSwrite (vdata_id, (uint8 *)data_buf, N_RECORDS,FULL_INTERLACE)==FAIL){
+  printf( "Could not write VS\n");
+  return FAIL;
+ }
+  
+ /* Attach an attribute to the vdata, i.e., indicated by the second parameter */
+ if (VSsetattr (vdata_id,_HDF_VDATA,"Myattr",DFNT_CHAR,
+  attr_n_values, vd_attr)==FAIL){
+  printf( "Could not set attr for VS\n");
+  return FAIL;
+ }
+ 
+ /* Attach an attribute to the field 0 */
+ if (VSsetattr (vdata_id, 0, "Myfattr", DFNT_INT32, 
+  field_n_values, fld_attr)==FAIL){
+  printf( "Could not set attr for VS\n");
+  return FAIL;
+ }
+ 
+ /* Obtain the tag and ref number of the vdata */
+ vdata_tag = VSQuerytag (vdata_id);
+ vdata_ref = VSQueryref (vdata_id);
+ 
+#if defined( HZIP_DEBUG)
+ printf("add_vs %d\n",vdata_ref); 
+#endif
+ 
+ /* add the VS to the vgroup*/
+ if (vgroup_id)
+  if (Vaddtagref (vgroup_id, vdata_tag, vdata_ref)==FAIL){
+  printf( "Could not set group for VS\n");
+  return FAIL;
+ }
+ 
+ /* terminate access to the VSs */
+ if (VSdetach (vdata_id)==FAIL){
+  printf( "Could not detach VS\n");
+  return FAIL;
+ }
+ 
+ /* Terminate access to the VS interface */
+ if (Vend (file_id)==FAIL){
+  printf( "Could not end VS\n");
+  return FAIL;
+ }
+
+ /* add an annotation and label to the vdata */
+ if (add_an(file_id, vdata_tag, vdata_ref)<0)
+  return FAIL;
+
+ return SUCCESS;
+}
+
+
+/*-------------------------------------------------------------------------
+ * Function: add_file_an
+ *
+ * Purpose: utility function to write a file AN
+ *
+ * Return: int
+ *
+ * Programmer: Pedro Vicente, pvn at ncsa.uiuc.edu
+ *
+ * Date: July 30, 2003
+ *
+ *-------------------------------------------------------------------------
+ */
+
+#define  FILE_LABEL_TXT "This is a file label"
+#define  FILE_DESC_TXT  "This is a file description"
+#define  DATA_LABEL_TXT "This is a data label"
+#define  DATA_DESC_TXT  "This is a data annotation"
+
+
+int add_file_an(int32 file_id)
+{
+ int32 an_id,        /* AN interface identifier */
+       file_label_id,/* file label identifier */
+       file_desc_id, /* file description identifier */
+       data_label_id,  /* data label identifier */
+       data_desc_id,   /* data description identifier */
+       vgroup_id;
+ uint16 vgroup_tag, vgroup_ref;
+         
+ /* Initialize the AN interface */
+ an_id = ANstart (file_id);
+
+/*-------------------------------------------------------------------------
+ * file labels and annotations
+ *-------------------------------------------------------------------------
+ */ 
+
+ /* Create the file label */
+ file_label_id = ANcreatef (an_id, AN_FILE_LABEL);
+
+ /* Write the annotations to the file label */
+ if (ANwriteann (file_label_id,FILE_LABEL_TXT,strlen (FILE_LABEL_TXT))==FAIL){
+  printf( "Could not write AN\n");
+  return FAIL;
+ }
+
+ /* Create file description */
+ file_desc_id = ANcreatef (an_id, AN_FILE_DESC);
+
+ /* Write the annotation to the file description */
+ if (ANwriteann (file_desc_id, FILE_DESC_TXT, strlen (FILE_DESC_TXT))==FAIL){
+  printf( "Could not write AN\n");
+  return FAIL;
+ }
+
+/*-------------------------------------------------------------------------
+ * data labels and annotations
+ *-------------------------------------------------------------------------
+ */ 
+ 
+ /* Create a vgroup in the V interface*/
+ Vstart (file_id);
+ vgroup_id = Vattach (file_id, -1, "w");
+ if (Vsetname (vgroup_id, "an_group")==FAIL){
+  printf( "Could not set name for VG\n");
+  return FAIL;
+ }
+ 
+ /* Obtain the tag and ref number of the vgroup */
+ vgroup_tag = (uint16) VQuerytag (vgroup_id);
+ vgroup_ref = (uint16) VQueryref (vgroup_id);
+ 
+ /* Create the data label for the vgroup identified by its tag and ref number */
+ data_label_id = ANcreate (an_id, vgroup_tag, vgroup_ref, AN_DATA_LABEL);
+ 
+ /* Write the annotation text to the data label */
+ if (ANwriteann (data_label_id, DATA_LABEL_TXT, strlen (DATA_LABEL_TXT))==FAIL){
+  printf( "Could not write AN\n");
+  return FAIL;
+ }
+ 
+ /* Create the data description for the vgroup identified by its tag and ref number */
+ data_desc_id = ANcreate (an_id, vgroup_tag, vgroup_ref, AN_DATA_DESC);
+ 
+ /* Write the annotation text to the data description */
+ if (ANwriteann (data_desc_id, DATA_DESC_TXT, strlen (DATA_DESC_TXT))==FAIL){
+  printf( "Could not write AN\n");
+  return FAIL;
+ }
+ 
+ /* Teminate access to the vgroup and to the V interface */
+ if (Vdetach (vgroup_id)==FAIL){
+  printf( "Could not detach VG\n");
+  return FAIL;
+ }
+ if (Vend (file_id)==FAIL){
+  printf( "Could not end VG\n");
+  return FAIL;
+ }
+ 
+ /* Terminate access to each annotation explicitly */
+ if (ANendaccess (file_label_id)==FAIL||
+     ANendaccess (file_desc_id)==FAIL||
+     ANendaccess (data_label_id)==FAIL||
+     ANendaccess (data_desc_id)==FAIL){
+  printf( "Could not end AN\n");
+  return FAIL;
+ }
+ 
+ /* Terminate access to the AN interface */
+ if (ANend (an_id)==FAIL==FAIL){
+  printf( "Could not end AN\n");
+  return FAIL;
+ }
+
+ return SUCCESS;
+}
+
+
+
+/*-------------------------------------------------------------------------
+ * Function: add_an
+ *
+ * Purpose: utility function to write a AN
+ *
+ * Return: int
+ *
+ * Programmer: Pedro Vicente, pvn at ncsa.uiuc.edu
+ *
+ * Date: August 19, 2003
+ *
+ *-------------------------------------------------------------------------
+ */
+
+
+int add_an(int32 file_id, int32 tag, int32 ref)
+{
+ int32 an_id,        /* AN interface identifier */
+       data_label_id,  /* data label identifier */
+       data_desc_id;   /* data description identifier */
+         
+ /* Initialize the AN interface */
+ an_id = ANstart (file_id);
+
+/*-------------------------------------------------------------------------
+ * data labels and annotations
+ *-------------------------------------------------------------------------
+ */ 
+   
+ /* Create the data label for the object identified by its tag and ref number */
+ data_label_id = ANcreate (an_id, (uint16)tag, (uint16)ref, AN_DATA_LABEL);
+ 
+ /* Write the annotation text to the data label */
+ if (ANwriteann (data_label_id, DATA_LABEL_TXT, strlen (DATA_LABEL_TXT))==FAIL){
+  printf("Error: writing data label in tag %d ref %d\n", tag, ref);
+  return FAIL;
+ }
+ 
+ /* Create the data description for the object identified by its tag and ref number */
+ data_desc_id = ANcreate (an_id, (uint16)tag, (uint16)ref, AN_DATA_DESC);
+ 
+ /* Write the annotation text to the data description */
+ if (ANwriteann (data_desc_id, DATA_DESC_TXT, strlen (DATA_DESC_TXT))==FAIL){
+  printf("Error: writing data label in tag %d ref %d\n", tag, ref);
+  return FAIL;
+ }
+ 
+ /* Terminate access to each annotation explicitly */
+ if (ANendaccess (data_label_id)==FAIL||
+     ANendaccess (data_desc_id)==FAIL){
+  printf( "Failed to close AN\n");
+  return FAIL;
+ }
+ 
+ /* Terminate access to the AN interface */
+ if (ANend (an_id)==FAIL){
+  printf( "Failed to close AN\n");
+  return FAIL;
+ }
+
+ return SUCCESS;
+}
+
+
+
+
+/*-------------------------------------------------------------------------
+ * Function: add_pal
+ *
+ * Purpose: utility function to write a palette
+ *
+ * Return: int
+ *
+ * Programmer: Pedro Vicente, pvn at ncsa.uiuc.edu
+ *
+ * Date: August 19, 2003
+ *
+ *-------------------------------------------------------------------------
+ */
+
+
+int add_pal(const char* fname)
+{
+ uint8  palette_data[256*3];
+ 
+ if (DFPaddpal(fname,palette_data)==FAIL){
+  printf( "Failed to write palette in <%s>\n", fname);
+  return FAIL;
+ }
+ 
+ return SUCCESS;
+}
+
+
+/*-------------------------------------------------------------------------
+ * read_data
+ * utility function to read ASCII image data
+ * the files have a header of the type
+ *
+ *   components
+ *   n
+ *   height
+ *   n
+ *   width
+ *   n
+ * 
+ * followed by the image data
+ *
+ *-------------------------------------------------------------------------
+ */
+
+int read_data(const char* file_name)
+{
+ int    i, n;
+ int    color_planes;
+ char   str[20];
+ FILE   *f;
+ int    w, h;
+
+ f = fopen( file_name, "r");
+
+ if ( f == NULL )
+ {
+  printf( "Could not open file <%s>\n", file_name );
+  return -1;
+ }
+
+ fscanf( f, "%s", str );
+ fscanf( f, "%d", &color_planes );
+ fscanf( f, "%s", str );
+ fscanf( f, "%d", &h); 
+ fscanf( f, "%s", str );
+ fscanf( f, "%d", &w); 
+
+ /* globals */
+ N_COMPS=color_planes;
+ Y_LENGTH=h;
+ X_LENGTH=w;
+
+ if ( image_data )
+ {
+  free( image_data );
+  image_data=NULL;
+ }
+
+ image_data = (unsigned char*)malloc(w*h*color_planes*sizeof(unsigned char));
+
+ for (i = 0; i < h*w*color_planes ; i++)
+ {
+  fscanf( f, "%d",&n );
+  image_data[i] = (unsigned char)n;
+ }
+ fclose(f);
+
+ return 1;
+
+}
+
+
+
+
+/*-------------------------------------------------------------------------
+ * Function: add_sd_szip
+ *
+ * Purpose: utility function to write with SZIPed SDSs
+ *  SD - Multifile Scientific Data Interface,
+ *
+ * Return: int
+ *
+ * Programmer: Pedro Vicente, pvn at ncsa.uiuc.edu
+ *
+ * Date: September 15, 2003
+ *
+ *-------------------------------------------------------------------------
+ */
+
+int add_sd_szip(const char *fname,       /* file name */
+                 int32 file_id,           /* file ID */
+                 int32 sd_id,             /* SD interface identifier */
+                 const char* sds_name,    /* sds name */
+                 int32 vgroup_id,         /* group ID */
+                 int32 chunk_flags,       /* chunk flags */
+                 int32 nt,                /* number type */
+                 int32 bits_per_pixel,    /* szip parameter */
+                 int32 *dim,              /* dimension of the data set */
+                 void *data
+                 )
+
+{
+ int32  sds_id,       /* data set identifier */
+        sds_ref,      /* reference number of the data set */
+        rank = 2;     /* rank of the data set array */
+ comp_coder_t          comp_type;        /* compression flag */
+ comp_info      comp_info;        /* compression structure */
+ HDF_CHUNK_DEF  chunk_def;        /* chunking definitions */ 
+ int32 edges[2],        /* write edges */
+       start[2]={0,0};  /* write start */
+
+ edges[0]=dim[0]; edges[1]=dim[1];
+
+#ifdef H4_HAVE_LIBSZ
+  if (SZ_encoder_enabled()) {
+ comp_type = COMP_CODE_SZIP;
+ comp_info.szip.pixels_per_block = 2;
+ comp_info.szip.options_mask = SZ_EC_OPTION_MASK;
+ comp_info.szip.options_mask |= SZ_RAW_OPTION_MASK;
+  comp_info.szip.pixels = 0;
+  comp_info.szip.pixels_per_scanline = 0;
+  comp_info.szip.bits_per_pixel = 0;
+  } else {
+  printf("Warning: SZIP encoding not available\n");
+  }
+#else
+  printf("Warning: SZIP compression not available\n");
+#endif
+ 
+ /* create the SDS */
+ sds_id = SDcreate (sd_id, sds_name, nt, rank, dim);
+ if (sds_id < 0) {
+   printf( "SDcreate failed for file <%s>\n",sds_name);
+   return FAIL;
+ }
+
+ /* set chunk */
+ if ( (chunk_flags == HDF_CHUNK) || (chunk_flags == (HDF_CHUNK | HDF_COMP)) )
+ {
+  set_chunk_def(comp_type, 
+                dim,
+                1,
+                bits_per_pixel,
+                &chunk_def);
+  if (SDsetchunk (sds_id, chunk_def, chunk_flags)==FAIL) {
+   printf( "Failed to set chunk for SDS <%s>\n",sds_name);
+   goto fail;
+  }
+ }
+ 
+ /* use compress without chunk-in */
+ else if ( chunk_flags==HDF_NONE && 
+           comp_type>COMP_CODE_NONE && comp_type<COMP_CODE_INVALID)
+ {
+  if (SDsetcompress (sds_id, comp_type, &comp_info)==FAIL) {
+   printf( "Failed to set compress for SDS <%s>\n",sds_name);
+   goto fail;
+  } 
+ }
+ 
+ /* write the stored data to the data set */
+ if (SDwritedata (sds_id, start, NULL, edges, (VOIDP)data)==FAIL) {
+   printf( "Failed to writer SDS <%s>\n",sds_name);
+   goto fail;
+  }
+
+ /* obtain the reference number of the SDS using its identifier */
+ sds_ref = SDidtoref (sds_id);
+ 
+#if defined( HZIP_DEBUG)
+ printf("add_sd %d\n",sds_ref); 
+#endif
+ 
+ /* add the SDS to the vgroup. the tag DFTAG_NDG is used */
+ if (vgroup_id) {
+  if (Vaddtagref (vgroup_id, TAG_GRP_DSET, sds_ref)==FAIL) {
+   printf( "Failed to set ref for SDS <%s>\n",sds_name);
+   goto fail;
+  }
+ }
+ 
+ /* terminate access to the SDS */
+ if (SDendaccess (sds_id)==FAIL) {
+  printf( "Failed to end SDS <%s>\n",sds_name);
+  goto fail;
+ }
+
+ return SUCCESS;
+
+fail:
+ SDendaccess (sds_id);
+ return FAIL;
+}
+
+
+/*-------------------------------------------------------------------------
+ * Function: add_sd_szip_all
+ *
+ * Purpose: utility function to write several SZIPed SDSs
+ *  SD - Multifile Scientific Data Interface,
+ *
+ * Return: int
+ *
+ * Programmer: Pedro Vicente, pvn at ncsa.uiuc.edu
+ *
+ * Date: September 15, 2003
+ *
+ *-------------------------------------------------------------------------
+ */
+
+/* dimensions */
+#define XD1     60
+#define YD1     40
+
+int add_sd_szip_all(const char *fname,       /* file name */
+                     int32 file_id,           /* file ID */
+                     int32 sd_id,             /* SD interface identifier */
+                     int32 vgroup_id          /* group ID */
+                     )
+{
+ int i, j;
+ {
+  int32 buf[YD1][XD1];
+  int32 dim[2]={YD1,XD1};
+  int32 bpp=32;
+  for (j = 0; j < YD1; j++) {
+   for (i = 0; i < XD1; i++)
+    buf[j][i] = (int32) (i + j) + 1;
+  }
+  if (add_sd_szip(fname,file_id,sd_id,"dset32szip",vgroup_id,HDF_NONE,DFNT_INT32,bpp,dim,buf)<0)
+   return FAIL;
+ }
+
+ return SUCCESS;
+}
+
+/*-------------------------------------------------------------------------
+ * Function: set_chunk_def
+ *
+ * Purpose: set chunk parameters. used by GR and SDS
+ *
+ * Return: void
+ *
+ * Programmer: Pedro Vicente, pvn at ncsa.uiuc.edu
+ *
+ * Date: September 15, 2003
+ *
+ *-------------------------------------------------------------------------
+ */
+
+
+static void set_chunk_def( int32 comp_type, 
+                           int32 *dim,
+                           int32 ncomps,
+                           int32 bits_per_pixel, /* for szip */
+                           HDF_CHUNK_DEF *chunk_def )
+{
+ 
+ /* Define chunk's dimensions */
+chunk_def->chunk_lengths[0] = dim[0]/2;
+chunk_def->chunk_lengths[1] = dim[1]/2;
+ /* To use chunking with RLE, Skipping Huffman, GZIP, SZIP compression */
+chunk_def->comp.chunk_lengths[0] = dim[0]/2;
+chunk_def->comp.chunk_lengths[1] = dim[1]/2;
+ 
+ /*define some compression specific parameters */
+ switch(comp_type)
+ {
+ default:
+  break;
+ case COMP_CODE_RLE:
+ chunk_def->comp.comp_type = COMP_CODE_RLE;
+  break;
+  
+ case COMP_CODE_SKPHUFF:
+ chunk_def->comp.comp_type = COMP_CODE_SKPHUFF;
+ chunk_def->comp.cinfo.skphuff.skp_size = 1;
+  break;
+  
+ case COMP_CODE_DEFLATE:
+  /* GZIP compression, set compression type, flag and deflate level*/
+ chunk_def->comp.comp_type = COMP_CODE_DEFLATE;
+ chunk_def->comp.cinfo.deflate.level = 6;
+  break;
+  
+ case COMP_CODE_SZIP:
+#ifdef H4_HAVE_LIBSZ
+ if (SZ_encoder_enabled()) {
+ chunk_def->comp.cinfo.szip.pixels_per_block = 2;
+ chunk_def->comp.cinfo.szip.options_mask = SZ_EC_OPTION_MASK;
+ chunk_def->comp.cinfo.szip.options_mask |= SZ_RAW_OPTION_MASK;
+ chunk_def->comp.cinfo.szip.pixels = 0;
+ chunk_def->comp.cinfo.szip.pixels_per_scanline = 0;
+ chunk_def->comp.cinfo.szip.bits_per_pixel = 0;
+  } else {
+  printf("Warning: SZIP encoding not available\n");
+  }
+#else
+  printf("Warning: SZIP compression not available\n");
+#endif
+  break;
+ }
+
+}
+

Added: packages/libhdf4/branches/upstream/current/mfhdf/hrepack/test_hrepack_add.h
===================================================================
--- packages/libhdf4/branches/upstream/current/mfhdf/hrepack/test_hrepack_add.h	                        (rev 0)
+++ packages/libhdf4/branches/upstream/current/mfhdf/hrepack/test_hrepack_add.h	2007-05-15 09:53:05 UTC (rev 831)
@@ -0,0 +1,103 @@
+/****************************************************************************
+ * NCSA HDF                                                                 *
+ * Software Development Group                                               *
+ * National Center for Supercomputing Applications                          *
+ * University of Illinois at Urbana-Champaign                               *
+ * 605 E. Springfield, Champaign IL 61820                                   *
+ *                                                                          *
+ * For conditions of distribution and use, see the accompanying             *
+ * hdf/COPYING file.                                                        *
+ *                                                                          *
+ ****************************************************************************/
+
+
+#ifndef REPACK_ADD_H_
+#define REPACK_ADD_H_
+
+
+/* turn on for verbose output of hrepack and hdiff */
+#if 0
+#define HZIPTST_DEBUG  
+#endif
+
+#if defined (HZIPTST_DEBUG)
+#define TESTING(WHAT) {printf("%-70s", "Testing " WHAT); fflush(stdout); printf("\n");}
+#else
+#define TESTING(WHAT) {printf("%-70s", "Testing " WHAT); fflush(stdout); }
+#endif
+#define PASSED() {puts(" PASSED");fflush(stdout);}
+#define SKIPPED() {puts(" SKIPPED");fflush(stdout);}
+#define H4_FAILED() {puts("*FAILED*");fflush(stdout);}
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+
+/* write data */
+
+int add_gr_ffile(const char* name_file,
+                  int32 gr_id,
+                  const char* gr_name,
+                  int32 interlace_mode,
+                  int32 file_id,
+                  int32 vgroup_id);
+
+int add_gr(const char* gr_name,     /* gr name */
+            int32 file_id,           /* file ID */
+            int32 gr_id,             /* GR ID */
+            int32 vgroup_id,         /* group ID */
+            int32 chunk_flags,       /* chunk flags */
+            comp_coder_t comp_type,  /* compression flag */
+            comp_info *comp_info     /* compression structure */ );
+
+
+int add_file_an (int32 file_id);
+int add_an(int32 file_id, int32 tag, int32 ref);
+int add_r8 (const char* image_file,const char *fname,int32 file_id,int32 vgroup_id);
+int add_r24(const char* image_file,const char *fname,int32 file_id,intn il,int32 vgroup_id);
+int add_vs (const char* vs_name,int32 file_id,int32 vgroup_id);
+
+
+int add_sd(const char *fname,       /* file name */
+            int32 file_id,           /* file ID */
+            int32 sd_id,             /* SD id */
+            const char* sds_name,    /* sds name */
+            int32 vgroup_id,         /* group ID */
+            int32 chunk_flags,       /* chunk flags */
+            comp_coder_t comp_type,  /* compression flag */
+            comp_info *comp_info     /* compression structure */ );
+
+int add_sd3d(const char *fname,       /* file name */
+              int32 file_id,           /* file ID */
+              int32  sd_id,            /* SD interface identifier */
+              const char* sds_name,    /* sds name */
+              int32 vgroup_id,         /* group ID */
+              int32 chunk_flags,       /* chunk flags */
+              comp_coder_t comp_type,  /* compression flag */
+              comp_info *comp_info     /* compression structure */ );
+
+int add_pal(const char* fname);
+
+int add_sd_szip_all(const char *fname,       /* file name */
+                     int32 file_id,           /* file ID */
+                     int32 sd_id,             /* SD interface identifier */
+                     int32 vgroup_id          /* group ID */
+                     );
+
+int add_glb_attrs(const char *fname,
+                   int32 file_id,
+                   int32 sd_id,
+                   int32 gr_id);
+
+
+/* read image data */
+int  read_data(const  char* file_name);
+
+
+#ifdef __cplusplus
+}
+#endif
+
+
+#endif  /* REPACK_ADD_H_ */

Added: packages/libhdf4/branches/upstream/current/mfhdf/hrepack/test_hrepack_main.c
===================================================================
--- packages/libhdf4/branches/upstream/current/mfhdf/hrepack/test_hrepack_main.c	                        (rev 0)
+++ packages/libhdf4/branches/upstream/current/mfhdf/hrepack/test_hrepack_main.c	2007-05-15 09:53:05 UTC (rev 831)
@@ -0,0 +1,753 @@
+/****************************************************************************
+ * NCSA HDF                                                                 *
+ * Software Development Group                                               *
+ * National Center for Supercomputing Applications                          *
+ * University of Illinois at Urbana-Champaign                               *
+ * 605 E. Springfield, Champaign IL 61820                                   *
+ *                                                                          *
+ * For conditions of distribution and use, see the accompanying             *
+ * hdf/COPYING file.                                                        *
+ *                                                                          *
+ ****************************************************************************/
+
+
+#include "hdf.h"
+#include "mfhdf.h"
+#include "hcomp.h"
+#include "hrepack.h"
+#include "hdiff.h"
+#include "test_hrepack_add.h"
+#include "test_hrepack_verify.h"
+#if defined (H4_HAVE_LIBSZ)
+#include "szlib.h"
+#endif
+
+#define DATA_FILE1       "image8.txt"
+#define DATA_FILE2       "image24pixel.txt"
+#define DATA_FILE3       "image24plane.txt"
+char    *progname;   
+
+/* for old branch compability */
+#if 0
+#define H4_HAVE_LIBSZ
+#endif
+  
+#define HDIFF_TSTSTR "hdiff hziptst.hdf hziptst.hdf"
+
+/*-------------------------------------------------------------------------
+ * Function: main
+ *
+ * Purpose: test program for hrepack
+ *
+ * A)This program writes several HDF objects to the file FILENAME
+ *   The image data consists of realistic data read from the files DATA_FILE1
+ *   (8bit image) , DATA_FILE2 (24bit image, pixel interlace) and
+ *    DATA_FILE3 (24bit image, plane interlace)
+ *  The objects written are
+ *  1) groups
+ *  2) images 
+ *  3) datasets
+ *  4) vdatas with attributes and field attributes
+ *  5) global and local attributes
+ *  6) labels and annotations
+ *
+ * B) Then several calls are made to hrepack, in each call the FILENAME_OUT is 
+ *  generated
+ *
+ * C) In each test the hdiff utility is called to compare the files 
+ *  FILENAME and FILENAME_OUT
+ *
+ * D) In each test the verifiy_comp_chunk function is called to compare 
+ *  the input and output compression and chunking parameters
+ *
+ * Programmer: Pedro Vicente, pvn at ncsa.uiuc.edu
+ *
+ * Date: August 3, 2003
+ *
+ *-------------------------------------------------------------------------
+ */
+
+int main(void)
+{
+ int32         vgroup1_id,   /* vgroup identifier */
+               vgroup2_id,   /* vgroup identifier */
+               vgroup3_id,   /* vgroup identifier */
+               vgroup_img_id,/* vgroup identifier */
+               file_id,      /* HDF file identifier, same for V interface */
+               gr_id,        /* GR interface identifier */
+               sd_id;        /* SD interface identifier */
+ options_t     options;      /* for hrepack  */ 
+ diff_opt_t    fspec;        /* for hdiff  */ 
+ int           verbose=0;
+ int32         attr_n_values = 3;  /* number of values in the vg attribute */
+ char          vg_attr[3]    = {'A', 'B', 'C'};/* vg attribute values*/
+ comp_coder_t  comp_type;    /* to retrieve compression type into */
+ int32         chunk_flags;  /* Chunking flag */ 
+ comp_info     comp_info;    /* compression structure */ 
+ int32         in_chunk_lengths[MAX_VAR_DIMS];
+
+ /* initialize options for hdiff */
+ memset(&fspec,0,sizeof(diff_opt_t));
+ fspec.ga = 1;    /* compare global attributes */
+ fspec.sa = 1;    /* compare SD local attributes */
+ fspec.sd = 1;    /* compare SD data */
+ fspec.vd = 1;    /* compare Vdata */
+ fspec.gr = 1;    /* compare GR data */
+
+/*-------------------------------------------------------------------------
+ * create a file with SDSs, images , groups and vdatas
+ *-------------------------------------------------------------------------
+ */
+      
+ /* create a HDF file */
+ if ((file_id = Hopen (FILENAME, DFACC_CREATE, 0))<0)
+ {
+  printf("Error: Could not create file <%s>\n",FILENAME);
+  return 1;
+ }
+
+ /* initialize the SD interface */
+ if ((sd_id = SDstart (FILENAME, DFACC_RDWR))== FAIL)
+ {
+  printf("Error: Could not start SD interface\n");
+  return 1;
+ }
+
+ /* initialize the GR interface */
+ if ((gr_id = GRstart (file_id))== FAIL)
+ {
+  printf("Error: Could not start GR interface\n");
+  return 1;
+ }
+
+ /* initialize the V interface */
+ if (Vstart (file_id)==FAIL){
+  printf( "Could not start VG\n");
+  return 1;
+ }
+
+
+/*-------------------------------------------------------------------------
+ * start
+ *-------------------------------------------------------------------------
+ */ 
+
+ /* create the first vgroup.  the vgroup reference number is set
+  * to -1 for creating and the access mode is "w" for writing
+  */
+ vgroup1_id = Vattach (file_id, -1, "w");
+ if (Vsetname (vgroup1_id, "g1")==FAIL){
+  printf( "Could not name group\n");
+  return 1;
+ }
+
+ /* attach an attribute to the vgroup */
+ if (Vsetattr (vgroup1_id,"Myattr",DFNT_CHAR,attr_n_values,vg_attr)==FAIL){
+  printf( "Could set group attributes\n");
+  return 1;
+ }
+ 
+ /* create the second vgroup */
+ vgroup2_id = Vattach (file_id, -1, "w");
+ if (Vsetname (vgroup2_id, "g2")==FAIL){
+  printf( "Could not name group\n");
+  return 1;
+ }
+
+ /* create the 3rd vgroup */
+ vgroup3_id = Vattach (file_id, -1, "w");
+ if (Vsetname (vgroup3_id, "g3")==FAIL){
+  printf( "Could not name group\n");
+  return 1;
+ }
+
+ /* insert the second vgroup into the first vgroup using its identifier */
+ if (Vinsert (vgroup1_id, vgroup2_id)==FAIL){
+  printf( "Could not insert VG\n");
+  return 1;
+ }
+
+ /* insert the 3rd vgroup into the 2nd vgroup using its identifier */
+ if (Vinsert (vgroup2_id, vgroup3_id)==FAIL){
+  printf( "Could not insert VG\n");
+  return 1;
+ }
+
+ /* create the 4th vgroup, for images */
+ vgroup_img_id = Vattach (file_id, -1, "w");
+ if (Vsetname (vgroup_img_id, "images")==FAIL){
+  printf( "Could not name group\n");
+  return 1;
+ }
+ 
+/*-------------------------------------------------------------------------
+ * add some SDS to the file
+ * duplicates are inserted in the groups "g1", "g2", "g3" and root
+ *-------------------------------------------------------------------------
+ */ 
+
+ /* add non chunked, non compressed sds */
+ chunk_flags = HDF_NONE;
+ comp_type   = COMP_CODE_NONE;
+ if (add_sd(FILENAME,file_id,sd_id,"dset1",vgroup1_id,chunk_flags,comp_type,NULL)<0)
+  return 1;
+ if (add_sd(FILENAME,file_id,sd_id,"dset2",vgroup2_id,chunk_flags,comp_type,NULL)<0)
+  return 1;
+ if (add_sd(FILENAME,file_id,sd_id,"dset3",vgroup3_id,chunk_flags,comp_type,NULL)<0)
+  return 1;
+ if (add_sd(FILENAME,file_id,sd_id,"dset4",0,chunk_flags,comp_type,NULL)<0)
+  return 1;
+ if (add_sd(FILENAME,file_id,sd_id,"dset5",0,chunk_flags,comp_type,NULL)<0)
+  return 1;
+ if (add_sd(FILENAME,file_id,sd_id,"dset6",0,chunk_flags,comp_type,NULL)<0)
+  return 1;
+ if (add_sd3d(FILENAME,file_id,sd_id,"dset7",0,chunk_flags,comp_type,NULL)<0)
+  return 1;
+
+
+/*-------------------------------------------------------------------------
+ * add some chunked/compressd SDS to the file
+ * Chunked                  -> flags = HDF_CHUNK
+ * Chunked and compressed   -> flags = HDF_CHUNK | HDF_COMP 
+ * Non-chunked              -> flags = HDF_NONE
+ *-------------------------------------------------------------------------
+ */ 
+
+ /* add a chunked, non compressed sds */
+ chunk_flags = HDF_CHUNK;
+ comp_type   = COMP_CODE_NONE;
+ add_sd(FILENAME,file_id,sd_id,"dset_chunk",0,chunk_flags,comp_type,NULL);
+
+ /* add a chunked-compressed sds with SDsetchunk */
+ chunk_flags = HDF_CHUNK | HDF_COMP;
+ comp_type   = COMP_CODE_DEFLATE;
+ if (add_sd(FILENAME,file_id,sd_id,"dset_chunk_comp",0,chunk_flags,comp_type,&comp_info)<0)
+  return 1;
+
+/*-------------------------------------------------------------------------
+ * GZIP
+ *-------------------------------------------------------------------------
+ */ 
+
+ /* add some non chunked, compressed sds */
+ chunk_flags = HDF_NONE;
+ comp_type   = COMP_CODE_DEFLATE;
+ if (add_sd(FILENAME,file_id,sd_id,"dset_gzip",0,chunk_flags,comp_type,&comp_info)<0)
+  return 1;
+
+/*-------------------------------------------------------------------------
+ * RLE
+ *-------------------------------------------------------------------------
+ */ 
+
+ /* add some non chunked, compressed sds */
+ chunk_flags = HDF_NONE;
+ comp_type   = COMP_CODE_RLE;
+ if (add_sd(FILENAME,file_id,sd_id,"dset_rle",0,chunk_flags,comp_type,&comp_info)<0)
+  return 1;
+
+/*-------------------------------------------------------------------------
+ * HUFF
+ *-------------------------------------------------------------------------
+ */ 
+
+ /* add some non chunked, compressed sds */
+ chunk_flags = HDF_NONE;
+ comp_type   = COMP_CODE_SKPHUFF;
+ if (add_sd(FILENAME,file_id,sd_id,"dset_huff",0,chunk_flags,comp_type,&comp_info)<0)
+  return 1;
+
+#if defined (H4_HAVE_LIBSZ)
+/*-------------------------------------------------------------------------
+ * SZIP
+ *-------------------------------------------------------------------------
+ */ 
+ if (SZ_encoder_enabled()) {
+ chunk_flags = HDF_NONE;
+ comp_type   = COMP_CODE_SZIP;
+ if (add_sd(FILENAME,file_id,sd_id,"dset_szip",0,chunk_flags,comp_type,&comp_info)<0)
+  return 1;
+  
+ if (add_sd_szip_all(FILENAME,file_id,sd_id,0)<0)
+  return 1;
+ }
+ 
+#endif
+
+/*-------------------------------------------------------------------------
+ * add some RIS24 images to the file
+ *-------------------------------------------------------------------------
+ */
+ /* Pixel Interlacing */
+ if (add_r24(DATA_FILE2,FILENAME,file_id,DFIL_PIXEL,vgroup_img_id)<0)
+  return 1; 
+ /* Scan Plane Interlacing */
+ if (add_r24(DATA_FILE3,FILENAME,file_id,DFIL_PLANE,vgroup_img_id)<0)
+  return 1;  
+
+
+/*-------------------------------------------------------------------------
+ * add some RIS8 images to the file
+ *-------------------------------------------------------------------------
+ */ 
+ if (add_r8(DATA_FILE1,FILENAME,file_id,vgroup_img_id)<0)
+  return 1; 
+
+/*-------------------------------------------------------------------------
+ * add some GR images to the file with compression/chunking
+ *-------------------------------------------------------------------------
+ */ 
+
+/*-------------------------------------------------------------------------
+ * no compression
+ *-------------------------------------------------------------------------
+ */ 
+
+ chunk_flags = HDF_NONE;
+ comp_type   = COMP_CODE_NONE;
+ if (add_gr("gr_none",file_id,gr_id,0,chunk_flags,comp_type,&comp_info)<0)
+  return 1; 
+
+
+/*-------------------------------------------------------------------------
+ * GZIP
+ *-------------------------------------------------------------------------
+ */ 
+
+ chunk_flags = HDF_NONE;
+ comp_type   = COMP_CODE_DEFLATE;
+ if (add_gr("gr_gzip",file_id,gr_id,0,chunk_flags,comp_type,&comp_info)<0)
+  return 1; 
+
+#if defined (H4_GR_SZIP)
+/* not supported for GR */
+/*-------------------------------------------------------------------------
+ * SZIP
+ *-------------------------------------------------------------------------
+ */ 
+
+#if defined (H4_HAVE_LIBSZ)
+
+ if (SZ_encoder_enabled()) {
+ chunk_flags = HDF_NONE;
+ comp_type   = COMP_CODE_SZIP;
+ if (add_gr("gr_szip",file_id,gr_id,0,chunk_flags,comp_type,&comp_info)<0)
+  return 1; 
+ }
+
+#endif
+#endif
+
+/*-------------------------------------------------------------------------
+ * add some GR realistic images to the file
+ * realistic data is read from ASCII files
+ *-------------------------------------------------------------------------
+ */ 
+
+ if (add_gr_ffile(DATA_FILE1,gr_id,"gr_8bit",0,file_id,0)<0)
+  return 1; 
+ if (add_gr_ffile(DATA_FILE2,gr_id,"gr_24bit",0,file_id,0)<0)
+  return 1; 
+
+
+/*-------------------------------------------------------------------------
+ * add some VS to the file
+ * duplicates are inserted in the groups "g1", "g2", "g3" and root
+ *-------------------------------------------------------------------------
+ */ 
+
+ if (add_vs("vdata1",file_id,vgroup1_id)<0)
+  return 1; 
+ if (add_vs("vdata2",file_id,vgroup2_id)<0)
+  return 1; 
+ if (add_vs("vdata3",file_id,vgroup3_id)<0)
+  return 1; 
+ if (add_vs("vdata4",file_id,0)<0)
+  return 1; 
+
+/*-------------------------------------------------------------------------
+ * add some global attributes to the file
+ *-------------------------------------------------------------------------
+ */ 
+ if (add_glb_attrs(FILENAME,file_id,sd_id,gr_id)<0)
+  return 1; 
+
+/*-------------------------------------------------------------------------
+ * add annotations to the file
+ *-------------------------------------------------------------------------
+ */ 
+ if (add_file_an(file_id)<0)
+  return 1; 
+
+/*-------------------------------------------------------------------------
+ * add a palette to the file
+ *-------------------------------------------------------------------------
+ */ 
+ if (add_pal(FILENAME)<0)
+  return 1; 
+
+/*-------------------------------------------------------------------------
+ * end
+ *-------------------------------------------------------------------------
+ */
+
+ /* terminate access to the vgroups */
+ if (Vdetach (vgroup1_id)==FAIL ||
+     Vdetach (vgroup2_id)==FAIL ||
+     Vdetach (vgroup3_id)==FAIL ||
+     Vdetach (vgroup_img_id)==FAIL){
+  printf( "Could not close group\n");
+  return 1;
+ }
+ 
+ /* terminate access to the V interface */
+ if (Vend (file_id)==FAIL){
+  printf( "Could not end VG\n");
+  return 1;
+ }
+
+ /* terminate access to the GR interface */
+ if (GRend (gr_id)==FAIL)
+ {
+  printf("Error: Could not close GR interface\n");
+  return 1;
+ }
+ /* terminate access to the SD interface */
+ if (SDend (sd_id)==FAIL)
+ {
+  printf("Error: Could not close SD interface\n");
+  return 1;
+ }
+ /* close the HDF file */
+ if (Hclose (file_id)==FAIL){
+  printf( "Could not close file\n");
+  return 1;
+ }
+   
+
+/*-------------------------------------------------------------------------
+ * TESTS:
+ * 1) zip FILENAME with some compression/chunking options
+ * 2) use the hdiff utility to compare the input and output file; it returns RET==0
+ *    if the high-level objects have the same data
+ * 3) use the API functions SD(GR)getcompress, SD(GR)getchunk to verify
+ *    the compression/chunking input on the otput file
+ *-------------------------------------------------------------------------
+ */
+
+#if defined (HZIPTST_DEBUG)
+ verbose        =1;
+ fspec.verbose  =1;
+#endif
+
+ in_chunk_lengths[0]=10;
+ in_chunk_lengths[1]=8;
+ in_chunk_lengths[2]=6;
+
+
+/*-------------------------------------------------------------------------
+ * test1:  
+	* HUFF
+ *-------------------------------------------------------------------------
+ */
+
+
+ TESTING("hrepack -t dset7:HUFF 1 -c dset7:10x8x6");
+ hrepack_init (&options,verbose);
+ hrepack_addcomp("dset7:HUFF 1",&options);
+ hrepack_addchunk("dset7:10x8x6",&options);
+ if (hrepack(FILENAME,FILENAME_OUT,&options)<0)
+  goto out;
+ hrepack_end (&options);
+	PASSED();
+
+ TESTING(HDIFF_TSTSTR);
+ if (hdiff(FILENAME,FILENAME_OUT,&fspec) == 1)
+  goto out;
+ if ( sds_verifiy_comp("dset7",COMP_CODE_SKPHUFF, 1) == -1) 
+  goto out;
+ if ( sds_verifiy_chunk("dset7",HDF_CHUNK|HDF_COMP,3,in_chunk_lengths) == -1) 
+  goto out;
+ PASSED();
+
+
+/*-------------------------------------------------------------------------
+ * test2: 
+ * RLE
+ *-------------------------------------------------------------------------
+ */
+	TESTING("hrepack -t dset4:RLE -c dset4:10x8");
+ hrepack_init (&options,verbose);
+ hrepack_addcomp("dset4:RLE",&options);
+ hrepack_addchunk("dset4:10x8",&options);
+ if (hrepack(FILENAME,FILENAME_OUT,&options)<0)
+  goto out;
+ hrepack_end (&options);
+	PASSED();
+
+ TESTING(HDIFF_TSTSTR);
+ if (hdiff(FILENAME,FILENAME_OUT,&fspec) == 1)
+  goto out;
+ if ( sds_verifiy_comp("dset4",COMP_CODE_RLE, 0) == -1) 
+  goto out;
+ if ( sds_verifiy_chunk("dset4",HDF_CHUNK|HDF_COMP,2,in_chunk_lengths) == -1) 
+  goto out;
+ PASSED();
+
+/*-------------------------------------------------------------------------
+ * test3:  
+	* SDS SELECTED with GZIP, chunking SELECTED
+ *-------------------------------------------------------------------------
+ */
+ TESTING("hrepack -t dset4:GZIP 6 -c dset4:10x8");
+ hrepack_init (&options,verbose);
+ hrepack_addcomp("dset4:GZIP 6",&options);
+ hrepack_addchunk("dset4:10x8",&options);
+ if (hrepack(FILENAME,FILENAME_OUT,&options)<0)
+  goto out;
+ hrepack_end (&options);
+	PASSED();
+
+ TESTING(HDIFF_TSTSTR);
+ if (hdiff(FILENAME,FILENAME_OUT,&fspec) == 1)
+  goto out;
+ if ( sds_verifiy_comp("dset4",COMP_CODE_DEFLATE, 6) == -1) 
+  goto out;
+ if ( sds_verifiy_chunk("dset4",HDF_CHUNK|HDF_COMP,2,in_chunk_lengths) == -1) 
+  goto out;
+ PASSED();
+
+
+/*-------------------------------------------------------------------------
+ * test4:  
+	* SDS SELECTED with SZIP, chunking SELECTED
+ *-------------------------------------------------------------------------
+ */
+ TESTING("hrepack -t dset4:SZIP 8,EC -c dset4:10x8");
+#if defined (H4_HAVE_LIBSZ)
+ if (SZ_encoder_enabled()) {
+ hrepack_init (&options,verbose);
+ hrepack_addcomp("dset4:SZIP 8,EC",&options);
+ hrepack_addchunk("dset4:10x8",&options);
+ if (hrepack(FILENAME,FILENAME_OUT,&options)<0)
+  goto out;
+ hrepack_end (&options);
+	PASSED();
+
+ TESTING(HDIFF_TSTSTR);
+ if (hdiff(FILENAME,FILENAME_OUT,&fspec) == 1)
+  goto out;
+ if ( sds_verifiy_comp("dset4",COMP_CODE_SZIP, 0) == -1) 
+  goto out;
+ if ( sds_verifiy_chunk("dset4",HDF_CHUNK|HDF_COMP,2,in_chunk_lengths) == -1) 
+  goto out;
+ PASSED();
+ } else {
+   /* no szip encoder */
+   SKIPPED();
+ }
+
+#else
+   /* no szip at all */
+   SKIPPED();
+#endif
+
+/*-------------------------------------------------------------------------
+ * test4:  
+	* SDS SELECTED with NONE, chunking SELECTED NONE
+ *-------------------------------------------------------------------------
+ */
+ TESTING("hrepack -t dset_chunk:NONE -c dset_chunk:NONE");
+ hrepack_init (&options,verbose);
+ hrepack_addcomp("dset_chunk_comp:NONE",&options);
+ hrepack_addcomp("dset_chunk:NONE",&options);
+ hrepack_addchunk("dset_chunk_comp:NONE",&options);
+ hrepack_addchunk("dset_chunk:NONE",&options);
+ if (hrepack(FILENAME,FILENAME_OUT,&options)<0)
+  goto out;
+ hrepack_end (&options);
+	PASSED();
+
+ TESTING(HDIFF_TSTSTR);
+ if (hdiff(FILENAME,FILENAME_OUT,&fspec) == 1)
+  goto out;
+ if ( sds_verifiy_comp("dset_chunk_comp",COMP_CODE_NONE, 0) == -1) 
+  goto out;
+ if ( sds_verifiy_comp("dset_chunk",COMP_CODE_NONE, 0) == -1) 
+  goto out;
+ if ( sds_verifiy_chunk("dset_chunk_comp",HDF_NONE,0,0) == -1) 
+  goto out;
+ if ( sds_verifiy_chunk("dset_chunk",HDF_NONE,0,0) == -1) 
+  goto out;
+ PASSED();
+
+
+/*-------------------------------------------------------------------------
+ * test5:
+	* SDS SELECTED with all types, chunking SELECTED
+ *-------------------------------------------------------------------------
+ */
+ TESTING("hrepack -t dset4:GZIP 9 -t dset5:RLE -c dset4:10x8");
+ hrepack_init (&options,verbose);
+ hrepack_addcomp("dset4:GZIP 9",&options);
+ hrepack_addcomp("dset5:RLE",&options);
+ hrepack_addcomp("dset6:HUFF 2",&options);
+#if defined (H4_HAVE_LIBSZ)
+ if (SZ_encoder_enabled()) {
+   hrepack_addcomp("dset7:SZIP 8,EC",&options);
+ }
+#endif
+ hrepack_addchunk("dset4:10x8",&options);
+ hrepack_addchunk("dset5:10x8",&options);
+ hrepack_addchunk("dset6:10x8",&options);
+ if (hrepack(FILENAME,FILENAME_OUT,&options)<0)
+  goto out;
+ hrepack_end (&options);
+	PASSED();
+
+ TESTING(HDIFF_TSTSTR);
+ if (hdiff(FILENAME,FILENAME_OUT,&fspec) == 1)
+  goto out;
+ if ( sds_verifiy_comp("dset4",COMP_CODE_DEFLATE, 9) == -1) 
+  goto out;
+ if ( sds_verifiy_comp("dset5",COMP_CODE_RLE, 0) == -1) 
+  goto out;
+ if ( sds_verifiy_comp("dset6",COMP_CODE_SKPHUFF, 2) == -1) 
+  goto out;
+#if defined (H4_HAVE_LIBSZ)
+ if (SZ_encoder_enabled()) {
+ if ( sds_verifiy_comp("dset7",COMP_CODE_SZIP, 0) == -1) 
+  goto out;
+ }
+#endif
+ if ( sds_verifiy_chunk("dset4",HDF_CHUNK|HDF_COMP,2,in_chunk_lengths) == -1) 
+  goto out;
+ if ( sds_verifiy_chunk("dset5",HDF_CHUNK|HDF_COMP,2,in_chunk_lengths) == -1) 
+  goto out;
+ if ( sds_verifiy_chunk("dset6",HDF_CHUNK|HDF_COMP,2,in_chunk_lengths) == -1) 
+  goto out;
+ PASSED();
+
+
+/*-------------------------------------------------------------------------
+ * test6: 
+ * SDS SELECTED with all types, no chunking
+ *-------------------------------------------------------------------------
+ */
+ TESTING("hrepack -t dset4:GZIP 9 -t dset5:RLE -t dset6:HUFF 2");
+ hrepack_init (&options,verbose);
+ hrepack_addcomp("dset4:GZIP 9",&options);
+ hrepack_addcomp("dset5:RLE",&options);
+ hrepack_addcomp("dset6:HUFF 2",&options);
+#if defined (H4_HAVE_LIBSZ)
+ if (SZ_encoder_enabled()) {
+   hrepack_addcomp("dset7:SZIP 4,EC",&options);
+ }
+#endif
+ if (hrepack(FILENAME,FILENAME_OUT,&options)<0)
+  goto out;
+ hrepack_end (&options);
+	PASSED();
+
+ TESTING(HDIFF_TSTSTR);
+ if (hdiff(FILENAME,FILENAME_OUT,&fspec) == 1)
+  goto out;
+ if ( sds_verifiy_comp("dset4",COMP_CODE_DEFLATE, 9) == -1) 
+  goto out;
+ if ( sds_verifiy_comp("dset5",COMP_CODE_RLE, 0) == -1) 
+  goto out;
+ if ( sds_verifiy_comp("dset6",COMP_CODE_SKPHUFF, 2) == -1) 
+  goto out;
+#if defined (H4_HAVE_LIBSZ)
+ if (SZ_encoder_enabled()) {
+ if ( sds_verifiy_comp("dset7",COMP_CODE_SZIP, 0) == -1) 
+  goto out;
+ }
+#endif
+ PASSED();
+
+
+/*-------------------------------------------------------------------------
+ * test7:  
+	* compressing SDS ALL, chunking SELECTED NONE
+ *-------------------------------------------------------------------------
+ */
+
+ TESTING("hrepack -t *:GZIP 1 -c dset_chunk:NONE");
+ hrepack_init (&options,verbose);
+ hrepack_addcomp("*:GZIP 1",&options);
+ hrepack_addchunk("dset_chunk_comp:NONE",&options);
+ hrepack_addchunk("dset_chunk:NONE",&options);
+ if (hrepack(FILENAME,FILENAME_OUT,&options)<0)
+  goto out;
+ hrepack_end (&options);
+	PASSED();
+
+ TESTING(HDIFF_TSTSTR);
+ if (hdiff(FILENAME,FILENAME_OUT,&fspec) == 1)
+  goto out;
+ if ( sds_verifiy_comp_all(COMP_CODE_DEFLATE, 1) == -1) 
+  goto out;
+ if ( sds_verifiy_chunk("dset_chunk_comp",HDF_NONE,0,0) == -1) 
+  goto out;
+ if ( sds_verifiy_chunk("dset_chunk",HDF_NONE,0,0) == -1) 
+  goto out;
+ PASSED();
+
+/*-------------------------------------------------------------------------
+ * test8:
+	* no compressing, chunking ALL
+ *-------------------------------------------------------------------------
+ */
+
+ TESTING("hrepack -c *:10x8");
+ hrepack_init (&options,verbose);
+ hrepack_addchunk("*:10x8",&options);
+ if (hrepack(FILENAME,FILENAME_OUT,&options)<0)
+  goto out;
+ hrepack_end (&options);
+	PASSED();
+
+ TESTING(HDIFF_TSTSTR);
+ if (hdiff(FILENAME,FILENAME_OUT,&fspec) == 1)
+  goto out;
+ if ( sds_verifiy_chunk_all(HDF_CHUNK,2,in_chunk_lengths,"dset7") == -1) 
+  goto out;
+ PASSED();
+
+
+/*-------------------------------------------------------------------------
+ * test9: 
+ * compressing SDS ALL with GZIP
+ *-------------------------------------------------------------------------
+ */
+
+ TESTING("hrepack -t *:GZIP 1");
+ hrepack_init (&options,verbose);
+ hrepack_addcomp("*:GZIP 1",&options);
+ if (hrepack(FILENAME,FILENAME_OUT,&options)<0)
+  goto out;
+ hrepack_end (&options);
+	PASSED();
+
+ TESTING(HDIFF_TSTSTR);
+ if (hdiff(FILENAME,FILENAME_OUT,&fspec) == 1)
+  goto out;
+ if ( sds_verifiy_comp_all(COMP_CODE_DEFLATE, 1) == -1) 
+  goto out;
+ PASSED();
+
+  
+/*-------------------------------------------------------------------------
+ * all tests PASSED
+ *-------------------------------------------------------------------------
+ */
+
+ 
+ return 0;
+out:
+ H4_FAILED();
+ return 1;
+
+}
+

Added: packages/libhdf4/branches/upstream/current/mfhdf/hrepack/test_hrepack_verify.c
===================================================================
--- packages/libhdf4/branches/upstream/current/mfhdf/hrepack/test_hrepack_verify.c	                        (rev 0)
+++ packages/libhdf4/branches/upstream/current/mfhdf/hrepack/test_hrepack_verify.c	2007-05-15 09:53:05 UTC (rev 831)
@@ -0,0 +1,372 @@
+/****************************************************************************
+ * NCSA HDF                                                                 *
+ * Software Development Group                                               *
+ * National Center for Supercomputing Applications                          *
+ * University of Illinois at Urbana-Champaign                               *
+ * 605 E. Springfield, Champaign IL 61820                                   *
+ *                                                                          *
+ * For conditions of distribution and use, see the accompanying             *
+ * hdf/COPYING file.                                                        *
+ *                                                                          *
+ ****************************************************************************/
+
+
+#include "hdf.h"
+#include "mfhdf.h"
+#include "hcomp.h"
+#include "test_hrepack_verify.h"
+
+/*-------------------------------------------------------------------------
+ * Function: sds_verifiy_comp
+ *
+ * Purpose: utility function to verify compression for SDS_NAME
+ *
+ * Return: void
+ *
+ * Programmer: Pedro Vicente, pvn at ncsa.uiuc.edu
+ *
+ * Date: August 3, 2003
+ *
+ *-------------------------------------------------------------------------
+ */
+
+int sds_verifiy_comp(const char *sds_name, 
+                     int32 in_comp_type, 
+                     int32 in_comp_info)
+{
+ comp_coder_t  comp_type;    /* to retrieve compression type into */
+ comp_info     comp_info;    /* compression structure */ 
+ int32         sd_id,
+               sds_id, 
+               sds_index;   
+
+ /* get chunk and comp */
+ sd_id     = SDstart (FILENAME_OUT, DFACC_RDONLY);
+ sds_index = SDnametoindex(sd_id, sds_name);
+ if ((sds_id = SDselect(sd_id, sds_index))==FAIL) {
+  printf("Error: Cannot open sds <%s>", sds_name);
+  SDend (sd_id);
+  return -1;
+ }
+
+/*-------------------------------------------------------------------------
+ * retrieve and verify the compression info
+ *-------------------------------------------------------------------------
+ */
+ 
+ comp_type = COMP_CODE_NONE;  /* reset variables before retrieving info */
+ HDmemset(&comp_info, 0, sizeof(comp_info)) ;
+ SDgetcompress(sds_id, &comp_type, &comp_info);
+ if ( comp_type != in_comp_type )
+ {
+  printf("Error: Compression type does not match ");
+  SDendaccess (sds_id);
+  SDend (sd_id);
+  return -1;
+ }
+ if (in_comp_info) {
+  if ( comp_info.skphuff.skp_size != in_comp_info )
+  {
+   printf("Error: compresion information does not match ");
+   SDendaccess (sds_id);
+   SDend (sd_id);
+   return -1;
+  }
+ }
+ 
+ /* terminate access to the sds */
+ SDendaccess (sds_id);
+ 
+ /* terminate access to the sd interface */
+ SDend (sd_id);
+ 
+ return 0;
+ 
+}
+
+/*-------------------------------------------------------------------------
+ * Function: sds_verifiy_comp_all
+ *
+ * Purpose: utility function to verify compression for all SDSs
+ *
+ * Return: void
+ *
+ * Programmer: Pedro Vicente, pvn at ncsa.uiuc.edu
+ *
+ * Date: August 3, 2003
+ *
+ *-------------------------------------------------------------------------
+ */
+
+int sds_verifiy_comp_all(int32 in_comp_type, 
+                         int32 in_comp_info)
+{
+ comp_coder_t  comp_type;    /* to retrieve compression type into */
+ comp_info     comp_info;    /* compression structure */ 
+ int32         sd_id,
+               sds_id, 
+               sds_index,
+               n_datasets,   /* number of datasets in the file */
+               n_file_attrs, /* number of file attributes */
+               data_type,              /* number type  */
+               rrank,                  /* read rank */
+               n_attrs,                /* number of attributes */
+               dim_sizes[MAX_VAR_DIMS];/* dimensions of an image */
+ char          name[MAX_GR_NAME];      /* name of dataset */
+ int           info;
+ int status;
+
+ /* initialize the sd interface */
+ sd_id  = SDstart (FILENAME_OUT, DFACC_READ);
+ 
+ /* determine the number of data sets in the file */
+ if (SDfileinfo (sd_id, &n_datasets, &n_file_attrs)==FAIL) {
+  printf("Error: Cannot get file information");
+  SDend (sd_id);
+  return -1;
+ }
+ 
+ for (sds_index = 0; sds_index < n_datasets; sds_index++)
+ {
+  sds_id   = SDselect (sd_id, sds_index);
+  
+  /* skip dimension scales */
+  if ( SDiscoordvar(sds_id) ) {
+   SDendaccess(sds_id);
+   continue;
+  }
+
+  name[0] = '\0';
+  status=SDgetinfo(sds_id, name, &rrank, dim_sizes, &data_type, &n_attrs);
+  if (status < 0) {
+   printf("Error: can't read info for SDS <%s>",name);
+   SDendaccess (sds_id);
+   SDend (sd_id);
+   return -1;
+  }
+ 
+ /*-------------------------------------------------------------------------
+  * retrieve and verify the compression info
+  *-------------------------------------------------------------------------
+  */
+  
+  comp_type = COMP_CODE_NONE;  /* reset variables before retrieving info */
+  HDmemset(&comp_info, 0, sizeof(comp_info)) ;
+  
+  status = SDgetcompress(sds_id, &comp_type, &comp_info);
+  if (status < 0) {
+   printf("Warning: can't read compression for SDS <%s>",name);
+  } else {
+  if ( comp_type != in_comp_type )
+  {
+   printf("Error: compression type does not match <%s>",name);
+   SDendaccess (sds_id);
+   SDend (sd_id);
+   return -1;
+  }
+  if (in_comp_type) 
+  {
+   switch (in_comp_type)
+   {
+   case COMP_CODE_NONE:
+    break;
+   case COMP_CODE_RLE:
+    break;
+   case COMP_CODE_SZIP:
+    break;
+   case COMP_CODE_SKPHUFF:
+    info  = comp_info.skphuff.skp_size;
+    break;
+   case COMP_CODE_DEFLATE:
+    info  = comp_info.deflate.level;
+    break;
+   default:
+    printf("Error: Unrecognized compression code %d\n",in_comp_type);
+    break;
+   };
+   
+   if ( info != in_comp_info )
+   {
+    printf("Error: compresion information does not match for <%s>",name);
+    SDendaccess (sds_id);
+    SDend (sd_id);
+    return -1;
+   }
+  }
+  }
+  
+  /* terminate access to the current dataset */
+  SDendaccess (sds_id);
+ }
+ 
+ /* terminate access to the sd interface */
+ SDend (sd_id);
+ 
+ return 0;
+}
+
+/*-------------------------------------------------------------------------
+ * Function: sds_verifiy_chunk
+ *
+ * Purpose: utility function to verify chunking for  SDS_NAME
+ *
+ * Return: void
+ *
+ * Programmer: Pedro Vicente, pvn at ncsa.uiuc.edu
+ *
+ * Date: August 3, 2003
+ *
+ *-------------------------------------------------------------------------
+ */
+
+int sds_verifiy_chunk(const char *sds_name, 
+                      int32 in_chunk_flags, 
+                      int rank, 
+                      int32 *in_chunk_lengths)
+{
+ HDF_CHUNK_DEF chunk_def;    /* chunk defintion read */ 
+ int32         chunk_flags;  /* chunking flag */ 
+ int32         sd_id,
+               sds_id, 
+               sds_index;   
+ int           i;
+
+ /* get chunk and comp */
+ sd_id     = SDstart (FILENAME_OUT, DFACC_RDONLY);
+ sds_index = SDnametoindex(sd_id, sds_name);
+ if ((sds_id = SDselect(sd_id, sds_index))==FAIL) {
+  printf("Error: cannot open sds <%s>", sds_name);
+  SDend (sd_id);
+  return -1;
+ }
+ SDgetchunkinfo (sds_id, &chunk_def, &chunk_flags);
+
+/*-------------------------------------------------------------------------
+ * retrieve and verify the chunk info
+ *-------------------------------------------------------------------------
+ */
+ if ( chunk_flags != (in_chunk_flags) )
+ {
+  printf("Error: chunk flags do not match");
+  SDendaccess (sds_id);
+  SDend (sd_id);
+  return -1;
+ }
+ for (i = 0; i < rank; i++)
+ {
+  if (chunk_def.chunk_lengths[i] != in_chunk_lengths[i] )
+  {
+   printf("Error: chunk lengths do not match ");
+   SDendaccess (sds_id);
+   SDend (sd_id);
+   return -1;
+  }
+ }
+
+ /* terminate access to the sds */
+ SDendaccess (sds_id);
+ 
+ /* terminate access to the sd interface */
+ SDend (sd_id);
+ 
+ return 0;
+ 
+}
+
+/*-------------------------------------------------------------------------
+ * Function: sds_verifiy_chunk_all
+ *
+ * Purpose: utility function to verify chunking for all SDSs
+ *
+ * Return: void
+ *
+ * Programmer: Pedro Vicente, pvn at ncsa.uiuc.edu
+ *
+ * Date: August 3, 2003
+ *
+ *-------------------------------------------------------------------------
+ */
+
+int sds_verifiy_chunk_all(int32 in_chunk_flags, 
+                          int rank, 
+                          int32 *in_chunk_lengths,
+                          const char *sds_exclude)
+{
+ HDF_CHUNK_DEF chunk_def;    /* chunk defintion read */ 
+ int32         chunk_flags;  /* chunking flag */ 
+ int32         sd_id,
+               sds_id, 
+               sds_index,
+               n_datasets,   /* number of datasets in the file */
+               n_file_attrs, /* number of file attributes */
+               data_type,              /* number type  */
+               rrank,                  /* read rank */
+               n_attrs,                /* number of attributes */
+               dim_sizes[MAX_VAR_DIMS];/* dimensions of an image */
+ char          name[MAX_GR_NAME];      /* name of dataset */
+ int           i;
+
+ /* initialize the sd interface */
+ sd_id  = SDstart (FILENAME_OUT, DFACC_READ);
+ 
+ /* determine the number of data sets in the file */
+ if (SDfileinfo (sd_id, &n_datasets, &n_file_attrs)==FAIL) {
+  printf("Error: cannot get file information");
+  SDend (sd_id);
+  return -1;
+ }
+ 
+ for (sds_index = 0; sds_index < n_datasets; sds_index++)
+ {
+  sds_id   = SDselect (sd_id, sds_index);
+  
+  /* skip dimension scales */
+  if ( SDiscoordvar(sds_id) ) {
+   SDendaccess(sds_id);
+   continue;
+  }
+
+  SDgetinfo(sds_id, name, &rrank, dim_sizes, &data_type, &n_attrs);
+  SDgetchunkinfo (sds_id, &chunk_def, &chunk_flags);
+
+  /* do not compare this one */
+  if (strcmp(name,sds_exclude)==0)
+  {
+   SDendaccess(sds_id);
+   SDend (sd_id);
+   return 0;
+  }
+  
+ /*-------------------------------------------------------------------------
+  * retrieve and verify the chunk info
+  *-------------------------------------------------------------------------
+  */
+  if ( chunk_flags != (in_chunk_flags) )
+  {
+   printf("Error: chunk flags do not match");
+   SDendaccess (sds_id);
+   SDend (sd_id);
+   return -1;
+  }
+  for (i = 0; i < rank; i++)
+  {
+   if (chunk_def.chunk_lengths[i] != in_chunk_lengths[i] )
+   {
+    printf("Error: chunk lengths do not match ");
+    SDendaccess (sds_id);
+    SDend (sd_id);
+    return -1;
+   }
+  }
+  
+  /* terminate access to the current dataset */
+  SDendaccess (sds_id);
+ }
+ 
+ /* terminate access to the sd interface */
+ SDend (sd_id);
+ 
+ return 0;
+ 
+}
+

Added: packages/libhdf4/branches/upstream/current/mfhdf/hrepack/test_hrepack_verify.h
===================================================================
--- packages/libhdf4/branches/upstream/current/mfhdf/hrepack/test_hrepack_verify.h	                        (rev 0)
+++ packages/libhdf4/branches/upstream/current/mfhdf/hrepack/test_hrepack_verify.h	2007-05-15 09:53:05 UTC (rev 831)
@@ -0,0 +1,42 @@
+
+/****************************************************************************
+ * NCSA HDF                                                                 *
+ * Software Development Group                                               *
+ * National Center for Supercomputing Applications                          *
+ * University of Illinois at Urbana-Champaign                               *
+ * 605 E. Springfield, Champaign IL 61820                                   *
+ *                                                                          *
+ * For conditions of distribution and use, see the accompanying             *
+ * hdf/COPYING file.                                                        *
+ *                                                                          *
+ ****************************************************************************/
+
+
+#ifndef REPACK_VERIFY_H
+#define REPACK_VERIFY_H
+
+
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+ 
+#define FILENAME         "hziptst.hdf"
+#define FILENAME_OUT     "hziptst_out.hdf"
+
+
+int sds_verifiy_comp(const char *sds_name, int32 in_comp_type, int32 in_comp_info);
+int sds_verifiy_comp_all(int32 in_comp_type, int32 in_comp_info);
+int sds_verifiy_chunk(const char *sds_name, int32 in_chunk_flags, int rank, 
+                      int32 *in_chunk_lengths);
+int sds_verifiy_chunk_all(int32 in_chunk_flags, int rank, 
+                          int32 *in_chunk_lengths,const char *sds_exclude);
+
+
+#ifdef __cplusplus
+}
+#endif
+
+
+#endif  /* REPACK_VERIFY_H */

Added: packages/libhdf4/branches/upstream/current/mfhdf/libsrc/Makefile.am
===================================================================
--- packages/libhdf4/branches/upstream/current/mfhdf/libsrc/Makefile.am	                        (rev 0)
+++ packages/libhdf4/branches/upstream/current/mfhdf/libsrc/Makefile.am	2007-05-15 09:53:05 UTC (rev 831)
@@ -0,0 +1,90 @@
+#############################################################################
+##                      Setup for building programs                        ##
+#############################################################################
+
+## Setup the different includes and preprocessor #defines we need.
+INCLUDES=-I$(top_srcdir)/hdf/src        \
+         -I$(top_srcdir)/mfhdf/libsrc   \
+         -I$(top_srcdir)/mfhdf/port
+DEFINES=-DNDEBUG -DHDF
+AM_CPPFLAGS=$(INCLUDES) $(DEFINES)
+
+#############################################################################
+##                          Library to build                               ##
+#############################################################################
+
+lib_LIBRARIES = libmfhdf.a
+
+## Information for building the "libmfhdf.a" library
+CSOURCES=array.c attr.c cdf.c dim.c file.c hdfsds.c iarray.c error.c    \
+         globdef.c mfsd.c nssdc.c putget.c putgetg.c sharray.c string.c \
+         var.c xdrposix.c
+FSOURCES=../fortran/jackets.c ../fortran/mfsdf.c ../fortran/mfsdff.f
+XDRSOURCES=../xdr/xdr.c ../xdr/xdrfloat.c ../xdr/xdrstdio.c ../xdr/xdrarray.c
+
+if HDF_BUILD_FORTRAN
+
+if HDF_BUILD_XDR
+libmfhdf_a_SOURCES = $(CSOURCES) $(FSOURCES) $(XDRSOURCES)
+else
+libmfhdf_a_SOURCES = $(CSOURCES) $(FSOURCES)
+endif
+
+else
+
+if HDF_BUILD_XDR
+libmfhdf_a_SOURCES = $(CSOURCES) $(XDRSOURCES)
+else
+libmfhdf_a_SOURCES = $(CSOURCES)
+endif
+
+endif
+
+include_HEADERS = hdf2netcdf.h local_nc.h mfhdf.h netcdf.h 
+
+#############################################################################
+##                              Testing                                    ##
+#############################################################################
+
+check_PROGRAMS = cdftest hdftest
+
+cdftest_SOURCES = cdftest.c
+cdftest_LDADD = libmfhdf.a $(top_builddir)/hdf/src/libdf.a @LIBS@
+
+hdftest_SOURCES = hdftest.c tszip.c temptySDSs.c tidtypes.c trank0.c \
+		  tsd.c
+hdftest_LDADD = libmfhdf.a $(top_builddir)/hdf/src/libdf.a @LIBS@
+
+check:
+	@echo "============================"
+	@echo "HDF-SD C interfaces tests"
+	@echo "============================"
+	srcdir="$(srcdir)" ./hdftest > hdfout.new
+	@cmd="$(DIFF) hdfout.new $(srcdir)/hdfout.sav";                 \
+	  echo $$cmd;                                                   \
+	  if $$cmd; then                                                \
+	    echo "*** HDF passes formatted test ***";                   \
+	  else                                                          \
+	    echo "*** HDF fails formatted test ***";                    \
+	    echo "The above differences are OK if small";               \
+	    exit 0;                                                     \
+	  fi
+	@echo "========================="
+	@echo "netCDF formatted tests"
+	@echo "========================="
+	srcdir="$(srcdir)" ./cdftest > cdfout.new
+	@cmd="$(DIFF) cdfout.new $(srcdir)/testout.sav";                \
+	  echo $$cmd;                                                   \
+	  if $$cmd; then                                                \
+	    echo "*** netCDF passes formatted test ***";                \
+	  else                                                          \
+	    echo "*** netCDF fails formatted test ***";                 \
+	    echo "The above differences are OK if small";               \
+	    exit 0;                                                     \
+	  fi
+
+#############################################################################
+##                          And the cleanup                                ##
+#############################################################################
+
+DISTCLEANFILES=*.new *.hdf *.cdf *.cdl netcdf.h

Modified: packages/libhdf4/branches/upstream/current/mfhdf/libsrc/Makefile.in
===================================================================
--- packages/libhdf4/branches/upstream/current/mfhdf/libsrc/Makefile.in	2007-05-15 09:05:29 UTC (rev 830)
+++ packages/libhdf4/branches/upstream/current/mfhdf/libsrc/Makefile.in	2007-05-15 09:53:05 UTC (rev 831)
@@ -1,805 +1,758 @@
-# Makefile for netCDF library
-#
-# $Id: Makefile.in,v 1.30 2000/08/30 21:55:46 wendling Exp $
-# NOTE: This Makefile.in is used by the Cygnus 'configure' script to
-#       generate the top level Makefile.
+# Makefile.in generated by automake 1.7.7 from Makefile.am.
+# @configure_input@
 
-# ############# Start of system configuration section. #############
+# Copyright 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003
+# 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.
 
-# 'srcdir' Gets set to directory this Makefile is found in
-srcdir = .
-TOP_SRCDIR = ../..
+# 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.
 
-prefix = $(TOP_SRCDIR)/NewHDF
+ at SET_MAKE@
 
-exec_prefix = $(prefix)
-tooldir = $(exec_prefix)/$(target)
+#############################################################################
+#############################################################################
 
-program_transform_name =
+srcdir = @srcdir@
+top_srcdir = @top_srcdir@
+VPATH = @srcdir@
+pkgdatadir = $(datadir)/@PACKAGE@
+pkglibdir = $(libdir)/@PACKAGE@
+pkgincludedir = $(includedir)/@PACKAGE@
+top_builddir = ../..
 
-datadir = $(prefix)/lib
-mandir = $(prefix)/man
-man1dir = $(mandir)/man1
-man2dir = $(mandir)/man2
-man3dir = $(mandir)/man3
-man4dir = $(mandir)/man4
-man5dir = $(mandir)/man5
-man6dir = $(mandir)/man6
-man7dir = $(mandir)/man7
-man8dir = $(mandir)/man8
-man9dir = $(mandir)/man9
-docdir = $(datadir)/doc
+am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
+INSTALL = @INSTALL@
+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 = :
+host_triplet = @host@
+ACLOCAL = @ACLOCAL@
+AMDEP_FALSE = @AMDEP_FALSE@
+AMDEP_TRUE = @AMDEP_TRUE@
+AMTAR = @AMTAR@
+AR = @AR@
+AUTOCONF = @AUTOCONF@
+AUTOHEADER = @AUTOHEADER@
+AUTOMAKE = @AUTOMAKE@
+AWK = @AWK@
+CC = @CC@
+CCDEPMODE = @CCDEPMODE@
+CFLAGS = @CFLAGS@
+CPP = @CPP@
+CPPFLAGS = @CPPFLAGS@
+CXX = @CXX@
+CXXCPP = @CXXCPP@
+CXXDEPMODE = @CXXDEPMODE@
+CXXFLAGS = @CXXFLAGS@
+CYGPATH_W = @CYGPATH_W@
+DEFS = @DEFS@
+DEPDIR = @DEPDIR@
+DIFF = @DIFF@
+ECHO_C = @ECHO_C@
+ECHO_N = @ECHO_N@
+ECHO_T = @ECHO_T@
+EGREP = @EGREP@
+EXEEXT = @EXEEXT@
+F77 = @F77@
+FFLAGS = @FFLAGS@
+HDF_BUILD_FORTRAN_FALSE = @HDF_BUILD_FORTRAN_FALSE@
+HDF_BUILD_FORTRAN_TRUE = @HDF_BUILD_FORTRAN_TRUE@
+HDF_BUILD_XDR_FALSE = @HDF_BUILD_XDR_FALSE@
+HDF_BUILD_XDR_TRUE = @HDF_BUILD_XDR_TRUE@
+INSTALL_DATA = @INSTALL_DATA@
+INSTALL_PROGRAM = @INSTALL_PROGRAM@
+INSTALL_SCRIPT = @INSTALL_SCRIPT@
+INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
+LDFLAGS = @LDFLAGS@
+LEX = @LEX@
+LEXLIB = @LEXLIB@
+LEX_OUTPUT_ROOT = @LEX_OUTPUT_ROOT@
+LIBOBJS = @LIBOBJS@
+LIBS = @LIBS@
+LN_S = @LN_S@
+LTLIBOBJS = @LTLIBOBJS@
+MAINT = @MAINT@
+MAINTAINER_MODE_FALSE = @MAINTAINER_MODE_FALSE@
+MAINTAINER_MODE_TRUE = @MAINTAINER_MODE_TRUE@
+MAKEINFO = @MAKEINFO@
+NEQN = @NEQN@
+OBJEXT = @OBJEXT@
+PACKAGE = @PACKAGE@
+PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
+PACKAGE_NAME = @PACKAGE_NAME@
+PACKAGE_STRING = @PACKAGE_STRING@
+PACKAGE_TARNAME = @PACKAGE_TARNAME@
+PACKAGE_VERSION = @PACKAGE_VERSION@
+PATH_SEPARATOR = @PATH_SEPARATOR@
+RANLIB = @RANLIB@
+SET_MAKE = @SET_MAKE@
+SHELL = @SHELL@
+STRIP = @STRIP@
+TBL = @TBL@
+VERSION = @VERSION@
+YACC = @YACC@
+ac_ct_CC = @ac_ct_CC@
+ac_ct_CXX = @ac_ct_CXX@
+ac_ct_F77 = @ac_ct_F77@
+ac_ct_RANLIB = @ac_ct_RANLIB@
+ac_ct_STRIP = @ac_ct_STRIP@
+am__fastdepCC_FALSE = @am__fastdepCC_FALSE@
+am__fastdepCC_TRUE = @am__fastdepCC_TRUE@
+am__fastdepCXX_FALSE = @am__fastdepCXX_FALSE@
+am__fastdepCXX_TRUE = @am__fastdepCXX_TRUE@
+am__include = @am__include@
+am__leading_dot = @am__leading_dot@
+am__quote = @am__quote@
+bindir = @bindir@
+build = @build@
+build_alias = @build_alias@
+build_cpu = @build_cpu@
+build_os = @build_os@
+build_vendor = @build_vendor@
+datadir = @datadir@
+exec_prefix = @exec_prefix@
+host = @host@
+host_alias = @host_alias@
+host_cpu = @host_cpu@
+host_os = @host_os@
+host_vendor = @host_vendor@
+includedir = @includedir@
+infodir = @infodir@
+install_sh = @install_sh@
+libdir = @libdir@
+libexecdir = @libexecdir@
+localstatedir = @localstatedir@
+mandir = @mandir@
+oldincludedir = @oldincludedir@
+prefix = @prefix@
+program_transform_name = @program_transform_name@
+sbindir = @sbindir@
+sharedstatedir = @sharedstatedir@
+sysconfdir = @sysconfdir@
+target_alias = @target_alias@
 
-SHELL = /bin/sh
+INCLUDES = -I$(top_srcdir)/hdf/src        \
+         -I$(top_srcdir)/mfhdf/libsrc   \
+         -I$(top_srcdir)/mfhdf/port
 
-INSTALL = ${TOP_SRCDIR}/install-sh -c
-INSTALL_PROGRAM = $(INSTALL)
-INSTALL_DATA = $(INSTALL) -m 644
+DEFINES = -DNDEBUG -DHDF
+AM_CPPFLAGS = $(INCLUDES) $(DEFINES)
 
-# /usr/local/bin/m4 (GNU version?)
-M4   = /usr/local/bin/m4
-# /usr/local/bin/perl (GNU version?)
-PERL = /usr/local/bin/perl
 
-# Name of achive randomizer, usually ranlib (use 'touch' if non-existant)
-RANLIB = ranlib
+#############################################################################
+#############################################################################
+lib_LIBRARIES = libmfhdf.a
 
-# Name of library archiver and flags to send, default 'AR=ar', 'ARFLAGS=r'
-AR = ar
-ARFLAGS = rc
+CSOURCES = array.c attr.c cdf.c dim.c file.c hdfsds.c iarray.c error.c    \
+         globdef.c mfsd.c nssdc.c putget.c putgetg.c sharray.c string.c \
+         var.c xdrposix.c
 
-# Name of remove utility, default 'RM=/bin/rm', 'RMFLAGS=-f'
-RM = /bin/rm
-RMFLAGS = -f
+FSOURCES = ../fortran/jackets.c ../fortran/mfsdf.c ../fortran/mfsdff.f
+XDRSOURCES = ../xdr/xdr.c ../xdr/xdrfloat.c ../xdr/xdrstdio.c ../xdr/xdrarray.c
+ at HDF_BUILD_FORTRAN_FALSE@@HDF_BUILD_XDR_FALSE at libmfhdf_a_SOURCES = $(CSOURCES)
+ at HDF_BUILD_FORTRAN_TRUE@@HDF_BUILD_XDR_FALSE at libmfhdf_a_SOURCES = $(CSOURCES) $(FSOURCES)
 
-AS = as
-CC = gcc
-CFLAGS = -ansi
-FC = f77
-FFLAGS=
+ at HDF_BUILD_FORTRAN_TRUE@@HDF_BUILD_XDR_TRUE at libmfhdf_a_SOURCES = $(CSOURCES) $(FSOURCES) $(XDRSOURCES)
 
-# Set for document generation
-MAKEINFO = makeinfo
-TEXI2DVI = texi2dvi
+ at HDF_BUILD_FORTRAN_FALSE@@HDF_BUILD_XDR_TRUE at libmfhdf_a_SOURCES = $(CSOURCES) $(XDRSOURCES)
 
-# Directory in which to install binaries
-bindir = $(exec_prefix)/bin
+include_HEADERS = hdf2netcdf.h local_nc.h mfhdf.h netcdf.h 
 
-# Directory in which to install header files.
-includedir = $(prefex)/include
 
-# Directory in which to install library files.
-libdir = $(prefix)/lib
+#############################################################################
+#############################################################################
+check_PROGRAMS = cdftest hdftest
 
-# Directory in which to install documentation info files.
-infodir = $(prefix)/info
+cdftest_SOURCES = cdftest.c
+cdftest_LDADD = libmfhdf.a $(top_builddir)/hdf/src/libdf.a @LIBS@
 
-# ------------ General Macros for NETCDF --------------------
-INCDIR	 = $(prefix)/include
-HDF_LIB  = $(TOP_SRCDIR)/hdf/src/libdf.a
-HDF_INC  = $(TOP_SRCDIR)/hdf/src/
-PABLO_HINC = $(TOP_SRCDIR)/hdf/pablo
-FMPOOL_INC = $(TOP_SRCDIR)/hdf/fmpool
-JPEG_LIB = $(TOP_SRCDIR)/hdf/jpeg/libjpeg.a
-ZLIB_LIB = $(TOP_SRCDIR)/hdf/zlib/libz.a
-NETCDF_INC = $(TOP_SRCDIR)/mfhdf/libsrc
-PORT_INC   = $(TOP_SRCDIR)/mfhdf/port
-CPP	   = $(CC) -E
-CFLAGS_NETCDF = 
-CPPFLAGS_HDF  = -DNDEBUG -DHDF $(FMPOOL_FLAGS)
-CPP_NETCDF    = -I. -I$(HDF_INC) -I$(NETCDF_INC) -I$(PORT_INC)
-CPPFLAGS_LIB	= $(SWAP) $(NETLONG) 
-CPPFLAGS_XDR	= $(CPP_XDR) 
-CPPFLAGS_NETCDF =  $(CPPFLAGS_XDR) $(CPP_NETCDF) $(CPPFLAGS_LIB) $(CPPFLAGS_HDF) 
-FFLAGS  =
-NCDUMP	= 
-NCGEN	= 
-NEQN	= neqn
-OS	= 
-TBL	= tbl
-WHICH	= which
-FTPDIR	= 
-VERSION	= 2.3.2
-LEX	= lex
-YACC	= yacc
-DIFF    = diff
-DIFF_FLAGS = -w
+hdftest_SOURCES = hdftest.c tszip.c temptySDSs.c tidtypes.c trank0.c \
+		  tsd.c
 
+hdftest_LDADD = libmfhdf.a $(top_builddir)/hdf/src/libdf.a @LIBS@
 
-#### ----- host and target specific makefile fragments come in here.-------
-### ------------------- end of makefile fragments -------------------------
-# ############# End of system configuration section. ###############
 
-OTHERDIRS = config
+#############################################################################
+#############################################################################
+DISTCLEANFILES = *.new *.hdf *.cdf *.cdl netcdf.h
+subdir = mfhdf/libsrc
+ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
+mkinstalldirs = $(SHELL) $(top_srcdir)/bin/mkinstalldirs
+CONFIG_HEADER = $(top_builddir)/hdf/src/h4config.h
+CONFIG_CLEAN_FILES =
+LIBRARIES = $(lib_LIBRARIES)
 
-PROGRAM		= cdftest
-#SWAP    	= @SWAP@
-#NETLONG    	= @NETLONG@
-#CPPFLAGS	= $(CPPFLAGS_LIB)
-#CFLAGS		= $(CFLAGS_LIB)
-GARBAGE		= $(PROGRAM) test.cdf cdfout.new *.hdf \
-                  hdftest hdfout.new
-HEADERS		= netcdf.h mfhdf.h local_nc.h hdf2netcdf.h
-#XDRFILE	= @XDRFILE@
-#HDF_LIB         = @HDF_LIB@
-#JPEG_LIB        = @JPEG_LIB@
-CSRCS		= array.c attr.c cdf.c dim.c error.c file.c \
-		  globdef.c iarray.c putget.c putgetg.c sharray.c string.c \
-		  var.c xdrposix.c xdrstdio.c hdfsds.c mfsd.c nssdc.c
-MANIFEST = $(DISTFILES)
-DISTFILES	= Makefile.in README \
-		  depend \
-		  $(CSRCS) cdftest.c \
-		  alloc.h testout.sav descrip.mms error.h htons.mar \
-		  local_nc.h make.com msoft.mk netcdf.h ntohs.mar \
-		  test_cdf.sav hdfout.sav hdftest.c mfhdf.h win32cdf.h hdf2netcdf.h \
-		config/netcdf-hpux.h config/netcdf-irix4.h config/netcdf-irix5.h \
-		config/netcdf-irix6.h config/netcdf-irix32.h config/netcdf-sun.h \
-		config/netcdf-linux.h config/netcdf-fbsd.h config/netcdf-alpha.h \
-		config/netcdf-dec.h config/netcdf-aix.h config/netcdf-solaris.h \
-		config/netcdf-solarisx86.h config/netcdf-convex.h \
-		config/netcdf-unicos.h
+libmfhdf_a_AR = $(AR) cru
+libmfhdf_a_LIBADD =
+am__libmfhdf_a_SOURCES_DIST = array.c attr.c cdf.c dim.c file.c hdfsds.c \
+	iarray.c error.c globdef.c mfsd.c nssdc.c putget.c putgetg.c \
+	sharray.c string.c var.c xdrposix.c ../fortran/jackets.c \
+	../fortran/mfsdf.c ../fortran/mfsdff.f ../xdr/xdr.c \
+	../xdr/xdrfloat.c ../xdr/xdrstdio.c ../xdr/xdrarray.c
+am__objects_1 = array.$(OBJEXT) attr.$(OBJEXT) cdf.$(OBJEXT) \
+	dim.$(OBJEXT) file.$(OBJEXT) hdfsds.$(OBJEXT) iarray.$(OBJEXT) \
+	error.$(OBJEXT) globdef.$(OBJEXT) mfsd.$(OBJEXT) \
+	nssdc.$(OBJEXT) putget.$(OBJEXT) putgetg.$(OBJEXT) \
+	sharray.$(OBJEXT) string.$(OBJEXT) var.$(OBJEXT) \
+	xdrposix.$(OBJEXT)
+am__objects_2 = xdr.$(OBJEXT) xdrfloat.$(OBJEXT) xdrstdio.$(OBJEXT) \
+	xdrarray.$(OBJEXT)
+am__objects_3 = jackets.$(OBJEXT) mfsdf.$(OBJEXT) mfsdff.$(OBJEXT)
+ at HDF_BUILD_FORTRAN_FALSE@@HDF_BUILD_XDR_TRUE at am_libmfhdf_a_OBJECTS = \
+ at HDF_BUILD_FORTRAN_FALSE@@HDF_BUILD_XDR_TRUE@	$(am__objects_1) \
+ at HDF_BUILD_FORTRAN_FALSE@@HDF_BUILD_XDR_TRUE@	$(am__objects_2)
+ at HDF_BUILD_FORTRAN_FALSE@@HDF_BUILD_XDR_FALSE at am_libmfhdf_a_OBJECTS = \
+ at HDF_BUILD_FORTRAN_FALSE@@HDF_BUILD_XDR_FALSE@	$(am__objects_1)
+ at HDF_BUILD_FORTRAN_TRUE@@HDF_BUILD_XDR_TRUE at am_libmfhdf_a_OBJECTS = \
+ at HDF_BUILD_FORTRAN_TRUE@@HDF_BUILD_XDR_TRUE@	$(am__objects_1) \
+ at HDF_BUILD_FORTRAN_TRUE@@HDF_BUILD_XDR_TRUE@	$(am__objects_3) \
+ at HDF_BUILD_FORTRAN_TRUE@@HDF_BUILD_XDR_TRUE@	$(am__objects_2)
+ at HDF_BUILD_FORTRAN_TRUE@@HDF_BUILD_XDR_FALSE at am_libmfhdf_a_OBJECTS = \
+ at HDF_BUILD_FORTRAN_TRUE@@HDF_BUILD_XDR_FALSE@	$(am__objects_1) \
+ at HDF_BUILD_FORTRAN_TRUE@@HDF_BUILD_XDR_FALSE@	$(am__objects_3)
+libmfhdf_a_OBJECTS = $(am_libmfhdf_a_OBJECTS)
+check_PROGRAMS = cdftest$(EXEEXT) hdftest$(EXEEXT)
+am_cdftest_OBJECTS = cdftest.$(OBJEXT)
+cdftest_OBJECTS = $(am_cdftest_OBJECTS)
+cdftest_DEPENDENCIES = libmfhdf.a $(top_builddir)/hdf/src/libdf.a
+cdftest_LDFLAGS =
+am_hdftest_OBJECTS = hdftest.$(OBJEXT) tszip.$(OBJEXT) \
+	temptySDSs.$(OBJEXT) tidtypes.$(OBJEXT) trank0.$(OBJEXT) \
+	tsd.$(OBJEXT)
+hdftest_OBJECTS = $(am_hdftest_OBJECTS)
+hdftest_DEPENDENCIES = libmfhdf.a $(top_builddir)/hdf/src/libdf.a
+hdftest_LDFLAGS =
 
-LIBOBJS		= array.o attr.o cdf.o dim.o file.o iarray.o error.o \
-		  globdef.o putget.o putgetg.o sharray.o string.o var.o \
-		  $(XDRFILE).o hdfsds.o mfsd.o nssdc.o
-LIBRARY		= mfhdf
-DEBUGLIBRARY	= mfhdf_g
-PROFILEDLIBRARY	= mfhdf_pg
-OBJS		= $(PROGRAM).o
-#LD_XDR		= @LD_XDR@
-LD_NETCDF	= libmfhdf.a
-LIBS		= $(LD_NETCDF) $(LD_XDR) $(HDF_LIB) $(JPEG_LIB) $(LIBSX) $(ZLIB_LIB)
-prefix		= ../../..
+DEFAULT_INCLUDES =  -I. -I$(srcdir) -I$(top_builddir)/hdf/src
+depcomp = $(SHELL) $(top_srcdir)/bin/depcomp
+am__depfiles_maybe = depfiles
+ at AMDEP_TRUE@DEP_FILES = ./$(DEPDIR)/array.Po ./$(DEPDIR)/attr.Po \
+ at AMDEP_TRUE@	./$(DEPDIR)/cdf.Po ./$(DEPDIR)/cdftest.Po \
+ at AMDEP_TRUE@	./$(DEPDIR)/dim.Po ./$(DEPDIR)/error.Po \
+ at AMDEP_TRUE@	./$(DEPDIR)/file.Po ./$(DEPDIR)/globdef.Po \
+ at AMDEP_TRUE@	./$(DEPDIR)/hdfsds.Po ./$(DEPDIR)/hdftest.Po \
+ at AMDEP_TRUE@	./$(DEPDIR)/iarray.Po ./$(DEPDIR)/jackets.Po \
+ at AMDEP_TRUE@	./$(DEPDIR)/mfsd.Po ./$(DEPDIR)/mfsdf.Po \
+ at AMDEP_TRUE@	./$(DEPDIR)/nssdc.Po ./$(DEPDIR)/putget.Po \
+ at AMDEP_TRUE@	./$(DEPDIR)/putgetg.Po ./$(DEPDIR)/sharray.Po \
+ at AMDEP_TRUE@	./$(DEPDIR)/string.Po ./$(DEPDIR)/temptySDSs.Po \
+ at AMDEP_TRUE@	./$(DEPDIR)/tidtypes.Po ./$(DEPDIR)/trank0.Po \
+ at AMDEP_TRUE@	./$(DEPDIR)/tsd.Po ./$(DEPDIR)/tszip.Po \
+ at AMDEP_TRUE@	./$(DEPDIR)/var.Po ./$(DEPDIR)/xdr.Po \
+ at AMDEP_TRUE@	./$(DEPDIR)/xdrarray.Po ./$(DEPDIR)/xdrfloat.Po \
+ at AMDEP_TRUE@	./$(DEPDIR)/xdrposix.Po ./$(DEPDIR)/xdrstdio.Po
+COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \
+	$(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
+CCLD = $(CC)
+LINK = $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@
+F77COMPILE = $(F77) $(AM_FFLAGS) $(FFLAGS)
+F77LD = $(F77)
+F77LINK = $(F77LD) $(AM_FFLAGS) $(FFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@
+DIST_SOURCES = $(am__libmfhdf_a_SOURCES_DIST) $(cdftest_SOURCES) \
+	$(hdftest_SOURCES)
+HEADERS = $(include_HEADERS)
 
-#all::		library
-all::         FORCE
-	@if test -z "$(FMPOOL_FLAGS)"; then \
-	  $(MAKE) $(MFLAGS) $(LOCAL_MACROS) library; \
-	else		 \
-	  $(MAKE) $(MFLAGS) $(LOCAL_MACROS) FMPOOL_FLAGS="$(FMPOOL_FLAGS) -I$(FMPOOL_INC)" library; \
-	fi
+DIST_COMMON = README $(include_HEADERS) $(srcdir)/Makefile.in \
+	Makefile.am
+SOURCES = $(libmfhdf_a_SOURCES) $(cdftest_SOURCES) $(hdftest_SOURCES)
 
-#
-# The formatted file `cdftest_out.new' might differ from the touchstone
-# file `testout.sav', but this should be due to rounding errors.
-#
-# `$(PROGRAM)' creates the binary-file `test.cdf' which should be byte-for-byte
-# identical with `test_cdf.sav', modulo small rounding errors.
-#
-test:		$(PROGRAM) nhdftest
-	@ echo "========================="
-	@ echo "netCDF formatted tests"
-	@ echo "========================="
-	./$(PROGRAM) > cdfout.new
-	@cmd="$(DIFF) $(DIFF_FLAGS) cdfout.new testout.sav"; \
-	    echo $$cmd; \
-	    if $$cmd; then \
-		echo "*** netCDF passes formatted test ***"; \
-	    else \
-		echo "*** netCDF fails formatted test ***"; \
-		echo "The above differences are OK if small"; \
-		exit 0; \
-	    fi
-#	@cmd="cmp test.cdf test_cdf.sav"; \
-#	    echo $$cmd; \
-#	    if $$cmd; then \
-#		echo "*** netCDF passes binary test ***"; \
-#	    else \
-#		echo "*** netCDF fails binary test ***"; \
-#		exit 1; \
-#	    fi
+all: all-am
 
-install::	installed_library installed_headers
-
-install-includes::	installed_headers
-
-$(PROGRAM):	$(PROGRAM).o library
-
-nhdftest::         FORCE
-	@if test -z "$(FMPOOL_FLAGS)"; then \
-	  $(MAKE) $(MFLAGS) $(LOCAL_MACROS) hdftest; \
-	else		 \
-	  $(MAKE) $(MFLAGS) $(LOCAL_MACROS) FMPOOL_FLAGS="$(FMPOOL_FLAGS) -I$(FMPOOL_INC)" hdftest; \
-	fi
-
-hdftest:	hdftest.o library        
-	$(CC) $(CFLAGS) $(CFLAGS_NETCDF) hdftest.o $(LIBS) -o $@
-	@ echo "============================"
-	@ echo "HDF-SD C interfaces tests"
-	@ echo "============================"
-	./hdftest > hdfout.new
-	@cmd="$(DIFF) $(DIFF_FLAGS) hdfout.new hdfout.sav"; \
-	    echo $$cmd; \
-	    if $$cmd; then \
-		echo "*** HDF passes formatted test ***"; \
-	    else \
-		echo "*** HDF fails formatted test ***"; \
-		echo "The above differences are OK if small"; \
-		exit 0; \
-	    fi
-debug:
-#	rm -f $(COBJS)
-	$(MAKE) $(MFLAGS) "CFLAGS=-g $(CFLAGS_NETCDF) " "LIBRARY=$(LIBRARY)_g" library
-
-profiled:
-#	rm -f $(COBJS)
-	$(MAKE) $(MFLAGS) "CFLAGS=-pg $(CFLAGS_NETCDF) " "LIBRARY=$(LIBRARY)_pg" library
-
-cdftest.oc:	$(CSRCS) cdftest.c
-	#load -C $(CPPFLAGS) $(CPPFLAGS_NETCDF) -I/usr/local/lang/SC1.0/ansi_include \
-	    $(CSRCS) cdftest.c /usr/local/lang/SC1.0/ansi_lib/libansi.a 
-
-# This is the master.mk.in makefile.  It contains general rules.
-#
-
 .SUFFIXES:
-.SUFFIXES:	.so .o .i .c .fc .f .F .l .y
+.SUFFIXES: .c .f .o .obj
+$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ Makefile.am  $(top_srcdir)/configure.ac $(ACLOCAL_M4)
+	cd $(top_srcdir) && \
+	  $(AUTOMAKE) --foreign  mfhdf/libsrc/Makefile
+Makefile: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.in  $(top_builddir)/config.status
+	cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)
+libLIBRARIES_INSTALL = $(INSTALL_DATA)
+install-libLIBRARIES: $(lib_LIBRARIES)
+	@$(NORMAL_INSTALL)
+	$(mkinstalldirs) $(DESTDIR)$(libdir)
+	@list='$(lib_LIBRARIES)'; for p in $$list; do \
+	  if test -f $$p; then \
+	    f="`echo $$p | sed -e 's|^.*/||'`"; \
+	    echo " $(libLIBRARIES_INSTALL) $$p $(DESTDIR)$(libdir)/$$f"; \
+	    $(libLIBRARIES_INSTALL) $$p $(DESTDIR)$(libdir)/$$f; \
+	  else :; fi; \
+	done
+	@$(POST_INSTALL)
+	@list='$(lib_LIBRARIES)'; for p in $$list; do \
+	  if test -f $$p; then \
+	    p="`echo $$p | sed -e 's|^.*/||'`"; \
+	    echo " $(RANLIB) $(DESTDIR)$(libdir)/$$p"; \
+	    $(RANLIB) $(DESTDIR)$(libdir)/$$p; \
+	  else :; fi; \
+	done
 
-# ###########################################################################
-# General Macros: (moved to make file fragment )
-# ###########################################################################
-#CPP		= @CPP@
-#NCDUMP		= @NCDUMP@
-#NCGEN		= @NCGEN@
-#NEQN		= @NEQN@
-#OS		= @OS@
-#TBL		= @TBL@
-#WHICH		= @WHICH@
+uninstall-libLIBRARIES:
+	@$(NORMAL_UNINSTALL)
+	@list='$(lib_LIBRARIES)'; for p in $$list; do \
+	  p="`echo $$p | sed -e 's|^.*/||'`"; \
+	  echo " rm -f $(DESTDIR)$(libdir)/$$p"; \
+	  rm -f $(DESTDIR)$(libdir)/$$p; \
+	done
 
-# ###########################################################################
-# Recursive Macros (command-line changes to others aren't supported):
-# ###########################################################################
-SUBDIR_MACROS = CC="$(CC)" \
-	CFLAGS="$(CFLAGS)" \
-	CPP="$(CPP)" \
-	exec_prefix="$(exec_prefix)" \
-	FC="$(FC)" \
-	prefix="$(prefix)"
+clean-libLIBRARIES:
+	-test -z "$(lib_LIBRARIES)" || rm -f $(lib_LIBRARIES)
+libmfhdf.a: $(libmfhdf_a_OBJECTS) $(libmfhdf_a_DEPENDENCIES) 
+	-rm -f libmfhdf.a
+	$(libmfhdf_a_AR) libmfhdf.a $(libmfhdf_a_OBJECTS) $(libmfhdf_a_LIBADD)
+	$(RANLIB) libmfhdf.a
 
-LOCAL_MACROS  = CC="$(CC)" \
-	CFLAGS="$(CFLAGS)" \
-	CPP="$(CPP)" \
-	CPPFLAGS="$(CPPFLAGS)" \
-	exec_prefix="$(exec_prefix)" \
-	FC="$(FC)" \
-	prefix="$(prefix)"
+clean-checkPROGRAMS:
+	-test -z "$(check_PROGRAMS)" || rm -f $(check_PROGRAMS)
+cdftest$(EXEEXT): $(cdftest_OBJECTS) $(cdftest_DEPENDENCIES) 
+	@rm -f cdftest$(EXEEXT)
+	$(LINK) $(cdftest_LDFLAGS) $(cdftest_OBJECTS) $(cdftest_LDADD) $(LIBS)
+hdftest$(EXEEXT): $(hdftest_OBJECTS) $(hdftest_DEPENDENCIES) 
+	@rm -f hdftest$(EXEEXT)
+	$(LINK) $(hdftest_LDFLAGS) $(hdftest_OBJECTS) $(hdftest_LDADD) $(LIBS)
 
-# ###########################################################################
-# Recursive make(1)s in Subdirectories:
-# ###########################################################################
+mostlyclean-compile:
+	-rm -f *.$(OBJEXT) core *.core
 
-subdir_dummy_target $(SUBDIR_TARGETS):
-	@echo ""
-	@dir=`echo $@ | sed 's,/.*,,'`; \
-	    target=`echo $@ | sed "s,$$dir/,,"`; \
-	    cd $$dir && \
-	    echo "making \`$$target' in directory `pwd`" && \
-	    echo "" && \
-	    $(MAKE) $(MFLAGS) $(SUBDIR_MACROS) \
-		$$target || exit 1
-	@echo ""
-	@echo "returning to directory `pwd`"
-	@echo ""
+distclean-compile:
+	-rm -f *.tab.c
 
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/array.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/attr.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/cdf.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/cdftest.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/dim.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/error.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/file.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/globdef.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/hdfsds.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/hdftest.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/iarray.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/jackets.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/mfsd.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/mfsdf.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/nssdc.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/putget.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/putgetg.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/sharray.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/string.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/temptySDSs.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/tidtypes.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/trank0.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/tsd.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/tszip.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/var.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/xdr.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/xdrarray.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/xdrfloat.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/xdrposix.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/xdrstdio.Po at am__quote@
 
-# ###########################################################################
-# Compilation:
-# ###########################################################################
-#FORTC		= @FORTC@
-
-# Compile FORTRAN code.
-#
-.f.o:
-	$(FC) -c $(FFLAGS) $<
-.F.o:
-	ln -s $< $$$$.c \
-	&& $(CPP) -DUD_FORTRAN_SOURCE $(CPPFLAGS) $(CPPFLAGS_NETCDF) $$$$.c \
-	    | sed '/^# *[0-9]/d' > $*.f \
-	|| (rm -f $*.f $$$$.c; exit 1) \
-	&& rm $$$$.c
-	$(FC) -c $(FFLAGS) $*.f
-.F.f:
-	ln -s $< $$$$.c \
-	&& $(CPP) -DUD_FORTRAN_SOURCE $(CPPFLAGS) $(CPPFLAGS_NETCDF) $$$$.c \
-	    | sed '/^# *[0-9]/d' > $@ \
-	|| (rm -f $@ $$$$.c; exit 1) \
-	&& rm $$$$.c
-
-# Generate FORTRAN-callable C code.
-#
-.fc.o:
-	$(FORTC) -O $(OS) $< > $*.c \
-	    || ( rm -f $*.c; exit 1)
-	$(CC) -c $(CFLAGS) $(CFLAGS_NETCDF) $(CPPFLAGS) $(CPPFLAGS_NETCDF) $*.c
-.fc.c:
-	$(FORTC) -O $(OS) $< > $@ \
-	    || (rm -f $*.c; exit 1)
-
-# Compile C code.
-#
 .c.o:
-	$(CC) -c $(CPPFLAGS) $(CPPFLAGS_NETCDF) $(CFLAGS) $(CFLAGS_NETCDF) $<
+ at am__fastdepCC_TRUE@	if $(COMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" \
+ at am__fastdepCC_TRUE@	  -c -o $@ `test -f '$<' || echo '$(srcdir)/'`$<; \
+ at am__fastdepCC_TRUE@	then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; \
+ at am__fastdepCC_TRUE@	else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; \
+ at am__fastdepCC_TRUE@	fi
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	depfile='$(DEPDIR)/$*.Po' tmpdepfile='$(DEPDIR)/$*.TPo' @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	$(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCC_FALSE@	$(COMPILE) -c `test -f '$<' || echo '$(srcdir)/'`$<
 
-# Compile lex(1) code.  This rule is here to ensure the use of CPPFLAGS.
-# 
-.l.o:
-	rm -f $*.c
-	$(LEX) -t $< > $*.c
-	$(CC) -c $(CPPFLAGS) $(CPPFLAGS_NETCDF) $(CFLAGS) $(CFLAGS_NETCDF) $*.c
-	rm $*.c
+.c.obj:
+ at am__fastdepCC_TRUE@	if $(COMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" \
+ at am__fastdepCC_TRUE@	  -c -o $@ `if test -f '$<'; then $(CYGPATH_W) '$<'; else $(CYGPATH_W) '$(srcdir)/$<'; fi`; \
+ at am__fastdepCC_TRUE@	then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; \
+ at am__fastdepCC_TRUE@	else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; \
+ at am__fastdepCC_TRUE@	fi
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	depfile='$(DEPDIR)/$*.Po' tmpdepfile='$(DEPDIR)/$*.TPo' @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	$(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCC_FALSE@	$(COMPILE) -c `if test -f '$<'; then $(CYGPATH_W) '$<'; else $(CYGPATH_W) '$(srcdir)/$<'; fi`
 
-# C preprocess.  
-#   NB: 
-#	1. The output `file' is not created but appears on standard output;
-#	2. Line numbering information is kept.
-#
-.c.i:
-	$(CPP) $(CPPFLAGS) $(CPPFLAGS_NETCDF) $<
+xdr.o: ../xdr/xdr.c
+ at am__fastdepCC_TRUE@	if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT xdr.o -MD -MP -MF "$(DEPDIR)/xdr.Tpo" \
+ at am__fastdepCC_TRUE@	  -c -o xdr.o `test -f '../xdr/xdr.c' || echo '$(srcdir)/'`../xdr/xdr.c; \
+ at am__fastdepCC_TRUE@	then mv -f "$(DEPDIR)/xdr.Tpo" "$(DEPDIR)/xdr.Po"; \
+ at am__fastdepCC_TRUE@	else rm -f "$(DEPDIR)/xdr.Tpo"; exit 1; \
+ at am__fastdepCC_TRUE@	fi
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='../xdr/xdr.c' object='xdr.o' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	depfile='$(DEPDIR)/xdr.Po' tmpdepfile='$(DEPDIR)/xdr.TPo' @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	$(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCC_FALSE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o xdr.o `test -f '../xdr/xdr.c' || echo '$(srcdir)/'`../xdr/xdr.c
 
+xdr.obj: ../xdr/xdr.c
+ at am__fastdepCC_TRUE@	if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT xdr.obj -MD -MP -MF "$(DEPDIR)/xdr.Tpo" \
+ at am__fastdepCC_TRUE@	  -c -o xdr.obj `if test -f '../xdr/xdr.c'; then $(CYGPATH_W) '../xdr/xdr.c'; else $(CYGPATH_W) '$(srcdir)/../xdr/xdr.c'; fi`; \
+ at am__fastdepCC_TRUE@	then mv -f "$(DEPDIR)/xdr.Tpo" "$(DEPDIR)/xdr.Po"; \
+ at am__fastdepCC_TRUE@	else rm -f "$(DEPDIR)/xdr.Tpo"; exit 1; \
+ at am__fastdepCC_TRUE@	fi
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='../xdr/xdr.c' object='xdr.obj' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	depfile='$(DEPDIR)/xdr.Po' tmpdepfile='$(DEPDIR)/xdr.TPo' @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	$(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCC_FALSE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o xdr.obj `if test -f '../xdr/xdr.c'; then $(CYGPATH_W) '../xdr/xdr.c'; else $(CYGPATH_W) '$(srcdir)/../xdr/xdr.c'; fi`
 
-# ###########################################################################
-# Libraries:
-# ###########################################################################
-# RANLIB		= @RANLIB@
-LIBDIR		= $(prefix)/lib
-LIB_A		= lib$(LIBRARY).a
+xdrfloat.o: ../xdr/xdrfloat.c
+ at am__fastdepCC_TRUE@	if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT xdrfloat.o -MD -MP -MF "$(DEPDIR)/xdrfloat.Tpo" \
+ at am__fastdepCC_TRUE@	  -c -o xdrfloat.o `test -f '../xdr/xdrfloat.c' || echo '$(srcdir)/'`../xdr/xdrfloat.c; \
+ at am__fastdepCC_TRUE@	then mv -f "$(DEPDIR)/xdrfloat.Tpo" "$(DEPDIR)/xdrfloat.Po"; \
+ at am__fastdepCC_TRUE@	else rm -f "$(DEPDIR)/xdrfloat.Tpo"; exit 1; \
+ at am__fastdepCC_TRUE@	fi
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='../xdr/xdrfloat.c' object='xdrfloat.o' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	depfile='$(DEPDIR)/xdrfloat.Po' tmpdepfile='$(DEPDIR)/xdrfloat.TPo' @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	$(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCC_FALSE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o xdrfloat.o `test -f '../xdr/xdrfloat.c' || echo '$(srcdir)/'`../xdr/xdrfloat.c
 
-library::		$(LIB_A)
+xdrfloat.obj: ../xdr/xdrfloat.c
+ at am__fastdepCC_TRUE@	if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT xdrfloat.obj -MD -MP -MF "$(DEPDIR)/xdrfloat.Tpo" \
+ at am__fastdepCC_TRUE@	  -c -o xdrfloat.obj `if test -f '../xdr/xdrfloat.c'; then $(CYGPATH_W) '../xdr/xdrfloat.c'; else $(CYGPATH_W) '$(srcdir)/../xdr/xdrfloat.c'; fi`; \
+ at am__fastdepCC_TRUE@	then mv -f "$(DEPDIR)/xdrfloat.Tpo" "$(DEPDIR)/xdrfloat.Po"; \
+ at am__fastdepCC_TRUE@	else rm -f "$(DEPDIR)/xdrfloat.Tpo"; exit 1; \
+ at am__fastdepCC_TRUE@	fi
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='../xdr/xdrfloat.c' object='xdrfloat.obj' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	depfile='$(DEPDIR)/xdrfloat.Po' tmpdepfile='$(DEPDIR)/xdrfloat.TPo' @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	$(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCC_FALSE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o xdrfloat.obj `if test -f '../xdr/xdrfloat.c'; then $(CYGPATH_W) '../xdr/xdrfloat.c'; else $(CYGPATH_W) '$(srcdir)/../xdr/xdrfloat.c'; fi`
 
-# The following rule is forced because the library can be created by a
-# makefile in another directory prior to the execution of the following rule.
-#
-$(LIB_A):		$(LIBOBJS) FORCE
-	$(AR) rcuv $@ $(LIBOBJS)
-	$(RANLIB) $@
-#	$(LD) -b -o libmfhdf.sl $(LIBOBJS)
+xdrstdio.o: ../xdr/xdrstdio.c
+ at am__fastdepCC_TRUE@	if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT xdrstdio.o -MD -MP -MF "$(DEPDIR)/xdrstdio.Tpo" \
+ at am__fastdepCC_TRUE@	  -c -o xdrstdio.o `test -f '../xdr/xdrstdio.c' || echo '$(srcdir)/'`../xdr/xdrstdio.c; \
+ at am__fastdepCC_TRUE@	then mv -f "$(DEPDIR)/xdrstdio.Tpo" "$(DEPDIR)/xdrstdio.Po"; \
+ at am__fastdepCC_TRUE@	else rm -f "$(DEPDIR)/xdrstdio.Tpo"; exit 1; \
+ at am__fastdepCC_TRUE@	fi
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='../xdr/xdrstdio.c' object='xdrstdio.o' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	depfile='$(DEPDIR)/xdrstdio.Po' tmpdepfile='$(DEPDIR)/xdrstdio.TPo' @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	$(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCC_FALSE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o xdrstdio.o `test -f '../xdr/xdrstdio.c' || echo '$(srcdir)/'`../xdr/xdrstdio.c
 
-# The following rule is for those makefiles needing to install object
-# modules in a library in another directory.  They need only define 
-# REMOTE_LIBRARY and LIBOBJS.  The rule is forced for the same reason as the
-# $(LIB_A) rule.
-#
-lib_dummy $(REMOTE_LIBRARY):	$(LIBOBJS) FORCE
-	$(AR) rcuv $@ $(LIBOBJS)
-	$(RANLIB) $@
+xdrstdio.obj: ../xdr/xdrstdio.c
+ at am__fastdepCC_TRUE@	if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT xdrstdio.obj -MD -MP -MF "$(DEPDIR)/xdrstdio.Tpo" \
+ at am__fastdepCC_TRUE@	  -c -o xdrstdio.obj `if test -f '../xdr/xdrstdio.c'; then $(CYGPATH_W) '../xdr/xdrstdio.c'; else $(CYGPATH_W) '$(srcdir)/../xdr/xdrstdio.c'; fi`; \
+ at am__fastdepCC_TRUE@	then mv -f "$(DEPDIR)/xdrstdio.Tpo" "$(DEPDIR)/xdrstdio.Po"; \
+ at am__fastdepCC_TRUE@	else rm -f "$(DEPDIR)/xdrstdio.Tpo"; exit 1; \
+ at am__fastdepCC_TRUE@	fi
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='../xdr/xdrstdio.c' object='xdrstdio.obj' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	depfile='$(DEPDIR)/xdrstdio.Po' tmpdepfile='$(DEPDIR)/xdrstdio.TPo' @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	$(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCC_FALSE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o xdrstdio.obj `if test -f '../xdr/xdrstdio.c'; then $(CYGPATH_W) '../xdr/xdrstdio.c'; else $(CYGPATH_W) '$(srcdir)/../xdr/xdrstdio.c'; fi`
 
-installed_libfiles:	FORCE
-	@if [ -n "$(LIBFILES)" ]; then \
-	    libfiles="$(LIBFILES)"; \
-	    for libfile in $$libfiles; do \
-		$(MAKE) $(MFLAGS) $(LOCAL_MACROS) \
-		    LIBDIR=$(LIBDIR) LIBFILE=$$libfile \
-		    installed_libfile || exit 1; \
-	    done; \
-	else \
-	    :; \
-	fi
+xdrarray.o: ../xdr/xdrarray.c
+ at am__fastdepCC_TRUE@	if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT xdrarray.o -MD -MP -MF "$(DEPDIR)/xdrarray.Tpo" \
+ at am__fastdepCC_TRUE@	  -c -o xdrarray.o `test -f '../xdr/xdrarray.c' || echo '$(srcdir)/'`../xdr/xdrarray.c; \
+ at am__fastdepCC_TRUE@	then mv -f "$(DEPDIR)/xdrarray.Tpo" "$(DEPDIR)/xdrarray.Po"; \
+ at am__fastdepCC_TRUE@	else rm -f "$(DEPDIR)/xdrarray.Tpo"; exit 1; \
+ at am__fastdepCC_TRUE@	fi
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='../xdr/xdrarray.c' object='xdrarray.o' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	depfile='$(DEPDIR)/xdrarray.Po' tmpdepfile='$(DEPDIR)/xdrarray.TPo' @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	$(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCC_FALSE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o xdrarray.o `test -f '../xdr/xdrarray.c' || echo '$(srcdir)/'`../xdr/xdrarray.c
 
-installed_library::	FORCE
-	@$(MAKE) $(MFLAGS) $(LOCAL_MACROS) \
-	    LIBDIR=$(LIBDIR) LIBFILE=$(LIB_A) \
-	    installed_libfile
+xdrarray.obj: ../xdr/xdrarray.c
+ at am__fastdepCC_TRUE@	if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT xdrarray.obj -MD -MP -MF "$(DEPDIR)/xdrarray.Tpo" \
+ at am__fastdepCC_TRUE@	  -c -o xdrarray.obj `if test -f '../xdr/xdrarray.c'; then $(CYGPATH_W) '../xdr/xdrarray.c'; else $(CYGPATH_W) '$(srcdir)/../xdr/xdrarray.c'; fi`; \
+ at am__fastdepCC_TRUE@	then mv -f "$(DEPDIR)/xdrarray.Tpo" "$(DEPDIR)/xdrarray.Po"; \
+ at am__fastdepCC_TRUE@	else rm -f "$(DEPDIR)/xdrarray.Tpo"; exit 1; \
+ at am__fastdepCC_TRUE@	fi
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='../xdr/xdrarray.c' object='xdrarray.obj' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	depfile='$(DEPDIR)/xdrarray.Po' tmpdepfile='$(DEPDIR)/xdrarray.TPo' @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	$(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCC_FALSE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o xdrarray.obj `if test -f '../xdr/xdrarray.c'; then $(CYGPATH_W) '../xdr/xdrarray.c'; else $(CYGPATH_W) '$(srcdir)/../xdr/xdrarray.c'; fi`
 
-# The following target decouples the previous targets from the actual rule;
-# thus, eliminating extraneous make(1) messages.
-#
-installed_libfile:	$(LIBDIR)/$(LIBFILE)
+jackets.o: ../fortran/jackets.c
+ at am__fastdepCC_TRUE@	if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT jackets.o -MD -MP -MF "$(DEPDIR)/jackets.Tpo" \
+ at am__fastdepCC_TRUE@	  -c -o jackets.o `test -f '../fortran/jackets.c' || echo '$(srcdir)/'`../fortran/jackets.c; \
+ at am__fastdepCC_TRUE@	then mv -f "$(DEPDIR)/jackets.Tpo" "$(DEPDIR)/jackets.Po"; \
+ at am__fastdepCC_TRUE@	else rm -f "$(DEPDIR)/jackets.Tpo"; exit 1; \
+ at am__fastdepCC_TRUE@	fi
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='../fortran/jackets.c' object='jackets.o' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	depfile='$(DEPDIR)/jackets.Po' tmpdepfile='$(DEPDIR)/jackets.TPo' @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	$(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCC_FALSE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o jackets.o `test -f '../fortran/jackets.c' || echo '$(srcdir)/'`../fortran/jackets.c
 
-$(LIBDIR)/$(LIBFILE):	$(LIBDIR) $(LIBFILE)
-	$(INSTALL_DATA) $(LIBFILE) $@
+jackets.obj: ../fortran/jackets.c
+ at am__fastdepCC_TRUE@	if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT jackets.obj -MD -MP -MF "$(DEPDIR)/jackets.Tpo" \
+ at am__fastdepCC_TRUE@	  -c -o jackets.obj `if test -f '../fortran/jackets.c'; then $(CYGPATH_W) '../fortran/jackets.c'; else $(CYGPATH_W) '$(srcdir)/../fortran/jackets.c'; fi`; \
+ at am__fastdepCC_TRUE@	then mv -f "$(DEPDIR)/jackets.Tpo" "$(DEPDIR)/jackets.Po"; \
+ at am__fastdepCC_TRUE@	else rm -f "$(DEPDIR)/jackets.Tpo"; exit 1; \
+ at am__fastdepCC_TRUE@	fi
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='../fortran/jackets.c' object='jackets.obj' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	depfile='$(DEPDIR)/jackets.Po' tmpdepfile='$(DEPDIR)/jackets.TPo' @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	$(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCC_FALSE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o jackets.obj `if test -f '../fortran/jackets.c'; then $(CYGPATH_W) '../fortran/jackets.c'; else $(CYGPATH_W) '$(srcdir)/../fortran/jackets.c'; fi`
 
-dummy_libdir $(LIBDIR):
-	mkdir -p $@
-	chmod u+rwx,g+rws,o=rx $@
+mfsdf.o: ../fortran/mfsdf.c
+ at am__fastdepCC_TRUE@	if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT mfsdf.o -MD -MP -MF "$(DEPDIR)/mfsdf.Tpo" \
+ at am__fastdepCC_TRUE@	  -c -o mfsdf.o `test -f '../fortran/mfsdf.c' || echo '$(srcdir)/'`../fortran/mfsdf.c; \
+ at am__fastdepCC_TRUE@	then mv -f "$(DEPDIR)/mfsdf.Tpo" "$(DEPDIR)/mfsdf.Po"; \
+ at am__fastdepCC_TRUE@	else rm -f "$(DEPDIR)/mfsdf.Tpo"; exit 1; \
+ at am__fastdepCC_TRUE@	fi
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='../fortran/mfsdf.c' object='mfsdf.o' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	depfile='$(DEPDIR)/mfsdf.Po' tmpdepfile='$(DEPDIR)/mfsdf.TPo' @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	$(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCC_FALSE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o mfsdf.o `test -f '../fortran/mfsdf.c' || echo '$(srcdir)/'`../fortran/mfsdf.c
 
-LIB_SO		= lib$(LIBRARY).so.$(MAJOR_NO).$(MINOR_NO)
-LIB_SA		= lib$(LIBRARY).sa.$(MAJOR_NO).$(MINOR_NO)
+mfsdf.obj: ../fortran/mfsdf.c
+ at am__fastdepCC_TRUE@	if $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT mfsdf.obj -MD -MP -MF "$(DEPDIR)/mfsdf.Tpo" \
+ at am__fastdepCC_TRUE@	  -c -o mfsdf.obj `if test -f '../fortran/mfsdf.c'; then $(CYGPATH_W) '../fortran/mfsdf.c'; else $(CYGPATH_W) '$(srcdir)/../fortran/mfsdf.c'; fi`; \
+ at am__fastdepCC_TRUE@	then mv -f "$(DEPDIR)/mfsdf.Tpo" "$(DEPDIR)/mfsdf.Po"; \
+ at am__fastdepCC_TRUE@	else rm -f "$(DEPDIR)/mfsdf.Tpo"; exit 1; \
+ at am__fastdepCC_TRUE@	fi
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='../fortran/mfsdf.c' object='mfsdf.obj' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	depfile='$(DEPDIR)/mfsdf.Po' tmpdepfile='$(DEPDIR)/mfsdf.TPo' @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	$(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCC_FALSE@	$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o mfsdf.obj `if test -f '../fortran/mfsdf.c'; then $(CYGPATH_W) '../fortran/mfsdf.c'; else $(CYGPATH_W) '$(srcdir)/../fortran/mfsdf.c'; fi`
 
-#library::		FORCE
-#	@so_objs=`echo $(LIBOBJS) | sed 's/\.o/.so/g'`; \
-#	if [ -z "$$so_objs" ]; then \
-#	    :; \
-#	else \
-#	    $(MAKE) $(MFLAGS) $(LIB_SO) \
-#		SO_OBJS="$$so_objs"; \
-#	fi
-#	@if [ -z "$(SA_OBJS)" ]; then \
-#	    :; \
-#	else \
-#	    $(MAKE) $(MFLAGS) $(LIB_SA); \
-#	fi
+.f.o:
+	$(F77COMPILE) -c -o $@ `test -f '$<' || echo '$(srcdir)/'`$<
 
-$(LIB_SO):	$(SO_OBJS)
-	ld -assert pure-text $(SO_OBJS) -o $@
-$(LIB_SA):	$(SA_OBJS) FORCE
-	$(AR) rcuv $@ $(SA_OBJS)
+.f.obj:
+	$(F77COMPILE) -c -o $@ `if test -f '$<'; then $(CYGPATH_W) '$<'; else $(CYGPATH_W) '$(srcdir)/$<'; fi`
 
-.fc.so:
-	$(FORTC) -O $(OS) $< > $*.c \
-	    || (rm -f $*.c; exit 1)
-	$(CC) -c -pic $(CFLAGS) $(CFLAGS_NETCDF) $(CPPFLAGS) $(CPPFLAGS_NETCDF) $*.c -o $$$$.o \
-	    || (rm -f $$$$.o; exit 1)
-	mv $$$$.o $@
-.c.so:
-	$(CC) -c -pic $(CFLAGS) $(CFLAGS_NETCDF) $(CPPFLAGS) $(CPPFLAGS_NETCDF) $< -o $$$$.o \
-	    || (rm -f $$$$.o; exit 1)
-	mv $$$$.o $@
+mfsdff.o: ../fortran/mfsdff.f
+	$(F77) $(AM_FFLAGS) $(FFLAGS) -c -o mfsdff.o `test -f '../fortran/mfsdff.f' || echo '$(srcdir)/'`../fortran/mfsdff.f
 
-#installed_library::	$(LIBDIR)/$(LIB_SO)
-#	@if [ -z "$(SA_OBJS)" ]; then \
-#	    :; \
-#	else \
-#	    $(MAKE) $(MFLAGS) $(LIBDIR)/$(LIB_SA); \
-#	fi
+mfsdff.obj: ../fortran/mfsdff.f
+	$(F77) $(AM_FFLAGS) $(FFLAGS) -c -o mfsdff.obj `if test -f '../fortran/mfsdff.f'; then $(CYGPATH_W) '../fortran/mfsdff.f'; else $(CYGPATH_W) '$(srcdir)/../fortran/mfsdff.f'; fi`
+uninstall-info-am:
+includeHEADERS_INSTALL = $(INSTALL_HEADER)
+install-includeHEADERS: $(include_HEADERS)
+	@$(NORMAL_INSTALL)
+	$(mkinstalldirs) $(DESTDIR)$(includedir)
+	@list='$(include_HEADERS)'; for p in $$list; do \
+	  if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
+	  f="`echo $$p | sed -e 's|^.*/||'`"; \
+	  echo " $(includeHEADERS_INSTALL) $$d$$p $(DESTDIR)$(includedir)/$$f"; \
+	  $(includeHEADERS_INSTALL) $$d$$p $(DESTDIR)$(includedir)/$$f; \
+	done
 
-$(LIBDIR)/$(LIB_SO):	$(LIBDIR) $(LIB_SO)
-	$(INSTALL_DATA) $(LIB_SO) $(LIBDIR)/$(LIB_SO)
-$(LIBDIR)/$(LIB_SA):	$(LIBDIR) $(LIB_SA)
-	$(INSTALL_DATA) $(LIB_SA) $(LIBDIR)/$(LIB_SA)
+uninstall-includeHEADERS:
+	@$(NORMAL_UNINSTALL)
+	@list='$(include_HEADERS)'; for p in $$list; do \
+	  f="`echo $$p | sed -e 's|^.*/||'`"; \
+	  echo " rm -f $(DESTDIR)$(includedir)/$$f"; \
+	  rm -f $(DESTDIR)$(includedir)/$$f; \
+	done
 
+ETAGS = etags
+ETAGSFLAGS =
 
-# ###########################################################################
-# Programs:
-# ###########################################################################
-BINDIR		= $(exec_prefix)/bin
+CTAGS = ctags
+CTAGSFLAGS =
 
-programs:	$(PROGRAMS)
-program:
-	@if [ -z "$(PROGRAM)" ]; then \
-	    : true; \
-	else \
-	    if [ -z "$(LIBRARY)" ]; then \
-		: true; \
-	    else \
-		$(MAKE) $(MFLAGS) $(LOCAL_MACROS) library; \
-	    fi; \
-	    $(MAKE) $(MFLAGS) $(LOCAL_MACROS) $(PROGRAM); \
-	fi
+tags: TAGS
 
-dummy_prog $(PROGRAM):	$(OBJS)
-	@if [ -r $@.f -o -r $@.F ]; then \
-	    ld='$(FC) $(FFLAGS)'; \
-	else \
-	    ld='$(CC) $(CFLAGS) $(CFLAGS_NETCDF) '; \
-	fi; \
-	cmd="$$ld $(OBJS) $(LIBS) -o $@"; \
-	echo $$cmd; \
-	$$cmd \
-	    || (rm -f $@; exit 1)
+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; } \
+	       END { for (i in files) print i; }'`; \
+	mkid -fID $$unique
 
-installed_programs:	FORCE
-	@$(MAKE) $(MFLAGS) $(LOCAL_MACROS) installed_binfiles \
-	    BINDIR=$(BINDIR) BINFILES="$(PROGRAMS)"
+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; } \
+	       END { for (i in files) print i; }'`; \
+	test -z "$(ETAGS_ARGS)$$tags$$unique" \
+	  || $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
+	     $$tags $$unique
 
-installed_binfiles:	FORCE
-	@if [ -n "$(BINFILES)" ]; then \
-	    binfiles="$(BINFILES)"; \
-	    for binfile in $$binfiles; do \
-		$(MAKE) $(MFLAGS) $(LOCAL_MACROS) \
-		    BINDIR=$(BINDIR) BINFILE=$$binfile \
-		    installed_binfile || exit 1; \
-	    done; \
-	else \
-	    :; \
-	fi
+ctags: CTAGS
+CTAGS:  $(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; } \
+	       END { for (i in files) print i; }'`; \
+	test -z "$(CTAGS_ARGS)$$tags$$unique" \
+	  || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
+	     $$tags $$unique
 
-installed_program:	FORCE
-	@$(MAKE) $(MFLAGS) $(LOCAL_MACROS) BINDIR=$(BINDIR) BINFILE=$(PROGRAM) \
-	    installed_binfile
+GTAGS:
+	here=`$(am__cd) $(top_builddir) && pwd` \
+	  && cd $(top_srcdir) \
+	  && gtags -i $(GTAGS_ARGS) $$here
 
-# The following target decouples the previous targets from the actual rule;
-# thus, eliminating extraneous make(1) messages.
-#
-installed_binfile:	$(BINDIR)/$(BINFILE)
+distclean-tags:
+	-rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
+DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
 
-$(BINDIR)/$(BINFILE):	$(BINDIR) $(BINFILE)
-	$(INSTALL_PROGRAM) $(BINFILE) $@
+top_distdir = ../..
+distdir = $(top_distdir)/$(PACKAGE)-$(VERSION)
 
-dummy_bindir $(BINDIR):
-	mkdir -p $@
-	chmod u+rwx,g+rws,o=rx $@
+distdir: $(DISTFILES)
+	@srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \
+	topsrcdirstrip=`echo "$(top_srcdir)" | sed 's|.|.|g'`; \
+	list='$(DISTFILES)'; for file in $$list; do \
+	  case $$file in \
+	    $(srcdir)/*) file=`echo "$$file" | sed "s|^$$srcdirstrip/||"`;; \
+	    $(top_srcdir)/*) file=`echo "$$file" | sed "s|^$$topsrcdirstrip/|$(top_builddir)/|"`;; \
+	  esac; \
+	  if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
+	  dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \
+	  if test "$$dir" != "$$file" && test "$$dir" != "."; then \
+	    dir="/$$dir"; \
+	    $(mkinstalldirs) "$(distdir)$$dir"; \
+	  else \
+	    dir=''; \
+	  fi; \
+	  if test -d $$d/$$file; then \
+	    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
+	$(MAKE) $(AM_MAKEFLAGS) $(check_PROGRAMS)
+check: check-am
+all-am: Makefile $(LIBRARIES) $(HEADERS)
 
+installdirs:
+	$(mkinstalldirs) $(DESTDIR)$(libdir) $(DESTDIR)$(includedir)
+install: install-am
+install-exec: install-exec-am
+install-data: install-data-am
+uninstall: uninstall-am
 
-# ###########################################################################
-# Header files:
-# ###########################################################################
-installed_headers:	FORCE
-	@if [ -n "$(HEADERS)" ]; then \
-	    headers="$(HEADERS)"; \
-	    for header in $$headers; do \
-		$(MAKE) $(MFLAGS) $(LOCAL_MACROS) INCDIR=$(INCDIR) HEADER=$$header \
-		    installed_header || exit 1; \
-	    done; \
-	else \
-	    :; \
-	fi
+install-am: all-am
+	@$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
 
-# The following target decouples the previous targets from the actual rule;
-# thus, eliminating extraneous make(1) messages.
-#
-installed_header:	$(INCDIR)/$(HEADER)
+installcheck: installcheck-am
+install-strip:
+	$(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
+	  INSTALL_STRIP_FLAG=-s \
+	  `test -z '$(STRIP)' || \
+	    echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
+mostlyclean-generic:
 
-$(INCDIR)/$(HEADER):	$(INCDIR) $(HEADER)
-	$(INSTALL_DATA) $(HEADER) $@
+clean-generic:
 
-dummy_incdir $(INCDIR):
-	mkdir -p $@
-	chmod u+rwx,g+rws,o=rx $@
+distclean-generic:
+	-rm -f $(CONFIG_CLEAN_FILES)
+	-test -z "$(DISTCLEANFILES)" || rm -f $(DISTCLEANFILES)
 
+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
 
-# ###########################################################################
-# `etc/' files:
-# ###########################################################################
-ETCDIR	= $(prefix)/etc
+clean-am: clean-checkPROGRAMS clean-generic clean-libLIBRARIES \
+	mostlyclean-am
 
-installed_etcfiles:
-	@if [ -n "$(ETCFILES)" ]; then \
-	    etcfiles="$(ETCFILES)"; \
-	    for etcfile in $$etcfiles; do \
-		$(MAKE) $(MFLAGS) $(LOCAL_MACROS) ETCDIR=$(ETCDIR) ETCFILE=$$etcfile \
-		    installed_etcfile || exit 1; \
-	    done; \
-	else \
-	    :; \
-	fi
+distclean: distclean-am
+	-rm -rf ./$(DEPDIR)
+	-rm -f Makefile
 
-# The following target decouples the previous targets from the actual rule;
-# thus, eliminating extraneous make(1) messages.
-#
-installed_etcfile:	$(ETCDIR)/$(ETCFILE)
+distclean-am: clean-am distclean-compile distclean-generic \
+	distclean-tags
 
-$(ETCDIR)/$(ETCFILE):	$(ETCDIR) $(ETCFILE)
-	-mkdir -p $(ETCDIR)
-	-chmod u+rwx,g+rws,o=rx $(ETCDIR)
-	$(INSTALL_DATA) $(ETCFILE) $@
+dvi: dvi-am
 
-# ###########################################################################
-# Manual Pages:
-# ###########################################################################
-MANDIR	= $(prefix)/man
+dvi-am:
 
-installed_manuals:	FORCE
-	@if [ -n "$(MANUALS)" ]; then \
-	    manuals="$(MANUALS)"; \
-	    for manual in $$manuals; do \
-		mandir=$(MANDIR)/man`echo $$manual | sed 's/.*\.\(.\).*/\1/'`; \
-		$(MAKE) $(MFLAGS) $(LOCAL_MACROS) MANDIR=$$mandir MANUAL=$$manual \
-		    installed_manual || exit 1; \
-	    done; \
-	else \
-	    :; \
-	fi
+info: info-am
 
-# The following target decouples the previous targets from the actual rule;
-# thus, eliminating extraneous make(1) messages.
-#
-installed_manual:	$(MANDIR)/$(MANUAL)
+info-am:
 
-# The first sed(1) editing command in the following replaces the expanded
-# RCS keyword `$Date ...' in the `.TH' macro line with something more 
-# appropriate to a manual page.
-#
-$(MANDIR)/$(MANUAL):	$(MANDIR) $(MANUAL)
-	sed \
-	 -e '/^\.TH/s/$$D\ate: \([0-9]*\)\/\([0-9]*\)\/\([0-9]*\).*\$$/\1-\2-\3/'\
-	 $(MANUAL) | $(TBL) | $(NEQN) > $@
+install-data-am: install-includeHEADERS
 
-dummy_mandir $(MANDIR):
-	mkdir -p $@
-	chmod u+rwx,g+rws,o=rx $@
+install-exec-am: install-libLIBRARIES
 
-# ###########################################################################
-# TeX-Info Pages:
-# ###########################################################################
-INFODIR       = $(prefix)/info
+install-info: install-info-am
 
-installed_infos:      FORCE
-	if [ -z "$(MAKEINFO)" ]; then \
-		echo 1>&2 "Can't install info(1) pages because no makeinfo(1)"; \
-	else \
-	  if [ -n "$(INFOS)" ]; then \
-	      infos="$(INFOS)"; \
-	      for info in $$infos; do \
-		$(MAKE) $(MFLAGS) $(LOCAL_MACROS) INFODIR=$(INFODIR) INFO=$$info \
-		installed_info || exit 1; \
-	      done; \
-	   else \
-	      :; \
-	   fi; \
-	fi;
-# The following target decouples the previous targets from the actual rule;
-# thus, eliminating extraneous make(1) messages.
-#
-installed_info:       $(INFODIR)/$(INFO)
+install-man:
 
-$(INFODIR)/$(INFO):   $(INFODIR) $(INFO)
-	-mkdir -p $(INFODIR)
-	-chmod u+rwx,g+rws,o=rx $(INFODIR)
-	$(INSTALL_DATA) $(INFO) $@
+installcheck-am:
 
-# Rules for generating info pages:
-#
-.SUFFIXES:    .info .texi .texinfo .txn
-.texi.info:
-	@if [ -z "$(MAKEINFO)" ]; then \
-	  echo 1>&2 "Can't create $@ because no makeinfo(1)"; \
-	else \
-	  $(MAKEINFO) $< --no-split --output=$@; \
-	fi
-.texinfo.info:
-	@if [ -z "$(MAKEINFO)" ]; then \
-	  echo 1>&2 "Can't create $@ because no makeinfo(1)"; \
-	else \
-	  $(MAKEINFO) $< --no-split --output=$@; \
-	fi
-.txn.info:
-	@if [ -z "$(MAKEINFO)" ]; then \
-	  echo 1>&2 "Can't create $@ because no makeinfo(1)"; \
-	else \
-	  $(MAKEINFO) $< --no-split --output=$@; \
-	fi
+maintainer-clean: maintainer-clean-am
+	-rm -rf ./$(DEPDIR)
+	-rm -f Makefile
 
-# Ensure that info page depends on canonical TeX-Info macros.
-#
-dummy_info $(INFO):   texinfo.tex
+maintainer-clean-am: distclean-am maintainer-clean-generic
 
-# ###########################################################################
-# Cleanup:
-# ###########################################################################
-clean::
-	rm -f $(GARBAGE) $(PROGRAM) a.out core *.o *.a *.so.* *.sa.* *.so \
-	    *.log
+mostlyclean: mostlyclean-am
 
-realclean::	distclean
-distclean::
-	rm -f $(GARBAGE) $(PROGRAM) a.out core *.o *.a *.so.* *.sa.* *.so \
-	    *.log Makefile config.status cc_id tags netcdf.h
+mostlyclean-am: mostlyclean-compile mostlyclean-generic
 
+pdf: pdf-am
 
-# ###########################################################################
-# Configuration:
-# ###########################################################################
+pdf-am:
 
-# The following target is touched because config.status won't update it if
-# it hasn't changed.
-#
-# The following is commented-out because the HPUX make(1) goes into a loop.
-#
-#Makefile:	config.status
-#	./config.status
-#	touch $@
+ps: ps-am
 
-config.status:	cc_id configure
-	./configure --no-create
+ps-am:
 
-cc_id:		FORCE
-	if test -r $@ && test "`cat $@`" = "$(CC)"; then \
-	    :; \
-	else \
-	    echo "$(CC)" > $@; \
-	fi
+uninstall-am: uninstall-includeHEADERS uninstall-info-am \
+	uninstall-libLIBRARIES
 
-configure:		configure.in
-	autoconf
+.PHONY: CTAGS GTAGS all all-am check check-am clean clean-checkPROGRAMS \
+	clean-generic clean-libLIBRARIES ctags distclean \
+	distclean-compile distclean-generic distclean-tags distdir dvi \
+	dvi-am info info-am install install-am install-data \
+	install-data-am install-exec install-exec-am \
+	install-includeHEADERS install-info install-info-am \
+	install-libLIBRARIES install-man 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-includeHEADERS uninstall-info-am \
+	uninstall-libLIBRARIES
 
 
-# ###########################################################################
-# Dependency maintenance:
-# ###########################################################################
-.PRECIOUS:	depend
-#
-# Note: The following rule will only work if the C compiler behaves correctly
-# when given the `-M' option.  AIX's cc(1) and SunOS's acc(1) behave
-# incorrectly.  --Steve Emmerson 1992-09-24
-#
-# Furthermore, we do not attempt to maintain dependencies on installed
-# header files (e.g. those in $(INCDIR)) for two reasons: 1) the dependency
-# list generated at Unidata mightn't correspond to the situation at a client
-# site; and 2) clients using broken compilers (c.f. previous note) can't
-# regenerate the dependency list.
-#
-disabled_depend:		FORCE
-	-incdir=`echo $(INCDIR) | sed s',/,\\\/,g'`; \
-	cc -M $(CPPFLAGS) $(CPPFLAGS_NETCDF) *.c 2> /dev/null | \
-	    awk '{ \
-		if ($$0 ~ /:/) { \
-		    target	= $$1; \
-		    if (target ~ /:/) { \
-			target	= substr(target,1,length(target)-1); \
-			start	= 2; \
-		    } else { \
-			start	= 3; \
-		    } \
-		} else { \
-		    start	= 1; \
-		} \
-		for (i = start; i <= NF; ++i) { \
-		    if ($$i !~ /^\\/ && \
-			$$i !~ /port\// && \
-			$$i !~ /^\//) \
-			print target ": " $$i \
-		} \
-	    }' > $@
-	tag='### DO NOT DELETE THIS LINE.  make depend DEPENDS ON IT ###'; \
-	    sed -e "/^$$tag$$/r depend" \
-		-e "/^$$tag$$/q" Makefile > Makefile.new
-	mv Makefile.new Makefile
-
-
-# ###########################################################################
-# Distributions:
-# ###########################################################################
-#FTPDIR		= @FTPDIR@
-#VERSION		= @VERSION@
-
-ftp:		$(FTPDIR)/$(PACKAGE)-$(VERSION).tar.Z
-	test ! -h $(FTPDIR)/$(PACKAGE).tar.Z && exit 0; \
-	cd $(FTPDIR) || exit 1; \
-	rm $(PACKAGE).tar.Z || exit 1; \
-	ln -s $(PACKAGE)-$(VERSION).tar.Z $(PACKAGE).tar.Z;
-
-$(FTPDIR)/$(PACKAGE)-$(VERSION).tar.Z:	$(PACKAGE)-$(VERSION).tar.Z
-	cp $(PACKAGE)-$(VERSION).tar.Z $@ 
-	chmod u+rw,g+rw,o=r $@
-
-tar.Z:		$(PACKAGE)-$(VERSION).tar.Z
-
-$(PACKAGE)-$(VERSION).tar.Z:	MANIFEST
-	dir=`basename \`pwd\`` \
-	&& id=$(PACKAGE)-$(VERSION) \
-	&& cd .. \
-	&& ln -s $$dir $$id \
-	&& tar -chof - `sed "s|^|$$id/|" $$id/MANIFEST` \
-	    | compress > $$id/$@ \
-	&& rm $$id
-
-MANIFEST:	FORCE
-	@echo 1>&2 Creating MANIFEST
-	@$(MAKE) -s $(MFLAGS) $(LOCAL_MACROS) MANIFEST.echo > $@
-
-MANIFEST.echo:	FORCE
-	@$(MAKE) -s $(MFLAGS) $(LOCAL_MACROS) \
-	    MANIFEST=`echo $(MANIFEST) | sed 's/MANIFEST//'` \
-	    ensure_manifest > /dev/null
-	@echo $(MANIFEST) | fmt -1
-	@if [ -n "$(SUBDIRS)" ]; then \
-	    subdirs="$(SUBDIRS)"; \
-	    for subdir in $$subdirs; do \
-		(cd $$subdir && \
-	        echo 1>&2 Creating $@ in `pwd` && \
-		$(MAKE) $(MFLAGS) $(LOCAL_MACROS) MANIFEST.echo | \
-		    sed "s|^|$$subdir/|") || exit 1; \
-	    done; \
-	else \
-	    :; \
-	fi
-
-ensure_manifest:	$(MANIFEST)
-
-# for distribution creation
-distdir = $(TOP_SRCDIR)/$(PACKAGE)-$(VERSION)/$(curdir)
-curdir = mfhdf/libsrc
-dist: $(DISTFILES)
-	for subdir in $(OTHERDIRS); do \
-	  mkdir $(distdir)/$$subdir || exit 1; \
-	done
-	@for file in $(DISTFILES); do \
-	  ln $(srcdir)/$$file $(distdir)/$$file 2> /dev/null \
-	    || { echo copying $$file instead; \
-	    cp -p $(srcdir)/$$file $(distdir)/$$file;}; \
-	done
-
-# ###########################################################################
-# Miscellaneous:
-# ###########################################################################
-
-# The following dummy target is useful as a dependency to ensure that a
-# rule is always executed.
-#
-FORCE:
-
-
-### Everything after the following line might be overwritten ###
-### DO NOT DELETE THIS LINE.  make depend DEPENDS ON IT ###
-include depend
+check:
+	@echo "============================"
+	@echo "HDF-SD C interfaces tests"
+	@echo "============================"
+	srcdir="$(srcdir)" ./hdftest > hdfout.new
+	@cmd="$(DIFF) hdfout.new $(srcdir)/hdfout.sav";                 \
+	  echo $$cmd;                                                   \
+	  if $$cmd; then                                                \
+	    echo "*** HDF passes formatted test ***";                   \
+	  else                                                          \
+	    echo "*** HDF fails formatted test ***";                    \
+	    echo "The above differences are OK if small";               \
+	    exit 0;                                                     \
+	  fi
+	@echo "========================="
+	@echo "netCDF formatted tests"
+	@echo "========================="
+	srcdir="$(srcdir)" ./cdftest > cdfout.new
+	@cmd="$(DIFF) cdfout.new $(srcdir)/testout.sav";                \
+	  echo $$cmd;                                                   \
+	  if $$cmd; then                                                \
+	    echo "*** netCDF passes formatted test ***";                \
+	  else                                                          \
+	    echo "*** netCDF fails formatted test ***";                 \
+	    echo "The above differences are OK if small";               \
+	    exit 0;                                                     \
+	  fi
+# 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:

Deleted: packages/libhdf4/branches/upstream/current/mfhdf/libsrc/Makefile.in_orig
===================================================================
--- packages/libhdf4/branches/upstream/current/mfhdf/libsrc/Makefile.in_orig	2007-05-15 09:05:29 UTC (rev 830)
+++ packages/libhdf4/branches/upstream/current/mfhdf/libsrc/Makefile.in_orig	2007-05-15 09:53:05 UTC (rev 831)
@@ -1,98 +0,0 @@
-# Makefile for netCDF library
-#
-# $Id: Makefile.in_orig,v 1.2 2000/08/30 21:55:46 wendling Exp $
-
-PROGRAM		= cdftest
-SWAP    	= @SWAP@
-NETLONG    	= @NETLONG@
-CPPFLAGS	= $(SWAP) $(NETLONG) @CPPFLAGS@
-CFLAGS		= @CFLAGS@ @HDF_INC@
-GARBAGE		= $(PROGRAM) test.cdf cdfout.new *.hdf \
-                  hdftest hdfout.new
-HEADERS		= netcdf.h mfhdf.h local_nc.h
-XDRFILE		= @XDRFILE@
-HDF_LIB         = @HDF_LIB@
-JPEG_LIB        = @JPEG_LIB@
-CSRCS		= array.c attr.c cdf.c dim.c error.c file.c \
-		  globdef.c iarray.c putget.c putgetg.c sharray.c string.c \
-		  var.c xdrposix.c xdrstdio.c hdfsds.c mfsd.c nssdc.c
-MANIFEST	= Makefile.in README \
-		  depend \
-		  $(CSRCS) cdftest.c \
-		  alloc.h testout.sav descrip.mms error.h htons.mar \
-		  local_nc.h make.com msoft.mk netcdf.h ntohs.mar \
-		  test_cdf.sav hdfout.sav mfsd.c hdfsds.c hdftest.c nssdc.c
-LIBOBJS		= array.o attr.o cdf.o dim.o file.o iarray.o error.o \
-		  globdef.o putget.o putgetg.o sharray.o string.o var.o \
-		  @XDRFILE at .o hdfsds.o mfsd.o nssdc.o
-LIBRARY		= netcdf
-DEBUGLIBRARY	= netcdf_g
-PROFILEDLIBRARY	= netcdf_pg
-OBJS		= $(PROGRAM).o
-LD_XDR		= @LD_XDR@
-LD_NETCDF	= libnetcdf.a
-LIBS		= $(LD_NETCDF) $(LD_XDR) $(HDF_LIB) $(JPEG_LIB) $(LIBSX)
-prefix		= ../../..
-
-all::		library
-
-#
-# The formatted file `cdftest_out.new' might differ from the touchstone
-# file `testout.sav', but this should be due to rounding errors.
-#
-# `$(PROGRAM)' creates the binary-file `test.cdf' which should be byte-for-byte
-# identical with `test_cdf.sav', modulo small rounding errors.
-#
-test:		$(PROGRAM) hdftest
-	./$(PROGRAM) > cdfout.new
-	@cmd="diff cdfout.new testout.sav"; \
-	    echo $$cmd; \
-	    if $$cmd; then \
-		echo "*** netCDF passes formatted test ***"; \
-	    else \
-		echo "*** netCDF fails formatted test ***"; \
-		echo "The above differences are OK if small"; \
-		exit 0; \
-	    fi
-#	@cmd="cmp test.cdf test_cdf.sav"; \
-#	    echo $$cmd; \
-#	    if $$cmd; then \
-#		echo "*** netCDF passes binary test ***"; \
-#	    else \
-#		echo "*** netCDF fails binary test ***"; \
-#		exit 1; \
-#	    fi
-
-install::	installed_library installed_headers
-
-$(PROGRAM):	$(PROGRAM).o library
-
-hdftest:	hdftest.o library        
-	$(CC) $(CFLAGS) hdftest.o $(LIBS) -o $@
-	./hdftest > hdfout.new
-	@cmd="diff hdfout.new hdfout.sav"; \
-	    echo $$cmd; \
-	    if $$cmd; then \
-		echo "*** HDF passes formatted test ***"; \
-	    else \
-		echo "*** HDF fails formatted test ***"; \
-		echo "The above differences are OK if small"; \
-		exit 0; \
-	    fi
-debug:
-#	rm -f $(COBJS)
-	$(MAKE) $(MFLAGS) "CFLAGS=-g" "LIBRARY=$(LIBRARY)_g" library
-
-profiled:
-#	rm -f $(COBJS)
-	$(MAKE) $(MFLAGS) "CFLAGS=-pg" "LIBRARY=$(LIBRARY)_pg" library
-
-cdftest.oc:	$(CSRCS) cdftest.c
-	#load -C $(CPPFLAGS) -I/usr/local/lang/SC1.0/ansi_include \
-	    $(CSRCS) cdftest.c /usr/local/lang/SC1.0/ansi_lib/libansi.a 
-
-include ../port/master.mk
-
-### Everything after the following line might be overwritten ###
-### DO NOT DELETE THIS LINE.  make depend DEPENDS ON IT ###
-include depend

Modified: packages/libhdf4/branches/upstream/current/mfhdf/libsrc/array.c
===================================================================
--- packages/libhdf4/branches/upstream/current/mfhdf/libsrc/array.c	2007-05-15 09:05:29 UTC (rev 830)
+++ packages/libhdf4/branches/upstream/current/mfhdf/libsrc/array.c	2007-05-15 09:53:05 UTC (rev 831)
@@ -2,7 +2,7 @@
  *	Copyright 1993, University Corporation for Atmospheric Research
  *      See netcdf/COPYRIGHT file for copying and redistribution conditions.
  */
-/*	$Id: array.c,v 1.15 2000/08/29 13:56:50 koziol Exp $ */
+/*	$Id: array.c,v 1.19 2003/12/10 21:15:09 epourmal Exp $ */
 
 #include	<string.h>
 #include	"local_nc.h"
@@ -610,7 +610,7 @@
 	case NC_LONG :
 #if defined _CRAYMPP
 		xdr_NC_fnct = xdr_short;
-#elif defined __alpha || (_MIPS_SZLONG == 64) || defined IA64
+#elif defined __alpha || (_MIPS_SZLONG == 64) || defined __ia64 || (defined __sun && defined _LP64) || defined AIX5L64 || defined __x86_64__
 		xdr_NC_fnct = xdr_int ;
 #else
 		xdr_NC_fnct = xdr_long ;

Modified: packages/libhdf4/branches/upstream/current/mfhdf/libsrc/cdf.c
===================================================================
--- packages/libhdf4/branches/upstream/current/mfhdf/libsrc/cdf.c	2007-05-15 09:05:29 UTC (rev 830)
+++ packages/libhdf4/branches/upstream/current/mfhdf/libsrc/cdf.c	2007-05-15 09:53:05 UTC (rev 831)
@@ -2,7 +2,7 @@
  *	Copyright 1993, University Corporation for Atmospheric Research
  *      See netcdf/COPYRIGHT file for copying and redistribution conditions.
  */
-/*	$Id: cdf.c,v 1.72 2000/05/23 18:03:33 acheng Exp $ */
+/*	$Id: cdf.c,v 1.79 2003/12/10 21:15:10 epourmal Exp $ */
 
 #include	"local_nc.h"
 #include	"alloc.h"
@@ -659,7 +659,7 @@
 	NC **handlep;
 {
 
-	u_long	magic = NCMAGIC ;
+	u_long	magic;
 
 	if( xdrs->x_op == XDR_FREE)
       {
@@ -669,7 +669,7 @@
 	
 	if( xdr_getpos(xdrs) != 0)
       {
-          if( !xdr_setpos(xdrs, 0L) )
+          if( !xdr_setpos(xdrs, 0) )
             {
                 nc_serror("Can't set position to begin") ;
                 return(FALSE) ;
@@ -1721,9 +1721,9 @@
 intn 
 hdf_read_dims(XDR *xdrs, NC *handle, int32 vg)
 {
-    char vgname[100] = "";
-    char vsclass[128] = "";
-    char vgclass[128] = "";
+    char vgname[MAX_NC_NAME] = "";
+    char vsclass[MAX_NC_CLASS] = "";
+    char vgclass[MAX_NC_CLASS] = "";
     int      id, count, i, found;
     int      sub_id;
     int32    dim_size;
@@ -1967,7 +1967,7 @@
     int       t, n;
     int32     vs, tag;
     int32     id = -1;
-    char      class[128] = "";
+    char      class[MAX_NC_CLASS] = "";
     intn      ret_value = FAIL;
 
 #ifdef HDF_NUM_ATTRS
@@ -2051,9 +2051,9 @@
     int       count, t, n;
     int32     vs, tag, id, vsize, attr_size, nt;
     nc_type   type;
-    char      vsname[100] = "";
+    char      vsname[MAX_NC_NAME] = "";
     char      fields[100] = "" ;
-    char      class[128] = "";
+    char      class[MAX_NC_CLASS] = "";
     char     *values = NULL;
     NC_attr **attributes = NULL;
     NC_array *Array = NULL;
@@ -2242,9 +2242,9 @@
               NC *handle, 
               int32 vg)
 {
-    char     vgname[100] = "";
-    char     subname[100] = "";
-    char     class[128] = "";
+    char     vgname[MAX_NC_NAME] = "";
+    char     subname[MAX_NC_NAME] = "";
+    char     class[MAX_NC_CLASS] = "";
     NC_var **variables = NULL;
     NC_var  *vp = NULL;
     int      ndims, *dims = NULL;
@@ -2519,6 +2519,12 @@
                         }
           
                       variables[count] = NC_new_var(vgname, type, ndims, dims);
+		      /* BMR: put back hdf type that was set wrong by 
+			 NC_new_var; please refer to the cvs history of 
+			 bug #172 for reason on this statement - 4/17/2001 
+		      */
+		      variables[count]->HDFtype = HDFtype;
+
                       vp = variables[count];
                       if(NULL == vp) 
                         {
@@ -2600,7 +2606,10 @@
                                       HDfree(vp->shape);
                                   if(vp->dsizes != NULL)
                                       HDfree(vp->dsizes);
-                      
+				  /* Reset these two pointers to NULL after 
+				     freeing.  BMR 4/11/01 */
+				  vp->shape = NULL;
+				  vp->dsizes = NULL;
                               } 
                             else 
                               {
@@ -2668,7 +2677,7 @@
 NC **handlep;
 {
 #if DEBUG
-  char            vgname[100];
+  char            vgname[MAX_NC_NAME];
   int32           entries;
 #endif
   register int32  cdf_vg = FAIL;
@@ -2676,7 +2685,7 @@
   int             status;
 #ifdef OLD_WAY
   register int    found;
-  char            class[128];
+  char            class[MAX_NC_CLASS];
 #endif /* OLD_WAY */
   CONSTR(FUNC,"hdf_read_xdr_cdf");
   intn            ret_value = SUCCEED;
@@ -3209,7 +3218,7 @@
     int        id, sub_id;
     int32      vg, dim;
     int32      vs;
-    char       class[128] = "";
+    char       class[MAX_NC_CLASS] = "";
     intn       ret_value = SUCCEED;
 #ifdef LATER
     CONSTR(FUNC,"hdf_close"); 
@@ -3553,7 +3562,7 @@
         alen /= 4 ;
 #if defined _CRAYMPP
         xdr_NC_fnct = xdr_short;
-#elif defined __alpha || (_MIPS_SZLONG == 64) || defined IA64
+#elif defined __alpha || (_MIPS_SZLONG == 64) || defined __ia64 || (defined __sun && defined _LP64) || defined AIX5L64 || defined __x86_64__
         xdr_NC_fnct = xdr_int ;
 #else
         xdr_NC_fnct = xdr_long ;

Modified: packages/libhdf4/branches/upstream/current/mfhdf/libsrc/cdftest.c
===================================================================
--- packages/libhdf4/branches/upstream/current/mfhdf/libsrc/cdftest.c	2007-05-15 09:05:29 UTC (rev 830)
+++ packages/libhdf4/branches/upstream/current/mfhdf/libsrc/cdftest.c	2007-05-15 09:53:05 UTC (rev 831)
@@ -30,17 +30,13 @@
 
 # define assert(ex) {if (!(ex)){fprintf(stderr,"Assertion failed: file %s, line %d\n", __FILE__, __LINE__);exit(1);}}
 
-#define MAXSHORT	32767
-#define MAXLONG		2147483647
-#define  MAXBYTE	127
+#define CDFMAXSHORT	32767
+#define CDFMAXLONG		2147483647
+#define  CDFMAXBYTE	127
 
-/*   #ifdef PC  */
-/* For CRAYMPP, an explicit include <errno.h> uses the task-local memory */
-/* errno.  Read the CRAYMPP errno.h for more explanation. */
-#if defined PC || (defined VMS) || (defined CRAYMPP)
 #include <errno.h>
-#else
-extern int errno ;
+#if defined ERRNO_MISSING
+extern int errno;
 #endif
 
 #define FILENAME		"test.cdf"
@@ -177,23 +173,23 @@
 } testvars[]  = {
 #define Byte_id 0
 	{ "Byte", NC_BYTE, "Byte sized integer variable",
-		-MAXBYTE, MAXBYTE, -MAXBYTE, MAXBYTE , "ones",
+		-CDFMAXBYTE, CDFMAXBYTE, -CDFMAXBYTE, CDFMAXBYTE , "ones",
 			2, {0,1,DONT_CARE} },
 #define Short_id 1
 	{ "Short", NC_SHORT, "Short variable",
-		-MAXSHORT, MAXSHORT, -MAXSHORT, MAXSHORT , "ones",
+		-CDFMAXSHORT, CDFMAXSHORT, -CDFMAXSHORT, CDFMAXSHORT , "ones",
 			2, {0, 2, DONT_CARE }},
 #define Long_id 2
 	{ "Long", NC_LONG, "Long Integer variable",
-		-MAXLONG, MAXLONG, -MAXLONG, MAXLONG, "ones",
+		-CDFMAXLONG, CDFMAXLONG, -CDFMAXLONG, CDFMAXLONG, "ones",
 			2, {1, 2, DONT_CARE}},
 #define Float_id 3
 	{ "Float", NC_FLOAT, "Single Precision Floating Point variable",
-		-MAXLONG, MAXLONG, -MAXLONG, MAXLONG, "flots",
+		-CDFMAXLONG, CDFMAXLONG, -CDFMAXLONG, CDFMAXLONG, "flots",
 			3, {0, 1, 2 }},
 #define Double_id 4
 	{ "Double", NC_DOUBLE, "Double Precision Floating Point variable",
-		-MAXLONG, MAXLONG, -MAXLONG, MAXLONG, "dflots",
+		-CDFMAXLONG, CDFMAXLONG, -CDFMAXLONG, CDFMAXLONG, "dflots",
 			3, {0, 1, 2 }},
 } ;
 #define	NUM_TESTVARS	5
@@ -261,7 +257,7 @@
 	/* zero the indices */
 
 	cc = vindices;
-	while (cc < &vindices[num_dims])
+	while (cc <= &vindices[num_dims-1])
 		*cc++ = 0; 
 
 	/* ripple counter */
@@ -306,7 +302,7 @@
 
 	sizes[0] = NUM_RECS ;
 	cc = vindices;
-	while (cc < &vindices[num_dims])
+	while (cc <= &vindices[num_dims-1])
 		*cc++ = 0; 
 
 	/* ripple counter */
@@ -702,7 +698,7 @@
 	printf("got val = %c (0x%02x) \n", got.by[0], got.by[0] ) ;
 
 	/* (void)memset(new,0,256) ; */
-	{ char *cp = new; for(; cp < &new[sizeof(new)] ; *cp++ = 0) ; }
+	{ char *cp = new; for(; cp < &new[sizeof(new)-1] ; *cp++ = 0) ; }
 	assert( ncvarget(id, Byte_id, s_start, s_edges, (ncvoid *)new) != -1 ) ;
 	printf("got val = \"%s\"\n", new) ;
 

Modified: packages/libhdf4/branches/upstream/current/mfhdf/libsrc/config/netcdf-aix.h
===================================================================
--- packages/libhdf4/branches/upstream/current/mfhdf/libsrc/config/netcdf-aix.h	2007-05-15 09:05:29 UTC (rev 830)
+++ packages/libhdf4/branches/upstream/current/mfhdf/libsrc/config/netcdf-aix.h	2007-05-15 09:53:05 UTC (rev 831)
@@ -15,7 +15,7 @@
  * Unidata, to assist in its use, correction, modification, or enhancement.
  *
  */
-/* "$Id: netcdf-aix.h,v 1.5 1997/11/14 02:44:46 acheng Exp $" */
+/* "$Id: netcdf-aix.h,v 1.9 2004/11/22 18:57:11 epourmal Exp $" */
 
 #ifndef _NETCDF_
 #define _NETCDF_
@@ -304,7 +304,7 @@
  */
 #if defined _CRAYMPP
 typedef short	nclong;
-#elif defined __alpha || (_MIPS_SZLONG == 64)
+#elif defined __alpha || (_MIPS_SZLONG == 64) || defined IA64 || (defined __sun && defined _LP64) || defined AIX5L64
 typedef int     nclong;   
 #else
 typedef long    nclong;         /* default, compatible type */
@@ -343,6 +343,7 @@
 #define	NC_EXDR		32	/* */
 #define	NC_SYSERR	-1
 
+#include "hdf2netcdf.h"
 extern int ncerr ;
 
 /*
@@ -371,7 +372,6 @@
 #   define	PROTO(x)	()
 #endif
 
-#include "hdf2netcdf.h"
 
 #ifdef __cplusplus
 extern "C" {

Modified: packages/libhdf4/branches/upstream/current/mfhdf/libsrc/config/netcdf-alpha.h
===================================================================
--- packages/libhdf4/branches/upstream/current/mfhdf/libsrc/config/netcdf-alpha.h	2007-05-15 09:05:29 UTC (rev 830)
+++ packages/libhdf4/branches/upstream/current/mfhdf/libsrc/config/netcdf-alpha.h	2007-05-15 09:53:05 UTC (rev 831)
@@ -15,7 +15,7 @@
  * Unidata, to assist in its use, correction, modification, or enhancement.
  *
  */
-/* "$Id: netcdf-alpha.h,v 1.5 1997/11/14 02:44:46 acheng Exp $" */
+/* "$Id: netcdf-alpha.h,v 1.7 2004/11/22 18:57:12 epourmal Exp $" */
 
 #ifndef _NETCDF_
 #define _NETCDF_
@@ -304,7 +304,7 @@
  */
 #if defined _CRAYMPP
 typedef short	nclong;
-#elif defined __alpha || (_MIPS_SZLONG == 64)
+#elif defined __alpha || (_MIPS_SZLONG == 64) || defined IA64 || (defined __sun && defined _LP64)
 typedef int     nclong;   
 #else
 typedef long    nclong;         /* default, compatible type */
@@ -343,6 +343,7 @@
 #define	NC_EXDR		32	/* */
 #define	NC_SYSERR	-1
 
+#include "hdf2netcdf.h"
 extern int ncerr ;
 
 /*
@@ -371,7 +372,6 @@
 #   define	PROTO(x)	()
 #endif
 
-#include "hdf2netcdf.h"
 
 #ifdef __cplusplus
 extern "C" {

Added: packages/libhdf4/branches/upstream/current/mfhdf/libsrc/config/netcdf-apple.h
===================================================================
--- packages/libhdf4/branches/upstream/current/mfhdf/libsrc/config/netcdf-apple.h	                        (rev 0)
+++ packages/libhdf4/branches/upstream/current/mfhdf/libsrc/config/netcdf-apple.h	2007-05-15 09:53:05 UTC (rev 831)
@@ -0,0 +1,590 @@
+/* Generated automatically from netcdf.h.in by configure. */
+/*
+ *	Copyright 1993, University Corporation for Atmospheric Research
+ *
+ *  Permission to use, copy, modify, and distribute this software and its
+ * documentation for any purpose without fee is hereby granted, provided
+ * that the above copyright notice appear in all copies, that both that
+ * copyright notice and this permission notice appear in supporting
+ * documentation, and that the name of UCAR/Unidata not be used in
+ * advertising or publicity pertaining to distribution of the software
+ * without specific, written prior permission.  UCAR makes no
+ * representations about the suitability of this software for any purpose.
+ * It is provided "as is" without express or implied warranty.  It is
+ * provided with no support and without obligation on the part of UCAR
+ * Unidata, to assist in its use, correction, modification, or enhancement.
+ *
+ */
+/* "$Id: netcdf-apple.h,v 1.3 2004/11/22 18:57:13 epourmal Exp $" */
+
+#ifndef _NETCDF_
+#define _NETCDF_
+
+#ifdef __MWERKS__
+#ifndef HDF
+#define HDF
+#endif
+#endif /* __MWERKS__ */
+
+/*
+ * The definitions ncvoid, USE_ENUM, and MAX_NC_OPEN, may need to be set
+ * properly for your installation.
+ */
+
+/*
+ * Argument type in user functions (deprecated, backward compatibility)
+ */
+#ifndef UD_NO_VOID
+#define ncvoid    void
+#else
+/* system doesn't have void type */
+#define ncvoid    char
+#endif
+
+
+/*
+ *   If xdr_enum works properly on your system, you can define 
+ * USE_ENUM so that nc_type is an enum. 
+ * Otherwise, delete this definition so that the nc_type is
+ * an int and the valid values are #defined.
+ */
+#ifndef __MWERKS__
+#define USE_ENUM
+#endif
+
+
+/*
+ * The following macro is provided for backward compatibility only.  If you
+ * are a new user of netCDF, then you may safely ignore it.  If, however,
+ * you have an existing archive of netCDF files that use default
+ * floating-point fill values, then you should know that the definition of
+ * the default floating-point fill values changed with version 2.3 of the
+ * netCDF package.  Prior to this release, the default floating-point fill
+ * values were not very portable:  their correct behavior depended not only
+ * upon the particular platform, but also upon the compilation
+ * environment.  This led to the definition of new, default floating-point
+ * fill values that are portable across all platforms and compilation
+ * environments.  If you wish, however, to obtain the old, non-portable
+ * floating-point fill values, then the following macro should have a true
+ * value PRIOR TO BUILDING THE netCDF LIBRARY.
+ *
+ * Implementation details are contained in the section below on fill values.
+ */
+#define NC_OLD_FILLVALUES	0
+
+/*
+ * 	Fill values
+ * These values are stuffed into newly allocated space as appropriate.
+ * The hope is that one might use these to notice that a particular datum
+ * has not been set.
+ */
+
+#define FILL_BYTE	((char)-127)		/* Largest Negative value */
+#define FILL_CHAR	((char)0)
+#define FILL_SHORT	((short)-32767)
+#define FILL_LONG	((long)-2147483647)
+
+#if !NC_OLD_FILLVALUES
+
+#   define FILL_FLOAT	9.9692099683868690e+36 /* near 15 * 2^119 */
+#   define FILL_DOUBLE	9.9692099683868690e+36
+
+#else	/* NC_OLD_FILLVALUES below */
+
+/*
+ * This section is provided for backward compatibility only.  Using
+ * XDR infinities for floating-point fill values has caused more problems
+ * than it has solved.  We encourage you to define your own data-specific
+ * fill values rather than use default ones (see `_FillValue' below).
+ * If, however, you *must* use default fill values, then you should use
+ * the above fill values rather than the ones in this section.
+ */
+
+/*
+ * XDR_F_INFINITY is a float value whose EXTERNAL (xdr)
+ * represention is ieee floating infinity.
+ * XDR_D_INFINITY is a double value whose EXTERNAL (xdr)
+ * represention is ieee double floating point infinity.
+ * These are used as default fill values below.
+ *
+ * This section shows three techniques for setting these:
+ *  Direct assignment (vax, cray) - works for non IEEE machines
+ *		Doesn't work when IEEE machines don't allow
+ *      float or double constants whose values are infinity.
+ *  Use of a union (preferred portable method) - should work on
+ *      any ANSI compiler with IEEE floating point representations,
+ *      modulo byte order and sizeof() considerations.
+ *  Use of pointer puns - may work with many older compilers
+ *      which don't allow intialization of unions.
+ *      Often doesn't work with compilers which have strict
+ *      alignment rules.
+ */ 
+
+    /* Direct assignment. All cases should be mutually exclusive */
+
+#ifdef vax
+#define	XDR_D_INFINITY	1.7014118346046923e+38
+#define	XDR_F_INFINITY	1.70141173e+38
+#endif /* vax */
+
+#ifdef cray
+#define	XDR_D_INFINITY	1.797693134862313000e+308
+#define	XDR_F_INFINITY	XDR_D_INFINITY
+#endif /* cray */
+
+#ifdef notdef /* you might want to try these, on an IEEE machine */
+#define XDR_D_INFINITY	1.797693134862315900e+308
+#define XDR_F_INFINITY	3.40282357e+38
+#endif
+
+#ifdef __STDC__
+    /* Use of a union, assumes IEEE representation and 1 byte unsigned char */
+
+#ifndef    XDR_D_INFINITY
+#define USE_D_UNION
+     union xdr_d_union {unsigned char bb[8]; double dd;} ;
+     extern union xdr_d_union xdr_d_infs ;  /* instantiated in array.c */
+#define XDR_D_INFINITY    (xdr_d_infs.dd)
+#endif /* !XDR_D_INFINITY */
+
+#ifndef    XDR_F_INFINITY
+#define USE_F_UNION
+     union xdr_f_union {unsigned char bb[4]; float ff;} ;
+     extern union xdr_f_union xdr_f_infs ;  /* instantiated in array.c */
+#define  XDR_F_INFINITY    (xdr_f_infs.ff)
+#endif /* !XDR_F_INFINITY */
+
+
+#else /* __STDC__ */
+    /* Use of a pointer pun, assumes IEEE representation, 4 byte long */
+
+#ifndef    XDR_D_INFINITY
+#define USE_D_LONG_PUN
+     extern long xdr_d_infinity[] ;  /* instantiated in array.c */
+#define XDR_D_INFINITY *(double *)xdr_d_infinity
+#endif /* !XDR_D_INFINITY */
+
+#ifndef    XDR_F_INFINITY
+#define USE_F_LONG_PUN
+     extern long xdr_f_infinity ;  /* instantiated in array.c */
+#define XDR_F_INFINITY *((float *)&xdr_f_infinity)
+#endif /* !XDR_F_INFINITY */
+
+#endif /* __STDC__ */
+
+/* End of INFINITY           section */
+
+#define FILL_FLOAT	XDR_F_INFINITY	/* IEEE Infinity */
+#define FILL_DOUBLE	XDR_D_INFINITY
+
+#endif	/* NC_OLD_FILLVALUES above */
+
+
+/*
+ *  masks for the struct NC flags field; passed in as 'mode' arg to
+ * nccreate and ncopen.
+ *
+ */
+#define NC_RDWR  1		/* read/write, 0 => readonly */
+#define NC_CREAT 2		/* in create phase, cleared by ncendef */
+#define NC_EXCL  4		/* on create, don't destroy existing file */
+#define NC_INDEF 8		/* in define mode, cleared by ncendef */
+#define NC_NSYNC 0x10	/* synchronise numrecs on change */
+#define NC_HSYNC 0x20	/* synchronise whole header on change */
+#define NC_NDIRTY 0x40	/* numrecs has changed */
+#define NC_HDIRTY 0x80  /* header info has changed */
+#define NC_NOFILL 0x100	/* Don't fill vars on endef and increase of record */
+#define NC_LINK 0x8000	/* isa link */
+
+#define NC_FILL 0	/* argument to ncsetfill to clear NC_NOFILL */
+
+/*
+ * 'mode' arguments for nccreate and ncopen
+ */
+#define NC_NOWRITE   0
+#define NC_WRITE     NC_RDWR
+#define NC_CLOBBER   (NC_INDEF | NC_CREAT | NC_RDWR)
+#define NC_NOCLOBBER (NC_INDEF | NC_EXCL | NC_CREAT | NC_RDWR)
+
+/*
+ * 'size' argument to ncdimdef for an unlimited dimension
+ */
+#define NC_UNLIMITED 0L
+
+/*
+ * attribute id to put/get a global attribute
+ */
+#define NC_GLOBAL -1
+
+#ifndef HDF
+/*
+ * This can be as large as the maximum number of stdio streams
+ * you can have open on your system.
+ */
+#define MAX_NC_OPEN 32
+
+/*
+ * These maximums are enforced by the interface, to facilitate writing
+ * applications and utilities.  However, nothing is statically allocated to
+ * these sizes internally.
+ */
+#define MAX_NC_DIMS 5000	 /* max dimensions per file */
+#define MAX_NC_ATTRS 3000	 /* max global or per variable attributes */
+#define MAX_NC_VARS 5000	 /* max variables per file */
+#define MAX_NC_NAME 256		 /* max length of a name */
+#define MAX_VAR_DIMS 32          /* max per variable dimensions */
+
+/*
+ * Added feature. 
+ * If you wish a variable to use a different value than the above
+ * defaults, create an attribute with the same type as the variable
+ * and the following reserved name. The value you give the attribute
+ * will be used as the fill value for that variable.
+ */
+#define _FillValue	"_FillValue"
+
+#else /* HDF */
+
+#include "hlimits.h"  /* Hard coded constants for HDF library */
+
+#endif /* HDF */
+
+#ifdef USE_ENUM
+/*
+ *  The netcdf data types
+ */
+typedef enum {
+	NC_UNSPECIFIED, /* private */
+	NC_BYTE,
+	NC_CHAR,
+	NC_SHORT,
+	NC_LONG,
+	NC_FLOAT,
+	NC_DOUBLE,
+	/* private */
+	NC_BITFIELD,
+	NC_STRING,
+	NC_IARRAY,
+	NC_DIMENSION,
+	NC_VARIABLE,
+	NC_ATTRIBUTE
+} nc_type ;
+#else
+typedef int nc_type ;
+#define	NC_UNSPECIFIED 0 /* private */
+#define	NC_BYTE 1
+#define	NC_CHAR 2
+#define	NC_SHORT 3
+#define	NC_LONG 4
+#define	NC_FLOAT 5
+#define	NC_DOUBLE 6
+	/* private */
+#define	NC_BITFIELD 7
+#define	NC_STRING 8
+#define	NC_IARRAY 9
+#define	NC_DIMENSION 10
+#define	NC_VARIABLE 11
+#define	NC_ATTRIBUTE 12
+#endif
+
+
+/*
+ * C data types corresponding to netCDF data types:
+ */
+/* Don't use these or the C++ interface gets confused
+typedef char  ncchar;
+typedef char  ncbyte;
+typedef short ncshort;
+typedef float ncfloat;
+typedef double        ncdouble;
+*/
+
+/* 
+ * Variables/attributes of type NC_LONG should use the C type 'nclong'
+ */
+#if defined _CRAYMPP
+typedef short	nclong;
+#elif defined __alpha || (_MIPS_SZLONG == 64) || defined IA64 || (defined __sun && defined _LP64)
+typedef int     nclong;   
+#else
+typedef long    nclong;         /* default, compatible type */
+#endif
+
+
+/*
+ * Global netcdf error status variable
+ *  Initialized in error.c
+ */
+#define	NC_NOERR	0	/* No Error */
+#define	NC_EBADID	1	/* Not a netcdf id */
+#define	NC_ENFILE	2	/* Too many netcdfs open */
+#define	NC_EEXIST	3	/* netcdf file exists && NC_NOCLOBBER */
+#define	NC_EINVAL	4	/* Invalid Argument */
+#define	NC_EPERM	5	/* Write to read only */
+#define	NC_ENOTINDEFINE	6	/* Operation not allowed in data mode */
+#define	NC_EINDEFINE	7	/* Operation not allowed in define mode */
+#define	NC_EINVALCOORDS	8	/* Coordinates out of Domain */
+#define	NC_EMAXDIMS	9	/* MAX_NC_DIMS exceeded */
+#define	NC_ENAMEINUSE	10	/* String match to name in use */
+#define NC_ENOTATT	11	/* Attribute not found */
+#define	NC_EMAXATTS	12	/* MAX_NC_ATTRS exceeded */
+#define NC_EBADTYPE	13	/* Not a netcdf data type */
+#define NC_EBADDIM	14	/* Invalid dimension id */
+#define NC_EUNLIMPOS	15	/* NC_UNLIMITED in the wrong index */
+#define	NC_EMAXVARS	16	/* MAX_NC_VARS exceeded */
+#define NC_ENOTVAR	17	/* Variable not found */
+#define NC_EGLOBAL	18	/* Action prohibited on NC_GLOBAL varid */
+#define NC_ENOTNC	19	/* Not a netcdf file */
+#define NC_ESTS         20      /* In Fortran, string too short */
+#define NC_EMAXNAME     21      /* MAX_NC_NAME exceeded */
+#define NC_ENTOOL       NC_EMAXNAME   /* Backward compatibility */
+#define NC_EUNLIMIT     22      /* NC_UNLIMITED size already in use */
+
+#define	NC_EXDR		32	/* */
+#define	NC_SYSERR	-1
+
+#include "hdf2netcdf.h"
+extern int ncerr ;
+
+/*
+ * Global options variable. Used to determine behavior of error handler.
+ *  Initialized in lerror.c
+ */
+#define	NC_FATAL	1
+#define	NC_VERBOSE	2
+
+extern int ncopts ;	/* default is (NC_FATAL | NC_VERBOSE) */
+
+/*
+ * NB: The following feature-test line is too long in order to accomodate a 
+ * bug in the VMS 5.3 C compiler.
+ */
+#ifndef HAVE_PROTOTYPES
+#   if defined(__STDC__) || defined(__GNUC__) || defined(__cplusplus) || defined(c_plusplus)
+#       define	HAVE_PROTOTYPES
+#   endif
+#endif
+
+#undef PROTO
+#ifdef HAVE_PROTOTYPES 
+#   define	PROTO(x)	x
+#else
+#   define	PROTO(x)	()
+#endif
+
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+extern int nccreate	PROTO((
+    const char*	path,
+    int		cmode
+));
+extern int ncopen	PROTO((
+    const char*	path,
+    int		mode
+));
+extern int ncredef	PROTO((
+    int		cdfid
+));
+extern int ncendef	PROTO((
+    int		cdfid
+));
+extern int ncclose	PROTO((
+    int		cdfid
+));
+extern int ncinquire	PROTO((
+    int		cdfid,
+    int*	ndims,
+    int*	nvars,
+    int*	natts, 
+    int*	recdim
+));
+extern int ncsync	PROTO((
+    int		cdfid
+));
+extern int ncabort	PROTO((
+    int		cdfid
+));
+extern int ncnobuf	PROTO((
+    int		cdfid
+));
+extern int ncdimdef	PROTO((
+    int		cdfid,
+    const char*	name,
+    long	length
+));
+extern int ncdimid	PROTO((
+    int		cdfid,
+    const char*	name
+));
+extern int ncdiminq	PROTO((
+    int		cdfid,
+    int		dimid,
+    char*	name,
+    long*	length
+));
+extern int ncdimrename	PROTO((
+    int		cdfid,
+    int		dimid,
+    const char*	name
+));
+extern int ncvardef	PROTO((
+    int		cdfid,
+    const char*	name,
+    nc_type	datatype, 
+    int		ndims,
+    const int*	dim
+));
+extern int ncvarid	PROTO((
+    int		cdfid,
+    const char*	name
+));
+extern int ncvarinq	PROTO((
+    int		cdfid,
+    int		varid,
+    char*	name,
+    nc_type*	datatype,
+    int*	ndims,
+    int*	dim,
+    int*	natts
+));
+extern int ncvarput1	PROTO((
+    int		cdfid,
+    int		varid,
+    const long*	coords,
+    const void*	value
+));
+extern int ncvarget1	PROTO((
+    int		cdfid,
+    int		varid,
+    const long*	coords,
+    void*	value
+));
+extern int ncvarput	PROTO((
+    int		cdfid,
+    int		varid,
+    const long*	start,
+    const long*	count, 
+    void*	value
+));
+extern int ncvarget	PROTO((
+    int		cdfid,
+    int		varid,
+    const long*	start,
+    const long*	count, 
+    void*	value
+));
+extern int ncvarputs	PROTO((
+    int		cdfid,
+    int		varid,
+    const long*	start,
+    const long*	count,
+    const long*	stride,
+    void*	values
+));
+extern int ncvargets	PROTO((
+    int		cdfid,
+    int		varid,
+    const long*	start,
+    const long*	count,
+    const long*	stride,
+    void*	values
+));
+extern int ncvarputg	PROTO((
+    int		cdfid,
+    int		varid,
+    const long*	start,
+    const long*	count,
+    const long*	stride,
+    const long*	imap,
+    void* values
+));
+extern int ncvargetg	PROTO((
+    int		cdfid,
+    int		varid,
+    const long*	start,
+    const long*	count,
+    const long*	stride,
+    const long*	imap,
+    void*	values
+));
+extern int ncvarrename	PROTO((
+    int		cdfid,
+    int		varid,
+    const char*	name
+));
+extern int ncattput	PROTO((
+    int		cdfid,
+    int		varid,
+    const char*	name, 
+    nc_type	datatype,
+    int		len,
+    const void*	value
+));
+extern int ncattinq	PROTO((
+    int		cdfid,
+    int		varid,
+    const char*	name, 
+    nc_type*	datatype,
+    int*	len
+));
+extern int ncattget	PROTO((
+    int		cdfid,
+    int		varid,
+    const char*	name, 
+    void*	value
+));
+extern int ncattcopy	PROTO((
+    int		incdf,
+    int		invar,
+    const char*	name, 
+    int		outcdf,
+    int		outvar
+));
+extern int ncattname	PROTO((
+    int		cdfid,
+    int		varid,
+    int		attnum,
+    char*	name
+));
+extern int ncattrename	PROTO((
+    int		cdfid,
+    int		varid,
+    const char*	name, 
+    const char*	newname
+));
+extern int ncattdel	PROTO((
+    int		cdfid,
+    int		varid,
+    const char*	name
+));
+extern int nctypelen	PROTO((
+    nc_type	datatype
+));
+extern int ncsetfill	PROTO((
+    int		cdfid,
+    int		fillmode
+));
+extern int ncrecinq		PROTO((
+    int		cdfid,
+    int*	nrecvars,
+    int*	recvarids,
+    long*	recsizes
+));
+extern int ncrecget		PROTO((
+    int		cdfid,
+    long	recnum,
+    void**	datap
+));
+extern int ncrecput		PROTO((
+    int		cdfid,
+    long	recnum,
+    void* * datap
+));
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* _NETCDF_ */

Modified: packages/libhdf4/branches/upstream/current/mfhdf/libsrc/config/netcdf-convex.h
===================================================================
--- packages/libhdf4/branches/upstream/current/mfhdf/libsrc/config/netcdf-convex.h	2007-05-15 09:05:29 UTC (rev 830)
+++ packages/libhdf4/branches/upstream/current/mfhdf/libsrc/config/netcdf-convex.h	2007-05-15 09:53:05 UTC (rev 831)
@@ -15,7 +15,7 @@
  * Unidata, to assist in its use, correction, modification, or enhancement.
  *
  */
-/* "$Id: netcdf-convex.h,v 1.5 1997/11/14 02:44:48 acheng Exp $" */
+/* "$Id: netcdf-convex.h,v 1.7 2004/11/22 18:57:13 epourmal Exp $" */
 
 #ifndef _NETCDF_
 #define _NETCDF_
@@ -304,7 +304,7 @@
  */
 #if defined _CRAYMPP
 typedef short	nclong;
-#elif defined __alpha || (_MIPS_SZLONG == 64)
+#elif defined __alpha || (_MIPS_SZLONG == 64) || defined IA64 || (defined __sun && defined _LP64)
 typedef int     nclong;   
 #else
 typedef long    nclong;         /* default, compatible type */
@@ -343,6 +343,7 @@
 #define	NC_EXDR		32	/* */
 #define	NC_SYSERR	-1
 
+#include "hdf2netcdf.h"
 extern int ncerr ;
 
 /*
@@ -371,7 +372,6 @@
 #   define	PROTO(x)	()
 #endif
 
-#include "hdf2netcdf.h"
 
 #ifdef __cplusplus
 extern "C" {

Modified: packages/libhdf4/branches/upstream/current/mfhdf/libsrc/config/netcdf-dec.h
===================================================================
--- packages/libhdf4/branches/upstream/current/mfhdf/libsrc/config/netcdf-dec.h	2007-05-15 09:05:29 UTC (rev 830)
+++ packages/libhdf4/branches/upstream/current/mfhdf/libsrc/config/netcdf-dec.h	2007-05-15 09:53:05 UTC (rev 831)
@@ -15,7 +15,7 @@
  * Unidata, to assist in its use, correction, modification, or enhancement.
  *
  */
-/* "$Id: netcdf-dec.h,v 1.5 1997/11/14 02:44:49 acheng Exp $" */
+/* "$Id: netcdf-dec.h,v 1.7 2004/11/22 18:57:14 epourmal Exp $" */
 
 #ifndef _NETCDF_
 #define _NETCDF_
@@ -304,7 +304,7 @@
  */
 #if defined _CRAYMPP
 typedef short	nclong;
-#elif defined __alpha || (_MIPS_SZLONG == 64)
+#elif defined __alpha || (_MIPS_SZLONG == 64) || defined IA64 || (defined __sun && defined _LP64)
 typedef int     nclong;   
 #else
 typedef long    nclong;         /* default, compatible type */
@@ -343,6 +343,7 @@
 #define	NC_EXDR		32	/* */
 #define	NC_SYSERR	-1
 
+#include "hdf2netcdf.h"
 extern int ncerr ;
 
 /*
@@ -371,7 +372,6 @@
 #   define	PROTO(x)	()
 #endif
 
-#include "hdf2netcdf.h"
 
 #ifdef __cplusplus
 extern "C" {

Modified: packages/libhdf4/branches/upstream/current/mfhdf/libsrc/config/netcdf-fbsd.h
===================================================================
--- packages/libhdf4/branches/upstream/current/mfhdf/libsrc/config/netcdf-fbsd.h	2007-05-15 09:05:29 UTC (rev 830)
+++ packages/libhdf4/branches/upstream/current/mfhdf/libsrc/config/netcdf-fbsd.h	2007-05-15 09:53:05 UTC (rev 831)
@@ -15,7 +15,7 @@
  * Unidata, to assist in its use, correction, modification, or enhancement.
  *
  */
-/* "$Id: netcdf-fbsd.h,v 1.5 1997/11/14 02:44:49 acheng Exp $" */
+/* "$Id: netcdf-fbsd.h,v 1.7 2004/11/22 18:57:15 epourmal Exp $" */
 
 #ifndef _NETCDF_
 #define _NETCDF_
@@ -304,7 +304,7 @@
  */
 #if defined _CRAYMPP
 typedef short	nclong;
-#elif defined __alpha || (_MIPS_SZLONG == 64)
+#elif defined __alpha || (_MIPS_SZLONG == 64) || defined IA64 || (defined __sun && defined _LP64)
 typedef int     nclong;   
 #else
 typedef long    nclong;         /* default, compatible type */
@@ -343,6 +343,7 @@
 #define	NC_EXDR		32	/* */
 #define	NC_SYSERR	-1
 
+#include "hdf2netcdf.h"
 extern int ncerr ;
 
 /*
@@ -371,7 +372,6 @@
 #   define	PROTO(x)	()
 #endif
 
-#include "hdf2netcdf.h"
 
 #ifdef __cplusplus
 extern "C" {

Modified: packages/libhdf4/branches/upstream/current/mfhdf/libsrc/config/netcdf-fujivp.h
===================================================================
--- packages/libhdf4/branches/upstream/current/mfhdf/libsrc/config/netcdf-fujivp.h	2007-05-15 09:05:29 UTC (rev 830)
+++ packages/libhdf4/branches/upstream/current/mfhdf/libsrc/config/netcdf-fujivp.h	2007-05-15 09:53:05 UTC (rev 831)
@@ -15,7 +15,7 @@
  * Unidata, to assist in its use, correction, modification, or enhancement.
  *
  */
-/* "$Id: netcdf-fujivp.h,v 1.4 1997/11/14 02:44:50 acheng Exp $" */
+/* "$Id: netcdf-fujivp.h,v 1.6 2004/11/22 18:57:16 epourmal Exp $" */
 
 #ifndef _NETCDF_
 #define _NETCDF_
@@ -304,7 +304,7 @@
  */
 #if defined _CRAYMPP
 typedef short	nclong;
-#elif defined __alpha || (_MIPS_SZLONG == 64)
+#elif defined __alpha || (_MIPS_SZLONG == 64) || defined IA64 || (defined __sun && defined _LP64)
 typedef int     nclong;   
 #else
 typedef long    nclong;         /* default, compatible type */
@@ -343,6 +343,7 @@
 #define	NC_EXDR		32	/* */
 #define	NC_SYSERR	-1
 
+#include "hdf2netcdf.h"
 extern int ncerr ;
 
 /*
@@ -371,7 +372,6 @@
 #   define	PROTO(x)	()
 #endif
 
-#include "hdf2netcdf.h"
 
 #ifdef __cplusplus
 extern "C" {

Modified: packages/libhdf4/branches/upstream/current/mfhdf/libsrc/config/netcdf-hpux.h
===================================================================
--- packages/libhdf4/branches/upstream/current/mfhdf/libsrc/config/netcdf-hpux.h	2007-05-15 09:05:29 UTC (rev 830)
+++ packages/libhdf4/branches/upstream/current/mfhdf/libsrc/config/netcdf-hpux.h	2007-05-15 09:53:05 UTC (rev 831)
@@ -15,7 +15,7 @@
  * Unidata, to assist in its use, correction, modification, or enhancement.
  *
  */
-/* "$Id: netcdf-hpux.h,v 1.5 1997/11/14 02:44:50 acheng Exp $" */
+/* "$Id: netcdf-hpux.h,v 1.7 2004/11/22 18:57:16 epourmal Exp $" */
 
 #ifndef _NETCDF_
 #define _NETCDF_
@@ -304,7 +304,7 @@
  */
 #if defined _CRAYMPP
 typedef short	nclong;
-#elif defined __alpha || (_MIPS_SZLONG == 64)
+#elif defined __alpha || (_MIPS_SZLONG == 64) || defined IA64 || (defined __sun && defined _LP64)
 typedef int     nclong;   
 #else
 typedef long    nclong;         /* default, compatible type */
@@ -343,6 +343,7 @@
 #define	NC_EXDR		32	/* */
 #define	NC_SYSERR	-1
 
+#include "hdf2netcdf.h"
 extern int ncerr ;
 
 /*
@@ -371,7 +372,6 @@
 #   define	PROTO(x)	()
 #endif
 
-#include "hdf2netcdf.h"
 
 #ifdef __cplusplus
 extern "C" {

Modified: packages/libhdf4/branches/upstream/current/mfhdf/libsrc/config/netcdf-ia64.h
===================================================================
--- packages/libhdf4/branches/upstream/current/mfhdf/libsrc/config/netcdf-ia64.h	2007-05-15 09:05:29 UTC (rev 830)
+++ packages/libhdf4/branches/upstream/current/mfhdf/libsrc/config/netcdf-ia64.h	2007-05-15 09:53:05 UTC (rev 831)
@@ -15,7 +15,7 @@
  * Unidata, to assist in its use, correction, modification, or enhancement.
  *
  */
-/* "$Id: netcdf-ia64.h,v 1.1 2000/05/23 18:07:10 acheng Exp $" */
+/* "$Id: netcdf-ia64.h,v 1.4 2004/11/22 18:57:17 epourmal Exp $" */
 
 #ifndef _NETCDF_
 #define _NETCDF_
@@ -304,7 +304,7 @@
  */
 #if defined _CRAYMPP
 typedef short	nclong;
-#elif defined __alpha || (_MIPS_SZLONG == 64) || defined IA64
+#elif defined __alpha || (_MIPS_SZLONG == 64) || defined __ia64 || (defined __sun && defined _LP64)
 typedef int     nclong;   
 #else
 typedef long    nclong;         /* default, compatible type */
@@ -343,6 +343,7 @@
 #define	NC_EXDR		32	/* */
 #define	NC_SYSERR	-1
 
+#include "hdf2netcdf.h"
 extern int ncerr ;
 
 /*
@@ -371,7 +372,6 @@
 #   define	PROTO(x)	()
 #endif
 
-#include "hdf2netcdf.h"
 
 #ifdef __cplusplus
 extern "C" {

Modified: packages/libhdf4/branches/upstream/current/mfhdf/libsrc/config/netcdf-irix32.h
===================================================================
--- packages/libhdf4/branches/upstream/current/mfhdf/libsrc/config/netcdf-irix32.h	2007-05-15 09:05:29 UTC (rev 830)
+++ packages/libhdf4/branches/upstream/current/mfhdf/libsrc/config/netcdf-irix32.h	2007-05-15 09:53:05 UTC (rev 831)
@@ -15,7 +15,7 @@
  * Unidata, to assist in its use, correction, modification, or enhancement.
  *
  */
-/* "$Id: netcdf-irix32.h,v 1.5 1997/11/14 02:44:51 acheng Exp $" */
+/* "$Id: netcdf-irix32.h,v 1.7 2004/11/22 18:57:18 epourmal Exp $" */
 
 #ifndef _NETCDF_
 #define _NETCDF_
@@ -304,7 +304,7 @@
  */
 #if defined _CRAYMPP
 typedef short	nclong;
-#elif defined __alpha || (_MIPS_SZLONG == 64)
+#elif defined __alpha || (_MIPS_SZLONG == 64) || defined IA64 || (defined __sun && defined _LP64)
 typedef int     nclong;   
 #else
 typedef long    nclong;         /* default, compatible type */
@@ -343,6 +343,7 @@
 #define	NC_EXDR		32	/* */
 #define	NC_SYSERR	-1
 
+#include "hdf2netcdf.h"
 extern int ncerr ;
 
 /*
@@ -371,7 +372,6 @@
 #   define	PROTO(x)	()
 #endif
 
-#include "hdf2netcdf.h"
 
 #ifdef __cplusplus
 extern "C" {

Modified: packages/libhdf4/branches/upstream/current/mfhdf/libsrc/config/netcdf-irix4.h
===================================================================
--- packages/libhdf4/branches/upstream/current/mfhdf/libsrc/config/netcdf-irix4.h	2007-05-15 09:05:29 UTC (rev 830)
+++ packages/libhdf4/branches/upstream/current/mfhdf/libsrc/config/netcdf-irix4.h	2007-05-15 09:53:05 UTC (rev 831)
@@ -15,7 +15,7 @@
  * Unidata, to assist in its use, correction, modification, or enhancement.
  *
  */
-/* "$Id: netcdf-irix4.h,v 1.5 1997/11/14 02:44:52 acheng Exp $" */
+/* "$Id: netcdf-irix4.h,v 1.7 2004/11/22 18:57:18 epourmal Exp $" */
 
 #ifndef _NETCDF_
 #define _NETCDF_
@@ -304,7 +304,7 @@
  */
 #if defined _CRAYMPP
 typedef short	nclong;
-#elif defined __alpha || (_MIPS_SZLONG == 64)
+#elif defined __alpha || (_MIPS_SZLONG == 64) || defined IA64 || (defined __sun && defined _LP64)
 typedef int     nclong;   
 #else
 typedef long    nclong;         /* default, compatible type */
@@ -343,6 +343,7 @@
 #define	NC_EXDR		32	/* */
 #define	NC_SYSERR	-1
 
+#include "hdf2netcdf.h"
 extern int ncerr ;
 
 /*
@@ -371,7 +372,6 @@
 #   define	PROTO(x)	()
 #endif
 
-#include "hdf2netcdf.h"
 
 #ifdef __cplusplus
 extern "C" {

Modified: packages/libhdf4/branches/upstream/current/mfhdf/libsrc/config/netcdf-irix5.h
===================================================================
--- packages/libhdf4/branches/upstream/current/mfhdf/libsrc/config/netcdf-irix5.h	2007-05-15 09:05:29 UTC (rev 830)
+++ packages/libhdf4/branches/upstream/current/mfhdf/libsrc/config/netcdf-irix5.h	2007-05-15 09:53:05 UTC (rev 831)
@@ -15,7 +15,7 @@
  * Unidata, to assist in its use, correction, modification, or enhancement.
  *
  */
-/* "$Id: netcdf-irix5.h,v 1.5 1997/11/14 02:44:52 acheng Exp $" */
+/* "$Id: netcdf-irix5.h,v 1.7 2004/11/22 18:57:19 epourmal Exp $" */
 
 #ifndef _NETCDF_
 #define _NETCDF_
@@ -304,7 +304,7 @@
  */
 #if defined _CRAYMPP
 typedef short	nclong;
-#elif defined __alpha || (_MIPS_SZLONG == 64)
+#elif defined __alpha || (_MIPS_SZLONG == 64) || defined IA64 || (defined __sun && defined _LP64)
 typedef int     nclong;   
 #else
 typedef long    nclong;         /* default, compatible type */
@@ -343,6 +343,7 @@
 #define	NC_EXDR		32	/* */
 #define	NC_SYSERR	-1
 
+#include "hdf2netcdf.h"
 extern int ncerr ;
 
 /*
@@ -371,7 +372,6 @@
 #   define	PROTO(x)	()
 #endif
 
-#include "hdf2netcdf.h"
 
 #ifdef __cplusplus
 extern "C" {

Modified: packages/libhdf4/branches/upstream/current/mfhdf/libsrc/config/netcdf-irix6.h
===================================================================
--- packages/libhdf4/branches/upstream/current/mfhdf/libsrc/config/netcdf-irix6.h	2007-05-15 09:05:29 UTC (rev 830)
+++ packages/libhdf4/branches/upstream/current/mfhdf/libsrc/config/netcdf-irix6.h	2007-05-15 09:53:05 UTC (rev 831)
@@ -15,7 +15,7 @@
  * Unidata, to assist in its use, correction, modification, or enhancement.
  *
  */
-/* "$Id: netcdf-irix6.h,v 1.6 1997/11/14 02:44:53 acheng Exp $" */
+/* "$Id: netcdf-irix6.h,v 1.8 2004/11/22 18:57:20 epourmal Exp $" */
 
 #ifndef _NETCDF_
 #define _NETCDF_
@@ -304,7 +304,7 @@
  */
 #if defined _CRAYMPP
 typedef short	nclong;
-#elif defined __alpha || (_MIPS_SZLONG == 64)
+#elif defined __alpha || (_MIPS_SZLONG == 64) || defined IA64 || (defined __sun && defined _LP64)
 typedef int     nclong;   
 #else
 typedef long    nclong;         /* default, compatible type */
@@ -343,6 +343,7 @@
 #define	NC_EXDR		32	/* */
 #define	NC_SYSERR	-1
 
+#include "hdf2netcdf.h"
 extern int ncerr ;
 
 /*
@@ -371,7 +372,6 @@
 #   define	PROTO(x)	()
 #endif
 
-#include "hdf2netcdf.h"
 
 #ifdef __cplusplus
 extern "C" {

Modified: packages/libhdf4/branches/upstream/current/mfhdf/libsrc/config/netcdf-linux.h
===================================================================
--- packages/libhdf4/branches/upstream/current/mfhdf/libsrc/config/netcdf-linux.h	2007-05-15 09:05:29 UTC (rev 830)
+++ packages/libhdf4/branches/upstream/current/mfhdf/libsrc/config/netcdf-linux.h	2007-05-15 09:53:05 UTC (rev 831)
@@ -15,7 +15,7 @@
  * Unidata, to assist in its use, correction, modification, or enhancement.
  *
  */
-/* "$Id: netcdf-linux.h,v 1.5 1997/11/14 02:44:54 acheng Exp $" */
+/* "$Id: netcdf-linux.h,v 1.9 2004/11/22 18:57:20 epourmal Exp $" */
 
 #ifndef _NETCDF_
 #define _NETCDF_
@@ -304,7 +304,7 @@
  */
 #if defined _CRAYMPP
 typedef short	nclong;
-#elif defined __alpha || (_MIPS_SZLONG == 64)
+#elif defined __alpha || (_MIPS_SZLONG == 64) || defined __ia64 || (defined __sun && defined _LP64) || defined __x86_64__
 typedef int     nclong;   
 #else
 typedef long    nclong;         /* default, compatible type */
@@ -343,6 +343,7 @@
 #define	NC_EXDR		32	/* */
 #define	NC_SYSERR	-1
 
+#include "hdf2netcdf.h"
 extern int ncerr ;
 
 /*
@@ -371,7 +372,6 @@
 #   define	PROTO(x)	()
 #endif
 
-#include "hdf2netcdf.h"
 
 #ifdef __cplusplus
 extern "C" {

Modified: packages/libhdf4/branches/upstream/current/mfhdf/libsrc/config/netcdf-mac.h
===================================================================
--- packages/libhdf4/branches/upstream/current/mfhdf/libsrc/config/netcdf-mac.h	2007-05-15 09:05:29 UTC (rev 830)
+++ packages/libhdf4/branches/upstream/current/mfhdf/libsrc/config/netcdf-mac.h	2007-05-15 09:53:05 UTC (rev 831)
@@ -15,7 +15,7 @@
  * Unidata, to assist in its use, correction, modification, or enhancement.
  *
  */
-/* "$Id: netcdf-mac.h,v 1.5 1997/11/14 02:44:54 acheng Exp $" */
+/* "$Id: netcdf-mac.h,v 1.7 2004/11/22 18:57:21 epourmal Exp $" */
 
 #ifndef _NETCDF_
 #define _NETCDF_
@@ -304,7 +304,7 @@
  */
 #if defined _CRAYMPP
 typedef short	nclong;
-#elif defined __alpha || (_MIPS_SZLONG == 64)
+#elif defined __alpha || (_MIPS_SZLONG == 64) || defined IA64 || (defined __sun && defined _LP64)
 typedef int     nclong;   
 #else
 typedef long    nclong;         /* default, compatible type */
@@ -352,6 +352,7 @@
 #define	NC_FATAL	1
 #define	NC_VERBOSE	2
 
+#include "hdf2netcdf.h"
 extern int ncopts ;	/* default is (NC_FATAL | NC_VERBOSE) */
 
 /*
@@ -371,7 +372,6 @@
 #   define	PROTO(x)	()
 #endif
 
-#include "hdf2netcdf.h"
 
 #ifdef __cplusplus
 extern "C" {

Modified: packages/libhdf4/branches/upstream/current/mfhdf/libsrc/config/netcdf-solaris.h
===================================================================
--- packages/libhdf4/branches/upstream/current/mfhdf/libsrc/config/netcdf-solaris.h	2007-05-15 09:05:29 UTC (rev 830)
+++ packages/libhdf4/branches/upstream/current/mfhdf/libsrc/config/netcdf-solaris.h	2007-05-15 09:53:05 UTC (rev 831)
@@ -15,11 +15,19 @@
  * Unidata, to assist in its use, correction, modification, or enhancement.
  *
  */
-/* "$Id: netcdf-solaris.h,v 1.5 1997/11/14 02:44:55 acheng Exp $" */
+/* "$Id: netcdf-solaris.h,v 1.8 2004/11/22 18:57:22 epourmal Exp $" */
 
 #ifndef _NETCDF_
 #define _NETCDF_
 
+#ifdef __sparcv9
+/*
+ * This header must be included before the _LP64 macro is checked when
+ * compiling for 64-bit libraries. (At least on Solaris 2.8...)
+ */
+#include <stdio.h> 
+#endif  /* __sparcv9 */
+
 #ifdef __MWERKS__
 #ifndef HDF
 #define HDF
@@ -304,7 +312,7 @@
  */
 #if defined _CRAYMPP
 typedef short	nclong;
-#elif defined __alpha || (_MIPS_SZLONG == 64)
+#elif defined __alpha || (_MIPS_SZLONG == 64) || defined IA64 || (defined __sun && defined _LP64)
 typedef int     nclong;   
 #else
 typedef long    nclong;         /* default, compatible type */
@@ -343,6 +351,7 @@
 #define	NC_EXDR		32	/* */
 #define	NC_SYSERR	-1
 
+#include "hdf2netcdf.h"
 extern int ncerr ;
 
 /*
@@ -371,7 +380,6 @@
 #   define	PROTO(x)	()
 #endif
 
-#include "hdf2netcdf.h"
 
 #ifdef __cplusplus
 extern "C" {

Added: packages/libhdf4/branches/upstream/current/mfhdf/libsrc/config/netcdf-solaris64.h
===================================================================
--- packages/libhdf4/branches/upstream/current/mfhdf/libsrc/config/netcdf-solaris64.h	                        (rev 0)
+++ packages/libhdf4/branches/upstream/current/mfhdf/libsrc/config/netcdf-solaris64.h	2007-05-15 09:53:05 UTC (rev 831)
@@ -0,0 +1,595 @@
+/* Generated automatically from netcdf.h.in by configure. */
+/*
+ *	Copyright 1993, University Corporation for Atmospheric Research
+ *
+ *  Permission to use, copy, modify, and distribute this software and its
+ * documentation for any purpose without fee is hereby granted, provided
+ * that the above copyright notice appear in all copies, that both that
+ * copyright notice and this permission notice appear in supporting
+ * documentation, and that the name of UCAR/Unidata not be used in
+ * advertising or publicity pertaining to distribution of the software
+ * without specific, written prior permission.  UCAR makes no
+ * representations about the suitability of this software for any purpose.
+ * It is provided "as is" without express or implied warranty.  It is
+ * provided with no support and without obligation on the part of UCAR
+ * Unidata, to assist in its use, correction, modification, or enhancement.
+ *
+ */
+/* "$Id: netcdf-solaris64.h,v 1.2 2004/11/22 18:57:22 epourmal Exp $" */
+
+#ifndef _NETCDF_
+#define _NETCDF_
+
+/* This header must be included before the _LP64 macro is checked when
+ * compiling for 64-bit libraries. (At least on Solaris 2.8...)
+ */
+#include <stdio.h>
+
+#ifdef __MWERKS__
+#ifndef HDF
+#define HDF
+#endif
+#endif /* __MWERKS__ */
+
+/*
+ * The definitions ncvoid, USE_ENUM, and MAX_NC_OPEN, may need to be set
+ * properly for your installation.
+ */
+
+/*
+ * Argument type in user functions (deprecated, backward compatibility)
+ */
+#ifndef UD_NO_VOID
+#define ncvoid    void
+#else
+/* system doesn't have void type */
+#define ncvoid    char
+#endif
+
+
+/*
+ *   If xdr_enum works properly on your system, you can define 
+ * USE_ENUM so that nc_type is an enum. 
+ * Otherwise, delete this definition so that the nc_type is
+ * an int and the valid values are #defined.
+ */
+#ifndef __MWERKS__
+#define USE_ENUM
+#endif
+
+
+/*
+ * The following macro is provided for backward compatibility only.  If you
+ * are a new user of netCDF, then you may safely ignore it.  If, however,
+ * you have an existing archive of netCDF files that use default
+ * floating-point fill values, then you should know that the definition of
+ * the default floating-point fill values changed with version 2.3 of the
+ * netCDF package.  Prior to this release, the default floating-point fill
+ * values were not very portable:  their correct behavior depended not only
+ * upon the particular platform, but also upon the compilation
+ * environment.  This led to the definition of new, default floating-point
+ * fill values that are portable across all platforms and compilation
+ * environments.  If you wish, however, to obtain the old, non-portable
+ * floating-point fill values, then the following macro should have a true
+ * value PRIOR TO BUILDING THE netCDF LIBRARY.
+ *
+ * Implementation details are contained in the section below on fill values.
+ */
+#define NC_OLD_FILLVALUES	0
+
+/*
+ * 	Fill values
+ * These values are stuffed into newly allocated space as appropriate.
+ * The hope is that one might use these to notice that a particular datum
+ * has not been set.
+ */
+
+#define FILL_BYTE	((char)-127)		/* Largest Negative value */
+#define FILL_CHAR	((char)0)
+#define FILL_SHORT	((short)-32767)
+#define FILL_LONG	((long)-2147483647)
+
+#if !NC_OLD_FILLVALUES
+
+#   define FILL_FLOAT	9.9692099683868690e+36 /* near 15 * 2^119 */
+#   define FILL_DOUBLE	9.9692099683868690e+36
+
+#else	/* NC_OLD_FILLVALUES below */
+
+/*
+ * This section is provided for backward compatibility only.  Using
+ * XDR infinities for floating-point fill values has caused more problems
+ * than it has solved.  We encourage you to define your own data-specific
+ * fill values rather than use default ones (see `_FillValue' below).
+ * If, however, you *must* use default fill values, then you should use
+ * the above fill values rather than the ones in this section.
+ */
+
+/*
+ * XDR_F_INFINITY is a float value whose EXTERNAL (xdr)
+ * represention is ieee floating infinity.
+ * XDR_D_INFINITY is a double value whose EXTERNAL (xdr)
+ * represention is ieee double floating point infinity.
+ * These are used as default fill values below.
+ *
+ * This section shows three techniques for setting these:
+ *  Direct assignment (vax, cray) - works for non IEEE machines
+ *		Doesn't work when IEEE machines don't allow
+ *      float or double constants whose values are infinity.
+ *  Use of a union (preferred portable method) - should work on
+ *      any ANSI compiler with IEEE floating point representations,
+ *      modulo byte order and sizeof() considerations.
+ *  Use of pointer puns - may work with many older compilers
+ *      which don't allow intialization of unions.
+ *      Often doesn't work with compilers which have strict
+ *      alignment rules.
+ */ 
+
+    /* Direct assignment. All cases should be mutually exclusive */
+
+#ifdef vax
+#define	XDR_D_INFINITY	1.7014118346046923e+38
+#define	XDR_F_INFINITY	1.70141173e+38
+#endif /* vax */
+
+#ifdef cray
+#define	XDR_D_INFINITY	1.797693134862313000e+308
+#define	XDR_F_INFINITY	XDR_D_INFINITY
+#endif /* cray */
+
+#ifdef notdef /* you might want to try these, on an IEEE machine */
+#define XDR_D_INFINITY	1.797693134862315900e+308
+#define XDR_F_INFINITY	3.40282357e+38
+#endif
+
+#ifdef __STDC__
+    /* Use of a union, assumes IEEE representation and 1 byte unsigned char */
+
+#ifndef    XDR_D_INFINITY
+#define USE_D_UNION
+     union xdr_d_union {unsigned char bb[8]; double dd;} ;
+     extern union xdr_d_union xdr_d_infs ;  /* instantiated in array.c */
+#define XDR_D_INFINITY    (xdr_d_infs.dd)
+#endif /* !XDR_D_INFINITY */
+
+#ifndef    XDR_F_INFINITY
+#define USE_F_UNION
+     union xdr_f_union {unsigned char bb[4]; float ff;} ;
+     extern union xdr_f_union xdr_f_infs ;  /* instantiated in array.c */
+#define  XDR_F_INFINITY    (xdr_f_infs.ff)
+#endif /* !XDR_F_INFINITY */
+
+
+#else /* __STDC__ */
+    /* Use of a pointer pun, assumes IEEE representation, 4 byte long */
+
+#ifndef    XDR_D_INFINITY
+#define USE_D_LONG_PUN
+     extern long xdr_d_infinity[] ;  /* instantiated in array.c */
+#define XDR_D_INFINITY *(double *)xdr_d_infinity
+#endif /* !XDR_D_INFINITY */
+
+#ifndef    XDR_F_INFINITY
+#define USE_F_LONG_PUN
+     extern long xdr_f_infinity ;  /* instantiated in array.c */
+#define XDR_F_INFINITY *((float *)&xdr_f_infinity)
+#endif /* !XDR_F_INFINITY */
+
+#endif /* __STDC__ */
+
+/* End of INFINITY           section */
+
+#define FILL_FLOAT	XDR_F_INFINITY	/* IEEE Infinity */
+#define FILL_DOUBLE	XDR_D_INFINITY
+
+#endif	/* NC_OLD_FILLVALUES above */
+
+
+/*
+ *  masks for the struct NC flags field; passed in as 'mode' arg to
+ * nccreate and ncopen.
+ *
+ */
+#define NC_RDWR  1		/* read/write, 0 => readonly */
+#define NC_CREAT 2		/* in create phase, cleared by ncendef */
+#define NC_EXCL  4		/* on create, don't destroy existing file */
+#define NC_INDEF 8		/* in define mode, cleared by ncendef */
+#define NC_NSYNC 0x10	/* synchronise numrecs on change */
+#define NC_HSYNC 0x20	/* synchronise whole header on change */
+#define NC_NDIRTY 0x40	/* numrecs has changed */
+#define NC_HDIRTY 0x80  /* header info has changed */
+#define NC_NOFILL 0x100	/* Don't fill vars on endef and increase of record */
+#define NC_LINK 0x8000	/* isa link */
+
+#define NC_FILL 0	/* argument to ncsetfill to clear NC_NOFILL */
+
+/*
+ * 'mode' arguments for nccreate and ncopen
+ */
+#define NC_NOWRITE   0
+#define NC_WRITE     NC_RDWR
+#define NC_CLOBBER   (NC_INDEF | NC_CREAT | NC_RDWR)
+#define NC_NOCLOBBER (NC_INDEF | NC_EXCL | NC_CREAT | NC_RDWR)
+
+/*
+ * 'size' argument to ncdimdef for an unlimited dimension
+ */
+#define NC_UNLIMITED 0L
+
+/*
+ * attribute id to put/get a global attribute
+ */
+#define NC_GLOBAL -1
+
+#ifndef HDF
+/*
+ * This can be as large as the maximum number of stdio streams
+ * you can have open on your system.
+ */
+#define MAX_NC_OPEN 32
+
+/*
+ * These maximums are enforced by the interface, to facilitate writing
+ * applications and utilities.  However, nothing is statically allocated to
+ * these sizes internally.
+ */
+#define MAX_NC_DIMS 5000	 /* max dimensions per file */
+#define MAX_NC_ATTRS 3000	 /* max global or per variable attributes */
+#define MAX_NC_VARS 5000	 /* max variables per file */
+#define MAX_NC_NAME 256		 /* max length of a name */
+#define MAX_VAR_DIMS 32          /* max per variable dimensions */
+
+/*
+ * Added feature. 
+ * If you wish a variable to use a different value than the above
+ * defaults, create an attribute with the same type as the variable
+ * and the following reserved name. The value you give the attribute
+ * will be used as the fill value for that variable.
+ */
+#define _FillValue	"_FillValue"
+
+#else /* HDF */
+
+#include "hlimits.h"  /* Hard coded constants for HDF library */
+
+#endif /* HDF */
+
+#ifdef USE_ENUM
+/*
+ *  The netcdf data types
+ */
+typedef enum {
+	NC_UNSPECIFIED, /* private */
+	NC_BYTE,
+	NC_CHAR,
+	NC_SHORT,
+	NC_LONG,
+	NC_FLOAT,
+	NC_DOUBLE,
+	/* private */
+	NC_BITFIELD,
+	NC_STRING,
+	NC_IARRAY,
+	NC_DIMENSION,
+	NC_VARIABLE,
+	NC_ATTRIBUTE
+} nc_type ;
+#else
+typedef int nc_type ;
+#define	NC_UNSPECIFIED 0 /* private */
+#define	NC_BYTE 1
+#define	NC_CHAR 2
+#define	NC_SHORT 3
+#define	NC_LONG 4
+#define	NC_FLOAT 5
+#define	NC_DOUBLE 6
+	/* private */
+#define	NC_BITFIELD 7
+#define	NC_STRING 8
+#define	NC_IARRAY 9
+#define	NC_DIMENSION 10
+#define	NC_VARIABLE 11
+#define	NC_ATTRIBUTE 12
+#endif
+
+
+/*
+ * C data types corresponding to netCDF data types:
+ */
+/* Don't use these or the C++ interface gets confused
+typedef char  ncchar;
+typedef char  ncbyte;
+typedef short ncshort;
+typedef float ncfloat;
+typedef double        ncdouble;
+*/
+
+/* 
+ * Variables/attributes of type NC_LONG should use the C type 'nclong'
+ */
+#if defined _CRAYMPP
+typedef short	nclong;
+#elif defined __alpha || (_MIPS_SZLONG == 64) || defined IA64 || (defined __sun && defined _LP64)
+typedef int     nclong;   
+#else
+typedef long    nclong;         /* default, compatible type */
+#endif
+
+
+/*
+ * Global netcdf error status variable
+ *  Initialized in error.c
+ */
+#define	NC_NOERR	0	/* No Error */
+#define	NC_EBADID	1	/* Not a netcdf id */
+#define	NC_ENFILE	2	/* Too many netcdfs open */
+#define	NC_EEXIST	3	/* netcdf file exists && NC_NOCLOBBER */
+#define	NC_EINVAL	4	/* Invalid Argument */
+#define	NC_EPERM	5	/* Write to read only */
+#define	NC_ENOTINDEFINE	6	/* Operation not allowed in data mode */
+#define	NC_EINDEFINE	7	/* Operation not allowed in define mode */
+#define	NC_EINVALCOORDS	8	/* Coordinates out of Domain */
+#define	NC_EMAXDIMS	9	/* MAX_NC_DIMS exceeded */
+#define	NC_ENAMEINUSE	10	/* String match to name in use */
+#define NC_ENOTATT	11	/* Attribute not found */
+#define	NC_EMAXATTS	12	/* MAX_NC_ATTRS exceeded */
+#define NC_EBADTYPE	13	/* Not a netcdf data type */
+#define NC_EBADDIM	14	/* Invalid dimension id */
+#define NC_EUNLIMPOS	15	/* NC_UNLIMITED in the wrong index */
+#define	NC_EMAXVARS	16	/* MAX_NC_VARS exceeded */
+#define NC_ENOTVAR	17	/* Variable not found */
+#define NC_EGLOBAL	18	/* Action prohibited on NC_GLOBAL varid */
+#define NC_ENOTNC	19	/* Not a netcdf file */
+#define NC_ESTS         20      /* In Fortran, string too short */
+#define NC_EMAXNAME     21      /* MAX_NC_NAME exceeded */
+#define NC_ENTOOL       NC_EMAXNAME   /* Backward compatibility */
+#define NC_EUNLIMIT     22      /* NC_UNLIMITED size already in use */
+
+#define	NC_EXDR		32	/* */
+#define	NC_SYSERR	-1
+
+#include "hdf2netcdf.h"
+extern int ncerr ;
+
+/*
+ * Global options variable. Used to determine behavior of error handler.
+ *  Initialized in lerror.c
+ */
+#define	NC_FATAL	1
+#define	NC_VERBOSE	2
+
+extern int ncopts ;	/* default is (NC_FATAL | NC_VERBOSE) */
+
+/*
+ * NB: The following feature-test line is too long in order to accomodate a 
+ * bug in the VMS 5.3 C compiler.
+ */
+#ifndef HAVE_PROTOTYPES
+#   if defined(__STDC__) || defined(__GNUC__) || defined(__cplusplus) || defined(c_plusplus)
+#       define	HAVE_PROTOTYPES
+#   endif
+#endif
+
+#undef PROTO
+#ifdef HAVE_PROTOTYPES 
+#   define	PROTO(x)	x
+#else
+#   define	PROTO(x)	()
+#endif
+
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+extern int nccreate	PROTO((
+    const char*	path,
+    int		cmode
+));
+extern int ncopen	PROTO((
+    const char*	path,
+    int		mode
+));
+extern int ncredef	PROTO((
+    int		cdfid
+));
+extern int ncendef	PROTO((
+    int		cdfid
+));
+extern int ncclose	PROTO((
+    int		cdfid
+));
+extern int ncinquire	PROTO((
+    int		cdfid,
+    int*	ndims,
+    int*	nvars,
+    int*	natts, 
+    int*	recdim
+));
+extern int ncsync	PROTO((
+    int		cdfid
+));
+extern int ncabort	PROTO((
+    int		cdfid
+));
+extern int ncnobuf	PROTO((
+    int		cdfid
+));
+extern int ncdimdef	PROTO((
+    int		cdfid,
+    const char*	name,
+    long	length
+));
+extern int ncdimid	PROTO((
+    int		cdfid,
+    const char*	name
+));
+extern int ncdiminq	PROTO((
+    int		cdfid,
+    int		dimid,
+    char*	name,
+    long*	length
+));
+extern int ncdimrename	PROTO((
+    int		cdfid,
+    int		dimid,
+    const char*	name
+));
+extern int ncvardef	PROTO((
+    int		cdfid,
+    const char*	name,
+    nc_type	datatype, 
+    int		ndims,
+    const int*	dim
+));
+extern int ncvarid	PROTO((
+    int		cdfid,
+    const char*	name
+));
+extern int ncvarinq	PROTO((
+    int		cdfid,
+    int		varid,
+    char*	name,
+    nc_type*	datatype,
+    int*	ndims,
+    int*	dim,
+    int*	natts
+));
+extern int ncvarput1	PROTO((
+    int		cdfid,
+    int		varid,
+    const long*	coords,
+    const void*	value
+));
+extern int ncvarget1	PROTO((
+    int		cdfid,
+    int		varid,
+    const long*	coords,
+    void*	value
+));
+extern int ncvarput	PROTO((
+    int		cdfid,
+    int		varid,
+    const long*	start,
+    const long*	count, 
+    void*	value
+));
+extern int ncvarget	PROTO((
+    int		cdfid,
+    int		varid,
+    const long*	start,
+    const long*	count, 
+    void*	value
+));
+extern int ncvarputs	PROTO((
+    int		cdfid,
+    int		varid,
+    const long*	start,
+    const long*	count,
+    const long*	stride,
+    void*	values
+));
+extern int ncvargets	PROTO((
+    int		cdfid,
+    int		varid,
+    const long*	start,
+    const long*	count,
+    const long*	stride,
+    void*	values
+));
+extern int ncvarputg	PROTO((
+    int		cdfid,
+    int		varid,
+    const long*	start,
+    const long*	count,
+    const long*	stride,
+    const long*	imap,
+    void* values
+));
+extern int ncvargetg	PROTO((
+    int		cdfid,
+    int		varid,
+    const long*	start,
+    const long*	count,
+    const long*	stride,
+    const long*	imap,
+    void*	values
+));
+extern int ncvarrename	PROTO((
+    int		cdfid,
+    int		varid,
+    const char*	name
+));
+extern int ncattput	PROTO((
+    int		cdfid,
+    int		varid,
+    const char*	name, 
+    nc_type	datatype,
+    int		len,
+    const void*	value
+));
+extern int ncattinq	PROTO((
+    int		cdfid,
+    int		varid,
+    const char*	name, 
+    nc_type*	datatype,
+    int*	len
+));
+extern int ncattget	PROTO((
+    int		cdfid,
+    int		varid,
+    const char*	name, 
+    void*	value
+));
+extern int ncattcopy	PROTO((
+    int		incdf,
+    int		invar,
+    const char*	name, 
+    int		outcdf,
+    int		outvar
+));
+extern int ncattname	PROTO((
+    int		cdfid,
+    int		varid,
+    int		attnum,
+    char*	name
+));
+extern int ncattrename	PROTO((
+    int		cdfid,
+    int		varid,
+    const char*	name, 
+    const char*	newname
+));
+extern int ncattdel	PROTO((
+    int		cdfid,
+    int		varid,
+    const char*	name
+));
+extern int nctypelen	PROTO((
+    nc_type	datatype
+));
+extern int ncsetfill	PROTO((
+    int		cdfid,
+    int		fillmode
+));
+extern int ncrecinq		PROTO((
+    int		cdfid,
+    int*	nrecvars,
+    int*	recvarids,
+    long*	recsizes
+));
+extern int ncrecget		PROTO((
+    int		cdfid,
+    long	recnum,
+    void**	datap
+));
+extern int ncrecput		PROTO((
+    int		cdfid,
+    long	recnum,
+    void* * datap
+));
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* _NETCDF_ */

Modified: packages/libhdf4/branches/upstream/current/mfhdf/libsrc/config/netcdf-solarisx86.h
===================================================================
--- packages/libhdf4/branches/upstream/current/mfhdf/libsrc/config/netcdf-solarisx86.h	2007-05-15 09:05:29 UTC (rev 830)
+++ packages/libhdf4/branches/upstream/current/mfhdf/libsrc/config/netcdf-solarisx86.h	2007-05-15 09:53:05 UTC (rev 831)
@@ -15,7 +15,7 @@
  * Unidata, to assist in its use, correction, modification, or enhancement.
  *
  */
-/* "$Id: netcdf-solarisx86.h,v 1.5 1997/11/14 02:44:56 acheng Exp $" */
+/* "$Id: netcdf-solarisx86.h,v 1.7 2004/11/22 18:57:23 epourmal Exp $" */
 
 #ifndef _NETCDF_
 #define _NETCDF_
@@ -304,7 +304,7 @@
  */
 #if defined _CRAYMPP
 typedef short	nclong;
-#elif defined __alpha || (_MIPS_SZLONG == 64)
+#elif defined __alpha || (_MIPS_SZLONG == 64) || defined IA64 || (defined __sun && defined _LP64)
 typedef int     nclong;   
 #else
 typedef long    nclong;         /* default, compatible type */
@@ -343,6 +343,7 @@
 #define	NC_EXDR		32	/* */
 #define	NC_SYSERR	-1
 
+#include "hdf2netcdf.h"
 extern int ncerr ;
 
 /*
@@ -371,7 +372,6 @@
 #   define	PROTO(x)	()
 #endif
 
-#include "hdf2netcdf.h"
 
 #ifdef __cplusplus
 extern "C" {

Modified: packages/libhdf4/branches/upstream/current/mfhdf/libsrc/config/netcdf-sun.h
===================================================================
--- packages/libhdf4/branches/upstream/current/mfhdf/libsrc/config/netcdf-sun.h	2007-05-15 09:05:29 UTC (rev 830)
+++ packages/libhdf4/branches/upstream/current/mfhdf/libsrc/config/netcdf-sun.h	2007-05-15 09:53:05 UTC (rev 831)
@@ -15,7 +15,7 @@
  * Unidata, to assist in its use, correction, modification, or enhancement.
  *
  */
-/* "$Id: netcdf-sun.h,v 1.5 1997/11/14 02:44:56 acheng Exp $" */
+/* "$Id: netcdf-sun.h,v 1.7 2004/11/22 18:57:24 epourmal Exp $" */
 
 #ifndef _NETCDF_
 #define _NETCDF_
@@ -304,7 +304,7 @@
  */
 #if defined _CRAYMPP
 typedef short	nclong;
-#elif defined __alpha || (_MIPS_SZLONG == 64)
+#elif defined __alpha || (_MIPS_SZLONG == 64) || defined IA64 || (defined __sun && defined _LP64)
 typedef int     nclong;   
 #else
 typedef long    nclong;         /* default, compatible type */
@@ -343,6 +343,7 @@
 #define	NC_EXDR		32	/* */
 #define	NC_SYSERR	-1
 
+#include "hdf2netcdf.h"
 extern int ncerr ;
 
 /*
@@ -371,7 +372,6 @@
 #   define	PROTO(x)	()
 #endif
 
-#include "hdf2netcdf.h"
 
 #ifdef __cplusplus
 extern "C" {

Modified: packages/libhdf4/branches/upstream/current/mfhdf/libsrc/config/netcdf-t3e.h
===================================================================
--- packages/libhdf4/branches/upstream/current/mfhdf/libsrc/config/netcdf-t3e.h	2007-05-15 09:05:29 UTC (rev 830)
+++ packages/libhdf4/branches/upstream/current/mfhdf/libsrc/config/netcdf-t3e.h	2007-05-15 09:53:05 UTC (rev 831)
@@ -15,7 +15,7 @@
  * Unidata, to assist in its use, correction, modification, or enhancement.
  *
  */
-/* "$Id: netcdf-t3e.h,v 1.3 1997/11/14 02:44:57 acheng Exp $" */
+/* "$Id: netcdf-t3e.h,v 1.5 2004/11/22 18:57:24 epourmal Exp $" */
 
 #ifndef _NETCDF_
 #define _NETCDF_
@@ -304,7 +304,7 @@
  */
 #if defined _CRAYMPP
 typedef short	nclong;
-#elif defined __alpha || (_MIPS_SZLONG == 64)
+#elif defined __alpha || (_MIPS_SZLONG == 64) || defined IA64 || (defined __sun && defined _LP64)
 typedef int     nclong;   
 #else
 typedef long    nclong;         /* default, compatible type */
@@ -343,6 +343,7 @@
 #define	NC_EXDR		32	/* */
 #define	NC_SYSERR	-1
 
+#include "hdf2netcdf.h"
 extern int ncerr ;
 
 /*
@@ -371,7 +372,6 @@
 #   define	PROTO(x)	()
 #endif
 
-#include "hdf2netcdf.h"
 
 #ifdef __cplusplus
 extern "C" {

Modified: packages/libhdf4/branches/upstream/current/mfhdf/libsrc/config/netcdf-unicos.h
===================================================================
--- packages/libhdf4/branches/upstream/current/mfhdf/libsrc/config/netcdf-unicos.h	2007-05-15 09:05:29 UTC (rev 830)
+++ packages/libhdf4/branches/upstream/current/mfhdf/libsrc/config/netcdf-unicos.h	2007-05-15 09:53:05 UTC (rev 831)
@@ -15,7 +15,7 @@
  * Unidata, to assist in its use, correction, modification, or enhancement.
  *
  */
-/* "$Id: netcdf-unicos.h,v 1.5 1997/11/14 02:44:58 acheng Exp $" */
+/* "$Id: netcdf-unicos.h,v 1.7 2004/11/22 18:57:25 epourmal Exp $" */
 
 #ifndef _NETCDF_
 #define _NETCDF_
@@ -304,7 +304,7 @@
  */
 #if defined _CRAYMPP
 typedef short	nclong;
-#elif defined __alpha || (_MIPS_SZLONG == 64)
+#elif defined __alpha || (_MIPS_SZLONG == 64) || defined IA64 || (defined __sun && defined _LP64)
 typedef int     nclong;   
 #else
 typedef long    nclong;         /* default, compatible type */
@@ -343,6 +343,7 @@
 #define	NC_EXDR		32	/* */
 #define	NC_SYSERR	-1
 
+#include "hdf2netcdf.h"
 extern int ncerr ;
 
 /*
@@ -371,7 +372,6 @@
 #   define	PROTO(x)	()
 #endif
 
-#include "hdf2netcdf.h"
 
 #ifdef __cplusplus
 extern "C" {

Modified: packages/libhdf4/branches/upstream/current/mfhdf/libsrc/config/netcdf-vms.h
===================================================================
--- packages/libhdf4/branches/upstream/current/mfhdf/libsrc/config/netcdf-vms.h	2007-05-15 09:05:29 UTC (rev 830)
+++ packages/libhdf4/branches/upstream/current/mfhdf/libsrc/config/netcdf-vms.h	2007-05-15 09:53:05 UTC (rev 831)
@@ -15,7 +15,7 @@
  * Unidata, to assist in its use, correction, modification, or enhancement.
  *
  */
-/* "$Id: netcdf-vms.h,v 1.5 1997/11/14 02:44:58 acheng Exp $" */
+/* "$Id: netcdf-vms.h,v 1.7 2004/11/22 18:57:26 epourmal Exp $" */
 
 #ifndef _NETCDF_
 #define _NETCDF_
@@ -304,7 +304,7 @@
  */
 #if defined _CRAYMPP
 typedef short	nclong;
-#elif defined __alpha || (_MIPS_SZLONG == 64)
+#elif defined __alpha || (_MIPS_SZLONG == 64) || defined IA64 || (defined __sun && defined _LP64)
 typedef int     nclong;   
 #else
 typedef long    nclong;         /* default, compatible type */
@@ -343,6 +343,7 @@
 #define	NC_EXDR		32	/* */
 #define	NC_SYSERR	-1
 
+#include "hdf2netcdf.h"
 extern int ncerr ;
 
 /*
@@ -371,7 +372,6 @@
 #   define	PROTO(x)	()
 #endif
 
-#include "hdf2netcdf.h"
 
 #ifdef __cplusplus
 extern "C" {

Modified: packages/libhdf4/branches/upstream/current/mfhdf/libsrc/hdf2netcdf.h
===================================================================
--- packages/libhdf4/branches/upstream/current/mfhdf/libsrc/hdf2netcdf.h	2007-05-15 09:05:29 UTC (rev 830)
+++ packages/libhdf4/branches/upstream/current/mfhdf/libsrc/hdf2netcdf.h	2007-05-15 09:53:05 UTC (rev 831)
@@ -1,4 +1,4 @@
-/* $Id: hdf2netcdf.h,v 1.1 1996/05/07 22:13:01 acheng Exp $ */
+/* $Id: hdf2netcdf.h,v 1.2 2004/11/22 18:57:08 epourmal Exp $ */
 
 /* If we disable the HDF version of the netCDF API (ncxxx interface)
    (-DHAVE_NETCDF) we need to rename all the relevant function names 
@@ -14,6 +14,8 @@
    need to mangle the HDF versions of netCDF API function names 
    to not conflict w/ oriinal netCDF ones */
 #ifdef HAVE_NETCDF
+#define ncerr     HNAME(ncerr)
+#define ncopts    HNAME(ncopts)
 #define nccreate  HNAME(nccreate)
 #define ncopen    HNAME(ncopen)
 #define ncredef   HNAME(ncredef)

Modified: packages/libhdf4/branches/upstream/current/mfhdf/libsrc/hdftest.c
===================================================================
--- packages/libhdf4/branches/upstream/current/mfhdf/libsrc/hdftest.c	2007-05-15 09:05:29 UTC (rev 830)
+++ packages/libhdf4/branches/upstream/current/mfhdf/libsrc/hdftest.c	2007-05-15 09:53:05 UTC (rev 831)
@@ -11,10 +11,10 @@
  ****************************************************************************/
 
 #ifdef RCSID
-static char RcsId[] = "@(#)$Revision: 1.57 $";
+static char RcsId[] = "@(#)$Revision: 1.73 $";
 #endif
 
-/* $Id: hdftest.c,v 1.57 1999/02/25 08:18:07 bmribler Exp $ */
+/* $Id: hdftest.c,v 1.73 2005/02/11 06:07:58 bmribler Exp $ */
 
 #include "mfhdf.h"
 
@@ -24,14 +24,8 @@
 
 #ifdef HDF
 
-/* Macro to check status value and print error message */
-#define CHECK(status, fail_value, name) {if(status == fail_value) { \
-    printf("*** Routine %s FAILED at line %d ***\n", name, __LINE__); num_err++;}}
-/* BMR - 2/21/99: added macro VERIFY to use in testing SDcheckempty */
-#define VERIFY(item, value, test_name) {if(item != value) { \
-    printf("*** UNEXPECTED VALUE from %s is %ld at line %4d in %s\n", test_name, (long)item,(int)__LINE__,__FILE__); num_err++;}}
+#include "hdftest.h"
 
-
 #define UFOFILE   "file.UFO"	/* non-existing file */
 #define FILE1     "test1.hdf"
 #define FILE2     "test2.hdf"
@@ -205,6 +199,11 @@
         { 110, 111, 112, 113},
         { 120, 121, 122, 123}}};
 
+extern int test_szip_compression();
+extern int test_checkempty();
+extern int test_idtest();
+extern int test_sd();
+
 static intn
 test_chunk()
 {
@@ -223,6 +222,8 @@
     uint16  fill_u16 = 0;        /* fill value */
     HDF_CHUNK_DEF chunk_def;     /* Chunk defintion set */ 
     HDF_CHUNK_DEF rchunk_def;    /* Chunk defintion read */ 
+    comp_coder_t comp_type;      /* to retrieve compression type into */
+    comp_info cinfo;             /* compression information structure */
     int32   cflags;              /* chunk flags */
     int32   index;       /* Index of dataset in file */
     intn    status;      /* status flag */
@@ -231,7 +232,7 @@
     int32   idata[100];
     int32   rdata[100];
     float32 max;
-    int     num_err = 0;    /* number of errors so far */
+    int     num_errs = 0;    /* number of errors so far */
 
     /* Create file 'chktst.hdf' */
     fchk = SDstart(CHKFILE, DFACC_CREATE);
@@ -247,7 +248,7 @@
     if(newsds8 == FAIL) 
       {
         fprintf(stderr, "Chunk Test 1. Failed to create a new data set \n");
-        num_err++;
+        num_errs++;
         goto test2;
       }
 
@@ -264,7 +265,7 @@
     if(status == FAIL) 
       {
         fprintf(stderr, "Chunk Test 1. Failed to create new chunked data set\n");
-        num_err++;
+        num_errs++;
         goto test2;
       }
 
@@ -273,7 +274,7 @@
     if(status == FAIL) 
       {
         fprintf(stderr, "Chunk Test 1. SDsetchunkcache failed\n");
-        num_err++;
+        num_errs++;
         goto test2;
       }
 
@@ -287,7 +288,7 @@
     if(status == FAIL) 
       {
         fprintf(stderr, "Chunk Test 1. Failed to write u16_2data to new chunked data set\n");
-        num_err++;
+        num_errs++;
         goto test2;
       }
 
@@ -309,7 +310,7 @@
                     fprintf(stderr,"u16_cdata[%d][%d]=%d,",
                             i,j,u16_2data[i][j]);
                     fprintf(stderr,"\n");
-                    num_err++;
+                    num_errs++;
                 }
           }
       }
@@ -318,7 +319,7 @@
     if(status == FAIL) 
       {
         fprintf(stderr, "Chunk Test 1. SDgetchunkinfo failed \n");
-        num_err++;
+        num_errs++;
         goto test2;
       }
 
@@ -328,7 +329,7 @@
     if (cdims[0] != rcdims[0] || cdims[1] != rcdims[1] || cflags != HDF_CHUNK)
       {
         fprintf(stderr, "Chunk Test 1. SDgetchunkinfo returned wrong values\n");
-        num_err++;
+        num_errs++;
         goto test2;
       }
 
@@ -350,7 +351,7 @@
     if(newsds7 == FAIL) 
       {
         fprintf(stderr, "Chunk Test 2. Failed to create a new data set \n");
-        num_err++;
+        num_errs++;
         goto test3;
       }
 
@@ -367,7 +368,7 @@
     if(status == FAIL) 
       {
         fprintf(stderr, "Chunk Test 2. Failed to create new chunked data set\n");
-        num_err++;
+        num_errs++;
         goto test3;
       }
 
@@ -376,7 +377,7 @@
     if(status == FAIL) 
       {
         fprintf(stderr, "Chunk Test 2.SDsetchunkcache failed\n");
-        num_err++;
+        num_errs++;
         goto test3;
       }
 
@@ -389,7 +390,7 @@
     if(status == FAIL) 
       {
         fprintf(stderr, "Chunk Test 2.SDwritechunk failed to write chunk 1\n");
-        num_err++;
+        num_errs++;
         goto test3;
       }
 
@@ -400,7 +401,7 @@
     if(status == FAIL) 
       {
         fprintf(stderr, "Chunk Test 2.SDwritechunk failed to write chunk 4\n");
-        num_err++;
+        num_errs++;
         goto test3;
       }
 
@@ -411,7 +412,7 @@
     if(status == FAIL) 
       {
         fprintf(stderr, "Chunk Test 2.SDwritechunk failed to write chunk 2\n");
-        num_err++;
+        num_errs++;
         goto test3;
       }
 
@@ -422,7 +423,7 @@
     if(status == FAIL) 
       {
         fprintf(stderr, "Chunk Test 2.SDwritechunk failed to write chunk 5\n");
-        num_err++;
+        num_errs++;
         goto test3;
       }
 
@@ -433,7 +434,7 @@
     if(status == FAIL) 
       {
         fprintf(stderr, "Chunk Test 2.SDwritechunk failed to write chunk 3\n");
-        num_err++;
+        num_errs++;
         goto test3;
       }
 
@@ -444,7 +445,7 @@
      if(status == FAIL) 
       {
         fprintf(stderr, "Chunk Test 2.SDwritechunk failed to write chunk 6\n");
-        num_err++;
+        num_errs++;
         goto test3;
       }
 
@@ -471,7 +472,7 @@
                     fprintf(stderr,"u16_2cdata[%d][%d]=%d,",
                             i,j,u16_2cdata[i][j]);
                     fprintf(stderr,"\n");
-                    num_err++;
+                    num_errs++;
                 }
           }
       }
@@ -480,7 +481,7 @@
     if(status == FAIL) 
       {
         fprintf(stderr, "Chunk Test 2.SDgetchunkinfo failed \n");
-        num_err++;
+        num_errs++;
         goto test3;
       }
 
@@ -490,7 +491,7 @@
     if (cdims[0] != rcdims[0] || cdims[1] != rcdims[1] || cflags != HDF_CHUNK)
       {
         fprintf(stderr, "Chunk Test 2.SDgetchunkinfo returned wrong values\n");
-        num_err++;
+        num_errs++;
         goto test3;
       }
 
@@ -512,7 +513,7 @@
     if(newsds4 == FAIL) 
       {
         fprintf(stderr, "Chunk Test 3. Failed to create a new 3D float32 data set \n");
-        num_err++;
+        num_errs++;
         goto test4;
       }
 
@@ -528,7 +529,7 @@
     if(status == FAIL) 
       {
         fprintf(stderr, "Chunk Test 3. Failed to create new chunked data set\n");
-        num_err++;
+        num_errs++;
         goto test4;
       }
 
@@ -543,7 +544,7 @@
     if(status == FAIL) 
       {
         fprintf(stderr, "Chunk Test 3. Failed to write f32_data to new chunked data set\n");
-        num_err++;
+        num_errs++;
         goto test4;
       }
 
@@ -570,7 +571,7 @@
                         fprintf(stderr,"f32_data[%d][%d][%d]=%f,",
                                 i,j,k,f32_data[i][j][k]);
                         fprintf(stderr,"\n");
-                        num_err++;
+                        num_errs++;
                     }
               }
           }
@@ -593,7 +594,7 @@
     if(newsds5 == FAIL) 
       {
         fprintf(stderr, "Chunk Test 4. Failed to set a new uint16 3D data set chunked\n");
-        num_err++;
+        num_errs++;
         goto test5;
       }
 
@@ -610,7 +611,7 @@
     if(status == FAIL) 
       {
         fprintf(stderr, "Chunk Test 4. Failed to create new chunked data set\n");
-        num_err++;
+        num_errs++;
         goto test5;
       }
 
@@ -619,7 +620,7 @@
     if(status == FAIL) 
       {
         fprintf(stderr, "Chunk Test 4. SDsetchunkcache failed\n");
-        num_err++;
+        num_errs++;
         goto test5;
       }
 
@@ -634,7 +635,7 @@
     if(status == FAIL) 
       {
         fprintf(stderr, "Chunk Test 4. Failed to write u16_data to new chunked data set\n");
-        num_err++;
+        num_errs++;
         goto test5;
       }
 
@@ -660,7 +661,7 @@
                         fprintf(stderr,"u16_data[%d][%d][%d]=%d,",
                                 i,j,k,u16_data[i][j][k]);
                         fprintf(stderr,"\n");
-                        num_err++;
+                        num_errs++;
                     }
               }
           }
@@ -670,7 +671,7 @@
     if(status == FAIL) 
       {
         fprintf(stderr, "Chunk Test 4. SDgetchunkinfo failed \n");
-        num_err++;
+        num_errs++;
         goto test5;
       }
 
@@ -680,7 +681,7 @@
         || cflags != HDF_CHUNK)
       {
         fprintf(stderr, "Chunk Test 4. SDgetchunkinfo returned wrong values\n");
-        num_err++;
+        num_errs++;
         goto test5;
       }
 
@@ -701,7 +702,7 @@
     if(newsds6 == FAIL) 
       {
         fprintf(stderr, "Chunk Test 5. Failed to set a new uint8 3D data set chunked\n");
-        num_err++;
+        num_errs++;
         goto test6;
       }
 
@@ -713,7 +714,7 @@
     if(status == FAIL) 
       {
         fprintf(stderr, "Chunk Test 5. Failed to create new chunked data set\n");
-        num_err++;
+        num_errs++;
         goto test6;
       }
 
@@ -729,7 +730,7 @@
     if(status == FAIL) 
       {
         fprintf(stderr, "Chunk Test 5. Failed to write wu8_data to new chunked data set\n");
-        num_err++;
+        num_errs++;
         goto test6;
       }
 #endif
@@ -742,7 +743,7 @@
     if(status == FAIL) 
       {
         fprintf(stderr, "Chunk Test 5. SDwritechunk failed to write chunk 1\n");
-        num_err++;
+        num_errs++;
         goto test6;
       }
 
@@ -753,7 +754,7 @@
     if(status == FAIL) 
       {
         fprintf(stderr, "Chunk Test 5. SDwritechunk failed to write chunk 4\n");
-        num_err++;
+        num_errs++;
         goto test6;
       }
 
@@ -764,7 +765,7 @@
     if(status == FAIL) 
       {
         fprintf(stderr, "Chunk Test 5. SDwritechunk failed to write chunk 2\n");
-        num_err++;
+        num_errs++;
         goto test6;
       }
 
@@ -775,7 +776,7 @@
     if(status == FAIL) 
       {
         fprintf(stderr, "Chunk Test 5. SDwritechunk failed to write chunk 5\n");
-        num_err++;
+        num_errs++;
         goto test6;
       }
 
@@ -786,7 +787,7 @@
     if(status == FAIL) 
       {
         fprintf(stderr, "Chunk Test 5. SDwritechunk failed to write chunk 3\n");
-        num_err++;
+        num_errs++;
         goto test6;
       }
 
@@ -797,7 +798,7 @@
     if(status == FAIL) 
       {
         fprintf(stderr, "Chunk Test 5. SDwritechunk failed to write chunk 6\n");
-        num_err++;
+        num_errs++;
         goto test6;
       }
 
@@ -823,7 +824,7 @@
                         fprintf(stderr,"u8_data[%d][%d][%d]=%d,",
                                 i,j,k,u8_data[i][j][k]);
                         fprintf(stderr,"\n");
-                        num_err++;
+                        num_errs++;
                     }
               }
           }
@@ -836,7 +837,7 @@
     if(status == FAIL) 
       {
         fprintf(stderr, "Chunk Test 5. SDreadchunk failed to read chunk 1\n");
-        num_err++;
+        num_errs++;
         goto test6;
       }
 
@@ -847,7 +848,7 @@
             {
                 printf("Chunk Test 5. chunk1_u8: Wrong data at %d, out %d in %d\n", 
                  i, chunk1_u8[i], ru8_data[i]);
-                num_err++;
+                num_errs++;
             }
        }
 
@@ -858,7 +859,7 @@
     if(status == FAIL) 
       {
         fprintf(stderr, "Chunk Test 5. SDreadchunk failed to read chunk 2\n");
-        num_err++;
+        num_errs++;
         goto test6;
       }
 
@@ -869,7 +870,7 @@
             {
                 printf("Chunk Test 5. chunk2_u8: Wrong data at %d, out %d in %d\n", 
                  i, chunk2_u8[i], ru8_data[i]);
-                num_err++;
+                num_errs++;
             }
        }
     start_dims[0] = 0;
@@ -879,7 +880,7 @@
     if(status == FAIL) 
       {
         fprintf(stderr, "Chunk Test 5. SDreadchunk failed to read chunk 3\n");
-        num_err++;
+        num_errs++;
         goto test6;
       }
 
@@ -890,7 +891,7 @@
             {
                 printf("Chunk Test 5. chunk3_u8: Wrong data at %d, out %d in %d\n", 
                  i, chunk3_u8[i], ru8_data[i]);
-                num_err++;
+                num_errs++;
             }
        }
 
@@ -901,7 +902,7 @@
     if(status == FAIL) 
       {
         fprintf(stderr, "Chunk Test 5. SDreadchunk failed to read chunk 4\n");
-        num_err++;
+        num_errs++;
         goto test6;
       }
 
@@ -912,7 +913,7 @@
             {
                 printf("Chunk Test 5. chunk4_u8: Wrong data at %d, out %d in %d\n", 
                  i, chunk4_u8[i], ru8_data[i]);
-                num_err++;
+                num_errs++;
             }
        }
 
@@ -923,7 +924,7 @@
     if(status == FAIL) 
       {
         fprintf(stderr, "Chunk Test 5. SDreadchunk failed to read chunk 5\n");
-        num_err++;
+        num_errs++;
         goto test6;
       }
 
@@ -934,7 +935,7 @@
             {
                 printf("Chunk Test 5. chunk5_u8: Wrong data at %d, out %d in %d\n", 
                  i, chunk5_u8[i], ru8_data[i]);
-                num_err++;
+                num_errs++;
             }
        }
 
@@ -945,7 +946,7 @@
     if(status == FAIL) 
       {
         fprintf(stderr, "Chunk Test 5. SDreadchunk failed to read chunk 6\n");
-        num_err++;
+        num_errs++;
         goto test6;
       }
 
@@ -956,7 +957,7 @@
             {
                 printf("Chunk Test 5. chunk6_u8: Wrong data at %d, out %d in %d\n", 
                  i, chunk6_u8[i], ru8_data[i]);
-                num_err++;
+                num_errs++;
             }
        }
 
@@ -974,6 +975,7 @@
      * Test 6. Create a new chunked SDS of uint8 in file 1 
      *         Compress using Skipping Huffman. Write using SDwriteChunk
      *         Read back in using SDreaddata and SDreadChunk. 
+     *	       Retrieve and verify the compression information.
      *         Use Skipping Huffman compression
      *         Note: a template is created first then the SDS 
      *               is re-slected for writing/reading.
@@ -987,7 +989,7 @@
     if(newsds6 == FAIL) 
       {
         fprintf(stderr, "Chunk Test 6. Failed to set a new uint8 3D data set chunked\n");
-        num_err++;
+        num_errs++;
         goto test7;
       }
 
@@ -998,6 +1000,9 @@
 #if 0
     chunk_def.comp.comp_type = COMP_CODE_RLE;
 #endif
+    /* the test for SDgetcompress relies on this compression setting , so 
+       if the setting is changed, please ensure that the verification of 
+       the next call to SDgetcompress below is still valid - BMR */
     chunk_def.comp.comp_type = COMP_CODE_SKPHUFF; /* Skipping Huffman */
     chunk_def.comp.cinfo.skphuff.skp_size = sizeof(uint16);
 
@@ -1005,7 +1010,7 @@
     if(status == FAIL) 
       {
         fprintf(stderr, "Chunk Test 6. Failed to create new chunked, Skipping Huffman compressed data set\n");
-        num_err++;
+        num_errs++;
         goto test7;
       }
 
@@ -1015,21 +1020,32 @@
 
     newsds6 = FAIL;
 
-    /* Select same SDS again, fist get index */
+    /* Select same SDS again, first get index */
     if ((index = SDnametoindex(fchk,"DataSetChunked_3D_SKIP_HUF_2")) == FAIL)
       {
           fprintf(stderr, "Chunk Test 6. SDnametoindex  Failed for  Skipping Huffman compressed data set\n");
-          num_err++;
+          num_errs++;
           goto test7;
       }
 
     if ((newsds6 = SDselect(fchk,index)) == FAIL)
       {
           fprintf(stderr, "Chunk Test 6. SDselect Failed to re-select new chunked, Skipping Huffman compressed data set\n");
-          num_err++;
+          num_errs++;
           goto test7;
       }
 
+    /*
+     * Retrieve and verify the compression info - bug# 307, 10/10/01 - BMR
+     */
+    comp_type = COMP_CODE_INVALID;  /* reset variables before retrieving info */
+    HDmemset(&cinfo, 0, sizeof(cinfo)) ;
+    status = SDgetcompress(newsds6, &comp_type, &cinfo);
+    CHECK(status, FAIL, "SDgetcompress");
+    VERIFY(comp_type, chunk_def.comp.comp_type, "SDgetcompress");
+    VERIFY(cinfo.skphuff.skp_size, chunk_def.comp.cinfo.skphuff.skp_size, "SDgetcompress");
+    /* end of test for bug#307 */
+
     /* Write data use SDwriteChunk */
     start_dims[0] = 0;
     start_dims[1] = 0;
@@ -1038,7 +1054,7 @@
     if(status == FAIL) 
       {
         fprintf(stderr, "Chunk Test 6. SDwritechunk failed to write chunk 1\n");
-        num_err++;
+        num_errs++;
         goto test7;
       }
 
@@ -1049,7 +1065,7 @@
     if(status == FAIL) 
       {
         fprintf(stderr, "Chunk Test 6. SDwritechunk failed to write chunk 4\n");
-        num_err++;
+        num_errs++;
         goto test7;
       }
 
@@ -1060,7 +1076,7 @@
     if(status == FAIL) 
       {
         fprintf(stderr, "Chunk Test 6. SDwritechunk failed to write chunk 2\n");
-        num_err++;
+        num_errs++;
         goto test7;
       }
 
@@ -1071,7 +1087,7 @@
     if(status == FAIL) 
       {
         fprintf(stderr, "Chunk Test 6. SDwritechunk failed to write chunk 5\n");
-        num_err++;
+        num_errs++;
         goto test7;
       }
 
@@ -1082,7 +1098,7 @@
     if(status == FAIL) 
       {
         fprintf(stderr, "Chunk Test 6. SDwritechunk failed to write chunk 3\n");
-        num_err++;
+        num_errs++;
         goto test7;
       }
 
@@ -1093,7 +1109,7 @@
     if(status == FAIL) 
       {
         fprintf(stderr, "Chunk Test 6. SDwritechunk failed to write chunk 6\n");
-        num_err++;
+        num_errs++;
         goto test7;
       }
 
@@ -1119,7 +1135,7 @@
                         fprintf(stderr,"u8_data[%d][%d][%d]=%d,",
                                 i,j,k,u8_data[i][j][k]);
                         fprintf(stderr,"\n");
-                        num_err++;
+                        num_errs++;
                     }
               }
           }
@@ -1132,7 +1148,7 @@
     if(status == FAIL) 
       {
         fprintf(stderr, "Chunk Test 6. SDreadchunk failed to read chunk 1\n");
-        num_err++;
+        num_errs++;
         goto test7;
       }
 
@@ -1143,7 +1159,7 @@
             {
                 printf("Chunk Test 6. chunk1_u8: Wrong data at %d, out %d in %d\n", 
                  i, chunk1_u8[i], ru8_data[i]);
-                num_err++;
+                num_errs++;
             }
        }
 
@@ -1154,7 +1170,7 @@
     if(status == FAIL) 
       {
         fprintf(stderr, "Chunk Test 6. SDreadchunk failed to read chunk 2\n");
-        num_err++;
+        num_errs++;
         goto test7;
       }
 
@@ -1165,7 +1181,7 @@
             {
                 printf("Chunk Test 6. chunk2_u8: Wrong data at %d, out %d in %d\n", 
                  i, chunk2_u8[i], ru8_data[i]);
-                num_err++;
+                num_errs++;
             }
        }
     start_dims[0] = 0;
@@ -1175,7 +1191,7 @@
     if(status == FAIL) 
       {
         fprintf(stderr, "Chunk Test 6. SDreadchunk failed to read chunk 3\n");
-        num_err++;
+        num_errs++;
         goto test7;
       }
 
@@ -1186,7 +1202,7 @@
             {
                 printf("Chunk Test 6. chunk3_u8: Wrong data at %d, out %d in %d\n", 
                  i, chunk3_u8[i], ru8_data[i]);
-                num_err++;
+                num_errs++;
             }
        }
 
@@ -1197,7 +1213,7 @@
     if(status == FAIL) 
       {
         fprintf(stderr, "SDreadchunk failed to read chunk 4\n");
-        num_err++;
+        num_errs++;
         goto test7;
       }
 
@@ -1208,7 +1224,7 @@
             {
                 printf("Chunk Test 6. chunk4_u8: Wrong data at %d, out %d in %d\n", 
                  i, chunk4_u8[i], ru8_data[i]);
-                num_err++;
+                num_errs++;
             }
        }
 
@@ -1219,7 +1235,7 @@
     if(status == FAIL) 
       {
         fprintf(stderr, "Chunk Test 6. SDreadchunk failed to read chunk 5\n");
-        num_err++;
+        num_errs++;
         goto test7;
       }
 
@@ -1230,7 +1246,7 @@
             {
                 printf("Chunk Test 6. chunk5_u8: Wrong data at %d, out %d in %d\n", 
                  i, chunk5_u8[i], ru8_data[i]);
-                num_err++;
+                num_errs++;
             }
        }
 
@@ -1241,7 +1257,7 @@
     if(status == FAIL) 
       {
         fprintf(stderr, "Chunk Test 6. SDreadchunk failed to read chunk 6\n");
-        num_err++;
+        num_errs++;
         goto test7;
       }
 
@@ -1252,7 +1268,7 @@
             {
                 printf("Chunk Test 6. chunk6_u8: Wrong data at %d, out %d in %d\n", 
                  i, chunk6_u8[i], ru8_data[i]);
-                num_err++;
+                num_errs++;
             }
        }
 
@@ -1269,17 +1285,17 @@
 
     d_dims[0] = 9;
     d_dims[1] = 4;
-    newsds8 = SDcreate(fchk, "DataSetChunked_2D_GZIP_1", DFNT_UINT16, 2, d_dims);
-    if(newsds8 == FAIL) 
+    newsds7 = SDcreate(fchk, "DataSetChunked_2D_GZIP_1", DFNT_UINT16, 2, d_dims);
+    if(newsds7 == FAIL) 
       {
         fprintf(stderr, "Chunk Test 7. Failed to create a new 2D uint16 data set \n");
-        num_err++;
+        num_errs++;
         goto test8;
       }
 
     /* set fill value */
     fill_u16 = 0;
-    status = SDsetfillvalue(newsds8, (VOIDP) &fill_u16);
+    status = SDsetfillvalue(newsds7, (VOIDP) &fill_u16);
     CHECK(status, FAIL, "Chunk Test 7. SDsetfillvalue");
 
     /* Create chunked SDS 
@@ -1293,23 +1309,26 @@
     chunk_def.comp.comp_type = COMP_CODE_SKPHUFF; /* Skipping Huffman */
     chunk_def.comp.cinfo.skphuff.skp_size = sizeof(uint16);
 #endif
+    /* the test for SDgetcompress relies on this compression setting , so 
+       if the setting is changed, please ensure that the verification of 
+       the next call to SDgetcompress below is still valid - BMR */
     chunk_def.comp.comp_type = COMP_CODE_DEFLATE; /* GZIP */
     chunk_def.comp.cinfo.deflate.level = 6;
 
-    status = SDsetchunk(newsds8, chunk_def, HDF_CHUNK | HDF_COMP);
+    status = SDsetchunk(newsds7, chunk_def, HDF_CHUNK | HDF_COMP);
     if(status == FAIL) 
       {
         fprintf(stderr, "Chunk Test 7. Failed to create new chunked, GZIP Compressed data set\n");
-        num_err++;
+        num_errs++;
         goto test8;
       }
 
     /* Set Chunk cache to hold 2 chunks */
-    status = SDsetchunkcache(newsds8, 2, 0);
+    status = SDsetchunkcache(newsds7, 2, 0);
     if(status == FAIL) 
       {
         fprintf(stderr, "Chunk Test 7. SDsetchunkcache failed\n");
-        num_err++;
+        num_errs++;
         goto test8;
       }
 
@@ -1319,11 +1338,11 @@
     start_dims[1] = 0;
     edge_dims[0] = 9;
     edge_dims[1] = 4;
-    status = SDwritedata(newsds8, start_dims, NULL, edge_dims, (VOIDP) u16_2data);
+    status = SDwritedata(newsds7, start_dims, NULL, edge_dims, (VOIDP) u16_2data);
     if(status == FAIL) 
       {
         fprintf(stderr, "Chunk Test 7. Failed to write u16_2data to new chunked data set\n");
-        num_err++;
+        num_errs++;
         goto test8;
       }
 
@@ -1332,7 +1351,7 @@
     start_dims[1] = 0;
     edge_dims[0] = 9;
     edge_dims[1] = 4;
-    status = SDreaddata(newsds8, start_dims, NULL, edge_dims, (VOIDP) inbuf1_2u16);
+    status = SDreaddata(newsds7, start_dims, NULL, edge_dims, (VOIDP) inbuf1_2u16);
     CHECK(status, FAIL, "Chunk Test 7. SDreaddata");
     for (i = 0; i < 9; i++)
       {
@@ -1345,16 +1364,16 @@
                     fprintf(stderr,"u16_cdata[%d][%d]=%d,",
                             i,j,u16_2data[i][j]);
                     fprintf(stderr,"\n");
-                    num_err++;
+                    num_errs++;
                 }
           }
       }
     /* Get chunk lengths */
-    status = SDgetchunkinfo(newsds8, &rchunk_def, &cflags);
+    status = SDgetchunkinfo(newsds7, &rchunk_def, &cflags);
     if(status == FAIL) 
       {
         fprintf(stderr, "Chunk Test 7. SDgetchunkinfo failed \n");
-        num_err++;
+        num_errs++;
         goto test8;
       }
 
@@ -1365,14 +1384,44 @@
         || cflags != (HDF_CHUNK | HDF_COMP))
       {
         fprintf(stderr, "Chunk Test 7. SDgetchunkinfo returned wrong values\n");
-        num_err++;
+        num_errs++;
         goto test8;
       }
 
     /* Close down this SDS*/    
-    status = SDendaccess(newsds8);
+    status = SDendaccess(newsds7);
     CHECK(status, FAIL, "Chunk Test 7. SDendaccess");
 
+    /*
+     * Added to test getting compression information for chunked SDS - 
+     * bug# 307, 10/10/01 - BMR
+     */
+    /* Select same SDS again, first get index */
+    if ((index = SDnametoindex(fchk,"DataSetChunked_2D_GZIP_1")) == FAIL)
+      {
+          fprintf(stderr, "Chunk Test 7. SDnametoindex  Failed for GZIP compressed data set\n");
+          num_errs++;
+          goto test8;
+      }
+
+    if ((newsds7 = SDselect(fchk,index)) == FAIL)
+      {
+          fprintf(stderr, "Chunk Test 7. SDselect Failed to re-select new chunked, GZIP compressed data set\n");
+          num_errs++;
+          goto test8;
+      }
+
+    /*
+     * Retrieve and verify the compression info - bug# 307, 10/10/01 - BMR
+     */
+    comp_type = COMP_CODE_INVALID;  /* reset variables before retrieving info */
+    HDmemset(&cinfo, 0, sizeof(cinfo)) ;
+    status = SDgetcompress(newsds7, &comp_type, &cinfo);
+    CHECK(status, FAIL, "SDgetcompress");
+    VERIFY(comp_type, chunk_def.comp.comp_type, "SDgetcompress");
+    VERIFY(cinfo.deflate.level, chunk_def.comp.cinfo.deflate.level, "SDgetcompress");
+    /* end of test for bug#307 */
+
     /* Close down file 'chktst.hdf' */
     status = SDend(fchk);
     CHECK(status, FAIL, "SDend");
@@ -1398,13 +1447,12 @@
     if(newsds == FAIL) 
       {
         fprintf(stderr, "Chunk Test 8. SDcreate Failed to create a new chunked, nbit data set \n");
-        num_err++;
+        num_errs++;
         goto done;
       }
 
     for(i = 0; i < 25; i++)
         idata[i] = i*10;
-
     /* Create chunked SDS with NBIT compression.
        chunk is 2x2 which will create 9 chunks.*/
     cdims[0] = chunk_def.nbit.chunk_lengths[0] = 2;
@@ -1417,7 +1465,7 @@
     if(status == FAIL) 
       {
         fprintf(stderr, "Chunk Test 8. SDsetchunk Failed to create new chunked, NBIT data set\n");
-        num_err++;
+        num_errs++;
         goto done;
       }
 
@@ -1444,7 +1492,7 @@
     if(newsds2 == FAIL) 
       {
         fprintf(stderr, "Chunk Test 8. Failed to select a data set for n-bit access\n");
-        num_err++;
+        num_errs++;
         goto done;
       }
 
@@ -1461,7 +1509,7 @@
           {
             fprintf(stderr,"Chunk Test 8. Bogus val in loc %d in n-bit dset want %ld got %ld\n",
 		    i, (long)idata[i], (long)rdata[i]);
-            num_err++;
+            num_errs++;
           }
       }
 
@@ -1470,7 +1518,7 @@
     if(status == FAIL) 
       {
         fprintf(stderr, "Chunk Test 8. SDgetchunkinfo failed \n");
-        num_err++;
+        num_errs++;
         goto done;
       }
 
@@ -1486,10 +1534,27 @@
         fprintf(stderr, "Chunk Test 8. cdims[%d] =%d \n", 1, (int)cdims[1]);
         fprintf(stderr, "Chunk Test 8. rcdims[%d] =%d \n", 0, (int)rcdims[0]);
         fprintf(stderr, "Chunk Test 8. rcdims[%d] =%d \n", 1, (int)cdims[1]);
-        num_err++;
+        num_errs++;
         goto done;
       }
+    /*
+     * Retrieve and verify the compression info - bug# 307, 10/10/01 - BMR
+     */
+    comp_type = COMP_CODE_INVALID;  /* reset variables before retrieving info */
+    HDmemset(&cinfo, 0, sizeof(cinfo)) ;
+    status = SDgetcompress(newsds2, &comp_type, &cinfo);
+    CHECK(status, FAIL, "SDgetcompress");
 
+    /* Note: the struct nbit in the union HDF_CHUNK_DEF seems like an extra
+	thing since comp_info also has nbit, but the HDF_CHUNK_DEF.nbit was
+	used to set the compression info so it's also used here to verify */ 
+    VERIFY(comp_type, COMP_CODE_NBIT, "SDgetcompress");
+    VERIFY(cinfo.nbit.sign_ext, chunk_def.nbit.sign_ext, "SDgetcompress");
+    VERIFY(cinfo.nbit.fill_one, chunk_def.nbit.fill_one, "SDgetcompress");
+    VERIFY(cinfo.nbit.start_bit, chunk_def.nbit.start_bit, "SDgetcompress");
+    VERIFY(cinfo.nbit.bit_len, chunk_def.nbit.bit_len, "SDgetcompress");
+    /* end of test for bug#307 */
+
     /* end access to SDS */
     status = SDendaccess(newsds2);
     CHECK(status, FAIL, "Chunk Test 8. SDendaccess");
@@ -1500,7 +1565,7 @@
 
   done:
 
-    return num_err;
+    return num_errs;
 } /* test_chunk() */
 #endif /* CHUNK_TEST */
 
@@ -1508,6 +1573,8 @@
 static int16  netcdf_u16[2][3] = {{1, 2, 3}, 
                                    {4, 5, 6}};
 
+char    testfile[512] = "";
+
 /* Tests reading of netCDF file 'test1.nc' using the SDxxx inteface.
    Note not all features of reading SDS from netCDF files are tested here.
    Hopefully more tests will be added over time as needed/required. */
@@ -1529,10 +1596,19 @@
 	char name[MAX_NC_NAME];
     int32 status;
     intn i, j;
-    int     num_err = 0;    /* number of errors so far */
+    int     num_errs = 0;    /* number of errors so far */
+    const char *basename = "test1.nc";
+    char   *srcdir = getenv("srcdir");
 
-	/* Open the file 'test1.nc' and initialize the SDxxx interface. */
-	sd_id = SDstart("test1.nc", DFACC_RDONLY);
+    /* Generate the correct name for the test file, by prepending the source path */
+    if (srcdir && ((strlen(srcdir) + strlen(basename) + 1) < sizeof(testfile))) {
+        strcpy(testfile, srcdir);
+        strcat(testfile, "/");
+    }
+    strcat(testfile, basename);
+
+    /* Open the file 'test1.nc' and initialize the SDxxx interface. */
+    sd_id = SDstart(testfile, DFACC_RDONLY);
     CHECK(sd_id, FAIL, "netCDF Read Test 1. SDstart failed on file test1.nc");
 
 	/* Determine the contents of the file. */
@@ -1543,13 +1619,13 @@
     if (n_datasets != 8 )
       {
           fprintf(stderr,"netCDF Read Test 1: SDfileinfo returned wrong number of datasets in file test1.nc \n");
-          num_err++;
+          num_errs++;
       }
 
     if (n_file_attrs != 1 )
       {
           fprintf(stderr,"netCDF Read Test 1: SDfileinfo returned wrong number of file attributes in file test1.nc \n");
-          num_err++;
+          num_errs++;
       }
 
 	/* Access and find the 2-dim dataset of data-type shorts(DFNT_INT16). 
@@ -1595,14 +1671,1000 @@
 	status = SDend(sd_id);
     CHECK(status, FAIL, "netCDF Read Test 1. SDend failed for file test1.nc");
 
-    return num_err;
+    return num_errs;
 } /* test_netcdf_reading() */
 #endif /* NETCDF_READ_TEST */
 
+/* This test is added to test SDsetdimscale while fixing bug #172.
+   Beside the fact that the main program was already very long, adding
+   this separate test routine will also define a place for additional
+   dimension tests to be appended in the future.  Also, hopefully, some
+   day, the main program can be shortened and some of its
+   dimension-related tests can be moved into this test routine - 04/18/01
+*/
+
+/********************************************************************
+   Name: test_dimensions()
+
+   Description: 
+	This test routine is used to test various dimension operations.
+	The main contents include:
+	- creates the file dim.hdf
+	- creates an SDS of size 15 x 10, and sets values to its dimensions
+	- creates another SDS of size 4 x 3, and sets values to its 
+		first dimension
+
+	The followings are included in this test routine:
+	- SDgetdimid
+	- SDsetdimname
+	- SDdiminfo
+	- SDgetdimscale
+        - SDsetdimscale with the following situations:
+        	+ not called before SDdiminfo 
+		+ called with number type = 0
+        	+ called with an unsigned number type
+ 		+ called with the dataset's number type 
+ 		+ called before writing data to dataset
+ 		+ called after closing dataset and file, and then 
+		  reopening
+
+   Return value:
+	The number of errors occurred in this routine.
+
+*********************************************************************/
+#define FILE_DIM  "dim.hdf"	/* created and used by test_dimensions */
+#define LENGTH0 15		/* first SDS dimension */
+#define LENGTH1 10
+#define LENGTH2 4		/* second SDS dimension */
+#define LENGTH3 3
+#define RANK 	2		/* both SDS' rank */
+#define DS0_NAME "HDF Data 0"	/* first SDS name */
+#define DS1_NAME "HDF Data 1"	/* second SDS name */
+#define DIM0_NAME " Dimension 0"	/* name of first SDS' first dim */
+#define DIM1_NAME " Dimension 1"	/* name of first SDS' second dim */
+#define DIM2_NAME " Dimension 2"	/* name of second SDS' first dim */
+
+static intn
+test_dimensions()
+{
+    int32  fid, sds_id, status, dim0_id, dim1_id, sds_idx;
+    int32  dims[2], start[2], edges[2], rank;
+    int16  array1_data[LENGTH0][LENGTH1];	/* data for first SDS */
+    uint32 array2_data[LENGTH2][LENGTH3];	/* data for second SDS */
+    int32  dim_sizes[MAX_VAR_DIMS];		/* read dimensions */
+    intn   i, j;
+    int32  array_rank, num_type, attributes;
+    char   dim_name[MAX_NC_NAME], name[MAX_NC_NAME];
+    uint8  scale0 [] = {0,1,2,3,4,5,6,7,8,9,10,11,12,13,255};
+    int16  scale1 [] = {0,1,2,3,4,5,6,7,8,9};
+    char8  scale2 [] = {'d','i','m','2'}, scale2_out[4];
+    float32 scalef[] = {1., 2., 3., 4.};
+    int32  size, dim_data_type, dim_num_attrs;
+    int    num_errs = 0;    /* number of errors so far */
+
+    /* Create the file defined by FILE_DIM and initiate the SD interface. */
+    fid = SDstart(FILE_DIM, DFACC_CREATE);
+    CHECK(fid, FAIL, "SDstart");
+
+    /*
+     * Add a LENGTH0 x LENGTH1 array, which is named by DS0_NAME and of
+     * type 16-bit signed integer, to the file... 
+     */
+
+    /* Define the rank and dimensions of the data set. */
+    rank = RANK;
+    dims[0] = LENGTH0;
+    dims[1] = LENGTH1;
+
+    /* Create the array data set. */
+    sds_id = SDcreate(fid, DS0_NAME, DFNT_INT16, rank, dims);
+    CHECK(sds_id, FAIL, "SDcreate");
+
+    /*
+     * Settings for the first dimension.  Note that all these settings
+     * are done before writing the data to the dataset; just to make sure
+     * that it's possible...
+     */
+
+    /* Get the first dimension id */
+    dim0_id = SDgetdimid (sds_id, 0);
+    CHECK(dim0_id, FAIL, "SDgetdimid");
+
+    /* Set the first dimension name to the name defined by DIM0_NAME */
+    status = SDsetdimname (dim0_id, DIM0_NAME);
+    CHECK(status, FAIL, "SDsetdimname");
+
+    /* Set scale of type unsigned int-8 for the first dimension */
+    status = SDsetdimscale (dim0_id, dims[0], DFNT_UINT8, scale0);
+    CHECK(status, FAIL, "SDsetdimscale");
+
+    /* Read the first dimension and verify its information */
+    status = SDdiminfo(dim0_id, dim_name, &size, &dim_data_type, &dim_num_attrs);
+    CHECK(status, FAIL, "SDdiminfo");
+    VERIFY (strcmp(dim_name, DIM0_NAME), 0, "SDdiminfo");
+    VERIFY (size, dims[0], "SDdiminfo");
+    VERIFY (dim_data_type, DFNT_UINT8, "SDdiminfo"); /* bug #172 is fixed! */
+    VERIFY (dim_num_attrs, 0, "SDdiminfo");
+
+    /* 
+     * Write the data stored in the array 'array1_data' to the dataset...
+     */
+
+    /* Fill the buffer with values. */
+    for (j = 0; j < LENGTH0; j++) {
+        for (i = 0; i < LENGTH1; i++)
+            array1_data[j][i] = (i + j) + 1;
+    }
+
+    /* Define the area for writing to the dataset */
+    for (i = 0; i < rank; i++) {
+        start[i] = 0;
+        edges[i] = dims[i];
+    }
+
+    status = SDwritedata(sds_id, start, NULL, edges, (VOIDP)array1_data); 
+    CHECK(status, FAIL, "SDwritedata");
+
+    /* Terminate access to the array. */
+    status = SDendaccess(sds_id);
+    CHECK(status, FAIL, "SDendaccess");
+
+    /* Terminate access to the SD interface and close the file. */
+    status = SDend(fid);
+    CHECK(status, FAIL, "SDend");
+
+    /* Re-open FILE_DIM in W mode and select the dataset named by DS0_NAME */
+    fid = SDstart (FILE_DIM, DFACC_WRITE);
+    CHECK(fid, FAIL, "SDstart");
+
+    /* Look for DS0_NAME dataset */
+    sds_idx = SDnametoindex (fid, DS0_NAME);
+    CHECK(sds_idx, FAIL, "SDnametoindex");
+
+    /* Select that dataset */
+    sds_id = SDselect (fid, sds_idx);
+    CHECK(sds_id, FAIL, "SDselect");
+
+    /* Get info of the dataset and verify them: it is a LENGTH0 x LENGTH1 
+       array of type DFNT_INT16 and is named by DS0_NAME */
+    status = SDgetinfo(sds_id, name, &array_rank, dim_sizes, &num_type, &attributes);
+    CHECK(status, FAIL, "SDgetinfo");
+    VERIFY (strcmp(name, DS0_NAME), 0, "SDgetinfo");
+    VERIFY (array_rank, RANK, "SDgetinfo");
+    VERIFY (num_type, DFNT_INT16, "SDgetinfo");
+    VERIFY (dim_sizes[0], LENGTH0, "SDgetinfo");
+    VERIFY (dim_sizes[1], LENGTH1, "SDgetinfo");
+
+    /*
+     * Setting name for the second dimension, but not scale yet...
+     */
+
+    /* Get the second dimension id */
+    dim1_id = SDgetdimid (sds_id, 1);
+    CHECK(dim1_id, FAIL, "SDgetdimid");
+
+    /* Set the second dimension name to the name defined by DIM1_NAME */
+    status = SDsetdimname (dim1_id, DIM1_NAME);
+    CHECK(status, FAIL, "SDsetdimname");
+
+    /* Read the second dimension and verify its information; since the
+       scale of this dimension is not set yet, the datatype should be 0 */
+    status = SDdiminfo(dim1_id, dim_name, &size, &dim_data_type, &dim_num_attrs);
+    CHECK(status, FAIL, "SDdiminfo");
+    VERIFY (strcmp(dim_name, DIM1_NAME), 0, "SDdiminfo");
+    VERIFY (size, dims[1], "SDdiminfo");
+    VERIFY (dim_data_type, 0, "SDdiminfo");
+    VERIFY (dim_num_attrs, 0, "SDdiminfo");
+
+    /* Set dimension scale for the second dimension; its type will be the
+       same as that of the of the dataset */
+    status = SDsetdimscale (dim1_id, dim_sizes[1], num_type, scale1);
+    CHECK(status, FAIL, "SDsetdimscale");
+
+    /* Read the second dimension and verify its information; since the
+       scale of this dimension is now set, the datatype should be DFNT_INT16 */
+    status = SDdiminfo(dim1_id, dim_name, &size, &dim_data_type, &dim_num_attrs);
+    CHECK(status, FAIL, "SDdiminfo");
+    VERIFY (dim_data_type, DFNT_INT16, "SDdiminfo");
+
+    /* Terminate access to the array. */
+    status = SDendaccess(sds_id);
+    CHECK(status, FAIL, "SDendaccess");
+
+    /*
+     * Add a data array named by DS1_NAME to the file... 
+     */
+
+    /*
+     * Add another dataset to the file; this dataset is a LENGTH2 x LENGTH3
+     * array, named by DS1_NAME and of type 32-bit unsigned integer...
+     */
+
+    /* Define the rank and dimensions of the data set */
+    rank = RANK;
+    dims[0] = LENGTH2;
+    dims[1] = LENGTH3;
+
+    for (i = 0; i < rank; i++)
+        edges[i] = dims[i];
+
+    /* Create the data set */
+    sds_id = SDcreate(fid, DS1_NAME, DFNT_UINT32, rank, dims);
+    CHECK(sds_id, FAIL, "SDcreate");
+
+    /* Fill the stored-data array with values. */
+    for (j = 0; j < LENGTH2; j++) {
+        for (i = 0; i < LENGTH3; i++)
+            array2_data[j][i] = 10 * (j + i);
+    }
+
+    /* Write the data stored in the array 'array2_data' to the dataset */
+    status = SDwritedata(sds_id, start, NULL, edges, (VOIDP)array2_data); 
+    CHECK(status, FAIL, "SDwritedata");
+
+    /* Get info of the dataset and verify its type */
+    status = SDgetinfo(sds_id, name, &array_rank, dim_sizes, &num_type, &attributes);
+    CHECK(status, FAIL, "SDgetinfo");
+    VERIFY (strcmp(name, DS1_NAME), 0, "SDgetinfo");
+    VERIFY (array_rank, RANK, "SDgetinfo");
+    VERIFY (num_type, DFNT_UINT32, "SDgetinfo");
+    VERIFY (dim_sizes[0], LENGTH2, "SDgetinfo");
+    VERIFY (dim_sizes[1], LENGTH3, "SDgetinfo");
+
+    /*
+     * Settings for the first dimension of the dataset named by DS1_NAME... 
+     */
+
+    /* Get the first dimension id */
+    dim0_id = SDgetdimid (sds_id, 0);
+    CHECK(dim0_id, FAIL, "SDgetdimid");
+
+    /* Set the first dimension name to the name defined by DIM2_NAME */
+    status = SDsetdimname (dim0_id, DIM2_NAME);
+    CHECK(status, FAIL, "SDsetdimname");
+
+    /* Verify that when 0 is passed into SDsetdimscale for number type,
+       then the dimension scale will be set to DFNT_FLOAT32 */
+    status = SDsetdimscale (dim0_id, dims[0], 0, scalef); 
+    CHECK(status, FAIL, "SDsetdimscale");
+
+    status = SDdiminfo(dim0_id, dim_name, &size, &dim_data_type, &dim_num_attrs);
+    CHECK(status, FAIL, "SDdiminfo");
+    VERIFY (strcmp(dim_name, DIM2_NAME), 0, "SDdiminfo");
+    VERIFY (size, dims[0], "SDdiminfo");
+    VERIFY (dim_data_type, DFNT_FLOAT32, "SDdiminfo");
+    VERIFY (dim_num_attrs, 0, "SDdiminfo");
+
+    /* 
+     * Now, set dimension scale for that first dimension again, but this
+     * time, to 8-bit signed char; then verify the type and the scale values 
+     */
+
+    /* Set scale of type 8-bit signed char for this dimension */
+    status = SDsetdimscale (dim0_id, dims[0], DFNT_CHAR, scale2);
+    CHECK(status, FAIL, "SDsetdimscale");
+
+    /* Read the info of this dimension its new number type */ 
+    status = SDdiminfo(dim0_id, dim_name, &size, &dim_data_type, &dim_num_attrs);
+    CHECK(status, FAIL, "SDdiminfo");
+    VERIFY (dim_data_type, DFNT_CHAR, "SDdiminfo");
+
+    /* Read dimension scale values and verify them */
+    status = SDgetdimscale (dim0_id, (VOIDP)scale2_out);
+    CHECK(status, FAIL, "SDgetdimscale");
+    for(i=0; i < LENGTH2; i++)
+	VERIFY (scale2_out[i], scale2[i], "SDgetdimscale");
+
+    /* Terminate access to the array. */
+    status = SDendaccess(sds_id);
+    CHECK(status, FAIL, "SDendaccess");
+
+    /* Terminate access to the SD interface and close the file. */
+    status = SDend(fid);
+    CHECK(status, FAIL, "SDend");
+
+    /* Return the number of errors that's been kept track of so far */
+    return num_errs;
+} /* test_dimensions */
+
+static intn
+test_compression()
+{
+    int32 fcomp; /* File handle */
+    int32 nt;                /* Number type */
+    int32 dimsize[10];       /* dimension sizes */
+    int32 newsds, newsds2; 	/* SDS handles */
+    comp_coder_t comp_type;	/* to retrieve compression type into */
+    comp_info cinfo;            /* compression information structure */
+    int32   idata[100];
+    int32   rdata[100];
+    int32   fillval;
+    intn  i;
+    int   num_errs = 0;    /* number of errors in compression test so far */
+    intn  status;      /* status flag */
+    int32   start[10], end[10]; /* start and end arrays */
+
+#ifdef QAK
+printf("writing 1st compressed dataset, basic skipping huffman\n");
+#endif /* QAK */
+    fcomp = SDstart(COMPFILE1, DFACC_CREATE);
+    CHECK(fcomp, FAIL, "SDstart");
+
+    nt = DFNT_INT32;
+    dimsize[0] = 5;
+    dimsize[1] = 5;
+    newsds = SDcreate(fcomp, "CompDataSet1", nt, 2, dimsize);
+    if(newsds == FAIL) {
+        fprintf(stderr, "Failed to create a new data set for compression testing\n");
+        num_errs++;
+    }
+
+    for(i = 0; i < 25; i++)
+        idata[i] = i*10;
+
+#ifdef QAK
+printf("before SDsetcompress\n");
+#endif /* QAK */
+    cinfo.skphuff.skp_size=4;
+    status = SDsetcompress(newsds,COMP_CODE_SKPHUFF,&cinfo);
+    CHECK(status, FAIL, "SDcompress");
+
+    start[0] = start[1] = 0;
+    end[0]   = end[1]   = 5;
+#ifdef QAK
+printf("before SDwritedata\n");
+#endif /* QAK */
+    status = SDwritedata(newsds, start, NULL, end, (VOIDP) idata);
+    CHECK(status, FAIL, "SDwritedata");
+
+#ifdef QAK
+printf("before SDendaccess\n");
+#endif /* QAK */
+    status = SDendaccess(newsds);
+    CHECK(status, FAIL, "SDendaccess");
+
+    /* need to close to flush compressed info to file */
+    status = SDend(fcomp);
+    CHECK(status, FAIL, "SDend");
+
+    /* read the compressed data back in */
+#ifdef QAK
+printf("reading compressed dataset\n");
+#endif /* QAK */
+    fcomp = SDstart(COMPFILE1, DFACC_RDWR);
+    CHECK(fcomp, FAIL, "SDstart (again)");
+
+    newsds2 = SDselect(fcomp, 0);
+    if(newsds == FAIL) {
+        fprintf(stderr, "Failed to select a data set for compressed access\n");
+        num_errs++;
+    }
+
+    /*
+     * Retrieve and verify the compression info - bug# 307, 9/7/01 - BMR
+     */
+    comp_type = COMP_CODE_INVALID;  /* reset variables before retrieving info */
+    HDmemset(&cinfo, 0, sizeof(cinfo)) ;
+    status = SDgetcompress(newsds2, &comp_type, &cinfo);
+    CHECK(status, FAIL, "SDgetcompress");
+    VERIFY(comp_type, COMP_CODE_SKPHUFF, "SDgetcompress");
+    VERIFY(cinfo.skphuff.skp_size, 4, "SDgetcompress");
+
+    start[0] = start[1] = 0;
+    end[0]   = end[1]   = 5;
+#ifdef QAK
+printf("before SDreaddata\n");
+#endif /* QAK */
+    status = SDreaddata(newsds2, start, NULL, end, (VOIDP) rdata);
+    CHECK(status, FAIL, "SDreaddata");
+
+    for(i = 0; i < 25; i++)
+        if(idata[i] != rdata[i]) {
+            fprintf(stderr,"Bogus val in loc %d in compressed dset want %ld got %ld\n", i, (long)idata[i], (long)rdata[i]);
+            num_errs++;
+        }
+
+#ifdef QAK
+printf("before SDendaccess\n");
+#endif /* QAK */
+    status = SDendaccess(newsds2);
+    CHECK(status, FAIL, "SDendaccess");
+
+    status = SDend(fcomp);
+    CHECK(status, FAIL, "SDend");
+
+#ifdef QAK
+printf("writing 2nd compressed dataset, partially filled & skipping huffman\n");
+#endif /* QAK */
+    fcomp = SDstart(COMPFILE2, DFACC_CREATE);
+    CHECK(fcomp, FAIL, "SDstart");
+
+    nt = DFNT_INT32;
+    dimsize[0] = 5;
+    dimsize[1] = 5;
+    newsds = SDcreate(fcomp, "CompDataSet2", nt, 2, dimsize);
+    if(newsds == FAIL) {
+        fprintf(stderr, "Failed to create a new data set for compression testing\n");
+        num_errs++;
+    }
+
+    fillval=43;
+#ifdef QAK
+printf("before SDsetfillvalue\n");
+#endif /* QAK */
+    status = SDsetfillvalue(newsds,(VOIDP)&fillval);
+    CHECK(status, FAIL, "SDsetfillvalue");
+
+#ifdef QAK
+printf("before SDsetcompress\n");
+#endif /* QAK */
+    cinfo.skphuff.skp_size=4;
+    status = SDsetcompress(newsds,COMP_CODE_SKPHUFF,&cinfo);
+    CHECK(status, FAIL, "SDsetcompress");
+
+    /* fill the array with the standard info */
+    for(i = 0; i < 25; i++)
+        idata[i] = i*10;
+    /* overwrite selected portions with the fill value */
+    for(i = 0; i < 5; i++)
+        idata[i] = fillval;
+    for(i = 20; i < 25; i++)
+        idata[i] = fillval;
+
+    start[0] = 1;
+    start[1] = 0;
+    end[0]   = 3;
+    end[1]   = 5;
+#ifdef QAK
+printf("before SDwritedata\n");
+#endif /* QAK */
+    status = SDwritedata(newsds, start, NULL, end, (VOIDP) &idata[5]);
+    CHECK(status, FAIL, "SDwritedata");
+
+#ifdef QAK
+printf("before SDendaccess\n");
+#endif /* QAK */
+    status = SDendaccess(newsds);
+    CHECK(status, FAIL, "SDendaccess");
+
+    /* need to close to flush compressed info to file */
+    status = SDend(fcomp);
+    CHECK(status, FAIL, "SDend");
+
+    /* read the compressed data back in */
+#ifdef QAK
+printf("reading compressed dataset\n");
+#endif /* QAK */
+    fcomp = SDstart(COMPFILE2, DFACC_RDWR);
+    CHECK(fcomp, FAIL, "SDstart (again)");
+
+    newsds2 = SDselect(fcomp, 0);
+    if(newsds == FAIL) {
+        fprintf(stderr, "Failed to select a data set for compressed access\n");
+        num_errs++;
+    }
+
+    start[0] = start[1] = 0;
+    end[0]   = end[1]   = 5;
+#ifdef QAK
+printf("before SDreaddata\n");
+#endif /* QAK */
+    status = SDreaddata(newsds2, start, NULL, end, (VOIDP) rdata);
+    CHECK(status, FAIL, "SDreaddata");
+
+    for(i = 0; i < 25; i++)
+        if(idata[i] != rdata[i]) {
+            fprintf(stderr,"Bogus val in loc %d in compressed dset want %ld got %ld\n", i, (long)idata[i], (long)rdata[i]);
+            num_errs++;
+        }
+
+#ifdef QAK
+printf("before SDendaccess\n");
+#endif /* QAK */
+    status = SDendaccess(newsds2);
+    CHECK(status, FAIL, "SDendaccess");
+
+    status = SDend(fcomp);
+    CHECK(status, FAIL, "SDend");
+
+#ifdef QAK
+printf("creating 3rd compressed dataset, compressed template & skipping huffman\n");
+#endif /* QAK */
+    fcomp = SDstart(COMPFILE3, DFACC_CREATE);
+    CHECK(fcomp, FAIL, "SDstart");
+
+    nt = DFNT_INT32;
+    dimsize[0] = 5;
+    dimsize[1] = 5;
+    newsds = SDcreate(fcomp, "CompDataSet3", nt, 2, dimsize);
+    if(newsds == FAIL) {
+        fprintf(stderr, "Failed to create a new data set for compression testing\n");
+        num_errs++;
+    }
+
+    fillval=56;
+#ifdef QAK
+printf("before SDsetfillvalue\n");
+#endif /* QAK */
+    status = SDsetfillvalue(newsds,(VOIDP)&fillval);
+    CHECK(status, FAIL, "SDsetfillvalue");
+
+#ifdef QAK
+printf("before SDsetcompress\n");
+#endif /* QAK */
+    cinfo.skphuff.skp_size=4;
+    status = SDsetcompress(newsds,COMP_CODE_SKPHUFF,&cinfo);
+    CHECK(status, FAIL, "SDsetcompress");
+
+#ifdef QAK
+printf("before SDendaccess\n");
+#endif /* QAK */
+    status = SDendaccess(newsds);
+    CHECK(status, FAIL, "SDendaccess");
+
+    /* need to close to flush compressed info to file */
+    status = SDend(fcomp);
+    CHECK(status, FAIL, "SDend");
+
+    /* read the compressed data back in */
+#ifdef QAK
+printf("reading compressed dataset\n");
+#endif /* QAK */
+    fcomp = SDstart(COMPFILE3, DFACC_RDWR);
+    CHECK(fcomp, FAIL, "SDstart (again)");
+
+    newsds2 = SDselect(fcomp, 0);
+    if(newsds == FAIL) {
+        fprintf(stderr, "Failed to select a data set for compressed access\n");
+        num_errs++;
+    }
+
+    start[0] = start[1] = 0;
+    end[0]   = end[1]   = 5;
+#ifdef QAK
+printf("before SDreaddata\n");
+#endif /* QAK */
+    status = SDreaddata(newsds2, start, NULL, end, (VOIDP) rdata);
+    CHECK(status, FAIL, "SDreaddata");
+
+    for(i = 0; i < 25; i++)
+        if(fillval != rdata[i]) {
+            fprintf(stderr,"Bogus val in loc %d in compressed dset want %ld got %ld\n", i, (long)idata[i], (long)rdata[i]);
+            num_errs++;
+        }
+
+#ifdef QAK
+printf("before SDendaccess\n");
+#endif /* QAK */
+    status = SDendaccess(newsds2);
+    CHECK(status, FAIL, "SDendaccess");
+
+    status = SDend(fcomp);
+    CHECK(status, FAIL, "SDend");
+
+#ifdef QAK
+printf("creating 4th compressed dataset, compressed template read, then partial write & skipping huffman\n");
+#endif /* QAK */
+    fcomp = SDstart(COMPFILE4, DFACC_CREATE);
+    CHECK(fcomp, FAIL, "SDstart");
+
+    nt = DFNT_INT32;
+    dimsize[0] = 5;
+    dimsize[1] = 5;
+    newsds = SDcreate(fcomp, "CompDataSet4", nt, 2, dimsize);
+    if(newsds == FAIL) {
+        fprintf(stderr, "Failed to create a new data set for compression testing\n");
+        num_errs++;
+    }
+
+    fillval=67;
+#ifdef QAK
+printf("before SDsetfillvalue\n");
+#endif /* QAK */
+    status = SDsetfillvalue(newsds,(VOIDP)&fillval);
+    CHECK(status, FAIL, "SDsetfillvalue");
+
+#ifdef QAK
+printf("before SDsetcompress\n");
+#endif /* QAK */
+    cinfo.skphuff.skp_size=4;
+    status = SDsetcompress(newsds,COMP_CODE_SKPHUFF,&cinfo);
+    CHECK(status, FAIL, "SDsetcompress");
+
+#ifdef QAK
+printf("before SDendaccess\n");
+#endif /* QAK */
+    status = SDendaccess(newsds);
+    CHECK(status, FAIL, "SDendaccess");
+
+    /* need to close to flush compressed info to file */
+    status = SDend(fcomp);
+    CHECK(status, FAIL, "SDend");
+
+    /* read the compressed data back in */
+#ifdef QAK
+printf("reading compressed dataset\n");
+#endif /* QAK */
+    fcomp = SDstart(COMPFILE4, DFACC_RDWR);
+    CHECK(fcomp, FAIL, "SDstart (again)");
+
+    newsds2 = SDselect(fcomp, 0);
+    if(newsds == FAIL) {
+        fprintf(stderr, "Failed to select a data set for compressed access\n");
+        num_errs++;
+    }
+
+    start[0] = start[1] = 0;
+    end[0]   = end[1]   = 5;
+#ifdef QAK
+printf("before SDreaddata\n");
+#endif /* QAK */
+    status = SDreaddata(newsds2, start, NULL, end, (VOIDP) rdata);
+    CHECK(status, FAIL, "SDreaddata");
+
+    for(i = 0; i < 25; i++)
+        if(fillval != rdata[i]) {
+            fprintf(stderr,"Bogus val in loc %d in compressed dset want %ld got %ld\n", i, (long)idata[i], (long)rdata[i]);
+            num_errs++;
+        }
+
+#ifdef QAK
+printf("before SDendaccess\n");
+#endif /* QAK */
+    status = SDendaccess(newsds2);
+    CHECK(status, FAIL, "SDendaccess");
+
+    status = SDend(fcomp);
+    CHECK(status, FAIL, "SDend");
+
+#ifdef QAK
+printf("writing compressed dataset\n");
+#endif /* QAK */
+    fcomp = SDstart(COMPFILE4, DFACC_RDWR);
+    CHECK(fcomp, FAIL, "SDstart (again)");
+
+    newsds2 = SDselect(fcomp, 0);
+    if(newsds == FAIL) {
+        fprintf(stderr, "Failed to select a data set for compressed access\n");
+        num_errs++;
+    }
+    /* fill the array with the standard info */
+    for(i = 0; i < 25; i++)
+        idata[i] = i*10;
+    /* overwrite selected portions with the fill value */
+    for(i = 0; i < 10; i++)
+        idata[i] = fillval;
+    for(i = 20; i < 25; i++)
+        idata[i] = fillval;
+
+    start[0] = 2;
+    start[1] = 0;
+    end[0]   = 2;
+    end[1]   = 5;
+#ifdef QAK
+printf("before SDwritedata\n");
+#endif /* QAK */
+    status = SDwritedata(newsds, start, NULL, end, (VOIDP) &idata[10]);
+    CHECK(status, FAIL, "SDwritedata");
+
+
+#ifdef QAK
+printf("before SDendaccess\n");
+#endif /* QAK */
+    status = SDendaccess(newsds);
+    CHECK(status, FAIL, "SDendaccess");
+
+    /* need to close to flush compressed info to file */
+    status = SDend(fcomp);
+    CHECK(status, FAIL, "SDend");
+
+    fcomp = SDstart(COMPFILE4, DFACC_RDWR);
+    CHECK(fcomp, FAIL, "SDstart (again)");
+
+    newsds2 = SDselect(fcomp, 0);
+    if(newsds == FAIL) {
+        fprintf(stderr, "Failed to select a data set for compressed access\n");
+        num_errs++;
+    }
+
+    start[0] = start[1] = 0;
+    end[0]   = end[1]   = 5;
+#ifdef QAK
+printf("before SDreaddata\n");
+#endif /* QAK */
+    status = SDreaddata(newsds2, start, NULL, end, (VOIDP) rdata);
+    CHECK(status, FAIL, "SDreaddata");
+
+    for(i = 0; i < 25; i++)
+        if(idata[i] != rdata[i]) {
+            fprintf(stderr,"Bogus val in loc %d in compressed dset want %ld got %ld\n", i, (long)idata[i], (long)rdata[i]);
+            num_errs++;
+        }
+
+#ifdef QAK
+printf("before SDendaccess\n");
+#endif /* QAK */
+    status = SDendaccess(newsds2);
+    CHECK(status, FAIL, "SDendaccess");
+
+    status = SDend(fcomp);
+    CHECK(status, FAIL, "SDend");
+
+#ifdef QAK
+printf("writing 5th compressed dataset, basic RLE\n");
+#endif /* QAK */
+    fcomp = SDstart(COMPFILE5, DFACC_CREATE);
+    CHECK(fcomp, FAIL, "SDstart");
+
+    nt = DFNT_INT32;
+    dimsize[0] = 5;
+    dimsize[1] = 5;
+    newsds = SDcreate(fcomp, "CompDataSet5", nt, 2, dimsize);
+    if(newsds == FAIL) {
+        fprintf(stderr, "Failed to create a new data set for compression testing\n");
+        num_errs++;
+    }
+
+    for(i = 0; i < 25; i++)
+        idata[i] = i*10;
+
+#ifdef QAK
+printf("before SDsetcompress\n");
+#endif /* QAK */
+    status = SDsetcompress(newsds,COMP_CODE_RLE,&cinfo);
+    CHECK(status, FAIL, "SDcompress");
+
+    start[0] = start[1] = 0;
+    end[0]   = end[1]   = 5;
+#ifdef QAK
+printf("before SDwritedata\n");
+#endif /* QAK */
+    status = SDwritedata(newsds, start, NULL, end, (VOIDP) idata);
+    CHECK(status, FAIL, "SDwritedata");
+
+#ifdef QAK
+printf("before SDendaccess\n");
+#endif /* QAK */
+    status = SDendaccess(newsds);
+    CHECK(status, FAIL, "SDendaccess");
+
+    /* need to close to flush compressed info to file */
+    status = SDend(fcomp);
+    CHECK(status, FAIL, "SDend");
+
+    /* read the compressed data back in */
+#ifdef QAK
+printf("reading compressed dataset\n");
+#endif /* QAK */
+    fcomp = SDstart(COMPFILE5, DFACC_RDWR);
+    CHECK(fcomp, FAIL, "SDstart (again)");
+
+    newsds2 = SDselect(fcomp, 0);
+    if(newsds == FAIL) {
+        fprintf(stderr, "Failed to select a data set for compressed access\n");
+        num_errs++;
+    }
+
+    /*
+     * Retrieve and verify the compression info - bug# 307, 9/7/01 - BMR
+     */
+    comp_type = COMP_CODE_INVALID;  /* reset variables before retrieving info */
+    HDmemset(&cinfo, 0, sizeof(cinfo)) ;
+    status = SDgetcompress(newsds2, &comp_type, &cinfo);
+    CHECK(status, FAIL, "SDgetcompress");
+    VERIFY(comp_type, COMP_CODE_RLE, "SDgetcompress");
+
+    start[0] = start[1] = 0;
+    end[0]   = end[1]   = 5;
+#ifdef QAK
+printf("before SDreaddata\n");
+#endif /* QAK */
+    status = SDreaddata(newsds2, start, NULL, end, (VOIDP) rdata);
+    CHECK(status, FAIL, "SDreaddata");
+
+    for(i = 0; i < 25; i++)
+        if(idata[i] != rdata[i]) {
+            fprintf(stderr,"Bogus val in loc %d in compressed dset want %ld got %ld\n", i, (long)idata[i], (long)rdata[i]);
+            num_errs++;
+        }
+
+#ifdef QAK
+printf("before SDendaccess\n");
+#endif /* QAK */
+    status = SDendaccess(newsds2);
+    CHECK(status, FAIL, "SDendaccess");
+
+    status = SDend(fcomp);
+    CHECK(status, FAIL, "SDend");
+
+#ifdef QAK
+printf("writing 6th compressed dataset, no encoding\n");
+#endif /* QAK */
+    fcomp = SDstart(COMPFILE6, DFACC_CREATE);
+    CHECK(fcomp, FAIL, "SDstart");
+
+    nt = DFNT_INT32;
+    dimsize[0] = 5;
+    dimsize[1] = 5;
+    newsds = SDcreate(fcomp, "CompDataSet6", nt, 2, dimsize);
+    if(newsds == FAIL) {
+        fprintf(stderr, "Failed to create a new data set for compression testing\n");
+        num_errs++;
+    }
+
+    for(i = 0; i < 25; i++)
+        idata[i] = i*10;
+
+#ifdef QAK
+printf("before SDsetcompress\n");
+#endif /* QAK */
+    status = SDsetcompress(newsds,COMP_CODE_NONE,&cinfo);
+    CHECK(status, FAIL, "SDcompress");
+
+    start[0] = start[1] = 0;
+    end[0]   = end[1]   = 5;
+#ifdef QAK
+printf("before SDwritedata\n");
+#endif /* QAK */
+    status = SDwritedata(newsds, start, NULL, end, (VOIDP) idata);
+    CHECK(status, FAIL, "SDwritedata");
+
+#ifdef QAK
+printf("before SDendaccess\n");
+#endif /* QAK */
+    status = SDendaccess(newsds);
+    CHECK(status, FAIL, "SDendaccess");
+
+    /* need to close to flush compressed info to file */
+    status = SDend(fcomp);
+    CHECK(status, FAIL, "SDend");
+
+    /* read the compressed data back in */
+#ifdef QAK
+printf("reading compressed dataset\n");
+#endif /* QAK */
+    fcomp = SDstart(COMPFILE6, DFACC_RDWR);
+    CHECK(fcomp, FAIL, "SDstart (again)");
+
+    newsds2 = SDselect(fcomp, 0);
+    if(newsds == FAIL) {
+        fprintf(stderr, "Failed to select a data set for compressed access\n");
+        num_errs++;
+    }
+
+    /*
+     * Retrieve and verify the compression info - bug# 307, 9/7/01 - BMR
+     */
+    comp_type = COMP_CODE_INVALID;  /* reset variables before retrieving info */
+    HDmemset(&cinfo, 0, sizeof(cinfo)) ;
+    status = SDgetcompress(newsds2, &comp_type, &cinfo);
+    CHECK(status, FAIL, "SDgetcompress");
+    VERIFY(comp_type, COMP_CODE_NONE, "SDgetcompress");
+
+    start[0] = start[1] = 0;
+    end[0]   = end[1]   = 5;
+#ifdef QAK
+printf("before SDreaddata\n");
+#endif /* QAK */
+    status = SDreaddata(newsds2, start, NULL, end, (VOIDP) rdata);
+    CHECK(status, FAIL, "SDreaddata");
+
+    for(i = 0; i < 25; i++)
+        if(idata[i] != rdata[i]) {
+            fprintf(stderr,"Bogus val in loc %d in compressed dset want %ld got %ld\n", i, (long)idata[i], (long)rdata[i]);
+            num_errs++;
+        }
+
+#ifdef QAK
+printf("before SDendaccess\n");
+#endif /* QAK */
+    status = SDendaccess(newsds2);
+    CHECK(status, FAIL, "SDendaccess");
+
+    status = SDend(fcomp);
+    CHECK(status, FAIL, "SDend");
+
+#ifdef QAK
+printf("writing 7th compressed dataset, deflate encoding\n");
+#endif /* QAK */
+    fcomp = SDstart(COMPFILE7, DFACC_CREATE);
+    CHECK(fcomp, FAIL, "SDstart");
+
+    nt = DFNT_INT32;
+    dimsize[0] = 5;
+    dimsize[1] = 5;
+    newsds = SDcreate(fcomp, "CompDataSet7", nt, 2, dimsize);
+    if(newsds == FAIL) {
+        fprintf(stderr, "Failed to create a new data set for compression testing\n");
+        num_errs++;
+    }
+
+    for(i = 0; i < 25; i++)
+        idata[i] = i*10;
+
+#ifdef QAK
+printf("before SDsetcompress\n");
+#endif /* QAK */
+    cinfo.deflate.level=6;
+    status = SDsetcompress(newsds,COMP_CODE_DEFLATE,&cinfo);
+    CHECK(status, FAIL, "SDcompress");
+
+    start[0] = start[1] = 0;
+    end[0]   = end[1]   = 5;
+#ifdef QAK
+printf("before SDwritedata\n");
+#endif /* QAK */
+    status = SDwritedata(newsds, start, NULL, end, (VOIDP) idata);
+    CHECK(status, FAIL, "SDwritedata");
+
+#ifdef QAK
+printf("before SDendaccess\n");
+#endif /* QAK */
+    status = SDendaccess(newsds);
+    CHECK(status, FAIL, "SDendaccess");
+
+    /* need to close to flush compressed info to file */
+    status = SDend(fcomp);
+    CHECK(status, FAIL, "SDend");
+
+    /* read the compressed data back in */
+#ifdef QAK
+printf("reading compressed dataset\n");
+#endif /* QAK */
+    fcomp = SDstart(COMPFILE7, DFACC_RDWR);
+    CHECK(fcomp, FAIL, "SDstart (again)");
+
+    newsds2 = SDselect(fcomp, 0);
+    if(newsds == FAIL) {
+        fprintf(stderr, "Failed to select a data set for compressed access\n");
+        num_errs++;
+    }
+
+    /*
+     * Retrieve and verify the compression info - bug# 307, 9/7/01 - BMR
+     */
+    comp_type = COMP_CODE_INVALID;  /* reset variables before retrieving info */
+    HDmemset(&cinfo, 0, sizeof(cinfo)) ;
+    status = SDgetcompress(newsds2, &comp_type, &cinfo);
+    CHECK(status, FAIL, "SDgetcompress");
+    VERIFY(comp_type, COMP_CODE_DEFLATE, "SDgetcompress");
+    VERIFY(cinfo.deflate.level, 6, "SDgetcompress");
+
+    start[0] = start[1] = 0;
+    end[0]   = end[1]   = 5;
+#ifdef QAK
+printf("before SDreaddata\n");
+#endif /* QAK */
+    status = SDreaddata(newsds2, start, NULL, end, (VOIDP) rdata);
+    CHECK(status, FAIL, "SDreaddata");
+
+    for(i = 0; i < 25; i++)
+        if(idata[i] != rdata[i]) {
+            fprintf(stderr,"Bogus val in loc %d in compressed dset want %ld got %ld\n", i, (long)idata[i], (long)rdata[i]);
+            num_errs++;
+        }
+
+#ifdef QAK
+printf("before SDendaccess\n");
+#endif /* QAK */
+    status = SDendaccess(newsds2);
+    CHECK(status, FAIL, "SDendaccess");
+
+#ifdef QAK
+printf("before SDend\n");
+#endif /* QAK */
+    status = SDend(fcomp);
+    CHECK(status, FAIL, "SDend");
+
+    /* Return the number of errors that's been kept track of so far */
+    return num_errs;
+
+}   /* end test_compression */
+
 int 
 main(int argc, char *argv[])
 {
-    int32 f1, f2, fext, fnbit, fcomp; /* File handles */
+    int32 f1, f2, fext, fnbit; /* File handles */
     int32 nt;                /* Number type */
     int32 dimsize[10];       /* dimension sizes */
     int32 newsds, newsds2, newsds3; /* SDS handles */
@@ -1611,9 +2673,6 @@
     int32 num_sds;               /* number of SDS in file */
     int32 num_gattr;             /* Number of global attributes */
     int32 offset;                /* offset for ? */
-#if defined COMP_TEST 
-    comp_info cinfo;            /* compression information structure */
-#endif /* COMP_TEST */
     int32 index;       /* Index of dataset in file */
     int32 ival;
     int32 sdid;        /* another SDS handle */
@@ -1635,8 +2694,7 @@
     uint8   iuval;
     float32 data[1000], max, min, imax, imin;
     float64 cal, cale, ioff, ioffe;
-    intn emptySDS = FALSE;
-    int     num_err = 0;    /* number of errors so far */
+    int     num_errs = 0;    /* number of errors so far */
 
 
 #ifdef macintosh
@@ -1671,7 +2729,7 @@
     if (f1 != FAIL)
       {
           fprintf(stderr, "SDstart(..., RDONLY) should fail\n");
-          num_err++;
+          num_errs++;
           SDend(f1);
       }
 
@@ -1679,7 +2737,7 @@
     if (f1 != FAIL)
       {
           fprintf(stderr, "SDstart(..., RDWR) should fail\n");
-          num_err++;
+          num_errs++;
           SDend(f1);
       }
 
@@ -1699,7 +2757,7 @@
     if(num_gattr != 0) 
       {
           fprintf(stderr, "File %s still has stuff in it\n", FILE1);
-          num_err++;
+          num_errs++;
       }
 
     /* create a 4 by 8 dataset called DataSetAlpha in file test1.hdf */
@@ -1723,7 +2781,7 @@
     if(num_sds != 2) 
       {
         fprintf(stderr, "Wrong number of datasets in file 1\n");
-        num_err++;
+        num_errs++;
       }
 
     /* get dimension handle for first dimension? of DataSetGamma */
@@ -1744,7 +2802,7 @@
       {
         fprintf(stderr, "SDfindattr: Bad index for finding 'DimensionAttribute' %d\n",
                 status);
-        num_err++;
+        num_errs++;
       }
 
     /* Find out info about first atribute for dimension  */
@@ -1759,7 +2817,7 @@
     if(HDstrncmp(text, "TRUE", count)) 
       {
         fprintf(stderr, "SDreadattr: Invalid dimension attribute read <%s>\n", text);
-        num_err++;
+        num_errs++;
       }
 
     /* get First dimension of dataset 'DataSetAlpha' */
@@ -1796,7 +2854,7 @@
           {
               fprintf(stderr, "SDreaddata() returned %ld not %ld in location %d\n", 
                       (long)idata[i], (long)scale[i], i);
-              num_err++;
+              num_errs++;
           }
       }
 
@@ -1812,19 +2870,19 @@
     if(nt != DFNT_FLOAT32) 
       {
         fprintf(stderr, "Wrong number type for SDattrinfo(dim)\n");
-        num_err++;
+        num_errs++;
       }
 
     if(count != 1) 
       {
         fprintf(stderr, "Wrong count for SDattrinfo(dim)\n");
-        num_err++;
+        num_errs++;
       }
 
     if(strcmp(name, "DimAttr")) 
       {
         fprintf(stderr, "Wrong name for SDattrinfo(dim)\n");
-        num_err++;
+        num_errs++;
       }
 
     /* get second dimension of data set 'DataSetAlpha' */
@@ -1844,19 +2902,19 @@
     if(nt != DFNT_INT32) 
       {
         fprintf(stderr, "Wrong number type for SDattrinfo(dim)\n");
-        num_err++;
+        num_errs++;
       }
 
     if(count != 1) 
       {
         fprintf(stderr, "Wrong count for SDattrinfo(dim)\n");
-        num_err++;
+        num_errs++;
       }
 
     if(strcmp(name, "Integer")) 
       {
         fprintf(stderr, "Wrong name for SDattrinfo(dim)\n");
-        num_err++;
+        num_errs++;
       }
 
     /* read dimension attribute back in */
@@ -1867,7 +2925,7 @@
     if(ival != -256) 
       {
         fprintf(stderr, "Wrong value for SDreadattr(dim)\n");
-        num_err++;
+        num_errs++;
       }
 
     /* add an unsigned integer as an dimension attribute */
@@ -1882,19 +2940,19 @@
     if(nt != DFNT_UINT8) 
       {
         fprintf(stderr, "Wrong number type for SDattrinfo(dim)\n");
-        num_err++;
+        num_errs++;
       }
 
     if(count != 1) 
       {
         fprintf(stderr, "Wrong count for SDattrinfo(dim)\n");
-        num_err++;
+        num_errs++;
       }
 
     if(strcmp(name, "UnsignedInteger")) 
       {
         fprintf(stderr, "Wrong name for SDattrinfo(dim)\n");
-        num_err++;
+        num_errs++;
       }
 
     /* read second dimension attribute back in */
@@ -1905,7 +2963,7 @@
     if(iuval != 253) 
       {
         fprintf(stderr, "Wrong value for SDreadattr(dim)\n");
-        num_err++;
+        num_errs++;
       }
 
     /* Find index of data set 'DataSetAlpha' in file test1.hdf */
@@ -1913,7 +2971,7 @@
     if(status != 0) 
       {
         fprintf(stderr, "Couldn't find data set in file 1\n");
-        num_err++;
+        num_errs++;
       }
 
     /* Try finding data set in test2.hdf, should fail? */
@@ -1921,7 +2979,7 @@
     if(status != FAIL) 
       {
         fprintf(stderr, "Found data set in wrong file 2\n");
-        num_err++;
+        num_errs++;
       }
 
     /* Try finding non-existent dataset in file, should fail */
@@ -1929,7 +2987,7 @@
     if(status != FAIL) 
       {
         fprintf(stderr, "Found bogus data set in file 1\n");
-        num_err++;
+        num_errs++;
       }
 
     /* Set fill value for data set 'DataSetAlpha' assume we still have valid
@@ -1973,22 +3031,22 @@
     if(HDstrcmp(l, "TheLabel")) 
       {
         fprintf(stderr, "Bogus label returned (%s)\n", l);
-        num_err++;
+        num_errs++;
       }
     if(HDstrcmp(u, "TheUnits")) 
       {
         fprintf(stderr, "Bogus units returned (%s)\n", u);
-        num_err++;
+        num_errs++;
       }
     if(HDstrcmp(fmt, "")) 
       {
         fprintf(stderr, "Bogus format returned\n");
-        num_err++;
+        num_errs++;
       }
     if(HDstrcmp(c, "TheCordsys")) 
       {
         fprintf(stderr, "Bogus cordsys returned\n");
-        num_err++;
+        num_errs++;
       }
 
     /* retrieve CHAR attribute for 'DataSetAlpha' */
@@ -1996,7 +3054,7 @@
     if(status != 2) 
       {
         fprintf(stderr, "Bad index for SDfindattr\n");
-        num_err++;
+        num_errs++;
       }
 
     /* retrieve non-existent CHAR attribute for 'DataSetAlpha'. 
@@ -2005,7 +3063,7 @@
     if(status != FAIL) 
       {
         fprintf(stderr, "SDfindattr found non-existant attribute\n");
-        num_err++;
+        num_errs++;
       }
 
     /* hmm....set global attributes for File 'test1.hdf' */
@@ -2023,7 +3081,7 @@
     if(HDstrncmp(text, "globulator", count)) 
       {
         fprintf(stderr, "Invalid global attribute read <%s>\n", text);
-        num_err++;
+        num_errs++;
       }
 
     /* Get number of SDS and global attributes in file 'test2.hdf'.
@@ -2032,7 +3090,7 @@
     if(num_sds != 0) 
       {
         fprintf(stderr, "File2 still has stuff in it\n");
-        num_err++;
+        num_errs++;
       }
 
     /* Set calibration info for dataset 'DataSetGamma' in file 'test1.hdf' */
@@ -2056,7 +3114,7 @@
     if(num_sds != 1) 
       {
         fprintf(stderr, "Wrong number of datasets in file 2\n");
-        num_err++;
+        num_errs++;
       }
 
     for(i = 0; i < 50; i++)
@@ -2080,27 +3138,27 @@
     if(data[0] != -17.5) 
       {
         fprintf(stderr, "Wrong value returned loc 0: %f\n",(float)data[0]);
-        num_err++;
+        num_errs++;
       }
     if(data[3] != -17.5) 
       {
         fprintf(stderr, "Wrong value returned loc 3: %f\n",(float)data[3]);
-        num_err++;
+        num_errs++;
       }
     if(data[5] != 1.0) 
       {
         fprintf(stderr, "Wrong value returned loc 5: %f\n",(float)data[5]);
-        num_err++;
+        num_errs++;
       }
     if(data[6] != -17.5) 
       {
         fprintf(stderr, "Wrong value returned loc 6: %f\n",(float)data[6]);
-        num_err++;
+        num_errs++;
       }
     if(data[8] != 4.0) 
       {
         fprintf(stderr, "Wrong value returned loc 8: %f\n",(float)data[8]);
-        num_err++;
+        num_errs++;
       }
 
     for(i = 0; i < 50; i++)
@@ -2133,31 +3191,31 @@
     if(cal != 1.0) 
       {
         fprintf(stderr, "Wrong calibration info\n");
-        num_err++;
+        num_errs++;
       }
 
     if(cale != 5.0) 
       {
         fprintf(stderr, "Wrong calibration info\n");
-        num_err++;
+        num_errs++;
       }
 
     if(ioff != 3.0) 
       {
         fprintf(stderr, "Wrong calibration info\n");
-        num_err++;
+        num_errs++;
       }
 
     if(ioffe != 2.5) 
       {
         fprintf(stderr, "Wrong calibration info\n");
-        num_err++;
+        num_errs++;
       }
 
     if(nt != DFNT_INT8) 
       {
         fprintf(stderr, "Wrong calibration info\n");
-        num_err++;
+        num_errs++;
       }
 
     /* end access to data set 'DataSetAlpha' */
@@ -2172,19 +3230,6 @@
     status = SDendaccess(newsds3);
     CHECK(status, FAIL, "SDendaccess");
 
-    /* BMR - 2/21/99: added a 2x2 dataset called EmptyDataset to file 
-       'test1.hdf' to later test new routine SDcheckempty.  */
-
-    /* create a 2x2 dataset called EmptyDataset in file test1.hdf */
-    dimsize[0] = 2;
-    dimsize[1] = 2;
-    newsds = SDcreate(f1, "EmptyDataset", DFNT_FLOAT32, 2, dimsize);
-    CHECK(newsds, FAIL, "SDcreate: Failed to create a new data set EmptyDataset ");
-    /* Close down this SDS*/
-    status = SDendaccess(newsds);
-    CHECK(status, FAIL, "Test empty SDS. SDendaccess");
-    /* end BMR */
-
     /* Close access to file 'test1.hdf' */
     status = SDend(f1);
     CHECK(status, FAIL, "SDend");
@@ -2217,7 +3262,6 @@
     sdid = SDcreate(f1, "FIXED1", DFNT_INT32, 2, dimsize);
     CHECK(sdid, FAIL, "SDcreate:Fail to create data set 'FIXED1' in 'test1.hdf'");
 
-
     for (i=0; i<30; i++)
         idata[i] = i+100;
 
@@ -2286,24 +3330,6 @@
     status = SDendaccess(sdid);
     CHECK(status, FAIL, "SDendaccess");
 
-    /* BMR - 2/21/99: get index of dataset 'EmptyDataset' */
-    index = SDnametoindex(f1, "EmptyDataset");
-    CHECK(index, FAIL, "SDnametoindex: (EmptyDataset)");
-    
-    /* Select dataset 'EmptyDataset' */
-    sdsid = SDselect(f1, index);
-
-    /* This dataset should be empty, if SDcheckempty returns FAIL or the
-       parameter emptySDS is not TRUE, the test fails */
-    status = SDcheckempty( sdsid, &emptySDS );    
-    CHECK( status, FAIL, "SDcheckempty" );
-    VERIFY( emptySDS, TRUE, "SDcheckempty" );
-
-    /* end access to data set 'EmptyDataset' */
-    status = SDendaccess(sdsid);
-    CHECK(status, FAIL, "SDendaccess");
-    /* end BMR */
-
     /* close file 'test1.hdf' */
     status = SDend(f1);
     CHECK(status, FAIL, "SDend");
@@ -2324,7 +3350,7 @@
     index = SDnametoindex(f1, "FIXED");
     CHECK(index, FAIL, "SDnametoindex: (FIXED)");
 
-    /* Select the data set 'FIXED' based on it's index */
+    /* Select the data set 'FIXED' based on its index */
     sdid = SDselect(f1, index);
     CHECK(sdid, FAIL, "SDselect: (FIXED)");
 
@@ -2336,7 +3362,7 @@
     status = SDwritedata(sdid, start, NULL, end, (VOIDP)idata);
     CHECK(status, FAIL, "SDwritedata (SD_FILL)");
 
-    /* end acces to data set 'FIXED' */
+    /* end access to data set 'FIXED' */
     status = SDendaccess(sdid);
     CHECK(status, FAIL, "SDendaccess");
 
@@ -2354,7 +3380,7 @@
     index = SDnametoindex(f1, "FIXED");
     CHECK(index, FAIL, "SDnametoindex (FIXED)");
 
-    /* Select the data set 'FIXED' based on it's index */
+    /* Select the data set 'FIXED' based on its index */
     sdid = SDselect(f1, index);
     CHECK(sdid, FAIL, "SDselect (FIXED)");
 
@@ -2372,9 +3398,9 @@
         if ((idata[i] != 100 + (i-12)) ||
             (idata[i+12] != 100 + (i-12))) 
           {
-           fprintf(stderr, "wrong value: should be %d, got %d %d\n",
-                           100 + i-12, (int)idata[i], (int)idata[i+12]);
-           num_err++;
+           fprintf(stderr, "line %d, wrong value: should be %d, got %d %d\n",
+                           __LINE__,100 + i-12, (int)idata[i], (int)idata[i+12]);
+           num_errs++;
           }
       }
     
@@ -2382,9 +3408,9 @@
       {
         if (idata[i] ==fillval) 
           {
-           fprintf(stderr, "wrong value: should not be %d, got %d\n",
-                           (int)fillval, (int)idata[i]);
-           num_err++;
+           fprintf(stderr, "line %d, wrong value: should not be %d, got %d\n",
+                           __LINE__,(int)fillval, (int)idata[i]);
+           num_errs++;
           }
       }
 
@@ -2398,7 +3424,7 @@
     index = SDnametoindex(f1, "FIXED1");
     CHECK(index, FAIL, "SDnametoindex (FIXED1)");
 
-    /* select dataset 'FIXED1' based on it's index in the file */
+    /* select dataset 'FIXED1' based on its index in the file */
     sdid = SDselect(f1, index);
     CHECK(sdid, FAIL, "SDselect (FIXED1)");
 
@@ -2415,9 +3441,9 @@
       {
         if (idata[i] != (100 + (i-12)))  
           {
-           fprintf(stderr, "wrong value: should be %d, got %d \n",
-                           100 + i-12, (int)idata[i]);
-           num_err++;
+           fprintf(stderr, "line %d, wrong value: should be %d, got %d \n",
+                           __LINE__, 100 + i-12, (int)idata[i]);
+           num_errs++;
           }
       }
 
@@ -2425,9 +3451,9 @@
       {
         if (idata[i] != fillval) 
           {
-           fprintf(stderr, "wrong value: should be %d, got %d\n",
-                           (int)fillval, (int)idata[i]);
-           num_err++;
+           fprintf(stderr, "line %d, wrong value: should be %d, got %d\n",
+                           __LINE__, (int)fillval, (int)idata[i]);
+           num_errs++;
           }
       }
 
@@ -2496,7 +3522,7 @@
     index = SDnametoindex(f1, "UNLIMITED_SDS");
     CHECK(index, FAIL, "SDnametoindex: (UNLIMITED)");
 
-    /* select data set 'UNLIMITED_SDS' based on it's index in the file */
+    /* select data set 'UNLIMITED_SDS' based on its index in the file */
     sdid = SDselect(f1, index);
     CHECK(sdid, FAIL, "SDselect: (UNLIMITED)");
 
@@ -2543,9 +3569,9 @@
       {
         if ((idata[i] != (i-12)) || (idata[i+12] != (i-12))) 
           {
-           fprintf(stderr, "wrong value for %d: should be %d, got %d\n",
-                           i-12, (int)idata[i], (int)idata[i+12]);
-           num_err++;
+           fprintf(stderr, "line %d, wrong value for %d: should be %d, got %d\n",
+                           __LINE__, i-12, (int)idata[i], (int)idata[i+12]);
+           num_errs++;
           }
       }
 
@@ -2553,9 +3579,9 @@
       {
         if (idata[i] !=fillval) 
           {
-           fprintf(stderr, "wrong value: should be %d, got %d\n",
-                           (int)fillval, (int)idata[i]);
-           num_err++;
+           fprintf(stderr, "line %d, wrong value: should be %d, got %d\n",
+                           __LINE__, (int)fillval, (int)idata[i]);
+           num_errs++;
           }
       }
 
@@ -2643,7 +3669,7 @@
     if (rank!=2 || dimsize[0]!=4 || dimsize[1]!=6 || nt!=DFNT_INT32) 
       {
         fprintf(stderr, "SDgetinfo returned wrong values\n");
-          num_err++;
+          num_errs++;
       }
 
     /* get handle for first dimension of data set 'dimval_1_compat' */
@@ -2658,14 +3684,14 @@
     if (dimsize[0]!=SD_UNLIMITED || nt!= 0 )  
       {
           fprintf(stderr, "SDdiminfo returned wrong values\n");
-          num_err++;
+          num_errs++;
       }
     /* is it backward non-compatible? */
     status = SDisdimval_bwcomp(dimid);
     if (status != SD_DIMVAL_BW_INCOMP)
        { 
            fprintf(stderr, "SDisdimvalcomp returned wrong value for dimension.\n");
-            num_err++;
+            num_errs++;
        }
     /* re-set first dimension as backward compatible */
     status = SDsetdimval_comp(dimid, SD_DIMVAL_BW_COMP);
@@ -2683,7 +3709,7 @@
     if (dimsize[1]!=6 || nt!= DFNT_INT32 )  
       {
           fprintf(stderr, "Failed on SDgetinfo call\n");
-          num_err++;
+          num_errs++;
       }
 
     /* read data back from data set 'dimval_1_compat' */
@@ -2695,9 +3721,9 @@
       {
         if (idata[i] != i) 
           {
-           fprintf(stderr, "wrong value: should be %d, got %d\n",
-                           i, (int)idata[i]);
-           num_err++;
+           fprintf(stderr, "line %d, wrong value: should be %d, got %d\n",
+                           __LINE__, i, (int)idata[i]);
+           num_errs++;
           }
       }
 
@@ -2707,7 +3733,7 @@
     if (status != SD_DIMVAL_BW_COMP)  
       {
           fprintf(stderr, "SDisdimvalcomp returned wrong value for dimension\n");
-          num_err++;
+          num_errs++;
       }
 
     /* re-set second dimension as backward non-compatible */
@@ -2745,7 +3771,7 @@
     if (rank!=2 || dimsize[0]!=4 || dimsize[1]!=6 || nt!=DFNT_INT32) 
       {
         fprintf(stderr, "SDgetinfo returned wrong values\n");
-          num_err++;
+          num_errs++;
       }
 
     /* get handle for second dimension of data set 'dimval_1_compat' */
@@ -2760,7 +3786,7 @@
     if (dimsize[1]!=6 || nt!= DFNT_INT32 )  
       {
           fprintf(stderr, "Failed on SDgetinfo call\n");
-          num_err++;
+          num_errs++;
       }
 
     /* see if second dimensionis backward compatible. 
@@ -2769,7 +3795,7 @@
     if (status != SD_DIMVAL_BW_INCOMP)  
       {
           fprintf(stderr, "SDisdimvalcomp returned wrong value\n");
-          num_err++;
+          num_errs++;
       }
     /* re-set second dimension as backward compatible */
     status = SDsetdimval_comp(dimid1, SD_DIMVAL_BW_COMP);
@@ -2794,7 +3820,7 @@
     if(ndg_saved_ref != SDidtoref(sdsid)) 
       {
         fprintf(stderr, "Saved NDG ref != to SDindextoref of same\n");
-        num_err++;
+        num_errs++;
       }
 
     /* end access to data set 'DataSetAlpha' in file 'test1.hdf' */    
@@ -2888,7 +3914,7 @@
           {
             fprintf(stderr, "Bogus val in loc %d in wrapper dset want %d  got %ld\n", 
 		    i, (i + 2) * 10, (long)idata[i]);
-            num_err++;
+            num_errs++;
           }
       }
 
@@ -2896,7 +3922,7 @@
       {
         fprintf(stderr, "Bogus val in last loc in wrapper dset want 10  got %ld\n",
 		(long)idata[8]);
-        num_err++;
+        num_errs++;
       }
 
     /* End access to data set "WrapperDataSet" */
@@ -2971,7 +3997,7 @@
           {
             fprintf(stderr,"Bogus val in loc %d in n-bit dset want %ld got %ld\n",
 		    i, (long)idata[i], (long)rdata[i]);
-            num_err++;
+            num_errs++;
           }
       }
 
@@ -2989,659 +4015,62 @@
     /*
      * Test the compressed storage routines
      */
+    status = test_compression();
+    CHECK(status, FAIL, "test_chunk");
+    num_errs = num_errs + status;
 
-#ifdef QAK
-printf("writing 1st compressed dataset, basic skipping huffman\n");
-#endif /* QAK */
-    fcomp = SDstart(COMPFILE1, DFACC_CREATE);
-    CHECK(fcomp, FAIL, "SDstart");
-
-    nt = DFNT_INT32;
-    dimsize[0] = 5;
-    dimsize[1] = 5;
-    newsds = SDcreate(fcomp, "CompDataSet1", nt, 2, dimsize);
-    if(newsds == FAIL) {
-        fprintf(stderr, "Failed to create a new data set for compression testing\n");
-        num_err++;
-    }
-
-    for(i = 0; i < 25; i++)
-        idata[i] = i*10;
-
-#ifdef QAK
-printf("before SDsetcompress\n");
-#endif /* QAK */
-    cinfo.skphuff.skp_size=4;
-    status = SDsetcompress(newsds,COMP_CODE_SKPHUFF,&cinfo);
-    CHECK(status, FAIL, "SDcompress");
-
-    start[0] = start[1] = 0;
-    end[0]   = end[1]   = 5;
-#ifdef QAK
-printf("before SDwritedata\n");
-#endif /* QAK */
-    status = SDwritedata(newsds, start, NULL, end, (VOIDP) idata);
-    CHECK(status, FAIL, "SDwritedata");
-
-#ifdef QAK
-printf("before SDendaccess\n");
-#endif /* QAK */
-    status = SDendaccess(newsds);
-    CHECK(status, FAIL, "SDendaccess");
-
-    /* need to close to flush compressed info to file */
-    status = SDend(fcomp);
-    CHECK(status, FAIL, "SDend");
-
-    /* read the compressed data back in */
-#ifdef QAK
-printf("reading compressed dataset\n");
-#endif /* QAK */
-    fcomp = SDstart(COMPFILE1, DFACC_RDWR);
-    CHECK(fcomp, FAIL, "SDstart (again)");
-
-    newsds2 = SDselect(fcomp, 0);
-    if(newsds == FAIL) {
-        fprintf(stderr, "Failed to select a data set for compressed access\n");
-        num_err++;
-    }
-
-    start[0] = start[1] = 0;
-    end[0]   = end[1]   = 5;
-#ifdef QAK
-printf("before SDreaddata\n");
-#endif /* QAK */
-    status = SDreaddata(newsds2, start, NULL, end, (VOIDP) rdata);
-    CHECK(status, FAIL, "SDreaddata");
-
-    for(i = 0; i < 25; i++)
-        if(idata[i] != rdata[i]) {
-            fprintf(stderr,"Bogus val in loc %d in compressed dset want %ld got %ld\n", i, (long)idata[i], (long)rdata[i]);
-            num_err++;
-        }
-
-#ifdef QAK
-printf("before SDendaccess\n");
-#endif /* QAK */
-    status = SDendaccess(newsds2);
-    CHECK(status, FAIL, "SDendaccess");
-
-    status = SDend(fcomp);
-    CHECK(status, FAIL, "SDend");
-
-#ifdef QAK
-printf("writing 2nd compressed dataset, partially filled & skipping huffman\n");
-#endif /* QAK */
-    fcomp = SDstart(COMPFILE2, DFACC_CREATE);
-    CHECK(fcomp, FAIL, "SDstart");
-
-    nt = DFNT_INT32;
-    dimsize[0] = 5;
-    dimsize[1] = 5;
-    newsds = SDcreate(fcomp, "CompDataSet2", nt, 2, dimsize);
-    if(newsds == FAIL) {
-        fprintf(stderr, "Failed to create a new data set for compression testing\n");
-        num_err++;
-    }
-
-    fillval=43;
-#ifdef QAK
-printf("before SDsetfillvalue\n");
-#endif /* QAK */
-    status = SDsetfillvalue(newsds,(VOIDP)&fillval);
-    CHECK(status, FAIL, "SDsetfillvalue");
-
-#ifdef QAK
-printf("before SDsetcompress\n");
-#endif /* QAK */
-    cinfo.skphuff.skp_size=4;
-    status = SDsetcompress(newsds,COMP_CODE_SKPHUFF,&cinfo);
-    CHECK(status, FAIL, "SDsetcompress");
-
-    /* fill the array with the standard info */
-    for(i = 0; i < 25; i++)
-        idata[i] = i*10;
-    /* overwrite selected portions with the fill value */
-    for(i = 0; i < 5; i++)
-        idata[i] = fillval;
-    for(i = 20; i < 25; i++)
-        idata[i] = fillval;
-
-    start[0] = 1;
-    start[1] = 0;
-    end[0]   = 3;
-    end[1]   = 5;
-#ifdef QAK
-printf("before SDwritedata\n");
-#endif /* QAK */
-    status = SDwritedata(newsds, start, NULL, end, (VOIDP) &idata[5]);
-    CHECK(status, FAIL, "SDwritedata");
-
-#ifdef QAK
-printf("before SDendaccess\n");
-#endif /* QAK */
-    status = SDendaccess(newsds);
-    CHECK(status, FAIL, "SDendaccess");
-
-    /* need to close to flush compressed info to file */
-    status = SDend(fcomp);
-    CHECK(status, FAIL, "SDend");
-
-    /* read the compressed data back in */
-#ifdef QAK
-printf("reading compressed dataset\n");
-#endif /* QAK */
-    fcomp = SDstart(COMPFILE2, DFACC_RDWR);
-    CHECK(fcomp, FAIL, "SDstart (again)");
-
-    newsds2 = SDselect(fcomp, 0);
-    if(newsds == FAIL) {
-        fprintf(stderr, "Failed to select a data set for compressed access\n");
-        num_err++;
-    }
-
-    start[0] = start[1] = 0;
-    end[0]   = end[1]   = 5;
-#ifdef QAK
-printf("before SDreaddata\n");
-#endif /* QAK */
-    status = SDreaddata(newsds2, start, NULL, end, (VOIDP) rdata);
-    CHECK(status, FAIL, "SDreaddata");
-
-    for(i = 0; i < 25; i++)
-        if(idata[i] != rdata[i]) {
-            fprintf(stderr,"Bogus val in loc %d in compressed dset want %ld got %ld\n", i, (long)idata[i], (long)rdata[i]);
-            num_err++;
-        }
-
-#ifdef QAK
-printf("before SDendaccess\n");
-#endif /* QAK */
-    status = SDendaccess(newsds2);
-    CHECK(status, FAIL, "SDendaccess");
-
-    status = SDend(fcomp);
-    CHECK(status, FAIL, "SDend");
-
-#ifdef QAK
-printf("creating 3rd compressed dataset, compressed template & skipping huffman\n");
-#endif /* QAK */
-    fcomp = SDstart(COMPFILE3, DFACC_CREATE);
-    CHECK(fcomp, FAIL, "SDstart");
-
-    nt = DFNT_INT32;
-    dimsize[0] = 5;
-    dimsize[1] = 5;
-    newsds = SDcreate(fcomp, "CompDataSet3", nt, 2, dimsize);
-    if(newsds == FAIL) {
-        fprintf(stderr, "Failed to create a new data set for compression testing\n");
-        num_err++;
-    }
-
-    fillval=56;
-#ifdef QAK
-printf("before SDsetfillvalue\n");
-#endif /* QAK */
-    status = SDsetfillvalue(newsds,(VOIDP)&fillval);
-    CHECK(status, FAIL, "SDsetfillvalue");
-
-#ifdef QAK
-printf("before SDsetcompress\n");
-#endif /* QAK */
-    cinfo.skphuff.skp_size=4;
-    status = SDsetcompress(newsds,COMP_CODE_SKPHUFF,&cinfo);
-    CHECK(status, FAIL, "SDsetcompress");
-
-#ifdef QAK
-printf("before SDendaccess\n");
-#endif /* QAK */
-    status = SDendaccess(newsds);
-    CHECK(status, FAIL, "SDendaccess");
-
-    /* need to close to flush compressed info to file */
-    status = SDend(fcomp);
-    CHECK(status, FAIL, "SDend");
-
-    /* read the compressed data back in */
-#ifdef QAK
-printf("reading compressed dataset\n");
-#endif /* QAK */
-    fcomp = SDstart(COMPFILE3, DFACC_RDWR);
-    CHECK(fcomp, FAIL, "SDstart (again)");
-
-    newsds2 = SDselect(fcomp, 0);
-    if(newsds == FAIL) {
-        fprintf(stderr, "Failed to select a data set for compressed access\n");
-        num_err++;
-    }
-
-    start[0] = start[1] = 0;
-    end[0]   = end[1]   = 5;
-#ifdef QAK
-printf("before SDreaddata\n");
-#endif /* QAK */
-    status = SDreaddata(newsds2, start, NULL, end, (VOIDP) rdata);
-    CHECK(status, FAIL, "SDreaddata");
-
-    for(i = 0; i < 25; i++)
-        if(fillval != rdata[i]) {
-            fprintf(stderr,"Bogus val in loc %d in compressed dset want %ld got %ld\n", i, (long)idata[i], (long)rdata[i]);
-            num_err++;
-        }
-
-#ifdef QAK
-printf("before SDendaccess\n");
-#endif /* QAK */
-    status = SDendaccess(newsds2);
-    CHECK(status, FAIL, "SDendaccess");
-
-    status = SDend(fcomp);
-    CHECK(status, FAIL, "SDend");
-
-#ifdef QAK
-printf("creating 4th compressed dataset, compressed template read, then partial write & skipping huffman\n");
-#endif /* QAK */
-    fcomp = SDstart(COMPFILE4, DFACC_CREATE);
-    CHECK(fcomp, FAIL, "SDstart");
-
-    nt = DFNT_INT32;
-    dimsize[0] = 5;
-    dimsize[1] = 5;
-    newsds = SDcreate(fcomp, "CompDataSet4", nt, 2, dimsize);
-    if(newsds == FAIL) {
-        fprintf(stderr, "Failed to create a new data set for compression testing\n");
-        num_err++;
-    }
-
-    fillval=67;
-#ifdef QAK
-printf("before SDsetfillvalue\n");
-#endif /* QAK */
-    status = SDsetfillvalue(newsds,(VOIDP)&fillval);
-    CHECK(status, FAIL, "SDsetfillvalue");
-
-#ifdef QAK
-printf("before SDsetcompress\n");
-#endif /* QAK */
-    cinfo.skphuff.skp_size=4;
-    status = SDsetcompress(newsds,COMP_CODE_SKPHUFF,&cinfo);
-    CHECK(status, FAIL, "SDsetcompress");
-
-#ifdef QAK
-printf("before SDendaccess\n");
-#endif /* QAK */
-    status = SDendaccess(newsds);
-    CHECK(status, FAIL, "SDendaccess");
-
-    /* need to close to flush compressed info to file */
-    status = SDend(fcomp);
-    CHECK(status, FAIL, "SDend");
-
-    /* read the compressed data back in */
-#ifdef QAK
-printf("reading compressed dataset\n");
-#endif /* QAK */
-    fcomp = SDstart(COMPFILE4, DFACC_RDWR);
-    CHECK(fcomp, FAIL, "SDstart (again)");
-
-    newsds2 = SDselect(fcomp, 0);
-    if(newsds == FAIL) {
-        fprintf(stderr, "Failed to select a data set for compressed access\n");
-        num_err++;
-    }
-
-    start[0] = start[1] = 0;
-    end[0]   = end[1]   = 5;
-#ifdef QAK
-printf("before SDreaddata\n");
-#endif /* QAK */
-    status = SDreaddata(newsds2, start, NULL, end, (VOIDP) rdata);
-    CHECK(status, FAIL, "SDreaddata");
-
-    for(i = 0; i < 25; i++)
-        if(fillval != rdata[i]) {
-            fprintf(stderr,"Bogus val in loc %d in compressed dset want %ld got %ld\n", i, (long)idata[i], (long)rdata[i]);
-            num_err++;
-        }
-
-#ifdef QAK
-printf("before SDendaccess\n");
-#endif /* QAK */
-    status = SDendaccess(newsds2);
-    CHECK(status, FAIL, "SDendaccess");
-
-    status = SDend(fcomp);
-    CHECK(status, FAIL, "SDend");
-
-#ifdef QAK
-printf("writing compressed dataset\n");
-#endif /* QAK */
-    fcomp = SDstart(COMPFILE4, DFACC_RDWR);
-    CHECK(fcomp, FAIL, "SDstart (again)");
-
-    newsds2 = SDselect(fcomp, 0);
-    if(newsds == FAIL) {
-        fprintf(stderr, "Failed to select a data set for compressed access\n");
-        num_err++;
-    }
-    /* fill the array with the standard info */
-    for(i = 0; i < 25; i++)
-        idata[i] = i*10;
-    /* overwrite selected portions with the fill value */
-    for(i = 0; i < 10; i++)
-        idata[i] = fillval;
-    for(i = 20; i < 25; i++)
-        idata[i] = fillval;
-
-    start[0] = 2;
-    start[1] = 0;
-    end[0]   = 2;
-    end[1]   = 5;
-#ifdef QAK
-printf("before SDwritedata\n");
-#endif /* QAK */
-    status = SDwritedata(newsds, start, NULL, end, (VOIDP) &idata[10]);
-    CHECK(status, FAIL, "SDwritedata");
-
-
-#ifdef QAK
-printf("before SDendaccess\n");
-#endif /* QAK */
-    status = SDendaccess(newsds);
-    CHECK(status, FAIL, "SDendaccess");
-
-    /* need to close to flush compressed info to file */
-    status = SDend(fcomp);
-    CHECK(status, FAIL, "SDend");
-
-    fcomp = SDstart(COMPFILE4, DFACC_RDWR);
-    CHECK(fcomp, FAIL, "SDstart (again)");
-
-    newsds2 = SDselect(fcomp, 0);
-    if(newsds == FAIL) {
-        fprintf(stderr, "Failed to select a data set for compressed access\n");
-        num_err++;
-    }
-
-    start[0] = start[1] = 0;
-    end[0]   = end[1]   = 5;
-#ifdef QAK
-printf("before SDreaddata\n");
-#endif /* QAK */
-    status = SDreaddata(newsds2, start, NULL, end, (VOIDP) rdata);
-    CHECK(status, FAIL, "SDreaddata");
-
-    for(i = 0; i < 25; i++)
-        if(idata[i] != rdata[i]) {
-            fprintf(stderr,"Bogus val in loc %d in compressed dset want %ld got %ld\n", i, (long)idata[i], (long)rdata[i]);
-            num_err++;
-        }
-
-#ifdef QAK
-printf("before SDendaccess\n");
-#endif /* QAK */
-    status = SDendaccess(newsds2);
-    CHECK(status, FAIL, "SDendaccess");
-
-    status = SDend(fcomp);
-    CHECK(status, FAIL, "SDend");
-
-#ifdef QAK
-printf("writing 5th compressed dataset, basic RLE\n");
-#endif /* QAK */
-    fcomp = SDstart(COMPFILE5, DFACC_CREATE);
-    CHECK(fcomp, FAIL, "SDstart");
-
-    nt = DFNT_INT32;
-    dimsize[0] = 5;
-    dimsize[1] = 5;
-    newsds = SDcreate(fcomp, "CompDataSet5", nt, 2, dimsize);
-    if(newsds == FAIL) {
-        fprintf(stderr, "Failed to create a new data set for compression testing\n");
-        num_err++;
-    }
-
-    for(i = 0; i < 25; i++)
-        idata[i] = i*10;
-
-#ifdef QAK
-printf("before SDsetcompress\n");
-#endif /* QAK */
-    status = SDsetcompress(newsds,COMP_CODE_RLE,&cinfo);
-    CHECK(status, FAIL, "SDcompress");
-
-    start[0] = start[1] = 0;
-    end[0]   = end[1]   = 5;
-#ifdef QAK
-printf("before SDwritedata\n");
-#endif /* QAK */
-    status = SDwritedata(newsds, start, NULL, end, (VOIDP) idata);
-    CHECK(status, FAIL, "SDwritedata");
-
-#ifdef QAK
-printf("before SDendaccess\n");
-#endif /* QAK */
-    status = SDendaccess(newsds);
-    CHECK(status, FAIL, "SDendaccess");
-
-    /* need to close to flush compressed info to file */
-    status = SDend(fcomp);
-    CHECK(status, FAIL, "SDend");
-
-    /* read the compressed data back in */
-#ifdef QAK
-printf("reading compressed dataset\n");
-#endif /* QAK */
-    fcomp = SDstart(COMPFILE5, DFACC_RDWR);
-    CHECK(fcomp, FAIL, "SDstart (again)");
-
-    newsds2 = SDselect(fcomp, 0);
-    if(newsds == FAIL) {
-        fprintf(stderr, "Failed to select a data set for compressed access\n");
-        num_err++;
-    }
-
-    start[0] = start[1] = 0;
-    end[0]   = end[1]   = 5;
-#ifdef QAK
-printf("before SDreaddata\n");
-#endif /* QAK */
-    status = SDreaddata(newsds2, start, NULL, end, (VOIDP) rdata);
-    CHECK(status, FAIL, "SDreaddata");
-
-    for(i = 0; i < 25; i++)
-        if(idata[i] != rdata[i]) {
-            fprintf(stderr,"Bogus val in loc %d in compressed dset want %ld got %ld\n", i, (long)idata[i], (long)rdata[i]);
-            num_err++;
-        }
-
-#ifdef QAK
-printf("before SDendaccess\n");
-#endif /* QAK */
-    status = SDendaccess(newsds2);
-    CHECK(status, FAIL, "SDendaccess");
-
-    status = SDend(fcomp);
-    CHECK(status, FAIL, "SDend");
-
-#ifdef QAK
-printf("writing 6th compressed dataset, no encoding\n");
-#endif /* QAK */
-    fcomp = SDstart(COMPFILE6, DFACC_CREATE);
-    CHECK(fcomp, FAIL, "SDstart");
-
-    nt = DFNT_INT32;
-    dimsize[0] = 5;
-    dimsize[1] = 5;
-    newsds = SDcreate(fcomp, "CompDataSet6", nt, 2, dimsize);
-    if(newsds == FAIL) {
-        fprintf(stderr, "Failed to create a new data set for compression testing\n");
-        num_err++;
-    }
-
-    for(i = 0; i < 25; i++)
-        idata[i] = i*10;
-
-#ifdef QAK
-printf("before SDsetcompress\n");
-#endif /* QAK */
-    status = SDsetcompress(newsds,COMP_CODE_NONE,&cinfo);
-    CHECK(status, FAIL, "SDcompress");
-
-    start[0] = start[1] = 0;
-    end[0]   = end[1]   = 5;
-#ifdef QAK
-printf("before SDwritedata\n");
-#endif /* QAK */
-    status = SDwritedata(newsds, start, NULL, end, (VOIDP) idata);
-    CHECK(status, FAIL, "SDwritedata");
-
-#ifdef QAK
-printf("before SDendaccess\n");
-#endif /* QAK */
-    status = SDendaccess(newsds);
-    CHECK(status, FAIL, "SDendaccess");
-
-    /* need to close to flush compressed info to file */
-    status = SDend(fcomp);
-    CHECK(status, FAIL, "SDend");
-
-    /* read the compressed data back in */
-#ifdef QAK
-printf("reading compressed dataset\n");
-#endif /* QAK */
-    fcomp = SDstart(COMPFILE6, DFACC_RDWR);
-    CHECK(fcomp, FAIL, "SDstart (again)");
-
-    newsds2 = SDselect(fcomp, 0);
-    if(newsds == FAIL) {
-        fprintf(stderr, "Failed to select a data set for compressed access\n");
-        num_err++;
-    }
-
-    start[0] = start[1] = 0;
-    end[0]   = end[1]   = 5;
-#ifdef QAK
-printf("before SDreaddata\n");
-#endif /* QAK */
-    status = SDreaddata(newsds2, start, NULL, end, (VOIDP) rdata);
-    CHECK(status, FAIL, "SDreaddata");
-
-    for(i = 0; i < 25; i++)
-        if(idata[i] != rdata[i]) {
-            fprintf(stderr,"Bogus val in loc %d in compressed dset want %ld got %ld\n", i, (long)idata[i], (long)rdata[i]);
-            num_err++;
-        }
-
-#ifdef QAK
-printf("before SDendaccess\n");
-#endif /* QAK */
-    status = SDendaccess(newsds2);
-    CHECK(status, FAIL, "SDendaccess");
-
-    status = SDend(fcomp);
-    CHECK(status, FAIL, "SDend");
-
-#ifdef QAK
-printf("writing 7th compressed dataset, deflate encoding\n");
-#endif /* QAK */
-    fcomp = SDstart(COMPFILE7, DFACC_CREATE);
-    CHECK(fcomp, FAIL, "SDstart");
-
-    nt = DFNT_INT32;
-    dimsize[0] = 5;
-    dimsize[1] = 5;
-    newsds = SDcreate(fcomp, "CompDataSet7", nt, 2, dimsize);
-    if(newsds == FAIL) {
-        fprintf(stderr, "Failed to create a new data set for compression testing\n");
-        num_err++;
-    }
-
-    for(i = 0; i < 25; i++)
-        idata[i] = i*10;
-
-#ifdef QAK
-printf("before SDsetcompress\n");
-#endif /* QAK */
-    cinfo.deflate.level=6;
-    status = SDsetcompress(newsds,COMP_CODE_DEFLATE,&cinfo);
-    CHECK(status, FAIL, "SDcompress");
-
-    start[0] = start[1] = 0;
-    end[0]   = end[1]   = 5;
-#ifdef QAK
-printf("before SDwritedata\n");
-#endif /* QAK */
-    status = SDwritedata(newsds, start, NULL, end, (VOIDP) idata);
-    CHECK(status, FAIL, "SDwritedata");
-
-#ifdef QAK
-printf("before SDendaccess\n");
-#endif /* QAK */
-    status = SDendaccess(newsds);
-    CHECK(status, FAIL, "SDendaccess");
-
-    /* need to close to flush compressed info to file */
-    status = SDend(fcomp);
-    CHECK(status, FAIL, "SDend");
-
-    /* read the compressed data back in */
-#ifdef QAK
-printf("reading compressed dataset\n");
-#endif /* QAK */
-    fcomp = SDstart(COMPFILE7, DFACC_RDWR);
-    CHECK(fcomp, FAIL, "SDstart (again)");
-
-    newsds2 = SDselect(fcomp, 0);
-    if(newsds == FAIL) {
-        fprintf(stderr, "Failed to select a data set for compressed access\n");
-        num_err++;
-    }
-
-    start[0] = start[1] = 0;
-    end[0]   = end[1]   = 5;
-#ifdef QAK
-printf("before SDreaddata\n");
-#endif /* QAK */
-    status = SDreaddata(newsds2, start, NULL, end, (VOIDP) rdata);
-    CHECK(status, FAIL, "SDreaddata");
-
-    for(i = 0; i < 25; i++)
-        if(idata[i] != rdata[i]) {
-            fprintf(stderr,"Bogus val in loc %d in compressed dset want %ld got %ld\n", i, (long)idata[i], (long)rdata[i]);
-            num_err++;
-        }
-
-#ifdef QAK
-printf("before SDendaccess\n");
-#endif /* QAK */
-    status = SDendaccess(newsds2);
-    CHECK(status, FAIL, "SDendaccess");
-
-#ifdef QAK
-printf("before SDend\n");
-#endif /* QAK */
-    status = SDend(fcomp);
-    CHECK(status, FAIL, "SDend");
-
 #endif /* COMP_TEST */
 
-
 #ifdef CHUNK_TEST
     status = test_chunk();
     CHECK(status, FAIL, "test_chunk");
-    num_err = num_err + status;
+    num_errs = num_errs + status;
 #endif /* CHUNK_TEST */
 
 #ifdef NETCDF_READ_TEST
     status = test_netcdf_reading();
     CHECK(status, FAIL, "test_netcdf_reading");
-    num_err = num_err + status;
+    num_errs = num_errs + status;
 #endif /* NETCDF_READ_TEST */
 
-    printf("num_err == %d\n", num_err);
+    /* BMR: Added a test routine dedicated for testing dimensions.  A
+       test on SDsetdimscale for an unsigned type was added while I was
+       fixing bug #172.  I didn't want to add this test into the already
+       very long main program so, instead, I added this routine, which can
+       be appended with other dimension tests in the future.  Also, some
+       day, the main program can be shortened and some of its dimension-related
+       tests can be moved into this test routine - 04/18/01 */
+    status = test_dimensions();
+    num_errs = num_errs + status;
 
-    exit(0);
+    /* BMR: Added a test routine dedicated for testing SDcheckempty. 09/17/04 */
+    status = test_checkempty();
+    num_errs = num_errs + status;
+
+    /* BMR: Added a test routine dedicated for testing SDidtype. 01/21/05 */
+    status = test_idtype();
+    num_errs = num_errs + status;
+
+    /* BMR: Added a test routine dedicated for testing the behavior of
+     * several functions when the SDS has rank=0. 02/4/05 */
+    /* BMR: SDcreate fails on Copper when rank=0.  EP decided to remove
+     * this test until further study can be made on this feature.
+    status = test_rank0();
+    num_errs = num_errs + status; */
+
+#ifdef H4_HAVE_LIBSZ
+    status = test_szip_compression();  /* defined in tszip.c */
+    num_errs = num_errs + status;
+#else
+   /*  printf("****** SD Szip test skipped *****\n"); */
+#endif /* H4_HAVE_LIBSZ */
+
+    status = test_sd();  /* defined in tsd.c */
+    num_errs = num_errs + status;
+    printf("num_err == %d\n", num_errs);
+
+    exit(num_errs);
+    return num_errs;
 }
 
 #endif /* HDF */

Added: packages/libhdf4/branches/upstream/current/mfhdf/libsrc/hdftest.h
===================================================================
--- packages/libhdf4/branches/upstream/current/mfhdf/libsrc/hdftest.h	                        (rev 0)
+++ packages/libhdf4/branches/upstream/current/mfhdf/libsrc/hdftest.h	2007-05-15 09:53:05 UTC (rev 831)
@@ -0,0 +1,20 @@
+/****************************************************************************
+ * NCSA HDF                                                                 *
+ * Software Development Group                                               *
+ * National Center for Supercomputing Applications                          *
+ * University of Illinois at Urbana-Champaign                               *
+ * 605 E. Springfield, Champaign IL 61820                                   *
+ *                                                                          *
+ * For conditions of distribution and use, see the accompanying             *
+ * hdf/COPYING file.                                                        *
+ *                                                                          *
+ ****************************************************************************/
+
+/* Check status value and print error message */
+#define CHECK(status, fail_value, name) {if(status == fail_value) { \
+    printf("*** Routine %s FAILED at line %d ***\n", name, __LINE__); num_errs++;}}
+
+/* Verify that a value is as expected and, if not, print error message */
+#define VERIFY(item, value, test_name) {if(item != value) { \
+    printf("*** UNEXPECTED VALUE from %s is %ld at line %4d in %s\n", test_name, (long)item,(int)__LINE__,__FILE__); num_errs++;}}
+

Modified: packages/libhdf4/branches/upstream/current/mfhdf/libsrc/mfhdf.h
===================================================================
--- packages/libhdf4/branches/upstream/current/mfhdf/libsrc/mfhdf.h	2007-05-15 09:05:29 UTC (rev 830)
+++ packages/libhdf4/branches/upstream/current/mfhdf/libsrc/mfhdf.h	2007-05-15 09:53:05 UTC (rev 831)
@@ -10,7 +10,7 @@
  *                                                                          *
  ****************************************************************************/
 
-/* $Id: mfhdf.h,v 1.43 2000/08/22 20:29:34 epourmal Exp $ */
+/* $Id: mfhdf.h,v 1.54 2005/01/26 15:51:29 epourmal Exp $ */
 
 #ifndef _MFSD_H_
 #define _MFSD_H_
@@ -28,7 +28,7 @@
 #endif /* OLD_WAY */
 
 #if defined(_MSC_VER) && !defined(_MFHDFLIB_) && !defined(_HDFLIB_)	/* Auto-link when possible */
-#	define MFHDF_LIB_VER	"414"
+#	define MFHDF_LIB_VER	"421"
 #	if !defined(_DEBUG)
 #		if !defined(_HDFDLL_)
 #			define MFHDF_LIB_NAME	"HM" MFHDF_LIB_VER ".lib"
@@ -56,12 +56,21 @@
 #define SD_DIMVAL_BW_INCOMP  0
 #define SD_RAGGED    -1  /* marker for ragged dimension */
 
+/* enumerated types for various types of ids in SD interface */
+typedef enum
+{
+    NOT_SDAPI_ID = -1,	/* not an SD API id */
+    SD_ID = 0,		/* SD id */
+    SDS_ID,		/* SDS id */
+    DIM_ID		/* Dimension id */
+} hdf_idtype_t;
+
 #ifdef __cplusplus
 extern "C" {
 #endif
 
 HDFLIBAPI int32 SDstart
-    (const char *name, int32 access);
+    (const char *name, int32 accs);
 
 HDFLIBAPI intn SDend
     (int32 fid);
@@ -70,7 +79,7 @@
     (int32 fid, int32 *datasets, int32 *attrs);
 
 HDFLIBAPI int32 SDselect
-    (int32 fid, int32 index);
+    (int32 fid, int32 idx);
 
 HDFLIBAPI intn SDgetinfo
     (int32 sdsid, char *name, int32 *rank, int32 *dimsizes, 
@@ -109,10 +118,10 @@
     (int32 id, const char *name, int32 nt, int32 count, const void * data);
 
 HDFLIBAPI intn SDattrinfo
-    (int32 id, int32 index, char *name, int32 *nt, int32 *count);
+    (int32 id, int32 idx, char *name, int32 *nt, int32 *count);
 
 HDFLIBAPI intn SDreadattr
-    (int32 id, int32 index, void * buf);
+    (int32 id, int32 idx, void * buf);
 
 #ifndef __CSTAR__
 HDFLIBAPI intn SDwritedata
@@ -164,8 +173,11 @@
     (int32 id, intn start_bit, intn bit_len, intn sign_ext, intn fill_one);
 
 HDFLIBAPI intn SDsetcompress
-    (int32 id, int32 type, comp_info *c_info);
+    (int32 id, comp_coder_t type, comp_info *c_info);
 
+HDFLIBAPI intn SDgetcompress
+    (int32 id, comp_coder_t* type, comp_info *c_info);
+
 HDFLIBAPI int32 SDfindattr
     (int32 id, const char *attrname);
 
@@ -196,6 +208,9 @@
 HDFLIBAPI int32 SDcheckempty
     (int32 sdsid, intn *emptySDS);
 
+HDFLIBAPI hdf_idtype_t SDidtype
+    (int32 an_id);
+
 /*====================== Chunking Routines ================================*/
 
 /* For defintion of HDF_CHUNK_DEF union see hproto.h since 
@@ -503,6 +518,7 @@
 #   define nscwcchnk     FNAME(SCWCCHNK) 
 #   define nscwchnk      FNAME(SCWCHNK)
 #   define nscscompress  FNAME(SCSCOMPRESS)
+#   define nscgcompress  FNAME(SCGCOMPRESS)
 #   define nsfsnbit      FNAME(SFSNBIT)
 #   define nsfsblsz      FNAME(SFSBLSZ)
 #   define nscchempty    FNAME(SCCHEMPTY)
@@ -560,6 +576,7 @@
 #   define nscwcchnk     FNAME(SCWCCHNK)
 #   define nscwchnk      FNAME(SCWCHNK)
 #   define nscscompress  FNAME(SCSCOMPRESS)
+#   define nscgcompress  FNAME(SCGCOMPRESS)
 #   define nscsnbit      FNAME(SCSNBIT)
 #   define nscsblsz      FNAME(SCSBLSZ)
 #   define nscselct      FNAME(SCSELCT)
@@ -622,6 +639,7 @@
 #   define nscwcchnk     FNAME(scwcchnk) 
 #   define nscwchnk      FNAME(scwchnk)
 #   define nscscompress  FNAME(scscompress)
+#   define nscgcompress  FNAME(scgcompress)
 #   define nsfsnbit      FNAME(sfsnbit)
 #   define nsfsblsz      FNAME(sfsblsz)
 #   define nscchempty    FNAME(scchempty)
@@ -677,7 +695,7 @@
 #   define nscschnk      FNAME(scschnk)
 #   define nscwcchnk     FNAME(scwcchnk)
 #   define nscwchnk      FNAME(scwchnk)
-#   define nscscompress  FNAME(scscompress)
+#   define nscgcompress  FNAME(scgcompress)
 #   define nscsnbit      FNAME(scsnbit)
 #   define nscsblsz      FNAME(scsblsz)
 #   define nscselct      FNAME(scselct)

Modified: packages/libhdf4/branches/upstream/current/mfhdf/libsrc/mfsd.c
===================================================================
--- packages/libhdf4/branches/upstream/current/mfhdf/libsrc/mfsd.c	2007-05-15 09:05:29 UTC (rev 830)
+++ packages/libhdf4/branches/upstream/current/mfhdf/libsrc/mfsd.c	2007-05-15 09:53:05 UTC (rev 831)
@@ -11,14 +11,10 @@
  ****************************************************************************/
 
 #ifdef RCSID
-static char RcsId[] = "@(#)$Revision: 1.129 $";
+static char RcsId[] = "@(#)$Revision: 1.147 $";
 #endif
 
-/* $Id: mfsd.c,v 1.129 2000/08/29 13:56:52 koziol Exp $ */
-#ifdef HAVE_PABLO
-#define PABLO_mask ID_mfsd_c
-#include "ProcIDs.h"
-#endif
+/* $Id: mfsd.c,v 1.147 2005/02/09 21:12:54 bmribler Exp $ */
 
 /******************************************************************************
 file - mfsd.c
@@ -54,7 +50,11 @@
 
 status = SDcheckempty(sdsid, emptySDS);
 
- NOTE: This file needs to have the comments cleaned up for most of the
+        --- take an id and determine if it is an SD id, SDS id, dim id, ---
+        --- or none of the above ---
+id_type =  SDidtype(an_id);
+
+NOTE: This file needs to have the comments cleaned up for most of the
        functions here. -GV 9/10/97
 
 ******************************************************************************/
@@ -67,8 +67,13 @@
 #ifdef HDF
 #include "mfhdf.h"
 #include "hfile.h"
-#include "hchunks.h" /* include here for now */
 
+#ifdef H4_HAVE_LIBSZ          /* we have the library */
+#include "szlib.h"
+#ifndef MIN
+#define MIN(a,b)    (((a)<(b)) ? (a) : (b))
+#endif
+#endif
 /* for Chunk debugging */
 /*
 #define CHK_DEBUG
@@ -250,7 +255,7 @@
 static intn
 SDIstart(void)
 {
-    CONSTR(FUNC, "SDIstart");    /* for HERROR */
+    CONSTR(FUNC, "SDIstart");    /* for HGOTO_ERROR */
     intn        ret_value = SUCCEED;
 
     /* Don't call this routine again... */
@@ -270,8 +275,48 @@
     return(ret_value);
 } /* end SDIstart() */
 
+
 /******************************************************************************
  NAME
+	SDI_can_clobber -- check permission on the file
+
+ DESCRIPTION
+    Check the file permissions.  If OK to clobber the file, return 1,
+    else return 0. 
+    Called by SDstart.
+
+ RETURNS
+    1 if OK to clobber
+    0 if not OK to overwrite
+
+******************************************************************************/
+int SDI_can_clobber(const char *name)
+{
+int res;
+struct stat buf;
+FILE *ff;
+
+    res = stat(name, &buf);
+
+    if (res < 0) {
+        /* no such file, OK to try to create it */
+	return(1);
+    }
+
+    ff = HI_OPEN(name, DFACC_RDWR);
+
+    if (ff != NULL) {
+        /* OK to open for write, so OK to clobber it */
+        HI_CLOSE(ff);
+	return(1);
+    } 
+
+    /* no permission to write, don't do the create */
+    return(0);
+}
+
+/******************************************************************************
+ NAME
 	SDstart -- open a file
 
  DESCRIPTION
@@ -286,7 +331,7 @@
 SDstart(const char *name,   /* IN: file name to open */
         int32       HDFmode /* IN: access mode to open file with */)
 {
-    CONSTR(FUNC, "SDstart");    /* for HERROR */
+    CONSTR(FUNC, "SDstart");    /* for HGOTO_ERROR */
     intn    cdfid;
     int32   fid;
     intn    NCmode;
@@ -297,9 +342,6 @@
     fprintf(stderr, "SDstart: I've been called\n");
 #endif
 
-#ifdef HAVE_PABLO
-    TRACE_ON (PABLO_mask,ID_SDstart );
-#endif
     /* turn off annoying crash on error stuff */
     ncopts = 0;
 
@@ -316,6 +358,8 @@
 
     if(HDFmode & DFACC_CREATE) 
       { /* create file */
+        if(!SDI_can_clobber(name)) 
+            HGOTO_ERROR(DFE_DENIED, FAIL);
         cdfid = nccreate(name, NC_CLOBBER);
       } 
     else 
@@ -325,18 +369,12 @@
 
     /* check if bad create/open */
     if(cdfid == -1) 
-      {
-        ret_value = FAIL;
-        goto done;
-      }
+        HGOTO_ERROR(DFE_BADOPEN, FAIL);
 
     /* hmm.....*/
     handle = NC_check_id(cdfid);
     if(handle == NULL) 
-      {
-        ret_value = FAIL;
-        goto done;
-      }
+        HGOTO_ERROR(DFE_ARGS, FAIL);
 
     /* set in 'define' mode? */
     handle->flags &= ~(NC_INDEF);
@@ -353,9 +391,6 @@
       }
     /* Normal cleanup */
 
-#ifdef HAVE_PABLO
-    TRACE_OFF (PABLO_mask, ID_SDstart );
-#endif
 
     return ret_value;
 } /* SDstart */
@@ -383,9 +418,6 @@
     fprintf(stderr, "SDend: I've been called\n");
 #endif
 
-#ifdef HAVE_PABLO
-    TRACE_ON(PABLO_mask, ID_SDend );
-#endif
 
     /* get id? */
     cdfid = (intn)id & 0xffff;
@@ -447,9 +479,6 @@
       }
     /* Normal cleanup */
 
-#ifdef HAVE_PABLO
-    TRACE_OFF (PABLO_mask, ID_SDend );
-#endif
 
     return ret_value;
 } /* SDend */
@@ -481,9 +510,6 @@
     fprintf(stderr, "SDnumber: I've been called\n");
 #endif
 
-#ifdef HAVE_PABLO
-    TRACE_ON(PABLO_mask, ID_SDfileinfo );
-#endif
 
     /* check that fid is valid and get file structure */
     handle = SDIhandle_from_id(fid, CDFTYPE);
@@ -509,9 +535,6 @@
       }
     /* Normal cleanup */
 
-#ifdef HAVE_PABLO
-    TRACE_OFF (PABLO_mask, ID_SDfileinfo );
-#endif
 
     return ret_value;
 } /* SDfileinfo */
@@ -555,9 +578,6 @@
     fprintf(stderr, "SDselect: I've been called (index: %d) \n", index);
 #endif
 
-#ifdef HAVE_PABLO
-    TRACE_ON(PABLO_mask, ID_SDselect );
-#endif
 
     /* check that fid is valid */
     handle = SDIhandle_from_id(fid, CDFTYPE);
@@ -592,9 +612,6 @@
       }
     /* Normal cleanup */
 
-#ifdef HAVE_PABLO
-    TRACE_OFF (PABLO_mask, ID_SDselect );
-#endif
 
     return ret_value;
 } /* SDselect */
@@ -624,6 +641,7 @@
           int32 *nt,      /* OUT: number type of data */
           int32 *nattr    /* OUT: the number of local attributes */)
 {
+    CONSTR(FUNC, "SDgetinfo");    /* for HGOTO_ERROR */
     intn    i;
     NC     *handle = NULL;
     NC_var *var = NULL;
@@ -633,10 +651,10 @@
     fprintf(stderr, "SDgetinfo: I've been called\n");
 #endif
 
-#ifdef HAVE_PABLO
-    TRACE_ON(PABLO_mask, ID_SDgetinfo );
-#endif
 
+    if( rank == NULL || dimsizes == NULL || nt == NULL || nattr == NULL)
+	HGOTO_ERROR(DFE_ARGS, FAIL);
+
     handle = SDIhandle_from_id(sdsid, SDSTYPE);
     if(handle == NULL) 
       {
@@ -696,9 +714,6 @@
       }
     /* Normal cleanup */
 
-#ifdef HAVE_PABLO
-    TRACE_OFF (PABLO_mask, ID_SDgetinfo );
-#endif
 
     return ret_value;
 } /* SDgetinfo */
@@ -722,10 +737,15 @@
            int32 *end,    /* IN:  number of values to read per dimension */
            void *  data    /* OUT: data buffer */)
 {
+    CONSTR(FUNC, "SDreaddata");    /* for HGOTO_ERROR */
     NC     *handle = NULL;
     NC_dim *dim = NULL;
     intn    varid;
     int32   status;
+    comp_coder_t comp_type;
+    comp_info c_info;
+    uint32  comp_config;
+    NC_var * tvar;
 #ifdef BIG_LONGS
     long    Start[MAX_VAR_DIMS];
     long    End[MAX_VAR_DIMS];
@@ -741,9 +761,6 @@
     fprintf(stderr, "SDreaddata: I've been called\n");
 #endif
 
-#ifdef HAVE_PABLO
-    TRACE_ON(PABLO_mask, ID_SDreaddata );
-#endif
     
     if((start == NULL) || (end == NULL) || (data == NULL))
       {
@@ -769,6 +786,28 @@
         goto done;
       }
 
+    /* Check compression method is enabled */
+    tvar = SDIget_var(handle, sdsid);
+    if(tvar == NULL)
+     {
+            ret_value = FAIL;
+            goto done;
+     }
+    status = HCPgetcompress(handle->hdf_file, tvar->data_tag, tvar->data_ref, 
+		&comp_type, &c_info);
+
+    if (status != FAIL) {
+	    HCget_config_info( comp_type , &comp_config);
+	    if ((comp_config & COMP_DECODER_ENABLED|COMP_ENCODER_ENABLED) == 0) {
+		/* coder not present?? */
+		    HGOTO_ERROR(DFE_NOENCODER, FAIL);
+	    }
+	    if ((comp_config & COMP_DECODER_ENABLED) == 0) {
+		/* decoder not present?? */
+		HGOTO_ERROR(DFE_BADCODER, FAIL);
+	    }
+    }
+
     /* get ready to read */
     handle->xdrs->x_op = XDR_DECODE ;
    
@@ -836,9 +875,6 @@
       }
     /* Normal cleanup */
 
-#ifdef HAVE_PABLO
-    TRACE_OFF (PABLO_mask,  ID_SDreaddata );
-#endif
 
     return ret_value;
 } /* SDreaddata */
@@ -875,9 +911,6 @@
     fprintf(stderr, "SDnametoindex: I've been called\n");
 #endif
 
-#ifdef HAVE_PABLO
-    TRACE_ON(PABLO_mask, ID_SDnametoindex );
-#endif
 
     /* check that fid is valid */
     handle = SDIhandle_from_id(fid, CDFTYPE);
@@ -913,9 +946,6 @@
 
       }
     /* Normal cleanup */
-#ifdef HAVE_PABLO
-    TRACE_OFF (PABLO_mask, ID_SDnametoindex);
-#endif
 
     return ret_value;    
 } /* SDnametoindex */
@@ -959,9 +989,6 @@
     fprintf(stderr, "SDgetrange: I've been called\n");
 #endif
 
-#ifdef HAVE_PABLO
-    TRACE_ON(PABLO_mask, ID_SDgetrange );
-#endif
 
     handle = SDIhandle_from_id(sdsid, SDSTYPE);
     if(handle == NULL) 
@@ -1020,9 +1047,6 @@
       }
     /* Normal cleanup */
 
-#ifdef HAVE_PABLO
-    TRACE_OFF (PABLO_mask, ID_SDgetrange);
-#endif
 
     return ret_value;
 } /* SDgetrange */
@@ -1102,9 +1126,6 @@
     fprintf(stderr, "SDcreate: I've been called\n");
 #endif
 
-#ifdef HAVE_PABLO
-    TRACE_ON(PABLO_mask, ID_SDcreate );
-#endif
 
     /* check that fid is valid */
     handle = SDIhandle_from_id(fid, CDFTYPE);
@@ -1282,9 +1303,6 @@
 
       }
     /* Normal cleanup */
-#ifdef HAVE_PABLO
-    TRACE_OFF (PABLO_mask, ID_SDcreate);
-#endif
 
     return ret_value;
 } /* SDcreate */
@@ -1326,9 +1344,6 @@
     fprintf(stderr, "SDgetdimid: I've been called\n");
 #endif
 
-#ifdef HAVE_PABLO
-    TRACE_ON(PABLO_mask, ID_SDgetdimid );
-#endif
 
     /* get the handle */
     handle = SDIhandle_from_id(sdsid, SDSTYPE);
@@ -1354,6 +1369,11 @@
       }
 
     /* get the dim number out of the assoc array */
+    if (var->assoc->values == NULL)
+      {
+        ret_value = FAIL;
+        goto done;
+      }
     dimindex = var->assoc->values[number];
 
     /* build the dim id */
@@ -1367,9 +1387,6 @@
 
       }
     /* Normal cleanup */
-#ifdef HAVE_PABLO
-    TRACE_OFF (PABLO_mask, ID_SDgetdimid);
-#endif
 
     return ret_value;
 } /* SDgetdimid */
@@ -1408,9 +1425,6 @@
     fprintf(stderr, "SDsetdimname: I've been called\n");
 #endif
 
-#ifdef HAVE_PABLO
-    TRACE_ON(PABLO_mask, ID_SDsetdimname );
-#endif
 
     /* get the handle */
     handle = SDIhandle_from_id(id, DIMTYPE);
@@ -1478,9 +1492,6 @@
 
       }
     /* Normal cleanup */
-#ifdef HAVE_PABLO
-    TRACE_OFF (PABLO_mask, ID_SDsetdimname);
-#endif
 
     return ret_value;
 } /* SDsetdimname */
@@ -1511,9 +1522,6 @@
     fprintf(stderr, "SDendaccess: I've been called\n");
 #endif
 
-#ifdef HAVE_PABLO
-    TRACE_ON(PABLO_mask, ID_SDendaccess );
-#endif
 
     /* get the handle */
     handle = SDIhandle_from_id(id, SDSTYPE);
@@ -1571,9 +1579,6 @@
       }
     /* Normal cleanup */
 
-#ifdef HAVE_PABLO
-    TRACE_OFF (PABLO_mask, ID_SDendaccess);
-#endif
 
     return ret_value;    
 } /* SDendaccess */
@@ -1717,9 +1722,6 @@
     fprintf(stderr, "SDsetrange: I've been called\n");
 #endif
 
-#ifdef HAVE_PABLO
-    TRACE_ON(PABLO_mask, ID_SDsetrange );
-#endif
 
     handle = SDIhandle_from_id(sdsid, SDSTYPE);
     if(handle == NULL) 
@@ -1768,9 +1770,6 @@
       }
     /* Normal cleanup */
 
-#ifdef HAVE_PABLO
-    TRACE_OFF (PABLO_mask, ID_SDsetrange);
-#endif
 
     return ret_value;    
 } /* SDsetrange */
@@ -1899,9 +1898,6 @@
     fprintf(stderr, "SDsetattr: I've been called\n");
 #endif
 
-#ifdef HAVE_PABLO
-    TRACE_ON(PABLO_mask, ID_SDsetattr );
-#endif
 
     /* sanity check args */
     if(name == NULL) 
@@ -1964,9 +1960,6 @@
       }
     /* Normal cleanup */
 
-#ifdef HAVE_PABLO
-    TRACE_OFF (PABLO_mask, ID_SDsetattr);
-#endif
 
     return ret_value;        
 } /* SDsetattr */
@@ -1993,6 +1986,7 @@
            int32 *nt,    /* OUT: attribute number type */
            int32 *count  /* OUT: number of attribute values */)
 {
+    CONSTR(FUNC, "SDattrinfo");    /* for HGOTO_ERROR */
     NC_array  *ap = NULL;
     NC_array **app = NULL;
     NC_attr  **atp = NULL;
@@ -2003,16 +1997,10 @@
     fprintf(stderr, "SDattrinfo: I've been called\n");
 #endif
 
-#ifdef HAVE_PABLO
-    TRACE_ON(PABLO_mask, ID_SDattrinfo );
-#endif
 
     /* sanity check args */
     if((name == NULL) || (nt == NULL) || (count == NULL))
-      {
-          ret_value = FAIL;
-          goto done;
-      }
+        HGOTO_ERROR(DFE_ARGS, FAIL);
 
     /* determine what type of ID we've been given */
     if(SDIapfromid(id, &handle, &app) == FAIL)
@@ -2059,9 +2047,6 @@
       }
     /* Normal cleanup */
 
-#ifdef HAVE_PABLO
-    TRACE_OFF (PABLO_mask, ID_SDattrinfo);
-#endif
 
     return ret_value;    
 } /* SDattrinfo */
@@ -2085,7 +2070,7 @@
            int32 index, /* IN:  attribute index */
            void * buf    /* OUT: data buffer  */)
 {
-
+    CONSTR(FUNC, "SDreadattr");    /* for HGOTO_ERROR */
     NC_array  *ap = NULL;
     NC_array **app = NULL;
     NC_attr  **atp = NULL;
@@ -2096,16 +2081,10 @@
     fprintf(stderr, "SDreadattr: I've been called\n");
 #endif
 
-#ifdef HAVE_PABLO
-    TRACE_ON(PABLO_mask, ID_SDreadattr );
-#endif
 
     /* sanity check args */
     if(buf == NULL)
-      {
-          ret_value = FAIL;
-          goto done;
-      }
+        HGOTO_ERROR(DFE_ARGS, FAIL);
 
     /* determine what type of ID we've been given */
     if(SDIapfromid(id, &handle, &app) == FAIL)
@@ -2142,9 +2121,6 @@
       }
     /* Normal cleanup */
 
-#ifdef HAVE_PABLO
-    TRACE_OFF (PABLO_mask, ID_SDreadattr);
-#endif
 
     return ret_value;    
 } /* SDreadattr */
@@ -2170,8 +2146,13 @@
             int32 *end,    /* IN: number of values to write per dimension */
             void *  data    /* IN: data buffer */)
 {
+    CONSTR(FUNC, "SDwritedata");    /* for HGOTO_ERROR */
     intn    varid;
     int32   status;
+    comp_coder_t comp_type;
+    comp_info c_info;
+    uint32  comp_config;
+    NC_var *tvar;
     NC     *handle = NULL;
     NC_dim *dim = NULL;
 #ifdef BIG_LONGS
@@ -2190,15 +2171,9 @@
     fprintf(stderr, "SDwritedata: I've been called\n");
 #endif
 
-#ifdef HAVE_PABLO
-    TRACE_ON(PABLO_mask, ID_SDwritedata );
-#endif
 
     if((start == NULL) || (end == NULL) || (data == NULL))
-      {
-          ret_value = FAIL;
-          goto done;
-      }
+        HGOTO_ERROR(DFE_ARGS, FAIL);
 
     handle = SDIhandle_from_id(sdsid, SDSTYPE);
     if(handle == NULL) 
@@ -2222,6 +2197,37 @@
           goto done;
       }
 
+      tvar = SDIget_var(handle, sdsid);
+
+      if(tvar == NULL)
+         {
+              ret_value = FAIL;
+              goto done;
+      }
+
+    /* disallow writing SDS with rank = 0 - BMR, bug #1045 */
+    if(tvar->shape == NULL)
+      {
+        ret_value = FAIL;
+        goto done;
+      }
+
+    /* Check compression method is enabled */
+    status = HCPgetcompress(handle->hdf_file, tvar->data_tag, tvar->data_ref, 
+		&comp_type, &c_info);
+
+    if (status != FAIL) {
+	    HCget_config_info( comp_type , &comp_config);
+	    if ((comp_config & COMP_DECODER_ENABLED|COMP_ENCODER_ENABLED) == 0) {
+		/* coder not present?? */
+		    HGOTO_ERROR(DFE_NOENCODER, FAIL);
+	    }
+	    if ((comp_config & COMP_ENCODER_ENABLED) == 0) {
+		/* encoder not present?? */
+		HGOTO_ERROR(DFE_BADCODER, FAIL);
+	    }
+    }
+
     /* get ready to write */
     handle->xdrs->x_op = XDR_ENCODE;
     
@@ -2327,9 +2333,6 @@
       }
     /* Normal cleanup */
 
-#ifdef HAVE_PABLO
-    TRACE_OFF (PABLO_mask, ID_SDwritedata);
-#endif
 
     return ret_value;    
 } /* SDwritedata */
@@ -2364,9 +2367,6 @@
     fprintf(stderr, "SDsetdatastrs: I've been called\n");
 #endif
     
-#ifdef HAVE_PABLO
-    TRACE_ON(PABLO_mask, ID_SDsetdatastrs );
-#endif
 
     handle = SDIhandle_from_id(sdsid, SDSTYPE);
     if(handle == NULL) 
@@ -2439,9 +2439,6 @@
       }
     /* Normal cleanup */
 
-#ifdef HAVE_PABLO
-    TRACE_OFF (PABLO_mask, ID_SDsetdatastrs);
-#endif
 
     return ret_value;    
 } /* SDsetdatastrs */
@@ -2474,9 +2471,6 @@
     fprintf(stderr, "SDsetcal: I've been called\n");
 #endif
 
-#ifdef HAVE_PABLO
-    TRACE_ON(PABLO_mask, ID_SDsetcal );
-#endif
     
     handle = SDIhandle_from_id(sdsid, SDSTYPE);
     if(handle == NULL) 
@@ -2543,9 +2537,6 @@
       }
     /* Normal cleanup */
 
-#ifdef HAVE_PABLO
-    TRACE_OFF (PABLO_mask, ID_SDsetcal);
-#endif
 
     return ret_value;    
 } /* SDsetcal */
@@ -2575,9 +2566,6 @@
     fprintf(stderr, "SDsetfillvalue: I've been called\n");
 #endif
     
-#ifdef HAVE_PABLO
-    TRACE_ON(PABLO_mask, ID_SDsetfillvalue );
-#endif
 
     handle = SDIhandle_from_id(sdsid, SDSTYPE);
     if(handle == NULL) 
@@ -2616,9 +2604,6 @@
       }
     /* Normal cleanup */
 
-#ifdef HAVE_PABLO
-    TRACE_OFF (PABLO_mask, ID_SDsetfillvalue);
-#endif
 
     return ret_value;    
 } /* SDsetfillvalue */
@@ -2641,6 +2626,7 @@
 SDgetfillvalue(int32 sdsid, /* IN:  dataset ID */
                void * val    /* OUT: fillvalue */)
 {
+    CONSTR(FUNC, "SDgetfillvalue");    /* for HGOTO_ERROR */
     NC       *handle = NULL;
     NC_var   *var = NULL;
     NC_attr **attr = NULL;
@@ -2650,10 +2636,11 @@
     fprintf(stderr, "SDgetfillvalue: I've been called\n");
 #endif
     
-#ifdef HAVE_PABLO
-    TRACE_ON(PABLO_mask, ID_SDgetfillvalue );
-#endif
 
+    /* sanity check args */
+    if(val == NULL)
+        HGOTO_ERROR(DFE_ARGS, FAIL);
+
     handle = SDIhandle_from_id(sdsid, SDSTYPE);
     if(handle == NULL) 
       {
@@ -2690,9 +2677,6 @@
       }
     /* Normal cleanup */
 
-#ifdef HAVE_PABLO
-    TRACE_OFF (PABLO_mask, ID_SDgetfillvalue);
-#endif
 
     return ret_value;    
 } /* SDgetfillvalue */
@@ -2729,9 +2713,6 @@
     fprintf(stderr, "SDgetdatastrs: I've been called\n");
 #endif
     
-#ifdef HAVE_PABLO
-    TRACE_ON(PABLO_mask, ID_SDgetdatastrs );
-#endif
 
     handle = SDIhandle_from_id(sdsid, SDSTYPE);
     if(handle == NULL) 
@@ -2830,9 +2811,6 @@
       }
     /* Normal cleanup */
 
-#ifdef HAVE_PABLO
-    TRACE_OFF (PABLO_mask, ID_SDgetdatastrs);
-#endif
 
     return ret_value;    
 } /* SDgetdatastrs */
@@ -2866,9 +2844,6 @@
     fprintf(stderr, "SDgetcal: I've been called\n");
 #endif
     
-#ifdef HAVE_PABLO
-    TRACE_ON(PABLO_mask, ID_SDgetcal );
-#endif
 
     handle = SDIhandle_from_id(sdsid, SDSTYPE);
     if(handle == NULL) 
@@ -2937,9 +2912,6 @@
       }
     /* Normal cleanup */
 
-#ifdef HAVE_PABLO
-    TRACE_OFF (PABLO_mask, ID_SDgetcal);
-#endif
 
     return ret_value;    
 } /* SDgetcal */
@@ -3049,6 +3021,10 @@
           goto done;
       }
 
+    /* BMR: put back hdf type that was set wrong by NC_new_var; please refer
+       to the cvs history of bug #172 for reason on this statement - 4/17/01*/
+    var->HDFtype = nt;
+
     /* get a new NDG ref for this sucker */
 #ifdef NOT_YET
     var->ndg_ref = Htagnewref(handle->hdf_file,DFTAG_NDG);
@@ -3119,9 +3095,6 @@
     fprintf(stderr, "SDsetdimstrs: I've been called\n");
 #endif
 
-#ifdef HAVE_PABLO
-    TRACE_ON(PABLO_mask, ID_SDsetdimstrs );
-#endif
 
     /* get the handle */
     handle = SDIhandle_from_id(id, DIMTYPE);
@@ -3196,9 +3169,6 @@
       }
     /* Normal cleanup */
 
-#ifdef HAVE_PABLO
-    TRACE_OFF (PABLO_mask, ID_SDsetdimstrs);
-#endif
 
     return ret_value;    
 } /* SDsetdimstrs */
@@ -3292,9 +3262,6 @@
     fprintf(stderr, "SDsetdimscales: I've been called\n");
 #endif
 
-#ifdef HAVE_PABLO
-    TRACE_ON(PABLO_mask, ID_SDsetdimscale );
-#endif
 
     /* get the handle */
     handle = SDIhandle_from_id(id, DIMTYPE);
@@ -3356,9 +3323,6 @@
       }
     /* Normal cleanup */
 
-#ifdef HAVE_PABLO
-    TRACE_OFF (PABLO_mask, ID_SDsetdimscale);
-#endif
 
     return ret_value;    
 } /* SDsetdimsacle */
@@ -3394,10 +3358,14 @@
     fprintf(stderr, "SDgetdimscale: I've been called\n");
 #endif
 
-#ifdef HAVE_PABLO
-    TRACE_ON(PABLO_mask, ID_SDgetdimscale );
-#endif
 
+    /* sanity check args */
+    if(data == NULL)
+      {
+          ret_value = FAIL;
+          goto done;
+      }
+
     /* get the handle */
     handle = SDIhandle_from_id(id, DIMTYPE);
     if(handle == NULL) 
@@ -3467,9 +3435,6 @@
       }
     /* Normal cleanup */
 
-#ifdef HAVE_PABLO
-    TRACE_OFF (PABLO_mask, ID_SDgetdimscale);
-#endif
 
     return ret_value;    
 } /* SDsetdimsacle */
@@ -3508,9 +3473,6 @@
     fprintf(stderr, "SDdiminfo: I've been called\n");
 #endif
 
-#ifdef HAVE_PABLO
-    TRACE_ON(PABLO_mask, ID_SDdiminfo );
-#endif
 
     handle = SDIhandle_from_id(id, DIMTYPE);
     if(handle == NULL)
@@ -3577,9 +3539,6 @@
       }
     /* Normal cleanup */
 
-#ifdef HAVE_PABLO
-    TRACE_OFF (PABLO_mask, ID_SDdiminfo);
-#endif
 
     return ret_value;    
 } /* SDdiminfo */
@@ -3619,9 +3578,6 @@
     fprintf(stderr, "SDgetdimstrs: I've been called\n");
 #endif
     
-#ifdef HAVE_PABLO
-    TRACE_ON(PABLO_mask, ID_SDgetdimstrs );
-#endif
 
     handle = SDIhandle_from_id(id, DIMTYPE);
     if(handle == NULL) 
@@ -3718,9 +3674,6 @@
       }
     /* Normal cleanup */
 
-#ifdef HAVE_PABLO
-    TRACE_OFF (PABLO_mask, ID_SDgetdimstrs);
-#endif
 
     return ret_value;    
 } /* SDgetdimstrs */
@@ -3753,7 +3706,7 @@
     FORTRAN	- sfsextf
 
  RETURNS
-    Return SUCCEED or FAIL
+    SUCCEED/FAIL
 
 ******************************************************************************/ 
 intn 
@@ -3770,9 +3723,6 @@
     fprintf(stderr, "SDsetexternalfile: I've been called\n");
 #endif
 
-#ifdef HAVE_PABLO
-    TRACE_ON(PABLO_mask, ID_SDsetexternalfile );
-#endif
 
     if(NULL == filename || offset < 0)
       {
@@ -3859,9 +3809,6 @@
       }
     /* Normal cleanup */
 
-#ifdef HAVE_PABLO
-    TRACE_OFF (PABLO_mask, ID_SDsetexternalfile);
-#endif
 
     return ret_value;    
 } /* SDsetexternalfile */
@@ -3897,7 +3844,7 @@
     NOTE: n-bit "compression" is described more fully in the cnbit.c file.
 
  RETURNS
-    Return SUCCEED or FAIL
+    SUCCEED/FAIL
 
 ******************************************************************************/ 
 intn 
@@ -3918,9 +3865,6 @@
     fprintf(stderr, "SDsetnbitdataset: I've been called\n");
 #endif
 
-#ifdef HAVE_PABLO
-    TRACE_ON(PABLO_mask, ID_SDsetnbitdataset );
-#endif
 
     if(start_bit < 0 || bit_len <= 0)
       {
@@ -4007,16 +3951,70 @@
       }
     /* Normal cleanup */
 
-#ifdef HAVE_PABLO
-    TRACE_OFF (PABLO_mask, ID_SDsetnbitdataset);
-#endif
 
     return ret_value;    
 } /* SDsetnbitdataset */
 
+#ifdef H4_HAVE_LIBSZ          /* we have the library */
 
 /******************************************************************************
  NAME
+	SDsetup_szip_parms -- check and set parameters for szip compression
+              int32 id;            IN: the  varid
+              NC *handle;          IN: the SD handle
+              comp_info *c_info;   IN/OUT: the compression settings 
+              int32 *cdims;        IN: the chunk dims, NULL if not chunked
+
+ DESCRIPTION
+     Collect the parameters and call HCPcszip_setup_parms to set the
+     computed szip paramters.
+
+ RETURNS
+    SUCCEED/FAIL
+
+******************************************************************************/ 
+intn 
+SDsetup_szip_parms( int32 id, NC *handle, comp_info *c_info, int32 *cdims)
+{
+    NC_dim    *dim;     /* to check if the dimension is unlimited */
+    int32      dimindex;/* to obtain the NC_dim record */
+    NC_var    *var; 
+    int32 ndims;
+    int i;
+    int32 xdims[MAX_VAR_DIMS];
+    int32 nt;
+    intn       ret_value = SUCCEED;
+
+    if(handle->vars == NULL)
+      {
+          ret_value = FAIL;
+          goto done;
+      }
+
+    var = SDIget_var(handle, id);
+    if(var == NULL)
+      {
+          ret_value = FAIL;
+          goto done;
+      }
+
+    ndims = var->assoc->count; 
+	for (i = 0; i < ndims; i++) {
+		dimindex = var->assoc->values[i];
+		dim = SDIget_dim(handle, dimindex);
+		xdims[i] = dim->size;
+	}
+
+    nt = var->HDFtype;
+	
+    ret_value = HCPsetup_szip_parms( c_info, nt, 1, ndims, xdims, cdims);
+
+done:
+	return(ret_value);
+}
+#endif
+/******************************************************************************
+ NAME
 	SDsetcompress -- Create/convert a dataset to compressed representation
 
  DESCRIPTION
@@ -4028,18 +4026,23 @@
     IMPORTANT:  This will only work on datasets stored in HDF files.
 
  RETURNS
-     Return SUCCEED or FAIL
+    SUCCEED/FAIL
 
 ******************************************************************************/ 
 intn 
-SDsetcompress(int32      id,    /* IN: dataset ID */
-              int32      type,  /* IN: the type of compression to perform on the
-                                        next image */
-              comp_info *c_info /* IN: ptr to compression information structure */)
+SDsetcompress(int32 id,                /* IN: dataset ID */
+              comp_coder_t comp_type,  /* IN: the type of compression to 
+					  perform on the next image */
+              comp_info *c_info        /* IN: ptr to compression info struct*/)
 {
+    CONSTR(FUNC, "SDsetcompress");    /* for HGOTO_ERROR */
     NC        *handle;
     NC_var    *var;
+    NC_dim    *dim;     /* to check if the dimension is unlimited */
+    int32      dimindex;/* to obtain the NC_dim record */
     model_info m_info;  /* modeling information for the HCcreate() call */
+    comp_info c_info_x;  /* local copy */
+    uint32  comp_config;
     intn       status = FAIL;
     intn       ret_value = SUCCEED;
 
@@ -4047,16 +4050,24 @@
     fprintf(stderr, "SDsetcompress: I've been called\n");
 #endif /* SDDEBUG */
 
-#ifdef HAVE_PABLO
-    TRACE_ON(PABLO_mask, ID_SDsetcompress );
-#endif
 
-    if (type < 0 || type >= COMP_CODE_INVALID)
+    if (comp_type < COMP_CODE_NONE || comp_type >= COMP_CODE_INVALID)
       {
           ret_value = FAIL;
           goto done;
       }
 
+    HCget_config_info(comp_type, &comp_config);
+    if ((comp_config & COMP_DECODER_ENABLED|COMP_ENCODER_ENABLED) == 0) {
+	/* coder not present?? */
+	HGOTO_ERROR(DFE_BADCODER, FAIL);
+    }
+    if ((comp_config & COMP_ENCODER_ENABLED) == 0) {
+	/* encoder not present?? */
+	HGOTO_ERROR(DFE_NOENCODER, FAIL);
+    }
+    HDmemcpy(&c_info_x,c_info,sizeof(comp_info));
+
     handle = SDIhandle_from_id(id, SDSTYPE);
     if(handle == NULL || handle->file_type != HDF_FILE)
       {
@@ -4077,6 +4088,48 @@
           goto done;
       }
 
+    /* disallow setting compress for SDS with rank = 0 - BMR, bug #1045 */
+    if(var->shape == NULL)
+      {
+        ret_value = FAIL;
+        goto done;
+      }
+
+    /* unlimited dimensions don't work with compression */
+        /* Get the index of the SDS' first dimension from the list of indices
+         * branching out from NC_var.  This index indicates where this dim
+         * is in the "dims" list branching out from NC. */
+        dimindex = var->assoc->values[0];
+
+        /* Retrieve the NC_dim record to check for unlimited dimension */
+        dim = SDIget_dim(handle, dimindex);
+        if(dim == NULL)
+        {
+            ret_value = FAIL;
+            goto done;
+        }
+
+        /* If this dimension is unlimited, then return FAIL; the subsequent
+         * writing of this SDS will write uncompressed data */
+        if (dim->size == SD_UNLIMITED)
+        {
+            ret_value = FAIL;
+            goto done;
+        }
+#ifdef H4_HAVE_LIBSZ          /* we have the library */
+	if (comp_type == COMP_CODE_SZIP) {
+	   if (SDsetup_szip_parms( id, handle, &c_info_x, NULL) == FAIL) {
+		HGOTO_ERROR(DFE_INTERNAL, FAIL);
+	    }
+	}
+#else
+	/* no SZIP */
+/* probably covered by test at start */
+	if (comp_type == COMP_CODE_SZIP) {
+		HGOTO_ERROR(DFE_BADCODER, FAIL);
+	}
+#endif /* H4_HAVE_LIBSZ          */
+
 #ifdef SDDEBUG
     printf("SDsetcompress(): var->data_ref=%d\n",(int)var->data_ref);
 #endif /* SDDEBUG */
@@ -4101,7 +4154,7 @@
 
     status=(intn)HCcreate(handle->hdf_file,(uint16)DATA_TAG,
                           (uint16) var->data_ref,COMP_MODEL_STDIO,&m_info,
-                          (comp_coder_t)type, c_info);
+                          comp_type, &c_info_x);
 
 #ifdef SDDEBUG
     printf("SDsetcompress(): HCcreate() status=%d\n",(intn)status);
@@ -4163,14 +4216,78 @@
       }
     /* Normal cleanup */
 
-#ifdef HAVE_PABLO
-    TRACE_OFF (PABLO_mask, ID_SDsetcompress);
-#endif
 
     return ret_value;    
 } /* SDsetcompress */
 
+/******************************************************************************
+ NAME
+	SDgetcompress -- Retrieves compression information of a dataset
 
+ DESCRIPTION
+    This routine uses HCPgetcompress to retrieve the compression type
+    and the compression information of the identified dataset.
+
+ RETURNS
+    SUCCEED/FAIL
+
+ MODIFICATION
+    July 2001: Added to fix bug #307 - BMR 
+
+******************************************************************************/ 
+intn 
+SDgetcompress(int32     id,     /* IN: dataset ID */
+              comp_coder_t*    comp_type,   /* OUT: the type of compression */
+              comp_info* c_info)/* OUT: ptr to compression information 
+				structure for storing the retrieved info */
+{
+    CONSTR(FUNC, "SDgetcompress");    /* for HGOTO_ERROR */
+    NC        *handle;
+    NC_var    *var;
+    intn       status = FAIL;
+    intn       ret_value = SUCCEED;
+
+#ifdef SDDEBUG
+    fprintf(stderr, "SDgetcompress: I've been called\n");
+#endif /* SDDEBUG */
+
+
+    /* clear error stack */
+    HEclear();
+
+    if(comp_type == NULL || c_info == NULL)
+	HGOTO_ERROR(DFE_ARGS, FAIL);
+
+    handle = SDIhandle_from_id(id, SDSTYPE);
+    if(handle == NULL || handle->file_type != HDF_FILE)
+	HGOTO_ERROR(DFE_ARGS, FAIL);
+    if(handle->vars == NULL)
+	HGOTO_ERROR(DFE_ARGS, FAIL);
+
+    var = SDIget_var(handle, id);
+    if(var == NULL) HGOTO_ERROR(DFE_ARGS, FAIL);
+
+#ifdef SDDEBUG
+    printf("SDgetcompress(): var->data_ref=%d, var->aid=%d\n",(int)var->data_ref, (int)var->aid);
+#endif /* SDDEBUG */
+    if(!var->data_ref) 
+	HGOTO_ERROR(DFE_ARGS, FAIL);
+
+    /* use lower-level routine to get the compression information */
+    status = HCPgetcompress(handle->hdf_file, var->data_tag, var->data_ref, 
+		comp_type, c_info);
+    if(status==FAIL) HGOTO_ERROR(DFE_INTERNAL, FAIL);
+
+done:
+    if (ret_value == FAIL)
+      { /* Failure cleanup */
+
+      }
+    /* Normal cleanup */
+
+    return ret_value;    
+} /* SDgetcompress */
+
 /******************************************************************************
  NAME
 	SDfindattr -- find an attribute's index by name
@@ -4196,9 +4313,6 @@
     int32      len;
     int32      ret_value = FAIL;
 
-#ifdef HAVE_PABLO
-    TRACE_ON(PABLO_mask, ID_SDfindattr );
-#endif
 
     /* determine what type of ID we've been given */
     if(SDIapfromid(id, &handle, &app) == FAIL)
@@ -4239,9 +4353,6 @@
       }
     /* Normal cleanup */
 
-#ifdef HAVE_PABLO
-    TRACE_OFF (PABLO_mask, ID_SDfindattr);
-#endif
 
     return ret_value;        
 } /* SDfindattr */
@@ -4270,9 +4381,6 @@
     fprintf(stderr, "SDidtoref: I've been called\n");
 #endif
     
-#ifdef HAVE_PABLO
-    TRACE_ON(PABLO_mask, ID_SDidtoref );
-#endif
 
     handle = SDIhandle_from_id(id, SDSTYPE);
     if(handle == NULL || handle->file_type != HDF_FILE) 
@@ -4303,9 +4411,6 @@
       }
     /* Normal cleanup */
 
-#ifdef HAVE_PABLO
-    TRACE_OFF (PABLO_mask, ID_SDidtoref);
-#endif
 
     return ret_value;    
 } /* SDidtoref */
@@ -4335,9 +4440,6 @@
     fprintf(stderr, "SDreftoindex: I've been called\n");
 #endif
     
-#ifdef HAVE_PABLO
-    TRACE_ON(PABLO_mask, ID_SDreftoindex );
-#endif
 
     handle = SDIhandle_from_id(fid, CDFTYPE);
     if(handle == NULL || handle->file_type != HDF_FILE) 
@@ -4371,9 +4473,6 @@
       }
     /* Normal cleanup */
 
-#ifdef HAVE_PABLO
-    TRACE_OFF (PABLO_mask, ID_SDreftoindex);
-#endif
 
     return ret_value;    
 } /* SDreftoindex */
@@ -4402,9 +4501,6 @@
     fprintf(stderr, "SDisrecord: I've been called\n");
 #endif
     
-#ifdef HAVE_PABLO
-    TRACE_ON(PABLO_mask, ID_SDisrecord );
-#endif
 
     handle = SDIhandle_from_id(id, SDSTYPE);
     if(handle == NULL)
@@ -4426,6 +4522,12 @@
         goto done;
       }
 
+    if(var->shape == NULL)
+      {
+        ret_value = TRUE; /* EP thinks it should return true - BMR, bug #1045 */
+        goto done;
+      }
+
     if(var->shape[0] == SD_UNLIMITED)
         ret_value = TRUE;
     else
@@ -4438,9 +4540,6 @@
       }
     /* Normal cleanup */
 
-#ifdef HAVE_PABLO
-   TRACE_OFF (PABLO_mask, ID_SDisrecord);
-#endif
 
     return ret_value;    
 } /* SDisrecord */
@@ -4470,9 +4569,6 @@
     fprintf(stderr, "SDiscoordvar: I've been called\n");
 #endif
     
-#ifdef HAVE_PABLO
-    TRACE_ON(PABLO_mask, ID_SDiscoordvar );
-#endif
 
     handle = SDIhandle_from_id(id, SDSTYPE);
     if(handle == NULL)
@@ -4530,9 +4626,6 @@
       }
     /* Normal cleanup */
 
-#ifdef HAVE_PABLO
-    TRACE_OFF (PABLO_mask, ID_SDiscoordvar);
-#endif
 
     return ret_value;    
 } /* SDiscoordvar */
@@ -4596,9 +4689,6 @@
     fprintf(stderr, "SDsetrag: I've been called\n");
 #endif
     
-#ifdef HAVE_PABLO
-    TRACE_ON(PABLO_mask, ID_SDsetrag );
-#endif
 
     /* get the variable */
     handle = SDIhandle_from_id(sdsid, SDSTYPE);
@@ -4654,9 +4744,6 @@
       }
     /* Normal cleanup */
 
-#ifdef HAVE_PABLO
-    TRACE_OFF (PABLO_mask, ID_SDsetrag);
-#endif
 
     return ret_value;    
 } /* SDsetrag */
@@ -4690,9 +4777,6 @@
     fprintf(stderr, "SDsetaccesstype: I've been called\n");
 #endif
 
-#ifdef HAVE_PABLO
-    TRACE_ON(PABLO_mask, ID_SDsetaccesstype );
-#endif
 
     switch (accesstype)
       {
@@ -4739,9 +4823,6 @@
       }
     /* Normal cleanup */
 
-#ifdef HAVE_PABLO
-    TRACE_OFF (PABLO_mask, ID_SDsetaccesstype);
-#endif
 
     return ret_value;    
 } /* SDsetaccesstype */
@@ -4773,9 +4854,6 @@
     fprintf(stderr, "SDsetblocksize: I've been called\n");
 #endif
 
-#ifdef HAVE_PABLO
-    TRACE_ON(PABLO_mask, ID_SDsetblocksize );
-#endif
 
     /* get the handle */
     handle = SDIhandle_from_id(sdsid, SDSTYPE);
@@ -4803,9 +4881,6 @@
       }
     /* Normal cleanup */
 
-#ifdef HAVE_PABLO
-    TRACE_OFF (PABLO_mask,  ID_SDsetblocksize);
-#endif
 
     return ret_value;    
 } /* SDsetblocksize */
@@ -4835,9 +4910,6 @@
     fprintf(stderr, "SDsetfillmode: I've been called\n");
 #endif
 
-#ifdef HAVE_PABLO
-    TRACE_ON(PABLO_mask, ID_SDsetfillmode );
-#endif
 
     /* get the handle */
     handle = SDIhandle_from_id(sd_id, CDFTYPE);
@@ -4857,9 +4929,6 @@
       }
     /* Normal cleanup */
 
-#ifdef HAVE_PABLO
-    TRACE_OFF (PABLO_mask, ID_SDsetfillmode);
-#endif
 
     return ret_value;    
 } /* SDsetfillmode() */
@@ -4889,9 +4958,6 @@
     fprintf(stderr, "SDsetdimval_comp: I've been called\n");
 #endif
 
-#ifdef HAVE_PABLO
-    TRACE_ON(PABLO_mask, ID_SDsetdimval_comp );
-#endif
 
     /* get the handle */
     handle = SDIhandle_from_id(dimid, DIMTYPE);
@@ -4927,9 +4993,6 @@
       }
     /* Normal cleanup */
 
-#ifdef HAVE_PABLO
-    TRACE_OFF (PABLO_mask, ID_SDsetdimval_comp);
-#endif
 
     return ret_value;    
 } /* SDsetdimval_comp */
@@ -4957,9 +5020,6 @@
     fprintf(stderr, "SDisdimval_bwcomp: I've been called\n");
 #endif
 
-#ifdef HAVE_PABLO
-    TRACE_ON(PABLO_mask, ID_SDisdimval_bwcomp );
-#endif
 
     /* get the handle */
     handle = SDIhandle_from_id(dimid, DIMTYPE);
@@ -4991,9 +5051,6 @@
       }
     /* Normal cleanup */
 
-#ifdef HAVE_PABLO
-    TRACE_OFF (PABLO_mask, ID_SDisdimval_bwcomp);
-#endif
 
     return ret_value;    
 } /* SDisdimval_bwcomp */
@@ -5115,6 +5172,7 @@
            HDF_CHUNK_DEF chunk_def, /* IN: chunk definition */
            int32         flags      /* IN: flags */)
 {
+    CONSTR(FUNC, "SDsetchunk");    /* for HGOTO_ERROR */
     NC        *handle = NULL;      /* file handle */
     NC_var    *var    = NULL;      /* SDS variable */
     NC_attr  **fill_attr = NULL;   /* fill value attribute */
@@ -5122,6 +5180,7 @@
     HDF_CHUNK_DEF *cdef   = NULL;  /* SD Chunk definition */
     model_info minfo;              /* dummy model info struct */
     comp_info  cinfo;              /* compression info - NBIT */
+uint32 comp_config;
     int32     *cdims    = NULL;    /* array of chunk lengths */
     int32      fill_val_len = 0;   /* fill value length */
     void      *fill_val    = NULL; /* fill value */
@@ -5139,10 +5198,9 @@
     fprintf(stderr,"SDsetchunk: called  \n");
 #endif
 
-#ifdef HAVE_PABLO
-    TRACE_ON(PABLO_mask, ID_SDsetchunk );
-#endif
 
+     /* make sure this is cleared */
+     memset(chunk,0,sizeof(chunk[0]));
     /* Check some args */
 
     /* get file handle and verify it is an HDF file 
@@ -5162,6 +5220,13 @@
         goto done;
       }
 
+    /* disallow setting chunk for SDS with rank = 0 - BMR, bug #1045 */
+    if(var->shape == NULL)
+      {
+        ret_value = FAIL;
+        goto done;
+      }
+
     /* Decide type of defintion passed in  */
     switch (flags)
       {
@@ -5175,13 +5240,50 @@
           chunk[0].minfo = &minfo; /* dummy */
           break;
       case (HDF_CHUNK | HDF_COMP):
+      /*  EIP 9/11/03 
+       *  We have to take special care if SZIP library is not available;
+       *  Fow all other compression types do
+       */
           cdef  = (HDF_CHUNK_DEF *)&chunk_def;
+
+    HCget_config_info( (comp_coder_t)cdef->comp.comp_type , &comp_config);
+    if ((comp_config & COMP_DECODER_ENABLED|COMP_ENCODER_ENABLED) == 0) {
+	/* coder not present?? */
+	    HGOTO_ERROR(DFE_NOENCODER, FAIL);
+    }
+    if ((comp_config & COMP_ENCODER_ENABLED) == 0) {
+	/* encoder not present?? */
+	HGOTO_ERROR(DFE_BADCODER, FAIL);
+    }
+      if ((comp_coder_t)cdef->comp.comp_type != COMP_CODE_SZIP) {
           cdims = cdef->comp.chunk_lengths;
           chunk[0].chunk_flag = SPECIAL_COMP;  /* Compression */
           chunk[0].comp_type  = (comp_coder_t)cdef->comp.comp_type; 
           chunk[0].model_type = COMP_MODEL_STDIO; /* Default */
           chunk[0].cinfo = &cdef->comp.cinfo; 
           chunk[0].minfo = &minfo; /* dummy */
+       }
+       else /* requested compression is SZIP */
+
+#ifdef H4_HAVE_LIBSZ          /* we have the library */
+          {
+           cdims = cdef->comp.chunk_lengths;
+           chunk[0].chunk_flag = SPECIAL_COMP;  /* Compression */
+           chunk[0].comp_type  = (comp_coder_t)cdef->comp.comp_type; 
+           chunk[0].model_type = COMP_MODEL_STDIO; /* Default */
+           chunk[0].minfo = &minfo; /* dummy */
+    	   HDmemcpy(&cinfo,&(cdef->comp.cinfo),sizeof(comp_info));
+	   if ( SDsetup_szip_parms( sdsid, handle, &cinfo, cdims) == FAIL ) {
+	       HGOTO_ERROR(DFE_INTERNAL, FAIL);
+	   }
+              chunk[0].cinfo = &cinfo; 
+          }
+#else                         /* we do not have the SZIP library */
+          {
+		HGOTO_ERROR(DFE_BADCODER, FAIL);
+          }
+#endif /* H4_HAVE_LIBSZ */
+
           break;
       case (HDF_CHUNK | HDF_NBIT):
           cdef  = (HDF_CHUNK_DEF *)&chunk_def;
@@ -5461,9 +5563,6 @@
     if (chunk[0].pdims != NULL)
         HDfree(chunk[0].pdims);
 
-#ifdef HAVE_PABLO
-    TRACE_OFF (PABLO_mask, ID_SDsetchunk);
-#endif
 
     return ret_value;
 } /* SDsetchunk */
@@ -5510,9 +5609,6 @@
     intn      i;                   /* loop variable */
     intn      ret_value = SUCCEED; /* return value */
 
-#ifdef HAVE_PABLO
-    TRACE_ON(PABLO_mask, ID_SDgetchunkinfo );
-#endif
 
     /* Check args */
 
@@ -5593,9 +5689,6 @@
       }
     /* Normal cleanup */
 
-#ifdef HAVE_PABLO
-    TRACE_OFF (PABLO_mask, ID_SDgetchunkinfo);
-#endif
 
     return ret_value;
 } /* SDgetchunkinfo() */
@@ -5632,6 +5725,7 @@
              int32      *origin,/* IN: origin of chunk to write */
              const void *datap  /* IN: buffer for data */)
 {
+    CONSTR(FUNC, "SDwritechunk");    /* for HGOTO_ERROR */
     NC        *handle = NULL;   /* file handle */
     NC_var    *var    = NULL;   /* SDS variable */
     int16      special;         /* Special code */
@@ -5640,24 +5734,22 @@
     int8       platntsubclass;  /* the machine type of the current platform */
     int8       outntsubclass;   /* the data's machine type */
     uintn      convert;         /* whether to convert or not */
+    comp_coder_t comp_type;
+    comp_info c_info;
+    uint32  comp_config;
+    int32 status;
     intn       i;
     sp_info_block_t info_block; /* special info block */
     static uint32 tBuf_size = 0; /* statc conversion buffer size */
     static void  *tBuf = NULL;   /* static buffer used for conversion */
     intn       ret_value = SUCCEED;
 
-#ifdef HAVE_PABLO
-    TRACE_ON(PABLO_mask, ID_SDwritechunk );
-#endif
 
     info_block.cdims = NULL;
 
     /* Check args */
     if (origin == NULL || datap == NULL)
-      {
-        ret_value = FAIL;
-        goto done;
-      }
+        HGOTO_ERROR(DFE_ARGS, FAIL);
 
     /* get file handle and verify it is an HDF file 
        we only handle writinng to SDS only not coordinate variables */
@@ -5668,6 +5760,7 @@
         goto done;
       }
 
+
     /* get variable from id */
     var = SDIget_var(handle, sdsid);
     if(var == NULL)
@@ -5683,6 +5776,22 @@
         goto done;
       }
 
+    /* Check compression method is enabled */
+    status = HCPgetcompress(handle->hdf_file, var->data_tag, var->data_ref, 
+		&comp_type, &c_info);
+
+    if (status != FAIL) {
+	    HCget_config_info( comp_type , &comp_config);
+	    if ((comp_config & COMP_DECODER_ENABLED|COMP_ENCODER_ENABLED) == 0) {
+		/* coder not present?? */
+		    HGOTO_ERROR(DFE_NOENCODER, FAIL);
+	    }
+	    if ((comp_config & COMP_ENCODER_ENABLED) == 0) {
+		/* encoder not present?? */
+		HGOTO_ERROR(DFE_BADCODER, FAIL);
+	    }
+    }
+
     /* inquire about element */
     ret_value = Hinquire(var->aid, NULL, NULL, NULL, NULL, NULL, NULL, NULL, &special);
     if (ret_value != FAIL)
@@ -5794,9 +5903,6 @@
     if (info_block.cdims != NULL)
         HDfree(info_block.cdims);
 
-#ifdef HAVE_PABLO
-    TRACE_OFF (PABLO_mask, ID_SDwritechunk);
-#endif
 
     return ret_value;
 } /* SDwritechunk() */
@@ -5832,6 +5938,7 @@
             int32 *origin, /* IN: origin of chunk to write */
             void  *datap   /* IN/OUT: buffer for data */)
 {
+    CONSTR(FUNC, "SDreadchunk");    /* for HGOTO_ERROR */
     NC        *handle = NULL;   /* file handle */
     NC_var    *var    = NULL;   /* SDS variable */
     int16      special;         /* Special code */
@@ -5840,24 +5947,22 @@
     int8       platntsubclass;  /* the machine type of the current platform */
     int8       outntsubclass;   /* the data's machine type */
     uintn      convert;         /* whether to convert or not */
+    comp_coder_t comp_type;
+    comp_info c_info;
+    uint32  comp_config;
+    int32 status;
     intn       i;
     sp_info_block_t info_block; /* special info block */
     static uint32 tBuf_size = 0; /* statc conversion buffer size */
     static void  *tBuf = NULL; /* static buffer used for conversion */
     intn       ret_value = SUCCEED;
 
-#ifdef HAVE_PABLO
-    TRACE_ON(PABLO_mask, ID_SDreadchunk );
-#endif
 
     info_block.cdims = NULL;
 
     /* Check args */
     if (origin == NULL || datap == NULL)
-      {
-        ret_value = FAIL;
-        goto done;
-      }
+        HGOTO_ERROR(DFE_ARGS, FAIL);
 
     /* get file handle and verify it is an HDF file 
        we only handle reading from SDS only not coordinate variables */
@@ -5883,6 +5988,22 @@
         goto done;
       }
 
+    /* Check compression method is enabled */
+    status = HCPgetcompress(handle->hdf_file, var->data_tag, var->data_ref, 
+		&comp_type, &c_info);
+
+    if (status != FAIL) {
+	    HCget_config_info( comp_type , &comp_config);
+	    if ((comp_config & COMP_DECODER_ENABLED|COMP_ENCODER_ENABLED) == 0) {
+		/* coder not present?? */
+		    HGOTO_ERROR(DFE_NOENCODER, FAIL);
+	    }
+	    if ((comp_config & COMP_DECODER_ENABLED) == 0) {
+		/* decoder not present?? */
+		HGOTO_ERROR(DFE_BADCODER, FAIL);
+	    }
+    }
+
     /* inquire about element */
     ret_value = Hinquire(var->aid, NULL, NULL, NULL, NULL, NULL, NULL, NULL, &special);
     if (ret_value != FAIL)
@@ -5993,9 +6114,6 @@
     if (info_block.cdims != NULL)
         HDfree(info_block.cdims);
 
-#ifdef HAVE_PABLO
-    TRACE_OFF (PABLO_mask, ID_SDreadchunk);
-#endif
 
     return ret_value;
 } /* SDreadchunk() */
@@ -6060,9 +6178,6 @@
     int16     special;              /* Special code */
     intn      ret_value = SUCCEED;
 
-#ifdef HAVE_PABLO
-    TRACE_ON(PABLO_mask,ID_SDsetchunkcache );
-#endif
 
     /* Check args */
     if (maxcache < 1 )
@@ -6118,10 +6233,6 @@
       }
     /* Normal cleanup */
 
-#ifdef HAVE_PABLO
-    TRACE_OFF (PABLO_mask, ID_SDsetchunkcache);
-#endif
-
     return ret_value;
 } /* SDsetchunkcache() */
 
@@ -6135,30 +6246,33 @@
     SDS has not been written with data, and FALSE, otherwise. 
 
  RETURNS
-	SUCCEED/FAIL
+    SUCCEED/FAIL
 
  AUTHOR
-	bmribler - 9-01-98
+    bmribler - 9-01-98
         
+ MODIFICATION
+    bmribler - 9/29/2004
+        When the SDS is not a special element, we only need to check
+        its data ref# to decide whether it has data written, but
+        when the SDS is a special element, it still has a valid
+        data ref# even though it doesn't have data, we'll then need
+        to perform a more detailed check.  Added more detailed checks.
+
 ******************************************************************************/
 int32
 SDcheckempty(int32 sdsid,  /* IN: dataset ID */
 	     intn  *emptySDS /* TRUE if SDS is empty */)
 {
-    NC     *handle = NULL;
-    NC_var *var = NULL;
+    CONSTR(FUNC, "SDcheckempty");	/* for HGOTO_ERROR */
+    NC     *handle = NULL;		/* file record struct */
+    NC_var *var = NULL;			/* variable record struct */
     int32   ret_value = SUCCEED;
 
 #ifdef SDDEBUG
     fprintf(stderr, "SDcheckempty: I've been called\n");
 #endif
 
-#ifdef HAVE_PABLO
-#ifndef ID_SDcheckempty
-#define ID_SDcheckempty DUMMY_HDF
-#endif
-    TRACE_ON(PABLO_mask,ID_SDcheckempty );
-#endif
     /* get the handle */
     handle = SDIhandle_from_id(sdsid, SDSTYPE);
     if(handle == NULL) 
@@ -6175,27 +6289,94 @@
         goto done;
       }
 
-    /* if the SDS has been written with data, a storage is created 
-	for the SDS data, and var->data_ref will contain this storage's 
-	reference number, not 0 */
-    if( var->data_ref != 0 )
-      {
-        *emptySDS = FALSE;
-        goto done;
-      }
-    *emptySDS = TRUE;  /* SDS is not written with data */
+    /* assume that the SDS is not empty until proving otherwise */
+    *emptySDS = FALSE;
 
+    /* if the data ref# of the SDS is 0, it indicates that the SDS has 
+	not been written with data because no storage is created 
+	for the SDS data */
+    if (var->data_ref == 0)
+    {
+        *emptySDS = TRUE;
+    }
+    else
+    { /* data_ref is not 0, so must check on special SDSs to determine if
+	 the SDS is empty */
+	ret_value = HDcheck_empty(handle->hdf_file, var->data_tag, 
+				  var->data_ref, emptySDS);
+	if (ret_value == FAIL) HGOTO_ERROR(DFE_INTERNAL, FAIL);
+    } /* var->data_ref != 0 */
+
 done:
     if (ret_value == FAIL)
       { /* Failure cleanup */
 
       }
     /* Normal cleanup */
-#ifdef HAVE_PABLO
-    TRACE_OFF (PABLO_mask, ID_SDcheckempty);
+    return ret_value;
+} /* SDcheckempty */
+
+/******************************************************************************
+ NAME
+	SDidtype -- returns the type of an id
+
+ DESCRIPTION
+    Given an id, return its type, which is either an SD id, an SDS id, or
+    a dimension id, or indicate that it is not a valid SD API id.
+
+ RETURNS
+    A value of type hdf_idtype_t, which can be either of the following:
+    SD_ID, SDS_ID, DIM_ID, NOT_SDAPI_ID.
+
+ AUTHOR
+    bmribler - 1-19-2005
+        
+ MODIFICATION
+
+******************************************************************************/
+hdf_idtype_t SDidtype(int32 an_id)
+{
+    NC     *handle = NULL;	/* file record struct */
+    hdf_idtype_t ret_value = NOT_SDAPI_ID;
+
+#ifdef SDDEBUG
+    fprintf(stderr, "SDidtype: I've been called\n");
 #endif
 
+    /* Assuming that the id is an SD id, get and check the handle */
+    handle = SDIhandle_from_id(an_id, CDFTYPE);
+
+    /* If it is, indicate so */
+    if(handle != NULL)
+	ret_value = SD_ID;
+
+    /* otherwise, check further... */
+    else
+    {
+	/* Assuming that it is an SDS id, get and check the handle */
+	handle = SDIhandle_from_id(an_id, SDSTYPE);
+
+	/* If it is, indicate so */
+	if(handle != NULL)
+            ret_value = SDS_ID;
+
+	/* otherwise, check if it is a dimension id, or just not valid */
+	else
+	{
+            handle = SDIhandle_from_id(an_id, DIMTYPE);
+            if(handle != NULL)
+		ret_value = DIM_ID;
+	    else
+		ret_value = NOT_SDAPI_ID;
+        }
+    }
+done:
+    if (ret_value == FAIL)
+      { /* Failure cleanup */
+
+      }
+    /* Normal cleanup */
     return ret_value;
-} /* SDcheckempty */
+} /* SDidtype */
 
 #endif /* HDF */

Modified: packages/libhdf4/branches/upstream/current/mfhdf/libsrc/netcdf.h.in
===================================================================
--- packages/libhdf4/branches/upstream/current/mfhdf/libsrc/netcdf.h.in	2007-05-15 09:05:29 UTC (rev 830)
+++ packages/libhdf4/branches/upstream/current/mfhdf/libsrc/netcdf.h.in	2007-05-15 09:53:05 UTC (rev 831)
@@ -14,7 +14,7 @@
  * Unidata, to assist in its use, correction, modification, or enhancement.
  *
  */
-/* "$Id: netcdf.h.in,v 1.13 2000/05/23 18:03:34 acheng Exp $" */
+/* "$Id: netcdf.h.in,v 1.16 2004/11/22 18:57:08 epourmal Exp $" */
 
 #ifndef _NETCDF_
 #define _NETCDF_
@@ -295,7 +295,7 @@
  */
 #if defined _CRAYMPP
 typedef short	nclong;
-#elif defined __alpha || (_MIPS_SZLONG == 64) || defined IA64
+#elif defined __alpha || (_MIPS_SZLONG == 64) || defined IA64 || (defined __sun__ && defined _LP64) || defined AIX5L64
 typedef int     nclong;   
 #else
 typedef long    nclong;         /* default, compatible type */
@@ -334,6 +334,7 @@
 #define	NC_EXDR		32	/* */
 #define	NC_SYSERR	-1
 
+#include "hdf2netcdf.h"
 extern int ncerr ;
 
 /*
@@ -362,7 +363,6 @@
 #   define	PROTO(x)	()
 #endif
 
-#include "hdf2netcdf.h"
 
 #ifdef __cplusplus
 extern "C" {

Modified: packages/libhdf4/branches/upstream/current/mfhdf/libsrc/putget.c
===================================================================
--- packages/libhdf4/branches/upstream/current/mfhdf/libsrc/putget.c	2007-05-15 09:05:29 UTC (rev 830)
+++ packages/libhdf4/branches/upstream/current/mfhdf/libsrc/putget.c	2007-05-15 09:53:05 UTC (rev 831)
@@ -2,7 +2,7 @@
  *	Copyright 1993, University Corporation for Atmospheric Research
  *      See netcdf/COPYRIGHT file for copying and redistribution conditions.
  */
-/*	$Id: putget.c,v 1.73 2000/08/29 13:56:53 koziol Exp $ */
+/*	$Id: putget.c,v 1.78 2003/12/10 21:15:13 epourmal Exp $ */
 
 #include	<string.h>
 #include	"local_nc.h"
@@ -582,7 +582,7 @@
 	case NC_LONG :
 #if defined _CRAYMPP
 		return( xdr_short(xdrs, (nclong *)values) ) ;
-#elif defined __alpha || (_MIPS_SZLONG == 64) || defined IA64
+#elif defined __alpha || (_MIPS_SZLONG == 64) || defined __ia64 || (defined __sun && defined _LP64) || defined AIX5L64 || defined __x86_64__
 		return( xdr_int(xdrs, (nclong *)values) ) ;
 #else
 		return( xdr_long(xdrs, (nclong *)values) ) ;
@@ -1899,7 +1899,7 @@
 	case NC_LONG :
 #if defined _CRAYMPP
                 xdr_NC_fnct = xdr_short;
-#elif defined __alpha || (_MIPS_SZLONG == 64) || defined IA64
+#elif defined __alpha || (_MIPS_SZLONG == 64) || defined __ia64 || (defined __sun && defined _LP64) || defined AIX5L64 || defined __x86_64__
 		xdr_NC_fnct = xdr_int ;
 #else
 		xdr_NC_fnct = xdr_long ;
@@ -1977,8 +1977,9 @@
      *  regular dimensions of an unlimited dimension dataset are being written
      *  out, it's ok to write out a "block" of all those slices at once. -QAK
      */
-	if( IS_RECVAR(vp) && (edp-1==edges) && !partial)
+/*	if( IS_RECVAR(vp) && (edp-1==edges) && !partial)
         edp=edges;
+*/
 
 	/* shp, edp reference last index s.t. shape[ii] == edge[ii] */
 	return(edp) ;

Added: packages/libhdf4/branches/upstream/current/mfhdf/libsrc/temptySDSs.c
===================================================================
--- packages/libhdf4/branches/upstream/current/mfhdf/libsrc/temptySDSs.c	                        (rev 0)
+++ packages/libhdf4/branches/upstream/current/mfhdf/libsrc/temptySDSs.c	2007-05-15 09:53:05 UTC (rev 831)
@@ -0,0 +1,484 @@
+/****************************************************************************
+ * NCSA HDF                                                                 *
+ * Software Development Group                                               *
+ * National Center for Supercomputing Applications                          *
+ * University of Illinois at Urbana-Champaign                               *
+ * 605 E. Springfield, Champaign IL 61820                                   *
+ *                                                                          *
+ * For conditions of distribution and use, see the accompanying             *
+ * hdf/COPYING file.                                                        *
+ *                                                                          *
+ ****************************************************************************/
+
+/****************************************************************************
+ * temptySDS.c - tests the API SDcheckempty.
+ * Structure of the file:
+ *    test_checkempty - test driver
+ *	  test_nonspecial_SDSs - tests nonspecial SDSs without closing file
+ *	  test_compressed_SDSs - tests compressed SDSs without closing file
+ *	  test_chunked_SDSs    - tests chunked SDSs without closing file
+ *	  test_unlimited_SDSs  - tests unlimited dim SDSs without closing file
+ *	  test_SDSs_infile     - tests all SDSs in file after closing the file
+ *	  			 and reopening it
+ *    check_SDS - utility routine that calls SDcheckempty and verifies values
+****************************************************************************/
+
+#include "mfhdf.h"
+
+#ifdef HDF
+
+#include "hdftest.h"
+
+#define FILE_NAME     "emptySDSs.hdf"	/* data file to test empty SDSs */
+#define X_LENGTH      10
+#define Y_LENGTH      10
+#define RANK          2
+
+/* Utility routine that selects that named SDS, then calls SDcheckempty
+ * and verifies the returned values. */
+static void check_SDS(
+		int32 fid, 		/* file id */
+		char* sds_name, 	/* name of the inquired SDS */
+		int32 check_value, 	/* expected ret val from SDcheckempty */
+		int32 verify_value, 	/* expected value of 'emptySDS' from SDcheckempty */
+		int* ret_num_errs	/* current number of errors */ )
+{
+    int32 sds_id, sds_index, status_32;
+    intn status, emptySDS;
+    int num_errs = 0;
+    char mesg[80];
+
+    /* Get index of dataset using its name */
+    sds_index = SDnametoindex(fid, sds_name);
+    sprintf(mesg, "In check_SDS: SDnametoindex (%s)", sds_name);
+    CHECK(sds_index, FAIL, mesg);
+
+    /* Select the dataset */
+    sds_id = SDselect(fid, sds_index);
+    CHECK(sds_id, FAIL, "In check_SDS: SDselect");
+
+    /* The returned value from SDcheckempty is CHECKed against 
+       check_value (FAIL) and 'emptySDS' is verified to be verify_value,
+       which can be TRUE or FALSE. */
+    status_32 = SDcheckempty( sds_id, &emptySDS);
+    CHECK(status_32, check_value, "SDcheckempty");
+    VERIFY(emptySDS, verify_value, "SDcheckempty");
+
+    /* Close this SDS */
+    status = SDendaccess(sds_id);
+    CHECK(status, FAIL, "In check_SDS: SDendaccess");
+
+    *ret_num_errs = num_errs;
+}   /* check_SDS */
+
+/* Test non-special SDSs.  This routine creates non-special SDSs, writes
+ * data to one of the SDSs, and checks for emptiness on each without closing
+ * the file. */
+static intn 
+test_nonspecial_SDSs(int32 fid)
+{
+    int32 sds_id;
+    int32 dimsize[2], start[2], edges[2];
+    int32 data[Y_LENGTH][X_LENGTH];
+    intn  status;
+    int   i, j;
+    int   num_errs = 0;		/* number of errors so far */
+
+    /* Initialize data for the dataset */
+    for (j = 0; j < Y_LENGTH; j++) {
+        for (i = 0; i < X_LENGTH; i++)
+            data[j][i] = (i + j) + 1;
+    }
+
+    /* Create a 2x2 dataset called "EmptyDataset" */
+    dimsize[0] = Y_LENGTH;
+    dimsize[1] = X_LENGTH;
+    sds_id = SDcreate(fid, "EmptyDataset", DFNT_FLOAT32, 2, dimsize);
+    CHECK(sds_id, FAIL, "In test_nonspecial_SDSs: SDcreate 'EmptyDataset'");
+
+    /* Close this SDS */
+    status = SDendaccess(sds_id);
+    CHECK(status, FAIL, "In test_nonspecial_SDSs: SDendaccess");
+
+    /* Check that this SDS is empty */
+    check_SDS(fid, "EmptyDataset", FAIL, TRUE, &num_errs);
+
+    /* Create another 2x2 dataset called "WrittenDataset" */
+    sds_id = SDcreate(fid, "WrittenDataset", DFNT_INT32, 2, dimsize);
+    CHECK(sds_id, FAIL, "In test_nonspecial_SDSs: SDcreate 'WrittenDataset'");
+
+    /* Define the location and size of the data to be written to the dataset */
+    start[0] = 0;
+    start[1] = 0;
+    edges[0] = Y_LENGTH;
+    edges[1] = X_LENGTH;
+
+    /* Write the stored data to the dataset */
+    status = SDwritedata(sds_id, start, NULL, edges, (VOIDP)data);
+    CHECK(sds_id, FAIL, "In test_nonspecial_SDSs: SDwritedata");
+
+    /* Close this SDS */
+    status = SDendaccess(sds_id);
+    CHECK(status, FAIL, "In test_nonspecial_SDSs: SDendaccess");
+
+    /* Check that this SDS is NOT empty */
+    check_SDS(fid, "WrittenDataset", FAIL, FALSE, &num_errs);
+
+    /* Return the number of errors that's been kept track of so far */
+    return num_errs;
+} /* test_nonspecial_SDSs */
+
+/* Test compressed SDSs.  This routine creates compressed SDSs, writes
+ * data to one of the SDSs, and checks for emptiness on each without closing
+ * the file. */
+static intn
+test_compressed_SDSs(int32 fid)
+{
+    int32     sds_id, esds_id;
+    int32     start[2], edges[2], dim_sizes[2];
+    int32     comp_type;    /* Compression flag */
+    comp_info c_info;	   /* Compression structure */
+    int32     data[Y_LENGTH][X_LENGTH];
+    intn      status;
+    int       i, j;
+    int   num_errs = 0;   /* number of errors so far */
+
+    /* Buffer array data and define array dimensions */
+    for (j = 0; j < Y_LENGTH; j++)
+    {
+        for (i = 0; i < X_LENGTH; i++)
+                data[j][i] = (i + j) + 1;
+    }
+    dim_sizes[0] = Y_LENGTH;
+    dim_sizes[1] = X_LENGTH;
+
+    /* Create datasets, one to be written with data, the other not */
+    sds_id = SDcreate(fid, "CompressedData", DFNT_INT32, RANK, dim_sizes);
+    CHECK(sds_id, FAIL, "In test_compressed_SDSs: SDcreate 'CompressedData'");
+
+    esds_id = SDcreate(fid, "Compressed-No-Data", DFNT_INT32, RANK, dim_sizes);
+    CHECK(esds_id, FAIL, "In test_compressed_SDSs: SDcreate 'Compressed-No-Data'");
+
+    comp_type = COMP_CODE_DEFLATE;
+    c_info.deflate.level = 6;
+    status = SDsetcompress(sds_id, comp_type, &c_info);
+    CHECK(status, FAIL, "In test_compressed_SDSs: SDsetcompress 'CompressedData'");
+
+    status = SDsetcompress(esds_id, comp_type, &c_info);
+    CHECK(status, FAIL, "In test_compressed_SDSs: SDsetcompress 'Compressed-No-Data'");
+
+    /* Define the location and size of the dataset to be written to the file */
+    start[0] = 0;
+    start[1] = 0;
+    edges[0] = Y_LENGTH;
+    edges[1] = X_LENGTH;
+
+    /* Write the stored data to the dataset */
+    status = SDwritedata(sds_id, start, NULL, edges, (VOIDP)data);
+    CHECK(status, FAIL, "In test_compressed_SDSs: SDwritedata");
+ 
+     /* Close the SDSs */
+    status = SDendaccess(sds_id);
+    CHECK(status, FAIL, "In test_compressed_SDSs: SDendaccess 'CompressedData'");
+
+    status = SDendaccess(esds_id);
+    CHECK(status, FAIL, "In test_compressed_SDSs: SDendaccess 'Compressed-No-Data'");
+
+    /* Check that this SDS is NOT empty */
+    check_SDS(fid, "CompressedData", FAIL, FALSE, &num_errs);
+
+    /* Check that this SDS is empty */
+    check_SDS(fid, "Compressed-No-Data", FAIL, TRUE, &num_errs);
+
+    /* Return the number of errors that's been kept track of so far */
+    return num_errs;
+} /* test_compressed_SDSs */
+
+/* Test chunked SDSs.  This routine creates chunked SDSs, writes data
+ * to one of the SDSs, and checks for emptiness on each without closing
+ * the file. */
+
+#define X_CHUNKED_LENGTH      4
+#define Y_CHUNKED_LENGTH      9
+
+static intn
+test_chunked_SDSs(int32 fid)
+{
+    int32         sds_id, esds_id, sds_index;
+    int32         flag, maxcache, new_maxcache;
+    int32         dim_sizes[RANK], origin[RANK];
+    HDF_CHUNK_DEF c_def; /* Chunking definitions */ 
+    int32         comp_flag;
+    int16         fill_value = 0;   /* Fill value */
+    intn          status;
+    int           num_errs = 0;   /* number of errors so far */
+
+    /* Declare chunks data type and initialize some of them. */
+    int16 chunk1[3][2] = { 1, 1,
+                           1, 1,
+                           1, 1 }; 
+
+    int16 chunk2[3][2] = { 2, 2,
+                           2, 2,
+                           2, 2 }; 
+
+    int16 chunk3[3][2] = { 3, 3,
+                           3, 3,
+                           3, 3 }; 
+
+    int16 chunk6[3][2] = { 6, 6,
+                           6, 6,
+                           6, 6 };
+
+
+    c_def.chunk_lengths[0] = 3;
+    c_def.chunk_lengths[1] = 2;
+
+    /* Create Y_CHUNKED_LENGTH x X_CHUNKED_LENGTH SDS */
+    dim_sizes[0] = Y_CHUNKED_LENGTH;
+    dim_sizes[1] = X_CHUNKED_LENGTH;
+    esds_id = SDcreate(fid, "Chunked-No-Data", DFNT_INT16, RANK, dim_sizes);
+    CHECK(esds_id, FAIL, "In test_chunked_SDSs: SDcreate 'Chunked-No-Data'");
+
+    /* Terminate access to the "Chunked-No-Data" dataset */
+    status = SDendaccess(esds_id);
+    CHECK(status, FAIL, "In test_chunked_SDSs: SDendaccess 'Chunked-No-Data'");
+
+    /* Check that this SDS is empty */
+    check_SDS(fid, "Chunked-No-Data", FAIL, TRUE, &num_errs);
+
+    /* Create another Y_CHUNKED_LENGTH x X_CHUNKED_LENGTH SDS but this 
+       one will be written with chunks */
+    sds_id = SDcreate(fid, "ChunkedData", DFNT_INT16, RANK, dim_sizes);
+    CHECK(sds_id, FAIL, "In test_chunked_SDSs: SDcreate 'ChunkedData'");
+
+    /* Fill the SDS array with the fill value */
+    status = SDsetfillvalue(sds_id, (VOIDP)&fill_value);
+    CHECK(status, FAIL, "In test_chunked_SDSs: SDsetfillvalue");
+
+    /* Set info for chunking */
+    comp_flag = HDF_CHUNK;
+    status = SDsetchunk(sds_id, c_def, comp_flag);
+    CHECK(status, FAIL, "In test_chunked_SDSs: SDsetchunk");
+
+    /* Set chunk cache to hold maximum of 3 chunks */
+    maxcache = 3;
+    flag = 0;
+    new_maxcache = SDsetchunkcache(sds_id, maxcache, flag);
+    CHECK(new_maxcache, FAIL, "In test_chunked_SDSs: SDsetchunkcache");
+
+    /* Terminate access to the dataset then check if it's empty - and it 
+       should be, before writing data to it. */
+    status = SDendaccess(sds_id);
+    CHECK(status, FAIL, "In test_chunked_SDSs: SDendaccess");
+
+    /* Check that this SDS is still empty after the call to SDsetchunk */
+    check_SDS(fid, "ChunkedData", FAIL, TRUE, &num_errs);
+
+    /* Re-select the "ChunkedData" SDS, then write chunks using SDwritechunk 
+       function */
+
+    /* Get index of dataset using its name */
+    sds_index = SDnametoindex(fid, "ChunkedData");
+    CHECK(sds_index, FAIL, "In test_chunked_SDSs: SDnametoindex");
+
+    /* Select the dataset */
+    sds_id = SDselect(fid, sds_index);
+    CHECK(sds_id, FAIL, "In test_chunked_SDSs: SDselect");
+
+    /* Write the chunk with the coordinates (0,0) */
+    origin[0] = 0;
+    origin[1] = 0;
+    status = SDwritechunk(sds_id, origin, (VOIDP) chunk1);
+    CHECK(status, FAIL, "In test_chunked_SDSs: SDwritechunk");
+
+    /* Write the chunk with the coordinates (1,0) */
+    origin[0] = 1;
+    origin[1] = 0;
+    status = SDwritechunk(sds_id, origin, (VOIDP) chunk3);
+    CHECK(status, FAIL, "In test_chunked_SDSs: SDwritechunk");
+
+    /* Write the chunk with the coordinates (0,1) */
+    origin[0] = 0;
+    origin[1] = 1;
+    status = SDwritechunk(sds_id, origin, (VOIDP) chunk2);
+    CHECK(status, FAIL, "In test_chunked_SDSs: SDwritechunk");
+
+    /* Terminate access to the dataset */
+    status = SDendaccess(sds_id);
+    CHECK(status, FAIL, "In test_chunked_SDSs: SDendaccess");
+
+    /* Check that this SDS is NOT empty */
+    check_SDS(fid, "ChunkedData", FAIL, FALSE, &num_errs);
+
+    /* Return the number of errors that's been kept track of so far */
+    return num_errs;
+} /* test_chunked_SDSs */
+
+/* Test unlimited dimension SDSs.  This routine creates unlimited 
+ * dimension SDSs, writes data to one of the SDSs, and checks for 
+ * emptiness on each without closing the file. */
+static intn
+test_unlimited_SDSs(int32 fid)
+{
+    int32 sds_id, esds_id, sds_index;
+    int32 dim_sizes[2];
+    int32 data[Y_LENGTH][X_LENGTH], append_data[X_LENGTH];
+    int32 start[2], edges[2];
+    intn  status;
+    int   i, j;
+    int   num_errs = 0;   /* number of errors so far */
+
+    /* Data initialization */
+    for (j = 0; j < Y_LENGTH; j++) 
+    {
+        for (i = 0; i < X_LENGTH; i++)
+           data[j][i] = (i + 1) + (j + 1);
+    }
+
+    /* Define dimensions of the array. Make the first dimension 
+       appendable by defining its length to be unlimited */
+    dim_sizes[0] = SD_UNLIMITED;
+    dim_sizes[1] = X_LENGTH;
+
+    /* Create the array datasets */
+    esds_id = SDcreate(fid, "Appendable-No-Data", DFNT_INT32, RANK, dim_sizes);
+    CHECK(esds_id, FAIL, "In test_unlimited_SDSs: SDcreate 'Appendable-No-Data'");
+
+    sds_id = SDcreate(fid, "AppendableData", DFNT_INT32, RANK, dim_sizes);
+    CHECK(sds_id, FAIL, "In test_unlimited_SDSs: SDcreate 'AppendableData'");
+
+    /* Terminate access to the dataset "Appendable-No-Data" */
+    status = SDendaccess(esds_id);
+
+    /* Define the location and the size of the data to be written 
+       to the second dataset  */
+    start[0] = start[1] = 0;
+    edges[0] = Y_LENGTH;
+    edges[1] = X_LENGTH;
+
+    /* Write the data */
+    status = SDwritedata(sds_id, start, NULL, edges, (VOIDP)data);
+    CHECK(status, FAIL, "In test_unlimited_SDSs: SDwritedata");
+
+    /* Terminate access to the unlimited dataset */
+    status = SDendaccess(sds_id);
+    CHECK(status, FAIL, "In test_unlimited_SDSs: SDendaccess");
+
+    /* Check that this SDS is NOT empty */
+    check_SDS(fid, "AppendableData", FAIL, FALSE, &num_errs);
+
+    /* Store the array values to be appended to the dataset */
+    for (i = 0; i < X_LENGTH; i++)
+        append_data[i] = 1000 + i;
+
+    /* Get index of the dataset using its name */
+    sds_index = SDnametoindex(fid, "AppendableData");
+    CHECK(sds_index, FAIL, "In test_unlimited_SDSs: SDnametoindex");
+
+    /* Select the "AppendableData" dataset */
+    sds_id = SDselect(fid, sds_index);
+    CHECK(sds_id, FAIL, "In test_unlimited_SDSs: SDselect 'AppendableData'");
+
+    /* Check if selected SDS is unlimited. If it is not, then terminate 
+       access to the SDS */
+    if (SDisrecord(sds_id)) 
+    {
+        /* Define the location of the append to start at the first column 
+         * of the 11th row of the dataset and to stop at the end of the
+         * eleventh row.  */
+        start[0] = Y_LENGTH;
+        start[1] = 0;
+        edges[0] = 1;
+        edges[1] = X_LENGTH;
+
+        /* Append data to the dataset */
+        status = SDwritedata(sds_id, start, NULL, edges, (VOIDP)append_data);
+        CHECK(status, FAIL, "In test_unlimited_SDSs: SDwritedata");
+    }
+
+    /* Terminate access to the dataset */
+    status = SDendaccess(sds_id);
+    CHECK(status, FAIL, "In test_unlimited_SDSs: SDendaccess");
+
+    /* Check that this SDS is NOT empty */
+    check_SDS(fid, "AppendableData", FAIL, FALSE, &num_errs);
+
+    /* Check that this SDS is empty */
+    check_SDS(fid, "Appendable-No-Data", FAIL, TRUE, &num_errs);
+
+    /* Return the number of errors that's been kept track of so far */
+    return num_errs;
+}  /* test_unlimited_SDSs */
+
+/* This function checks which of the SDSs in the file are empty/written,
+ * just as in the previous individual tests.  The difference is these
+ * SDSs are read back in after the file is closed and reopened. */
+static intn 
+test_SDSs_infile()
+{
+    int32 fid;
+    intn status;
+    int   num_errs = 0;		/* number of errors so far */
+
+    /* Open the file and initialize the SD interface */
+    fid = SDstart(FILE_NAME, DFACC_READ);
+    CHECK(fid, FAIL, "In test_SDSs_infile: SDstart");
+
+    /* Check that SDS named "EmptyDataset" is empty */
+    check_SDS(fid, "EmptyDataset", FAIL, TRUE, &num_errs);
+
+    /* Check that SDS named "AppendableData" is NOT empty */
+    check_SDS(fid, "AppendableData", FAIL, FALSE, &num_errs);
+
+    /* Check that SDS named "Appendable-No-Data" is empty */
+    check_SDS(fid, "Appendable-No-Data", FAIL, TRUE, &num_errs);
+
+    /* Check that SDS named "CompressedData" is NOT empty */
+    check_SDS(fid, "CompressedData", FAIL, FALSE, &num_errs);
+
+    /* Check that SDS named "Compressed-No-Data" is empty */
+    check_SDS(fid, "Compressed-No-Data", FAIL, TRUE, &num_errs);
+
+    /* Check that SDS named "ChunkedData" is NOT empty */
+    check_SDS(fid, "ChunkedData", FAIL, FALSE, &num_errs);
+
+    /* Check that SDS named "Chunked-No-Data" is empty */
+    check_SDS(fid, "Chunked-No-Data", FAIL, TRUE, &num_errs);
+
+    /* Close the file */
+    status = SDend(fid);
+    CHECK(status, FAIL, "In test_SDSs_infile: SDend");
+
+    /* Return the number of errors that's been kept track of so far */
+    return num_errs;
+} /* test_SDSs_infile */
+
+/* Test drive for testing the API SDcheckempty. */
+extern int
+test_checkempty()
+{
+    int32 fid;
+    intn status;
+    int num_errs = 0;
+
+    /* Open the file and initialize the SD interface */
+    fid = SDstart(FILE_NAME, DFACC_CREATE);
+    CHECK(fid, FAIL, "In test_checkempty: SDstart");
+
+    num_errs = num_errs + test_nonspecial_SDSs(fid);
+    num_errs = num_errs + test_compressed_SDSs(fid);
+    num_errs = num_errs + test_chunked_SDSs(fid);
+    num_errs = num_errs + test_unlimited_SDSs(fid);
+
+    /* Close the file */
+    status = SDend(fid);
+    CHECK(status, FAIL, "In test_checkempty: SDend");
+
+    /* This function will reopen the file and check the SDSs in it */
+    num_errs = num_errs + test_SDSs_infile();
+
+    return num_errs;
+}
+
+#endif /* HDF */

Added: packages/libhdf4/branches/upstream/current/mfhdf/libsrc/tidtypes.c
===================================================================
--- packages/libhdf4/branches/upstream/current/mfhdf/libsrc/tidtypes.c	                        (rev 0)
+++ packages/libhdf4/branches/upstream/current/mfhdf/libsrc/tidtypes.c	2007-05-15 09:53:05 UTC (rev 831)
@@ -0,0 +1,215 @@
+/****************************************************************************
+ * NCSA HDF                                                                 *
+ * Software Development Group                                               *
+ * National Center for Supercomputing Applications                          *
+ * University of Illinois at Urbana-Champaign                               *
+ * 605 E. Springfield, Champaign IL 61820                                   *
+ *                                                                          *
+ * For conditions of distribution and use, see the accompanying             *
+ * hdf/COPYING file.                                                        *
+ *                                                                          *
+ ****************************************************************************/
+
+/****************************************************************************
+ * tidtypes.c - tests the API SDcheckempty.
+ * Structure of the file:
+ *    test_idtype - test driver
+ *	  test_SDAPI_ids    - tests SDidtype on SD API ids: sd, sds, dim ids
+ *	  test_nonSDAPI_ids - tests SDidtype on non SD API ids and invalid id.
+****************************************************************************/
+
+#include "mfhdf.h"
+
+#ifdef HDF
+
+#include "hdftest.h"
+
+#define FILE_NAME     "idtypes.hdf"	/* data file to test ID types */
+#define X_LENGTH      10
+#define Y_LENGTH      10
+#define RANK          2
+
+static intn
+test_SDAPI_ids()
+{
+    int32     fid, dset1, dset2, dim_id;
+    int32     dimsize[RANK];
+    hdf_idtype_t id_type;
+    intn      status;
+    intn      num_errs = 0;         /* number of errors so far */
+
+    /* Create a file */
+    fid = SDstart(FILE_NAME, DFACC_CREATE);
+    CHECK(fid, FAIL, "SDstart");
+
+    /* Create an X_LENGTH by Y_LENGTH dataset, called DataSet_1 */
+    dimsize[0] = X_LENGTH;
+    dimsize[1] = Y_LENGTH;
+    dset1 = SDcreate(fid, "DataSet_1", DFNT_INT32, RANK, dimsize);
+    CHECK(dset1, FAIL, "SDcreate");
+
+    /* Create another X_LENGTH by Y_LENGTH dataset, called DataSet_2 */
+    dset2 = SDcreate(fid, "DataSet_2", DFNT_FLOAT64, RANK, dimsize);
+    CHECK(dset2, FAIL, "SDcreate");
+
+    /* Test SDidtype on the second dataset */
+    id_type = SDidtype(dset2);
+    VERIFY(id_type, SDS_ID, "SDidtype: id_type");
+
+    /* Close the datasets */
+    status = SDendaccess(dset1);
+    CHECK(status, FAIL, "SDendaccess");
+    status = SDendaccess(dset2);
+    CHECK(status, FAIL, "SDendaccess");
+
+    /* Close the file */
+    status = SDend(fid);
+    CHECK(status, FAIL, "SDend");
+
+    /* Re-open the file to test SDidtype more */
+    fid = SDstart(FILE_NAME, DFACC_RDWR);
+    CHECK(fid, FAIL, "SDstart");
+
+    /* Test SDidtype on the SD id */
+    id_type = SDidtype(fid);
+    VERIFY(id_type, SD_ID, "SDidtype: id_type");
+
+    /* Get access to the first dataset and test SDidtype on the SDS id */
+    dset1 = SDselect(fid, 0);
+    CHECK(dset1, FAIL, "SDselect");
+    id_type = SDidtype(dset1);
+    VERIFY(id_type, SDS_ID, "SDidtype: id_type");
+
+    /* Get access to the second dataset and test SDidtype on the SDS id */
+    dset2 = SDselect(fid, 1);
+    CHECK(dset2, FAIL, "SDselect");
+    id_type = SDidtype(dset2);
+    VERIFY(id_type, SDS_ID, "SDidtype: id_type");
+
+    /* Get dimension handle for first dimension of DataSet_1 and test
+       SDidtype on the dimension id */
+    dim_id = SDgetdimid(dset1, 0);
+    CHECK(dim_id, FAIL, "SDgetdimid");
+    id_type = SDidtype(dim_id);
+    VERIFY(id_type, DIM_ID, "SDidtype dim_id");
+
+    /* Close the datasets */
+    status = SDendaccess(dset1);
+    CHECK(status, FAIL, "SDendaccess");
+    status = SDendaccess(dset2);
+    CHECK(status, FAIL, "SDendaccess");
+
+    /* Close the file */
+    status = SDend(fid);
+    CHECK(status, FAIL, "SDend");
+
+    /* Return the number of errors that's been kept track of so far */
+    return num_errs;
+}   /* test_SDAPI_ids */
+
+static intn
+test_nonSDAPI_ids ()
+{
+    int32     fid, gr_id, vdata_id, ri_id;
+    int32     vdata_ref;
+    intn      status;
+    int32     dims[2]={4,5};    /* dimensions for the empty image */
+    hdf_idtype_t id_type;
+    intn      num_errs = 0;     /* number of errors so far */
+
+    /* Open the HDF file */
+    fid = Hopen(FILE_NAME, DFACC_RDWR, 0);
+    CHECK(fid, FAIL, "Hopen: tidtype.hdf");
+
+    /* Initialize HDF for subsequent vdata access */
+    status = Vstart(fid);
+    CHECK(status, FAIL, "Vstart");
+
+    /* Create a new vdata and give it a name */
+    vdata_id = VSattach(fid, -1, "w");
+    CHECK(vdata_id, FAIL, "VSattach");
+    status = VSsetname(vdata_id, "Vdata_1");
+    CHECK(status, FAIL, "VSsetname");
+
+    /* Terminate access to the vdata */
+    status = VSdetach(vdata_id);
+    CHECK(status, FAIL, "VSdetach");
+
+    /* Terminate access to the Vxxx interface and close the file */
+    status = Vend(fid);
+    CHECK(status, FAIL, "Vend");
+    status = Hclose(fid);
+    CHECK(status, FAIL, "Hclose");
+
+    /* Open the HDF file again to test SDidtype */
+    fid = Hopen(FILE_NAME, DFACC_RDWR, 0);
+    CHECK(fid, FAIL, "Hopen: tidtype.hdf");
+
+    /* Initialize HDF for subsequent vdata accesses */
+    status = Vstart(fid);
+    CHECK(status, FAIL, "Vstart");
+
+    /* Get access to the vdata "Vdata_1" via its reference number */
+    vdata_ref = VSfind(fid, "Vdata_1");
+    CHECK(vdata_ref, FAIL, "VSfind");
+    vdata_id = VSattach(fid, vdata_ref, "w");
+    CHECK(vdata_id, FAIL, "VSattach");
+
+    /* Test SDidtype on the vdata id */
+    id_type = SDidtype(vdata_id);
+    VERIFY(id_type, NOT_SDAPI_ID, "SDidtype: id_type");
+
+    /* Terminate access to the vdata */
+    status = VSdetach(vdata_id);
+    CHECK(status, FAIL, "VSdetach");
+
+    /* Terminate access to the Vxxx interface and close the file */
+    status = Vend(fid);
+    CHECK(status, FAIL, "Vend");
+    status = Hclose(fid);
+    CHECK(status, FAIL, "Hclose");
+
+    /* Test SDidtype on a GR raster image */
+
+    /* Open file and initialize the GR interface */
+    fid = Hopen(FILE_NAME, DFACC_RDWR, 0);
+    CHECK(fid, FAIL, "Hopen: tidtype.hdf");
+    gr_id = GRstart(fid);
+    CHECK(gr_id, FAIL, "GRstart");
+
+    /* Create an empty image with default fill value */
+    ri_id = GRcreate(gr_id, "Empty Image", 3, DFNT_FLOAT32, 
+		MFGR_INTERLACE_PIXEL, dims);
+    CHECK(ri_id, FAIL, "GRcreate");
+
+    /* Test SDidtype on the GR raster image id */
+    id_type = SDidtype(ri_id);
+    VERIFY(id_type, NOT_SDAPI_ID, "SDidtype: id_type");
+
+    /* Close the image */
+    status = GRendaccess(ri_id);
+    CHECK(status, FAIL, "GRendaccess");
+
+    /* Shut down the GR interface and close the file */
+    status = GRend(gr_id);
+    CHECK(status, FAIL, "GRend");
+    status = Hclose(fid);
+    CHECK(status, FAIL, "Hclose");
+
+    /* Return the number of errors that's been kept track of so far */
+    return num_errs;
+}   /* test_nonSDAPI_ids */
+
+/* Test driver for testing the API SDidtype. */
+extern int
+test_idtype()
+{
+    intn num_errs = 0;         /* number of errors */
+
+    num_errs = num_errs + test_SDAPI_ids();
+    num_errs = num_errs + test_nonSDAPI_ids();
+
+    return num_errs;
+}
+
+#endif /* HDF */

Added: packages/libhdf4/branches/upstream/current/mfhdf/libsrc/trank0.c
===================================================================
--- packages/libhdf4/branches/upstream/current/mfhdf/libsrc/trank0.c	                        (rev 0)
+++ packages/libhdf4/branches/upstream/current/mfhdf/libsrc/trank0.c	2007-05-15 09:53:05 UTC (rev 831)
@@ -0,0 +1,158 @@
+/****************************************************************************
+ * NCSA HDF                                                                 *
+ * Software Development Group                                               *
+ * National Center for Supercomputing Applications                          *
+ * University of Illinois at Urbana-Champaign                               *
+ * 605 E. Springfield, Champaign IL 61820                                   *
+ *                                                                          *
+ * For conditions of distribution and use, see the accompanying             *
+ * hdf/COPYING file.                                                        *
+ *                                                                          *
+ ****************************************************************************/
+
+/****************************************************************************
+ * trank0.c - tests that several APIs behave "correctly" when an SDS has 
+ * 		rank = 0.
+ * Structure of the file:
+ *    test_rank0 - test routine, called in hdftest.c
+****************************************************************************/
+
+#include "mfhdf.h"
+
+#ifdef HDF
+
+#include "hdftest.h"
+
+#define FILE_NAME     "trank0.hdf"	/* data file to test for rank=0 */
+#define X_LENGTH      3
+#define Y_LENGTH      3
+#define RANK          0
+
+/* Test routine for testing the several APIs with SDS having rank = 0. */
+extern int
+test_rank0()
+{
+    int32     fid, sds1_id, sds2_id, sds_id;
+    int32     dim_sizes[2], array_rank, num_type, attributes;
+    int32     start[2], edges[2];
+    comp_coder_t comp_type;	/* to retrieve compression type into */
+    comp_info c_info;		/* compression information structure */
+    int32     comp_flag;	/* compression flag */
+    HDF_CHUNK_DEF c_def;	/* Chunking definitions */
+    int32     buf[Y_LENGTH][X_LENGTH], buf_dup[Y_LENGTH][X_LENGTH];
+    intn      i, j, status;
+    int32     status_32;
+    intn      num_errs = 0;	/* number of errors so far */
+
+    /* Create a file */
+    fid = SDstart(FILE_NAME, DFACC_CREATE);
+    CHECK(fid, FAIL, "test_rank0: SDstart");
+
+    /**** Verify that SDsetcompress fails when dataset has rank 0 ****/
+
+    /* Create an X_LENGTH by Y_LENGTH dataset, called DataSet_1 */
+    dim_sizes[0] = X_LENGTH;
+    dim_sizes[1] = Y_LENGTH;
+    sds1_id = SDcreate(fid, "DataSet_1", DFNT_INT32, RANK, dim_sizes);
+    CHECK(sds1_id, FAIL, "test_rank0: SDcreate");
+
+    /* Attempt to set compress but should fail */
+    comp_type = COMP_CODE_DEFLATE;
+    c_info.deflate.level = 6;
+    status = SDsetcompress(sds1_id, comp_type, &c_info);
+    VERIFY(status, FAIL, "test_rank0: SDsetcompress");
+
+    /**** Verify that SDsetchunk fails when dataset has rank 0 ****/
+
+    /* Create an X_LENGTH by Y_LENGTH dataset, called DataSet_2 */
+    sds2_id = SDcreate(fid, "DataSet_2", DFNT_INT32, RANK, dim_sizes);
+    CHECK(sds2_id, FAIL, "test_rank0: SDcreate");
+
+    /* Attempt to set chunk but should fail */
+    comp_flag = HDF_CHUNK;
+    status = SDsetchunk(sds_id, c_def, comp_flag);
+    VERIFY(status, FAIL, "test_rank0: SDsetchunk");
+
+     /* Close the SDSs */
+    status = SDendaccess(sds1_id);
+    CHECK(status, FAIL, "test_rank0: SDendaccess");
+    status = SDendaccess(sds2_id);
+    CHECK(status, FAIL, "test_rank0: SDendaccess");
+
+    /**** Verify that SDwritedata fails when dataset has rank 0 ****/
+
+    /* Initialize buffer and its copy, so later can verify that the buffer
+       is not corrupted */
+    for (j=0; j<Y_LENGTH; j++)
+    {
+        for (i=0; i<X_LENGTH; i++)
+	{
+	    buf[j][i] = i;
+	    buf_dup[j][i] = i;
+	}
+    }
+    /* Select the first dataset */
+    sds_id = SDselect(fid, 0);
+    CHECK(sds_id, FAIL, "test_rank0: SDselect");
+
+    /* Define the location and size of the dataset to be written to the file */
+    start[0] = 0;
+    start[1] = 0;
+    edges[0] = Y_LENGTH;
+    edges[1] = X_LENGTH;
+
+    /* Write the stored data to the dataset */
+    status = SDwritedata(sds_id, start, NULL, edges, (VOIDP)buf);
+    VERIFY(status, FAIL, "test_rank0:SDwritedata");
+
+     /* Close the SDS */
+    status = SDendaccess(sds_id);
+    CHECK(status, FAIL, "test_rank0: SDendaccess");
+
+    /**** Verify that SDreaddata doesn't corrupt user's buffer, when dataset 
+	  has rank 0; at this time, it does (buf[0][0] changed), but EP said
+    	  to just document it for now 2/8/05 - BMR ****/
+
+    /* Select the first dataset */
+    sds_id = SDselect(fid, 0);
+    CHECK(sds_id, FAIL, "test_rank0: SDselect");
+
+    /* Read the data set */
+    start[0] = 0;
+    start[1] = 0;
+    edges[0] = Y_LENGTH;
+    edges[1] = X_LENGTH;
+    status = SDreaddata (sds_id, start, NULL, edges, (VOIDP)buf);
+    CHECK(status, FAIL, "test_rank0: SDreaddata");
+
+     /* Close the SDS */
+    status = SDendaccess(sds_id);
+    CHECK(status, FAIL, "test_rank0: SDendaccess");
+
+    /**** Verify various functions ****/
+
+    /* Select the second dataset */
+    sds_id = SDselect(fid, 1);
+    CHECK(sds_id, FAIL, "test_rank0: SDselect");
+
+    /* Retrieve information of the data set */
+    status = SDgetinfo(sds_id, NULL, &array_rank, dim_sizes, &num_type, &attributes);
+    CHECK(status, FAIL, "test_rank0: SDgetinfo");
+    VERIFY(array_rank, 0, "test_rank0: SDgetinfo");
+
+    /* Verify that SDisrecord doesn't cause seg. fault */
+    status_32 = SDisrecord(sds_id);
+    VERIFY(status_32, TRUE, "test_rank0: SDisrecord");
+
+     /* Close the SDSs */
+    status = SDendaccess(sds_id);
+    CHECK(status, FAIL, "test_rank0: SDendaccess");
+
+    /* Close the SD interface */
+    status = SDend(fid);
+    CHECK(status, FAIL, "test_rank0: SDend");
+
+    return num_errs;
+}
+
+#endif /* HDF */

Added: packages/libhdf4/branches/upstream/current/mfhdf/libsrc/tsd.c
===================================================================
--- packages/libhdf4/branches/upstream/current/mfhdf/libsrc/tsd.c	                        (rev 0)
+++ packages/libhdf4/branches/upstream/current/mfhdf/libsrc/tsd.c	2007-05-15 09:53:05 UTC (rev 831)
@@ -0,0 +1,82 @@
+/****************************************************************************
+ * NCSA HDF                                                                 *
+ * Software Development Group                                               *
+ * National Center for Supercomputing Applications                          *
+ * University of Illinois at Urbana-Champaign                               *
+ * 605 E. Springfield, Champaign IL 61820                                   *
+ *                                                                          *
+ * For conditions of distribution and use, see the accompanying             *
+ * hdf/COPYING file.                                                        *
+ *                                                                          *
+ ****************************************************************************/
+
+/****************************************************************************
+ * tsd.c - tests SDstart for file with no write permission
+****************************************************************************/
+
+#include "mfhdf.h"
+
+#ifdef HDF
+
+#include "hdftest.h"
+#include "hfile.h"
+
+#define FILE_NAME     "sdtest.hdf"	/* data file to test ID types */
+
+extern int
+test_sd()
+{
+    int32     fid;
+    intn      status;
+#ifdef WIN32
+    int mode;
+#else
+    mode_t mode;
+#endif
+
+    FILE *ff;
+    intn      num_errs = 0;         /* number of errors so far */
+
+    /* delete the file just to be sure */
+    unlink(FILE_NAME);
+
+    /* Create a file */
+    fid = SDstart(FILE_NAME, DFACC_CREATE);
+    CHECK(fid, FAIL, "SDstart");
+
+    /* Close the file */
+    status = SDend(fid);
+    CHECK(status, FAIL, "SDend");
+#ifdef WIN32
+    mode = _S_IREAD;
+#else
+    mode =  S_IRUSR;
+#endif
+
+    status = chmod(FILE_NAME, mode);
+    CHECK(status, FAIL, "chmod");
+
+    /* Create a protected file */
+    fid = SDstart(FILE_NAME, DFACC_CREATE);
+    VERIFY(fid, FAIL, "second SDstart");
+
+    ff = HI_OPEN(FILE_NAME, DFACC_READ);
+    CHECK(ff, NULL, "fopen");
+    
+    if (ff != NULL) {
+	    HI_CLOSE(ff);
+    }
+
+#ifdef WIN32
+    mode = _S_IWRITE;
+#else
+    mode =  S_IWUSR;
+#endif
+
+    status = chmod(FILE_NAME, mode);
+    CHECK(status, FAIL, "chmod");
+
+    /* Return the number of errors that's been kept track of so far */
+    return num_errs;
+}   /* test_SDAPI_ids */
+#endif /* HDF */

Added: packages/libhdf4/branches/upstream/current/mfhdf/libsrc/tszip.c
===================================================================
--- packages/libhdf4/branches/upstream/current/mfhdf/libsrc/tszip.c	                        (rev 0)
+++ packages/libhdf4/branches/upstream/current/mfhdf/libsrc/tszip.c	2007-05-15 09:53:05 UTC (rev 831)
@@ -0,0 +1,1326 @@
+/****************************************************************************
+ * NCSA HDF                                                                 *
+ * Software Development Group                                               *
+ * National Center for Supercomputing Applications                          *
+ * University of Illinois at Urbana-Champaign                               *
+ * 605 E. Springfield, Champaign IL 61820                                   *
+ *                                                                          *
+ * For conditions of distribution and use, see the accompanying             *
+ * hdf/COPYING file.                                                        *
+ *                                                                          *
+ ****************************************************************************/
+
+#include "mfhdf.h"
+#include "hdftest.h"
+#ifdef H4_HAVE_LIBSZ
+#include "szlib.h"
+#endif
+
+#define FILE_NAME8	"SDS_8_sziped.hdf"
+#define FILE_NAME16	"SDS_16_sziped.hdf"
+#define FILE_NAME32	"SDS_32_sziped.hdf"
+#define FILE_NAMEfl32	"SDS_fl32_sziped.hdf"
+#define FILE_NAMEfl64	"SDS_fl64_sziped.hdf"
+#define SDS_NAME	"SzipedData"
+
+#define RANK		2
+#define WIDTH		6
+#define LENGTH		9
+
+static intn 
+test_szip_SDS8bit()
+{
+#ifdef H4_HAVE_LIBSZ
+   /************************* Variable declaration **************************/
+
+   int32	sd_id, sds_id;
+   intn 	status;
+   int32	dim_sizes[2], array_rank, num_type, attributes;
+   char 	name[MAX_NC_NAME];
+   comp_info 	c_info;
+   int32        start[2], edges[2];
+   int8         fill_value = 0; /* Fill value */
+   int          i,j;
+   int    	num_errs = 0;   /* number of errors so far */
+   comp_coder_t comp_type;      /* to retrieve compression type into */
+   comp_info    cinfo;          /* compression information structure */
+   uint32       comp_config;
+   int8         out_data[LENGTH][WIDTH];
+   int8         in_data[LENGTH][WIDTH]={
+	   			 1,1,2,2,3,4,
+	   			 1,1,2,2,3,4,
+				 1,1,2,2,3,4,
+				 3,3,0,4,3,4,
+				 3,3,0,4,3,4,
+				 3,3,0,4,3,4,
+				 0,0,6,6,3,4,
+				 5,5,6,6,3,4,
+				 0,0,6,6,3,4};
+
+    /********************* End of variable declaration ***********************/
+
+    HCget_config_info(COMP_CODE_SZIP,&comp_config);
+    
+    /* Create the file and initialize SD interface */
+    sd_id = SDstart (FILE_NAME8, DFACC_CREATE);
+    CHECK(sd_id, FAIL, "SDstart");
+
+    /* Create the SDS */
+    dim_sizes[0] = LENGTH;
+    dim_sizes[1] = WIDTH;
+    sds_id = SDcreate (sd_id, SDS_NAME, DFNT_INT8, RANK, dim_sizes);
+    CHECK(sds_id, FAIL, "SDcreate:Failed to create a data set for szip compression testing");
+
+    /* Define the location, pattern, and size of the data set */
+    for (i = 0; i < RANK; i++) {
+	start[i] = 0;
+	edges[i] = dim_sizes[i];
+	}
+
+    /* Fill the SDS array with the fill value */
+    status = SDsetfillvalue (sds_id, (VOIDP)&fill_value);
+    CHECK(status, FAIL, "SDsetfillvalue");
+
+    /* Initialization for SZIP */
+    c_info.szip.pixels_per_block = 2;
+
+    c_info.szip.options_mask = SZ_EC_OPTION_MASK;
+    c_info.szip.options_mask |= SZ_RAW_OPTION_MASK;
+    c_info.szip.bits_per_pixel = 0;
+    c_info.szip.pixels = 0;
+    c_info.szip.pixels_per_scanline = 0;
+
+    /* Set the compression */
+    status = SDsetcompress (sds_id, COMP_CODE_SZIP, &c_info);
+    if ((comp_config & COMP_ENCODER_ENABLED) == COMP_ENCODER_ENABLED) {
+	/* should work */
+       CHECK(status, FAIL, "SDsetcompress");
+    } else {
+       /* skip rest of test?? */
+        status = SDendaccess (sds_id);
+        CHECK(status, FAIL, "SDendaccess");
+
+        status = SDend (sd_id);
+        CHECK(status, FAIL, "SDend");
+        printf("szip_SD8: SKIPPED\n");
+        return num_errs;
+    }
+
+    /* Write data to the SDS */
+    status = SDwritedata(sds_id, start, NULL, edges, (VOIDP)in_data);
+    CHECK(status, FAIL, "SDwritedata");
+
+    /* Terminate access to the data set */
+    status = SDendaccess (sds_id);
+    CHECK(status, FAIL, "SDendaccess");
+
+    /* Terminate access to the SD interface and close the file to 
+       flush the compressed info to the file */
+    status = SDend (sd_id);
+    CHECK(status, FAIL, "SDend");
+
+    /*
+    * Verify the compressed data
+    */
+
+    /* Reopen the file and select the first SDS */
+    sd_id = SDstart (FILE_NAME8, DFACC_READ);
+    CHECK(sd_id, FAIL, "SDstart");
+
+    sds_id = SDselect (sd_id, 0);
+    CHECK(sds_id, FAIL, "SDselect:Failed to select a data set for szip compression testing");
+
+    /* Retrieve information of the data set */
+    status = SDgetinfo(sds_id, name, &array_rank, dim_sizes, &num_type, &attributes);
+    CHECK(status, FAIL, "SDgetinfo");
+
+    /* Retrieve compression informayion about the dataset */
+    comp_type = COMP_CODE_INVALID;  /* reset variables before retrieving info */
+    HDmemset(&cinfo, 0, sizeof(cinfo)) ;
+
+    status = SDgetcompress(sds_id, &comp_type, &cinfo);
+    CHECK(status, FAIL, "SDgetcompress");
+    VERIFY(comp_type, COMP_CODE_SZIP, "SDgetcompress");
+
+    /* Wipe out the output buffer */
+    HDmemset(&out_data, 0, sizeof(out_data));
+
+    /* Read the data set */
+    start[0] = 0;
+    start[1] = 0;
+    edges[0] = LENGTH;
+    edges[1] = WIDTH;
+    status = SDreaddata (sds_id, start, NULL, edges, (VOIDP)out_data);
+    CHECK(status, FAIL, "SDreaddata");
+
+    /* Compare read data against input data */
+    for (j=0; j<LENGTH; j++) 
+    {
+        for (i=0; i<WIDTH; i++)
+	    if (out_data[j][i] != in_data[j][i])
+	    {
+		fprintf(stderr,"Bogus val in loc [%d][%d] in compressed dset, want %ld got %ld\n", j, i, (long)in_data[j][i], (long)out_data[j][i]);
+		num_errs++;
+	    }
+    }
+
+    /* Terminate access to the data set */
+    status = SDendaccess (sds_id);
+    CHECK(status, FAIL, "SDendaccess");
+
+    /* Terminate access to the SD interface and close the file */
+    status = SDend (sd_id);
+    CHECK(status, FAIL, "SDend");
+
+    /* Return the number of errors that's been kept track of so far */
+    return num_errs;
+#else
+    return 0;
+#endif
+} /* test_szip_SDS8bit */
+
+static intn 
+test_szip_SDS16bit()
+{
+#ifdef H4_HAVE_LIBSZ
+    /************************* Variable declaration **************************/
+
+    int32	sd_id, sds_id;
+    intn 	status;
+    int32	dim_sizes[2], array_rank, num_type, attributes;
+    char	name[MAX_NC_NAME];
+    comp_info	c_info;
+   uint32       comp_config;
+    int32       start[2], edges[2];
+    int16       fill_value = 0;   /* Fill value */
+    int         i,j;
+    int		num_errs = 0;    /* number of errors so far */
+    int16	out_data[LENGTH][WIDTH];
+    int16	in_data[LENGTH][WIDTH]={
+	   			 100,100,200,200,300,400,
+	   			 100,100,200,200,300,400,
+				 100,100,200,200,300,400,
+				 300,300,  0,400,300,400,
+				 300,300,  0,400,300,400,
+				 300,300,  0,400,300,400,
+				   0,  0,600,600,300,400,
+				 500,500,600,600,300,400,
+				   0,  0,600,600,300,400};
+
+    /********************* End of variable declaration ***********************/
+
+    HCget_config_info(COMP_CODE_SZIP,&comp_config);
+    /* Create the file and initialize SD interface */
+    sd_id = SDstart (FILE_NAME16, DFACC_CREATE);
+    CHECK(sd_id, FAIL, "SDstart");
+
+    /* Create the SDS */
+    dim_sizes[0] = LENGTH;
+    dim_sizes[1] = WIDTH;
+    sds_id = SDcreate (sd_id, SDS_NAME, DFNT_INT16, RANK, dim_sizes);
+    CHECK(sds_id, FAIL, "SDcreate:Failed to create a data set for szip compression testing");
+
+    /* Define the location, pattern, and size of the data set */
+    for (i = 0; i < RANK; i++) {
+	start[i] = 0;
+	edges[i] = dim_sizes[i];
+	}
+
+    /* Fill the SDS array with the fill value */
+    status = SDsetfillvalue (sds_id, (VOIDP)&fill_value);
+    CHECK(status, FAIL, "SDsetfillvalue");
+
+    /* Initialize for SZIP */
+    c_info.szip.pixels_per_block = 2;
+
+    c_info.szip.options_mask = SZ_EC_OPTION_MASK;
+    c_info.szip.options_mask |= SZ_RAW_OPTION_MASK;
+    c_info.szip.bits_per_pixel = 0;
+    c_info.szip.pixels = 0;
+    c_info.szip.pixels_per_scanline = 0;
+
+    /* Set the compression */
+    status = SDsetcompress (sds_id, COMP_CODE_SZIP, &c_info);
+    if ((comp_config & COMP_ENCODER_ENABLED) == COMP_ENCODER_ENABLED) {
+	/* should work */
+       CHECK(status, FAIL, "SDsetcompress");
+    } else {
+       /* skip rest of test?? */
+        status = SDendaccess (sds_id);
+        CHECK(status, FAIL, "SDendaccess");
+
+        status = SDend (sd_id);
+        CHECK(status, FAIL, "SDend");
+        printf("szip_SD16: SKIPPED\n");
+        return num_errs;
+    }
+
+    /* Write data to the SDS */
+    status = SDwritedata(sds_id, start, NULL, edges, (VOIDP)in_data);
+    CHECK(status, FAIL, "SDwritedata");
+
+    /* Terminate access to the data set */
+    status = SDendaccess (sds_id);
+    CHECK(status, FAIL, "SDendaccess");
+
+    /* Terminate access to the SD interface and close the file to 
+       flush the compressed info to the file */
+    status = SDend (sd_id);
+    CHECK(status, FAIL, "SDend");
+
+    /*
+    * Verify the compressed data
+    */
+
+    /* Reopen the file and select the first SDS */
+    sd_id = SDstart (FILE_NAME16, DFACC_READ);
+    CHECK(sd_id, FAIL, "SDstart");
+
+    sds_id = SDselect (sd_id, 0);
+    CHECK(sds_id, FAIL, "SDselect:Failed to select a data set for szip compression testing");
+
+    /* Retrieve information of the data set */
+    status = SDgetinfo(sds_id, name, &array_rank, dim_sizes, &num_type, &attributes);
+    CHECK(status, FAIL, "SDgetinfo");
+
+    /* Wipe out the output buffer */
+    HDmemset(&out_data, 0, sizeof(out_data));
+
+    /* Read the data set */
+    start[0] = 0;
+    start[1] = 0;
+    edges[0] = LENGTH;
+    edges[1] = WIDTH;
+    status = SDreaddata (sds_id, start, NULL, edges, (VOIDP)out_data);
+    CHECK(status, FAIL, "SDreaddata");
+
+    /* Compare read data against input data */
+    for (j=0; j<LENGTH; j++) 
+    {
+        for (i=0; i<WIDTH; i++)
+	    if (out_data[j][i] != in_data[j][i])
+	    {
+		fprintf(stderr,"Bogus val in loc [%d][%d] in compressed dset, want %ld got %ld\n", j, i, (long)in_data[j][i], (long)out_data[j][i]);
+		num_errs++;
+	    }
+    }
+
+    /* Terminate access to the data set */
+    status = SDendaccess (sds_id);
+    CHECK(status, FAIL, "SDendaccess");
+
+    /* Terminate access to the SD interface and close the file */
+    status = SDend (sd_id);
+    CHECK(status, FAIL, "SDend");
+
+    /* Return the number of errors that's been kept track of so far */
+    return num_errs;
+#else
+    return 0;
+#endif
+}  /* test_szip_SDS16bit */
+
+static intn 
+test_szip_SDS32bit()
+{
+#ifdef H4_HAVE_LIBSZ
+    /************************* Variable declaration **************************/
+
+    int32	sd_id, sds_id;
+    intn 	status;
+    int32	dim_sizes[2], array_rank, num_type, attributes;
+    char	name[MAX_NC_NAME];
+    comp_info	c_info;
+   uint32       comp_config;
+    int32       start[2], edges[2];
+    int32       fill_value = 0;   /* Fill value */
+    int         i,j;
+    int		num_errs = 0;    /* number of errors so far */
+    int32	out_data[LENGTH][WIDTH];
+    int32	in_data[LENGTH][WIDTH]={
+	   			 100,100,200,200,300,400,
+	   			 100,100,200,200,300,400,
+				 100,100,200,200,300,400,
+				 300,300,  0,400,300,400,
+				 300,300,  0,400,300,400,
+				 300,300,  0,400,300,400,
+				   0,  0,600,600,300,400,
+				 500,500,600,600,300,400,
+				   0,  0,600,600,300,400};
+
+    /********************* End of variable declaration ***********************/
+
+    HCget_config_info(COMP_CODE_SZIP,&comp_config);
+    /* Create the file and initialize SD interface */
+    sd_id = SDstart (FILE_NAME32, DFACC_CREATE);
+    CHECK(sd_id, FAIL, "SDstart");
+
+    /* Create the SDS */
+    dim_sizes[0] = LENGTH;
+    dim_sizes[1] = WIDTH;
+    sds_id = SDcreate (sd_id, SDS_NAME, DFNT_INT32, RANK, dim_sizes);
+    CHECK(sds_id, FAIL, "SDcreate:Failed to create a data set for szip compression testing");
+
+    /* Define the location, pattern, and size of the data set */
+    for (i = 0; i < RANK; i++) {
+	start[i] = 0;
+	edges[i] = dim_sizes[i];
+	}
+
+    /* Fill the SDS array with the fill value */
+    status = SDsetfillvalue (sds_id, (VOIDP)&fill_value);
+    CHECK(status, FAIL, "SDsetfillvalue");
+
+    /* Initialize for SZIP */
+    c_info.szip.pixels_per_block = 2;
+
+    c_info.szip.options_mask = SZ_EC_OPTION_MASK;
+    c_info.szip.options_mask |= SZ_RAW_OPTION_MASK;
+    c_info.szip.bits_per_pixel = 0;
+    c_info.szip.pixels = 0;
+    c_info.szip.pixels_per_scanline = 0;
+
+    /* Set the compression */
+    status = SDsetcompress (sds_id, COMP_CODE_SZIP, &c_info);
+    if ((comp_config & COMP_ENCODER_ENABLED) == COMP_ENCODER_ENABLED) {
+	/* should work */
+       CHECK(status, FAIL, "SDsetcompress");
+    } else {
+       /* skip rest of test?? */
+        status = SDendaccess (sds_id);
+        CHECK(status, FAIL, "SDendaccess");
+
+        status = SDend (sd_id);
+        CHECK(status, FAIL, "SDend");
+        printf("szip_SD32: SKIPPED\n");
+        return num_errs;
+    }
+
+    /* Write data to the SDS */
+    status = SDwritedata(sds_id, start, NULL, edges, (VOIDP)in_data);
+    CHECK(status, FAIL, "SDwritedata");
+
+    /* Terminate access to the data set */
+    status = SDendaccess (sds_id);
+    CHECK(status, FAIL, "SDendaccess");
+
+    /* Terminate access to the SD interface and close the file to 
+       flush the compressed info to the file */
+    status = SDend (sd_id);
+    CHECK(status, FAIL, "SDend");
+
+    /*
+    * Verify the compressed data
+    */
+
+    /* Reopen the file and select the first SDS */
+    sd_id = SDstart (FILE_NAME32, DFACC_READ);
+    CHECK(sd_id, FAIL, "SDstart");
+
+    sds_id = SDselect (sd_id, 0);
+    CHECK(sds_id, FAIL, "SDselect:Failed to select a data set for szip compression testing");
+
+    /* Retrieve information of the data set */
+    status = SDgetinfo(sds_id, name, &array_rank, dim_sizes, &num_type, &attributes);
+    CHECK(status, FAIL, "SDgetinfo");
+
+    /* Wipe out the output buffer */
+    HDmemset(&out_data, 0, sizeof(out_data));
+
+    /* Read the data set */
+    start[0] = 0;
+    start[1] = 0;
+    edges[0] = LENGTH;
+    edges[1] = WIDTH;
+    status = SDreaddata (sds_id, start, NULL, edges, (VOIDP)out_data);
+    CHECK(status, FAIL, "SDreaddata");
+
+    /* Compare read data against input data */
+    for (j=0; j<LENGTH; j++) 
+    {
+        for (i=0; i<WIDTH; i++)
+	    if (out_data[j][i] != in_data[j][i])
+	    {
+		fprintf(stderr,"Bogus val in loc [%d][%d] in compressed dset, want %ld got %ld\n", j, i, (long)in_data[j][i], (long)out_data[j][i]);
+		num_errs++;
+	    }
+    }
+
+    /* Terminate access to the data set */
+    status = SDendaccess (sds_id);
+    CHECK(status, FAIL, "SDendaccess");
+
+    /* Terminate access to the SD interface and close the file */
+    status = SDend (sd_id);
+    CHECK(status, FAIL, "SDend");
+
+    /* Return the number of errors that's been kept track of so far */
+    return num_errs;
+#else
+    return 0;
+#endif
+}  /* test_szip_SDS32bit */
+
+static intn 
+test_szip_SDSfl32bit()
+{
+#ifdef H4_HAVE_LIBSZ
+    /************************* Variable declaration **************************/
+
+    int32	sd_id, sds_id;
+    intn 	status;
+    int32	dim_sizes[2], array_rank, num_type, attributes;
+    char	name[MAX_NC_NAME];
+    comp_info	c_info;
+/*
+    int32	pixels_per_scanline;
+*/
+    int32       start[2], edges[2];
+    float32     fill_value = 0;   /* Fill value */
+    int         i,j;
+    int		num_errs = 0;    /* number of errors so far */
+    float32	out_data[LENGTH][WIDTH];
+    float32	in_data[LENGTH][WIDTH]={
+	   			 100.0,100.0,200.0,200.0,300.0,400.0,
+	   			 100.0,100.0,200.0,200.0,300.0,400.0,
+				 100.0,100.0,200.0,200.0,300.0,400.0,
+				 300.0,300.0,  0.0,400.0,300.0,400.0,
+				 300.0,300.0,  0.0,400.0,300.0,400.0,
+				 300.0,300.0,  0.0,400.0,300.0,400.0,
+				   0.0,  0.0,600.0,600.0,300.0,400.0,
+				 500.0,500.0,600.0,600.0,300.0,400.0,
+				   0.0,  0.0,600.0,600.0,300.0,400.0};
+
+    /********************* End of variable declaration ***********************/
+
+    /* Create the file and initialize SD interface */
+    sd_id = SDstart (FILE_NAMEfl32, DFACC_CREATE);
+    CHECK(sd_id, FAIL, "SDstart");
+
+    /* Create the SDS */
+    dim_sizes[0] = LENGTH;
+    dim_sizes[1] = WIDTH;
+    sds_id = SDcreate (sd_id, SDS_NAME, DFNT_FLOAT32, RANK, dim_sizes);
+    CHECK(sds_id, FAIL, "SDcreate:Failed to create a data set for szip compression testing");
+
+    /* Define the location, pattern, and size of the data set */
+    for (i = 0; i < RANK; i++) {
+	start[i] = 0;
+	edges[i] = dim_sizes[i];
+	}
+
+    /* Fill the SDS array with the fill value */
+    status = SDsetfillvalue (sds_id, (VOIDP)&fill_value);
+    CHECK(status, FAIL, "SDsetfillvalue");
+
+    /* Initialize for SZIP */
+    c_info.szip.pixels_per_block = 2;
+
+    c_info.szip.options_mask = SZ_EC_OPTION_MASK;
+    c_info.szip.options_mask |= SZ_RAW_OPTION_MASK;
+    c_info.szip.bits_per_pixel = 0;
+    c_info.szip.pixels = 0;
+    c_info.szip.pixels_per_scanline = 0;
+
+    /* Set the compression */
+    status = SDsetcompress (sds_id, COMP_CODE_SZIP, &c_info);
+    if (SZ_encoder_enabled()) {
+	/* should pass */
+        CHECK(status, FAIL, "SDsetcompress");
+    } else {
+        return num_errs;
+    }
+
+    /* Write data to the SDS */
+    status = SDwritedata(sds_id, start, NULL, edges, (VOIDP)in_data);
+    CHECK(status, FAIL, "SDwritedata");
+
+    /* Terminate access to the data set */
+    status = SDendaccess (sds_id);
+    CHECK(status, FAIL, "SDendaccess");
+
+    /* Terminate access to the SD interface and close the file to 
+       flush the compressed info to the file */
+    status = SDend (sd_id);
+    CHECK(status, FAIL, "SDend");
+
+    /*
+    * Verify the compressed data
+    */
+
+    /* Reopen the file and select the first SDS */
+    sd_id = SDstart (FILE_NAMEfl32, DFACC_READ);
+    CHECK(sd_id, FAIL, "SDstart");
+
+    sds_id = SDselect (sd_id, 0);
+    CHECK(sds_id, FAIL, "SDselect:Failed to select a data set for szip compression testing");
+
+    /* Retrieve information of the data set */
+    status = SDgetinfo(sds_id, name, &array_rank, dim_sizes, &num_type, &attributes);
+    CHECK(status, FAIL, "SDgetinfo");
+
+    /* Wipe out the output buffer */
+    HDmemset(&out_data, 0, sizeof(out_data));
+
+    /* Read the data set */
+    start[0] = 0;
+    start[1] = 0;
+    edges[0] = LENGTH;
+    edges[1] = WIDTH;
+    status = SDreaddata (sds_id, start, NULL, edges, (VOIDP)out_data);
+    CHECK(status, FAIL, "SDreaddata");
+
+    /* Compare read data against input data */
+    for (j=0; j<LENGTH; j++) 
+    {
+        for (i=0; i<WIDTH; i++)
+	    if (out_data[j][i] != in_data[j][i])
+	    {
+		fprintf(stderr,"Bogus val in loc [%d][%d] in compressed dset, want %ld got %ld\n", j, i, (long)in_data[j][i], (long)out_data[j][i]);
+		num_errs++;
+	    }
+    }
+
+    /* Terminate access to the data set */
+    status = SDendaccess (sds_id);
+    CHECK(status, FAIL, "SDendaccess");
+
+    /* Terminate access to the SD interface and close the file */
+    status = SDend (sd_id);
+    CHECK(status, FAIL, "SDend");
+
+    /* Return the number of errors that's been kept track of so far */
+    return num_errs;
+#else
+    return 0;
+#endif
+}  /* test_szip_SDSfl32bit */
+
+static intn 
+test_szip_SDSfl64bit()
+{
+#ifdef H4_HAVE_LIBSZ
+    /************************* Variable declaration **************************/
+
+    int32	sd_id, sds_id;
+    intn 	status;
+    int32	dim_sizes[2], array_rank, num_type, attributes;
+    char	name[MAX_NC_NAME];
+    comp_info	c_info;
+   uint32       comp_config;
+    int32       start[2], edges[2];
+    float64     fill_value = 0;   /* Fill value */
+    int         i,j;
+    int		num_errs = 0;    /* number of errors so far */
+    float64	out_data[LENGTH][WIDTH];
+    float64	in_data[LENGTH][WIDTH]={
+	   			 100.0,100.0,200.0,200.0,300.0,400.0,
+	   			 100.0,100.0,200.0,200.0,300.0,400.0,
+				 100.0,100.0,200.0,200.0,300.0,400.0,
+				 300.0,300.0,  0.0,400.0,300.0,400.0,
+				 300.0,300.0,  0.0,400.0,300.0,400.0,
+				 300.0,300.0,  0.0,400.0,300.0,400.0,
+				   0.0,  0.0,600.0,600.0,300.0,400.0,
+				 500.0,500.0,600.0,600.0,300.0,400.0,
+				   0.0,  0.0,600.0,600.0,300.0,400.0};
+
+    /********************* End of variable declaration ***********************/
+
+    HCget_config_info(COMP_CODE_SZIP,&comp_config);
+    /* Create the file and initialize SD interface */
+    sd_id = SDstart (FILE_NAMEfl64, DFACC_CREATE);
+    CHECK(sd_id, FAIL, "SDstart");
+
+    /* Create the SDS */
+    dim_sizes[0] = LENGTH;
+    dim_sizes[1] = WIDTH;
+    sds_id = SDcreate (sd_id, SDS_NAME, DFNT_FLOAT64, RANK, dim_sizes);
+    CHECK(sds_id, FAIL, "SDcreate:Failed to create a data set for szip compression testing");
+
+    /* Define the location, pattern, and size of the data set */
+    for (i = 0; i < RANK; i++) {
+	start[i] = 0;
+	edges[i] = dim_sizes[i];
+	}
+
+    /* Fill the SDS array with the fill value */
+    status = SDsetfillvalue (sds_id, (VOIDP)&fill_value);
+    CHECK(status, FAIL, "SDsetfillvalue");
+
+    /* Initialization for SZIP */
+    c_info.szip.pixels_per_block = 2;
+
+    c_info.szip.options_mask = SZ_EC_OPTION_MASK;
+    c_info.szip.options_mask |= SZ_RAW_OPTION_MASK;
+    c_info.szip.bits_per_pixel = 0;
+    c_info.szip.pixels = 0;
+    c_info.szip.pixels_per_scanline = 0;
+
+    /* Set the compression */
+    status = SDsetcompress (sds_id, COMP_CODE_SZIP, &c_info);
+    if ((comp_config & COMP_ENCODER_ENABLED) == COMP_ENCODER_ENABLED) {
+	/* should work */
+       CHECK(status, FAIL, "SDsetcompress");
+    } else {
+       /* skip rest of test?? */
+        status = SDendaccess (sds_id);
+        CHECK(status, FAIL, "SDendaccess");
+
+        status = SDend (sd_id);
+        CHECK(status, FAIL, "SDend");
+        printf("szip_SD64: SKIPPED\n");
+        return num_errs;
+    }
+
+    /* Write data to the SDS */
+    status = SDwritedata(sds_id, start, NULL, edges, (VOIDP)in_data);
+    CHECK(status, FAIL, "SDwritedata");
+
+    /* Terminate access to the data set */
+    status = SDendaccess (sds_id);
+    CHECK(status, FAIL, "SDendaccess");
+
+    /* Terminate access to the SD interface and close the file to 
+       flush the compressed info to the file */
+    status = SDend (sd_id);
+    CHECK(status, FAIL, "SDend");
+
+    /*
+     * Verify the compressed data
+     */
+
+    /* Reopen the file and select the first SDS */
+    sd_id = SDstart (FILE_NAMEfl64, DFACC_READ);
+    CHECK(sd_id, FAIL, "SDstart");
+
+    sds_id = SDselect (sd_id, 0);
+    CHECK(sds_id, FAIL, "SDselect:Failed to select a data set for szip compression testing");
+
+    /* Retrieve information of the data set */
+    status = SDgetinfo(sds_id, name, &array_rank, dim_sizes, &num_type, &attributes);
+    CHECK(status, FAIL, "SDgetinfo");
+
+    /* Wipe out the output buffer */
+    HDmemset(&out_data, 0, sizeof(out_data));
+
+    /* Read the data set */
+    start[0] = 0;
+    start[1] = 0;
+    edges[0] = LENGTH;
+    edges[1] = WIDTH;
+    status = SDreaddata (sds_id, start, NULL, edges, (VOIDP)out_data);
+    CHECK(status, FAIL, "SDreaddata");
+
+    /* Compare read data against input data */
+    for (j=0; j<LENGTH; j++) 
+    {
+        for (i=0; i<WIDTH; i++)
+	    if (out_data[j][i] != in_data[j][i])
+	    {
+		fprintf(stderr,"Bogus val in loc [%d][%d] in compressed dset, want %ld got %ld\n", j, i, (long)in_data[j][i], (long)out_data[j][i]);
+		num_errs++;
+	    }
+    }
+
+    /* Terminate access to the data set */
+    status = SDendaccess (sds_id);
+    CHECK(status, FAIL, "SDendaccess");
+
+    /* Terminate access to the SD interface and close the file */
+    status = SDend (sd_id);
+    CHECK(status, FAIL, "SDend");
+
+    /* Return the number of errors that's been kept track of so far */
+    return num_errs;
+#else
+    return 0;
+#endif
+}  /* test_szip_SDSfl64bit */
+
+
+#define FILE_NAME	"SDSchunkedsziped.hdf"
+#define SDS_NAME_CH	"ChunkedData"
+#define RANK_CH         2	/* rank of the chunked data set */
+#define WIDTH_CH 	4	/* width of the chunked data set */
+#define LENGTH_CH	9	/* length of the chunked data set */
+#define CWIDTH		2	/* width of the chunk */
+#define CLENGTH		3	/* length of the chunk */
+
+static intn 
+test_szip_chunk()
+{
+#ifdef H4_HAVE_LIBSZ
+   /************************* Variable declaration **************************/
+
+   int32         sd_id, sds_id, sds_index;
+   intn          status;
+   int32         flag, maxcache, new_maxcache;
+   int32         dim_sizes[2], origin[2];
+   HDF_CHUNK_DEF c_def; /* Chunking definitions */ 
+   uint32       comp_config;
+   int32         comp_flag;
+   int16         all_data[LENGTH_CH][WIDTH_CH];
+   int32         start[2], edges[2];
+   int16         chunk_out[CLENGTH][CWIDTH];
+   int16         row[CWIDTH] = { 5, 5 };
+   int16         column[CLENGTH] = { 4, 4, 4 };
+   int16         fill_value = 0;   /* Fill value */
+   comp_coder_t  comp_type;        /* to retrieve compression type into */
+   comp_info     cinfo;            /* compression information structure */
+   int    	 num_errs = 0;     /* number of errors so far */
+   int           i,j;
+   /*
+   * Define all chunks.  Note that chunks 4 & 5 are not used to write,
+   * only to verify the read data.  The 'row' and 'column' are used
+   * to write in the place of these chunks.
+   */
+          int16 chunk1[CLENGTH][CWIDTH] = { 1, 1,
+                                            1, 1,
+                                            1, 1 }; 
+
+          int16 chunk2[CLENGTH][CWIDTH] = { 2, 2,
+                                            2, 2,
+                                            2, 2 }; 
+
+          int16 chunk3[CLENGTH][CWIDTH] = { 3, 3,
+                                            3, 3,
+                                            3, 3 }; 
+
+          int16 chunk4[CLENGTH][CWIDTH] = { 0, 4,
+                                            0, 4,
+                                            0, 4 }; 
+
+          int16 chunk5[CLENGTH][CWIDTH] = { 0, 0,
+                                            5, 5,
+                                            0, 0 }; 
+
+          int16 chunk6[CLENGTH][CWIDTH] = { 6, 6,
+                                            6, 6,
+                                            6, 6 };
+
+    /* Initialize chunk lengths. */
+    c_def.comp.chunk_lengths[0] = CLENGTH;
+    c_def.comp.chunk_lengths[1] = CWIDTH;
+
+    HCget_config_info(COMP_CODE_SZIP,&comp_config);
+    /* Create the file and initialize SD interface. */
+    sd_id = SDstart (FILE_NAME, DFACC_CREATE);
+    CHECK(sd_id, FAIL, "SDstart");
+
+    /* Create LENGTH_CHxWIDTH_CH SDS. */
+    dim_sizes[0] = LENGTH_CH;
+    dim_sizes[1] = WIDTH_CH;
+    sds_id = SDcreate (sd_id, SDS_NAME_CH,DFNT_INT16, RANK_CH, dim_sizes);
+    CHECK(sds_id, FAIL, "SDcreate:Failed to create a data set for chunking/szip compression testing");
+
+    /* Fill the SDS array with the fill value. */
+    status = SDsetfillvalue (sds_id, (VOIDP)&fill_value);
+    CHECK(status, FAIL, "SDsetfillvalue");
+
+    /* Set parameters for Chunking/SZIP */
+    c_def.comp.comp_type = COMP_CODE_SZIP;
+    c_def.comp.cinfo.szip.pixels_per_block = 2;
+
+    c_def.comp.cinfo.szip.options_mask = SZ_EC_OPTION_MASK;
+    c_def.comp.cinfo.szip.options_mask |= SZ_MSB_OPTION_MASK;
+    c_def.comp.cinfo.szip.bits_per_pixel = 0;
+    c_def.comp.cinfo.szip.pixels = 0;
+    c_def.comp.cinfo.szip.pixels_per_scanline = 0;
+    comp_flag = HDF_CHUNK | HDF_COMP;
+    status = SDsetchunk (sds_id, c_def, comp_flag);
+    if ((comp_config & COMP_ENCODER_ENABLED) == COMP_ENCODER_ENABLED) {
+	/* should work */
+       CHECK(status, FAIL, "SDsetchunk");
+    } else {
+       /* skip rest of test?? */
+        status = SDendaccess (sds_id);
+        CHECK(status, FAIL, "SDendaccess");
+
+        status = SDend (sd_id);
+        CHECK(status, FAIL, "SDend");
+        printf("szip chunk: SKIPPED\n");
+        return num_errs;
+    }
+
+    /* Set chunk cache to hold maximum of 3 chunks. */
+    maxcache = 3;
+    flag = 0;
+    new_maxcache = SDsetchunkcache (sds_id, maxcache, flag);
+    CHECK(new_maxcache, FAIL, "SDsetchunkcache");
+
+    /* 
+     * Write chunks using SDwritechunk function.  Chunks can be written 
+     * in any order. 
+     */
+
+    /* Write the chunk with the coordinates (0,0). */
+    origin[0] = 0;
+    origin[1] = 0;
+    status = SDwritechunk (sds_id, origin, (VOIDP) chunk1);
+    CHECK(status, FAIL, "SDwritechunk");
+
+    /* Write the chunk with the coordinates (1,0). */
+    origin[0] = 1;
+    origin[1] = 0;
+    status = SDwritechunk (sds_id, origin, (VOIDP) chunk3);
+    CHECK(status, FAIL, "SDwritechunk");
+
+    /* Write the chunk with the coordinates (0,1). */
+    origin[0] = 0;
+    origin[1] = 1;
+    status = SDwritechunk (sds_id, origin, (VOIDP) chunk2);
+    CHECK(status, FAIL, "SDwritechunk");
+
+    /* Write chunk with the coordinates (1,2) using SDwritedata function. */
+    start[0] = 6;
+    start[1] = 2;
+    edges[0] = 3;
+    edges[1] = 2;
+    status = SDwritedata (sds_id, start, NULL, edges, (VOIDP) chunk6); 
+    CHECK(status, FAIL, "SDwritedata");
+
+    /* Fill second column in the chunk with the coordinates (1,1) using 
+     * SDwritedata function. */
+    start[0] = 3;
+    start[1] = 3;
+    edges[0] = 3;
+    edges[1] = 1;
+    status = SDwritedata (sds_id, start, NULL, edges, (VOIDP) column); 
+    CHECK(status, FAIL, "SDwritedata");
+
+    /* Fill second row in the chunk with the coordinates (0,2) using 
+     * SDwritedata function. */
+    start[0] = 7;
+    start[1] = 0;
+    edges[0] = 1;
+    edges[1] = 2;
+    status = SDwritedata (sds_id, start, NULL, edges, (VOIDP) row); 
+    CHECK(status, FAIL, "SDwritedata");
+           
+    /* Terminate access to the data set. */
+    status = SDendaccess (sds_id);
+    CHECK(status, FAIL, "SDendaccess");
+
+    /* Terminate access to the SD interface and close the file. */
+    status = SDend (sd_id);
+    CHECK(status, FAIL, "SDend");
+
+    /*
+     * Verify the compressed data
+     */
+
+    /* Reopen the file and access the first data set. */
+    sd_id = SDstart (FILE_NAME, DFACC_READ);
+    sds_index = 0;
+    sds_id = SDselect (sd_id, sds_index);
+    CHECK(sds_id, FAIL, "SDselect:Failed to select a data set for chunking/szip compression testing");
+
+    /* Retrieve compression information about the dataset */
+    comp_type = COMP_CODE_INVALID;  /* reset variables before retrieving info */
+    HDmemset(&cinfo, 0, sizeof(cinfo)) ;
+
+    status = SDgetcompress(sds_id, &comp_type, &cinfo);
+    CHECK(status, FAIL, "SDgetcompress");
+    VERIFY(comp_type, COMP_CODE_SZIP, "SDgetcompress");
+
+    /* Read the entire data set using SDreaddata function. */
+    start[0] = 0;
+    start[1] = 0;
+    edges[0] = LENGTH_CH;
+    edges[1] = WIDTH_CH;
+    status = SDreaddata (sds_id, start, NULL, edges, (VOIDP)all_data);
+    CHECK(status, FAIL, "SDreaddata");
+
+    /* 
+    * This is how the entire array should look like:
+    *
+    *          1 1 2 2
+    *          1 1 2 2
+    *          1 1 2 2
+    *          3 3 0 4
+    *          3 3 0 4
+    *          3 3 0 4
+    *          0 0 6 6
+    *          5 5 6 6
+    *          0 0 6 6
+    */
+
+    /* Read chunk #4 with the coordinates (1,1) and verify it. */
+    origin[0] = 1;
+    origin[1] = 1;    	
+    status = SDreadchunk (sds_id, origin, chunk_out);
+    CHECK(status, FAIL, "SDreadchunk");
+
+    for (j=0; j<CLENGTH; j++) 
+    {
+	for (i=0; i<CWIDTH; i++) 
+	{
+	    if (chunk_out[j][i] != chunk4[j][i])
+	    {
+		fprintf(stderr,"Bogus val in loc [%d][%d] in chunk #4, want %ld got %ld\n", j, i, chunk4[j][i], chunk_out[j][i]);
+		num_errs++;
+	    }
+	}
+    }
+
+    /* 
+    * Read chunk #5 with the coordinates (2,0) and verify it.
+    */
+    origin[0] = 2;
+    origin[1] = 0;    	
+    status = SDreadchunk (sds_id, origin, chunk_out);
+    CHECK(status, FAIL, "SDreadchunk");
+
+    for (j=0; j<CLENGTH; j++) 
+    {
+	for (i=0; i<CWIDTH; i++) 
+	    if (chunk_out[j][i] != chunk5[j][i])
+	    {
+		fprintf(stderr,"Bogus val in loc [%d][%d] in chunk #5, want %ld got %ld\n", j, i, chunk5[j][i], chunk_out[j][i]);
+		num_errs++;
+	    }
+    }
+
+    /* Terminate access to the data set. */
+    status = SDendaccess (sds_id);
+    CHECK(status, FAIL, "SDendaccess");
+
+    /* Terminate access to the SD interface and close the file. */
+    status = SDend (sd_id);
+    CHECK(status, FAIL, "SDend");
+
+    /* Return the number of errors that's been kept track of so far */
+    return num_errs;
+
+#else
+    return 0;
+#endif
+}   /* test_szip_chunk */ 
+
+
+#define FILE_NAME_3D	"SDSchunkedsziped3d.hdf"
+#define RANK_CH3         3	/* rank of the chunked data set */
+#define WIDTH_CH 	4	/* width of the chunked data set */
+#define LENGTH_CH	9	/* length of the chunked data set */
+#define Z_CH	11	/* length of the chunked data set */
+#define X_CWIDTH		2	/* width of the chunk */
+#define X_CLENGTH		9	/* length of the chunk */
+#define CZ		2	/* length of the chunk */
+
+   int16         all_data[LENGTH_CH][WIDTH_CH][Z_CH];
+   int16         out_data[LENGTH_CH][WIDTH_CH][Z_CH];
+static intn 
+test_szip_chunk_3d()
+{
+#ifdef H4_HAVE_LIBSZ
+   /************************* Variable declaration **************************/
+
+   int32         sd_id, sds_id, sds_index;
+   intn          status;
+   int32         dim_sizes[3];
+   HDF_CHUNK_DEF c_def; /* Chunking definitions */ 
+   uint32       comp_config;
+   int32         comp_flag;
+   int32         start[3], edges[3];
+   int16         fill_value = 0;   /* Fill value */
+   comp_coder_t  comp_type;        /* to retrieve compression type into */
+   comp_info     cinfo;            /* compression information structure */
+   int    	 num_errs = 0;     /* number of errors so far */
+   int           i,j,k;
+for (i = 0; i < LENGTH_CH; i++) {
+for (j = 0; j < WIDTH_CH; j++) {
+for (k = 0; k < Z_CH; k++) {
+   out_data[i][j][k] = i*100+j*10+k;
+}}}
+
+    /* Initialize chunk lengths. */
+    c_def.comp.chunk_lengths[0] = X_CLENGTH;
+    c_def.comp.chunk_lengths[1] = X_CWIDTH;
+    c_def.comp.chunk_lengths[2] = CZ;
+
+    HCget_config_info(COMP_CODE_SZIP,&comp_config);
+    /* Create the file and initialize SD interface. */
+    sd_id = SDstart (FILE_NAME_3D, DFACC_CREATE);
+    CHECK(sd_id, FAIL, "SDstart");
+
+    /* Create LENGTH_CHxWIDTH_CH SDS. */
+    dim_sizes[0] = LENGTH_CH;
+    dim_sizes[1] = WIDTH_CH;
+    dim_sizes[2] = Z_CH;
+    sds_id = SDcreate (sd_id, SDS_NAME_CH,DFNT_INT16, RANK_CH3, dim_sizes);
+    CHECK(sds_id, FAIL, "SDcreate:Failed to create a data set for chunking/szip compression testing");
+
+    /* Fill the SDS array with the fill value. */
+    status = SDsetfillvalue (sds_id, (VOIDP)&fill_value);
+    CHECK(status, FAIL, "SDsetfillvalue");
+
+    /* Set parameters for Chunking/SZIP */
+    c_def.comp.comp_type = COMP_CODE_SZIP;
+    c_def.comp.cinfo.szip.pixels_per_block = 2;
+
+    c_def.comp.cinfo.szip.options_mask = SZ_EC_OPTION_MASK;
+    c_def.comp.cinfo.szip.options_mask |= SZ_MSB_OPTION_MASK;
+    c_def.comp.cinfo.szip.bits_per_pixel = 0;
+    c_def.comp.cinfo.szip.pixels = 0;
+    c_def.comp.cinfo.szip.pixels_per_scanline = 0;
+    comp_flag = HDF_CHUNK | HDF_COMP;
+    status = SDsetchunk (sds_id, c_def, comp_flag);
+    if ((comp_config & COMP_ENCODER_ENABLED) == COMP_ENCODER_ENABLED) {
+	/* should work */
+       CHECK(status, FAIL, "SDsetchunk");
+    } else {
+       /* skip rest of test?? */
+        status = SDendaccess (sds_id);
+        CHECK(status, FAIL, "SDendaccess");
+
+        status = SDend (sd_id);
+        CHECK(status, FAIL, "SDend");
+        printf("szip chunk 3d: SKIPPED\n");
+        return num_errs;
+    }
+
+
+    start[0] = 0;
+    start[1] = 0;
+    start[2] = 0;
+    edges[0] = LENGTH_CH;
+    edges[1] = WIDTH_CH;
+    edges[2] = Z_CH;
+    status = SDwritedata (sds_id, start, NULL, edges, (VOIDP) out_data); 
+    CHECK(status, FAIL, "SDwritedata");
+
+    /* Terminate access to the data set. */
+    status = SDendaccess (sds_id);
+    CHECK(status, FAIL, "SDendaccess");
+
+    /* Terminate access to the SD interface and close the file. */
+    status = SDend (sd_id);
+    CHECK(status, FAIL, "SDend");
+
+    /*
+     * Verify the compressed data
+     */
+
+    /* Reopen the file and access the first data set. */
+    sd_id = SDstart (FILE_NAME_3D, DFACC_READ);
+    sds_index = 0;
+    sds_id = SDselect (sd_id, sds_index);
+    CHECK(sds_id, FAIL, "SDselect:Failed to select a data set for chunking/szip compression testing");
+
+    /* Retrieve compression information about the dataset */
+    comp_type = COMP_CODE_INVALID;  /* reset variables before retrieving info */
+    HDmemset(&cinfo, 0, sizeof(cinfo)) ;
+
+    status = SDgetcompress(sds_id, &comp_type, &cinfo);
+    CHECK(status, FAIL, "SDgetcompress");
+    VERIFY(comp_type, COMP_CODE_SZIP, "SDgetcompress");
+
+    start[0] = 0;
+    start[1] = 0;
+    start[2] = 0;
+    edges[0] = LENGTH_CH;
+    edges[1] = WIDTH_CH;
+    edges[2] = Z_CH;
+    status = SDreaddata (sds_id, start, NULL, edges, (VOIDP)all_data);
+    CHECK(status, FAIL, "SDreaddata");
+
+for (i = 0; i < LENGTH_CH; i++) {
+for (j = 0; j < WIDTH_CH; j++) {
+for (k = 0; k < Z_CH; k++) {
+	    if (out_data[i][j][k] != all_data[i][j][k])
+	    {
+		fprintf(stderr,"Bogus val in loc [%d][%d][%d] want %ld got %ld\n", i, j,k, out_data[i][j][k], all_data[i][j][k]);
+		num_errs++;
+	    }
+    }
+    }
+    }
+
+    /* Terminate access to the data set. */
+    status = SDendaccess (sds_id);
+    CHECK(status, FAIL, "SDendaccess");
+
+    /* Terminate access to the SD interface and close the file. */
+    status = SDend (sd_id);
+    CHECK(status, FAIL, "SDend");
+
+    /* Return the number of errors that's been kept track of so far */
+    return num_errs;
+
+#else
+    return 0;
+#endif
+}   /* test_szip_chunk_3D */ 
+
+/* 
+ * At this time, the use of SZIP compression with unlimited dimension SDSs
+ * is unavailable.  This test program is to verify that the feature is 
+ * correctly disabled.
+ */
+#define FILE_NAME_UNLIM	"SDSunlimitedsziped.hdf"
+#define SDS_NAME_UNLIM	"UnlimitedData"
+static intn 
+test_szip_unlimited()
+{
+#ifdef H4_HAVE_LIBSZ
+    /************************* Variable declaration **************************/
+
+    int32	sd_id, sds_id;
+    intn 	status;
+    int32	dim_sizes[2], array_rank, num_type, attributes;
+    char	name[MAX_NC_NAME];
+    comp_info	c_info;
+   uint32       comp_config;
+    int32       start[2], edges[2];
+    int32       fill_value = 0;   /* Fill value */
+    int         i,j;
+    int		num_errs = 0;    /* number of errors so far */
+    int32	out_data[LENGTH][WIDTH];
+    int32	in_data[LENGTH][WIDTH]={
+	   			 100,100,200,200,300,400,
+	   			 100,100,200,200,300,400,
+				 100,100,200,200,300,400,
+				 300,300,  0,400,300,400,
+				 300,300,  0,400,300,400,
+				 300,300,  0,400,300,400,
+				   0,  0,600,600,300,400,
+				 500,500,600,600,300,400,
+				   0,  0,600,600,300,400};
+
+    /********************* End of variable declaration ***********************/
+
+    HCget_config_info(COMP_CODE_SZIP,&comp_config);
+
+    /* Create the file and initialize SD interface */
+    sd_id = SDstart (FILE_NAME_UNLIM, DFACC_CREATE);
+    CHECK(sd_id, FAIL, "SDstart");
+
+    /* Create the SDS */
+    dim_sizes[0] = SD_UNLIMITED;
+    dim_sizes[1] = WIDTH;
+    sds_id = SDcreate (sd_id, SDS_NAME, DFNT_INT32, RANK, dim_sizes);
+    CHECK(sds_id, FAIL, "SDcreate:Failed to create a data set for szip compression testing");
+
+    /* Define the location, pattern, and size of the data set */
+    for (i = 0; i < RANK; i++) {
+	start[i] = 0;
+	}
+    edges[0] = LENGTH;
+    edges[1] = WIDTH;
+
+    /* Fill the SDS array with the fill value */
+    status = SDsetfillvalue (sds_id, (VOIDP)&fill_value);
+    CHECK(status, FAIL, "SDsetfillvalue");
+
+    /* Initialize for SZIP */
+    c_info.szip.pixels_per_block = 2;
+
+    c_info.szip.options_mask = SZ_EC_OPTION_MASK;
+    c_info.szip.options_mask |= SZ_RAW_OPTION_MASK;
+    c_info.szip.bits_per_pixel = 0;
+    c_info.szip.pixels = 0;
+    c_info.szip.pixels_per_scanline = 0;
+
+    /* Attempting to set SZIP compression will fail because SZIP is 
+     * not available with unlimited dimension yet */
+    status = SDsetcompress (sds_id, COMP_CODE_SZIP, &c_info);
+    if ((comp_config & COMP_ENCODER_ENABLED) == COMP_ENCODER_ENABLED) {
+	/* should work */
+       VERIFY(status, FAIL, "SDsetcompress");
+    } else {
+       /* skip rest of test?? */
+        status = SDendaccess (sds_id);
+        CHECK(status, FAIL, "SDendaccess");
+
+        status = SDend (sd_id);
+        CHECK(status, FAIL, "SDend");
+        printf("szip_SD unlimited: SKIPPED\n");
+        return num_errs;
+    }
+
+    /* Write data to the SDS; data will be uncompressed */
+    status = SDwritedata(sds_id, start, NULL, edges, (VOIDP)in_data);
+    CHECK(status, FAIL, "SDwritedata");
+
+    /* Terminate access to the data set */
+    status = SDendaccess (sds_id);
+    CHECK(status, FAIL, "SDendaccess");
+
+    /* Terminate access to the SD interface and close the file to 
+       flush the compressed info to the file */
+    status = SDend (sd_id);
+    CHECK(status, FAIL, "SDend");
+
+    /*
+    * Verify the written data
+    */
+
+    /* Reopen the file and select the first SDS */
+    sd_id = SDstart (FILE_NAME_UNLIM, DFACC_READ);
+    CHECK(sd_id, FAIL, "SDstart");
+
+    sds_id = SDselect (sd_id, 0);
+    CHECK(sds_id, FAIL, "SDselect:Failed to select a data set for testing szip compression with unlimited dimension");
+
+    /* Retrieve information of the data set */
+    status = SDgetinfo(sds_id, name, &array_rank, dim_sizes, &num_type, &attributes);
+    CHECK(status, FAIL, "SDgetinfo");
+
+    /* Wipe out the output buffer */
+    HDmemset(&out_data, 0, sizeof(out_data));
+
+    /* Read the data set */
+    start[0] = 0;
+    start[1] = 0;
+    edges[0] = LENGTH;
+    edges[1] = WIDTH;
+    status = SDreaddata (sds_id, start, NULL, edges, (VOIDP)out_data);
+    CHECK(status, FAIL, "SDreaddata");
+
+    /* Compare read data against input data */
+    for (j=0; j<LENGTH; j++) 
+    {
+        for (i=0; i<WIDTH; i++)
+	    if (out_data[j][i] != in_data[j][i])
+	    {
+		fprintf(stderr,"Bogus val in loc [%d][%d] in compressed dset, want %ld got %ld\n", j, i, (long)in_data[j][i], (long)out_data[j][i]);
+		num_errs++;
+	    }
+    }
+
+    /* Terminate access to the data set */
+    status = SDendaccess (sds_id);
+    CHECK(status, FAIL, "SDendaccess");
+
+    /* Terminate access to the SD interface and close the file */
+    status = SDend (sd_id);
+    CHECK(status, FAIL, "SDend");
+
+    /* Return the number of errors that's been kept track of so far */
+    return num_errs;
+#else
+    return 0;
+#endif
+}  /* test_szip_unlimited */
+
+/* 
+ * Test drive for testing the szip compression feature with SD interface 
+ */
+extern int 
+test_szip_compression ()
+{
+    int num_errs = 0;
+#ifdef H4_HAVE_LIBSZ
+    num_errs = num_errs + test_szip_SDS8bit();
+    num_errs = num_errs + test_szip_SDS16bit();
+    num_errs = num_errs + test_szip_SDS32bit();
+    num_errs = num_errs + test_szip_SDSfl32bit();
+    num_errs = num_errs + test_szip_SDSfl64bit();
+    num_errs = num_errs + test_szip_chunk();
+    num_errs = num_errs + test_szip_unlimited();
+    num_errs = num_errs + test_szip_chunk_3d();
+#else
+    printf("SKIPPING SZIP compression tests\n");
+#endif
+    return num_errs;
+}

Modified: packages/libhdf4/branches/upstream/current/mfhdf/libsrc/var.c
===================================================================
--- packages/libhdf4/branches/upstream/current/mfhdf/libsrc/var.c	2007-05-15 09:05:29 UTC (rev 830)
+++ packages/libhdf4/branches/upstream/current/mfhdf/libsrc/var.c	2007-05-15 09:53:05 UTC (rev 831)
@@ -2,7 +2,7 @@
  *	Copyright 1993, University Corporation for Atmospheric Research
  *      See netcdf/COPYRIGHT file for copying and redistribution conditions.
  */
-/*	$Id: var.c,v 1.25 2000/08/29 13:56:54 koziol Exp $ */
+/*	$Id: var.c,v 1.26 2001/04/09 17:49:48 bmribler Exp $ */
 
 #include	<string.h>
 #include	"local_nc.h"
@@ -92,6 +92,7 @@
               Free(var->shape) ;
           if(var->dsizes != NULL)
               Free(var->dsizes) ;
+
           if (NC_free_array(var->attrs) == FAIL)
             {
                 ret_value = FAIL;
@@ -135,8 +136,10 @@
 	xszof = NC_xtypelen(var->type) ;
 #endif
 
-	var->shape = NULL ;
-	var->dsizes = NULL ;
+	/* var->shape and var->dsizes were simply set to NULL without 
+	   checking, which caused memory leaks reported in bug# 418.
+	   Added the check and free memory as needed right before assigning
+	   the new shape and dsizes below.  BMR - Apr 8, 01 */
 
 	/*
 	 * Allocate the shape array
@@ -179,6 +182,10 @@
 		}
 		op++ ; ip++ ;
 	}
+
+	/* Free memory if this var already has shape previously allocated */
+	if(var->shape != NULL)
+            Free(var->shape);
 	var->shape = shape ;
 
 	/*
@@ -188,11 +195,15 @@
 	dsizes = (unsigned long *)HDmalloc(ii * sizeof(unsigned long)) ;
 	if(dsizes == NULL)
 	{
-        Free(shape) ;
-        var->shape = NULL;
-		nc_serror("NC_var_dsizes") ;
-		return(-1) ;
+            Free(shape) ;
+            var->shape = NULL;
+	    nc_serror("NC_var_shape") ;
+	    return(-1) ;
 	}
+
+	/* Free memory if this var already has dsizes previously allocated */
+	if(var->dsizes != NULL)
+            Free(var->dsizes);
 	var->dsizes = dsizes ;
 
 	/* 

Modified: packages/libhdf4/branches/upstream/current/mfhdf/libsrc/xdrposix.c
===================================================================
--- packages/libhdf4/branches/upstream/current/mfhdf/libsrc/xdrposix.c	2007-05-15 09:05:29 UTC (rev 830)
+++ packages/libhdf4/branches/upstream/current/mfhdf/libsrc/xdrposix.c	2007-05-15 09:53:05 UTC (rev 831)
@@ -12,7 +12,7 @@
  *
  * -glenn
  */
-/* $Id: xdrposix.c,v 1.21 2000/08/29 23:51:07 wendling Exp $ */
+/* $Id: xdrposix.c,v 1.27 2003/12/10 21:15:14 epourmal Exp $ */
 
 /*
  * 32-bit integer on the host architecture (on the CRAY, this is actually 64
@@ -68,11 +68,13 @@
         typedef u_int ncpos_t ;  /* all unicies */
 #   endif
 #else
-#if defined DOS_FS
-typedef off_t ncpos_t ;
-#else /* macintosh */
-typedef u_long ncpos_t ;
-#endif /* macintosh */
+#  if defined DOS_FS
+      typedef off_t ncpos_t ;
+#  elif defined __APPLE__
+      typedef u_int ncpos_t;
+#  else /* macintosh */
+      typedef u_long ncpos_t ;
+#  endif /* macintosh */
 #endif
 
 typedef struct {
@@ -286,7 +288,7 @@
 
 static bool_t   xdrposix_getlong();
 static bool_t   xdrposix_putlong();
-#if (_MIPS_SZLONG == 64)
+#if (_MIPS_SZLONG == 64) || (defined __sun && defined _LP64) || defined AIX5L64 || defined __x86_64__
 static bool_t   xdrposix_getint();
 static bool_t   xdrposix_putint();
 #endif
@@ -300,9 +302,21 @@
 #if (_MIPS_SZLONG == 64)
 static long *    xdrposix_inline();
 #else
-static netlong *    xdrposix_inline();
+#if (defined __sun && defined _LP64)
+static rpc_inline_t *    xdrposix_inline();
+#else
+#if (defined __x86_64__ )
+static int32_t *    xdrposix_inline();
+#else
+#if (defined __alpha )
+static int *    xdrposix_inline();
+#else
+static netlong *    xdrposix_inline(); 
 #endif
 #endif
+#endif
+#endif
+#endif
 static void xdrposix_destroy();
 
 /*
@@ -322,7 +336,26 @@
     xdrposix_getpos,    /* get offset in the stream */
     xdrposix_setpos,    /* set offset in the stream */
     xdrposix_inline,    /* prime stream for inline macros */
+#if (defined __sun && defined _LP64) || defined __x86_64__
+    xdrposix_destroy,   /* destroy stream */
+#ifndef __x86_64__
+    NULL,               /* no xdr_control function defined */
+#endif
+    /* Solaris 64-bit (arch=v9) has 64 bits long and 32 bits int. */
+    /* It defines the two extra entries for get/put int. here */
+    xdrposix_getint,   /* deserialize a 32-bit int */
+    xdrposix_putint    /* serialize a 32-bit int */
+#else
+#ifdef AIX5L64
+    xdrposix_destroy,
+    NULL,
+    NULL,
+    xdrposix_getint,
+    xdrposix_putint
+#else /*AIX5L64 */
     xdrposix_destroy    /* destroy stream */
+#endif /*AIX5L64 */
+#endif
 };
 
 
@@ -433,17 +466,21 @@
 static bool_t
 xdrposix_getlong(xdrs, lp)
     XDR *xdrs;
+#if (defined __alpha) 
+    int *lp;
+#else
     long *lp;
+#endif
 {
     unsigned char *up = (unsigned char *)lp ;
-#ifdef CRAY
+#if (defined CRAY || defined AIX5L64)   
     *lp = 0 ;
     up += (sizeof(long) - 4) ;
 #endif
     if(bioread((biobuf *)xdrs->x_private, up, 4) < 4)
         return (FALSE);
 #ifdef SWAP
-    *lp = ntohl(*lp);
+    *lp =  ntohl(*lp);
 #endif
     return (TRUE);
 }
@@ -451,7 +488,11 @@
 static bool_t
 xdrposix_putlong(xdrs, lp)
     XDR *xdrs;
+#if (defined __alpha) 
+    int *lp;
+#else
     long *lp;
+#endif
 {
 
     unsigned char *up = (unsigned char *)lp ;
@@ -459,7 +500,7 @@
     netlong mycopy = htonl(*lp);
     up = (unsigned char *)&mycopy;
 #endif
-#ifdef CRAY
+#if (defined CRAY || defined AIX5L64 )
     up += (sizeof(long) - 4) ;
 #endif
 
@@ -472,7 +513,11 @@
 xdrposix_getbytes(xdrs, addr, len)
     XDR *xdrs;
     caddr_t addr;
+#if (defined __alpha)
+    int len;
+#else
     u_int len;
+#endif
 {
 
     if ((len != 0)
@@ -485,7 +530,11 @@
 xdrposix_putbytes(xdrs, addr, len)
     XDR *xdrs;
     caddr_t addr;
+#if (defined __alpha)
+    int len;
+#else
     u_int len;
+#endif
 {
 
     if ((len != 0)
@@ -542,12 +591,30 @@
 #if (_MIPS_SZLONG == 64)
 static long *
 #else
-static netlong *
+#if (defined __sun && defined _LP64)
+static rpc_inline_t *
+#else
+#if (defined  __alpha)
+static int* 
+#else
+#if (defined  __x86_64__)
+static int32_t * 
+#else
+static netlong * 
 #endif
 #endif
+#endif
+#endif
+#endif
 xdrposix_inline(xdrs, len)
     XDR *xdrs;
-    u_int len;
+#if (defined  __alpha)
+int 
+#else
+    u_int
+#endif
+          len;
+
 {
 
     /*
@@ -559,7 +626,7 @@
     return (NULL);
 }
 
-#if (_MIPS_SZLONG == 64)
+#if (_MIPS_SZLONG == 64) || (defined __sun && defined _LP64) || defined AIX5L64  || defined __x86_64__
 
 static bool_t
 xdrposix_getint(xdrs, lp)
@@ -598,7 +665,7 @@
         return (FALSE);
     return (TRUE);
 }
-#endif
+#endif /* end of xdrposix_put(get)int */
 
 int
 NCxdrfile_sync(xdrs)

Added: packages/libhdf4/branches/upstream/current/mfhdf/ncdump/Makefile.am
===================================================================
--- packages/libhdf4/branches/upstream/current/mfhdf/ncdump/Makefile.am	                        (rev 0)
+++ packages/libhdf4/branches/upstream/current/mfhdf/ncdump/Makefile.am	2007-05-15 09:53:05 UTC (rev 831)
@@ -0,0 +1,37 @@
+#############################################################################
+##                      Setup for building programs                        ##
+#############################################################################
+
+## Setup the different includes and preprocessor #defines we need.
+INCLUDES=-I$(top_srcdir)/hdf/src        \
+         -I$(top_srcdir)/mfhdf/libsrc   \
+         -I$(top_srcdir)/mfhdf/port     \
+         -I../libsrc
+DEFINES=-DNDEBUG -DHDF
+AM_CPPFLAGS=$(INCLUDES) $(DEFINES)
+
+#############################################################################
+##                          Programs to build                              ##
+#############################################################################
+
+bin_PROGRAMS = ncdump
+man1_MANS = ncdump.1
+
+## Information for building the "ncdump" program
+ncdump_SOURCES = dumplib.c ncdump.c vardata.c
+ncdump_LDADD = ../libsrc/libmfhdf.a $(top_builddir)/hdf/src/libdf.a
+ncdump_DEPENDENCIES = $(top_builddir)/hdf/src/libdf.a ../libsrc/libmfhdf.a
+
+check: ncdump $(srcdir)/test0.cdl
+	../ncgen/ncgen -o test0.nc -n $(srcdir)/test0.cdl
+	./ncdump test0.nc > test1.cdl
+	../ncgen/ncgen -o test1.nc -n test1.cdl
+	./ncdump -n test0 test1.nc > test2.cdl
+	@cmp test1.cdl test2.cdl && echo "*** ncdump test successful ***" ;     \
+	    rm -f test1.nc test1.cdl test2.cdl
+
+#############################################################################
+##                          And the cleanup                                ##
+#############################################################################
+
+DISTCLEANFILES=test0.nc

Modified: packages/libhdf4/branches/upstream/current/mfhdf/ncdump/Makefile.in
===================================================================
--- packages/libhdf4/branches/upstream/current/mfhdf/ncdump/Makefile.in	2007-05-15 09:05:29 UTC (rev 830)
+++ packages/libhdf4/branches/upstream/current/mfhdf/ncdump/Makefile.in	2007-05-15 09:53:05 UTC (rev 831)
@@ -1,731 +1,503 @@
-# Makefile for ncdump(1).
-#
-# $Id: Makefile.in,v 1.19 2000/08/30 18:43:28 wendling Exp $
-# NOTE: This Makefile.in is used by the Cygnus 'configure' script to
-#       generate the top level Makefile.
+# Makefile.in generated by automake 1.7.7 from Makefile.am.
+# @configure_input@
 
-# ############# Start of system configuration section. #############
+# Copyright 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003
+# 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.
 
-# 'srcdir' Gets set to directory this Makefile is found in
-srcdir = .
-TOP_SRCDIR = ../..
+# 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.
 
-prefix = $(TOP_SRCDIR)/NewHDF
+ at SET_MAKE@
 
-exec_prefix = $(prefix)
-tooldir = $(exec_prefix)/$(target)
+#############################################################################
+#############################################################################
 
-program_transform_name =
+srcdir = @srcdir@
+top_srcdir = @top_srcdir@
+VPATH = @srcdir@
+pkgdatadir = $(datadir)/@PACKAGE@
+pkglibdir = $(libdir)/@PACKAGE@
+pkgincludedir = $(includedir)/@PACKAGE@
+top_builddir = ../..
 
-datadir = $(prefix)/lib
-mandir = $(prefix)/man
-man1dir = $(mandir)/man1
-man2dir = $(mandir)/man2
-man3dir = $(mandir)/man3
-man4dir = $(mandir)/man4
-man5dir = $(mandir)/man5
-man6dir = $(mandir)/man6
-man7dir = $(mandir)/man7
-man8dir = $(mandir)/man8
-man9dir = $(mandir)/man9
-docdir = $(datadir)/doc
+am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
+INSTALL = @INSTALL@
+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 = :
+host_triplet = @host@
+ACLOCAL = @ACLOCAL@
+AMDEP_FALSE = @AMDEP_FALSE@
+AMDEP_TRUE = @AMDEP_TRUE@
+AMTAR = @AMTAR@
+AR = @AR@
+AUTOCONF = @AUTOCONF@
+AUTOHEADER = @AUTOHEADER@
+AUTOMAKE = @AUTOMAKE@
+AWK = @AWK@
+CC = @CC@
+CCDEPMODE = @CCDEPMODE@
+CFLAGS = @CFLAGS@
+CPP = @CPP@
+CPPFLAGS = @CPPFLAGS@
+CXX = @CXX@
+CXXCPP = @CXXCPP@
+CXXDEPMODE = @CXXDEPMODE@
+CXXFLAGS = @CXXFLAGS@
+CYGPATH_W = @CYGPATH_W@
+DEFS = @DEFS@
+DEPDIR = @DEPDIR@
+DIFF = @DIFF@
+ECHO_C = @ECHO_C@
+ECHO_N = @ECHO_N@
+ECHO_T = @ECHO_T@
+EGREP = @EGREP@
+EXEEXT = @EXEEXT@
+F77 = @F77@
+FFLAGS = @FFLAGS@
+HDF_BUILD_FORTRAN_FALSE = @HDF_BUILD_FORTRAN_FALSE@
+HDF_BUILD_FORTRAN_TRUE = @HDF_BUILD_FORTRAN_TRUE@
+HDF_BUILD_XDR_FALSE = @HDF_BUILD_XDR_FALSE@
+HDF_BUILD_XDR_TRUE = @HDF_BUILD_XDR_TRUE@
+INSTALL_DATA = @INSTALL_DATA@
+INSTALL_PROGRAM = @INSTALL_PROGRAM@
+INSTALL_SCRIPT = @INSTALL_SCRIPT@
+INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
+LDFLAGS = @LDFLAGS@
+LEX = @LEX@
+LEXLIB = @LEXLIB@
+LEX_OUTPUT_ROOT = @LEX_OUTPUT_ROOT@
+LIBOBJS = @LIBOBJS@
+LIBS = @LIBS@
+LN_S = @LN_S@
+LTLIBOBJS = @LTLIBOBJS@
+MAINT = @MAINT@
+MAINTAINER_MODE_FALSE = @MAINTAINER_MODE_FALSE@
+MAINTAINER_MODE_TRUE = @MAINTAINER_MODE_TRUE@
+MAKEINFO = @MAKEINFO@
+NEQN = @NEQN@
+OBJEXT = @OBJEXT@
+PACKAGE = @PACKAGE@
+PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
+PACKAGE_NAME = @PACKAGE_NAME@
+PACKAGE_STRING = @PACKAGE_STRING@
+PACKAGE_TARNAME = @PACKAGE_TARNAME@
+PACKAGE_VERSION = @PACKAGE_VERSION@
+PATH_SEPARATOR = @PATH_SEPARATOR@
+RANLIB = @RANLIB@
+SET_MAKE = @SET_MAKE@
+SHELL = @SHELL@
+STRIP = @STRIP@
+TBL = @TBL@
+VERSION = @VERSION@
+YACC = @YACC@
+ac_ct_CC = @ac_ct_CC@
+ac_ct_CXX = @ac_ct_CXX@
+ac_ct_F77 = @ac_ct_F77@
+ac_ct_RANLIB = @ac_ct_RANLIB@
+ac_ct_STRIP = @ac_ct_STRIP@
+am__fastdepCC_FALSE = @am__fastdepCC_FALSE@
+am__fastdepCC_TRUE = @am__fastdepCC_TRUE@
+am__fastdepCXX_FALSE = @am__fastdepCXX_FALSE@
+am__fastdepCXX_TRUE = @am__fastdepCXX_TRUE@
+am__include = @am__include@
+am__leading_dot = @am__leading_dot@
+am__quote = @am__quote@
+bindir = @bindir@
+build = @build@
+build_alias = @build_alias@
+build_cpu = @build_cpu@
+build_os = @build_os@
+build_vendor = @build_vendor@
+datadir = @datadir@
+exec_prefix = @exec_prefix@
+host = @host@
+host_alias = @host_alias@
+host_cpu = @host_cpu@
+host_os = @host_os@
+host_vendor = @host_vendor@
+includedir = @includedir@
+infodir = @infodir@
+install_sh = @install_sh@
+libdir = @libdir@
+libexecdir = @libexecdir@
+localstatedir = @localstatedir@
+mandir = @mandir@
+oldincludedir = @oldincludedir@
+prefix = @prefix@
+program_transform_name = @program_transform_name@
+sbindir = @sbindir@
+sharedstatedir = @sharedstatedir@
+sysconfdir = @sysconfdir@
+target_alias = @target_alias@
 
-SHELL = /bin/sh
+INCLUDES = -I$(top_srcdir)/hdf/src        \
+         -I$(top_srcdir)/mfhdf/libsrc   \
+         -I$(top_srcdir)/mfhdf/port     \
+         -I../libsrc
 
-INSTALL = ${TOP_SRCDIR}/install-sh -c
-INSTALL_PROGRAM = $(INSTALL)
-INSTALL_DATA = $(INSTALL) -m 644
+DEFINES = -DNDEBUG -DHDF
+AM_CPPFLAGS = $(INCLUDES) $(DEFINES)
 
-# /usr/local/bin/m4 (GNU version?)
-M4   = /usr/local/bin/m4
-# /usr/local/bin/perl (GNU version?)
-PERL = /usr/local/bin/perl
 
-# Name of achive randomizer, usually ranlib (use 'touch' if non-existant)
-RANLIB = ranlib
+#############################################################################
+#############################################################################
+bin_PROGRAMS = ncdump
+man1_MANS = ncdump.1
 
-# Name of library archiver and flags to send, default 'AR=ar', 'ARFLAGS=r'
-AR = ar
-ARFLAGS = rc
+ncdump_SOURCES = dumplib.c ncdump.c vardata.c
+ncdump_LDADD = ../libsrc/libmfhdf.a $(top_builddir)/hdf/src/libdf.a
+ncdump_DEPENDENCIES = $(top_builddir)/hdf/src/libdf.a ../libsrc/libmfhdf.a
 
-# Name of remove utility, default 'RM=/bin/rm', 'RMFLAGS=-f'
-RM = /bin/rm
-RMFLAGS = -f
 
-AS = as
-CC = gcc
-CFLAGS = -ansi
-FC = f77
-FFLAGS=
+#############################################################################
+#############################################################################
+DISTCLEANFILES = test0.nc
+subdir = mfhdf/ncdump
+ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
+mkinstalldirs = $(SHELL) $(top_srcdir)/bin/mkinstalldirs
+CONFIG_HEADER = $(top_builddir)/hdf/src/h4config.h
+CONFIG_CLEAN_FILES =
+bin_PROGRAMS = ncdump$(EXEEXT)
+PROGRAMS = $(bin_PROGRAMS)
 
-# Set for document generation
-MAKEINFO = makeinfo
-TEXI2DVI = texi2dvi
+am_ncdump_OBJECTS = dumplib.$(OBJEXT) ncdump.$(OBJEXT) vardata.$(OBJEXT)
+ncdump_OBJECTS = $(am_ncdump_OBJECTS)
+ncdump_LDFLAGS =
 
-# Directory in which to install binaries
-bindir = $(exec_prefix)/bin
+DEFAULT_INCLUDES =  -I. -I$(srcdir) -I$(top_builddir)/hdf/src
+depcomp = $(SHELL) $(top_srcdir)/bin/depcomp
+am__depfiles_maybe = depfiles
+ at AMDEP_TRUE@DEP_FILES = ./$(DEPDIR)/dumplib.Po ./$(DEPDIR)/ncdump.Po \
+ at AMDEP_TRUE@	./$(DEPDIR)/vardata.Po
+COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \
+	$(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
+CCLD = $(CC)
+LINK = $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@
+DIST_SOURCES = $(ncdump_SOURCES)
 
-# Directory in which to install header files.
-includedir = $(prefex)/include
+NROFF = nroff
+MANS = $(man1_MANS)
+DIST_COMMON = $(srcdir)/Makefile.in Makefile.am
+SOURCES = $(ncdump_SOURCES)
 
-# Directory in which to install library files.
-libdir = $(prefix)/lib
+all: all-am
 
-# Directory in which to install documentation info files.
-infodir = $(prefix)/info
-
-# ------------ General Macros for NETCDF --------------------
-INCDIR	 = $(prefix)/include
-HDF_LIB  = $(TOP_SRCDIR)/hdf/src/libdf.a
-HDF_INC  = $(TOP_SRCDIR)/hdf/src/
-PABLO_HINC = $(TOP_SRCDIR)/hdf/pablo
-FMPOOL_INC = $(TOP_SRCDIR)/hdf/fmpool
-JPEG_LIB = $(TOP_SRCDIR)/hdf/jpeg/libjpeg.a
-ZLIB_LIB = $(TOP_SRCDIR)/hdf/zlib/libz.a
-NETCDF_INC = $(TOP_SRCDIR)/mfhdf/libsrc
-PORT_INC   = $(TOP_SRCDIR)/mfhdf/port
-CPP	   = $(CC) -E
-CFLAGS_NETCDF = 
-CPPFLAGS_HDF  = -DNDEBUG -DHDF $(FMPOOL_FLAGS)
-CPP_NETCDF    = -I. -I$(HDF_INC) -I$(NETCDF_INC) -I$(PORT_INC)
-CPPFLAGS_LIB	= $(SWAP) $(NETLONG) 
-CPPFLAGS_XDR	= $(CPP_XDR) 
-CPPFLAGS_NETCDF =  $(CPPFLAGS_XDR) $(CPP_NETCDF) $(CPPFLAGS_LIB) $(CPPFLAGS_HDF) 
-FFLAGS  =
-NCDUMP	= 
-NCGEN	= 
-NEQN	= neqn
-OS	= 
-TBL	= tbl
-WHICH	= which
-FTPDIR	= 
-VERSION	= 2.3.2
-LEX	= lex
-YACC	= yacc
-DIFF    = diff
-DIFF_FLAGS = -w
-
-
-#### ----- host and target specific makefile fragments come in here.-------
-### ------------------- end of makefile fragments -------------------------
-# ############# End of system configuration section. ###############
-
-PROGRAM		= ncdump
-BINFILES	= $(PROGRAM)
-#HDF_LIB         = @HDF_LIB@
-#JPEG_LIB        = @JPEG_LIB@
-#HDF_INC         = @HDF_INC@
-#CPP_NETCDF	= -I../libsrc -I../port $(HDF_INC)
-#CPPFLAGS	= $(CPPFLAGS_NCD)
-#CFLAGS		= @CFLAGS@
-#FFLAGS		= @FFLAGS@
-MANIFEST = $(DISTFILES)
-DISTFILES	= Makefile.in ncdump.c ncdump.h  depend msoft.mk \
-		  test0.cdl vardata.c vardata.h dumplib.c dumplib.h ncdump.1 \
-                  make.com msofttab.c
-MANUALS		= ncdump.1
-LIBNAME		= mfhdf
-LD_NETCDF	= ../libsrc/libmfhdf.a
-OBJS		=  ncdump.o vardata.o dumplib.o
-#LD_XDR		= @LD_XDR@
-LD_NETCDF	= -L../libsrc -lmfhdf
-LIBS		= $(LD_NETCDF) $(LD_XDR) $(HDF_LIB) $(JPEG_LIB) $(ZLIB_LIB) $(LIBSX)
-prefix		= ../../..
-GARBAGE		= $(PROGRAM) test0.nc test1.nc test1.cdl test2.cdl
-
-#all::		$(PROGRAM)
-all::         FORCE
-	@if test -z "$(FMPOOL_FLAGS)"; then \
-	  $(MAKE) $(MFLAGS) $(LOCAL_MACROS) $(PROGRAM); \
-	else		 \
-	  $(MAKE) $(MFLAGS) $(LOCAL_MACROS) FMPOOL_FLAGS="$(FMPOOL_FLAGS) -I$(FMPOOL_INC)" $(PROGRAM); \
-	fi
-
-
-test:		$(PROGRAM) test0.cdl
-	$(NCGEN) -o test0.nc -n test0.cdl
-	./$(PROGRAM) test0.nc > test1.cdl
-	$(NCGEN) -o test1.nc -n test1.cdl
-	./$(PROGRAM) -n test0 test1.nc > test2.cdl
-	@cmp test1.cdl test2.cdl && \
-	    echo "*** $(PROGRAM) test successful ***" ; \
-	    rm test1.cdl test1.nc test2.cdl
-
-install::	installed_program installed_manuals
-install-utils::	installed_program
-install-man::	installed_manuals
-
-# This is the master.mk.in makefile.  It contains general rules.
-#
-
 .SUFFIXES:
-.SUFFIXES:	.so .o .i .c .fc .f .F .l .y
+.SUFFIXES: .c .o .obj
+$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ Makefile.am  $(top_srcdir)/configure.ac $(ACLOCAL_M4)
+	cd $(top_srcdir) && \
+	  $(AUTOMAKE) --foreign  mfhdf/ncdump/Makefile
+Makefile: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.in  $(top_builddir)/config.status
+	cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)
+binPROGRAMS_INSTALL = $(INSTALL_PROGRAM)
+install-binPROGRAMS: $(bin_PROGRAMS)
+	@$(NORMAL_INSTALL)
+	$(mkinstalldirs) $(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
 
-# ###########################################################################
-# General Macros: (moved to make file fragment )
-# ###########################################################################
-#CPP		= @CPP@
-#NCDUMP		= @NCDUMP@
-#NCGEN		= @NCGEN@
-#NEQN		= @NEQN@
-#OS		= @OS@
-#TBL		= @TBL@
-#WHICH		= @WHICH@
+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
 
-# ###########################################################################
-# Recursive Macros (command-line changes to others aren't supported):
-# ###########################################################################
-SUBDIR_MACROS = CC="$(CC)" \
-	CFLAGS="$(CFLAGS)" \
-	CPP="$(CPP)" \
-	exec_prefix="$(exec_prefix)" \
-	FC="$(FC)" \
-	prefix="$(prefix)"
+clean-binPROGRAMS:
+	-test -z "$(bin_PROGRAMS)" || rm -f $(bin_PROGRAMS)
+ncdump$(EXEEXT): $(ncdump_OBJECTS) $(ncdump_DEPENDENCIES) 
+	@rm -f ncdump$(EXEEXT)
+	$(LINK) $(ncdump_LDFLAGS) $(ncdump_OBJECTS) $(ncdump_LDADD) $(LIBS)
 
-LOCAL_MACROS  = CC="$(CC)" \
-	CFLAGS="$(CFLAGS)" \
-	CPP="$(CPP)" \
-	CPPFLAGS="$(CPPFLAGS)" \
-	exec_prefix="$(exec_prefix)" \
-	FC="$(FC)" \
-	prefix="$(prefix)"
+mostlyclean-compile:
+	-rm -f *.$(OBJEXT) core *.core
 
-# ###########################################################################
-# Recursive make(1)s in Subdirectories:
-# ###########################################################################
+distclean-compile:
+	-rm -f *.tab.c
 
-subdir_dummy_target $(SUBDIR_TARGETS):
-	@echo ""
-	@dir=`echo $@ | sed 's,/.*,,'`; \
-	    target=`echo $@ | sed "s,$$dir/,,"`; \
-	    cd $$dir && \
-	    echo "making \`$$target' in directory `pwd`" && \
-	    echo "" && \
-	    $(MAKE) $(MFLAGS) $(SUBDIR_MACROS) \
-		$$target || exit 1
-	@echo ""
-	@echo "returning to directory `pwd`"
-	@echo ""
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/dumplib.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/ncdump.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/vardata.Po at am__quote@
 
-
-# ###########################################################################
-# Compilation:
-# ###########################################################################
-#FORTC		= @FORTC@
-
-# Compile FORTRAN code.
-#
-.f.o:
-	$(FC) -c $(FFLAGS) $<
-.F.o:
-	ln -s $< $$$$.c \
-	&& $(CPP) -DUD_FORTRAN_SOURCE $(CPPFLAGS) $(CPPFLAGS_NETCDF) $$$$.c \
-	    | sed '/^# *[0-9]/d' > $*.f \
-	|| (rm -f $*.f $$$$.c; exit 1) \
-	&& rm $$$$.c
-	$(FC) -c $(FFLAGS) $*.f
-.F.f:
-	ln -s $< $$$$.c \
-	&& $(CPP) -DUD_FORTRAN_SOURCE $(CPPFLAGS) $(CPPFLAGS_NETCDF) $$$$.c \
-	    | sed '/^# *[0-9]/d' > $@ \
-	|| (rm -f $@ $$$$.c; exit 1) \
-	&& rm $$$$.c
-
-# Generate FORTRAN-callable C code.
-#
-.fc.o:
-	$(FORTC) -O $(OS) $< > $*.c \
-	    || ( rm -f $*.c; exit 1)
-	$(CC) -c $(CFLAGS) $(CFLAGS_NETCDF) $(CPPFLAGS) $(CPPFLAGS_NETCDF) $*.c
-.fc.c:
-	$(FORTC) -O $(OS) $< > $@ \
-	    || (rm -f $*.c; exit 1)
-
-# Compile C code.
-#
 .c.o:
-	$(CC) -c $(CPPFLAGS) $(CPPFLAGS_NETCDF) $(CFLAGS) $(CFLAGS_NETCDF) $<
+ at am__fastdepCC_TRUE@	if $(COMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" \
+ at am__fastdepCC_TRUE@	  -c -o $@ `test -f '$<' || echo '$(srcdir)/'`$<; \
+ at am__fastdepCC_TRUE@	then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; \
+ at am__fastdepCC_TRUE@	else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; \
+ at am__fastdepCC_TRUE@	fi
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	depfile='$(DEPDIR)/$*.Po' tmpdepfile='$(DEPDIR)/$*.TPo' @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	$(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCC_FALSE@	$(COMPILE) -c `test -f '$<' || echo '$(srcdir)/'`$<
 
-# Compile lex(1) code.  This rule is here to ensure the use of CPPFLAGS.
-# 
-.l.o:
-	rm -f $*.c
-	$(LEX) -t $< > $*.c
-	$(CC) -c $(CPPFLAGS) $(CPPFLAGS_NETCDF) $(CFLAGS) $(CFLAGS_NETCDF) $*.c
-	rm $*.c
+.c.obj:
+ at am__fastdepCC_TRUE@	if $(COMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" \
+ at am__fastdepCC_TRUE@	  -c -o $@ `if test -f '$<'; then $(CYGPATH_W) '$<'; else $(CYGPATH_W) '$(srcdir)/$<'; fi`; \
+ at am__fastdepCC_TRUE@	then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; \
+ at am__fastdepCC_TRUE@	else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; \
+ at am__fastdepCC_TRUE@	fi
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	depfile='$(DEPDIR)/$*.Po' tmpdepfile='$(DEPDIR)/$*.TPo' @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	$(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCC_FALSE@	$(COMPILE) -c `if test -f '$<'; then $(CYGPATH_W) '$<'; else $(CYGPATH_W) '$(srcdir)/$<'; fi`
+uninstall-info-am:
 
-# C preprocess.  
-#   NB: 
-#	1. The output `file' is not created but appears on standard output;
-#	2. Line numbering information is kept.
-#
-.c.i:
-	$(CPP) $(CPPFLAGS) $(CPPFLAGS_NETCDF) $<
+man1dir = $(mandir)/man1
+install-man1: $(man1_MANS) $(man_MANS)
+	@$(NORMAL_INSTALL)
+	$(mkinstalldirs) $(DESTDIR)$(man1dir)
+	@list='$(man1_MANS) $(dist_man1_MANS) $(nodist_man1_MANS)'; \
+	l2='$(man_MANS) $(dist_man_MANS) $(nodist_man_MANS)'; \
+	for i in $$l2; do \
+	  case "$$i" in \
+	    *.1*) list="$$list $$i" ;; \
+	  esac; \
+	done; \
+	for i in $$list; do \
+	  if test -f $(srcdir)/$$i; then file=$(srcdir)/$$i; \
+	  else file=$$i; fi; \
+	  ext=`echo $$i | sed -e 's/^.*\\.//'`; \
+	  case "$$ext" in \
+	    1*) ;; \
+	    *) ext='1' ;; \
+	  esac; \
+	  inst=`echo $$i | sed -e 's/\\.[0-9a-z]*$$//'`; \
+	  inst=`echo $$inst | sed -e 's/^.*\///'`; \
+	  inst=`echo $$inst | sed '$(transform)'`.$$ext; \
+	  echo " $(INSTALL_DATA) $$file $(DESTDIR)$(man1dir)/$$inst"; \
+	  $(INSTALL_DATA) $$file $(DESTDIR)$(man1dir)/$$inst; \
+	done
+uninstall-man1:
+	@$(NORMAL_UNINSTALL)
+	@list='$(man1_MANS) $(dist_man1_MANS) $(nodist_man1_MANS)'; \
+	l2='$(man_MANS) $(dist_man_MANS) $(nodist_man_MANS)'; \
+	for i in $$l2; do \
+	  case "$$i" in \
+	    *.1*) list="$$list $$i" ;; \
+	  esac; \
+	done; \
+	for i in $$list; do \
+	  ext=`echo $$i | sed -e 's/^.*\\.//'`; \
+	  case "$$ext" in \
+	    1*) ;; \
+	    *) ext='1' ;; \
+	  esac; \
+	  inst=`echo $$i | sed -e 's/\\.[0-9a-z]*$$//'`; \
+	  inst=`echo $$inst | sed -e 's/^.*\///'`; \
+	  inst=`echo $$inst | sed '$(transform)'`.$$ext; \
+	  echo " rm -f $(DESTDIR)$(man1dir)/$$inst"; \
+	  rm -f $(DESTDIR)$(man1dir)/$$inst; \
+	done
 
+ETAGS = etags
+ETAGSFLAGS =
 
-# ###########################################################################
-# Libraries:
-# ###########################################################################
-# RANLIB		= @RANLIB@
-LIBDIR		= $(prefix)/lib
-LIB_A		= lib$(LIBRARY).a
+CTAGS = ctags
+CTAGSFLAGS =
 
-library::		$(LIB_A)
+tags: TAGS
 
-# The following rule is forced because the library can be created by a
-# makefile in another directory prior to the execution of the following rule.
-#
-$(LIB_A):		$(LIBOBJS) FORCE
-	$(AR) rcuv $@ $(LIBOBJS)
-	$(RANLIB) $@
+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; } \
+	       END { for (i in files) print i; }'`; \
+	mkid -fID $$unique
 
-# The following rule is for those makefiles needing to install object
-# modules in a library in another directory.  They need only define 
-# REMOTE_LIBRARY and LIBOBJS.  The rule is forced for the same reason as the
-# $(LIB_A) rule.
-#
-lib_dummy $(REMOTE_LIBRARY):	$(LIBOBJS) FORCE
-	$(AR) rcuv $@ $(LIBOBJS)
-	$(RANLIB) $@
+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; } \
+	       END { for (i in files) print i; }'`; \
+	test -z "$(ETAGS_ARGS)$$tags$$unique" \
+	  || $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
+	     $$tags $$unique
 
-installed_libfiles:	FORCE
-	@if [ -n "$(LIBFILES)" ]; then \
-	    libfiles="$(LIBFILES)"; \
-	    for libfile in $$libfiles; do \
-		$(MAKE) $(MFLAGS) $(LOCAL_MACROS) \
-		    LIBDIR=$(LIBDIR) LIBFILE=$$libfile \
-		    installed_libfile || exit 1; \
-	    done; \
-	else \
-	    :; \
-	fi
+ctags: CTAGS
+CTAGS:  $(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; } \
+	       END { for (i in files) print i; }'`; \
+	test -z "$(CTAGS_ARGS)$$tags$$unique" \
+	  || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
+	     $$tags $$unique
 
-installed_library::	FORCE
-	@$(MAKE) $(MFLAGS) $(LOCAL_MACROS) \
-	    LIBDIR=$(LIBDIR) LIBFILE=$(LIB_A) \
-	    installed_libfile
+GTAGS:
+	here=`$(am__cd) $(top_builddir) && pwd` \
+	  && cd $(top_srcdir) \
+	  && gtags -i $(GTAGS_ARGS) $$here
 
-# The following target decouples the previous targets from the actual rule;
-# thus, eliminating extraneous make(1) messages.
-#
-installed_libfile:	$(LIBDIR)/$(LIBFILE)
+distclean-tags:
+	-rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
+DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
 
-$(LIBDIR)/$(LIBFILE):	$(LIBDIR) $(LIBFILE)
-	$(INSTALL_DATA) $(LIBFILE) $@
+top_distdir = ../..
+distdir = $(top_distdir)/$(PACKAGE)-$(VERSION)
 
-dummy_libdir $(LIBDIR):
-	mkdir -p $@
-	chmod u+rwx,g+rws,o=rx $@
-
-LIB_SO		= lib$(LIBRARY).so.$(MAJOR_NO).$(MINOR_NO)
-LIB_SA		= lib$(LIBRARY).sa.$(MAJOR_NO).$(MINOR_NO)
-
-#library::		FORCE
-#	@so_objs=`echo $(LIBOBJS) | sed 's/\.o/.so/g'`; \
-#	if [ -z "$$so_objs" ]; then \
-#	    :; \
-#	else \
-#	    $(MAKE) $(MFLAGS) $(LIB_SO) \
-#		SO_OBJS="$$so_objs"; \
-#	fi
-#	@if [ -z "$(SA_OBJS)" ]; then \
-#	    :; \
-#	else \
-#	    $(MAKE) $(MFLAGS) $(LIB_SA); \
-#	fi
-
-$(LIB_SO):	$(SO_OBJS)
-	ld -assert pure-text $(SO_OBJS) -o $@
-$(LIB_SA):	$(SA_OBJS) FORCE
-	$(AR) rcuv $@ $(SA_OBJS)
-
-.fc.so:
-	$(FORTC) -O $(OS) $< > $*.c \
-	    || (rm -f $*.c; exit 1)
-	$(CC) -c -pic $(CFLAGS) $(CFLAGS_NETCDF) $(CPPFLAGS) $(CPPFLAGS_NETCDF) $*.c -o $$$$.o \
-	    || (rm -f $$$$.o; exit 1)
-	mv $$$$.o $@
-.c.so:
-	$(CC) -c -pic $(CFLAGS) $(CFLAGS_NETCDF) $(CPPFLAGS) $(CPPFLAGS_NETCDF) $< -o $$$$.o \
-	    || (rm -f $$$$.o; exit 1)
-	mv $$$$.o $@
-
-#installed_library::	$(LIBDIR)/$(LIB_SO)
-#	@if [ -z "$(SA_OBJS)" ]; then \
-#	    :; \
-#	else \
-#	    $(MAKE) $(MFLAGS) $(LIBDIR)/$(LIB_SA); \
-#	fi
-
-$(LIBDIR)/$(LIB_SO):	$(LIBDIR) $(LIB_SO)
-	$(INSTALL_DATA) $(LIB_SO) $(LIBDIR)/$(LIB_SO)
-$(LIBDIR)/$(LIB_SA):	$(LIBDIR) $(LIB_SA)
-	$(INSTALL_DATA) $(LIB_SA) $(LIBDIR)/$(LIB_SA)
-
-
-# ###########################################################################
-# Programs:
-# ###########################################################################
-BINDIR		= $(exec_prefix)/bin
-
-programs:	$(PROGRAMS)
-program:
-	@if [ -z "$(PROGRAM)" ]; then \
-	    : true; \
-	else \
-	    if [ -z "$(LIBRARY)" ]; then \
-		: true; \
-	    else \
-		$(MAKE) $(MFLAGS) $(LOCAL_MACROS) library; \
+distdir: $(DISTFILES)
+	@srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \
+	topsrcdirstrip=`echo "$(top_srcdir)" | sed 's|.|.|g'`; \
+	list='$(DISTFILES)'; for file in $$list; do \
+	  case $$file in \
+	    $(srcdir)/*) file=`echo "$$file" | sed "s|^$$srcdirstrip/||"`;; \
+	    $(top_srcdir)/*) file=`echo "$$file" | sed "s|^$$topsrcdirstrip/|$(top_builddir)/|"`;; \
+	  esac; \
+	  if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
+	  dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \
+	  if test "$$dir" != "$$file" && test "$$dir" != "."; then \
+	    dir="/$$dir"; \
+	    $(mkinstalldirs) "$(distdir)$$dir"; \
+	  else \
+	    dir=''; \
+	  fi; \
+	  if test -d $$d/$$file; then \
+	    if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
+	      cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \
 	    fi; \
-	    $(MAKE) $(MFLAGS) $(LOCAL_MACROS) $(PROGRAM); \
-	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) $(MANS)
 
-dummy_prog $(PROGRAM):	$(OBJS)
-	@if [ -r $@.f -o -r $@.F ]; then \
-	    ld='$(FC) $(FFLAGS)'; \
-	else \
-	    ld='$(CC) $(CFLAGS) $(CFLAGS_NETCDF) '; \
-	fi; \
-	cmd="$$ld $(OBJS) $(LIBS) -o $@"; \
-	echo $$cmd; \
-	$$cmd \
-	    || (rm -f $@; exit 1)
+installdirs:
+	$(mkinstalldirs) $(DESTDIR)$(bindir) $(DESTDIR)$(man1dir)
+install: install-am
+install-exec: install-exec-am
+install-data: install-data-am
+uninstall: uninstall-am
 
-installed_programs:	FORCE
-	@$(MAKE) $(MFLAGS) $(LOCAL_MACROS) installed_binfiles \
-	    BINDIR=$(BINDIR) BINFILES="$(PROGRAMS)"
+install-am: all-am
+	@$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
 
-installed_binfiles:	FORCE
-	@if [ -n "$(BINFILES)" ]; then \
-	    binfiles="$(BINFILES)"; \
-	    for binfile in $$binfiles; do \
-		$(MAKE) $(MFLAGS) $(LOCAL_MACROS) \
-		    BINDIR=$(BINDIR) BINFILE=$$binfile \
-		    installed_binfile || exit 1; \
-	    done; \
-	else \
-	    :; \
-	fi
+installcheck: installcheck-am
+install-strip:
+	$(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
+	  INSTALL_STRIP_FLAG=-s \
+	  `test -z '$(STRIP)' || \
+	    echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
+mostlyclean-generic:
 
-installed_program:	FORCE
-	@$(MAKE) $(MFLAGS) $(LOCAL_MACROS) BINDIR=$(BINDIR) BINFILE=$(PROGRAM) \
-	    installed_binfile
+clean-generic:
 
-# The following target decouples the previous targets from the actual rule;
-# thus, eliminating extraneous make(1) messages.
-#
-installed_binfile:	$(BINDIR)/$(BINFILE)
+distclean-generic:
+	-rm -f $(CONFIG_CLEAN_FILES)
+	-test -z "$(DISTCLEANFILES)" || rm -f $(DISTCLEANFILES)
 
-$(BINDIR)/$(BINFILE):	$(BINDIR) $(BINFILE)
-	$(INSTALL_PROGRAM) $(BINFILE) $@
+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
 
-dummy_bindir $(BINDIR):
-	mkdir -p $@
-	chmod u+rwx,g+rws,o=rx $@
+clean-am: clean-binPROGRAMS clean-generic mostlyclean-am
 
+distclean: distclean-am
+	-rm -rf ./$(DEPDIR)
+	-rm -f Makefile
 
-# ###########################################################################
-# Header files:
-# ###########################################################################
-installed_headers:	FORCE
-	@if [ -n "$(HEADERS)" ]; then \
-	    headers="$(HEADERS)"; \
-	    for header in $$headers; do \
-		$(MAKE) $(MFLAGS) $(LOCAL_MACROS) INCDIR=$(INCDIR) HEADER=$$header \
-		    installed_header || exit 1; \
-	    done; \
-	else \
-	    :; \
-	fi
+distclean-am: clean-am distclean-compile distclean-generic \
+	distclean-tags
 
-# The following target decouples the previous targets from the actual rule;
-# thus, eliminating extraneous make(1) messages.
-#
-installed_header:	$(INCDIR)/$(HEADER)
+dvi: dvi-am
 
-$(INCDIR)/$(HEADER):	$(INCDIR) $(HEADER)
-	$(INSTALL_DATA) $(HEADER) $@
+dvi-am:
 
-dummy_incdir $(INCDIR):
-	mkdir -p $@
-	chmod u+rwx,g+rws,o=rx $@
+info: info-am
 
+info-am:
 
-# ###########################################################################
-# `etc/' files:
-# ###########################################################################
-ETCDIR	= $(prefix)/etc
+install-data-am: install-man
 
-installed_etcfiles:
-	@if [ -n "$(ETCFILES)" ]; then \
-	    etcfiles="$(ETCFILES)"; \
-	    for etcfile in $$etcfiles; do \
-		$(MAKE) $(MFLAGS) $(LOCAL_MACROS) ETCDIR=$(ETCDIR) ETCFILE=$$etcfile \
-		    installed_etcfile || exit 1; \
-	    done; \
-	else \
-	    :; \
-	fi
+install-exec-am: install-binPROGRAMS
 
-# The following target decouples the previous targets from the actual rule;
-# thus, eliminating extraneous make(1) messages.
-#
-installed_etcfile:	$(ETCDIR)/$(ETCFILE)
+install-info: install-info-am
 
-$(ETCDIR)/$(ETCFILE):	$(ETCDIR) $(ETCFILE)
-	-mkdir -p $(ETCDIR)
-	-chmod u+rwx,g+rws,o=rx $(ETCDIR)
-	$(INSTALL_DATA) $(ETCFILE) $@
+install-man: install-man1
 
-# ###########################################################################
-# Manual Pages:
-# ###########################################################################
-MANDIR	= $(prefix)/man
+installcheck-am:
 
-installed_manuals:	FORCE
-	@if [ -n "$(MANUALS)" ]; then \
-	    manuals="$(MANUALS)"; \
-	    for manual in $$manuals; do \
-		mandir=$(MANDIR)/man`echo $$manual | sed 's/.*\.\(.\).*/\1/'`; \
-		$(MAKE) $(MFLAGS) $(LOCAL_MACROS) MANDIR=$$mandir MANUAL=$$manual \
-		    installed_manual || exit 1; \
-	    done; \
-	else \
-	    :; \
-	fi
+maintainer-clean: maintainer-clean-am
+	-rm -rf ./$(DEPDIR)
+	-rm -f Makefile
 
-# The following target decouples the previous targets from the actual rule;
-# thus, eliminating extraneous make(1) messages.
-#
-installed_manual:	$(MANDIR)/$(MANUAL)
+maintainer-clean-am: distclean-am maintainer-clean-generic
 
-# The first sed(1) editing command in the following replaces the expanded
-# RCS keyword `$Date ...' in the `.TH' macro line with something more 
-# appropriate to a manual page.
-#
-$(MANDIR)/$(MANUAL):	$(MANDIR) $(MANUAL)
-	sed \
-	 -e '/^\.TH/s/$$D\ate: \([0-9]*\)\/\([0-9]*\)\/\([0-9]*\).*\$$/\1-\2-\3/'\
-	 $(MANUAL) | $(TBL) | $(NEQN) > $@
-	chmod u=rw,og=r $@
+mostlyclean: mostlyclean-am
 
-dummy_mandir $(MANDIR):
-	mkdir -p $@
-	chmod u+rwx,g+rws,o=rx $@
+mostlyclean-am: mostlyclean-compile mostlyclean-generic
 
-# ###########################################################################
-# TeX-Info Pages:
-# ###########################################################################
-INFODIR       = $(prefix)/info
+pdf: pdf-am
 
-installed_infos:      FORCE
-	if [ -z "$(MAKEINFO)" ]; then \
-		echo 1>&2 "Can't install info(1) pages because no makeinfo(1)"; \
-	else \
-	  if [ -n "$(INFOS)" ]; then \
-	      infos="$(INFOS)"; \
-	      for info in $$infos; do \
-		$(MAKE) $(MFLAGS) $(LOCAL_MACROS) INFODIR=$(INFODIR) INFO=$$info \
-		installed_info || exit 1; \
-	      done; \
-	   else \
-	      :; \
-	   fi; \
-	fi;
-# The following target decouples the previous targets from the actual rule;
-# thus, eliminating extraneous make(1) messages.
-#
-installed_info:       $(INFODIR)/$(INFO)
+pdf-am:
 
-$(INFODIR)/$(INFO):   $(INFODIR) $(INFO)
-	-mkdir -p $(INFODIR)
-	-chmod u+rwx,g+rws,o=rx $(INFODIR)
-	$(INSTALL_DATA) $(INFO) $@
+ps: ps-am
 
-# Rules for generating info pages:
-#
-.SUFFIXES:    .info .texi .texinfo .txn
-.texi.info:
-	@if [ -z "$(MAKEINFO)" ]; then \
-	  echo 1>&2 "Can't create $@ because no makeinfo(1)"; \
-	else \
-	  $(MAKEINFO) $< --no-split --output=$@; \
-	fi
-.texinfo.info:
-	@if [ -z "$(MAKEINFO)" ]; then \
-	  echo 1>&2 "Can't create $@ because no makeinfo(1)"; \
-	else \
-	  $(MAKEINFO) $< --no-split --output=$@; \
-	fi
-.txn.info:
-	@if [ -z "$(MAKEINFO)" ]; then \
-	  echo 1>&2 "Can't create $@ because no makeinfo(1)"; \
-	else \
-	  $(MAKEINFO) $< --no-split --output=$@; \
-	fi
+ps-am:
 
-# Ensure that info page depends on canonical TeX-Info macros.
-#
-dummy_info $(INFO):   texinfo.tex
+uninstall-am: uninstall-binPROGRAMS uninstall-info-am uninstall-man
 
-# ###########################################################################
-# Cleanup:
-# ###########################################################################
-clean::
-	rm -f $(GARBAGE) $(PROGRAM) a.out core *.o *.a *.so.* *.sa.* *.so \
-	    *.log
+uninstall-man: uninstall-man1
 
-realclean::	distclean
-distclean::
-	rm -f $(GARBAGE) $(PROGRAM) a.out core *.o *.a *.so.* *.sa.* *.so \
-	    *.log Makefile config.status cc_id tags
+.PHONY: CTAGS GTAGS all all-am check check-am clean clean-binPROGRAMS \
+	clean-generic ctags distclean distclean-compile \
+	distclean-generic distclean-tags distdir dvi dvi-am info \
+	info-am install install-am install-binPROGRAMS install-data \
+	install-data-am install-exec install-exec-am install-info \
+	install-info-am install-man install-man1 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 uninstall-info-am \
+	uninstall-man uninstall-man1
 
 
-# ###########################################################################
-# Configuration:
-# ###########################################################################
-
-# The following target is touched because config.status won't update it if
-# it hasn't changed.
-#
-# The following is commented-out because the HPUX make(1) goes into a loop.
-#
-#Makefile:	config.status
-#	./config.status
-#	touch $@
-
-config.status:	cc_id configure
-	./configure --no-create
-
-cc_id:		FORCE
-	if test -r $@ && test "`cat $@`" = "$(CC)"; then \
-	    :; \
-	else \
-	    echo "$(CC)" > $@; \
-	fi
-
-configure:		configure.in
-	autoconf
-
-
-# ###########################################################################
-# Dependency maintenance:
-# ###########################################################################
-.PRECIOUS:	depend
-#
-# Note: The following rule will only work if the C compiler behaves correctly
-# when given the `-M' option.  AIX's cc(1) and SunOS's acc(1) behave
-# incorrectly.  --Steve Emmerson 1992-09-24
-#
-# Furthermore, we do not attempt to maintain dependencies on installed
-# header files (e.g. those in $(INCDIR)) for two reasons: 1) the dependency
-# list generated at Unidata mightn't correspond to the situation at a client
-# site; and 2) clients using broken compilers (c.f. previous note) can't
-# regenerate the dependency list.
-#
-disabled_depend:		FORCE
-	-incdir=`echo $(INCDIR) | sed s',/,\\\/,g'`; \
-	cc -M $(CPPFLAGS) $(CPPFLAGS_NETCDF) *.c 2> /dev/null | \
-	    awk '{ \
-		if ($$0 ~ /:/) { \
-		    target	= $$1; \
-		    if (target ~ /:/) { \
-			target	= substr(target,1,length(target)-1); \
-			start	= 2; \
-		    } else { \
-			start	= 3; \
-		    } \
-		} else { \
-		    start	= 1; \
-		} \
-		for (i = start; i <= NF; ++i) { \
-		    if ($$i !~ /^\\/ && \
-			$$i !~ /port\// && \
-			$$i !~ /^\//) \
-			print target ": " $$i \
-		} \
-	    }' > $@
-	tag='### DO NOT DELETE THIS LINE.  make depend DEPENDS ON IT ###'; \
-	    sed -e "/^$$tag$$/r depend" \
-		-e "/^$$tag$$/q" Makefile > Makefile.new
-	mv Makefile.new Makefile
-
-
-# ###########################################################################
-# Distributions:
-# ###########################################################################
-#FTPDIR		= @FTPDIR@
-#VERSION		= @VERSION@
-
-ftp:		$(FTPDIR)/$(PACKAGE)-$(VERSION).tar.Z
-	test ! -h $(FTPDIR)/$(PACKAGE).tar.Z && exit 0; \
-	cd $(FTPDIR) || exit 1; \
-	rm $(PACKAGE).tar.Z || exit 1; \
-	ln -s $(PACKAGE)-$(VERSION).tar.Z $(PACKAGE).tar.Z;
-
-$(FTPDIR)/$(PACKAGE)-$(VERSION).tar.Z:	$(PACKAGE)-$(VERSION).tar.Z
-	cp $(PACKAGE)-$(VERSION).tar.Z $@ 
-	chmod u+rw,g+rw,o=r $@
-
-tar.Z:		$(PACKAGE)-$(VERSION).tar.Z
-
-$(PACKAGE)-$(VERSION).tar.Z:	MANIFEST
-	dir=`basename \`pwd\`` \
-	&& id=$(PACKAGE)-$(VERSION) \
-	&& cd .. \
-	&& ln -s $$dir $$id \
-	&& tar -chof - `sed "s|^|$$id/|" $$id/MANIFEST` \
-	    | compress > $$id/$@ \
-	&& rm $$id
-
-MANIFEST:	FORCE
-	@echo 1>&2 Creating MANIFEST
-	@$(MAKE) -s $(MFLAGS) $(LOCAL_MACROS) MANIFEST.echo > $@
-
-MANIFEST.echo:	FORCE
-	@$(MAKE) -s $(MFLAGS) $(LOCAL_MACROS) \
-	    MANIFEST=`echo $(MANIFEST) | sed 's/MANIFEST//'` \
-	    ensure_manifest > /dev/null
-	@echo $(MANIFEST) | fmt -1
-	@if [ -n "$(SUBDIRS)" ]; then \
-	    subdirs="$(SUBDIRS)"; \
-	    for subdir in $$subdirs; do \
-		(cd $$subdir && \
-	        echo 1>&2 Creating $@ in `pwd` && \
-		$(MAKE) $(MFLAGS) $(LOCAL_MACROS) MANIFEST.echo | \
-		    sed "s|^|$$subdir/|") || exit 1; \
-	    done; \
-	else \
-	    :; \
-	fi
-
-ensure_manifest:	$(MANIFEST)
-
-# for distribution creation
-distdir = $(TOP_SRCDIR)/$(PACKAGE)-$(VERSION)/$(curdir)
-curdir = mfhdf/ncdump
-dist: $(DISTFILES)
-	@for file in $(DISTFILES); do \
-	  ln $(srcdir)/$$file $(distdir)/$$file 2> /dev/null \
-	    || { echo copying $$file instead; \
-	    cp -p $(srcdir)/$$file $(distdir)/$$file;}; \
-	done
-
-# ###########################################################################
-# Miscellaneous:
-# ###########################################################################
-
-# The following dummy target is useful as a dependency to ensure that a
-# rule is always executed.
-#
-FORCE:
-
-
-# Override the default definition for ncgen(1) in the master makefile.
-#
-NCGEN		= ../ncgen/ncgen
-
-### Everything after the following line might be overwritten ###
-### DO NOT DELETE THIS LINE.  make depend DEPENDS ON IT ###
-include depend
+check: ncdump $(srcdir)/test0.cdl
+	../ncgen/ncgen -o test0.nc -n $(srcdir)/test0.cdl
+	./ncdump test0.nc > test1.cdl
+	../ncgen/ncgen -o test1.nc -n test1.cdl
+	./ncdump -n test0 test1.nc > test2.cdl
+	@cmp test1.cdl test2.cdl && echo "*** ncdump test successful ***" ;     \
+	    rm -f test1.nc test1.cdl test2.cdl
+# 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:

Deleted: packages/libhdf4/branches/upstream/current/mfhdf/ncdump/Makefile.in_orig
===================================================================
--- packages/libhdf4/branches/upstream/current/mfhdf/ncdump/Makefile.in_orig	2007-05-15 09:05:29 UTC (rev 830)
+++ packages/libhdf4/branches/upstream/current/mfhdf/ncdump/Makefile.in_orig	2007-05-15 09:53:05 UTC (rev 831)
@@ -1,49 +0,0 @@
-# Makefile for ncdump(1).
-#
-# $Id: Makefile.in_orig,v 1.2 2000/08/30 18:46:36 wendling Exp $
-
-PROGRAM		= ncdump
-BINFILES	= $(PROGRAM)
-HDF_LIB         = @HDF_LIB@
-JPEG_LIB        = @JPEG_LIB@
-HDF_INC         = @HDF_INC@
-CPP_NETCDF	= -I../libsrc -I../port $(HDF_INC)
-CPPFLAGS	= $(CPP_NETCDF) @CPPFLAGS@
-CFLAGS		= @CFLAGS@
-FFLAGS		= @FFLAGS@
-MANIFEST	= Makefile.in ncdump.c ncdump.h  depend msoft.mk \
-		  test0.cdl vardata.c vardata.h dumplib.c dumplib.h ncdump.1 \
-                  make.com msofttab.c
-MANUALS		= ncdump.1
-LIBNAME		= netcdf
-LD_NETCDF	= ../libsrc/libnetcdf.a
-OBJS		=  ncdump.o vardata.o dumplib.o
-LD_XDR		= @LD_XDR@
-LD_NETCDF	= -L../libsrc -lnetcdf
-LIBS		= $(LD_NETCDF) $(LD_XDR) $(HDF_LIB) $(JPEG_LIB) $(LIBSX)
-prefix		= ../../..
-GARBAGE		= $(PROGRAM) test0.nc test1.nc test1.cdl test2.cdl
-
-all::		$(PROGRAM)
-
-
-test:		$(PROGRAM) test0.cdl
-	$(NCGEN) -o test0.nc -n test0.cdl
-	./$(PROGRAM) test0.nc > test1.cdl
-	$(NCGEN) -o test1.nc -n test1.cdl
-	./$(PROGRAM) -n test0 test1.nc > test2.cdl
-	@cmp test1.cdl test2.cdl && \
-	    echo "*** $(PROGRAM) test successful ***" ; \
-	    rm test1.cdl test1.nc test2.cdl
-
-install::	installed_program installed_manuals
-
-include ../port/master.mk
-
-# Override the default definition for ncgen(1) in the master makefile.
-#
-NCGEN		= ../ncgen/ncgen
-
-### Everything after the following line might be overwritten ###
-### DO NOT DELETE THIS LINE.  make depend DEPENDS ON IT ###
-include depend

Modified: packages/libhdf4/branches/upstream/current/mfhdf/ncdump/ncdump.c
===================================================================
--- packages/libhdf4/branches/upstream/current/mfhdf/ncdump/ncdump.c	2007-05-15 09:05:29 UTC (rev 830)
+++ packages/libhdf4/branches/upstream/current/mfhdf/ncdump/ncdump.c	2007-05-15 09:53:05 UTC (rev 831)
@@ -1,7 +1,7 @@
 /*********************************************************************
  *   Copyright 1993, University Corporation for Atmospheric Research
  *   See netcdf/README file for copying and redistribution conditions.
- *   $Id: ncdump.c,v 1.15 2000/06/16 19:01:12 koziol Exp $
+ *   $Id: ncdump.c,v 1.16 2003/12/10 21:15:23 epourmal Exp $
  *********************************************************************/
 
 #include <stdio.h>
@@ -18,6 +18,8 @@
 static const char * type_name(nc_type type);
 
 char *progname;
+struct ncdim dims[MAX_NC_DIMS]; /* dimensions */
+long vdims[MAX_NC_DIMS];	/* dimension sizes for a single variable */
 
 static void
 usage()
@@ -248,7 +250,9 @@
  */
 char *fixstr(char *str)
 {
+#ifndef __GNUC__ 
     char *strdup(const char *);
+#endif  /* linux */
 	char *new_str, *ptr;
 
 	if (!str)
@@ -269,9 +273,10 @@
 }
 
 static void
-do_ncdump(path, specp)
-     char *path;
+do_ncdump(char *path, struct fspec* specp)
+/*     char *path;
      struct fspec* specp;
+*/
 {
 	int ndims;			/* number of dimensions */
 	int nvars;			/* number of variables */
@@ -279,8 +284,6 @@
 	int xdimid;			/* id of unlimited dimension */
 	int dimid;			/* dimension id */
 	int varid;			/* variable id */
-	struct ncdim dims[MAX_NC_DIMS]; /* dimensions */
-	long vdims[MAX_NC_DIMS];	/* dimension sizes for a single variable */
 	struct ncvar var;		/* variable */
 	struct ncatt att;		/* attribute */
 	int id;				/* dimension number per variable */

Added: packages/libhdf4/branches/upstream/current/mfhdf/ncgen/Makefile.am
===================================================================
--- packages/libhdf4/branches/upstream/current/mfhdf/ncgen/Makefile.am	                        (rev 0)
+++ packages/libhdf4/branches/upstream/current/mfhdf/ncgen/Makefile.am	2007-05-15 09:53:05 UTC (rev 831)
@@ -0,0 +1,124 @@
+#############################################################################
+##                      Setup for building programs                        ##
+#############################################################################
+
+## Setup the different includes and preprocessor #defines we need.
+INCLUDES=-I$(top_srcdir)/hdf/src        \
+         -I$(top_srcdir)/mfhdf/libsrc   \
+         -I$(top_srcdir)/mfhdf/port     \
+         -I../libsrc
+DEFINES=-DNDEBUG -DHDF
+AM_CPPFLAGS=$(INCLUDES) $(DEFINES)
+
+#############################################################################
+##                          Programs to build                              ##
+#############################################################################
+
+bin_PROGRAMS = ncgen
+
+if HDF_BUILD_FORTRAN
+noinst_PROGRAMS = ctest0 ftest0
+else 
+noinst_PROGRAMS = ctest0
+endif
+
+## Information for building the "ncgen" program
+ncgen_SOURCES = close.c escapes.c generate.c genlib.c getfill.c init.c      \
+                load.c main.c ncgentab.c
+ncgen_LDADD = ../libsrc/libmfhdf.a $(top_builddir)/hdf/src/libdf.a
+ncgen_DEPENDENCIES = $(top_builddir)/hdf/src/libdf.a ../libsrc/libmfhdf.a
+
+## Recipe for building the ncgentab.c file
+ncgentab.c ncgentab.h: ncgen.h ncgen.y ncgenyy.c
+	$(YACC) -d $(srcdir)/ncgen.y
+	mv y.tab.c ncgentab.c
+	mv y.tab.h ncgentab.h
+
+ncgenyy.c: ncgen.l
+	$(LEX) $(srcdir)/ncgen.l
+	mv lex.yy.c ncgenyy.c
+
+#############################################################################
+##                            Documentation                                ##
+#############################################################################
+
+man1_MANS = ncgen.1
+
+#############################################################################
+##                   Testing -- Here there be dragons.                     ##
+#############################################################################
+
+NCDUMP=../ncdump/ncdump
+
+if HDF_BUILD_FORTRAN
+check: ncgen $(srcdir)/test0.cdl b-check c-check f-check
+else
+check: ncgen $(srcdir)/test0.cdl b-check c-check
+endif
+
+## Test the "-b" option of ncgen
+b-check:	ncgen $(srcdir)/test0.cdl test1.cdl
+	./ncgen -b test1.cdl
+	$(NCDUMP) test1.nc > test2.cdl
+	@if $(DIFF) test1.cdl test2.cdl; then                               \
+	  echo "*** ncgen -b test successful ***";                          \
+	else                                                                \
+	  echo "*** ncgen -b test failed ***";                              \
+	fi
+
+## Test the "-c" option of ncgen
+c-check:	test2.cdl ctest0
+	./ctest0        # tests `-c' option, creates ctest0.nc
+	$(NCDUMP) -n test1 ctest0.nc > ctest1.cdl
+	@if $(DIFF) test1.cdl ctest1.cdl; then                              \
+	  echo "*** ncgen -c test successful ***";                          \
+	else                                                                \
+	  echo "*** ncgen -c test failed  ***";                             \
+	fi
+
+if HDF_BUILD_FORTRAN
+## Test the "-f" option of ncgen
+f-check:	test1.cdl ftest0
+	./ftest0
+	$(NCDUMP) -n test1 ftest0.nc > ftest1.cdl
+	@if $(DIFF) test1.cdl ftest1.cdl; then                              \
+	  echo "*** ncgen -f test successful ***";                          \
+	else                                                                \
+	  echo "*** ncgen -f test failed (but roundoff differences are OK) ***"; \
+	fi
+
+ftest0:		ncgen test0.cdl netcdf.inc
+	./ncgen -f -o ftest0.nc $(srcdir)/test0.cdl > test0.f
+	$(F77) $(FFLAGS) -o $@ test0.f $(LDFLAGS) $(ncgen_LDADD) $(LIBS)
+endif
+
+netcdf.inc:
+	ln -s ../fortran/$@ .
+
+test1.cdl:	test0.nc
+	$(NCDUMP) -n test1 test0.nc > $@
+
+test0.nc:	ncgen $(srcdir)/test0.cdl
+	./ncgen -b -o test0.nc $(srcdir)/test0.cdl
+
+ctest0:		ncgen $(srcdir)/test0.cdl
+	./ncgen -c -o ctest0.nc $(srcdir)/test0.cdl > test0.c
+	$(COMPILE) -o $@ test0.c $(LDFLAGS) $(ncgen_LDADD) $(LIBS)
+
+#############################################################################
+##                            Miscellaneous                                ##
+#############################################################################
+
+## This was in the original Makefile.
+vms-stuff:	ncgentab.h ncgentab.c ncgenyy.c
+	cp $(srcdir)/ncgentab.h vmstab.h
+	cp $(srcdir)/ncgentab.c vmstab.c
+	cp $(srcdir)/ncgenyy.c vms_yy.c
+
+#############################################################################
+##                          And the cleanup                                ##
+#############################################################################
+
+DISTCLEANFILES = ctest0 ctest0.nc ctest1.cdl ftest0 ftest0.nc ftest1.cdl    \
+                 ncgentab.c ncgentab.h ncgenyy.c netcdf.inc test0.c test0.f \
+                 test0.nc test1.cdl test1.nc test2.cdl

Modified: packages/libhdf4/branches/upstream/current/mfhdf/ncgen/Makefile.in
===================================================================
--- packages/libhdf4/branches/upstream/current/mfhdf/ncgen/Makefile.in	2007-05-15 09:05:29 UTC (rev 830)
+++ packages/libhdf4/branches/upstream/current/mfhdf/ncgen/Makefile.in	2007-05-15 09:53:05 UTC (rev 831)
@@ -1,808 +1,610 @@
-# Makefile for ncgen(1).
-#
-# $Id: Makefile.in,v 1.22 2000/08/30 18:43:30 wendling Exp $
-# NOTE: This Makefile.in is used by the Cygnus 'configure' script to
-#       generate the top level Makefile.
+# Makefile.in generated by automake 1.7.7 from Makefile.am.
+# @configure_input@
 
-# ############# Start of system configuration section. #############
+# Copyright 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003
+# 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.
 
-# 'srcdir' Gets set to directory this Makefile is found in
-srcdir = .
-TOP_SRCDIR = ../..
+# 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.
 
-prefix = $(TOP_SRCDIR)/NewHDF
+ at SET_MAKE@
 
-exec_prefix = $(prefix)
-tooldir = $(exec_prefix)/$(target)
+#############################################################################
+#############################################################################
 
-program_transform_name =
+srcdir = @srcdir@
+top_srcdir = @top_srcdir@
+VPATH = @srcdir@
+pkgdatadir = $(datadir)/@PACKAGE@
+pkglibdir = $(libdir)/@PACKAGE@
+pkgincludedir = $(includedir)/@PACKAGE@
+top_builddir = ../..
 
-datadir = $(prefix)/lib
-mandir = $(prefix)/man
-man1dir = $(mandir)/man1
-man2dir = $(mandir)/man2
-man3dir = $(mandir)/man3
-man4dir = $(mandir)/man4
-man5dir = $(mandir)/man5
-man6dir = $(mandir)/man6
-man7dir = $(mandir)/man7
-man8dir = $(mandir)/man8
-man9dir = $(mandir)/man9
-docdir = $(datadir)/doc
+am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
+INSTALL = @INSTALL@
+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 = :
+host_triplet = @host@
+ACLOCAL = @ACLOCAL@
+AMDEP_FALSE = @AMDEP_FALSE@
+AMDEP_TRUE = @AMDEP_TRUE@
+AMTAR = @AMTAR@
+AR = @AR@
+AUTOCONF = @AUTOCONF@
+AUTOHEADER = @AUTOHEADER@
+AUTOMAKE = @AUTOMAKE@
+AWK = @AWK@
+CC = @CC@
+CCDEPMODE = @CCDEPMODE@
+CFLAGS = @CFLAGS@
+CPP = @CPP@
+CPPFLAGS = @CPPFLAGS@
+CXX = @CXX@
+CXXCPP = @CXXCPP@
+CXXDEPMODE = @CXXDEPMODE@
+CXXFLAGS = @CXXFLAGS@
+CYGPATH_W = @CYGPATH_W@
+DEFS = @DEFS@
+DEPDIR = @DEPDIR@
+DIFF = @DIFF@
+ECHO_C = @ECHO_C@
+ECHO_N = @ECHO_N@
+ECHO_T = @ECHO_T@
+EGREP = @EGREP@
+EXEEXT = @EXEEXT@
+F77 = @F77@
+FFLAGS = @FFLAGS@
+HDF_BUILD_FORTRAN_FALSE = @HDF_BUILD_FORTRAN_FALSE@
+HDF_BUILD_FORTRAN_TRUE = @HDF_BUILD_FORTRAN_TRUE@
+HDF_BUILD_XDR_FALSE = @HDF_BUILD_XDR_FALSE@
+HDF_BUILD_XDR_TRUE = @HDF_BUILD_XDR_TRUE@
+INSTALL_DATA = @INSTALL_DATA@
+INSTALL_PROGRAM = @INSTALL_PROGRAM@
+INSTALL_SCRIPT = @INSTALL_SCRIPT@
+INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
+LDFLAGS = @LDFLAGS@
+LEX = @LEX@
+LEXLIB = @LEXLIB@
+LEX_OUTPUT_ROOT = @LEX_OUTPUT_ROOT@
+LIBOBJS = @LIBOBJS@
+LIBS = @LIBS@
+LN_S = @LN_S@
+LTLIBOBJS = @LTLIBOBJS@
+MAINT = @MAINT@
+MAINTAINER_MODE_FALSE = @MAINTAINER_MODE_FALSE@
+MAINTAINER_MODE_TRUE = @MAINTAINER_MODE_TRUE@
+MAKEINFO = @MAKEINFO@
+NEQN = @NEQN@
+OBJEXT = @OBJEXT@
+PACKAGE = @PACKAGE@
+PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
+PACKAGE_NAME = @PACKAGE_NAME@
+PACKAGE_STRING = @PACKAGE_STRING@
+PACKAGE_TARNAME = @PACKAGE_TARNAME@
+PACKAGE_VERSION = @PACKAGE_VERSION@
+PATH_SEPARATOR = @PATH_SEPARATOR@
+RANLIB = @RANLIB@
+SET_MAKE = @SET_MAKE@
+SHELL = @SHELL@
+STRIP = @STRIP@
+TBL = @TBL@
+VERSION = @VERSION@
+YACC = @YACC@
+ac_ct_CC = @ac_ct_CC@
+ac_ct_CXX = @ac_ct_CXX@
+ac_ct_F77 = @ac_ct_F77@
+ac_ct_RANLIB = @ac_ct_RANLIB@
+ac_ct_STRIP = @ac_ct_STRIP@
+am__fastdepCC_FALSE = @am__fastdepCC_FALSE@
+am__fastdepCC_TRUE = @am__fastdepCC_TRUE@
+am__fastdepCXX_FALSE = @am__fastdepCXX_FALSE@
+am__fastdepCXX_TRUE = @am__fastdepCXX_TRUE@
+am__include = @am__include@
+am__leading_dot = @am__leading_dot@
+am__quote = @am__quote@
+bindir = @bindir@
+build = @build@
+build_alias = @build_alias@
+build_cpu = @build_cpu@
+build_os = @build_os@
+build_vendor = @build_vendor@
+datadir = @datadir@
+exec_prefix = @exec_prefix@
+host = @host@
+host_alias = @host_alias@
+host_cpu = @host_cpu@
+host_os = @host_os@
+host_vendor = @host_vendor@
+includedir = @includedir@
+infodir = @infodir@
+install_sh = @install_sh@
+libdir = @libdir@
+libexecdir = @libexecdir@
+localstatedir = @localstatedir@
+mandir = @mandir@
+oldincludedir = @oldincludedir@
+prefix = @prefix@
+program_transform_name = @program_transform_name@
+sbindir = @sbindir@
+sharedstatedir = @sharedstatedir@
+sysconfdir = @sysconfdir@
+target_alias = @target_alias@
 
-SHELL = /bin/sh
+INCLUDES = -I$(top_srcdir)/hdf/src        \
+         -I$(top_srcdir)/mfhdf/libsrc   \
+         -I$(top_srcdir)/mfhdf/port     \
+         -I../libsrc
 
-INSTALL = ${TOP_SRCDIR}/install-sh -c
-INSTALL_PROGRAM = $(INSTALL)
-INSTALL_DATA = $(INSTALL) -m 644
+DEFINES = -DNDEBUG -DHDF
+AM_CPPFLAGS = $(INCLUDES) $(DEFINES)
 
-# /usr/local/bin/m4 (GNU version?)
-M4   = /usr/local/bin/m4
-# /usr/local/bin/perl (GNU version?)
-PERL = /usr/local/bin/perl
 
-# Name of achive randomizer, usually ranlib (use 'touch' if non-existant)
-RANLIB = ranlib
+#############################################################################
+#############################################################################
+bin_PROGRAMS = ncgen
 
-# Name of library archiver and flags to send, default 'AR=ar', 'ARFLAGS=r'
-AR = ar
-ARFLAGS = rc
+ at HDF_BUILD_FORTRAN_TRUE@noinst_PROGRAMS = ctest0 ftest0
+ at HDF_BUILD_FORTRAN_FALSE@noinst_PROGRAMS = ctest0
 
-# Name of remove utility, default 'RM=/bin/rm', 'RMFLAGS=-f'
-RM = /bin/rm
-RMFLAGS = -f
+ncgen_SOURCES = close.c escapes.c generate.c genlib.c getfill.c init.c      \
+                load.c main.c ncgentab.c
 
-AS = as
-CC = gcc
-CFLAGS = -ansi
-FC = f77
-FFLAGS=
+ncgen_LDADD = ../libsrc/libmfhdf.a $(top_builddir)/hdf/src/libdf.a
+ncgen_DEPENDENCIES = $(top_builddir)/hdf/src/libdf.a ../libsrc/libmfhdf.a
 
-# Set for document generation
-MAKEINFO = makeinfo
-TEXI2DVI = texi2dvi
 
-# Directory in which to install binaries
-bindir = $(exec_prefix)/bin
+#############################################################################
+#############################################################################
+man1_MANS = ncgen.1
 
-# Directory in which to install header files.
-includedir = $(prefex)/include
 
-# Directory in which to install library files.
-libdir = $(prefix)/lib
+#############################################################################
+#############################################################################
+NCDUMP = ../ncdump/ncdump
 
-# Directory in which to install documentation info files.
-infodir = $(prefix)/info
 
-# ------------ General Macros for NETCDF --------------------
-INCDIR	 = $(prefix)/include
-HDF_LIB  = $(TOP_SRCDIR)/hdf/src/libdf.a
-HDF_INC  = $(TOP_SRCDIR)/hdf/src/
-PABLO_HINC = $(TOP_SRCDIR)/hdf/pablo
-FMPOOL_INC = $(TOP_SRCDIR)/hdf/fmpool
-JPEG_LIB = $(TOP_SRCDIR)/hdf/jpeg/libjpeg.a
-ZLIB_LIB = $(TOP_SRCDIR)/hdf/zlib/libz.a
-NETCDF_INC = $(TOP_SRCDIR)/mfhdf/libsrc
-PORT_INC   = $(TOP_SRCDIR)/mfhdf/port
-CPP	   = $(CC) -E
-CFLAGS_NETCDF = 
-CPPFLAGS_HDF  = -DNDEBUG -DHDF $(FMPOOL_FLAGS)
-CPP_NETCDF    = -I. -I$(HDF_INC) -I$(NETCDF_INC) -I$(PORT_INC)
-CPPFLAGS_LIB	= $(SWAP) $(NETLONG) 
-CPPFLAGS_XDR	= $(CPP_XDR) 
-CPPFLAGS_NETCDF =  $(CPPFLAGS_XDR) $(CPP_NETCDF) $(CPPFLAGS_LIB) $(CPPFLAGS_HDF) 
-FFLAGS  =
-NCDUMP	= 
-NCGEN	= 
-NEQN	= neqn
-OS	= 
-TBL	= tbl
-WHICH	= which
-FTPDIR	= 
-VERSION	= 2.3.2
-LEX	= lex
-YACC	= yacc
-DIFF    = diff
-DIFF_FLAGS = -w
+#############################################################################
+#############################################################################
+DISTCLEANFILES = ctest0 ctest0.nc ctest1.cdl ftest0 ftest0.nc ftest1.cdl    \
+                 ncgentab.c ncgentab.h ncgenyy.c netcdf.inc test0.c test0.f \
+                 test0.nc test1.cdl test1.nc test2.cdl
 
+subdir = mfhdf/ncgen
+ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
+mkinstalldirs = $(SHELL) $(top_srcdir)/bin/mkinstalldirs
+CONFIG_HEADER = $(top_builddir)/hdf/src/h4config.h
+CONFIG_CLEAN_FILES =
+bin_PROGRAMS = ncgen$(EXEEXT)
+ at HDF_BUILD_FORTRAN_TRUE@noinst_PROGRAMS = ctest0$(EXEEXT) \
+ at HDF_BUILD_FORTRAN_TRUE@	ftest0$(EXEEXT)
+ at HDF_BUILD_FORTRAN_FALSE@noinst_PROGRAMS = ctest0$(EXEEXT)
+PROGRAMS = $(bin_PROGRAMS) $(noinst_PROGRAMS)
 
-#### ----- host and target specific makefile fragments come in here.-------
-### ------------------- end of makefile fragments -------------------------
-# ############# End of system configuration section. ###############
+ctest0_SOURCES = ctest0.c
+ctest0_OBJECTS = ctest0.$(OBJEXT)
+ctest0_LDADD = $(LDADD)
+ctest0_DEPENDENCIES =
+ctest0_LDFLAGS =
+ftest0_SOURCES = ftest0.c
+ftest0_OBJECTS = ftest0.$(OBJEXT)
+ftest0_LDADD = $(LDADD)
+ftest0_DEPENDENCIES =
+ftest0_LDFLAGS =
+am_ncgen_OBJECTS = close.$(OBJEXT) escapes.$(OBJEXT) generate.$(OBJEXT) \
+	genlib.$(OBJEXT) getfill.$(OBJEXT) init.$(OBJEXT) \
+	load.$(OBJEXT) main.$(OBJEXT) ncgentab.$(OBJEXT)
+ncgen_OBJECTS = $(am_ncgen_OBJECTS)
+ncgen_LDFLAGS =
 
-PROGRAM		= ncgen
-BINFILES	= $(PROGRAM)
-#CPP_NETCDF	= -I../libsrc
-#CPPFLAGS	= $(CPPFLAGS_NCG)
-#CFLAGS		= $(CFLAGS_NCG)
-#FFLAGS		= @FFLAGS@
-MANUALS		= ncgen.1
-GARBAGE		= $(PROGRAM) \
-		  ncgenyy.c ncgentab.c ncgentab.h \
-		  test0.nc test1.nc test1.cdl test2.cdl test0.f ctest0 \
-		  ftest0 ftest0.nc ftest1.cdl test0.c ctest0.nc ctest1.cdl
-vms_stuff	= vmstab.c vmstab.h vms_yy.c
-MANIFEST = $(DISTFILES)
-DISTFILES	= Makefile.in depend README \
-		  close.c descrip.mms escapes.c generate.c generic.h \
-		  genlib.c genlib.h getfill.c init.c lexyacc.com load.c \
-		  main.c make.com msoft.mk msofttab.c msofttab.h \
-		  msoftyy.c ncgen.1 ncgen.h ncgen.l ncgen.opt ncgen.y \
-		  test.com test0.cdl \
-		  $(vms_stuff)
-LIBNAME		= mfhdf
-LD_NETCDF	= ../libsrc/libmfhdf.a $(HDF_LIB) $(JPEG_LIB) $(ZLIB_LIB)
-OBJS		= main.o generate.o load.o ncgentab.o escapes.o \
-		  getfill.o init.o close.o genlib.o
-#LD_XDR		= @LD_XDR@
-LIBS		= $(LD_NETCDF) $(LD_XDR) $(LIBSX)
-#LEX		= @LEX@
-#YACC		= @YACC@
-prefix		= ../../..
+DEFAULT_INCLUDES =  -I. -I$(srcdir) -I$(top_builddir)/hdf/src
+depcomp = $(SHELL) $(top_srcdir)/bin/depcomp
+am__depfiles_maybe = depfiles
+ at AMDEP_TRUE@DEP_FILES = ./$(DEPDIR)/close.Po ./$(DEPDIR)/ctest0.Po \
+ at AMDEP_TRUE@	./$(DEPDIR)/escapes.Po ./$(DEPDIR)/ftest0.Po \
+ at AMDEP_TRUE@	./$(DEPDIR)/generate.Po ./$(DEPDIR)/genlib.Po \
+ at AMDEP_TRUE@	./$(DEPDIR)/getfill.Po ./$(DEPDIR)/init.Po \
+ at AMDEP_TRUE@	./$(DEPDIR)/load.Po ./$(DEPDIR)/main.Po \
+ at AMDEP_TRUE@	./$(DEPDIR)/ncgentab.Po
+COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \
+	$(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
+CCLD = $(CC)
+LINK = $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@
+DIST_SOURCES = ctest0.c ftest0.c $(ncgen_SOURCES)
 
-all::		$(PROGRAM)
+NROFF = nroff
+MANS = $(man1_MANS)
+DIST_COMMON = README $(srcdir)/Makefile.in Makefile.am
+SOURCES = ctest0.c ftest0.c $(ncgen_SOURCES)
 
-test:           $(PROGRAM) test0.cdl btest ctest ftest FORCE
+all: all-am
 
-install::	installed_program installed_manuals
-install-utils::	installed_program
-install-man::	installed_manuals
-
-$(PROGRAM):	main.o
-
-ncgentab.c \
-ncgentab.h:	ncgen.y ncgenyy.c ncgen.h
-	$(YACC) -d ncgen.y
-	mv y.tab.c ncgentab.c
-	mv y.tab.h ncgentab.h
-
-ncgenyy.c:	ncgen.l
-	$(LEX) ncgen.l
-	mv lex.yy.c ncgenyy.c
-
-# The SunOS 4.1.3 yacc(1) doesn't generate correct code.
-#
-vms-stuff:	ncgentab.h ncgentab.c ncgenyy.c
-	cp ncgentab.h vmstab.h
-	cp ncgentab.c vmstab.c
-	cp ncgenyy.c vms_yy.c
-
-#
-# test "-b" option of ncgen
-#
-btest:		$(PROGRAM) test0.cdl test1.cdl
-	./$(PROGRAM) -b test1.cdl
-	$(NCDUMP) test1.nc > test2.cdl
-	@$(DIFF) $(DIFF_FLAGS) test1.cdl test2.cdl && \
-	    echo "*** $(PROGRAM) -b test successful ***"
-
-#
-# test "-c" option of ncgen
-#
-ctest:		test1.cdl ctest0
-	./ctest0		# tests `-c' option, creates ctest0.nc
-	$(NCDUMP) -n test1 ctest0.nc > ctest1.cdl
-	@$(DIFF) $(DIFF_FLAGS) test1.cdl ctest1.cdl && \
-	    echo "*** $(PROGRAM) -c test successful ***"
-
-ctest0:		ncgen test0.cdl
-	./$(PROGRAM) -c -o ctest0.nc test0.cdl > test0.c
-	$(CC) $(CPPFLAGS) $(CPPFLAGS_NETCDF) $(CFLAGS) $(CFLAGS_NETCDF) -o $@ test0.c $(LIBS)
-
-#
-# test "-f" option of ncgen
-#
-ftest:		test1.cdl
-	@case "$(FC)" in \
-	NONE*) \
-	    echo 1>&2 "\`$@' not made because no FORTRAN compiler";; \
-	*) \
-	    $(MAKE) $(MFLAGS) ftest0; \
-	    ./ftest0 ; \
-	    $(NCDUMP) -n test1 ftest0.nc > ftest1.cdl; \
-	    if $(DIFF) $(DIFF_FLAGS) test1.cdl ftest1.cdl; then \
-		echo "*** ncgen -f test successful ***"; \
-	    else \
-		echo "*** ncgen -f test failed " \
-		    "(but roundoff differences are OK) ***"; \
-	    fi;; \
-	esac
-
-ftest0:		$(PROGRAM) test0.cdl
-	@case "$(FC)" in \
-	NONE*) \
-	    echo 1>&2 "\`$@' not made because no FORTRAN compiler";; \
-	*) \
-	    $(MAKE) $(MFLAGS) netcdf.inc; \
-	    ./$(PROGRAM) -f -o ftest0.nc test0.cdl > test0.f; \
-	    $(FC) $(FFLAGS) -o $@ test0.f $(LIBS);; \
-	esac
-
-test1.cdl:	test0.nc
-	$(NCDUMP) -n test1 test0.nc > $@
-
-test0.nc:	$(PROGRAM) test0.cdl
-	./$(PROGRAM) -b -o test0.nc test0.cdl
-
-netcdf.inc:
-	@case "$(FC)" in \
-	NONE*) \
-	    echo 1>&2 "\`$@' not made because no FORTRAN compiler";; \
-	*) \
-	    ln -s ../fortran/$@ .;; \
-	esac
-
-# This is the master.mk.in makefile.  It contains general rules.
-#
-
 .SUFFIXES:
-.SUFFIXES:	.so .o .i .c .fc .f .F .l .y
+.SUFFIXES: .c .o .obj
+$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ Makefile.am  $(top_srcdir)/configure.ac $(ACLOCAL_M4)
+	cd $(top_srcdir) && \
+	  $(AUTOMAKE) --foreign  mfhdf/ncgen/Makefile
+Makefile: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.in  $(top_builddir)/config.status
+	cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)
+binPROGRAMS_INSTALL = $(INSTALL_PROGRAM)
+install-binPROGRAMS: $(bin_PROGRAMS)
+	@$(NORMAL_INSTALL)
+	$(mkinstalldirs) $(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
 
-# ###########################################################################
-# General Macros: (moved to make file fragment )
-# ###########################################################################
-#CPP		= @CPP@
-#NCDUMP		= @NCDUMP@
-#NCGEN		= @NCGEN@
-#NEQN		= @NEQN@
-#OS		= @OS@
-#TBL		= @TBL@
-#WHICH		= @WHICH@
+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
 
-# ###########################################################################
-# Recursive Macros (command-line changes to others aren't supported):
-# ###########################################################################
-SUBDIR_MACROS = CC="$(CC)" \
-	CFLAGS="$(CFLAGS)" \
-	CPP="$(CPP)" \
-	exec_prefix="$(exec_prefix)" \
-	FC="$(FC)" \
-	prefix="$(prefix)"
+clean-binPROGRAMS:
+	-test -z "$(bin_PROGRAMS)" || rm -f $(bin_PROGRAMS)
 
-LOCAL_MACROS  = CC="$(CC)" \
-	CFLAGS="$(CFLAGS)" \
-	CPP="$(CPP)" \
-	CPPFLAGS="$(CPPFLAGS)" \
-	exec_prefix="$(exec_prefix)" \
-	FC="$(FC)" \
-	prefix="$(prefix)"
+clean-noinstPROGRAMS:
+	-test -z "$(noinst_PROGRAMS)" || rm -f $(noinst_PROGRAMS)
+ at HDF_BUILD_FORTRAN_FALSE@ftest0$(EXEEXT): $(ftest0_OBJECTS) $(ftest0_DEPENDENCIES) 
+ at HDF_BUILD_FORTRAN_FALSE@	@rm -f ftest0$(EXEEXT)
+ at HDF_BUILD_FORTRAN_FALSE@	$(LINK) $(ftest0_LDFLAGS) $(ftest0_OBJECTS) $(ftest0_LDADD) $(LIBS)
+ncgen$(EXEEXT): $(ncgen_OBJECTS) $(ncgen_DEPENDENCIES) 
+	@rm -f ncgen$(EXEEXT)
+	$(LINK) $(ncgen_LDFLAGS) $(ncgen_OBJECTS) $(ncgen_LDADD) $(LIBS)
 
-# ###########################################################################
-# Recursive make(1)s in Subdirectories:
-# ###########################################################################
+mostlyclean-compile:
+	-rm -f *.$(OBJEXT) core *.core
 
-subdir_dummy_target $(SUBDIR_TARGETS):
-	@echo ""
-	@dir=`echo $@ | sed 's,/.*,,'`; \
-	    target=`echo $@ | sed "s,$$dir/,,"`; \
-	    cd $$dir && \
-	    echo "making \`$$target' in directory `pwd`" && \
-	    echo "" && \
-	    $(MAKE) $(MFLAGS) $(SUBDIR_MACROS) \
-		$$target || exit 1
-	@echo ""
-	@echo "returning to directory `pwd`"
-	@echo ""
+distclean-compile:
+	-rm -f *.tab.c
 
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/close.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/ctest0.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/escapes.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/ftest0.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/generate.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/genlib.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/getfill.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/init.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/load.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/main.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/ncgentab.Po at am__quote@
 
-# ###########################################################################
-# Compilation:
-# ###########################################################################
-#FORTC		= @FORTC@
-
-# Compile FORTRAN code.
-#
-.f.o:
-	$(FC) -c $(FFLAGS) $<
-.F.o:
-	ln -s $< $$$$.c \
-	&& $(CPP) -DUD_FORTRAN_SOURCE $(CPPFLAGS) $(CPPFLAGS_NETCDF) $$$$.c \
-	    | sed '/^# *[0-9]/d' > $*.f \
-	|| (rm -f $*.f $$$$.c; exit 1) \
-	&& rm $$$$.c
-	$(FC) -c $(FFLAGS) $*.f
-.F.f:
-	ln -s $< $$$$.c \
-	&& $(CPP) -DUD_FORTRAN_SOURCE $(CPPFLAGS) $(CPPFLAGS_NETCDF) $$$$.c \
-	    | sed '/^# *[0-9]/d' > $@ \
-	|| (rm -f $@ $$$$.c; exit 1) \
-	&& rm $$$$.c
-
-# Generate FORTRAN-callable C code.
-#
-.fc.o:
-	$(FORTC) -O $(OS) $< > $*.c \
-	    || ( rm -f $*.c; exit 1)
-	$(CC) -c $(CFLAGS) $(CFLAGS_NETCDF) $(CPPFLAGS) $(CPPFLAGS_NETCDF) $*.c
-.fc.c:
-	$(FORTC) -O $(OS) $< > $@ \
-	    || (rm -f $*.c; exit 1)
-
-# Compile C code.
-#
 .c.o:
-	$(CC) -c $(CPPFLAGS) $(CPPFLAGS_NETCDF) $(CFLAGS) $(CFLAGS_NETCDF) $<
+ at am__fastdepCC_TRUE@	if $(COMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" \
+ at am__fastdepCC_TRUE@	  -c -o $@ `test -f '$<' || echo '$(srcdir)/'`$<; \
+ at am__fastdepCC_TRUE@	then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; \
+ at am__fastdepCC_TRUE@	else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; \
+ at am__fastdepCC_TRUE@	fi
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	depfile='$(DEPDIR)/$*.Po' tmpdepfile='$(DEPDIR)/$*.TPo' @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	$(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCC_FALSE@	$(COMPILE) -c `test -f '$<' || echo '$(srcdir)/'`$<
 
-# Compile lex(1) code.  This rule is here to ensure the use of CPPFLAGS.
-# 
-.l.o:
-	rm -f $*.c
-	$(LEX) -t $< > $*.c
-	$(CC) -c $(CPPFLAGS) $(CPPFLAGS_NETCDF) $(CFLAGS) $(CFLAGS_NETCDF) $*.c
-	rm $*.c
+.c.obj:
+ at am__fastdepCC_TRUE@	if $(COMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" \
+ at am__fastdepCC_TRUE@	  -c -o $@ `if test -f '$<'; then $(CYGPATH_W) '$<'; else $(CYGPATH_W) '$(srcdir)/$<'; fi`; \
+ at am__fastdepCC_TRUE@	then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; \
+ at am__fastdepCC_TRUE@	else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; \
+ at am__fastdepCC_TRUE@	fi
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	depfile='$(DEPDIR)/$*.Po' tmpdepfile='$(DEPDIR)/$*.TPo' @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	$(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCC_FALSE@	$(COMPILE) -c `if test -f '$<'; then $(CYGPATH_W) '$<'; else $(CYGPATH_W) '$(srcdir)/$<'; fi`
+uninstall-info-am:
 
-# C preprocess.  
-#   NB: 
-#	1. The output `file' is not created but appears on standard output;
-#	2. Line numbering information is kept.
-#
-.c.i:
-	$(CPP) $(CPPFLAGS) $(CPPFLAGS_NETCDF) $<
+man1dir = $(mandir)/man1
+install-man1: $(man1_MANS) $(man_MANS)
+	@$(NORMAL_INSTALL)
+	$(mkinstalldirs) $(DESTDIR)$(man1dir)
+	@list='$(man1_MANS) $(dist_man1_MANS) $(nodist_man1_MANS)'; \
+	l2='$(man_MANS) $(dist_man_MANS) $(nodist_man_MANS)'; \
+	for i in $$l2; do \
+	  case "$$i" in \
+	    *.1*) list="$$list $$i" ;; \
+	  esac; \
+	done; \
+	for i in $$list; do \
+	  if test -f $(srcdir)/$$i; then file=$(srcdir)/$$i; \
+	  else file=$$i; fi; \
+	  ext=`echo $$i | sed -e 's/^.*\\.//'`; \
+	  case "$$ext" in \
+	    1*) ;; \
+	    *) ext='1' ;; \
+	  esac; \
+	  inst=`echo $$i | sed -e 's/\\.[0-9a-z]*$$//'`; \
+	  inst=`echo $$inst | sed -e 's/^.*\///'`; \
+	  inst=`echo $$inst | sed '$(transform)'`.$$ext; \
+	  echo " $(INSTALL_DATA) $$file $(DESTDIR)$(man1dir)/$$inst"; \
+	  $(INSTALL_DATA) $$file $(DESTDIR)$(man1dir)/$$inst; \
+	done
+uninstall-man1:
+	@$(NORMAL_UNINSTALL)
+	@list='$(man1_MANS) $(dist_man1_MANS) $(nodist_man1_MANS)'; \
+	l2='$(man_MANS) $(dist_man_MANS) $(nodist_man_MANS)'; \
+	for i in $$l2; do \
+	  case "$$i" in \
+	    *.1*) list="$$list $$i" ;; \
+	  esac; \
+	done; \
+	for i in $$list; do \
+	  ext=`echo $$i | sed -e 's/^.*\\.//'`; \
+	  case "$$ext" in \
+	    1*) ;; \
+	    *) ext='1' ;; \
+	  esac; \
+	  inst=`echo $$i | sed -e 's/\\.[0-9a-z]*$$//'`; \
+	  inst=`echo $$inst | sed -e 's/^.*\///'`; \
+	  inst=`echo $$inst | sed '$(transform)'`.$$ext; \
+	  echo " rm -f $(DESTDIR)$(man1dir)/$$inst"; \
+	  rm -f $(DESTDIR)$(man1dir)/$$inst; \
+	done
 
+ETAGS = etags
+ETAGSFLAGS =
 
-# ###########################################################################
-# Libraries:
-# ###########################################################################
-# RANLIB		= @RANLIB@
-LIBDIR		= $(prefix)/lib
-LIB_A		= lib$(LIBRARY).a
+CTAGS = ctags
+CTAGSFLAGS =
 
-library::		$(LIB_A)
+tags: TAGS
 
-# The following rule is forced because the library can be created by a
-# makefile in another directory prior to the execution of the following rule.
-#
-$(LIB_A):		$(LIBOBJS) FORCE
-	$(AR) rcuv $@ $(LIBOBJS)
-	$(RANLIB) $@
+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; } \
+	       END { for (i in files) print i; }'`; \
+	mkid -fID $$unique
 
-# The following rule is for those makefiles needing to install object
-# modules in a library in another directory.  They need only define 
-# REMOTE_LIBRARY and LIBOBJS.  The rule is forced for the same reason as the
-# $(LIB_A) rule.
-#
-lib_dummy $(REMOTE_LIBRARY):	$(LIBOBJS) FORCE
-	$(AR) rcuv $@ $(LIBOBJS)
-	$(RANLIB) $@
+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; } \
+	       END { for (i in files) print i; }'`; \
+	test -z "$(ETAGS_ARGS)$$tags$$unique" \
+	  || $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
+	     $$tags $$unique
 
-installed_libfiles:	FORCE
-	@if [ -n "$(LIBFILES)" ]; then \
-	    libfiles="$(LIBFILES)"; \
-	    for libfile in $$libfiles; do \
-		$(MAKE) $(MFLAGS) $(LOCAL_MACROS) \
-		    LIBDIR=$(LIBDIR) LIBFILE=$$libfile \
-		    installed_libfile || exit 1; \
-	    done; \
-	else \
-	    :; \
-	fi
+ctags: CTAGS
+CTAGS:  $(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; } \
+	       END { for (i in files) print i; }'`; \
+	test -z "$(CTAGS_ARGS)$$tags$$unique" \
+	  || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
+	     $$tags $$unique
 
-installed_library::	FORCE
-	@$(MAKE) $(MFLAGS) $(LOCAL_MACROS) \
-	    LIBDIR=$(LIBDIR) LIBFILE=$(LIB_A) \
-	    installed_libfile
+GTAGS:
+	here=`$(am__cd) $(top_builddir) && pwd` \
+	  && cd $(top_srcdir) \
+	  && gtags -i $(GTAGS_ARGS) $$here
 
-# The following target decouples the previous targets from the actual rule;
-# thus, eliminating extraneous make(1) messages.
-#
-installed_libfile:	$(LIBDIR)/$(LIBFILE)
+distclean-tags:
+	-rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
+DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
 
-$(LIBDIR)/$(LIBFILE):	$(LIBDIR) $(LIBFILE)
-	$(INSTALL_DATA) $(LIBFILE) $@
+top_distdir = ../..
+distdir = $(top_distdir)/$(PACKAGE)-$(VERSION)
 
-dummy_libdir $(LIBDIR):
-	mkdir -p $@
-	chmod u+rwx,g+rws,o=rx $@
-
-LIB_SO		= lib$(LIBRARY).so.$(MAJOR_NO).$(MINOR_NO)
-LIB_SA		= lib$(LIBRARY).sa.$(MAJOR_NO).$(MINOR_NO)
-
-#library::		FORCE
-#	@so_objs=`echo $(LIBOBJS) | sed 's/\.o/.so/g'`; \
-#	if [ -z "$$so_objs" ]; then \
-#	    :; \
-#	else \
-#	    $(MAKE) $(MFLAGS) $(LIB_SO) \
-#		SO_OBJS="$$so_objs"; \
-#	fi
-#	@if [ -z "$(SA_OBJS)" ]; then \
-#	    :; \
-#	else \
-#	    $(MAKE) $(MFLAGS) $(LIB_SA); \
-#	fi
-
-$(LIB_SO):	$(SO_OBJS)
-	ld -assert pure-text $(SO_OBJS) -o $@
-$(LIB_SA):	$(SA_OBJS) FORCE
-	$(AR) rcuv $@ $(SA_OBJS)
-
-.fc.so:
-	$(FORTC) -O $(OS) $< > $*.c \
-	    || (rm -f $*.c; exit 1)
-	$(CC) -c -pic $(CFLAGS) $(CFLAGS_NETCDF) $(CPPFLAGS) $(CPPFLAGS_NETCDF) $*.c -o $$$$.o \
-	    || (rm -f $$$$.o; exit 1)
-	mv $$$$.o $@
-.c.so:
-	$(CC) -c -pic $(CFLAGS) $(CFLAGS_NETCDF) $(CPPFLAGS) $(CPPFLAGS_NETCDF) $< -o $$$$.o \
-	    || (rm -f $$$$.o; exit 1)
-	mv $$$$.o $@
-
-#installed_library::	$(LIBDIR)/$(LIB_SO)
-#	@if [ -z "$(SA_OBJS)" ]; then \
-#	    :; \
-#	else \
-#	    $(MAKE) $(MFLAGS) $(LIBDIR)/$(LIB_SA); \
-#	fi
-
-$(LIBDIR)/$(LIB_SO):	$(LIBDIR) $(LIB_SO)
-	$(INSTALL_DATA) $(LIB_SO) $(LIBDIR)/$(LIB_SO)
-$(LIBDIR)/$(LIB_SA):	$(LIBDIR) $(LIB_SA)
-	$(INSTALL_DATA) $(LIB_SA) $(LIBDIR)/$(LIB_SA)
-
-
-# ###########################################################################
-# Programs:
-# ###########################################################################
-BINDIR		= $(exec_prefix)/bin
-
-programs:	$(PROGRAMS)
-program:
-	@if [ -z "$(PROGRAM)" ]; then \
-	    : true; \
-	else \
-	    if [ -z "$(LIBRARY)" ]; then \
-		: true; \
-	    else \
-		$(MAKE) $(MFLAGS) $(LOCAL_MACROS) library; \
+distdir: $(DISTFILES)
+	@srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \
+	topsrcdirstrip=`echo "$(top_srcdir)" | sed 's|.|.|g'`; \
+	list='$(DISTFILES)'; for file in $$list; do \
+	  case $$file in \
+	    $(srcdir)/*) file=`echo "$$file" | sed "s|^$$srcdirstrip/||"`;; \
+	    $(top_srcdir)/*) file=`echo "$$file" | sed "s|^$$topsrcdirstrip/|$(top_builddir)/|"`;; \
+	  esac; \
+	  if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
+	  dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \
+	  if test "$$dir" != "$$file" && test "$$dir" != "."; then \
+	    dir="/$$dir"; \
+	    $(mkinstalldirs) "$(distdir)$$dir"; \
+	  else \
+	    dir=''; \
+	  fi; \
+	  if test -d $$d/$$file; then \
+	    if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
+	      cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \
 	    fi; \
-	    $(MAKE) $(MFLAGS) $(LOCAL_MACROS) $(PROGRAM); \
-	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) $(MANS)
 
-dummy_prog $(PROGRAM):	$(OBJS)
-	@if [ -r $@.f -o -r $@.F ]; then \
-	    ld='$(FC) $(FFLAGS)'; \
-	else \
-	    ld='$(CC) $(CFLAGS) $(CFLAGS_NETCDF) '; \
-	fi; \
-	cmd="$$ld $(OBJS) $(LIBS) -o $@"; \
-	echo $$cmd; \
-	$$cmd \
-	    || (rm -f $@; exit 1)
+installdirs:
+	$(mkinstalldirs) $(DESTDIR)$(bindir) $(DESTDIR)$(man1dir)
+install: install-am
+install-exec: install-exec-am
+install-data: install-data-am
+uninstall: uninstall-am
 
-installed_programs:	FORCE
-	@$(MAKE) $(MFLAGS) $(LOCAL_MACROS) installed_binfiles \
-	    BINDIR=$(BINDIR) BINFILES="$(PROGRAMS)"
+install-am: all-am
+	@$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
 
-installed_binfiles:	FORCE
-	@if [ -n "$(BINFILES)" ]; then \
-	    binfiles="$(BINFILES)"; \
-	    for binfile in $$binfiles; do \
-		$(MAKE) $(MFLAGS) $(LOCAL_MACROS) \
-		    BINDIR=$(BINDIR) BINFILE=$$binfile \
-		    installed_binfile || exit 1; \
-	    done; \
-	else \
-	    :; \
-	fi
+installcheck: installcheck-am
+install-strip:
+	$(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
+	  INSTALL_STRIP_FLAG=-s \
+	  `test -z '$(STRIP)' || \
+	    echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
+mostlyclean-generic:
 
-installed_program:	FORCE
-	@$(MAKE) $(MFLAGS) $(LOCAL_MACROS) BINDIR=$(BINDIR) BINFILE=$(PROGRAM) \
-	    installed_binfile
+clean-generic:
 
-# The following target decouples the previous targets from the actual rule;
-# thus, eliminating extraneous make(1) messages.
-#
-installed_binfile:	$(BINDIR)/$(BINFILE)
+distclean-generic:
+	-rm -f $(CONFIG_CLEAN_FILES)
+	-test -z "$(DISTCLEANFILES)" || rm -f $(DISTCLEANFILES)
 
-$(BINDIR)/$(BINFILE):	$(BINDIR) $(BINFILE)
-	$(INSTALL_PROGRAM) $(BINFILE) $@
+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
 
-dummy_bindir $(BINDIR):
-	mkdir -p $@
-	chmod u+rwx,g+rws,o=rx $@
+clean-am: clean-binPROGRAMS clean-generic clean-noinstPROGRAMS \
+	mostlyclean-am
 
+distclean: distclean-am
+	-rm -rf ./$(DEPDIR)
+	-rm -f Makefile
 
-# ###########################################################################
-# Header files:
-# ###########################################################################
-installed_headers:	FORCE
-	@if [ -n "$(HEADERS)" ]; then \
-	    headers="$(HEADERS)"; \
-	    for header in $$headers; do \
-		$(MAKE) $(MFLAGS) $(LOCAL_MACROS) INCDIR=$(INCDIR) HEADER=$$header \
-		    installed_header || exit 1; \
-	    done; \
-	else \
-	    :; \
-	fi
+distclean-am: clean-am distclean-compile distclean-generic \
+	distclean-tags
 
-# The following target decouples the previous targets from the actual rule;
-# thus, eliminating extraneous make(1) messages.
-#
-installed_header:	$(INCDIR)/$(HEADER)
+dvi: dvi-am
 
-$(INCDIR)/$(HEADER):	$(INCDIR) $(HEADER)
-	$(INSTALL_DATA) $(HEADER) $@
+dvi-am:
 
-dummy_incdir $(INCDIR):
-	mkdir -p $@
-	chmod u+rwx,g+rws,o=rx $@
+info: info-am
 
+info-am:
 
-# ###########################################################################
-# `etc/' files:
-# ###########################################################################
-ETCDIR	= $(prefix)/etc
+install-data-am: install-man
 
-installed_etcfiles:
-	@if [ -n "$(ETCFILES)" ]; then \
-	    etcfiles="$(ETCFILES)"; \
-	    for etcfile in $$etcfiles; do \
-		$(MAKE) $(MFLAGS) $(LOCAL_MACROS) ETCDIR=$(ETCDIR) ETCFILE=$$etcfile \
-		    installed_etcfile || exit 1; \
-	    done; \
-	else \
-	    :; \
-	fi
+install-exec-am: install-binPROGRAMS
 
-# The following target decouples the previous targets from the actual rule;
-# thus, eliminating extraneous make(1) messages.
-#
-installed_etcfile:	$(ETCDIR)/$(ETCFILE)
+install-info: install-info-am
 
-$(ETCDIR)/$(ETCFILE):	$(ETCDIR) $(ETCFILE)
-	-mkdir -p $(ETCDIR)
-	-chmod u+rwx,g+rws,o=rx $(ETCDIR)
-	$(INSTALL_DATA) $(ETCFILE) $@
+install-man: install-man1
 
-# ###########################################################################
-# Manual Pages:
-# ###########################################################################
-MANDIR	= $(prefix)/man
+installcheck-am:
 
-installed_manuals:	FORCE
-	@if [ -n "$(MANUALS)" ]; then \
-	    manuals="$(MANUALS)"; \
-	    for manual in $$manuals; do \
-		mandir=$(MANDIR)/man`echo $$manual | sed 's/.*\.\(.\).*/\1/'`; \
-		$(MAKE) $(MFLAGS) $(LOCAL_MACROS) MANDIR=$$mandir MANUAL=$$manual \
-		    installed_manual || exit 1; \
-	    done; \
-	else \
-	    :; \
-	fi
+maintainer-clean: maintainer-clean-am
+	-rm -rf ./$(DEPDIR)
+	-rm -f Makefile
 
-# The following target decouples the previous targets from the actual rule;
-# thus, eliminating extraneous make(1) messages.
-#
-installed_manual:	$(MANDIR)/$(MANUAL)
+maintainer-clean-am: distclean-am maintainer-clean-generic
 
-# The first sed(1) editing command in the following replaces the expanded
-# RCS keyword `$Date ...' in the `.TH' macro line with something more 
-# appropriate to a manual page.
-#
-$(MANDIR)/$(MANUAL):	$(MANDIR) $(MANUAL)
-	sed \
-	 -e '/^\.TH/s/$$D\ate: \([0-9]*\)\/\([0-9]*\)\/\([0-9]*\).*\$$/\1-\2-\3/'\
-	 $(MANUAL) | $(TBL) | $(NEQN) > $@
-	chmod u=rw,og=r $@
+mostlyclean: mostlyclean-am
 
-dummy_mandir $(MANDIR):
-	mkdir -p $@
-	chmod u+rwx,g+rws,o=rx $@
+mostlyclean-am: mostlyclean-compile mostlyclean-generic
 
-# ###########################################################################
-# TeX-Info Pages:
-# ###########################################################################
-INFODIR       = $(prefix)/info
+pdf: pdf-am
 
-installed_infos:      FORCE
-	if [ -z "$(MAKEINFO)" ]; then \
-		echo 1>&2 "Can't install info(1) pages because no makeinfo(1)"; \
-	else \
-	  if [ -n "$(INFOS)" ]; then \
-	      infos="$(INFOS)"; \
-	      for info in $$infos; do \
-		$(MAKE) $(MFLAGS) $(LOCAL_MACROS) INFODIR=$(INFODIR) INFO=$$info \
-		installed_info || exit 1; \
-	      done; \
-	   else \
-	      :; \
-	   fi; \
-	fi;
-# The following target decouples the previous targets from the actual rule;
-# thus, eliminating extraneous make(1) messages.
-#
-installed_info:       $(INFODIR)/$(INFO)
+pdf-am:
 
-$(INFODIR)/$(INFO):   $(INFODIR) $(INFO)
-	-mkdir -p $(INFODIR)
-	-chmod u+rwx,g+rws,o=rx $(INFODIR)
-	$(INSTALL_DATA) $(INFO) $@
+ps: ps-am
 
-# Rules for generating info pages:
-#
-.SUFFIXES:    .info .texi .texinfo .txn
-.texi.info:
-	@if [ -z "$(MAKEINFO)" ]; then \
-	  echo 1>&2 "Can't create $@ because no makeinfo(1)"; \
-	else \
-	  $(MAKEINFO) $< --no-split --output=$@; \
-	fi
-.texinfo.info:
-	@if [ -z "$(MAKEINFO)" ]; then \
-	  echo 1>&2 "Can't create $@ because no makeinfo(1)"; \
-	else \
-	  $(MAKEINFO) $< --no-split --output=$@; \
-	fi
-.txn.info:
-	@if [ -z "$(MAKEINFO)" ]; then \
-	  echo 1>&2 "Can't create $@ because no makeinfo(1)"; \
-	else \
-	  $(MAKEINFO) $< --no-split --output=$@; \
-	fi
+ps-am:
 
-# Ensure that info page depends on canonical TeX-Info macros.
-#
-dummy_info $(INFO):   texinfo.tex
+uninstall-am: uninstall-binPROGRAMS uninstall-info-am uninstall-man
 
-# ###########################################################################
-# Cleanup:
-# ###########################################################################
-clean::
-	rm -f $(GARBAGE) $(PROGRAM) a.out core *.o *.a *.so.* *.sa.* *.so \
-	    *.log
+uninstall-man: uninstall-man1
 
-realclean::	distclean
-distclean::
-	rm -f $(GARBAGE) $(PROGRAM) a.out core *.o *.a *.so.* *.sa.* *.so \
-	    *.log Makefile config.status cc_id tags
+.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 info info-am install install-am install-binPROGRAMS \
+	install-data install-data-am install-exec install-exec-am \
+	install-info install-info-am install-man install-man1 \
+	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 \
+	uninstall-info-am uninstall-man uninstall-man1
 
 
-# ###########################################################################
-# Configuration:
-# ###########################################################################
+ncgentab.c ncgentab.h: ncgen.h ncgen.y ncgenyy.c
+	$(YACC) -d $(srcdir)/ncgen.y
+	mv y.tab.c ncgentab.c
+	mv y.tab.h ncgentab.h
 
-# The following target is touched because config.status won't update it if
-# it hasn't changed.
-#
-# The following is commented-out because the HPUX make(1) goes into a loop.
-#
-#Makefile:	config.status
-#	./config.status
-#	touch $@
+ncgenyy.c: ncgen.l
+	$(LEX) $(srcdir)/ncgen.l
+	mv lex.yy.c ncgenyy.c
 
-config.status:	cc_id configure
-	./configure --no-create
+ at HDF_BUILD_FORTRAN_TRUE@check: ncgen $(srcdir)/test0.cdl b-check c-check f-check
+ at HDF_BUILD_FORTRAN_FALSE@check: ncgen $(srcdir)/test0.cdl b-check c-check
 
-cc_id:		FORCE
-	if test -r $@ && test "`cat $@`" = "$(CC)"; then \
-	    :; \
-	else \
-	    echo "$(CC)" > $@; \
+b-check:	ncgen $(srcdir)/test0.cdl test1.cdl
+	./ncgen -b test1.cdl
+	$(NCDUMP) test1.nc > test2.cdl
+	@if $(DIFF) test1.cdl test2.cdl; then                               \
+	  echo "*** ncgen -b test successful ***";                          \
+	else                                                                \
+	  echo "*** ncgen -b test failed ***";                              \
 	fi
 
-configure:		configure.in
-	autoconf
-
-
-# ###########################################################################
-# Dependency maintenance:
-# ###########################################################################
-.PRECIOUS:	depend
-#
-# Note: The following rule will only work if the C compiler behaves correctly
-# when given the `-M' option.  AIX's cc(1) and SunOS's acc(1) behave
-# incorrectly.  --Steve Emmerson 1992-09-24
-#
-# Furthermore, we do not attempt to maintain dependencies on installed
-# header files (e.g. those in $(INCDIR)) for two reasons: 1) the dependency
-# list generated at Unidata mightn't correspond to the situation at a client
-# site; and 2) clients using broken compilers (c.f. previous note) can't
-# regenerate the dependency list.
-#
-disabled_depend:		FORCE
-	-incdir=`echo $(INCDIR) | sed s',/,\\\/,g'`; \
-	cc -M $(CPPFLAGS) $(CPPFLAGS_NETCDF) *.c 2> /dev/null | \
-	    awk '{ \
-		if ($$0 ~ /:/) { \
-		    target	= $$1; \
-		    if (target ~ /:/) { \
-			target	= substr(target,1,length(target)-1); \
-			start	= 2; \
-		    } else { \
-			start	= 3; \
-		    } \
-		} else { \
-		    start	= 1; \
-		} \
-		for (i = start; i <= NF; ++i) { \
-		    if ($$i !~ /^\\/ && \
-			$$i !~ /port\// && \
-			$$i !~ /^\//) \
-			print target ": " $$i \
-		} \
-	    }' > $@
-	tag='### DO NOT DELETE THIS LINE.  make depend DEPENDS ON IT ###'; \
-	    sed -e "/^$$tag$$/r depend" \
-		-e "/^$$tag$$/q" Makefile > Makefile.new
-	mv Makefile.new Makefile
-
-
-# ###########################################################################
-# Distributions:
-# ###########################################################################
-#FTPDIR		= @FTPDIR@
-#VERSION		= @VERSION@
-
-ftp:		$(FTPDIR)/$(PACKAGE)-$(VERSION).tar.Z
-	test ! -h $(FTPDIR)/$(PACKAGE).tar.Z && exit 0; \
-	cd $(FTPDIR) || exit 1; \
-	rm $(PACKAGE).tar.Z || exit 1; \
-	ln -s $(PACKAGE)-$(VERSION).tar.Z $(PACKAGE).tar.Z;
-
-$(FTPDIR)/$(PACKAGE)-$(VERSION).tar.Z:	$(PACKAGE)-$(VERSION).tar.Z
-	cp $(PACKAGE)-$(VERSION).tar.Z $@ 
-	chmod u+rw,g+rw,o=r $@
-
-tar.Z:		$(PACKAGE)-$(VERSION).tar.Z
-
-$(PACKAGE)-$(VERSION).tar.Z:	MANIFEST
-	dir=`basename \`pwd\`` \
-	&& id=$(PACKAGE)-$(VERSION) \
-	&& cd .. \
-	&& ln -s $$dir $$id \
-	&& tar -chof - `sed "s|^|$$id/|" $$id/MANIFEST` \
-	    | compress > $$id/$@ \
-	&& rm $$id
-
-MANIFEST:	FORCE
-	@echo 1>&2 Creating MANIFEST
-	@$(MAKE) -s $(MFLAGS) $(LOCAL_MACROS) MANIFEST.echo > $@
-
-MANIFEST.echo:	FORCE
-	@$(MAKE) -s $(MFLAGS) $(LOCAL_MACROS) \
-	    MANIFEST=`echo $(MANIFEST) | sed 's/MANIFEST//'` \
-	    ensure_manifest > /dev/null
-	@echo $(MANIFEST) | fmt -1
-	@if [ -n "$(SUBDIRS)" ]; then \
-	    subdirs="$(SUBDIRS)"; \
-	    for subdir in $$subdirs; do \
-		(cd $$subdir && \
-	        echo 1>&2 Creating $@ in `pwd` && \
-		$(MAKE) $(MFLAGS) $(LOCAL_MACROS) MANIFEST.echo | \
-		    sed "s|^|$$subdir/|") || exit 1; \
-	    done; \
-	else \
-	    :; \
+c-check:	test2.cdl ctest0
+	./ctest0        # tests `-c' option, creates ctest0.nc
+	$(NCDUMP) -n test1 ctest0.nc > ctest1.cdl
+	@if $(DIFF) test1.cdl ctest1.cdl; then                              \
+	  echo "*** ncgen -c test successful ***";                          \
+	else                                                                \
+	  echo "*** ncgen -c test failed  ***";                             \
 	fi
 
-ensure_manifest:	$(MANIFEST)
+ at HDF_BUILD_FORTRAN_TRUE@f-check:	test1.cdl ftest0
+ at HDF_BUILD_FORTRAN_TRUE@	./ftest0
+ at HDF_BUILD_FORTRAN_TRUE@	$(NCDUMP) -n test1 ftest0.nc > ftest1.cdl
+ at HDF_BUILD_FORTRAN_TRUE@	@if $(DIFF) test1.cdl ftest1.cdl; then                              \
+ at HDF_BUILD_FORTRAN_TRUE@	  echo "*** ncgen -f test successful ***";                          \
+ at HDF_BUILD_FORTRAN_TRUE@	else                                                                \
+ at HDF_BUILD_FORTRAN_TRUE@	  echo "*** ncgen -f test failed (but roundoff differences are OK) ***"; \
+ at HDF_BUILD_FORTRAN_TRUE@	fi
 
-# for distribution creation
-distdir = $(TOP_SRCDIR)/$(PACKAGE)-$(VERSION)/$(curdir)
-curdir = mfhdf/ncgen
-dist: $(DISTFILES)
-	@for file in $(DISTFILES); do \
-	  ln $(srcdir)/$$file $(distdir)/$$file 2> /dev/null \
-	    || { echo copying $$file instead; \
-	    cp -p $(srcdir)/$$file $(distdir)/$$file;}; \
-	done
+ at HDF_BUILD_FORTRAN_TRUE@ftest0:		ncgen test0.cdl netcdf.inc
+ at HDF_BUILD_FORTRAN_TRUE@	./ncgen -f -o ftest0.nc $(srcdir)/test0.cdl > test0.f
+ at HDF_BUILD_FORTRAN_TRUE@	$(F77) $(FFLAGS) -o $@ test0.f $(LDFLAGS) $(ncgen_LDADD) $(LIBS)
 
-# ###########################################################################
-# Miscellaneous:
-# ###########################################################################
+netcdf.inc:
+	ln -s ../fortran/$@ .
 
-# The following dummy target is useful as a dependency to ensure that a
-# rule is always executed.
-#
-FORCE:
+test1.cdl:	test0.nc
+	$(NCDUMP) -n test1 test0.nc > $@
 
+test0.nc:	ncgen $(srcdir)/test0.cdl
+	./ncgen -b -o test0.nc $(srcdir)/test0.cdl
 
-# Override the default definition for ncdump(1) in the master makefile.
-#
-NCDUMP		= ../ncdump/ncdump
+ctest0:		ncgen $(srcdir)/test0.cdl
+	./ncgen -c -o ctest0.nc $(srcdir)/test0.cdl > test0.c
+	$(COMPILE) -o $@ test0.c $(LDFLAGS) $(ncgen_LDADD) $(LIBS)
 
-### Everything after the following line might be overwritten ###
-### DO NOT DELETE THIS LINE.  make depend DEPENDS ON IT ###
-include depend
+#############################################################################
+#############################################################################
+
+vms-stuff:	ncgentab.h ncgentab.c ncgenyy.c
+	cp $(srcdir)/ncgentab.h vmstab.h
+	cp $(srcdir)/ncgentab.c vmstab.c
+	cp $(srcdir)/ncgenyy.c vms_yy.c
+# 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:

Deleted: packages/libhdf4/branches/upstream/current/mfhdf/ncgen/Makefile.in_orig
===================================================================
--- packages/libhdf4/branches/upstream/current/mfhdf/ncgen/Makefile.in_orig	2007-05-15 09:05:29 UTC (rev 830)
+++ packages/libhdf4/branches/upstream/current/mfhdf/ncgen/Makefile.in_orig	2007-05-15 09:53:05 UTC (rev 831)
@@ -1,132 +0,0 @@
-# Makefile for ncgen(1).
-#
-# $Id: Makefile.in_orig,v 1.2 2000/08/30 18:46:40 wendling Exp $
-
-PROGRAM		= ncgen
-BINFILES	= $(PROGRAM)
-CPP_NETCDF	= -I../libsrc
-CPPFLAGS	= $(CPP_NETCDF) @CPPFLAGS@
-CFLAGS		= @CFLAGS@ @HDF_INC@
-FFLAGS		= @FFLAGS@
-MANUALS		= ncgen.1
-GARBAGE		= $(PROGRAM) \
-		  ncgenyy.c ncgentab.c ncgentab.h \
-		  test0.nc test1.nc test1.cdl test2.cdl test0.f ctest0 \
-		  ftest0 ftest0.nc ftest1.cdl test0.c ctest0.nc ctest1.cdl
-vms_stuff	= vmstab.c vmstab.h vms_yy.c
-MANIFEST	= Makefile.in depend README \
-		  close.c descrip.mms escapes.c generate.c generic.h \
-		  genlib.c genlib.h getfill.c init.c lexyacc.com load.c \
-		  main.c make.com msoft.mk msofttab.c msofttab.h \
-		  msoftyy.c ncgen.1 ncgen.h ncgen.l ncgen.opt ncgen.y \
-		  test.com test0.cdl \
-		  $(vms_stuff)
-LIBNAME		= netcdf
-LD_NETCDF	= ../libsrc/libnetcdf.a @HDF_LIB@ @JPEG_LIB@
-OBJS		= main.o generate.o load.o ncgentab.o escapes.o \
-		  getfill.o init.o close.o genlib.o
-LD_XDR		= @LD_XDR@
-LIBS		= $(LD_NETCDF) $(LD_XDR) $(LIBSX)
-LEX		= @LEX@
-YACC		= @YACC@
-prefix		= ../../..
-
-all::		$(PROGRAM)
-
-test:           $(PROGRAM) test0.cdl btest ctest ftest FORCE
-
-install::	installed_program installed_manuals
-
-$(PROGRAM):	main.o
-
-ncgentab.c \
-ncgentab.h:	ncgen.y ncgenyy.c ncgen.h
-	$(YACC) -d ncgen.y
-	mv y.tab.c ncgentab.c
-	mv y.tab.h ncgentab.h
-
-ncgenyy.c:	ncgen.l
-	$(LEX) ncgen.l
-	mv lex.yy.c ncgenyy.c
-
-# The SunOS 4.1.3 yacc(1) doesn't generate correct code.
-#
-vms-stuff:	ncgentab.h ncgentab.c ncgenyy.c
-	cp ncgentab.h vmstab.h
-	cp ncgentab.c vmstab.c
-	cp ncgenyy.c vms_yy.c
-
-#
-# test "-b" option of ncgen
-#
-btest:		$(PROGRAM) test0.cdl test1.cdl
-	./$(PROGRAM) -b test1.cdl
-	$(NCDUMP) test1.nc > test2.cdl
-	@diff test1.cdl test2.cdl && \
-	    echo "*** $(PROGRAM) -b test successful ***"
-
-#
-# test "-c" option of ncgen
-#
-ctest:		test1.cdl ctest0
-	./ctest0		# tests `-c' option, creates ctest0.nc
-	$(NCDUMP) -n test1 ctest0.nc > ctest1.cdl
-	@diff test1.cdl ctest1.cdl && \
-	    echo "*** $(PROGRAM) -c test successful ***"
-
-ctest0:		ncgen test0.cdl
-	./$(PROGRAM) -c -o ctest0.nc test0.cdl > test0.c
-	$(CC) $(CPPFLAGS) $(CFLAGS) -o $@ test0.c $(LIBS)
-
-#
-# test "-f" option of ncgen
-#
-ftest:		test1.cdl
-	@case "$(FC)" in \
-	NONE*) \
-	    echo 1>&2 "\`$@' not made because no FORTRAN compiler";; \
-	*) \
-	    $(MAKE) $(MFLAGS) ftest0; \
-	    ./ftest0 ; \
-	    $(NCDUMP) -n test1 ftest0.nc > ftest1.cdl; \
-	    if diff test1.cdl ftest1.cdl; then \
-		echo "*** ncgen -f test successful ***"; \
-	    else \
-		echo "*** ncgen -f test failed " \
-		    "(but roundoff differences are OK) ***"; \
-	    fi;; \
-	esac
-
-ftest0:		$(PROGRAM) test0.cdl
-	@case "$(FC)" in \
-	NONE*) \
-	    echo 1>&2 "\`$@' not made because no FORTRAN compiler";; \
-	*) \
-	    $(MAKE) $(MFLAGS) netcdf.inc; \
-	    ./$(PROGRAM) -f -o ftest0.nc test0.cdl > test0.f; \
-	    $(FC) $(FFLAGS) -o $@ test0.f $(LIBS);; \
-	esac
-
-test1.cdl:	test0.nc
-	$(NCDUMP) -n test1 test0.nc > $@
-
-test0.nc:	$(PROGRAM) test0.cdl
-	./$(PROGRAM) -b -o test0.nc test0.cdl
-
-netcdf.inc:
-	@case "$(FC)" in \
-	NONE*) \
-	    echo 1>&2 "\`$@' not made because no FORTRAN compiler";; \
-	*) \
-	    ln -s ../fortran/$@ .;; \
-	esac
-
-include ../port/master.mk
-
-# Override the default definition for ncdump(1) in the master makefile.
-#
-NCDUMP		= ../ncdump/ncdump
-
-### Everything after the following line might be overwritten ###
-### DO NOT DELETE THIS LINE.  make depend DEPENDS ON IT ###
-include depend

Modified: packages/libhdf4/branches/upstream/current/mfhdf/ncgen/make.com
===================================================================
--- packages/libhdf4/branches/upstream/current/mfhdf/ncgen/make.com	2007-05-15 09:05:29 UTC (rev 830)
+++ packages/libhdf4/branches/upstream/current/mfhdf/ncgen/make.com	2007-05-15 09:53:05 UTC (rev 831)
@@ -2,7 +2,7 @@
 $! For making NCGEN.EXE on VMS.
 $! --------------------------------------------------------------------------
 $!
-$! $Id: make.com,v 1.5 1996/11/07 00:29:10 sxu Exp $
+$! $Id: make.com,v 1.6 2001/10/22 20:31:09 epourmal Exp $
 $!
 $ if f$getsyi("arch_name") .eqs. "VAX"
 $ then 
@@ -13,7 +13,7 @@
 $ define/nolog sys$clib sys$library:vaxcrtl
 $ endif
 $ ccc := cc 'ccopt  -
-       /opt/nodebug/include=([--.include],[--.hdf.src], -
+       /opt/nodebug/include=([--.include],[--.hdf.src], [--.mfhdf.libsrc], -
      [--.hdf.jpeg],[--.hdf.zlib], sys$library)/nolist    -
      /define=(HDF,VMS,NO_SYS_XDR_INC)
 $

Modified: packages/libhdf4/branches/upstream/current/mfhdf/ncgen/ncgen.l
===================================================================
--- packages/libhdf4/branches/upstream/current/mfhdf/ncgen/ncgen.l	2007-05-15 09:05:29 UTC (rev 830)
+++ packages/libhdf4/branches/upstream/current/mfhdf/ncgen/ncgen.l	2007-05-15 09:53:05 UTC (rev 831)
@@ -2,7 +2,7 @@
 /*********************************************************************
  *   Copyright 1993, UCAR/Unidata
  *   See netcdf/COPYRIGHT file for copying and redistribution conditions.
- *   $Id: ncgen.l,v 1.10 2000/05/23 18:03:36 acheng Exp $
+ *   $Id: ncgen.l,v 1.13 2003/12/10 21:15:27 epourmal Exp $
  *********************************************************************/
 
 #define	STREQ(a, b)	(*(a) == *(b) && strcmp((a), (b)) == 0)
@@ -134,7 +134,7 @@
 		    yyerror(errstr);
 		}
 
-#if defined __alpha || (_MIPS_SZLONG == 64) || defined IA64
+#if defined __alpha || (_MIPS_SZLONG == 64) || defined __ia64 || (defined __sun && defined _LP64) || defined AIX5L64 || defined __x86_64__
 		if (dd < INT_MIN  ||  dd > INT_MAX) 
 #else
 #if defined (_CRAYMPP)

Added: packages/libhdf4/branches/upstream/current/mfhdf/nctest/Makefile.am
===================================================================
--- packages/libhdf4/branches/upstream/current/mfhdf/nctest/Makefile.am	                        (rev 0)
+++ packages/libhdf4/branches/upstream/current/mfhdf/nctest/Makefile.am	2007-05-15 09:53:05 UTC (rev 831)
@@ -0,0 +1,32 @@
+#############################################################################
+##                      Setup for building programs                        ##
+#############################################################################
+
+## Setup the different includes and preprocessor #defines we need.
+INCLUDES=-I$(top_srcdir)/hdf/src        \
+         -I$(top_srcdir)/mfhdf/libsrc   \
+         -I$(top_srcdir)/mfhdf/port     \
+         -I../libsrc
+DEFINES=-DNDEBUG -DHDF
+AM_CPPFLAGS=$(INCLUDES) $(DEFINES)
+
+#############################################################################
+##                          Programs to build                              ##
+#############################################################################
+
+TESTS = nctest
+check_PROGRAMS = nctest
+
+# Information for building the "ncgen" program
+nctest_SOURCES = add.c atttests.c cdftests.c dimtests.c driver.c emalloc.c  \
+                 error.c misctest.c rec.c slabs.c val.c varget_unlim.c      \
+                 varget.c vargetg.c varput.c varputg.c vardef.c vartests.c  \
+                 vputget.c vputgetg.c
+nctest_LDADD = ../libsrc/libmfhdf.a $(top_builddir)/hdf/src/libdf.a
+nctest_DEPENDENCIES = $(top_builddir)/hdf/src/libdf.a ../libsrc/libmfhdf.a
+
+#############################################################################
+##                          And the cleanup                                ##
+#############################################################################
+
+DISTCLEANFILES=test2.nc test.nc

Modified: packages/libhdf4/branches/upstream/current/mfhdf/nctest/Makefile.in
===================================================================
--- packages/libhdf4/branches/upstream/current/mfhdf/nctest/Makefile.in	2007-05-15 09:05:29 UTC (rev 830)
+++ packages/libhdf4/branches/upstream/current/mfhdf/nctest/Makefile.in	2007-05-15 09:53:05 UTC (rev 831)
@@ -1,730 +1,529 @@
-# Makefile for netCDF (semi)exhaustive test.
-#
-# $Id: Makefile.in,v 1.21 2000/08/30 00:11:23 wendling Exp $
-# NOTE: This Makefile.in is used by the Cygnus 'configure' script to
-#       generate the top level Makefile.
+# Makefile.in generated by automake 1.7.7 from Makefile.am.
+# @configure_input@
 
-# ############# Start of system configuration section. #############
+# Copyright 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003
+# 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.
 
-# 'srcdir' Gets set to directory this Makefile is found in
-srcdir = .
-TOP_SRCDIR = ../..
+# 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.
 
-prefix = $(TOP_SRCDIR)/NewHDF
+ at SET_MAKE@
 
-exec_prefix = $(prefix)
-tooldir = $(exec_prefix)/$(target)
+#############################################################################
+#############################################################################
 
-program_transform_name =
+srcdir = @srcdir@
+top_srcdir = @top_srcdir@
+VPATH = @srcdir@
+pkgdatadir = $(datadir)/@PACKAGE@
+pkglibdir = $(libdir)/@PACKAGE@
+pkgincludedir = $(includedir)/@PACKAGE@
+top_builddir = ../..
 
-datadir = $(prefix)/lib
-mandir = $(prefix)/man
-man1dir = $(mandir)/man1
-man2dir = $(mandir)/man2
-man3dir = $(mandir)/man3
-man4dir = $(mandir)/man4
-man5dir = $(mandir)/man5
-man6dir = $(mandir)/man6
-man7dir = $(mandir)/man7
-man8dir = $(mandir)/man8
-man9dir = $(mandir)/man9
-docdir = $(datadir)/doc
+am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
+INSTALL = @INSTALL@
+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 = :
+host_triplet = @host@
+ACLOCAL = @ACLOCAL@
+AMDEP_FALSE = @AMDEP_FALSE@
+AMDEP_TRUE = @AMDEP_TRUE@
+AMTAR = @AMTAR@
+AR = @AR@
+AUTOCONF = @AUTOCONF@
+AUTOHEADER = @AUTOHEADER@
+AUTOMAKE = @AUTOMAKE@
+AWK = @AWK@
+CC = @CC@
+CCDEPMODE = @CCDEPMODE@
+CFLAGS = @CFLAGS@
+CPP = @CPP@
+CPPFLAGS = @CPPFLAGS@
+CXX = @CXX@
+CXXCPP = @CXXCPP@
+CXXDEPMODE = @CXXDEPMODE@
+CXXFLAGS = @CXXFLAGS@
+CYGPATH_W = @CYGPATH_W@
+DEFS = @DEFS@
+DEPDIR = @DEPDIR@
+DIFF = @DIFF@
+ECHO_C = @ECHO_C@
+ECHO_N = @ECHO_N@
+ECHO_T = @ECHO_T@
+EGREP = @EGREP@
+EXEEXT = @EXEEXT@
+F77 = @F77@
+FFLAGS = @FFLAGS@
+HDF_BUILD_FORTRAN_FALSE = @HDF_BUILD_FORTRAN_FALSE@
+HDF_BUILD_FORTRAN_TRUE = @HDF_BUILD_FORTRAN_TRUE@
+HDF_BUILD_XDR_FALSE = @HDF_BUILD_XDR_FALSE@
+HDF_BUILD_XDR_TRUE = @HDF_BUILD_XDR_TRUE@
+INSTALL_DATA = @INSTALL_DATA@
+INSTALL_PROGRAM = @INSTALL_PROGRAM@
+INSTALL_SCRIPT = @INSTALL_SCRIPT@
+INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
+LDFLAGS = @LDFLAGS@
+LEX = @LEX@
+LEXLIB = @LEXLIB@
+LEX_OUTPUT_ROOT = @LEX_OUTPUT_ROOT@
+LIBOBJS = @LIBOBJS@
+LIBS = @LIBS@
+LN_S = @LN_S@
+LTLIBOBJS = @LTLIBOBJS@
+MAINT = @MAINT@
+MAINTAINER_MODE_FALSE = @MAINTAINER_MODE_FALSE@
+MAINTAINER_MODE_TRUE = @MAINTAINER_MODE_TRUE@
+MAKEINFO = @MAKEINFO@
+NEQN = @NEQN@
+OBJEXT = @OBJEXT@
+PACKAGE = @PACKAGE@
+PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
+PACKAGE_NAME = @PACKAGE_NAME@
+PACKAGE_STRING = @PACKAGE_STRING@
+PACKAGE_TARNAME = @PACKAGE_TARNAME@
+PACKAGE_VERSION = @PACKAGE_VERSION@
+PATH_SEPARATOR = @PATH_SEPARATOR@
+RANLIB = @RANLIB@
+SET_MAKE = @SET_MAKE@
+SHELL = @SHELL@
+STRIP = @STRIP@
+TBL = @TBL@
+VERSION = @VERSION@
+YACC = @YACC@
+ac_ct_CC = @ac_ct_CC@
+ac_ct_CXX = @ac_ct_CXX@
+ac_ct_F77 = @ac_ct_F77@
+ac_ct_RANLIB = @ac_ct_RANLIB@
+ac_ct_STRIP = @ac_ct_STRIP@
+am__fastdepCC_FALSE = @am__fastdepCC_FALSE@
+am__fastdepCC_TRUE = @am__fastdepCC_TRUE@
+am__fastdepCXX_FALSE = @am__fastdepCXX_FALSE@
+am__fastdepCXX_TRUE = @am__fastdepCXX_TRUE@
+am__include = @am__include@
+am__leading_dot = @am__leading_dot@
+am__quote = @am__quote@
+bindir = @bindir@
+build = @build@
+build_alias = @build_alias@
+build_cpu = @build_cpu@
+build_os = @build_os@
+build_vendor = @build_vendor@
+datadir = @datadir@
+exec_prefix = @exec_prefix@
+host = @host@
+host_alias = @host_alias@
+host_cpu = @host_cpu@
+host_os = @host_os@
+host_vendor = @host_vendor@
+includedir = @includedir@
+infodir = @infodir@
+install_sh = @install_sh@
+libdir = @libdir@
+libexecdir = @libexecdir@
+localstatedir = @localstatedir@
+mandir = @mandir@
+oldincludedir = @oldincludedir@
+prefix = @prefix@
+program_transform_name = @program_transform_name@
+sbindir = @sbindir@
+sharedstatedir = @sharedstatedir@
+sysconfdir = @sysconfdir@
+target_alias = @target_alias@
 
-SHELL = /bin/sh
+INCLUDES = -I$(top_srcdir)/hdf/src        \
+         -I$(top_srcdir)/mfhdf/libsrc   \
+         -I$(top_srcdir)/mfhdf/port     \
+         -I../libsrc
 
-INSTALL = ${TOP_SRCDIR}/install-sh -c
-INSTALL_PROGRAM = $(INSTALL)
-INSTALL_DATA = $(INSTALL) -m 644
+DEFINES = -DNDEBUG -DHDF
+AM_CPPFLAGS = $(INCLUDES) $(DEFINES)
 
-# /usr/local/bin/m4 (GNU version?)
-M4   = /usr/local/bin/m4
-# /usr/local/bin/perl (GNU version?)
-PERL = /usr/local/bin/perl
 
-# Name of achive randomizer, usually ranlib (use 'touch' if non-existant)
-RANLIB = ranlib
+#############################################################################
+#############################################################################
+TESTS = nctest
+check_PROGRAMS = nctest
 
-# Name of library archiver and flags to send, default 'AR=ar', 'ARFLAGS=r'
-AR = ar
-ARFLAGS = rc
+# Information for building the "ncgen" program
+nctest_SOURCES = add.c atttests.c cdftests.c dimtests.c driver.c emalloc.c  \
+                 error.c misctest.c rec.c slabs.c val.c varget_unlim.c      \
+                 varget.c vargetg.c varput.c varputg.c vardef.c vartests.c  \
+                 vputget.c vputgetg.c
 
-# Name of remove utility, default 'RM=/bin/rm', 'RMFLAGS=-f'
-RM = /bin/rm
-RMFLAGS = -f
+nctest_LDADD = ../libsrc/libmfhdf.a $(top_builddir)/hdf/src/libdf.a
+nctest_DEPENDENCIES = $(top_builddir)/hdf/src/libdf.a ../libsrc/libmfhdf.a
 
-AS = as
-CC = gcc
-CFLAGS = -ansi
-FC = f77
-FFLAGS=
 
-# Set for document generation
-MAKEINFO = makeinfo
-TEXI2DVI = texi2dvi
+#############################################################################
+#############################################################################
+DISTCLEANFILES = test2.nc test.nc
+subdir = mfhdf/nctest
+ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
+mkinstalldirs = $(SHELL) $(top_srcdir)/bin/mkinstalldirs
+CONFIG_HEADER = $(top_builddir)/hdf/src/h4config.h
+CONFIG_CLEAN_FILES =
+check_PROGRAMS = nctest$(EXEEXT)
+am_nctest_OBJECTS = add.$(OBJEXT) atttests.$(OBJEXT) cdftests.$(OBJEXT) \
+	dimtests.$(OBJEXT) driver.$(OBJEXT) emalloc.$(OBJEXT) \
+	error.$(OBJEXT) misctest.$(OBJEXT) rec.$(OBJEXT) \
+	slabs.$(OBJEXT) val.$(OBJEXT) varget_unlim.$(OBJEXT) \
+	varget.$(OBJEXT) vargetg.$(OBJEXT) varput.$(OBJEXT) \
+	varputg.$(OBJEXT) vardef.$(OBJEXT) vartests.$(OBJEXT) \
+	vputget.$(OBJEXT) vputgetg.$(OBJEXT)
+nctest_OBJECTS = $(am_nctest_OBJECTS)
+nctest_LDFLAGS =
 
-# Directory in which to install binaries
-bindir = $(exec_prefix)/bin
+DEFAULT_INCLUDES =  -I. -I$(srcdir) -I$(top_builddir)/hdf/src
+depcomp = $(SHELL) $(top_srcdir)/bin/depcomp
+am__depfiles_maybe = depfiles
+ at AMDEP_TRUE@DEP_FILES = ./$(DEPDIR)/add.Po ./$(DEPDIR)/atttests.Po \
+ at AMDEP_TRUE@	./$(DEPDIR)/cdftests.Po ./$(DEPDIR)/dimtests.Po \
+ at AMDEP_TRUE@	./$(DEPDIR)/driver.Po ./$(DEPDIR)/emalloc.Po \
+ at AMDEP_TRUE@	./$(DEPDIR)/error.Po ./$(DEPDIR)/misctest.Po \
+ at AMDEP_TRUE@	./$(DEPDIR)/rec.Po ./$(DEPDIR)/slabs.Po \
+ at AMDEP_TRUE@	./$(DEPDIR)/val.Po ./$(DEPDIR)/vardef.Po \
+ at AMDEP_TRUE@	./$(DEPDIR)/varget.Po ./$(DEPDIR)/varget_unlim.Po \
+ at AMDEP_TRUE@	./$(DEPDIR)/vargetg.Po ./$(DEPDIR)/varput.Po \
+ at AMDEP_TRUE@	./$(DEPDIR)/varputg.Po ./$(DEPDIR)/vartests.Po \
+ at AMDEP_TRUE@	./$(DEPDIR)/vputget.Po ./$(DEPDIR)/vputgetg.Po
+COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \
+	$(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
+CCLD = $(CC)
+LINK = $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@
+DIST_SOURCES = $(nctest_SOURCES)
+DIST_COMMON = README $(srcdir)/Makefile.in Makefile.am
+SOURCES = $(nctest_SOURCES)
 
-# Directory in which to install header files.
-includedir = $(prefex)/include
+all: all-am
 
-# Directory in which to install library files.
-libdir = $(prefix)/lib
-
-# Directory in which to install documentation info files.
-infodir = $(prefix)/info
-
-# ------------ General Macros for NETCDF --------------------
-INCDIR	 = $(prefix)/include
-HDF_LIB  = $(TOP_SRCDIR)/hdf/src/libdf.a
-HDF_INC  = $(TOP_SRCDIR)/hdf/src/
-PABLO_HINC = $(TOP_SRCDIR)/hdf/pablo
-FMPOOL_INC = $(TOP_SRCDIR)/hdf/fmpool
-JPEG_LIB = $(TOP_SRCDIR)/hdf/jpeg/libjpeg.a
-ZLIB_LIB = $(TOP_SRCDIR)/hdf/zlib/libz.a
-NETCDF_INC = $(TOP_SRCDIR)/mfhdf/libsrc
-PORT_INC   = $(TOP_SRCDIR)/mfhdf/port
-CPP	   = $(CC) -E
-CFLAGS_NETCDF = 
-CPPFLAGS_HDF  = -DNDEBUG -DHDF $(FMPOOL_FLAGS)
-CPP_NETCDF    = -I. -I$(HDF_INC) -I$(NETCDF_INC) -I$(PORT_INC)
-CPPFLAGS_LIB	= $(SWAP) $(NETLONG) 
-CPPFLAGS_XDR	= $(CPP_XDR) 
-CPPFLAGS_NETCDF =  $(CPPFLAGS_XDR) $(CPP_NETCDF) $(CPPFLAGS_LIB) $(CPPFLAGS_HDF) 
-FFLAGS  =
-NCDUMP	= 
-NCGEN	= 
-NEQN	= neqn
-OS	= 
-TBL	= tbl
-WHICH	= which
-FTPDIR	= 
-VERSION	= 2.3.2
-LEX	= lex
-YACC	= yacc
-DIFF    = diff
-DIFF_FLAGS = -w
-
-
-#### ----- host and target specific makefile fragments come in here.-------
-### ------------------- end of makefile fragments -------------------------
-# ############# End of system configuration section. ###############
-
-PROGRAM		= nctest
-#CPP_NETCDF	= -I../libsrc
-#CPPFLAGS	= $(CPPFLAGS_NCT)
-#HDF_LIB         = @HDF_LIB@
-#JPEG_LIB        = @JPEG_LIB@
-#CFLAGS		= $(CFLAGS_NCT)
-MANIFEST = $(DISTFILES)
-DISTFILES	= Makefile.in README add.c add.h atttests.c cdftests.c \
-		  depend dimtests.c driver.c emalloc.c emalloc.h error.c \
-		  error.h misctest.c msoft.mk rec.c slabs.c testcdf.h \
-		  tests.h val.c val.h vardef.c varget.c vargetg.c varput.c \
-		  varputg.c vartests.c vputget.c vputgetg.c make.com
-LIBNAME		= mfhdf
-LD_NETCDF	= ../libsrc/libmfhdf.a
-SRCS		= varget.c vargetg.c varput.c varputg.c vardef.c vartests.c \
-		  vputget.c vputgetg.c driver.c cdftests.c dimtests.c rec.c \
-		  atttests.c misctest.c add.c error.c emalloc.c val.c slabs.c
-OBJS		= varget.o vargetg.o varput.o varputg.o vardef.o vartests.o \
-		  vputget.o vputgetg.o driver.o cdftests.o dimtests.o  rec.o \
-		  atttests.o misctest.o add.o error.o emalloc.o val.o slabs.o
-#LD_XDR		= @LD_XDR@
-LIBS		= $(LD_NETCDF) $(LD_XDR) $(HDF_LIB) $(JPEG_LIB) $(ZLIB_LIB) $(LIBSX)
-GARBAGE		= $(PROGRAM) lint.out *.nc *.cdf *.log
-
-all::		program
-
-test:		$(PROGRAM)
-	@ echo "==========================="
-	@ echo "netCDF C interface tests"
-	@ echo "==========================="
-	./$(PROGRAM)
-
-$(PROGRAM):   ../libsrc/libmfhdf.a
-
-install::
-
-nctime:		nctime.o
-	$(CC) $(CFLAGS) $(CFLAGS_NETCDF) nctime.o $(LIBS) -o $@
-
-debug:      ../libsrc/libmfhdf.a
-	purify $(CC) $(CFLAGS) $(CFLAGS_NETCDF) $(OBJS) $(LIBS) -o pnctest
-
-perfs:      ../libsrc/libmfhdf.a
-	quantify $(CC) $(CFLAGS) $(CFLAGS_NETCDF) $(OBJS) $(LIBS) -o qnctest
-
-saber_src:
-	#load -C $(CPPFLAGS) $(CPPFLAGS_NETCDF) $(SRCS) $(LIBS)
-
-# This is the master.mk.in makefile.  It contains general rules.
-#
-
 .SUFFIXES:
-.SUFFIXES:	.so .o .i .c .fc .f .F .l .y
+.SUFFIXES: .c .o .obj
+$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ Makefile.am  $(top_srcdir)/configure.ac $(ACLOCAL_M4)
+	cd $(top_srcdir) && \
+	  $(AUTOMAKE) --foreign  mfhdf/nctest/Makefile
+Makefile: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.in  $(top_builddir)/config.status
+	cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)
 
-# ###########################################################################
-# General Macros: (moved to make file fragment )
-# ###########################################################################
-#CPP		= @CPP@
-#NCDUMP		= @NCDUMP@
-#NCGEN		= @NCGEN@
-#NEQN		= @NEQN@
-#OS		= @OS@
-#TBL		= @TBL@
-#WHICH		= @WHICH@
+clean-checkPROGRAMS:
+	-test -z "$(check_PROGRAMS)" || rm -f $(check_PROGRAMS)
+nctest$(EXEEXT): $(nctest_OBJECTS) $(nctest_DEPENDENCIES) 
+	@rm -f nctest$(EXEEXT)
+	$(LINK) $(nctest_LDFLAGS) $(nctest_OBJECTS) $(nctest_LDADD) $(LIBS)
 
-# ###########################################################################
-# Recursive Macros (command-line changes to others aren't supported):
-# ###########################################################################
-SUBDIR_MACROS = CC="$(CC)" \
-	CFLAGS="$(CFLAGS)" \
-	CPP="$(CPP)" \
-	exec_prefix="$(exec_prefix)" \
-	FC="$(FC)" \
-	prefix="$(prefix)"
+mostlyclean-compile:
+	-rm -f *.$(OBJEXT) core *.core
 
-LOCAL_MACROS  = CC="$(CC)" \
-	CFLAGS="$(CFLAGS)" \
-	CPP="$(CPP)" \
-	CPPFLAGS="$(CPPFLAGS)" \
-	exec_prefix="$(exec_prefix)" \
-	FC="$(FC)" \
-	prefix="$(prefix)"
+distclean-compile:
+	-rm -f *.tab.c
 
-# ###########################################################################
-# Recursive make(1)s in Subdirectories:
-# ###########################################################################
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/add.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/atttests.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/cdftests.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/dimtests.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/driver.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/emalloc.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/error.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/misctest.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/rec.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/slabs.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/val.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/vardef.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/varget.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/varget_unlim.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/vargetg.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/varput.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/varputg.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/vartests.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/vputget.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/vputgetg.Po at am__quote@
 
-subdir_dummy_target $(SUBDIR_TARGETS):
-	@echo ""
-	@dir=`echo $@ | sed 's,/.*,,'`; \
-	    target=`echo $@ | sed "s,$$dir/,,"`; \
-	    cd $$dir && \
-	    echo "making \`$$target' in directory `pwd`" && \
-	    echo "" && \
-	    $(MAKE) $(MFLAGS) $(SUBDIR_MACROS) \
-		$$target || exit 1
-	@echo ""
-	@echo "returning to directory `pwd`"
-	@echo ""
-
-
-# ###########################################################################
-# Compilation:
-# ###########################################################################
-#FORTC		= @FORTC@
-
-# Compile FORTRAN code.
-#
-.f.o:
-	$(FC) -c $(FFLAGS) $<
-.F.o:
-	ln -s $< $$$$.c \
-	&& $(CPP) -DUD_FORTRAN_SOURCE $(CPPFLAGS) $(CPPFLAGS_NETCDF) $$$$.c \
-	    | sed '/^# *[0-9]/d' > $*.f \
-	|| (rm -f $*.f $$$$.c; exit 1) \
-	&& rm $$$$.c
-	$(FC) -c $(FFLAGS) $*.f
-.F.f:
-	ln -s $< $$$$.c \
-	&& $(CPP) -DUD_FORTRAN_SOURCE $(CPPFLAGS) $(CPPFLAGS_NETCDF) $$$$.c \
-	    | sed '/^# *[0-9]/d' > $@ \
-	|| (rm -f $@ $$$$.c; exit 1) \
-	&& rm $$$$.c
-
-# Generate FORTRAN-callable C code.
-#
-.fc.o:
-	$(FORTC) -O $(OS) $< > $*.c \
-	    || ( rm -f $*.c; exit 1)
-	$(CC) -c $(CFLAGS) $(CFLAGS_NETCDF) $(CPPFLAGS) $(CPPFLAGS_NETCDF) $*.c
-.fc.c:
-	$(FORTC) -O $(OS) $< > $@ \
-	    || (rm -f $*.c; exit 1)
-
-# Compile C code.
-#
 .c.o:
-	$(CC) -c $(CPPFLAGS) $(CPPFLAGS_NETCDF) $(CFLAGS) $(CFLAGS_NETCDF) $<
+ at am__fastdepCC_TRUE@	if $(COMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" \
+ at am__fastdepCC_TRUE@	  -c -o $@ `test -f '$<' || echo '$(srcdir)/'`$<; \
+ at am__fastdepCC_TRUE@	then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; \
+ at am__fastdepCC_TRUE@	else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; \
+ at am__fastdepCC_TRUE@	fi
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	depfile='$(DEPDIR)/$*.Po' tmpdepfile='$(DEPDIR)/$*.TPo' @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	$(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCC_FALSE@	$(COMPILE) -c `test -f '$<' || echo '$(srcdir)/'`$<
 
-# Compile lex(1) code.  This rule is here to ensure the use of CPPFLAGS.
-# 
-.l.o:
-	rm -f $*.c
-	$(LEX) -t $< > $*.c
-	$(CC) -c $(CPPFLAGS) $(CPPFLAGS_NETCDF) $(CFLAGS) $(CFLAGS_NETCDF) $*.c
-	rm $*.c
+.c.obj:
+ at am__fastdepCC_TRUE@	if $(COMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" \
+ at am__fastdepCC_TRUE@	  -c -o $@ `if test -f '$<'; then $(CYGPATH_W) '$<'; else $(CYGPATH_W) '$(srcdir)/$<'; fi`; \
+ at am__fastdepCC_TRUE@	then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; \
+ at am__fastdepCC_TRUE@	else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; \
+ at am__fastdepCC_TRUE@	fi
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	depfile='$(DEPDIR)/$*.Po' tmpdepfile='$(DEPDIR)/$*.TPo' @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	$(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCC_FALSE@	$(COMPILE) -c `if test -f '$<'; then $(CYGPATH_W) '$<'; else $(CYGPATH_W) '$(srcdir)/$<'; fi`
+uninstall-info-am:
 
-# C preprocess.  
-#   NB: 
-#	1. The output `file' is not created but appears on standard output;
-#	2. Line numbering information is kept.
-#
-.c.i:
-	$(CPP) $(CPPFLAGS) $(CPPFLAGS_NETCDF) $<
+ETAGS = etags
+ETAGSFLAGS =
 
+CTAGS = ctags
+CTAGSFLAGS =
 
-# ###########################################################################
-# Libraries:
-# ###########################################################################
-# RANLIB		= @RANLIB@
-LIBDIR		= $(prefix)/lib
-LIB_A		= lib$(LIBRARY).a
+tags: TAGS
 
-library::		$(LIB_A)
+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; } \
+	       END { for (i in files) print i; }'`; \
+	mkid -fID $$unique
 
-# The following rule is forced because the library can be created by a
-# makefile in another directory prior to the execution of the following rule.
-#
-$(LIB_A):		$(LIBOBJS) FORCE
-	$(AR) rcuv $@ $(LIBOBJS)
-	$(RANLIB) $@
+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; } \
+	       END { for (i in files) print i; }'`; \
+	test -z "$(ETAGS_ARGS)$$tags$$unique" \
+	  || $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
+	     $$tags $$unique
 
-# The following rule is for those makefiles needing to install object
-# modules in a library in another directory.  They need only define 
-# REMOTE_LIBRARY and LIBOBJS.  The rule is forced for the same reason as the
-# $(LIB_A) rule.
-#
-lib_dummy $(REMOTE_LIBRARY):	$(LIBOBJS) FORCE
-	$(AR) rcuv $@ $(LIBOBJS)
-	$(RANLIB) $@
+ctags: CTAGS
+CTAGS:  $(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; } \
+	       END { for (i in files) print i; }'`; \
+	test -z "$(CTAGS_ARGS)$$tags$$unique" \
+	  || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
+	     $$tags $$unique
 
-installed_libfiles:	FORCE
-	@if [ -n "$(LIBFILES)" ]; then \
-	    libfiles="$(LIBFILES)"; \
-	    for libfile in $$libfiles; do \
-		$(MAKE) $(MFLAGS) $(LOCAL_MACROS) \
-		    LIBDIR=$(LIBDIR) LIBFILE=$$libfile \
-		    installed_libfile || exit 1; \
-	    done; \
-	else \
-	    :; \
-	fi
+GTAGS:
+	here=`$(am__cd) $(top_builddir) && pwd` \
+	  && cd $(top_srcdir) \
+	  && gtags -i $(GTAGS_ARGS) $$here
 
-installed_library::	FORCE
-	@$(MAKE) $(MFLAGS) $(LOCAL_MACROS) \
-	    LIBDIR=$(LIBDIR) LIBFILE=$(LIB_A) \
-	    installed_libfile
+distclean-tags:
+	-rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
 
-# The following target decouples the previous targets from the actual rule;
-# thus, eliminating extraneous make(1) messages.
-#
-installed_libfile:	$(LIBDIR)/$(LIBFILE)
-
-$(LIBDIR)/$(LIBFILE):	$(LIBDIR) $(LIBFILE)
-	$(INSTALL_DATA) $(LIBFILE) $@
-
-dummy_libdir $(LIBDIR):
-	mkdir -p $@
-	chmod u+rwx,g+rws,o=rx $@
-
-LIB_SO		= lib$(LIBRARY).so.$(MAJOR_NO).$(MINOR_NO)
-LIB_SA		= lib$(LIBRARY).sa.$(MAJOR_NO).$(MINOR_NO)
-
-#library::		FORCE
-#	@so_objs=`echo $(LIBOBJS) | sed 's/\.o/.so/g'`; \
-#	if [ -z "$$so_objs" ]; then \
-#	    :; \
-#	else \
-#	    $(MAKE) $(MFLAGS) $(LIB_SO) \
-#		SO_OBJS="$$so_objs"; \
-#	fi
-#	@if [ -z "$(SA_OBJS)" ]; then \
-#	    :; \
-#	else \
-#	    $(MAKE) $(MFLAGS) $(LIB_SA); \
-#	fi
-
-$(LIB_SO):	$(SO_OBJS)
-	ld -assert pure-text $(SO_OBJS) -o $@
-$(LIB_SA):	$(SA_OBJS) FORCE
-	$(AR) rcuv $@ $(SA_OBJS)
-
-.fc.so:
-	$(FORTC) -O $(OS) $< > $*.c \
-	    || (rm -f $*.c; exit 1)
-	$(CC) -c -pic $(CFLAGS) $(CFLAGS_NETCDF) $(CPPFLAGS) $(CPPFLAGS_NETCDF) $*.c -o $$$$.o \
-	    || (rm -f $$$$.o; exit 1)
-	mv $$$$.o $@
-.c.so:
-	$(CC) -c -pic $(CFLAGS) $(CFLAGS_NETCDF) $(CPPFLAGS) $(CPPFLAGS_NETCDF) $< -o $$$$.o \
-	    || (rm -f $$$$.o; exit 1)
-	mv $$$$.o $@
-
-#installed_library::	$(LIBDIR)/$(LIB_SO)
-#	@if [ -z "$(SA_OBJS)" ]; then \
-#	    :; \
-#	else \
-#	    $(MAKE) $(MFLAGS) $(LIBDIR)/$(LIB_SA); \
-#	fi
-
-$(LIBDIR)/$(LIB_SO):	$(LIBDIR) $(LIB_SO)
-	$(INSTALL_DATA) $(LIB_SO) $(LIBDIR)/$(LIB_SO)
-$(LIBDIR)/$(LIB_SA):	$(LIBDIR) $(LIB_SA)
-	$(INSTALL_DATA) $(LIB_SA) $(LIBDIR)/$(LIB_SA)
-
-
-# ###########################################################################
-# Programs:
-# ###########################################################################
-BINDIR		= $(exec_prefix)/bin
-
-programs:	$(PROGRAMS)
-program:
-	@if [ -z "$(PROGRAM)" ]; then \
-	    : true; \
-	else \
-	    if [ -z "$(LIBRARY)" ]; then \
-		: true; \
+check-TESTS: $(TESTS)
+	@failed=0; all=0; xfail=0; xpass=0; skip=0; \
+	srcdir=$(srcdir); export srcdir; \
+	list='$(TESTS)'; \
+	if test -n "$$list"; then \
+	  for tst in $$list; do \
+	    if test -f ./$$tst; then dir=./; \
+	    elif test -f $$tst; then dir=; \
+	    else dir="$(srcdir)/"; fi; \
+	    if $(TESTS_ENVIRONMENT) $${dir}$$tst; then \
+	      all=`expr $$all + 1`; \
+	      case " $(XFAIL_TESTS) " in \
+	      *" $$tst "*) \
+	        xpass=`expr $$xpass + 1`; \
+	        failed=`expr $$failed + 1`; \
+	        echo "XPASS: $$tst"; \
+	      ;; \
+	      *) \
+	        echo "PASS: $$tst"; \
+	      ;; \
+	      esac; \
+	    elif test $$? -ne 77; then \
+	      all=`expr $$all + 1`; \
+	      case " $(XFAIL_TESTS) " in \
+	      *" $$tst "*) \
+	        xfail=`expr $$xfail + 1`; \
+	        echo "XFAIL: $$tst"; \
+	      ;; \
+	      *) \
+	        failed=`expr $$failed + 1`; \
+	        echo "FAIL: $$tst"; \
+	      ;; \
+	      esac; \
 	    else \
-		$(MAKE) $(MFLAGS) $(LOCAL_MACROS) library; \
+	      skip=`expr $$skip + 1`; \
+	      echo "SKIP: $$tst"; \
 	    fi; \
-	    $(MAKE) $(MFLAGS) $(LOCAL_MACROS) $(PROGRAM); \
-	fi
+	  done; \
+	  if test "$$failed" -eq 0; then \
+	    if test "$$xfail" -eq 0; then \
+	      banner="All $$all tests passed"; \
+	    else \
+	      banner="All $$all tests behaved as expected ($$xfail expected failures)"; \
+	    fi; \
+	  else \
+	    if test "$$xpass" -eq 0; then \
+	      banner="$$failed of $$all tests failed"; \
+	    else \
+	      banner="$$failed of $$all tests did not behave as expected ($$xpass unexpected passes)"; \
+	    fi; \
+	  fi; \
+	  dashes="$$banner"; \
+	  skipped=""; \
+	  if test "$$skip" -ne 0; then \
+	    skipped="($$skip tests were not run)"; \
+	    test `echo "$$skipped" | wc -c` -gt `echo "$$banner" | wc -c` && \
+	      dashes="$$skipped"; \
+	  fi; \
+	  report=""; \
+	  if test "$$failed" -ne 0 && test -n "$(PACKAGE_BUGREPORT)"; then \
+	    report="Please report to $(PACKAGE_BUGREPORT)"; \
+	    test `echo "$$report" | wc -c` -gt `echo "$$banner" | wc -c` && \
+	      dashes="$$report"; \
+	  fi; \
+	  dashes=`echo "$$dashes" | sed s/./=/g`; \
+	  echo "$$dashes"; \
+	  echo "$$banner"; \
+	  test -n "$$skipped" && echo "$$skipped"; \
+	  test -n "$$report" && echo "$$report"; \
+	  echo "$$dashes"; \
+	  test "$$failed" -eq 0; \
+	else :; fi
+DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
 
-dummy_prog $(PROGRAM):	$(OBJS)
-	@if [ -r $@.f -o -r $@.F ]; then \
-	    ld='$(FC) $(FFLAGS)'; \
-	else \
-	    ld='$(CC) $(CFLAGS) $(CFLAGS_NETCDF) '; \
-	fi; \
-	cmd="$$ld $(OBJS) $(LIBS) -o $@"; \
-	echo $$cmd; \
-	$$cmd \
-	    || (rm -f $@; exit 1)
+top_distdir = ../..
+distdir = $(top_distdir)/$(PACKAGE)-$(VERSION)
 
-installed_programs:	FORCE
-	@$(MAKE) $(MFLAGS) $(LOCAL_MACROS) installed_binfiles \
-	    BINDIR=$(BINDIR) BINFILES="$(PROGRAMS)"
+distdir: $(DISTFILES)
+	@srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \
+	topsrcdirstrip=`echo "$(top_srcdir)" | sed 's|.|.|g'`; \
+	list='$(DISTFILES)'; for file in $$list; do \
+	  case $$file in \
+	    $(srcdir)/*) file=`echo "$$file" | sed "s|^$$srcdirstrip/||"`;; \
+	    $(top_srcdir)/*) file=`echo "$$file" | sed "s|^$$topsrcdirstrip/|$(top_builddir)/|"`;; \
+	  esac; \
+	  if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
+	  dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \
+	  if test "$$dir" != "$$file" && test "$$dir" != "."; then \
+	    dir="/$$dir"; \
+	    $(mkinstalldirs) "$(distdir)$$dir"; \
+	  else \
+	    dir=''; \
+	  fi; \
+	  if test -d $$d/$$file; then \
+	    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
+	$(MAKE) $(AM_MAKEFLAGS) $(check_PROGRAMS)
+	$(MAKE) $(AM_MAKEFLAGS) check-TESTS
+check: check-am
+all-am: Makefile
 
-installed_binfiles:	FORCE
-	@if [ -n "$(BINFILES)" ]; then \
-	    binfiles="$(BINFILES)"; \
-	    for binfile in $$binfiles; do \
-		$(MAKE) $(MFLAGS) $(LOCAL_MACROS) \
-		    BINDIR=$(BINDIR) BINFILE=$$binfile \
-		    installed_binfile || exit 1; \
-	    done; \
-	else \
-	    :; \
-	fi
+installdirs:
+install: install-am
+install-exec: install-exec-am
+install-data: install-data-am
+uninstall: uninstall-am
 
-installed_program:	FORCE
-	@$(MAKE) $(MFLAGS) $(LOCAL_MACROS) BINDIR=$(BINDIR) BINFILE=$(PROGRAM) \
-	    installed_binfile
+install-am: all-am
+	@$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
 
-# The following target decouples the previous targets from the actual rule;
-# thus, eliminating extraneous make(1) messages.
-#
-installed_binfile:	$(BINDIR)/$(BINFILE)
+installcheck: installcheck-am
+install-strip:
+	$(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
+	  INSTALL_STRIP_FLAG=-s \
+	  `test -z '$(STRIP)' || \
+	    echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
+mostlyclean-generic:
 
-$(BINDIR)/$(BINFILE):	$(BINDIR) $(BINFILE)
-	$(INSTALL_PROGRAM) $(BINFILE) $@
+clean-generic:
 
-dummy_bindir $(BINDIR):
-	mkdir -p $@
-	chmod u+rwx,g+rws,o=rx $@
+distclean-generic:
+	-rm -f $(CONFIG_CLEAN_FILES)
+	-test -z "$(DISTCLEANFILES)" || rm -f $(DISTCLEANFILES)
 
+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
 
-# ###########################################################################
-# Header files:
-# ###########################################################################
-installed_headers:	FORCE
-	@if [ -n "$(HEADERS)" ]; then \
-	    headers="$(HEADERS)"; \
-	    for header in $$headers; do \
-		$(MAKE) $(MFLAGS) $(LOCAL_MACROS) INCDIR=$(INCDIR) HEADER=$$header \
-		    installed_header || exit 1; \
-	    done; \
-	else \
-	    :; \
-	fi
+clean-am: clean-checkPROGRAMS clean-generic mostlyclean-am
 
-# The following target decouples the previous targets from the actual rule;
-# thus, eliminating extraneous make(1) messages.
-#
-installed_header:	$(INCDIR)/$(HEADER)
+distclean: distclean-am
+	-rm -rf ./$(DEPDIR)
+	-rm -f Makefile
 
-$(INCDIR)/$(HEADER):	$(INCDIR) $(HEADER)
-	$(INSTALL_DATA) $(HEADER) $@
+distclean-am: clean-am distclean-compile distclean-generic \
+	distclean-tags
 
-dummy_incdir $(INCDIR):
-	mkdir -p $@
-	chmod u+rwx,g+rws,o=rx $@
+dvi: dvi-am
 
+dvi-am:
 
-# ###########################################################################
-# `etc/' files:
-# ###########################################################################
-ETCDIR	= $(prefix)/etc
+info: info-am
 
-installed_etcfiles:
-	@if [ -n "$(ETCFILES)" ]; then \
-	    etcfiles="$(ETCFILES)"; \
-	    for etcfile in $$etcfiles; do \
-		$(MAKE) $(MFLAGS) $(LOCAL_MACROS) ETCDIR=$(ETCDIR) ETCFILE=$$etcfile \
-		    installed_etcfile || exit 1; \
-	    done; \
-	else \
-	    :; \
-	fi
+info-am:
 
-# The following target decouples the previous targets from the actual rule;
-# thus, eliminating extraneous make(1) messages.
-#
-installed_etcfile:	$(ETCDIR)/$(ETCFILE)
+install-data-am:
 
-$(ETCDIR)/$(ETCFILE):	$(ETCDIR) $(ETCFILE)
-	-mkdir -p $(ETCDIR)
-	-chmod u+rwx,g+rws,o=rx $(ETCDIR)
-	$(INSTALL_DATA) $(ETCFILE) $@
+install-exec-am:
 
-# ###########################################################################
-# Manual Pages:
-# ###########################################################################
-MANDIR	= $(prefix)/man
+install-info: install-info-am
 
-installed_manuals:	FORCE
-	@if [ -n "$(MANUALS)" ]; then \
-	    manuals="$(MANUALS)"; \
-	    for manual in $$manuals; do \
-		mandir=$(MANDIR)/man`echo $$manual | sed 's/.*\.\(.\).*/\1/'`; \
-		$(MAKE) $(MFLAGS) $(LOCAL_MACROS) MANDIR=$$mandir MANUAL=$$manual \
-		    installed_manual || exit 1; \
-	    done; \
-	else \
-	    :; \
-	fi
+install-man:
 
-# The following target decouples the previous targets from the actual rule;
-# thus, eliminating extraneous make(1) messages.
-#
-installed_manual:	$(MANDIR)/$(MANUAL)
+installcheck-am:
 
-# The first sed(1) editing command in the following replaces the expanded
-# RCS keyword `$Date ...' in the `.TH' macro line with something more 
-# appropriate to a manual page.
-#
-$(MANDIR)/$(MANUAL):	$(MANDIR) $(MANUAL)
-	sed \
-	 -e '/^\.TH/s/$$D\ate: \([0-9]*\)\/\([0-9]*\)\/\([0-9]*\).*\$$/\1-\2-\3/'\
-	 $(MANUAL) | $(TBL) | $(NEQN) > $@
-	chmod u=rw,og=r $@
+maintainer-clean: maintainer-clean-am
+	-rm -rf ./$(DEPDIR)
+	-rm -f Makefile
 
-dummy_mandir $(MANDIR):
-	mkdir -p $@
-	chmod u+rwx,g+rws,o=rx $@
+maintainer-clean-am: distclean-am maintainer-clean-generic
 
-# ###########################################################################
-# TeX-Info Pages:
-# ###########################################################################
-INFODIR       = $(prefix)/info
+mostlyclean: mostlyclean-am
 
-installed_infos:      FORCE
-	if [ -z "$(MAKEINFO)" ]; then \
-		echo 1>&2 "Can't install info(1) pages because no makeinfo(1)"; \
-	else \
-	  if [ -n "$(INFOS)" ]; then \
-	      infos="$(INFOS)"; \
-	      for info in $$infos; do \
-		$(MAKE) $(MFLAGS) $(LOCAL_MACROS) INFODIR=$(INFODIR) INFO=$$info \
-		installed_info || exit 1; \
-	      done; \
-	   else \
-	      :; \
-	   fi; \
-	fi;
-# The following target decouples the previous targets from the actual rule;
-# thus, eliminating extraneous make(1) messages.
-#
-installed_info:       $(INFODIR)/$(INFO)
+mostlyclean-am: mostlyclean-compile mostlyclean-generic
 
-$(INFODIR)/$(INFO):   $(INFODIR) $(INFO)
-	-mkdir -p $(INFODIR)
-	-chmod u+rwx,g+rws,o=rx $(INFODIR)
-	$(INSTALL_DATA) $(INFO) $@
+pdf: pdf-am
 
-# Rules for generating info pages:
-#
-.SUFFIXES:    .info .texi .texinfo .txn
-.texi.info:
-	@if [ -z "$(MAKEINFO)" ]; then \
-	  echo 1>&2 "Can't create $@ because no makeinfo(1)"; \
-	else \
-	  $(MAKEINFO) $< --no-split --output=$@; \
-	fi
-.texinfo.info:
-	@if [ -z "$(MAKEINFO)" ]; then \
-	  echo 1>&2 "Can't create $@ because no makeinfo(1)"; \
-	else \
-	  $(MAKEINFO) $< --no-split --output=$@; \
-	fi
-.txn.info:
-	@if [ -z "$(MAKEINFO)" ]; then \
-	  echo 1>&2 "Can't create $@ because no makeinfo(1)"; \
-	else \
-	  $(MAKEINFO) $< --no-split --output=$@; \
-	fi
+pdf-am:
 
-# Ensure that info page depends on canonical TeX-Info macros.
-#
-dummy_info $(INFO):   texinfo.tex
+ps: ps-am
 
-# ###########################################################################
-# Cleanup:
-# ###########################################################################
-clean::
-	rm -f $(GARBAGE) $(PROGRAM) a.out core *.o *.a *.so.* *.sa.* *.so \
-	    *.log
+ps-am:
 
-realclean::	distclean
-distclean::
-	rm -f $(GARBAGE) $(PROGRAM) a.out core *.o *.a *.so.* *.sa.* *.so \
-	    *.log Makefile config.status cc_id tags
+uninstall-am: uninstall-info-am
 
+.PHONY: CTAGS GTAGS all all-am check check-TESTS check-am clean \
+	clean-checkPROGRAMS clean-generic ctags distclean \
+	distclean-compile distclean-generic distclean-tags distdir dvi \
+	dvi-am info info-am install install-am install-data \
+	install-data-am install-exec install-exec-am install-info \
+	install-info-am install-man 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-info-am
 
-# ###########################################################################
-# Configuration:
-# ###########################################################################
-
-# The following target is touched because config.status won't update it if
-# it hasn't changed.
-#
-# The following is commented-out because the HPUX make(1) goes into a loop.
-#
-#Makefile:	config.status
-#	./config.status
-#	touch $@
-
-config.status:	cc_id configure
-	./configure --no-create
-
-cc_id:		FORCE
-	if test -r $@ && test "`cat $@`" = "$(CC)"; then \
-	    :; \
-	else \
-	    echo "$(CC)" > $@; \
-	fi
-
-configure:		configure.in
-	autoconf
-
-
-# ###########################################################################
-# Dependency maintenance:
-# ###########################################################################
-.PRECIOUS:	depend
-#
-# Note: The following rule will only work if the C compiler behaves correctly
-# when given the `-M' option.  AIX's cc(1) and SunOS's acc(1) behave
-# incorrectly.  --Steve Emmerson 1992-09-24
-#
-# Furthermore, we do not attempt to maintain dependencies on installed
-# header files (e.g. those in $(INCDIR)) for two reasons: 1) the dependency
-# list generated at Unidata mightn't correspond to the situation at a client
-# site; and 2) clients using broken compilers (c.f. previous note) can't
-# regenerate the dependency list.
-#
-disabled_depend:		FORCE
-	-incdir=`echo $(INCDIR) | sed s',/,\\\/,g'`; \
-	cc -M $(CPPFLAGS) $(CPPFLAGS_NETCDF) *.c 2> /dev/null | \
-	    awk '{ \
-		if ($$0 ~ /:/) { \
-		    target	= $$1; \
-		    if (target ~ /:/) { \
-			target	= substr(target,1,length(target)-1); \
-			start	= 2; \
-		    } else { \
-			start	= 3; \
-		    } \
-		} else { \
-		    start	= 1; \
-		} \
-		for (i = start; i <= NF; ++i) { \
-		    if ($$i !~ /^\\/ && \
-			$$i !~ /port\// && \
-			$$i !~ /^\//) \
-			print target ": " $$i \
-		} \
-	    }' > $@
-	tag='### DO NOT DELETE THIS LINE.  make depend DEPENDS ON IT ###'; \
-	    sed -e "/^$$tag$$/r depend" \
-		-e "/^$$tag$$/q" Makefile > Makefile.new
-	mv Makefile.new Makefile
-
-
-# ###########################################################################
-# Distributions:
-# ###########################################################################
-#FTPDIR		= @FTPDIR@
-#VERSION		= @VERSION@
-
-ftp:		$(FTPDIR)/$(PACKAGE)-$(VERSION).tar.Z
-	test ! -h $(FTPDIR)/$(PACKAGE).tar.Z && exit 0; \
-	cd $(FTPDIR) || exit 1; \
-	rm $(PACKAGE).tar.Z || exit 1; \
-	ln -s $(PACKAGE)-$(VERSION).tar.Z $(PACKAGE).tar.Z;
-
-$(FTPDIR)/$(PACKAGE)-$(VERSION).tar.Z:	$(PACKAGE)-$(VERSION).tar.Z
-	cp $(PACKAGE)-$(VERSION).tar.Z $@ 
-	chmod u+rw,g+rw,o=r $@
-
-tar.Z:		$(PACKAGE)-$(VERSION).tar.Z
-
-$(PACKAGE)-$(VERSION).tar.Z:	MANIFEST
-	dir=`basename \`pwd\`` \
-	&& id=$(PACKAGE)-$(VERSION) \
-	&& cd .. \
-	&& ln -s $$dir $$id \
-	&& tar -chof - `sed "s|^|$$id/|" $$id/MANIFEST` \
-	    | compress > $$id/$@ \
-	&& rm $$id
-
-MANIFEST:	FORCE
-	@echo 1>&2 Creating MANIFEST
-	@$(MAKE) -s $(MFLAGS) $(LOCAL_MACROS) MANIFEST.echo > $@
-
-MANIFEST.echo:	FORCE
-	@$(MAKE) -s $(MFLAGS) $(LOCAL_MACROS) \
-	    MANIFEST=`echo $(MANIFEST) | sed 's/MANIFEST//'` \
-	    ensure_manifest > /dev/null
-	@echo $(MANIFEST) | fmt -1
-	@if [ -n "$(SUBDIRS)" ]; then \
-	    subdirs="$(SUBDIRS)"; \
-	    for subdir in $$subdirs; do \
-		(cd $$subdir && \
-	        echo 1>&2 Creating $@ in `pwd` && \
-		$(MAKE) $(MFLAGS) $(LOCAL_MACROS) MANIFEST.echo | \
-		    sed "s|^|$$subdir/|") || exit 1; \
-	    done; \
-	else \
-	    :; \
-	fi
-
-ensure_manifest:	$(MANIFEST)
-
-# for distribution creation
-distdir = $(TOP_SRCDIR)/$(PACKAGE)-$(VERSION)/$(curdir)
-curdir = mfhdf/nctest
-dist: $(DISTFILES)
-	@for file in $(DISTFILES); do \
-	  ln $(srcdir)/$$file $(distdir)/$$file 2> /dev/null \
-	    || { echo copying $$file instead; \
-	    cp -p $(srcdir)/$$file $(distdir)/$$file;}; \
-	done
-
-# ###########################################################################
-# Miscellaneous:
-# ###########################################################################
-
-# The following dummy target is useful as a dependency to ensure that a
-# rule is always executed.
-#
-FORCE:
-
-
-### Everything after the following line might be overwritten ###
-### DO NOT DELETE THIS LINE.  make depend DEPENDS ON IT ###
-include depend
+# 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:

Deleted: packages/libhdf4/branches/upstream/current/mfhdf/nctest/Makefile.in_orig
===================================================================
--- packages/libhdf4/branches/upstream/current/mfhdf/nctest/Makefile.in_orig	2007-05-15 09:05:29 UTC (rev 830)
+++ packages/libhdf4/branches/upstream/current/mfhdf/nctest/Makefile.in_orig	2007-05-15 09:53:05 UTC (rev 831)
@@ -1,53 +0,0 @@
-# Makefile for netCDF (semi)exhaustive test.
-#
-# $Id: Makefile.in_orig,v 1.1 1996/03/28 20:57:37 georgev Exp $
-
-PROGRAM		= nctest
-CPP_NETCDF	= -I../libsrc
-CPPFLAGS	= $(CPP_NETCDF) @CPPFLAGS@
-HDF_LIB         = @HDF_LIB@
-JPEG_LIB        = @JPEG_LIB@
-CFLAGS		= @CFLAGS@ @HDF_INC@
-MANIFEST	= Makefile.in README add.c add.h atttests.c cdftests.c \
-		  depend dimtests.c driver.c emalloc.c emalloc.h error.c \
-		  error.h misctest.c msoft.mk rec.c slabs.c testcdf.h \
-		  tests.h val.c val.h vardef.c varget.c vargetg.c varput.c \
-		  varputg.c vartests.c vputget.c vputgetg.c make.com
-LIBNAME		= netcdf
-LD_NETCDF	= ../libsrc/libnetcdf.a
-SRCS		= varget.c vargetg.c varput.c varputg.c vardef.c vartests.c \
-		  vputget.c vputgetg.c driver.c cdftests.c dimtests.c rec.c \
-		  atttests.c misctest.c add.c error.c emalloc.c val.c slabs.c
-OBJS		= varget.o vargetg.o varput.o varputg.o vardef.o vartests.o \
-		  vputget.o vputgetg.o driver.o cdftests.o dimtests.o  rec.o \
-		  atttests.o misctest.o add.o error.o emalloc.o val.o slabs.o
-LD_XDR		= @LD_XDR@
-LIBS		= $(LD_NETCDF) $(LD_XDR) $(HDF_LIB) $(JPEG_LIB)
-GARBAGE		= $(PROGRAM) lint.out *.cdf *.log
-
-all::		program
-
-test:		$(PROGRAM)
-	./$(PROGRAM)
-
-$(PROGRAM):   ../libsrc/libnetcdf.a
-
-install::
-
-nctime:		nctime.o
-	$(CC) $(CFLAGS) nctime.o $(LIBS) -o $@
-
-debug:      ../libsrc/libnetcdf.a
-	purify $(CC) $(CFLAGS) $(OBJS) $(LIBS) -o pnctest
-
-perfs:      ../libsrc/libnetcdf.a
-	quantify $(CC) $(CFLAGS) $(OBJS) $(LIBS) -o qnctest
-
-saber_src:
-	#load -C $(CPPFLAGS) $(SRCS) $(LIBS)
-
-include ../port/master.mk
-
-### Everything after the following line might be overwritten ###
-### DO NOT DELETE THIS LINE.  make depend DEPENDS ON IT ###
-include depend

Modified: packages/libhdf4/branches/upstream/current/mfhdf/nctest/driver.c
===================================================================
--- packages/libhdf4/branches/upstream/current/mfhdf/nctest/driver.c	2007-05-15 09:05:29 UTC (rev 830)
+++ packages/libhdf4/branches/upstream/current/mfhdf/nctest/driver.c	2007-05-15 09:53:05 UTC (rev 831)
@@ -1,7 +1,7 @@
 /*********************************************************************
  *   Copyright 1993, UCAR/Unidata
  *   See netcdf/COPYRIGHT file for copying and redistribution conditions.
- *   $Id: driver.c,v 1.8 1998/01/14 19:32:40 bmribler Exp $
+ *   $Id: driver.c,v 1.10 2003/12/10 21:15:30 epourmal Exp $
  *********************************************************************/
 
 #include "netcdf.h"
@@ -22,6 +22,8 @@
 FILE *dbg_file;
 #endif
 
+#include <stdlib.h>
+
 #ifdef macintosh
     #include <LowMem.h>
 #endif
@@ -38,7 +40,12 @@
 #endif
 {
     static char testfile[] = "test.nc";
+    static char unlim_testfile_name[] = "test_unlim.nc";
+    char *unlim_testfile;
 
+    int name_size;
+    char *srcdir;
+
 #ifdef macintosh
 	Ptr	currStackBase, newApplLimit, currApplLimit, currHeapEnd;
 
@@ -112,6 +119,25 @@
 
     test_ncvarget(testfile);
 
+    name_size = strlen(unlim_testfile_name) + 1;
+    srcdir = getenv("srcdir");
+
+    if (srcdir)
+        name_size += strlen(srcdir) + 1;
+
+    unlim_testfile = calloc(name_size, 1);
+
+    if (srcdir) {
+        strcpy(unlim_testfile, srcdir);
+
+        if (srcdir[strlen(srcdir) - 1] != '/')
+            strcat(unlim_testfile, "/");
+    }
+
+    strcat(unlim_testfile, unlim_testfile_name);
+    test_ncvarget_unlim(unlim_testfile);
+    free(unlim_testfile);
+
     test_ncvarputg(testfile);
 
     test_ncvargetg(testfile);

Modified: packages/libhdf4/branches/upstream/current/mfhdf/nctest/slabs.c
===================================================================
--- packages/libhdf4/branches/upstream/current/mfhdf/nctest/slabs.c	2007-05-15 09:05:29 UTC (rev 830)
+++ packages/libhdf4/branches/upstream/current/mfhdf/nctest/slabs.c	2007-05-15 09:53:05 UTC (rev 831)
@@ -1,7 +1,7 @@
 /*********************************************************************
  *   Copyright 1993, UCAR/Unidata
  *   See netcdf/COPYRIGHT file for copying and redistribution conditions.
- *   $Id: slabs.c,v 1.5 1996/03/26 22:43:31 georgev Exp $
+ *   $Id: slabs.c,v 1.7 2004/12/16 21:36:17 epourmal Exp $
  *********************************************************************/
 
 #include "netcdf.h"
@@ -22,8 +22,11 @@
 #define XSIZE	5
 #define YSIZE   6
 #define ZSIZE   4
+/* Added new function for character and byte so we will not overflow; pgcc
+   compiler screamed at VF macro */
+#define VFC(w)  (1000*w[0]+100*w[1]+10*w[2]+w[3])%64 + 48
 /* Any function that maps dimension values 1-1 to values is OK here */
-#define VF(w)  1000*w[0]+100*w[1]+10*w[2]+w[3]
+#define VF(w)  (1000*w[0]+100*w[1]+10*w[2]+w[3])
 #define NVARS   6		/* number of variables */
 
 
@@ -40,6 +43,8 @@
      long val;			/* value to store */
 {
     static char pname[] = "val_stuff";
+#ifdef WRONG_for_PGCC /* This way caused a lot of problems for PGI CC compiler
+                         EIP 2004/12/15 */
     union gp {
 	char cp[1];
 	short sp[1];
@@ -68,6 +73,26 @@
 	break;
     default:
 	error("%s: bad type, test program error", pname);
+#endif /*WRONG_for_PGCC*/
+    switch (type) {
+    case NC_BYTE:
+    case NC_CHAR:
+	((char *)v)[ii] = (char) val;
+	break;
+    case NC_SHORT:
+        ((short *)v)[ii] = (short)val;
+	break;
+    case NC_LONG:
+	((nclong *)v)[ii] = (nclong)val;
+	break;
+    case NC_FLOAT:
+        ((float *)v)[ii] = (float)val;
+	break;
+    case NC_DOUBLE:
+	((double *)v)[ii] = (double)val;
+	break;
+    default:
+	error("%s: bad type, test program error", pname);
     }
 }
 
@@ -88,6 +113,8 @@
      long val;			/* value to compare with */
 {
     static char pname[] = "val_diff";
+#ifdef WRONG_for_PGCC /* This way caused a lot of problems for PGI CC compiler
+                         EIP 2004/12/15 */
     union gp {
 	char cp[1];
 	short sp[1];
@@ -112,6 +139,22 @@
       default:
 	error("%s: bad type, test program error", pname);
 	return (-1);
+#endif /*WRONG_for_PGCC*/
+    switch (type) {
+      case NC_BYTE:
+      case NC_CHAR:
+	return (((char*)v)[ii] != (char) val);
+      case NC_SHORT:
+	return (((short*)v)[ii] != (short) val);
+      case NC_LONG:
+	return (((nclong*)v)[ii] != (nclong) val);
+      case NC_FLOAT:
+	return (((float*)v)[ii] != (float) val);
+      case NC_DOUBLE:
+	return (((double*)v)[ii] != (double) val);
+      default:
+	error("%s: bad type, test program error", pname);
+	return (-1);
     }
 }
 
@@ -193,9 +236,8 @@
     }
 
     for (iv = 0; iv < NVARS; iv++) { /* test each type of variable */
-
+        
 	v = emalloc(WSIZE*XSIZE*YSIZE*ZSIZE * nctypelen(va[iv].type));
-
 	/* fill it with values using a function of dimension indices */
 	ii = 0;
 	for (iw=0; iw < WSIZE; iw++) {
@@ -207,13 +249,16 @@
 		    for (iz=0; iz < ZSIZE; iz++) {
 			corner[3] = iz;
 			/* v[ii++] = VF(corner); */
-			val_stuff(va[iv].type, v, ii, VF(corner));
+                        if (va[iv].type == NC_BYTE || va[iv].type == NC_CHAR) 
+			val_stuff(va[iv].type, v, ii, VFC(corner));
+                        else
+                        val_stuff(va[iv].type, v, ii, VF(corner));
 			ii++;
 		    }
 		}
 	    }
 	}
-	
+ 	
 	for (idim = 0; idim < NDIMS; idim++) {
 	    corner[idim] = 0;
 	    edge[idim] = dims[idim].size;
@@ -242,11 +287,22 @@
 	    nerrs++;
 	}
 	/* if (v[0] != VF(point)) */
+        if (va[iv].type == NC_BYTE || va[iv].type == NC_CHAR) {
+
+	if (val_diff(va[iv].type, v, 0, VFC(point))) {
+	    error("%s: ncvarget got wrong value for point", pname);
+	    nerrs++;
+        }
+        }
+        else
+        {
 	if (val_diff(va[iv].type, v, 0, VF(point))) {
 	    error("%s: ncvarget got wrong value for point", pname);
 	    nerrs++;
 	}
-	
+        }
+	 /*endif NC_BYTE || NC_CHAR */
+                
 	/* get an interior vector in each direction */
 	for (idim=0; idim < NDIMS; idim++) {
 	    for (jdim=0; jdim < NDIMS; jdim++) {
@@ -263,10 +319,19 @@
 	    for (ii=corner[idim]; ii <= edge[idim]; ii++) {
 		point[idim] = ii;
 		/* if (v[ii-1] != VF(point)) */
+        if (va[iv].type == NC_BYTE || va[iv].type == NC_CHAR){ 
+		if (val_diff(va[iv].type, v, ii-1, VFC(point))) {
+		    error("%s: ncvarget got wrong value for vector", pname);
+		    nerrs++;
+		}
+                }
+        else
+                {
 		if (val_diff(va[iv].type, v, ii-1, VF(point))) {
 		    error("%s: ncvarget got wrong value for vector", pname);
 		    nerrs++;
 		}
+                }
 	    }
 	}
 
@@ -291,7 +356,21 @@
 			point[idim] = ii;
 			point[jdim] = jj;
 			/* if (v[(ii-1)*edge[jdim]+jj-1] != VF(point)) { */
+        if (va[iv].type == NC_BYTE || va[iv].type == NC_CHAR) {
 			if (val_diff(va[iv].type, v,
+				     (ii-1)*(int)edge[jdim]+jj-1, VFC(point))) {
+			    error("%s: ncvarget got wrong value in plane", pname);
+			    error("idim=%d,jdim=%d,ii=%d,jj=%d",
+				  idim,
+				  jdim,
+				  ii,
+				  jj);
+			    nerrs++;
+			}
+                        }
+         else
+                        {
+			if (val_diff(va[iv].type, v,
 				     (ii-1)*(int)edge[jdim]+jj-1, VF(point))) {
 			    error("%s: ncvarget got wrong value in plane", pname);
 			    error("idim=%d,jdim=%d,ii=%d,jj=%d",
@@ -301,6 +380,7 @@
 				  jj);
 			    nerrs++;
 			}
+                        }
 		    }
 		}
 	    }
@@ -333,8 +413,25 @@
 				point[kdim] = kk;
 				/* if (v[((ii-1)*edge[jdim]+jj-1)*
 				   edge[kdim]+kk-1] != VF(point)) { */
+        if (va[iv].type == NC_BYTE || va[iv].type == NC_CHAR) {
 				if (val_diff(va[iv].type,v,
 					     ((ii-1)*(int)edge[jdim]+jj-1)*
+					     (int)edge[kdim]+kk-1,VFC(point))) {
+				    error("%s: ncvarget got wrong value in cube", pname);
+				    error("idim=%d,jdim=%d,kdim=%d,ii=%d,jj=%d,kk=%d",
+					  idim,
+					  jdim,
+					  kdim,
+					  ii,
+					  jj,
+					  kk);
+				    nerrs++;
+				}
+                                }
+         else
+                                {
+				if (val_diff(va[iv].type,v,
+					     ((ii-1)*(int)edge[jdim]+jj-1)*
 					     (int)edge[kdim]+kk-1,VF(point))) {
 				    error("%s: ncvarget got wrong value in cube", pname);
 				    error("idim=%d,jdim=%d,kdim=%d,ii=%d,jj=%d,kk=%d",
@@ -346,6 +443,7 @@
 					  kk);
 				    nerrs++;
 				}
+                                }
 			    }
 			}
 		    }
@@ -353,7 +451,7 @@
 	    }
 	}
 	Free((char *)v);
-    }
+   } 
     return nerrs;
 }
 

Added: packages/libhdf4/branches/upstream/current/mfhdf/nctest/test_unlim.cdl
===================================================================
--- packages/libhdf4/branches/upstream/current/mfhdf/nctest/test_unlim.cdl	                        (rev 0)
+++ packages/libhdf4/branches/upstream/current/mfhdf/nctest/test_unlim.cdl	2007-05-15 09:53:05 UTC (rev 831)
@@ -0,0 +1,31 @@
+netcdf new {
+dimensions:
+	x    = 2;
+	y    = 3;
+	time = UNLIMITED ; // (12 currently)
+variables:
+        float a(x,y);
+	int date(time) ;
+	int time(time) ;
+        short b(time, y, x);
+data:
+ a = 1.0, 2.0, 3.0, 4.0, 5.0, 6.0;
+
+ date = 840116, 840214, 840316, 840415, 840516, 840615, 840716, 840816, 
+    840915, 841016, 841115, 841216 ;
+
+ time = 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12 ;
+  
+ b = 1, 1, 2, 2, 3, 3,
+     4, 4, 5, 5, 6, 6,
+     7, 7, 8, 8, 9, 9,
+    10, 10, 11, 11, 12, 12,
+    13, 13, 14, 14, 15, 15,
+    16, 16, 17, 17, 18, 18,
+    19, 19, 20, 20, 21, 22,
+    23, 23, 24, 24, 25, 25,
+    26, 26, 27, 27, 28, 28,
+    29, 29, 30, 30, 31, 31,
+    32, 32, 33, 33, 34, 34,
+    35, 35, 36, 36, 37, 37 ;
+}

Added: packages/libhdf4/branches/upstream/current/mfhdf/nctest/test_unlim.nc
===================================================================
(Binary files differ)


Property changes on: packages/libhdf4/branches/upstream/current/mfhdf/nctest/test_unlim.nc
___________________________________________________________________
Name: svn:mime-type
   + application/octet-stream

Modified: packages/libhdf4/branches/upstream/current/mfhdf/nctest/tests.h
===================================================================
--- packages/libhdf4/branches/upstream/current/mfhdf/nctest/tests.h	2007-05-15 09:05:29 UTC (rev 830)
+++ packages/libhdf4/branches/upstream/current/mfhdf/nctest/tests.h	2007-05-15 09:53:05 UTC (rev 831)
@@ -1,7 +1,7 @@
 /*********************************************************************
  *   Copyright 1993, UCAR/Unidata
  *   See netcdf/COPYRIGHT file for copying and redistribution conditions.
- *   $Id: tests.h,v 1.3 1996/03/26 22:43:32 georgev Exp $
+ *   $Id: tests.h,v 1.4 2003/12/10 21:15:31 epourmal Exp $
  *********************************************************************/
 
 #undef PROTO
@@ -78,6 +78,9 @@
 extern void	test_ncvargetg	PROTO((
 				       char*
 				       ));
+extern void	test_ncvarget_unlim	PROTO((
+				       char*
+				       ));
 extern void	test_ncrecinq	PROTO((
 				       char*
 				       ));

Added: packages/libhdf4/branches/upstream/current/mfhdf/nctest/varget_unlim.c
===================================================================
--- packages/libhdf4/branches/upstream/current/mfhdf/nctest/varget_unlim.c	                        (rev 0)
+++ packages/libhdf4/branches/upstream/current/mfhdf/nctest/varget_unlim.c	2007-05-15 09:53:05 UTC (rev 831)
@@ -0,0 +1,161 @@
+/*
+ * This tests uses HDF NetCDF APIs to read the NetCDF file test_unlim.nc
+ * generated with the NetCDF Library v3.5 from test_unlim.cdl
+ */
+    
+#include <stdio.h>
+#include <stdlib.h>
+#include "netcdf.h"
+#include "testcdf.h"            /* defines in-memory test cdf structure */
+#include "error.h"
+#include "tests.h"
+#include "alloc.h"
+#include "emalloc.h"
+#ifdef HDF  
+#include "hdf.h" 
+#endif  
+
+float a_val[2][3] = {
+                      {1.0, 2.0, 3.0}, 
+                      {4.0, 5.0, 6.0}
+                    };
+int   date_val[12] = {840116, 840214, 840316, 840415, 840516, 840615, 840716, 840816,
+                      840915, 841016, 841115, 841216 };
+int   time_val[12] = {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12 };
+short b_val[][3][2] = {
+                      {{1, 1}, {2, 2}, {3, 3}},
+                      {{4, 4}, {5, 5}, {6, 6}},
+                      {{7, 7}, {8, 8}, {9, 9}},
+                      {{10, 10}, {11, 11}, {12, 12}},
+                      {{13, 13}, {14, 14}, {15, 15}},
+                      {{16, 16}, {17, 17}, {18, 18}},
+                      {{19, 19}, {20, 20}, {21, 22}},
+                      {{23, 23}, {24, 24}, {25, 25}},
+                      {{26, 26}, {27, 27}, {28, 28}},
+                      {{29, 29}, {30, 30}, {31, 31}},
+                      {{32, 32}, {33, 33}, {34, 34}},
+                      {{35, 35}, {36, 36}, {37, 37}}
+                                                    };
+/*
+ * Test ncvarget for variables with unlimited dimensions (bug #897)
+ */
+void
+test_ncvarget_unlim(path)
+     char *path;		/* name of writable netcdf file to open */
+{
+    int nerrs = 0;
+    static char pname[] = "test_ncvarget_unlim";
+    
+    int status;
+    int ncid;
+    int var_id;
+    float a[2][3];
+    int date[12];
+    int time[12];
+    short val[12][3][2];
+    long start[3], count[3];
+    int i, j, n;
+
+    (void) fprintf(stderr, "*** Testing %s ...\t", &pname[5]);
+	if ((ncid = ncopen(path, NC_NOWRITE)) == -1) {
+             error("%s: ncopen failed", pname);
+             return;
+        }
+
+/* Reading 3D array with unlimited dimension */
+
+	var_id = ncvarid( ncid, "b");
+        start[0] = 0;
+        start[1] = 0;
+        start[2] = 0;
+        count[0] = 12;
+        count[1] = 3;
+        count[2] = 2;
+	
+        if(status = ncvarget (ncid, var_id, start, count, val) == -1) {
+           error("%s: ncvarget failed for variable b in ", pname);
+           ncclose(ncid);
+           return;
+        }
+           
+        for (n=0; n <12 ; n++) {
+         for (i=0; i <3; i++)   {
+          for (j=0; j<2 ; j++)   {
+             if (val[n][i][j] != b_val[n][i][j]) {
+             nerrs++;
+             printf(" Wrong value of variable b at index %d,%d,%d\n", n,i,j);
+             }
+          }
+         }
+        }
+
+/* Reading 2D array */
+
+	var_id = ncvarid( ncid, "a");
+        start[0] = 0;
+        start[1] = 0;
+        count[0] = 2;
+        count[1] = 3;
+	
+        if(status = ncvarget (ncid, var_id, start, count, a) == -1) {
+           error("%s: ncvarget failed for variable a in ", pname);
+           ncclose(ncid);
+           return;
+        }
+           
+         for (i=0; i <2; i++)   {
+          for (j=0; j<3 ; j++)   {
+             if (a[i][j] != a_val[i][j]) {
+             nerrs++;
+             printf(" Wrong value of variable a at index %d,%d\n", i,j);
+             }
+          }
+         }
+        
+
+/* Reading 1D array with unlimited dimension */
+
+	var_id = ncvarid( ncid, "date");
+        start[0] = 0;
+        count[0] = 12;
+	
+        if(status = ncvarget (ncid, var_id, start, count, date) == -1) {
+           error("%s: ncvarget failed for variable date in ", pname);
+           ncclose(ncid);
+           return;
+        }
+           
+        for (n=0; n <12 ; n++) {
+             if (date[n] != date_val[n]) {
+             nerrs++;
+             printf(" Wrong value of variable date at index %d\n", n);
+             }
+        }
+
+/* Reading 1D array with unlimited dimension */
+
+	var_id = ncvarid( ncid, "time");
+        start[0] = 0;
+        count[0] = 12;
+	
+        if(status = ncvarget (ncid, var_id, start, count, time) == -1) {
+           error("%s: ncvarget failed varaible time in ", pname);
+           ncclose(ncid);
+           return;
+        }
+           
+        for (n=0; n <12 ; n++) {
+             if (time[n] != time_val[n]) {
+             nerrs++;
+             printf(" Wrong value of variable time at index %d\n", n);
+             }
+        }
+
+	status = ncclose(ncid);
+
+
+    if (nerrs > 0)
+      (void) fprintf(stderr,"FAILED! ***\n");
+    else
+      (void) fprintf(stderr,"ok ***\n");
+}

Added: packages/libhdf4/branches/upstream/current/mfhdf/port/Makefile.am
===================================================================
--- packages/libhdf4/branches/upstream/current/mfhdf/port/Makefile.am	                        (rev 0)
+++ packages/libhdf4/branches/upstream/current/mfhdf/port/Makefile.am	2007-05-15 09:53:05 UTC (rev 831)
@@ -0,0 +1,2 @@
+noinst_LIBRARIES = libudport.a
+libudport_a_SOURCES = uddummy.c

Modified: packages/libhdf4/branches/upstream/current/mfhdf/port/Makefile.in
===================================================================
--- packages/libhdf4/branches/upstream/current/mfhdf/port/Makefile.in	2007-05-15 09:05:29 UTC (rev 830)
+++ packages/libhdf4/branches/upstream/current/mfhdf/port/Makefile.in	2007-05-15 09:53:05 UTC (rev 831)
@@ -1,777 +1,392 @@
-# This is the makefile for the Unidata portability package.
-#
-# $Id: Makefile.in,v 1.13 2000/08/30 00:11:26 wendling Exp $
-# NOTE: This Makefile.in is used by the Cygnus 'configure' script to
-#       generate the top level Makefile.
+# Makefile.in generated by automake 1.7.7 from Makefile.am.
+# @configure_input@
 
-# ############# Start of system configuration section. #############
+# Copyright 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003
+# 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.
 
-# 'srcdir' Gets set to directory this Makefile is found in
-srcdir = .
-TOP_SRCDIR = ../..
+# 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.
 
-prefix = $(TOP_SRCDIR)/NewHDF
+ at SET_MAKE@
 
-exec_prefix = $(prefix)
-tooldir = $(exec_prefix)/$(target)
+srcdir = @srcdir@
+top_srcdir = @top_srcdir@
+VPATH = @srcdir@
+pkgdatadir = $(datadir)/@PACKAGE@
+pkglibdir = $(libdir)/@PACKAGE@
+pkgincludedir = $(includedir)/@PACKAGE@
+top_builddir = ../..
 
-program_transform_name =
+am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
+INSTALL = @INSTALL@
+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 = :
+host_triplet = @host@
+ACLOCAL = @ACLOCAL@
+AMDEP_FALSE = @AMDEP_FALSE@
+AMDEP_TRUE = @AMDEP_TRUE@
+AMTAR = @AMTAR@
+AR = @AR@
+AUTOCONF = @AUTOCONF@
+AUTOHEADER = @AUTOHEADER@
+AUTOMAKE = @AUTOMAKE@
+AWK = @AWK@
+CC = @CC@
+CCDEPMODE = @CCDEPMODE@
+CFLAGS = @CFLAGS@
+CPP = @CPP@
+CPPFLAGS = @CPPFLAGS@
+CXX = @CXX@
+CXXCPP = @CXXCPP@
+CXXDEPMODE = @CXXDEPMODE@
+CXXFLAGS = @CXXFLAGS@
+CYGPATH_W = @CYGPATH_W@
+DEFS = @DEFS@
+DEPDIR = @DEPDIR@
+DIFF = @DIFF@
+ECHO_C = @ECHO_C@
+ECHO_N = @ECHO_N@
+ECHO_T = @ECHO_T@
+EGREP = @EGREP@
+EXEEXT = @EXEEXT@
+F77 = @F77@
+FFLAGS = @FFLAGS@
+HDF_BUILD_FORTRAN_FALSE = @HDF_BUILD_FORTRAN_FALSE@
+HDF_BUILD_FORTRAN_TRUE = @HDF_BUILD_FORTRAN_TRUE@
+HDF_BUILD_XDR_FALSE = @HDF_BUILD_XDR_FALSE@
+HDF_BUILD_XDR_TRUE = @HDF_BUILD_XDR_TRUE@
+INSTALL_DATA = @INSTALL_DATA@
+INSTALL_PROGRAM = @INSTALL_PROGRAM@
+INSTALL_SCRIPT = @INSTALL_SCRIPT@
+INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
+LDFLAGS = @LDFLAGS@
+LEX = @LEX@
+LEXLIB = @LEXLIB@
+LEX_OUTPUT_ROOT = @LEX_OUTPUT_ROOT@
+LIBOBJS = @LIBOBJS@
+LIBS = @LIBS@
+LN_S = @LN_S@
+LTLIBOBJS = @LTLIBOBJS@
+MAINT = @MAINT@
+MAINTAINER_MODE_FALSE = @MAINTAINER_MODE_FALSE@
+MAINTAINER_MODE_TRUE = @MAINTAINER_MODE_TRUE@
+MAKEINFO = @MAKEINFO@
+NEQN = @NEQN@
+OBJEXT = @OBJEXT@
+PACKAGE = @PACKAGE@
+PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
+PACKAGE_NAME = @PACKAGE_NAME@
+PACKAGE_STRING = @PACKAGE_STRING@
+PACKAGE_TARNAME = @PACKAGE_TARNAME@
+PACKAGE_VERSION = @PACKAGE_VERSION@
+PATH_SEPARATOR = @PATH_SEPARATOR@
+RANLIB = @RANLIB@
+SET_MAKE = @SET_MAKE@
+SHELL = @SHELL@
+STRIP = @STRIP@
+TBL = @TBL@
+VERSION = @VERSION@
+YACC = @YACC@
+ac_ct_CC = @ac_ct_CC@
+ac_ct_CXX = @ac_ct_CXX@
+ac_ct_F77 = @ac_ct_F77@
+ac_ct_RANLIB = @ac_ct_RANLIB@
+ac_ct_STRIP = @ac_ct_STRIP@
+am__fastdepCC_FALSE = @am__fastdepCC_FALSE@
+am__fastdepCC_TRUE = @am__fastdepCC_TRUE@
+am__fastdepCXX_FALSE = @am__fastdepCXX_FALSE@
+am__fastdepCXX_TRUE = @am__fastdepCXX_TRUE@
+am__include = @am__include@
+am__leading_dot = @am__leading_dot@
+am__quote = @am__quote@
+bindir = @bindir@
+build = @build@
+build_alias = @build_alias@
+build_cpu = @build_cpu@
+build_os = @build_os@
+build_vendor = @build_vendor@
+datadir = @datadir@
+exec_prefix = @exec_prefix@
+host = @host@
+host_alias = @host_alias@
+host_cpu = @host_cpu@
+host_os = @host_os@
+host_vendor = @host_vendor@
+includedir = @includedir@
+infodir = @infodir@
+install_sh = @install_sh@
+libdir = @libdir@
+libexecdir = @libexecdir@
+localstatedir = @localstatedir@
+mandir = @mandir@
+oldincludedir = @oldincludedir@
+prefix = @prefix@
+program_transform_name = @program_transform_name@
+sbindir = @sbindir@
+sharedstatedir = @sharedstatedir@
+sysconfdir = @sysconfdir@
+target_alias = @target_alias@
+noinst_LIBRARIES = libudport.a
+libudport_a_SOURCES = uddummy.c
+subdir = mfhdf/port
+ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
+mkinstalldirs = $(SHELL) $(top_srcdir)/bin/mkinstalldirs
+CONFIG_HEADER = $(top_builddir)/hdf/src/h4config.h
+CONFIG_CLEAN_FILES =
+LIBRARIES = $(noinst_LIBRARIES)
 
-datadir = $(prefix)/lib
-mandir = $(prefix)/man
-man1dir = $(mandir)/man1
-man2dir = $(mandir)/man2
-man3dir = $(mandir)/man3
-man4dir = $(mandir)/man4
-man5dir = $(mandir)/man5
-man6dir = $(mandir)/man6
-man7dir = $(mandir)/man7
-man8dir = $(mandir)/man8
-man9dir = $(mandir)/man9
-docdir = $(datadir)/doc
+libudport_a_AR = $(AR) cru
+libudport_a_LIBADD =
+am_libudport_a_OBJECTS = uddummy.$(OBJEXT)
+libudport_a_OBJECTS = $(am_libudport_a_OBJECTS)
 
-SHELL = /bin/sh
+DEFAULT_INCLUDES =  -I. -I$(srcdir) -I$(top_builddir)/hdf/src
+depcomp = $(SHELL) $(top_srcdir)/bin/depcomp
+am__depfiles_maybe = depfiles
+ at AMDEP_TRUE@DEP_FILES = ./$(DEPDIR)/uddummy.Po
+COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \
+	$(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
+CCLD = $(CC)
+LINK = $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@
+DIST_SOURCES = $(libudport_a_SOURCES)
+DIST_COMMON = $(srcdir)/Makefile.in Makefile.am configure configure.in
+SOURCES = $(libudport_a_SOURCES)
 
-INSTALL = ${TOP_SRCDIR}/install-sh -c
-INSTALL_PROGRAM = $(INSTALL)
-INSTALL_DATA = $(INSTALL) -m 644
+all: all-am
 
-# /usr/local/bin/m4 (GNU version?)
-M4   = /usr/local/bin/m4
-# /usr/local/bin/perl (GNU version?)
-PERL = /usr/local/bin/perl
-
-# Name of achive randomizer, usually ranlib (use 'touch' if non-existant)
-RANLIB = ranlib
-
-# Name of library archiver and flags to send, default 'AR=ar', 'ARFLAGS=r'
-AR = ar
-ARFLAGS = rc
-
-# Name of remove utility, default 'RM=/bin/rm', 'RMFLAGS=-f'
-RM = /bin/rm
-RMFLAGS = -f
-
-AS = as
-CC = gcc
-CFLAGS = -ansi
-FC = f77
-FFLAGS=
-
-# Set for document generation
-MAKEINFO = makeinfo
-TEXI2DVI = texi2dvi
-
-# Directory in which to install binaries
-bindir = $(exec_prefix)/bin
-
-# Directory in which to install header files.
-includedir = $(prefex)/include
-
-# Directory in which to install library files.
-libdir = $(prefix)/lib
-
-# Directory in which to install documentation info files.
-infodir = $(prefix)/info
-
-# ------------ General Macros for NETCDF --------------------
-INCDIR	 = $(prefix)/include
-HDF_LIB  = $(TOP_SRCDIR)/hdf/src/libdf.a
-HDF_INC  = $(TOP_SRCDIR)/hdf/src/
-PABLO_HINC = $(TOP_SRCDIR)/hdf/pablo
-FMPOOL_INC = $(TOP_SRCDIR)/hdf/fmpool
-JPEG_LIB = $(TOP_SRCDIR)/hdf/jpeg/libjpeg.a
-NETCDF_INC = $(TOP_SRCDIR)/mfhdf/libsrc
-PORT_INC   = $(TOP_SRCDIR)/mfhdf/port
-CPP	   = $(CC) -E
-CFLAGS_NETCDF = 
-CPPFLAGS_HDF  = -DNDEBUG -DHDF $(FMPOOL_FLAGS)
-CPP_NETCDF    = -I. -I$(HDF_INC) -I$(NETCDF_INC) -I$(PORT_INC)
-CPPFLAGS_LIB	= $(SWAP) $(NETLONG) 
-CPPFLAGS_XDR	= $(CPP_XDR) 
-CPPFLAGS_NETCDF =  $(CPPFLAGS_XDR) $(CPP_NETCDF) $(CPPFLAGS_LIB) $(CPPFLAGS_HDF) 
-FFLAGS  =
-NCDUMP	= 
-NCGEN	= 
-NEQN	= neqn
-OS	= 
-TBL	= tbl
-WHICH	= which
-FTPDIR	= 
-VERSION	= 2.3.2
-LEX	= lex
-YACC	= yacc
-DIFF    = diff
-DIFF_FLAGS = -w
-
-
-#### ----- host and target specific makefile fragments come in here.-------
-### ------------------- end of makefile fragments -------------------------
-# ############# End of system configuration section. ###############
-
-#PACKAGE		= udport
-LIBRARY		= udport
-#MAJOR_NO	= @MAJOR_NO@
-#MINOR_NO	= @MINOR_NO@
-
-#CPPFLAGS	= $(CPPFLAGS_PORT)
-#CFLAGS		= @CFLAGS@
-
-#PORT_CFORTRAN	= @PORT_CFORTRAN@
-#NEED_FORTC	= @NEED_FORTC@
-
-#PORT_HEADERS	= @PORT_HEADERS@
-config_headers	= signal.h stdarg.h stddef.h stdlib.h string.h time.h \
-		  udconfig.h udposix.h
-made_headers	= float.h limits.h
-#LIBOBJS		= uddummy.o @LIBOBJS@
-
-prefix		= ../../..
-
-#SUBDIRS	= @PORT_SUBDIRS@
-SUBDIRS		= $(PORT_SUBDIRS)
-SUBDIR_TARGETS	= fortc/all fortc/install fortc/clean fortc/distclean
-MANIFEST = $(DISTFILES)
-DISTFILES        = COPYRIGHT CUSTOMIZE HISTORY Makefile.in VERSION aclocal.m4 \
-		  $(PORT_MANIFEST) \
-		  configure configure.in depend master.mk.in uddummy.c
-
-# Note that the `all' target might not make `fortc/all'.  That will depend 
-# on whether or not that utility is required.
-
-all::		FORCE $(PORT_HEADERS)
-	@if [ "$(NEED_FORTC)" = yes ]; then \
-	    $(MAKE) $(MFLAGS) $(SBUDIR_MACROS) fortc/all; \
-	else \
-	    :; \
-	fi
-	@$(MAKE) $(MFLAGS) $(LOCAL_MACROS) library
-
-# We install the portability library modules directly into an installed
-# portability library even though the package using this portability library
-# (the client package) probably doesn't reference the installed one.  This is
-# done because the client package might be another library and linking
-# against it might require some modules of this library.  We don't install
-# the portability library just created because different packages can require
-# different modules.
-#
-install::	$(LIBOBJS)
-	$(MAKE) $(MFLAGS) $(LIBDIR) LIBDIR=$(LIBDIR)
-	$(AR) rcuv $(LIBDIR)/libudport.a $(LIBOBJS)
-	$(RANLIB) $(LIBDIR)/libudport.a
-
-clean::		FORCE
-	@if [ "$(NEED_FORTC)" = yes ]; then \
-	    $(MAKE) $(MFLAGS) fortc/clean; \
-	else \
-	    :; \
-	fi
-	rm -f $(made_headers) config
-
-distclean::
-	@if [ "$(NEED_FORTC)" = yes ]; then \
-	    $(MAKE) $(MFLAGS) fortc/distclean; \
-	else \
-	    :; \
-	fi
-	rm -f $(made_headers) $(config_headers) config master.mk
-
-Makefile:	Makefile.in master.mk.in
-
-float.h:	config
-	./config -f > $@
-limits.h:	config
-	./config -l > $@
-cfortran.h:	cfortran_h
-	if test "$(PORT_CFORTRAN)" = stdc; then \
-	    sed 's/\/\*\*\//##/g' cfortran_h > $@; \
-	else \
-	    cp cfortran_h $@; \
-	fi
-
-# C compiler information program:
-#
-# NB: config(1) must be compiled unoptimized.  We first assume that `signed
-# char' is valid; if that doesn't work, then we assume it's invalid.  If
-# that doesn't work, the user will have to determine the appropriate
-# compilation flags (see config.c).
-#
-# If the following program won't compile, then contact
-# support at unidata.ucar.edu (ask for Steve).
-#
-config:               config.c
-	if $(CC) config.c -o config 2> /dev/null; then \
-		: true; \
-	else \
-		$(CC) -DNO_SC config.c -o config; \
-	fi
-
-# This is the master.mk.in makefile.  It contains general rules.
-#
-
 .SUFFIXES:
-.SUFFIXES:	.so .o .i .c .fc .f .F .l .y
+.SUFFIXES: .c .o .obj
+$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ Makefile.am  $(top_srcdir)/configure.ac $(ACLOCAL_M4)
+	cd $(top_srcdir) && \
+	  $(AUTOMAKE) --foreign  mfhdf/port/Makefile
+Makefile: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.in  $(top_builddir)/config.status
+	cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)
 
-# ###########################################################################
-# General Macros: (moved to make file fragment )
-# ###########################################################################
-#CPP		= @CPP@
-#NCDUMP		= @NCDUMP@
-#NCGEN		= @NCGEN@
-#NEQN		= @NEQN@
-#OS		= @OS@
-#TBL		= @TBL@
-#WHICH		= @WHICH@
+clean-noinstLIBRARIES:
+	-test -z "$(noinst_LIBRARIES)" || rm -f $(noinst_LIBRARIES)
+libudport.a: $(libudport_a_OBJECTS) $(libudport_a_DEPENDENCIES) 
+	-rm -f libudport.a
+	$(libudport_a_AR) libudport.a $(libudport_a_OBJECTS) $(libudport_a_LIBADD)
+	$(RANLIB) libudport.a
 
-# ###########################################################################
-# Recursive Macros (command-line changes to others aren't supported):
-# ###########################################################################
-SUBDIR_MACROS = CC="$(CC)" \
-	CFLAGS="$(CFLAGS)" \
-	CPP="$(CPP)" \
-	exec_prefix="$(exec_prefix)" \
-	FC="$(FC)" \
-	prefix="$(prefix)"
+mostlyclean-compile:
+	-rm -f *.$(OBJEXT) core *.core
 
-LOCAL_MACROS  = CC="$(CC)" \
-	CFLAGS="$(CFLAGS)" \
-	CPP="$(CPP)" \
-	CPPFLAGS="$(CPPFLAGS)" \
-	exec_prefix="$(exec_prefix)" \
-	FC="$(FC)" \
-	prefix="$(prefix)"
+distclean-compile:
+	-rm -f *.tab.c
 
-# ###########################################################################
-# Recursive make(1)s in Subdirectories:
-# ###########################################################################
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/uddummy.Po at am__quote@
 
-subdir_dummy_target $(SUBDIR_TARGETS):
-	@echo ""
-	@dir=`echo $@ | sed 's,/.*,,'`; \
-	    target=`echo $@ | sed "s,$$dir/,,"`; \
-	    cd $$dir && \
-	    echo "making \`$$target' in directory `pwd`" && \
-	    echo "" && \
-	    $(MAKE) $(MFLAGS) $(SUBDIR_MACROS) \
-		$$target || exit 1
-	@echo ""
-	@echo "returning to directory `pwd`"
-	@echo ""
-
-
-# ###########################################################################
-# Compilation:
-# ###########################################################################
-#FORTC		= @FORTC@
-
-# Compile FORTRAN code.
-#
-.f.o:
-	$(FC) -c $(FFLAGS) $<
-.F.o:
-	ln -s $< $$$$.c \
-	&& $(CPP) -DUD_FORTRAN_SOURCE $(CPPFLAGS) $(CPPFLAGS_NETCDF) $$$$.c \
-	    | sed '/^# *[0-9]/d' > $*.f \
-	|| (rm -f $*.f $$$$.c; exit 1) \
-	&& rm $$$$.c
-	$(FC) -c $(FFLAGS) $*.f
-.F.f:
-	ln -s $< $$$$.c \
-	&& $(CPP) -DUD_FORTRAN_SOURCE $(CPPFLAGS) $(CPPFLAGS_NETCDF) $$$$.c \
-	    | sed '/^# *[0-9]/d' > $@ \
-	|| (rm -f $@ $$$$.c; exit 1) \
-	&& rm $$$$.c
-
-# Generate FORTRAN-callable C code.
-#
-.fc.o:
-	$(FORTC) -O $(OS) $< > $*.c \
-	    || ( rm -f $*.c; exit 1)
-	$(CC) -c $(CFLAGS) $(CFLAGS_NETCDF) $(CPPFLAGS) $(CPPFLAGS_NETCDF) $*.c
-.fc.c:
-	$(FORTC) -O $(OS) $< > $@ \
-	    || (rm -f $*.c; exit 1)
-
-# Compile C code.
-#
 .c.o:
-	$(CC) -c $(CPPFLAGS) $(CPPFLAGS_NETCDF) $(CFLAGS) $(CFLAGS_NETCDF) $<
+ at am__fastdepCC_TRUE@	if $(COMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" \
+ at am__fastdepCC_TRUE@	  -c -o $@ `test -f '$<' || echo '$(srcdir)/'`$<; \
+ at am__fastdepCC_TRUE@	then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; \
+ at am__fastdepCC_TRUE@	else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; \
+ at am__fastdepCC_TRUE@	fi
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	depfile='$(DEPDIR)/$*.Po' tmpdepfile='$(DEPDIR)/$*.TPo' @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	$(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCC_FALSE@	$(COMPILE) -c `test -f '$<' || echo '$(srcdir)/'`$<
 
-# Compile lex(1) code.  This rule is here to ensure the use of CPPFLAGS.
-# 
-.l.o:
-	rm -f $*.c
-	$(LEX) -t $< > $*.c
-	$(CC) -c $(CPPFLAGS) $(CPPFLAGS_NETCDF) $(CFLAGS) $(CFLAGS_NETCDF) $*.c
-	rm $*.c
+.c.obj:
+ at am__fastdepCC_TRUE@	if $(COMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" \
+ at am__fastdepCC_TRUE@	  -c -o $@ `if test -f '$<'; then $(CYGPATH_W) '$<'; else $(CYGPATH_W) '$(srcdir)/$<'; fi`; \
+ at am__fastdepCC_TRUE@	then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; \
+ at am__fastdepCC_TRUE@	else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; \
+ at am__fastdepCC_TRUE@	fi
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	depfile='$(DEPDIR)/$*.Po' tmpdepfile='$(DEPDIR)/$*.TPo' @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	$(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCC_FALSE@	$(COMPILE) -c `if test -f '$<'; then $(CYGPATH_W) '$<'; else $(CYGPATH_W) '$(srcdir)/$<'; fi`
+uninstall-info-am:
 
-# C preprocess.  
-#   NB: 
-#	1. The output `file' is not created but appears on standard output;
-#	2. Line numbering information is kept.
-#
-.c.i:
-	$(CPP) $(CPPFLAGS) $(CPPFLAGS_NETCDF) $<
+ETAGS = etags
+ETAGSFLAGS =
 
+CTAGS = ctags
+CTAGSFLAGS =
 
-# ###########################################################################
-# Libraries:
-# ###########################################################################
-# RANLIB		= @RANLIB@
-LIBDIR		= $(prefix)/lib
-LIB_A		= lib$(LIBRARY).a
+tags: TAGS
 
-library::		$(LIB_A)
+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; } \
+	       END { for (i in files) print i; }'`; \
+	mkid -fID $$unique
 
-# The following rule is forced because the library can be created by a
-# makefile in another directory prior to the execution of the following rule.
-#
-$(LIB_A):		$(LIBOBJS) FORCE
-	$(AR) rcuv $@ $(LIBOBJS)
-	$(RANLIB) $@
+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; } \
+	       END { for (i in files) print i; }'`; \
+	test -z "$(ETAGS_ARGS)$$tags$$unique" \
+	  || $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
+	     $$tags $$unique
 
-# The following rule is for those makefiles needing to install object
-# modules in a library in another directory.  They need only define 
-# REMOTE_LIBRARY and LIBOBJS.  The rule is forced for the same reason as the
-# $(LIB_A) rule.
-#
-lib_dummy $(REMOTE_LIBRARY):	$(LIBOBJS) FORCE
-	$(AR) rcuv $@ $(LIBOBJS)
-	$(RANLIB) $@
+ctags: CTAGS
+CTAGS:  $(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; } \
+	       END { for (i in files) print i; }'`; \
+	test -z "$(CTAGS_ARGS)$$tags$$unique" \
+	  || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
+	     $$tags $$unique
 
-installed_libfiles:	FORCE
-	@if [ -n "$(LIBFILES)" ]; then \
-	    libfiles="$(LIBFILES)"; \
-	    for libfile in $$libfiles; do \
-		$(MAKE) $(MFLAGS) $(LOCAL_MACROS) \
-		    LIBDIR=$(LIBDIR) LIBFILE=$$libfile \
-		    installed_libfile || exit 1; \
-	    done; \
-	else \
-	    :; \
-	fi
+GTAGS:
+	here=`$(am__cd) $(top_builddir) && pwd` \
+	  && cd $(top_srcdir) \
+	  && gtags -i $(GTAGS_ARGS) $$here
 
-installed_library::	FORCE
-	@$(MAKE) $(MFLAGS) $(LOCAL_MACROS) \
-	    LIBDIR=$(LIBDIR) LIBFILE=$(LIB_A) \
-	    installed_libfile
+distclean-tags:
+	-rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
+DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
 
-# The following target decouples the previous targets from the actual rule;
-# thus, eliminating extraneous make(1) messages.
-#
-installed_libfile:	$(LIBDIR)/$(LIBFILE)
+top_distdir = ../..
+distdir = $(top_distdir)/$(PACKAGE)-$(VERSION)
 
-$(LIBDIR)/$(LIBFILE):	$(LIBDIR) $(LIBFILE)
-	$(INSTALL_DATA) $(LIBFILE) $@
-
-dummy_libdir $(LIBDIR):
-	mkdir -p $@
-	chmod u+rwx,g+rws,o=rx $@
-
-LIB_SO		= lib$(LIBRARY).so.$(MAJOR_NO).$(MINOR_NO)
-LIB_SA		= lib$(LIBRARY).sa.$(MAJOR_NO).$(MINOR_NO)
-
-#library::		FORCE
-#	@so_objs=`echo $(LIBOBJS) | sed 's/\.o/.so/g'`; \
-#	if [ -z "$$so_objs" ]; then \
-#	    :; \
-#	else \
-#	    $(MAKE) $(MFLAGS) $(LIB_SO) \
-#		SO_OBJS="$$so_objs"; \
-#	fi
-#	@if [ -z "$(SA_OBJS)" ]; then \
-#	    :; \
-#	else \
-#	    $(MAKE) $(MFLAGS) $(LIB_SA); \
-#	fi
-
-$(LIB_SO):	$(SO_OBJS)
-	ld -assert pure-text $(SO_OBJS) -o $@
-$(LIB_SA):	$(SA_OBJS) FORCE
-	$(AR) rcuv $@ $(SA_OBJS)
-
-.fc.so:
-	$(FORTC) -O $(OS) $< > $*.c \
-	    || (rm -f $*.c; exit 1)
-	$(CC) -c -pic $(CFLAGS) $(CFLAGS_NETCDF) $(CPPFLAGS) $(CPPFLAGS_NETCDF) $*.c -o $$$$.o \
-	    || (rm -f $$$$.o; exit 1)
-	mv $$$$.o $@
-.c.so:
-	$(CC) -c -pic $(CFLAGS) $(CFLAGS_NETCDF) $(CPPFLAGS) $(CPPFLAGS_NETCDF) $< -o $$$$.o \
-	    || (rm -f $$$$.o; exit 1)
-	mv $$$$.o $@
-
-#installed_library::	$(LIBDIR)/$(LIB_SO)
-#	@if [ -z "$(SA_OBJS)" ]; then \
-#	    :; \
-#	else \
-#	    $(MAKE) $(MFLAGS) $(LIBDIR)/$(LIB_SA); \
-#	fi
-
-$(LIBDIR)/$(LIB_SO):	$(LIBDIR) $(LIB_SO)
-	$(INSTALL_DATA) $(LIB_SO) $(LIBDIR)/$(LIB_SO)
-$(LIBDIR)/$(LIB_SA):	$(LIBDIR) $(LIB_SA)
-	$(INSTALL_DATA) $(LIB_SA) $(LIBDIR)/$(LIB_SA)
-
-
-# ###########################################################################
-# Programs:
-# ###########################################################################
-BINDIR		= $(exec_prefix)/bin
-
-programs:	$(PROGRAMS)
-program:
-	@if [ -z "$(PROGRAM)" ]; then \
-	    : true; \
-	else \
-	    if [ -z "$(LIBRARY)" ]; then \
-		: true; \
-	    else \
-		$(MAKE) $(MFLAGS) $(LOCAL_MACROS) library; \
+distdir: $(DISTFILES)
+	@srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \
+	topsrcdirstrip=`echo "$(top_srcdir)" | sed 's|.|.|g'`; \
+	list='$(DISTFILES)'; for file in $$list; do \
+	  case $$file in \
+	    $(srcdir)/*) file=`echo "$$file" | sed "s|^$$srcdirstrip/||"`;; \
+	    $(top_srcdir)/*) file=`echo "$$file" | sed "s|^$$topsrcdirstrip/|$(top_builddir)/|"`;; \
+	  esac; \
+	  if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
+	  dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \
+	  if test "$$dir" != "$$file" && test "$$dir" != "."; then \
+	    dir="/$$dir"; \
+	    $(mkinstalldirs) "$(distdir)$$dir"; \
+	  else \
+	    dir=''; \
+	  fi; \
+	  if test -d $$d/$$file; then \
+	    if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
+	      cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \
 	    fi; \
-	    $(MAKE) $(MFLAGS) $(LOCAL_MACROS) $(PROGRAM); \
-	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 $(LIBRARIES)
 
-dummy_prog $(PROGRAM):	$(OBJS)
-	@if [ -r $@.f -o -r $@.F ]; then \
-	    ld='$(FC) $(FFLAGS)'; \
-	else \
-	    ld='$(CC) $(CFLAGS) $(CFLAGS_NETCDF) '; \
-	fi; \
-	cmd="$$ld $(OBJS) $(LIBS) -o $@"; \
-	echo $$cmd; \
-	$$cmd \
-	    || (rm -f $@; exit 1)
+installdirs:
+install: install-am
+install-exec: install-exec-am
+install-data: install-data-am
+uninstall: uninstall-am
 
-installed_programs:	FORCE
-	@$(MAKE) $(MFLAGS) $(LOCAL_MACROS) installed_binfiles \
-	    BINDIR=$(BINDIR) BINFILES="$(PROGRAMS)"
+install-am: all-am
+	@$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
 
-installed_binfiles:	FORCE
-	@if [ -n "$(BINFILES)" ]; then \
-	    binfiles="$(BINFILES)"; \
-	    for binfile in $$binfiles; do \
-		$(MAKE) $(MFLAGS) $(LOCAL_MACROS) \
-		    BINDIR=$(BINDIR) BINFILE=$$binfile \
-		    installed_binfile || exit 1; \
-	    done; \
-	else \
-	    :; \
-	fi
+installcheck: installcheck-am
+install-strip:
+	$(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
+	  INSTALL_STRIP_FLAG=-s \
+	  `test -z '$(STRIP)' || \
+	    echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
+mostlyclean-generic:
 
-installed_program:	FORCE
-	@$(MAKE) $(MFLAGS) $(LOCAL_MACROS) BINDIR=$(BINDIR) BINFILE=$(PROGRAM) \
-	    installed_binfile
+clean-generic:
 
-# The following target decouples the previous targets from the actual rule;
-# thus, eliminating extraneous make(1) messages.
-#
-installed_binfile:	$(BINDIR)/$(BINFILE)
+distclean-generic:
+	-rm -f $(CONFIG_CLEAN_FILES)
 
-$(BINDIR)/$(BINFILE):	$(BINDIR) $(BINFILE)
-	$(INSTALL_PROGRAM) $(BINFILE) $@
+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
 
-dummy_bindir $(BINDIR):
-	mkdir -p $@
-	chmod u+rwx,g+rws,o=rx $@
+clean-am: clean-generic clean-noinstLIBRARIES mostlyclean-am
 
+distclean: distclean-am
+	-rm -rf ./$(DEPDIR)
+	-rm -f Makefile
 
-# ###########################################################################
-# Header files:
-# ###########################################################################
-installed_headers:	FORCE
-	@if [ -n "$(HEADERS)" ]; then \
-	    headers="$(HEADERS)"; \
-	    for header in $$headers; do \
-		$(MAKE) $(MFLAGS) $(LOCAL_MACROS) INCDIR=$(INCDIR) HEADER=$$header \
-		    installed_header || exit 1; \
-	    done; \
-	else \
-	    :; \
-	fi
+distclean-am: clean-am distclean-compile distclean-generic \
+	distclean-tags
 
-# The following target decouples the previous targets from the actual rule;
-# thus, eliminating extraneous make(1) messages.
-#
-installed_header:	$(INCDIR)/$(HEADER)
+dvi: dvi-am
 
-$(INCDIR)/$(HEADER):	$(INCDIR) $(HEADER)
-	$(INSTALL_DATA) $(HEADER) $@
+dvi-am:
 
-dummy_incdir $(INCDIR):
-	mkdir -p $@
-	chmod u+rwx,g+rws,o=rx $@
+info: info-am
 
+info-am:
 
-# ###########################################################################
-# `etc/' files:
-# ###########################################################################
-ETCDIR	= $(prefix)/etc
+install-data-am:
 
-installed_etcfiles:
-	@if [ -n "$(ETCFILES)" ]; then \
-	    etcfiles="$(ETCFILES)"; \
-	    for etcfile in $$etcfiles; do \
-		$(MAKE) $(MFLAGS) $(LOCAL_MACROS) ETCDIR=$(ETCDIR) ETCFILE=$$etcfile \
-		    installed_etcfile || exit 1; \
-	    done; \
-	else \
-	    :; \
-	fi
+install-exec-am:
 
-# The following target decouples the previous targets from the actual rule;
-# thus, eliminating extraneous make(1) messages.
-#
-installed_etcfile:	$(ETCDIR)/$(ETCFILE)
+install-info: install-info-am
 
-$(ETCDIR)/$(ETCFILE):	$(ETCDIR) $(ETCFILE)
-	-mkdir -p $(ETCDIR)
-	-chmod u+rwx,g+rws,o=rx $(ETCDIR)
-	$(INSTALL_DATA) $(ETCFILE) $@
+install-man:
 
-# ###########################################################################
-# Manual Pages:
-# ###########################################################################
-MANDIR	= $(prefix)/man
+installcheck-am:
 
-installed_manuals:	FORCE
-	@if [ -n "$(MANUALS)" ]; then \
-	    manuals="$(MANUALS)"; \
-	    for manual in $$manuals; do \
-		mandir=$(MANDIR)/man`echo $$manual | sed 's/.*\.\(.\).*/\1/'`; \
-		$(MAKE) $(MFLAGS) $(LOCAL_MACROS) MANDIR=$$mandir MANUAL=$$manual \
-		    installed_manual || exit 1; \
-	    done; \
-	else \
-	    :; \
-	fi
+maintainer-clean: maintainer-clean-am
+	-rm -rf ./$(DEPDIR)
+	-rm -f Makefile
 
-# The following target decouples the previous targets from the actual rule;
-# thus, eliminating extraneous make(1) messages.
-#
-installed_manual:	$(MANDIR)/$(MANUAL)
+maintainer-clean-am: distclean-am maintainer-clean-generic
 
-# The first sed(1) editing command in the following replaces the expanded
-# RCS keyword `$Date ...' in the `.TH' macro line with something more 
-# appropriate to a manual page.
-#
-$(MANDIR)/$(MANUAL):	$(MANDIR) $(MANUAL)
-	sed \
-	 -e '/^\.TH/s/$$D\ate: \([0-9]*\)\/\([0-9]*\)\/\([0-9]*\).*\$$/\1-\2-\3/'\
-	 $(MANUAL) | $(TBL) | $(NEQN) > $@
+mostlyclean: mostlyclean-am
 
-dummy_mandir $(MANDIR):
-	mkdir -p $@
-	chmod u+rwx,g+rws,o=rx $@
+mostlyclean-am: mostlyclean-compile mostlyclean-generic
 
-# ###########################################################################
-# TeX-Info Pages:
-# ###########################################################################
-INFODIR       = $(prefix)/info
+pdf: pdf-am
 
-installed_infos:      FORCE
-	if [ -z "$(MAKEINFO)" ]; then \
-		echo 1>&2 "Can't install info(1) pages because no makeinfo(1)"; \
-	else \
-	  if [ -n "$(INFOS)" ]; then \
-	      infos="$(INFOS)"; \
-	      for info in $$infos; do \
-		$(MAKE) $(MFLAGS) $(LOCAL_MACROS) INFODIR=$(INFODIR) INFO=$$info \
-		installed_info || exit 1; \
-	      done; \
-	   else \
-	      :; \
-	   fi; \
-	fi;
-# The following target decouples the previous targets from the actual rule;
-# thus, eliminating extraneous make(1) messages.
-#
-installed_info:       $(INFODIR)/$(INFO)
+pdf-am:
 
-$(INFODIR)/$(INFO):   $(INFODIR) $(INFO)
-	-mkdir -p $(INFODIR)
-	-chmod u+rwx,g+rws,o=rx $(INFODIR)
-	$(INSTALL_DATA) $(INFO) $@
+ps: ps-am
 
-# Rules for generating info pages:
-#
-.SUFFIXES:    .info .texi .texinfo .txn
-.texi.info:
-	@if [ -z "$(MAKEINFO)" ]; then \
-	  echo 1>&2 "Can't create $@ because no makeinfo(1)"; \
-	else \
-	  $(MAKEINFO) $< --no-split --output=$@; \
-	fi
-.texinfo.info:
-	@if [ -z "$(MAKEINFO)" ]; then \
-	  echo 1>&2 "Can't create $@ because no makeinfo(1)"; \
-	else \
-	  $(MAKEINFO) $< --no-split --output=$@; \
-	fi
-.txn.info:
-	@if [ -z "$(MAKEINFO)" ]; then \
-	  echo 1>&2 "Can't create $@ because no makeinfo(1)"; \
-	else \
-	  $(MAKEINFO) $< --no-split --output=$@; \
-	fi
+ps-am:
 
-# Ensure that info page depends on canonical TeX-Info macros.
-#
-dummy_info $(INFO):   texinfo.tex
+uninstall-am: uninstall-info-am
 
-# ###########################################################################
-# Cleanup:
-# ###########################################################################
-clean::
-	rm -f $(GARBAGE) $(PROGRAM) a.out core *.o *.a *.so.* *.sa.* *.so \
-	    *.log
+.PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \
+	clean-noinstLIBRARIES ctags distclean distclean-compile \
+	distclean-generic distclean-tags distdir dvi dvi-am info \
+	info-am install install-am install-data install-data-am \
+	install-exec install-exec-am install-info install-info-am \
+	install-man 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-info-am
 
-realclean::	distclean
-distclean::
-	rm -f $(GARBAGE) $(PROGRAM) a.out core *.o *.a *.so.* *.sa.* *.so \
-	    *.log Makefile config.status cc_id tags
-
-
-# ###########################################################################
-# Configuration:
-# ###########################################################################
-
-# The following target is touched because config.status won't update it if
-# it hasn't changed.
-#
-# The following is commented-out because the HPUX make(1) goes into a loop.
-#
-#Makefile:	config.status
-#	./config.status
-#	touch $@
-
-config.status:	cc_id configure
-	./configure --no-create
-
-cc_id:		FORCE
-	if test -r $@ && test "`cat $@`" = "$(CC)"; then \
-	    :; \
-	else \
-	    echo "$(CC)" > $@; \
-	fi
-
-configure:		configure.in
-	autoconf
-
-
-# ###########################################################################
-# Dependency maintenance:
-# ###########################################################################
-.PRECIOUS:	depend
-#
-# Note: The following rule will only work if the C compiler behaves correctly
-# when given the `-M' option.  AIX's cc(1) and SunOS's acc(1) behave
-# incorrectly.  --Steve Emmerson 1992-09-24
-#
-# Furthermore, we do not attempt to maintain dependencies on installed
-# header files (e.g. those in $(INCDIR)) for two reasons: 1) the dependency
-# list generated at Unidata mightn't correspond to the situation at a client
-# site; and 2) clients using broken compilers (c.f. previous note) can't
-# regenerate the dependency list.
-#
-disabled_depend:		FORCE
-	-incdir=`echo $(INCDIR) | sed s',/,\\\/,g'`; \
-	cc -M $(CPPFLAGS) $(CPPFLAGS_NETCDF) *.c 2> /dev/null | \
-	    awk '{ \
-		if ($$0 ~ /:/) { \
-		    target	= $$1; \
-		    if (target ~ /:/) { \
-			target	= substr(target,1,length(target)-1); \
-			start	= 2; \
-		    } else { \
-			start	= 3; \
-		    } \
-		} else { \
-		    start	= 1; \
-		} \
-		for (i = start; i <= NF; ++i) { \
-		    if ($$i !~ /^\\/ && \
-			$$i !~ /port\// && \
-			$$i !~ /^\//) \
-			print target ": " $$i \
-		} \
-	    }' > $@
-	tag='### DO NOT DELETE THIS LINE.  make depend DEPENDS ON IT ###'; \
-	    sed -e "/^$$tag$$/r depend" \
-		-e "/^$$tag$$/q" Makefile > Makefile.new
-	mv Makefile.new Makefile
-
-
-# ###########################################################################
-# Distributions:
-# ###########################################################################
-#FTPDIR		= @FTPDIR@
-#VERSION		= @VERSION@
-
-ftp:		$(FTPDIR)/$(PACKAGE)-$(VERSION).tar.Z
-	test ! -h $(FTPDIR)/$(PACKAGE).tar.Z && exit 0; \
-	cd $(FTPDIR) || exit 1; \
-	rm $(PACKAGE).tar.Z || exit 1; \
-	ln -s $(PACKAGE)-$(VERSION).tar.Z $(PACKAGE).tar.Z;
-
-$(FTPDIR)/$(PACKAGE)-$(VERSION).tar.Z:	$(PACKAGE)-$(VERSION).tar.Z
-	cp $(PACKAGE)-$(VERSION).tar.Z $@ 
-	chmod u+rw,g+rw,o=r $@
-
-tar.Z:		$(PACKAGE)-$(VERSION).tar.Z
-
-$(PACKAGE)-$(VERSION).tar.Z:	MANIFEST
-	dir=`basename \`pwd\`` \
-	&& id=$(PACKAGE)-$(VERSION) \
-	&& cd .. \
-	&& ln -s $$dir $$id \
-	&& tar -chof - `sed "s|^|$$id/|" $$id/MANIFEST` \
-	    | compress > $$id/$@ \
-	&& rm $$id
-
-MANIFEST:	FORCE
-	@echo 1>&2 Creating MANIFEST
-	@$(MAKE) -s $(MFLAGS) $(LOCAL_MACROS) MANIFEST.echo > $@
-
-MANIFEST.echo:	FORCE
-	@$(MAKE) -s $(MFLAGS) $(LOCAL_MACROS) \
-	    MANIFEST=`echo $(MANIFEST) | sed 's/MANIFEST//'` \
-	    ensure_manifest > /dev/null
-	@echo $(MANIFEST) | fmt -1
-	@if [ -n "$(SUBDIRS)" ]; then \
-	    subdirs="$(SUBDIRS)"; \
-	    for subdir in $$subdirs; do \
-		(cd $$subdir && \
-	        echo 1>&2 Creating $@ in `pwd` && \
-		$(MAKE) $(MFLAGS) $(LOCAL_MACROS) MANIFEST.echo | \
-		    sed "s|^|$$subdir/|") || exit 1; \
-	    done; \
-	else \
-	    :; \
-	fi
-
-ensure_manifest:	$(MANIFEST)
-
-# for distribution creation
-distdir = $(TOP_SRCDIR)/$(PACKAGE)-$(VERSION)/$(curdir)
-curdir = mfhdf/port
-dist: $(DISTFILES)
-	@for file in $(DISTFILES); do \
-	  ln $(srcdir)/$$file $(distdir)/$$file 2> /dev/null \
-	    || { echo copying $$file instead; \
-	    cp -p $(srcdir)/$$file $(distdir)/$$file;}; \
-	done
-
-# ###########################################################################
-# Miscellaneous:
-# ###########################################################################
-
-# The following dummy target is useful as a dependency to ensure that a
-# rule is always executed.
-#
-FORCE:
-
-
-### Everything after the following line might be overwritten ###
-### DO NOT DELETE THIS LINE.  make depend DEPENDS ON IT ###
-include depend
+# 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:

Deleted: packages/libhdf4/branches/upstream/current/mfhdf/port/Makefile.in_orig
===================================================================
--- packages/libhdf4/branches/upstream/current/mfhdf/port/Makefile.in_orig	2007-05-15 09:05:29 UTC (rev 830)
+++ packages/libhdf4/branches/upstream/current/mfhdf/port/Makefile.in_orig	2007-05-15 09:53:05 UTC (rev 831)
@@ -1,104 +0,0 @@
-# This is the makefile for the Unidata portability package.
-#
-# $Id: Makefile.in_orig,v 1.1 1996/03/28 20:57:38 georgev Exp $
-
-PACKAGE		= udport
-LIBRARY		= udport
-MAJOR_NO	= @MAJOR_NO@
-MINOR_NO	= @MINOR_NO@
-
-CPPFLAGS	= -I. @CPPFLAGS@
-CFLAGS		= @CFLAGS@
-
-PORT_CFORTRAN	= @PORT_CFORTRAN@
-NEED_FORTC	= @NEED_FORTC@
-
-PORT_HEADERS	= @PORT_HEADERS@
-config_headers	= signal.h stdarg.h stddef.h stdlib.h string.h time.h \
-		  udconfig.h udposix.h
-made_headers	= float.h limits.h
-LIBOBJS		= uddummy.o @LIBOBJS@
-
-prefix		= ../../..
-
-SUBDIRS		= @PORT_SUBDIRS@
-SUBDIR_TARGETS	= fortc/all fortc/install fortc/clean fortc/distclean
-MANIFEST        = COPYRIGHT CUSTOMIZE HISTORY Makefile.in VERSION aclocal.m4 \
-		  @PORT_MANIFEST@ \
-		  configure configure.in depend master.mk.in uddummy.c
-
-# Note that the `all' target might not make `fortc/all'.  That will depend 
-# on whether or not that utility is required.
-
-all::		FORCE $(PORT_HEADERS)
-	@if [ "$(NEED_FORTC)" = yes ]; then \
-	    $(MAKE) $(MFLAGS) fortc/all; \
-	else \
-	    :; \
-	fi
-	@$(MAKE) $(MFLAGS) library
-
-# We install the portability library modules directly into an installed
-# portability library even though the package using this portability library
-# (the client package) probably doesn't reference the installed one.  This is
-# done because the client package might be another library and linking
-# against it might require some modules of this library.  We don't install
-# the portability library just created because different packages can require
-# different modules.
-#
-install::	$(LIBOBJS)
-	$(MAKE) $(MFLAGS) $(LIBDIR) LIBDIR=$(LIBDIR)
-	$(AR) rcuv $(LIBDIR)/libudport.a $(LIBOBJS)
-	$(RANLIB) $(LIBDIR)/libudport.a
-
-clean::		FORCE
-	@if [ "$(NEED_FORTC)" = yes ]; then \
-	    $(MAKE) $(MFLAGS) fortc/clean; \
-	else \
-	    :; \
-	fi
-	rm -f $(made_headers) config
-
-distclean::
-	@if [ "$(NEED_FORTC)" = yes ]; then \
-	    $(MAKE) $(MFLAGS) fortc/distclean; \
-	else \
-	    :; \
-	fi
-	rm -f $(made_headers) $(config_headers) config master.mk
-
-Makefile:	Makefile.in master.mk.in
-
-float.h:	config
-	./config -f > $@
-limits.h:	config
-	./config -l > $@
-cfortran.h:	cfortran_h
-	if test "$(PORT_CFORTRAN)" = stdc; then \
-	    sed 's/\/\*\*\//##/g' cfortran_h > $@; \
-	else \
-	    cp cfortran_h $@; \
-	fi
-
-# C compiler information program:
-#
-# NB: config(1) must be compiled unoptimized.  We first assume that `signed
-# char' is valid; if that doesn't work, then we assume it's invalid.  If
-# that doesn't work, the user will have to determine the appropriate
-# compilation flags (see config.c).
-#
-# If the following program won't compile, then contact
-# support at unidata.ucar.edu (ask for Steve).
-#
-config:               config.c
-	if $(CC) config.c -o config 2> /dev/null; then \
-		: true; \
-	else \
-		$(CC) -DNO_SC config.c -o config; \
-	fi
-
-include master.mk
-
-### Everything after the following line might be overwritten ###
-### DO NOT DELETE THIS LINE.  make depend DEPENDS ON IT ###
-include depend

Added: packages/libhdf4/branches/upstream/current/mfhdf/xdr/Makefile.am
===================================================================
--- packages/libhdf4/branches/upstream/current/mfhdf/xdr/Makefile.am	                        (rev 0)
+++ packages/libhdf4/branches/upstream/current/mfhdf/xdr/Makefile.am	2007-05-15 09:53:05 UTC (rev 831)
@@ -0,0 +1,3 @@
+lib_LIBRARIES = libxdr.a
+libxdr_a_SOURCES = xdr.c xdrfloat.c xdrstdio.c xdrarray.c
+include_HEADERS = xdr.h types.h

Modified: packages/libhdf4/branches/upstream/current/mfhdf/xdr/Makefile.in
===================================================================
--- packages/libhdf4/branches/upstream/current/mfhdf/xdr/Makefile.in	2007-05-15 09:05:29 UTC (rev 830)
+++ packages/libhdf4/branches/upstream/current/mfhdf/xdr/Makefile.in	2007-05-15 09:53:05 UTC (rev 831)
@@ -1,747 +1,450 @@
-# Makefile for the eXternal Data Representation (XDR) library routines 
-# used by the Network CDF library (needed if and only if the native xdr(3)
-# implementation is broken or doesn't exist).
-#
-# $Id: Makefile.in,v 1.20 2000/08/30 21:55:50 wendling Exp $
-# NOTE: This Makefile.in is used by the Cygnus 'configure' script to
-#       generate the top level Makefile.
+# Makefile.in generated by automake 1.7.7 from Makefile.am.
+# @configure_input@
 
-# ############# Start of system configuration section. #############
+# Copyright 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003
+# 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.
 
-# 'srcdir' Gets set to directory this Makefile is found in
-srcdir = .
-TOP_SRCDIR = ../..
+# 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.
 
-prefix = $(TOP_SRCDIR)/NewHDF
+ at SET_MAKE@
 
-exec_prefix = $(prefix)
-tooldir = $(exec_prefix)/$(target)
+srcdir = @srcdir@
+top_srcdir = @top_srcdir@
+VPATH = @srcdir@
+pkgdatadir = $(datadir)/@PACKAGE@
+pkglibdir = $(libdir)/@PACKAGE@
+pkgincludedir = $(includedir)/@PACKAGE@
+top_builddir = ../..
 
-program_transform_name =
+am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
+INSTALL = @INSTALL@
+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 = :
+host_triplet = @host@
+ACLOCAL = @ACLOCAL@
+AMDEP_FALSE = @AMDEP_FALSE@
+AMDEP_TRUE = @AMDEP_TRUE@
+AMTAR = @AMTAR@
+AR = @AR@
+AUTOCONF = @AUTOCONF@
+AUTOHEADER = @AUTOHEADER@
+AUTOMAKE = @AUTOMAKE@
+AWK = @AWK@
+CC = @CC@
+CCDEPMODE = @CCDEPMODE@
+CFLAGS = @CFLAGS@
+CPP = @CPP@
+CPPFLAGS = @CPPFLAGS@
+CXX = @CXX@
+CXXCPP = @CXXCPP@
+CXXDEPMODE = @CXXDEPMODE@
+CXXFLAGS = @CXXFLAGS@
+CYGPATH_W = @CYGPATH_W@
+DEFS = @DEFS@
+DEPDIR = @DEPDIR@
+DIFF = @DIFF@
+ECHO_C = @ECHO_C@
+ECHO_N = @ECHO_N@
+ECHO_T = @ECHO_T@
+EGREP = @EGREP@
+EXEEXT = @EXEEXT@
+F77 = @F77@
+FFLAGS = @FFLAGS@
+HDF_BUILD_FORTRAN_FALSE = @HDF_BUILD_FORTRAN_FALSE@
+HDF_BUILD_FORTRAN_TRUE = @HDF_BUILD_FORTRAN_TRUE@
+HDF_BUILD_XDR_FALSE = @HDF_BUILD_XDR_FALSE@
+HDF_BUILD_XDR_TRUE = @HDF_BUILD_XDR_TRUE@
+INSTALL_DATA = @INSTALL_DATA@
+INSTALL_PROGRAM = @INSTALL_PROGRAM@
+INSTALL_SCRIPT = @INSTALL_SCRIPT@
+INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
+LDFLAGS = @LDFLAGS@
+LEX = @LEX@
+LEXLIB = @LEXLIB@
+LEX_OUTPUT_ROOT = @LEX_OUTPUT_ROOT@
+LIBOBJS = @LIBOBJS@
+LIBS = @LIBS@
+LN_S = @LN_S@
+LTLIBOBJS = @LTLIBOBJS@
+MAINT = @MAINT@
+MAINTAINER_MODE_FALSE = @MAINTAINER_MODE_FALSE@
+MAINTAINER_MODE_TRUE = @MAINTAINER_MODE_TRUE@
+MAKEINFO = @MAKEINFO@
+NEQN = @NEQN@
+OBJEXT = @OBJEXT@
+PACKAGE = @PACKAGE@
+PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
+PACKAGE_NAME = @PACKAGE_NAME@
+PACKAGE_STRING = @PACKAGE_STRING@
+PACKAGE_TARNAME = @PACKAGE_TARNAME@
+PACKAGE_VERSION = @PACKAGE_VERSION@
+PATH_SEPARATOR = @PATH_SEPARATOR@
+RANLIB = @RANLIB@
+SET_MAKE = @SET_MAKE@
+SHELL = @SHELL@
+STRIP = @STRIP@
+TBL = @TBL@
+VERSION = @VERSION@
+YACC = @YACC@
+ac_ct_CC = @ac_ct_CC@
+ac_ct_CXX = @ac_ct_CXX@
+ac_ct_F77 = @ac_ct_F77@
+ac_ct_RANLIB = @ac_ct_RANLIB@
+ac_ct_STRIP = @ac_ct_STRIP@
+am__fastdepCC_FALSE = @am__fastdepCC_FALSE@
+am__fastdepCC_TRUE = @am__fastdepCC_TRUE@
+am__fastdepCXX_FALSE = @am__fastdepCXX_FALSE@
+am__fastdepCXX_TRUE = @am__fastdepCXX_TRUE@
+am__include = @am__include@
+am__leading_dot = @am__leading_dot@
+am__quote = @am__quote@
+bindir = @bindir@
+build = @build@
+build_alias = @build_alias@
+build_cpu = @build_cpu@
+build_os = @build_os@
+build_vendor = @build_vendor@
+datadir = @datadir@
+exec_prefix = @exec_prefix@
+host = @host@
+host_alias = @host_alias@
+host_cpu = @host_cpu@
+host_os = @host_os@
+host_vendor = @host_vendor@
+includedir = @includedir@
+infodir = @infodir@
+install_sh = @install_sh@
+libdir = @libdir@
+libexecdir = @libexecdir@
+localstatedir = @localstatedir@
+mandir = @mandir@
+oldincludedir = @oldincludedir@
+prefix = @prefix@
+program_transform_name = @program_transform_name@
+sbindir = @sbindir@
+sharedstatedir = @sharedstatedir@
+sysconfdir = @sysconfdir@
+target_alias = @target_alias@
+lib_LIBRARIES = libxdr.a
+libxdr_a_SOURCES = xdr.c xdrfloat.c xdrstdio.c xdrarray.c
+include_HEADERS = xdr.h types.h
+subdir = mfhdf/xdr
+ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
+mkinstalldirs = $(SHELL) $(top_srcdir)/bin/mkinstalldirs
+CONFIG_HEADER = $(top_builddir)/hdf/src/h4config.h
+CONFIG_CLEAN_FILES =
+LIBRARIES = $(lib_LIBRARIES)
 
-datadir = $(prefix)/lib
-mandir = $(prefix)/man
-man1dir = $(mandir)/man1
-man2dir = $(mandir)/man2
-man3dir = $(mandir)/man3
-man4dir = $(mandir)/man4
-man5dir = $(mandir)/man5
-man6dir = $(mandir)/man6
-man7dir = $(mandir)/man7
-man8dir = $(mandir)/man8
-man9dir = $(mandir)/man9
-docdir = $(datadir)/doc
+libxdr_a_AR = $(AR) cru
+libxdr_a_LIBADD =
+am_libxdr_a_OBJECTS = xdr.$(OBJEXT) xdrfloat.$(OBJEXT) \
+	xdrstdio.$(OBJEXT) xdrarray.$(OBJEXT)
+libxdr_a_OBJECTS = $(am_libxdr_a_OBJECTS)
 
-SHELL = /bin/sh
+DEFAULT_INCLUDES =  -I. -I$(srcdir) -I$(top_builddir)/hdf/src
+depcomp = $(SHELL) $(top_srcdir)/bin/depcomp
+am__depfiles_maybe = depfiles
+ at AMDEP_TRUE@DEP_FILES = ./$(DEPDIR)/xdr.Po ./$(DEPDIR)/xdrarray.Po \
+ at AMDEP_TRUE@	./$(DEPDIR)/xdrfloat.Po ./$(DEPDIR)/xdrstdio.Po
+COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \
+	$(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
+CCLD = $(CC)
+LINK = $(CCLD) $(AM_CFLAGS) $(CFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@
+DIST_SOURCES = $(libxdr_a_SOURCES)
+HEADERS = $(include_HEADERS)
 
-INSTALL = ${TOP_SRCDIR}/install-sh -c
-INSTALL_PROGRAM = $(INSTALL)
-INSTALL_DATA = $(INSTALL) -m 644
+DIST_COMMON = README $(include_HEADERS) $(srcdir)/Makefile.in \
+	Makefile.am
+SOURCES = $(libxdr_a_SOURCES)
 
-# /usr/local/bin/m4 (GNU version?)
-M4   = /usr/local/bin/m4
-# /usr/local/bin/perl (GNU version?)
-PERL = /usr/local/bin/perl
+all: all-am
 
-# Name of achive randomizer, usually ranlib (use 'touch' if non-existant)
-RANLIB = ranlib
-
-# Name of library archiver and flags to send, default 'AR=ar', 'ARFLAGS=r'
-AR = ar
-ARFLAGS = rc
-
-# Name of remove utility, default 'RM=/bin/rm', 'RMFLAGS=-f'
-RM = /bin/rm
-RMFLAGS = -f
-
-AS = as
-CC = gcc
-CFLAGS = -ansi
-FC = f77
-FFLAGS=
-
-# Set for document generation
-MAKEINFO = makeinfo
-TEXI2DVI = texi2dvi
-
-# Directory in which to install binaries
-bindir = $(exec_prefix)/bin
-
-# Directory in which to install header files.
-includedir = $(prefex)/include
-
-# Directory in which to install library files.
-libdir = $(prefix)/lib
-
-# Directory in which to install documentation info files.
-infodir = $(prefix)/info
-
-# ------------ General Macros for NETCDF --------------------
-INCDIR	 = $(prefix)/include
-HDF_LIB  = $(TOP_SRCDIR)/hdf/src/libdf.a
-HDF_INC  = $(TOP_SRCDIR)/hdf/src/
-PABLO_HINC = $(TOP_SRCDIR)/hdf/pablo
-FMPOOL_INC = $(TOP_SRCDIR)/hdf/fmpool
-JPEG_LIB = $(TOP_SRCDIR)/hdf/jpeg/libjpeg.a
-ZLIB_LIB = $(TOP_SRCDIR)/hdf/zlib/libz.a
-NETCDF_INC = $(TOP_SRCDIR)/mfhdf/libsrc
-PORT_INC   = $(TOP_SRCDIR)/mfhdf/port
-CPP	   = $(CC) -E
-CFLAGS_NETCDF = 
-CPPFLAGS_HDF  = -DNDEBUG -DHDF $(FMPOOL_FLAGS)
-CPP_NETCDF    = -I. -I$(HDF_INC) -I$(NETCDF_INC) -I$(PORT_INC)
-CPPFLAGS_LIB	= $(SWAP) $(NETLONG) 
-CPPFLAGS_XDR	= $(CPP_XDR) 
-CPPFLAGS_NETCDF =  $(CPPFLAGS_XDR) $(CPP_NETCDF) $(CPPFLAGS_LIB) $(CPPFLAGS_HDF) 
-FFLAGS  =
-NCDUMP	= 
-NCGEN	= 
-NEQN	= neqn
-OS	= 
-TBL	= tbl
-WHICH	= which
-FTPDIR	= 
-VERSION	= 2.3.2
-LEX	= lex
-YACC	= yacc
-DIFF    = diff
-DIFF_FLAGS = -w
-
-
-#### ----- host and target specific makefile fragments come in here.-------
-### ------------------- end of makefile fragments -------------------------
-# ############# End of system configuration section. ###############
-
-PROGRAM		= xdrtest
-#OS		= @OS@
-#CPP_XDR		= @CPP_XDR@
-#CPPFLAGS	= $(CPPFLAGS_XDR)
-#CFLAGS		= $(CFLAGS_XDR)
-HEADERS		= xdr.h types.h
-MANIFEST = $(DISTFILES)
-DISTFILES	= Makefile.in NOTICE.h README depend \
-		  byteordr.c descrip.mms htonl.mar make.com msoft.mk \
-		  ntohl.mar test_xdr.sav types.h xdr.c xdr.h xdrarray.c \
-		  xdrfloat.c xdrstdio.c $(PROGRAM).c $(PROGRAM).opt \
-		  testout.sav
-LIBOBJS		= $(XDR_LIBOBJS)
-LIBNAME		= mfhdf
-REMOTE_LIBRARY	= ../libsrc/lib$(LIBNAME).a
-OBJS		= $(PROGRAM).o $(LIBOBJS)
-#LD_XDR		= @LD_XDR@
-LD_NETCDF	= ../libsrc/libmfhdf.a
-LIBS		= $(LD_XDR) $(LIBSX)
-INSTALL_DEPS	= $(XDR_INSTALL_DEPS)
-prefix		= ../../..
-GARBAGE		= test.xdr $(PROGRAM)_out.new
-
-
-all::         FORCE
-	@if test -z "$(LIBOBJS)"; then \
-	  : true; \
-	else		 \
-	  $(MAKE) $(MFLAGS) $(LOCAL_MACROS) $(REMOTE_LIBRARY); \
-	fi
-
-# The formatted file `$(PROGRAM)_out.new' might differ from the touchstone
-# file `testout.sav', but this should be due to SMALL rounding errors.
-#
-# `$(PROGRAM)' creates the binary-file `test.xdr' which MUST be byte-for-byte
-# identical with `test_xdr.sav'.
-#
-test:		$(PROGRAM)
-	@ echo "========================="
-	@ echo "netCDF XDR tests start"
-	@ echo "========================="
-	./$(PROGRAM) > $(PROGRAM)_out.new
-	@cmd="$(DIFF) $(DIFF_FLAGS) $(PROGRAM)_out.new testout.sav"; \
-	echo $$cmd; \
-	if $$cmd; then \
-	    echo "*** XDR passes formatted test ***"; \
-	else \
-	    echo "*** XDR fails formatted test ***"; \
-	    echo "The above differences are OK iff due to rounding"; \
-	    exit 0; \
-	fi
-	@cmd="cmp test.xdr test_xdr.sav"; \
-	echo $$cmd; \
-	if $$cmd; then \
-	    echo "*** XDR passes binary test ***"; \
-	else \
-	    echo "*** XDR fails binary test ***"; \
-	    exit 1; \
-	fi
-
-install::
-
-install-includes::
-
-# This is the master.mk.in makefile.  It contains general rules.
-#
-
 .SUFFIXES:
-.SUFFIXES:	.so .o .i .c .fc .f .F .l .y
+.SUFFIXES: .c .o .obj
+$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ Makefile.am  $(top_srcdir)/configure.ac $(ACLOCAL_M4)
+	cd $(top_srcdir) && \
+	  $(AUTOMAKE) --foreign  mfhdf/xdr/Makefile
+Makefile: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.in  $(top_builddir)/config.status
+	cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)
+libLIBRARIES_INSTALL = $(INSTALL_DATA)
+install-libLIBRARIES: $(lib_LIBRARIES)
+	@$(NORMAL_INSTALL)
+	$(mkinstalldirs) $(DESTDIR)$(libdir)
+	@list='$(lib_LIBRARIES)'; for p in $$list; do \
+	  if test -f $$p; then \
+	    f="`echo $$p | sed -e 's|^.*/||'`"; \
+	    echo " $(libLIBRARIES_INSTALL) $$p $(DESTDIR)$(libdir)/$$f"; \
+	    $(libLIBRARIES_INSTALL) $$p $(DESTDIR)$(libdir)/$$f; \
+	  else :; fi; \
+	done
+	@$(POST_INSTALL)
+	@list='$(lib_LIBRARIES)'; for p in $$list; do \
+	  if test -f $$p; then \
+	    p="`echo $$p | sed -e 's|^.*/||'`"; \
+	    echo " $(RANLIB) $(DESTDIR)$(libdir)/$$p"; \
+	    $(RANLIB) $(DESTDIR)$(libdir)/$$p; \
+	  else :; fi; \
+	done
 
-# ###########################################################################
-# General Macros: (moved to make file fragment )
-# ###########################################################################
-#CPP		= @CPP@
-#NCDUMP		= @NCDUMP@
-#NCGEN		= @NCGEN@
-#NEQN		= @NEQN@
-#OS		= @OS@
-#TBL		= @TBL@
-#WHICH		= @WHICH@
+uninstall-libLIBRARIES:
+	@$(NORMAL_UNINSTALL)
+	@list='$(lib_LIBRARIES)'; for p in $$list; do \
+	  p="`echo $$p | sed -e 's|^.*/||'`"; \
+	  echo " rm -f $(DESTDIR)$(libdir)/$$p"; \
+	  rm -f $(DESTDIR)$(libdir)/$$p; \
+	done
 
-# ###########################################################################
-# Recursive Macros (command-line changes to others aren't supported):
-# ###########################################################################
-SUBDIR_MACROS = CC="$(CC)" \
-	CFLAGS="$(CFLAGS)" \
-	CPP="$(CPP)" \
-	exec_prefix="$(exec_prefix)" \
-	FC="$(FC)" \
-	prefix="$(prefix)"
+clean-libLIBRARIES:
+	-test -z "$(lib_LIBRARIES)" || rm -f $(lib_LIBRARIES)
+libxdr.a: $(libxdr_a_OBJECTS) $(libxdr_a_DEPENDENCIES) 
+	-rm -f libxdr.a
+	$(libxdr_a_AR) libxdr.a $(libxdr_a_OBJECTS) $(libxdr_a_LIBADD)
+	$(RANLIB) libxdr.a
 
-LOCAL_MACROS  = CC="$(CC)" \
-	CFLAGS="$(CFLAGS)" \
-	CPP="$(CPP)" \
-	CPPFLAGS="$(CPPFLAGS)" \
-	exec_prefix="$(exec_prefix)" \
-	FC="$(FC)" \
-	prefix="$(prefix)"
+mostlyclean-compile:
+	-rm -f *.$(OBJEXT) core *.core
 
-# ###########################################################################
-# Recursive make(1)s in Subdirectories:
-# ###########################################################################
+distclean-compile:
+	-rm -f *.tab.c
 
-subdir_dummy_target $(SUBDIR_TARGETS):
-	@echo ""
-	@dir=`echo $@ | sed 's,/.*,,'`; \
-	    target=`echo $@ | sed "s,$$dir/,,"`; \
-	    cd $$dir && \
-	    echo "making \`$$target' in directory `pwd`" && \
-	    echo "" && \
-	    $(MAKE) $(MFLAGS) $(SUBDIR_MACROS) \
-		$$target || exit 1
-	@echo ""
-	@echo "returning to directory `pwd`"
-	@echo ""
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/xdr.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/xdrarray.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/xdrfloat.Po at am__quote@
+ at AMDEP_TRUE@@am__include@ @am__quote at ./$(DEPDIR)/xdrstdio.Po at am__quote@
 
-
-# ###########################################################################
-# Compilation:
-# ###########################################################################
-#FORTC		= @FORTC@
-
-# Compile FORTRAN code.
-#
-.f.o:
-	$(FC) -c $(FFLAGS) $<
-.F.o:
-	ln -s $< $$$$.c \
-	&& $(CPP) -DUD_FORTRAN_SOURCE $(CPPFLAGS) $(CPPFLAGS_NETCDF) $$$$.c \
-	    | sed '/^# *[0-9]/d' > $*.f \
-	|| (rm -f $*.f $$$$.c; exit 1) \
-	&& rm $$$$.c
-	$(FC) -c $(FFLAGS) $*.f
-.F.f:
-	ln -s $< $$$$.c \
-	&& $(CPP) -DUD_FORTRAN_SOURCE $(CPPFLAGS) $(CPPFLAGS_NETCDF) $$$$.c \
-	    | sed '/^# *[0-9]/d' > $@ \
-	|| (rm -f $@ $$$$.c; exit 1) \
-	&& rm $$$$.c
-
-# Generate FORTRAN-callable C code.
-#
-.fc.o:
-	$(FORTC) -O $(OS) $< > $*.c \
-	    || ( rm -f $*.c; exit 1)
-	$(CC) -c $(CFLAGS) $(CPPFLAGS) $(CPPFLAGS_NETCDF) $*.c
-.fc.c:
-	$(FORTC) -O $(OS) $< > $@ \
-	    || (rm -f $*.c; exit 1)
-
-# Compile C code.
-#
 .c.o:
-	$(CC) -c $(CPPFLAGS) $(CPPFLAGS_NETCDF) $(CFLAGS) $<
+ at am__fastdepCC_TRUE@	if $(COMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" \
+ at am__fastdepCC_TRUE@	  -c -o $@ `test -f '$<' || echo '$(srcdir)/'`$<; \
+ at am__fastdepCC_TRUE@	then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; \
+ at am__fastdepCC_TRUE@	else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; \
+ at am__fastdepCC_TRUE@	fi
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	depfile='$(DEPDIR)/$*.Po' tmpdepfile='$(DEPDIR)/$*.TPo' @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	$(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCC_FALSE@	$(COMPILE) -c `test -f '$<' || echo '$(srcdir)/'`$<
 
-# Compile lex(1) code.  This rule is here to ensure the use of CPPFLAGS.
-# 
-.l.o:
-	rm -f $*.c
-	$(LEX) -t $< > $*.c
-	$(CC) -c $(CPPFLAGS) $(CPPFLAGS_NETCDF) $(CFLAGS) $*.c
-	rm $*.c
+.c.obj:
+ at am__fastdepCC_TRUE@	if $(COMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" \
+ at am__fastdepCC_TRUE@	  -c -o $@ `if test -f '$<'; then $(CYGPATH_W) '$<'; else $(CYGPATH_W) '$(srcdir)/$<'; fi`; \
+ at am__fastdepCC_TRUE@	then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; \
+ at am__fastdepCC_TRUE@	else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; \
+ at am__fastdepCC_TRUE@	fi
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	depfile='$(DEPDIR)/$*.Po' tmpdepfile='$(DEPDIR)/$*.TPo' @AMDEPBACKSLASH@
+ at AMDEP_TRUE@@am__fastdepCC_FALSE@	$(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
+ at am__fastdepCC_FALSE@	$(COMPILE) -c `if test -f '$<'; then $(CYGPATH_W) '$<'; else $(CYGPATH_W) '$(srcdir)/$<'; fi`
+uninstall-info-am:
+includeHEADERS_INSTALL = $(INSTALL_HEADER)
+install-includeHEADERS: $(include_HEADERS)
+	@$(NORMAL_INSTALL)
+	$(mkinstalldirs) $(DESTDIR)$(includedir)
+	@list='$(include_HEADERS)'; for p in $$list; do \
+	  if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
+	  f="`echo $$p | sed -e 's|^.*/||'`"; \
+	  echo " $(includeHEADERS_INSTALL) $$d$$p $(DESTDIR)$(includedir)/$$f"; \
+	  $(includeHEADERS_INSTALL) $$d$$p $(DESTDIR)$(includedir)/$$f; \
+	done
 
-# C preprocess.  
-#   NB: 
-#	1. The output `file' is not created but appears on standard output;
-#	2. Line numbering information is kept.
-#
-.c.i:
-	$(CPP) $(CPPFLAGS) $(CPPFLAGS_NETCDF) $<
+uninstall-includeHEADERS:
+	@$(NORMAL_UNINSTALL)
+	@list='$(include_HEADERS)'; for p in $$list; do \
+	  f="`echo $$p | sed -e 's|^.*/||'`"; \
+	  echo " rm -f $(DESTDIR)$(includedir)/$$f"; \
+	  rm -f $(DESTDIR)$(includedir)/$$f; \
+	done
 
+ETAGS = etags
+ETAGSFLAGS =
 
-# ###########################################################################
-# Libraries:
-# ###########################################################################
-# RANLIB		= @RANLIB@
-LIBDIR		= $(prefix)/lib
-LIB_A		= lib$(LIBRARY).a
+CTAGS = ctags
+CTAGSFLAGS =
 
-library::		$(LIB_A)
+tags: TAGS
 
-# The following rule is forced because the library can be created by a
-# makefile in another directory prior to the execution of the following rule.
-#
-$(LIB_A):		$(LIBOBJS) FORCE
-	$(AR) rcuv $@ $(LIBOBJS)
-	$(RANLIB) $@
+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; } \
+	       END { for (i in files) print i; }'`; \
+	mkid -fID $$unique
 
-# The following rule is for those makefiles needing to install object
-# modules in a library in another directory.  They need only define 
-# REMOTE_LIBRARY and LIBOBJS.  The rule is forced for the same reason as the
-# $(LIB_A) rule.
-#
-lib_dummy $(REMOTE_LIBRARY):	$(LIBOBJS) FORCE
-	$(AR) rcuv $@ $(LIBOBJS)
-	$(RANLIB) $@
+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; } \
+	       END { for (i in files) print i; }'`; \
+	test -z "$(ETAGS_ARGS)$$tags$$unique" \
+	  || $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
+	     $$tags $$unique
 
-installed_libfiles:	FORCE
-	@if [ -n "$(LIBFILES)" ]; then \
-	    libfiles="$(LIBFILES)"; \
-	    for libfile in $$libfiles; do \
-		$(MAKE) $(MFLAGS) $(LOCAL_MACROS) \
-		    LIBDIR=$(LIBDIR) LIBFILE=$$libfile \
-		    installed_libfile || exit 1; \
-	    done; \
-	else \
-	    :; \
-	fi
+ctags: CTAGS
+CTAGS:  $(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; } \
+	       END { for (i in files) print i; }'`; \
+	test -z "$(CTAGS_ARGS)$$tags$$unique" \
+	  || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
+	     $$tags $$unique
 
-installed_library::	FORCE
-	@$(MAKE) $(MFLAGS) $(LOCAL_MACROS) \
-	    LIBDIR=$(LIBDIR) LIBFILE=$(LIB_A) \
-	    installed_libfile
+GTAGS:
+	here=`$(am__cd) $(top_builddir) && pwd` \
+	  && cd $(top_srcdir) \
+	  && gtags -i $(GTAGS_ARGS) $$here
 
-# The following target decouples the previous targets from the actual rule;
-# thus, eliminating extraneous make(1) messages.
-#
-installed_libfile:	$(LIBDIR)/$(LIBFILE)
+distclean-tags:
+	-rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
+DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
 
-$(LIBDIR)/$(LIBFILE):	$(LIBDIR) $(LIBFILE)
-	$(INSTALL_DATA) $(LIBFILE) $@
+top_distdir = ../..
+distdir = $(top_distdir)/$(PACKAGE)-$(VERSION)
 
-dummy_libdir $(LIBDIR):
-	mkdir -p $@
-	chmod u+rwx,g+rws,o=rx $@
-
-LIB_SO		= lib$(LIBRARY).so.$(MAJOR_NO).$(MINOR_NO)
-LIB_SA		= lib$(LIBRARY).sa.$(MAJOR_NO).$(MINOR_NO)
-
-#library::		FORCE
-#	@so_objs=`echo $(LIBOBJS) | sed 's/\.o/.so/g'`; \
-#	if [ -z "$$so_objs" ]; then \
-#	    :; \
-#	else \
-#	    $(MAKE) $(MFLAGS) $(LIB_SO) \
-#		SO_OBJS="$$so_objs"; \
-#	fi
-#	@if [ -z "$(SA_OBJS)" ]; then \
-#	    :; \
-#	else \
-#	    $(MAKE) $(MFLAGS) $(LIB_SA); \
-#	fi
-
-$(LIB_SO):	$(SO_OBJS)
-	ld -assert pure-text $(SO_OBJS) -o $@
-$(LIB_SA):	$(SA_OBJS) FORCE
-	$(AR) rcuv $@ $(SA_OBJS)
-
-.fc.so:
-	$(FORTC) -O $(OS) $< > $*.c \
-	    || (rm -f $*.c; exit 1)
-	$(CC) -c -pic $(CFLAGS) $(CPPFLAGS) $(CPPFLAGS_NETCDF) $*.c -o $$$$.o \
-	    || (rm -f $$$$.o; exit 1)
-	mv $$$$.o $@
-.c.so:
-	$(CC) -c -pic $(CFLAGS) $(CPPFLAGS) $(CPPFLAGS_NETCDF) $< -o $$$$.o \
-	    || (rm -f $$$$.o; exit 1)
-	mv $$$$.o $@
-
-#installed_library::	$(LIBDIR)/$(LIB_SO)
-#	@if [ -z "$(SA_OBJS)" ]; then \
-#	    :; \
-#	else \
-#	    $(MAKE) $(MFLAGS) $(LIBDIR)/$(LIB_SA); \
-#	fi
-
-$(LIBDIR)/$(LIB_SO):	$(LIBDIR) $(LIB_SO)
-	$(INSTALL_DATA) $(LIB_SO) $(LIBDIR)/$(LIB_SO)
-$(LIBDIR)/$(LIB_SA):	$(LIBDIR) $(LIB_SA)
-	$(INSTALL_DATA) $(LIB_SA) $(LIBDIR)/$(LIB_SA)
-
-
-# ###########################################################################
-# Programs:
-# ###########################################################################
-BINDIR		= $(exec_prefix)/bin
-
-programs:	$(PROGRAMS)
-program:
-	@if [ -z "$(PROGRAM)" ]; then \
-	    : true; \
-	else \
-	    if [ -z "$(LIBRARY)" ]; then \
-		: true; \
-	    else \
-		$(MAKE) $(MFLAGS) $(LOCAL_MACROS) library; \
+distdir: $(DISTFILES)
+	@srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \
+	topsrcdirstrip=`echo "$(top_srcdir)" | sed 's|.|.|g'`; \
+	list='$(DISTFILES)'; for file in $$list; do \
+	  case $$file in \
+	    $(srcdir)/*) file=`echo "$$file" | sed "s|^$$srcdirstrip/||"`;; \
+	    $(top_srcdir)/*) file=`echo "$$file" | sed "s|^$$topsrcdirstrip/|$(top_builddir)/|"`;; \
+	  esac; \
+	  if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
+	  dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \
+	  if test "$$dir" != "$$file" && test "$$dir" != "."; then \
+	    dir="/$$dir"; \
+	    $(mkinstalldirs) "$(distdir)$$dir"; \
+	  else \
+	    dir=''; \
+	  fi; \
+	  if test -d $$d/$$file; then \
+	    if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
+	      cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \
 	    fi; \
-	    $(MAKE) $(MFLAGS) $(LOCAL_MACROS) $(PROGRAM); \
-	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 $(LIBRARIES) $(HEADERS)
 
-dummy_prog $(PROGRAM):	$(OBJS)
-	@if [ -r $@.f -o -r $@.F ]; then \
-	    ld='$(FC) $(FFLAGS)'; \
-	else \
-	    ld='$(CC) $(CFLAGS)'; \
-	fi; \
-	cmd="$$ld $(OBJS) $(LIBS) -o $@"; \
-	echo $$cmd; \
-	$$cmd \
-	    || (rm -f $@; exit 1)
+installdirs:
+	$(mkinstalldirs) $(DESTDIR)$(libdir) $(DESTDIR)$(includedir)
+install: install-am
+install-exec: install-exec-am
+install-data: install-data-am
+uninstall: uninstall-am
 
-installed_programs:	FORCE
-	@$(MAKE) $(MFLAGS) $(LOCAL_MACROS) installed_binfiles \
-	    BINDIR=$(BINDIR) BINFILES="$(PROGRAMS)"
+install-am: all-am
+	@$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
 
-installed_binfiles:	FORCE
-	@if [ -n "$(BINFILES)" ]; then \
-	    binfiles="$(BINFILES)"; \
-	    for binfile in $$binfiles; do \
-		$(MAKE) $(MFLAGS) $(LOCAL_MACROS) \
-		    BINDIR=$(BINDIR) BINFILE=$$binfile \
-		    installed_binfile || exit 1; \
-	    done; \
-	else \
-	    :; \
-	fi
+installcheck: installcheck-am
+install-strip:
+	$(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
+	  INSTALL_STRIP_FLAG=-s \
+	  `test -z '$(STRIP)' || \
+	    echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
+mostlyclean-generic:
 
-installed_program:	FORCE
-	@$(MAKE) $(MFLAGS) $(LOCAL_MACROS) BINDIR=$(BINDIR) BINFILE=$(PROGRAM) \
-	    installed_binfile
+clean-generic:
 
-# The following target decouples the previous targets from the actual rule;
-# thus, eliminating extraneous make(1) messages.
-#
-installed_binfile:	$(BINDIR)/$(BINFILE)
+distclean-generic:
+	-rm -f $(CONFIG_CLEAN_FILES)
 
-$(BINDIR)/$(BINFILE):	$(BINDIR) $(BINFILE)
-	$(INSTALL_PROGRAM) $(BINFILE) $@
+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
 
-dummy_bindir $(BINDIR):
-	mkdir -p $@
-	chmod u+rwx,g+rws,o=rx $@
+clean-am: clean-generic clean-libLIBRARIES mostlyclean-am
 
+distclean: distclean-am
+	-rm -rf ./$(DEPDIR)
+	-rm -f Makefile
 
-# ###########################################################################
-# Header files:
-# ###########################################################################
-installed_headers:	FORCE
-	@if [ -n "$(HEADERS)" ]; then \
-	    headers="$(HEADERS)"; \
-	    for header in $$headers; do \
-		$(MAKE) $(MFLAGS) $(LOCAL_MACROS) INCDIR=$(INCDIR) HEADER=$$header \
-		    installed_header || exit 1; \
-	    done; \
-	else \
-	    :; \
-	fi
+distclean-am: clean-am distclean-compile distclean-generic \
+	distclean-tags
 
-# The following target decouples the previous targets from the actual rule;
-# thus, eliminating extraneous make(1) messages.
-#
-installed_header:	$(INCDIR)/$(HEADER)
+dvi: dvi-am
 
-$(INCDIR)/$(HEADER):	$(INCDIR) $(HEADER)
-	$(INSTALL_DATA) $(HEADER) $@
+dvi-am:
 
-dummy_incdir $(INCDIR):
-	mkdir -p $@
-	chmod u+rwx,g+rws,o=rx $@
+info: info-am
 
+info-am:
 
-# ###########################################################################
-# `etc/' files:
-# ###########################################################################
-ETCDIR	= $(prefix)/etc
+install-data-am: install-includeHEADERS
 
-installed_etcfiles:
-	@if [ -n "$(ETCFILES)" ]; then \
-	    etcfiles="$(ETCFILES)"; \
-	    for etcfile in $$etcfiles; do \
-		$(MAKE) $(MFLAGS) $(LOCAL_MACROS) ETCDIR=$(ETCDIR) ETCFILE=$$etcfile \
-		    installed_etcfile || exit 1; \
-	    done; \
-	else \
-	    :; \
-	fi
+install-exec-am: install-libLIBRARIES
 
-# The following target decouples the previous targets from the actual rule;
-# thus, eliminating extraneous make(1) messages.
-#
-installed_etcfile:	$(ETCDIR)/$(ETCFILE)
+install-info: install-info-am
 
-$(ETCDIR)/$(ETCFILE):	$(ETCDIR) $(ETCFILE)
-	-mkdir -p $(ETCDIR)
-	-chmod u+rwx,g+rws,o=rx $(ETCDIR)
-	$(INSTALL_DATA) $(ETCFILE) $@
+install-man:
 
-# ###########################################################################
-# Manual Pages:
-# ###########################################################################
-MANDIR	= $(prefix)/man
+installcheck-am:
 
-installed_manuals:	FORCE
-	@if [ -n "$(MANUALS)" ]; then \
-	    manuals="$(MANUALS)"; \
-	    for manual in $$manuals; do \
-		mandir=$(MANDIR)/man`echo $$manual | sed 's/.*\.\(.\).*/\1/'`; \
-		$(MAKE) $(MFLAGS) $(LOCAL_MACROS) MANDIR=$$mandir MANUAL=$$manual \
-		    installed_manual || exit 1; \
-	    done; \
-	else \
-	    :; \
-	fi
+maintainer-clean: maintainer-clean-am
+	-rm -rf ./$(DEPDIR)
+	-rm -f Makefile
 
-# The following target decouples the previous targets from the actual rule;
-# thus, eliminating extraneous make(1) messages.
-#
-installed_manual:	$(MANDIR)/$(MANUAL)
+maintainer-clean-am: distclean-am maintainer-clean-generic
 
-# The first sed(1) editing command in the following replaces the expanded
-# RCS keyword `$Date ...' in the `.TH' macro line with something more 
-# appropriate to a manual page.
-#
-$(MANDIR)/$(MANUAL):	$(MANDIR) $(MANUAL)
-	sed \
-	 -e '/^\.TH/s/$$D\ate: \([0-9]*\)\/\([0-9]*\)\/\([0-9]*\).*\$$/\1-\2-\3/'\
-	 $(MANUAL) | $(TBL) | $(NEQN) > $@
+mostlyclean: mostlyclean-am
 
-dummy_mandir $(MANDIR):
-	mkdir -p $@
-	chmod u+rwx,g+rws,o=rx $@
+mostlyclean-am: mostlyclean-compile mostlyclean-generic
 
-# ###########################################################################
-# TeX-Info Pages:
-# ###########################################################################
-INFODIR       = $(prefix)/info
+pdf: pdf-am
 
-installed_infos:      FORCE
-	if [ -z "$(MAKEINFO)" ]; then \
-		echo 1>&2 "Can't install info(1) pages because no makeinfo(1)"; \
-	else \
-	  if [ -n "$(INFOS)" ]; then \
-	      infos="$(INFOS)"; \
-	      for info in $$infos; do \
-		$(MAKE) $(MFLAGS) $(LOCAL_MACROS) INFODIR=$(INFODIR) INFO=$$info \
-		installed_info || exit 1; \
-	      done; \
-	   else \
-	      :; \
-	   fi; \
-	fi;
-# The following target decouples the previous targets from the actual rule;
-# thus, eliminating extraneous make(1) messages.
-#
-installed_info:       $(INFODIR)/$(INFO)
+pdf-am:
 
-$(INFODIR)/$(INFO):   $(INFODIR) $(INFO)
-	-mkdir -p $(INFODIR)
-	-chmod u+rwx,g+rws,o=rx $(INFODIR)
-	$(INSTALL_DATA) $(INFO) $@
+ps: ps-am
 
-# Rules for generating info pages:
-#
-.SUFFIXES:    .info .texi .texinfo .txn
-.texi.info:
-	@if [ -z "$(MAKEINFO)" ]; then \
-	  echo 1>&2 "Can't create $@ because no makeinfo(1)"; \
-	else \
-	  $(MAKEINFO) $< --no-split --output=$@; \
-	fi
-.texinfo.info:
-	@if [ -z "$(MAKEINFO)" ]; then \
-	  echo 1>&2 "Can't create $@ because no makeinfo(1)"; \
-	else \
-	  $(MAKEINFO) $< --no-split --output=$@; \
-	fi
-.txn.info:
-	@if [ -z "$(MAKEINFO)" ]; then \
-	  echo 1>&2 "Can't create $@ because no makeinfo(1)"; \
-	else \
-	  $(MAKEINFO) $< --no-split --output=$@; \
-	fi
+ps-am:
 
-# Ensure that info page depends on canonical TeX-Info macros.
-#
-dummy_info $(INFO):   texinfo.tex
+uninstall-am: uninstall-includeHEADERS uninstall-info-am \
+	uninstall-libLIBRARIES
 
-# ###########################################################################
-# Cleanup:
-# ###########################################################################
-clean::
-	rm -f $(GARBAGE) $(PROGRAM) a.out core *.o *.a *.so.* *.sa.* *.so \
-	    *.log
+.PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \
+	clean-libLIBRARIES ctags distclean distclean-compile \
+	distclean-generic distclean-tags distdir dvi dvi-am info \
+	info-am install install-am install-data install-data-am \
+	install-exec install-exec-am install-includeHEADERS \
+	install-info install-info-am install-libLIBRARIES install-man \
+	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-includeHEADERS \
+	uninstall-info-am uninstall-libLIBRARIES
 
-realclean::	distclean
-distclean::
-	rm -f $(GARBAGE) $(PROGRAM) a.out core *.o *.a *.so.* *.sa.* *.so \
-	    *.log Makefile config.status cc_id tags
-
-
-# ###########################################################################
-# Configuration:
-# ###########################################################################
-
-# The following target is touched because config.status won't update it if
-# it hasn't changed.
-#
-# The following is commented-out because the HPUX make(1) goes into a loop.
-#
-#Makefile:	config.status
-#	./config.status
-#	touch $@
-
-config.status:	cc_id configure
-	./configure --no-create
-
-cc_id:		FORCE
-	if test -r $@ && test "`cat $@`" = "$(CC)"; then \
-	    :; \
-	else \
-	    echo "$(CC)" > $@; \
-	fi
-
-configure:		configure.in
-	autoconf
-
-
-# ###########################################################################
-# Dependency maintenance:
-# ###########################################################################
-.PRECIOUS:	depend
-#
-# Note: The following rule will only work if the C compiler behaves correctly
-# when given the `-M' option.  AIX's cc(1) and SunOS's acc(1) behave
-# incorrectly.  --Steve Emmerson 1992-09-24
-#
-# Furthermore, we do not attempt to maintain dependencies on installed
-# header files (e.g. those in $(INCDIR)) for two reasons: 1) the dependency
-# list generated at Unidata mightn't correspond to the situation at a client
-# site; and 2) clients using broken compilers (c.f. previous note) can't
-# regenerate the dependency list.
-#
-disabled_depend:		FORCE
-	-incdir=`echo $(INCDIR) | sed s',/,\\\/,g'`; \
-	cc -M $(CPPFLAGS) $(CPPFLAGS_NETCDF) *.c 2> /dev/null | \
-	    awk '{ \
-		if ($$0 ~ /:/) { \
-		    target	= $$1; \
-		    if (target ~ /:/) { \
-			target	= substr(target,1,length(target)-1); \
-			start	= 2; \
-		    } else { \
-			start	= 3; \
-		    } \
-		} else { \
-		    start	= 1; \
-		} \
-		for (i = start; i <= NF; ++i) { \
-		    if ($$i !~ /^\\/ && \
-			$$i !~ /port\// && \
-			$$i !~ /^\//) \
-			print target ": " $$i \
-		} \
-	    }' > $@
-	tag='### DO NOT DELETE THIS LINE.  make depend DEPENDS ON IT ###'; \
-	    sed -e "/^$$tag$$/r depend" \
-		-e "/^$$tag$$/q" Makefile > Makefile.new
-	mv Makefile.new Makefile
-
-
-# ###########################################################################
-# Distributions:
-# ###########################################################################
-#FTPDIR		= @FTPDIR@
-#VERSION		= @VERSION@
-
-ftp:		$(FTPDIR)/$(PACKAGE)-$(VERSION).tar.Z
-	test ! -h $(FTPDIR)/$(PACKAGE).tar.Z && exit 0; \
-	cd $(FTPDIR) || exit 1; \
-	rm $(PACKAGE).tar.Z || exit 1; \
-	ln -s $(PACKAGE)-$(VERSION).tar.Z $(PACKAGE).tar.Z;
-
-$(FTPDIR)/$(PACKAGE)-$(VERSION).tar.Z:	$(PACKAGE)-$(VERSION).tar.Z
-	cp $(PACKAGE)-$(VERSION).tar.Z $@ 
-	chmod u+rw,g+rw,o=r $@
-
-tar.Z:		$(PACKAGE)-$(VERSION).tar.Z
-
-$(PACKAGE)-$(VERSION).tar.Z:	MANIFEST
-	dir=`basename \`pwd\`` \
-	&& id=$(PACKAGE)-$(VERSION) \
-	&& cd .. \
-	&& ln -s $$dir $$id \
-	&& tar -chof - `sed "s|^|$$id/|" $$id/MANIFEST` \
-	    | compress > $$id/$@ \
-	&& rm $$id
-
-MANIFEST:	FORCE
-	@echo 1>&2 Creating MANIFEST
-	@$(MAKE) -s $(MFLAGS) $(LOCAL_MACROS) MANIFEST.echo > $@
-
-MANIFEST.echo:	FORCE
-	@$(MAKE) -s $(MFLAGS) $(LOCAL_MACROS) \
-	    MANIFEST=`echo $(MANIFEST) | sed 's/MANIFEST//'` \
-	    ensure_manifest > /dev/null
-	@echo $(MANIFEST) | fmt -1
-	@if [ -n "$(SUBDIRS)" ]; then \
-	    subdirs="$(SUBDIRS)"; \
-	    for subdir in $$subdirs; do \
-		(cd $$subdir && \
-	        echo 1>&2 Creating $@ in `pwd` && \
-		$(MAKE) $(MFLAGS) $(LOCAL_MACROS) MANIFEST.echo | \
-		    sed "s|^|$$subdir/|") || exit 1; \
-	    done; \
-	else \
-	    :; \
-	fi
-
-ensure_manifest:	$(MANIFEST)
-
-# for distribution creation
-distdir = $(TOP_SRCDIR)/$(PACKAGE)-$(VERSION)/$(curdir)
-curdir = mfhdf/xdr
-dist: $(DISTFILES)
-	@for file in $(DISTFILES); do \
-	  ln $(srcdir)/$$file $(distdir)/$$file 2> /dev/null \
-	    || { echo copying $$file instead; \
-	    cp -p $(srcdir)/$$file $(distdir)/$$file;}; \
-	done
-
-# ###########################################################################
-# Miscellaneous:
-# ###########################################################################
-
-# The following dummy target is useful as a dependency to ensure that a
-# rule is always executed.
-#
-FORCE:
-
-
-### Everything after the following line might be overwritten ###
-### DO NOT DELETE THIS LINE.  make depend DEPENDS ON IT ###
-include depend
+# 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:

Deleted: packages/libhdf4/branches/upstream/current/mfhdf/xdr/Makefile.in_orig
===================================================================
--- packages/libhdf4/branches/upstream/current/mfhdf/xdr/Makefile.in_orig	2007-05-15 09:05:29 UTC (rev 830)
+++ packages/libhdf4/branches/upstream/current/mfhdf/xdr/Makefile.in_orig	2007-05-15 09:53:05 UTC (rev 831)
@@ -1,69 +0,0 @@
-# Makefile for the eXternal Data Representation (XDR) library routines 
-# used by the Network CDF library (needed if and only if the native xdr(3)
-# implementation is broken or doesn't exist).
-#
-# $Id: Makefile.in_orig,v 1.2 2000/08/30 21:55:50 wendling Exp $
-
-PROGRAM		= xdrtest
-OS		= @OS@
-CPP_XDR		= @CPP_XDR@
-CPPFLAGS	= $(CPP_XDR) @CPPFLAGS@
-CFLAGS		= @CFLAGS@ @HDF_INC@
-HEADERS		= xdr.h types.h
-MANIFEST	= Makefile.in NOTICE.h README depend \
-		  byteordr.c descrip.mms htonl.mar make.com msoft.mk \
-		  ntohl.mar test_xdr.sav types.h xdr.c xdr.h xdrarray.c \
-		  xdrfloat.c xdrstdio.c $(PROGRAM).c $(PROGRAM).opt \
-		  testout.sav
-LIBOBJS		= @XDR_LIBOBJS@
-LIBNAME		= netcdf
-REMOTE_LIBRARY	= ../libsrc/lib$(LIBNAME).a
-OBJS		= $(PROGRAM).o $(LIBOBJS)
-LD_XDR		= @LD_XDR@
-LD_NETCDF	= ../libsrc/libnetcdf.a
-LIBS		= $(LD_XDR) $(LIBSX)
-INSTALL_DEPS	= @XDR_INSTALL_DEPS@
-prefix		= ../../..
-GARBAGE		= test.xdr $(PROGRAM)_out.new
-
-
-all::         FORCE
-	@if test -z "$(LIBOBJS)"; then \
-	  : true; \
-	else		 \
-	  $(MAKE) $(MFLAGS) $(REMOTE_LIBRARY); \
-	fi
-
-# The formatted file `$(PROGRAM)_out.new' might differ from the touchstone
-# file `testout.sav', but this should be due to SMALL rounding errors.
-#
-# `$(PROGRAM)' creates the binary-file `test.xdr' which MUST be byte-for-byte
-# identical with `test_xdr.sav'.
-#
-test:		$(PROGRAM)
-	./$(PROGRAM) > $(PROGRAM)_out.new
-	@cmd="diff -w $(PROGRAM)_out.new testout.sav"; \
-	echo $$cmd; \
-	if $$cmd; then \
-	    echo "*** XDR passes formatted test ***"; \
-	else \
-	    echo "*** XDR fails formatted test ***"; \
-	    echo "The above differences are OK iff due to rounding"; \
-	    exit 0; \
-	fi
-	@cmd="cmp test.xdr test_xdr.sav"; \
-	echo $$cmd; \
-	if $$cmd; then \
-	    echo "*** XDR passes binary test ***"; \
-	else \
-	    echo "*** XDR fails binary test ***"; \
-	    exit 1; \
-	fi
-
-install::
-
-include ../port/master.mk
-
-### Everything after the following line might be overwritten ###
-### DO NOT DELETE THIS LINE.  make depend DEPENDS ON IT ###
-include depend

Deleted: packages/libhdf4/branches/upstream/current/mkinstalldirs
===================================================================
--- packages/libhdf4/branches/upstream/current/mkinstalldirs	2007-05-15 09:05:29 UTC (rev 830)
+++ packages/libhdf4/branches/upstream/current/mkinstalldirs	2007-05-15 09:53:05 UTC (rev 831)
@@ -1,32 +0,0 @@
-#!/bin/sh
-# mkinstalldirs --- make directory hierarchy
-# Author: Noah Friedman <friedman at prep.ai.mit.edu>
-# Created: 1993-05-16
-# Last modified: 1994-03-25
-# Public domain
-
-errstatus=0
-
-for file in ${1+"$@"} ; do 
-   set fnord `echo ":$file" | sed -ne 's/^:\//#/;s/^://;s/\// /g;s/^#/\//;p'`
-   shift
-
-   pathcomp=
-   for d in ${1+"$@"} ; do
-     pathcomp="$pathcomp$d"
-     case "$pathcomp" in
-       -* ) pathcomp=./$pathcomp ;;
-     esac
-
-     if test ! -d "$pathcomp"; then
-        echo "mkdir $pathcomp" 1>&2
-        mkdir "$pathcomp" || errstatus=$?
-     fi
-
-     pathcomp="$pathcomp/"
-   done
-done
-
-exit $errstatus
-
-# mkinstalldirs ends here

Deleted: packages/libhdf4/branches/upstream/current/release_notes/ABOUT_4.1r4
===================================================================
--- packages/libhdf4/branches/upstream/current/release_notes/ABOUT_4.1r4	2007-05-15 09:05:29 UTC (rev 830)
+++ packages/libhdf4/branches/upstream/current/release_notes/ABOUT_4.1r4	2007-05-15 09:53:05 UTC (rev 831)
@@ -1,95 +0,0 @@
-
-                          ABOUT HDF 4.1 Release 4
-                                October 2000 
-
-INTRODUCTION
-
-This document describes the differences between HDF 4.1r3 and
-HDF 4.1r4.  It is written for people who are familiar with
-previous releases of HDF and wish to migrate to HDF 4.1r4.
-
-The HDF 4.1r4 documentation can be found on the NCSA ftp server 
-(ftp.ncsa.uiuc.edu) in the directory:
-
-     /HDF/HDF/Documentation/HDF4.1r4/
-
-First-time HDF users are encouraged to read the FAQ in this
-release for more information about HDF.  Users can also look
-at the home page for HDF at:
-
-     http://hdf.ncsa.uiuc.edu/
-
-If you have any questions or comments, please send them to:
-
-     hdfhelp at ncsa.uiuc.edu
-
-CONTENTS
-
-- New Features and Changes
-- Platforms Tested
-- Known Problems
-
-New Features and Changes:
-========================
-
-This release focuses on new features and changes added to the
-GR interface.
-
-o Two new utilities have been added to HDF, gif2hdf and hdf2gif.
-  The gif2hdf utility will convert a GIF image into an HDF file
-  containing a GR image. The hdf2gif utility will convert an HDF GR 
-  image into a GIF image. 
-  
-o Chunking and chunking with compression have been added to the
-  GR interface.
-
-o JPEG compression with the GR interface was not working properly.
-  This problem has been fixed.
-
-Several hdp options have been added:
-  
-o Added -s option to dumpgr and dumpsds to allow printing data 
-  as a stream instead of breaking the lines at 65 characters. 
-
-o Added option -c to dumpgr and dumpsds to allow printing clean output 
-  for attributes with type DFNT_CHAR. With this option, hdp will print 
-  space characters, such as horizontal tabs, CRs, and LFs, as they are 
-  instead of "\digit" (still the default.)  This option also prints "..." 
-  for one or more null characters among the data.
-
-o Added option -l to dumpgr to allow printing data in different interlace
-  modes.
-
-
-Platforms Tested:
-================
-
-HDF 4.1 Release 4 has been tested on the following platforms:
-
-   Cray J90  (available after initial 4.1r4 release)
-   Cray T3E                      
-   DEC Alpha/Digital Unix
-   DEC Alpha/OpenVMS
-   Exemplar
-   FreeBSD
-   HP-UX 
-   IRIX 
-   IRIX64 (-n32, -64)
-   Linux
-   Solaris
-   Solaris x86
-   SP
-   Windows NT/98/2000
-
-For more information on the platforms that were tested and for
-which we provide pre-compiled binaries, please refer to the following
-web page (accessible from the HDF home page):
-
-     http://hdf.ncsa.uiuc.edu/platforms.html
-
-
-Known Problems:
-==============
-
-o The ncgen utility fails on the IBM SP.
-

Added: packages/libhdf4/branches/upstream/current/release_notes/HISTORY.txt
===================================================================
--- packages/libhdf4/branches/upstream/current/release_notes/HISTORY.txt	                        (rev 0)
+++ packages/libhdf4/branches/upstream/current/release_notes/HISTORY.txt	2007-05-15 09:53:05 UTC (rev 831)
@@ -0,0 +1,2585 @@
+==========================================================================
+=                                                                        =
+=       This files conatins a history of the HDF4.* releases.            =
+=                                                                        =
+=       To find information about a particular release search            =
+=       for %%%4.#r# string, for example 4.1r2.                          =
+=       List of all releases is on the top of the file.                  =
+=                                                                        =
+=       Documents in this file refer to several *.txt files that were    =
+=       originally stored in the release_notes directory of the HDF4     =
+=       source tree. Those file are now combined into one misc_docs.txt  =
+=       file in the same directory.                                      =
+=                                                                        =
+==========================================================================    
+
+List of the HDF4 releases
+
+4.2r0          December  2003
+4.2r0-Beta     September 2003
+4.1r5          November  2001
+4.1r4          October   2000
+4.1r3          May       1999
+4.1r2          March     1998 
+4.1r1          February  1997
+4.1b1          December  1996 
+4.0r2          July      1996 
+4.0r1          February  1996
+4.0b2          November  1995
+4.0b1          July      1995 
+4.0.alpha      November  1994
+
+
+==========================================================================    
+ 
+
+%%%4.2r0%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+
+
+                          HDF 4.2 Release 0
+                           December 2003
+
+INTRODUCTION
+
+This document describes the differences between HDF 4.1r5 and
+HDF 4.2r0.  It is written for people who are familiar with
+previous releases of HDF and wish to migrate to HDF 4.2r0
+
+The HDF 4.2r0 documentation can be found on the NCSA ftp server 
+(ftp.ncsa.uiuc.edu) in the directory:
+
+     ftp://hdf.ncsa.uiuc.edu/HDF/Documentation/
+
+First-time HDF users are encouraged to read the FAQ in this
+release for more information about HDF.  Users can also look
+at the home page for HDF at:
+
+     http://hdf.ncsa.uiuc.edu/
+
+If you have any questions or comments, please send them to:
+
+     hdfhelp at ncsa.uiuc.edu
+
+CONTENTS
+
+- New Features and Changes
+- Support for new platforms
+- Bugs fixed since HDF4.1r5
+- Documentation
+- Platforms Tested
+- Known problems
+
+New Features and Changes:
+========================
+
+o IMPORTANT: HDF4 HAS A NEW CONFIGURATION 
+
+  ZLIB and JPEG libraries were removed from the HDF4 distribution source.
+  ZLIB and JPEG have to be installed on the system before HDF4 library
+  can be built or HDF4 precompiled binaries can be used.
+  Please read INSTALL in the top HDF4 directory for instructions
+  how to build the HDF4 library and applications.
+
+o HDF4 has an optional SZIP compression method; in order to use SZIP compression,
+  SZIP library has to be installed on the system. Please refer to the INSTALL 
+  file for instructions on how to build with/without the SZIP Library.
+  SZIP in HDF4 is free for non-commercial use; 
+  see http://hdf.ncsa.uiuc.edu/doc_resource/SZIP/Commercial_szip.html 
+  for information regarding commercial use. 
+
+  For more information about SZIP compression
+  see http://hdf.ncsa.uiuc.edu/doc_resource/SZIP/ and 
+  the "HDF4 Reference Manual" entries for the GRsetcompress and 
+  SDsetcompress functions. 
+
+o IMPORTANT note about prebuild binaries:
+
+  NCSA precompiled binaries has SZIP compression method enabled for all platforms
+  except Crays T3E and SV1 and Linux 2.4 SuSE x86_64. To use the binaries download
+  the SZIP library from http://hdf.ncsa.uiuc.edu/doc_resource/SZIP/
+
+o The following new tools have been added
+
+      hrepack
+      hdiff
+      hdfimport
+
+  See "HDF4 Reference Manual" in the HDF 4.2r0 documentation set for more
+  information.
+
+o fp2hdf is removed. It is replaced with hdfimport.
+
+o Helper scripts to facilitate HDF4 installation and compilation were added:
+  
+      h4cc   - to compile C application with the HDF4 Libraries
+      h4fc   - to compiler Fortran applications with the HDF4 Libraries
+      h4redeploy - to fix binary installation
+
+  See "HDF4 Reference Manual" in the HDF 4.2r0 documentation set for more
+  information.
+
+Support for new platforms 
+=========================
+
+o HDF4 was ported to the following platforms
+
+      AIX 5.1 64-bit version
+      MacOSX
+      Linux 2.4 RH8 and RH9 
+      Linux 2.4 RH8 64-bit, SuSE 64-bit
+      Linux 2.4 ia64
+      Linux 2.4 SGI (Altrix)
+
+
+Bugs fixed since HDF4.1r5
+=========================
+
+1. "hdp dumpgr" and "hdp dumpsds" have two new options:
+        -g to suppress the data of global (or file) attributes
+        -l to suppress the data of local attributes
+
+2. The problem where hdp failed on a very long file name has been
+   fixed. (bug #693)
+
+3. The problem where VSinquire failed when being called on a vdata
+   that had no fields defined, has been fixed. (bug #626)
+
+4. When the values of VGNAMELENMAX and VSNAMELENMAX are changed
+   the hdp output doesn't reflect the change. This problem is 
+   now fixed. (bug #606)
+
+5. hdp dumpvg sometimes failed when reading a file that had a vgroup 
+   being inserted into another.  This has been fixed. (bug #477)
+
+6. hdf2gif failed when a user tried it on JPEG compressed images. (Bug #601).
+   The problem is now fixed. An error message is displayed if the image is not
+   8-bit. If the image is 24-bit, the message suggests using hdf2jpeg.
+
+7. ncdump failed to read NetCDF files 3.5 when there was more than one variable
+   with unlimited dimensions. Fixed.
+
+8. The NetCDF part of the HDF4 library was not ported to Compaq True64 system. 
+   Fixed.
+
+9. The hdp commands dumpsds, dumpgr, dumpvd, and dumpvg now display an 
+    informative message when a non-HDF file is given as input. (Bug #817)
+
+10. The compilation warnings and error on the macro HDFclose are fixed.
+    (Bug #818)
+
+Documentation
+==============
+
+    Entries for new utilities hdiff, hrepack, hdfimport and helper
+    scripts h4cc, h4fc, and h4redeply were added to the Reference Manual.
+
+Platforms Tested
+================
+
+HDF 4.2 Release 0 has been tested on the following platforms:
+
+    AIX 5.1  (32 and 64-bit)      xlc 6.0.0.2
+                                  xlf 8.1.1
+    Cray T3E sn6606 2.0.6.08      Cray Standard C Version 6.6.0.2
+                                  Cray Fortran Version 3.6.0.2
+    Cray SV1 sn9617 10.0.1.2      Cray Standard C Version 6.6.0.2
+                                  Cray Fortran Version 3.6.0.2
+    FreeBSD 4.9                   gcc 2.95.4
+                                  g++ 2.95.4
+    HP-UX B.11.00                 HP C  HP92453-01 A.11.01.20 
+                                  HP F90 v2.4
+                                  HP ANSI C++ B3910B A.03.13
+    IRIX64 6.5 (64 & n32)         MIPSpro cc 7.3.1.3m
+                                  F90 MIPSpro 7.3.1.3m 
+    Linux 2.4.20-20.7 (RH8)       gcc 3.3.1
+                                  Intel(R) C++ Version 7.1
+                                  Intel(R) Fortran Compiler Version 7.1
+    Linux 2.4.20-20.9 (RH9)       gcc 3.2.2
+    Linux 2.4.21-2.9.5ws x86_64   gcc version 3.2.3 20030502 (Red Hat Linux 3.2.3-16)
+                                  g77 based on gcc version 3.2.3
+    Linux 2.4.19-SMP #1 x86_64    gcc version 3.3.2 (SuSE Linux)
+                                  g77 version 3.3.2
+    OSF1 V5.1                     Compaq C V6.4-014
+				  Compaq Fortran V5.5-1877
+    SunOS 5.7(32 and 64 bit)      WorkShop Compilers 5.0 98/12/15 C 5.0
+     (Solaris 2.7)                WorkShop Compilers 5.0 98/10/25 
+                                  FORTRAN 77 5.0
+                                  gcc 3.2.2
+                                  g77 GNU Fortran (GCC 3.2.2) 3.2.2 
+    SunOS 5.8(32 and 64 bit)      Sun WorkShop 6 update 2 C 5.3
+     (Solaris 2.8)                Sun WorkShop 6 update 2 Fortran 77 5.3 
+
+    IA-32 Linux 2.4.9-31pctr      Intel(R) C++ Version 7.0
+                                  Intel(R) Fortran Compiler Version 7.0
+                                  
+    IA-64 Linux 2.4.16 ia64       Intel(R) C++ Version 7.0
+                                  Intel(R) Fortran Compiler Version 7.0
+    IA-64 Linux 2.4.19-SMP        Intel(R) C++  Version 7.1
+                                  Intel(R) Fortran Compiler Version 7.1
+                                  gcc 3.2
+                                  g77 GNU Fortran (GCC 3.2) 3.2
+    IA-64 Linux 2.4.21-sgi        Intel(R) C++  Version 7.1
+    (Altrix)                      Intel(R) Fortran Compiler Version 7.1
+    Windows 2000 (NT5.0)          MSVC++ 6.0
+                                  DEC Visual Fortran 6.0
+                                  Intel C and F90 compilers version 7.1
+    Windows XP                    MSVC++.NET
+    MAC OS X                      Darwin 6.8
+                                  gcc Apple Computer, Inc. GCC 
+                                  version 1175, based on gcc version 3.1
+                                  
+
+Known problems
+==============
+
+o  SZIP Library is not available for Crays SV1 and T3E
+   Fortran APIs do not support SZIP compression.
+
+o  NetCDF tests nctest (C) and ftest (Fortran) fail to read from NetCDF 3.5 files
+
+o  On Linux RH8 64-bit SZIP tests fail if library is compiled in production
+   mode. All tests pass in the debug mode.
+
+o  This release doesn't support VMS system.
+
+o  On Linux with gcc compilers Fortran NetCDF APIs cannot read attributes, variables,
+   and dimensions when name contain spaces.
+
+o  HDF4 Library cannot be built with PGI compilers.
+
+o  N-Bit compression is not supported with Fortran APIs.
+
+o  Using both fill-value and compression on SD datasets doesn't work.
+
+o  --prefix defines where the installation path is.  This version has
+   the default set as /usr/local which is different from previous versions.
+
+o  New utilities hdiff and hrepack are not available for Windows 2000.
+
+%%%4.2r0-Beta%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+
+                          ABOUT HDF 4.2 Release 0-Beta
+                               September 2003
+
+INTRODUCTION
+
+This document describes the differences between HDF 4.1r5 and
+HDF 4.2r0-Beta.  It is written for people who are familiar with
+previous releases of HDF and wish to migrate to HDF 4.2r0-Beta
+
+The HDF 4.2r0-Beta documentation can be found on the NCSA ftp server 
+(ftp.ncsa.uiuc.edu) in the directory:
+
+     /HDF/pub/outgoing/hdf4/4.2-Beta/
+
+First-time HDF users are encouraged to read the FAQ in this
+release for more information about HDF.  Users can also look
+at the home page for HDF at:
+
+     http://hdf.ncsa.uiuc.edu/
+
+If you have any questions or comments, please send them to:
+
+     hdfhelp at ncsa.uiuc.edu
+
+CONTENTS
+
+- New Features and Changes
+- Platforms Tested
+
+New Features and Changes:
+========================
+
+o ZLIB and JPEG libraries were removed from the HDF4 distribution source.
+  Please read INSTALL-4.2r0-Beta in the top HDF4 directory for instructions
+  how to build HDF4 Library and applications.
+
+o HDF4 has an optional SZIP compression; please refer to the INSTALL-4.2r0-Beta 
+  file for instructions how to build with/without the SZIP Library.
+  SZIP in HDF4 is free for non-commercial use; 
+  see http://hdf.ncsa.uiuc.edu/doc_resource/SZIP/Commercial_szip.html 
+  for information regarding commercial use. 
+
+  For more information about SZIP compression
+  see http://hdf.ncsa.uiuc.edu/HDF5/doc_resource/SZIP/ and the "HDF4 Reference Manual"
+  entries for the GRsetcompress and SDsetcompress functions. 
+
+o The following new tools have been added
+
+      hrepack
+      hdiff
+      hdfimport
+
+  See "HDF4 Reference Manual" in the HDF 4.2r0-Beta documentation set for more
+  information.
+
+o HDF4 was ported to the following platforms
+
+      AIX 5.1 64-bit version
+      MacOSX
+      Linux 2.4 RH8 and RH9
+
+Please refer to the bugs_fixed.txt file for more details on bugs that were 
+fixed.
+
+
+Platforms Tested:
+================
+
+HDF 4.2 Release 0-Beta has been tested on the following platforms:
+
+   FreeBSD 4.9
+   HP-UX B.11.00 
+   AIX 5.1 (32 and 64-bit)
+   IRIX64 6.5 (-n32, -64)
+   Linux 2.4
+   Solaris 2.7, 2.8 (32 and 64-bit)
+   MacOSX
+
+   No precompiled binaries is available for this release.
+
+
+
+%%%4.1r5%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+
+                          ABOUT HDF 4.1 Release 5 
+                               November 2001 
+
+INTRODUCTION
+
+This document describes the differences between HDF 4.1r4 and
+HDF 4.1r5.  It is written for people who are familiar with
+previous releases of HDF and wish to migrate to HDF 4.1r5.
+
+The HDF 4.1r5 documentation can be found on the NCSA ftp server 
+(ftp.ncsa.uiuc.edu) in the directory:
+
+     /HDF/HDF/Documentation/HDF4.1r5/
+
+First-time HDF users are encouraged to read the FAQ in this
+release for more information about HDF.  Users can also look
+at the home page for HDF at:
+
+     http://hdf.ncsa.uiuc.edu/
+
+If you have any questions or comments, please send them to:
+
+     hdfhelp at ncsa.uiuc.edu
+
+CONTENTS
+
+- New Features and Changes
+- Platforms Tested
+
+New Features and Changes:
+========================
+
+o The following Vdata routines were added:
+
+     VSsetblocksize/vsfsetblsz -- sets the block size of the 
+                                  linked-block element.
+     VSsetnumblocks/vsfsetnmbl -- sets the number of blocks for 
+                                  a linked-block element.
+     VSgetblockinfo/vsfgetblinfo -- retrieves the block size and the number 
+                                    of blocks of a linked-block element.
+
+o  Two routines were added to get compression information for the SD and
+   GR interfaces, including chunked elements: SDgetcompress/sfgcompress 
+   and GRgetcompress/mggcompress. 
+
+   Note: 
+
+   - For a JPEG image, GRgetcompress only returns the compression type, not 
+     the compression information (i.e, quantity and force_baseline).  This 
+     information is not currently retrievable.
+
+   - Getting compression type for JPEG chunked images is not working yet.
+
+o  "hdp dumpgr" has a new option, -pd, to print palette data only.  Also,
+   whenever option -p or -pd is given, only palettes are printed, and no 
+   images or file attributes. 
+
+o  A new FORTRAN function, heprntf (HEprint), was added.  It takes two
+   arguments: file name and level.  If the file name string has 0 length,
+   then error messages will be printed to standard output. 
+
+o  On Windows, the unresolved symbol (error_top) error has been fixed when 
+   calling HEclear and linking with the DLL.  Users who want to use the HDF 
+   DLL should define HDFAPDLL in their applications.  Simply go to Project 
+   Settings and add HDFAPDLL as the predefined constant.
+
+o  A memory leak in the netCDF portion of the HDF/mfhdf distribution
+   was fixed. 
+
+o  The "#define NULL" was removed since ANSI C compilers are required to
+   define NULL.
+
+o  When using "hdp dumpgr", data was being printed in the range of 0-250
+   when it should have been between 0-168.  This problem is now fixed.
+
+Please refer to the bugs_fixed.txt file for more details on bugs that were 
+fixed.
+
+
+Platforms Tested:
+================
+
+HDF 4.1 Release 5 has been tested on the following platforms:
+
+   Cray SV1 10.0.0.8
+   Cray T3E sn6711 2.0.5.55                     
+   Compaq Tru64 Unix (OSF1) 5.1
+   DEC Alpha/OpenVMS AXP 7.2-1
+   FreeBSD 4.4
+   HP-UX B.11.00 
+   IBM SP 4.3
+   IRIX 6.5 
+   IRIX64 6.5 (-n32, -64)
+   Linux 2.2.18smp
+   Solaris 2.7, 2.8
+   Windows NT/98/2000
+
+For more information on the platforms that were tested and for
+which we provide pre-compiled binaries, please refer to the following
+web page (accessible from the HDF home page):
+
+     http://hdf.ncsa.uiuc.edu/platforms.html
+
+Know problmes:
+
+Writing n-bit datasets from FORTRAN with the SD interface is not working.
+
+SDgetchunkinfo does not return compression coding or modelling type.
+
+Using both fill-values and compression on SD datasets is not currently
+working, don't use one or the other.
+
+Dumping compressed Vdatas with vshow or hdp is not working.
+
+Reading or writing compressed images with the GR interface is not working.
+
+
+
+%%%4.1r4%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+
+                          ABOUT HDF 4.1 Release 4
+                                October 2000 
+
+INTRODUCTION
+
+This document describes the differences between HDF 4.1r3 and
+HDF 4.1r4.  It is written for people who are familiar with
+previous releases of HDF and wish to migrate to HDF 4.1r4.
+
+The HDF 4.1r4 documentation can be found on the NCSA ftp server 
+(ftp.ncsa.uiuc.edu) in the directory:
+
+     /HDF/HDF/Documentation/HDF4.1r4/
+
+First-time HDF users are encouraged to read the FAQ in this
+release for more information about HDF.  Users can also look
+at the home page for HDF at:
+
+     http://hdf.ncsa.uiuc.edu/
+
+If you have any questions or comments, please send them to:
+
+     hdfhelp at ncsa.uiuc.edu
+
+CONTENTS
+
+- New Features and Changes
+- Platforms Tested
+- Known Problems
+
+New Features and Changes:
+========================
+
+This release focuses on new features and changes added to the
+GR interface.
+
+o Two new utilities have been added to HDF, gif2hdf and hdf2gif.
+  The gif2hdf utility will convert a GIF image into an HDF file
+  containing a GR image. The hdf2gif utility will convert an HDF GR 
+  image into a GIF image. 
+  
+o Chunking and chunking with compression have been added to the
+  GR interface.
+
+o JPEG compression with the GR interface was not working properly.
+  This problem has been fixed.
+
+Several hdp options have been added:
+  
+o Added -s option to dumpgr and dumpsds to allow printing data 
+  as a stream instead of breaking the lines at 65 characters. 
+
+o Added option -c to dumpgr and dumpsds to allow printing clean output 
+  for attributes with type DFNT_CHAR. With this option, hdp will print 
+  space characters, such as horizontal tabs, CRs, and LFs, as they are 
+  instead of "\digit" (still the default.)  This option also prints "..." 
+  for one or more null characters among the data.
+
+o Added option -l to dumpgr to allow printing data in different interlace
+  modes.
+
+
+Platforms Tested:
+================
+
+HDF 4.1 Release 4 has been tested on the following platforms:
+
+   Cray J90  (available after initial 4.1r4 release)
+   Cray T3E                      
+   DEC Alpha/Digital Unix
+   DEC Alpha/OpenVMS
+   Exemplar
+   FreeBSD
+   HP-UX 
+   IRIX 
+   IRIX64 (-n32, -64)
+   Linux
+   Solaris
+   Solaris x86
+   SP
+   Windows NT/98/2000
+
+For more information on the platforms that were tested and for
+which we provide pre-compiled binaries, please refer to the following
+web page (accessible from the HDF home page):
+
+     http://hdf.ncsa.uiuc.edu/platforms.html
+
+
+Known Problems:
+==============
+
+o The ncgen utility fails on the IBM SP.
+
+
+%%%4.1r3%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+
+                          ABOUT HDF 4.1 Release 3
+                               May 7, 1999
+
+INTRODUCTION
+
+This document describes the differences between HDF 4.1r2 and
+HDF 4.1r3.  It is written for people who are familiar with
+previous releases of HDF and wish to migrate to HDF 4.1r3.
+The release notes provide more in-depth information concerning
+the topics discussed here.  The HDF 4.1r3 documentation can be
+found on the NCSA ftp server (ftp.ncsa.uiuc.edu) in the directory:
+
+     /HDF/HDF/Documentation/HDF4.1r3
+
+First-time HDF users are encouraged to read the FAQ in this
+release for more information about HDF.  Users can also look
+at the home page for HDF at:
+
+     http://hdf.ncsa.uiuc.edu/
+
+If you have any questions or comments, please send them to:
+
+     hdfhelp at ncsa.uiuc.edu
+
+CONTENTS
+
+- New Features and Changes
+- Platforms Tested
+- Known Problems
+- Acknowledgements
+
+New Features and Changes:
+========================
+
+o HDF 4.1r2 was unable to properly read HDF SDSs created with HDF 3.3x.
+  It did not read the correct SDS names.  This problem has been fixed.
+
+o Many problems have been fixed with the GR interface, including the
+  following:
+
+  - The GR interface can now read compressed files created with the 
+    DFR8 and DF24 interfaces, except for those which were compressed 
+    with IMCOMP compression.
+  
+  - The GR interface can read and write images compressed with RLE, 
+    GZIP and Skipping Huffman compression methods.
+
+  - Palettes can now be written and read properly with the GR interface.
+
+  - 24-bit raster images can now be read by the GR interface.
+
+o You can now create an SDS with a name up to 256 characters in length.
+  The previous limit was 64.
+
+o HDF now supports IJP JPEG version 6b and Gzip version 1.1.3.
+
+o Numerous hdp problems have been fixed, including the following:
+
+  - hdp no longer fails on an HDF file which contains a vdata that no 
+    records have been written to.
+
+  - hdp no longer fails on the PC and Mactinosh dumping large SDSs.
+
+  - GR file attributes can now be displayed.
+
+  - A palette can now be dumped with the GR command.
+
+o SDfileinfo no longer returns the wrong number of datasets for old
+  files created with the DFSD interface.
+
+o This will be the last release that SunOS 4.1.4 is supported.
+
+Check the ./bugs_fixed.txt for other changes that are not listed
+here.
+
+Platforms Tested:
+================
+
+HDF 4.1 Release 3 has been tested on the following platforms:
+
+   Cray J90                  
+   Cray T90 (CFP, IEEE)         
+   Cray T3E                      
+   DEC Alpha/Digital Unix
+   DEC Alpha/OpenVMS
+   DEC Alpha NT
+   VAX OpenVMS
+   Exemplar
+   FreeBSD
+   HP-UX 10.2
+   IRIX 6.5
+   IRIX64 6.5 (-n32, -64)
+   Linux
+   Macintosh 
+   Solaris
+   Solaris x86
+   SP
+   SunOS 4.1.4
+   Windows NT/95
+
+For more information on the platforms that were tested and for
+which we provide pre-compiled binaries, please refer to the following
+web page (accessible from the HDF home page):
+
+     http://hdf.ncsa.uiuc.edu/platforms.html
+
+
+Known Problems:
+==============
+
+o On Alpha OpenVMS version 6.2, the DF.OLB and MFHDF.OLB Libraries 
+  should be created with optimization turned off. Otherwise hdftest 
+  fails (the sfgichnk function returns incorrect information).
+
+o On VAX Open VMS 6.2, the ncgen utility core dumps and an error occurs
+  when reading GR image data with user-defined fill values.
+
+o If you encounter problems building on a platform, please be sure to
+  check the INSTALL file at the top of the HDF source tree, in case 
+  these problems are documented in section 2.5, Platform-specific Notes.
+
+o On the NT, the hdp utility fails in the debug version when using the 
+  list command.
+
+Acknowledgements:
+================
+
+Fortner Software LLC ("Fortner") created the reference implementations
+for the Macintosh and Windows NT/95 of the HDF 4.1r3 library.  For more 
+information, please refer to the macintosh.txt and windows.txt files in 
+the ./release_notes/ directory.
+
+
+%%%4.1r2%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+
+                        ABOUT HDF 4.1 Release 2 
+                            March 16, 1998
+
+INTRODUCTION
+
+This document describes the differences between HDF 4.1r1 and
+HDF 4.1r2.  It is written for people who are familiar with
+previous releases of HDF and wish to migrate to HDF 4.1r2.
+The release notes provide more in-depth information concerning
+the topics discussed here.  The HDF 4.1r2 documentation can be
+found on the NCSA ftp server (ftp.ncsa.uiuc.edu) in the directory:
+
+     /HDF/Documentation/HDF4.1r2
+
+First-time HDF users are encouraged to read the FAQ in this
+release for more information about HDF.  Users can also look
+at the home page for HDF at:
+
+     http://hdf.ncsa.uiuc.edu/
+
+If you have any questions or comments, please send them to:
+
+     hdfhelp at ncsa.uiuc.edu
+
+CONTENTS
+
+- New Features and Changes
+- Platforms Tested
+- Known Problems
+- Important Fixes
+- Acknowledgements
+
+New Features and Changes:
+========================
+
+o Data chunking is now supported with the GR interface.  New routines
+  for creating and manipulating chunked GR images have been added.  Please
+  refer to the ./release_notes/new_functions.txt file and HDF Reference 
+  Manual for information on using chunked GRs.
+
+o In previous releases, many C routines existed for which there were  
+  no Fortran counterparts.  With HDF 4.1r2, we have added a Fortran 
+  routine for most C routines.  Please check the 
+  ./release_notes/new_functions.txt file for a list of the new 
+  functions added to HDF.
+
+o This is the first release in which the Java Products (the Java-based
+  HDF Viewer (JHV) and the Java HDF interface (JHI)) are incorporated in 
+  the HDF release itself.  For information on the Java Products, please
+  refer to the HDF home page under Information about HDF
+  (http://hdf.ncsa.uiuc.edu/about.html).
+
+o In the SD interface, HDF now defaults to ONLY storing the new version 
+  of the dimension representation added in HDF 4.0r1. 
+
+  When the dimension representation was changed in 4.0r1, the HDF library 
+  defaulted to include both the new and old dimension representations in 
+  an HDF file.  Now, this new dimension representation is stored by default.
+  The SDsetdimval_comp function can be used to change the dimension 
+  representation stored.
+ 
+  Following is a detailed description of the difference between the
+  new and old representations:
+
+    Prior to HDF 4.0r1, a vgroup was used to represent a dimension.  The 
+    vgroup had a single field vdata with a class of "DimVal0.0".  The vdata 
+    had <dimension size> number of records, with each record having a fake 
+    value from 0, 1, 2 ... , (<dimension size> - 1).  The fake values were 
+    not really required and took up a large amount of space. For applications 
+    that created large one dimensional array datasets, the disk space taken by 
+    these fake values almost doubled the size of the HDF file. In order to omit 
+    the fake values, the new version for a dimension vdata was implemented.
+ 
+    The new version uses the same structure as the old version.  The
+    only differences are that the vdata has only 1 record with a value
+    of <dimension size> and that the vdata's class is "DimVal0.1",  to
+    distinguish it from the old version.
+
+o Platforms dropped with this release:  Cray Y-MP, T3D, and Linux (a.out)  
+
+o Extensive changes have been made to the Reference Manual and User's
+  Guide.  The updated Reference Manual is available with this release.  The
+  updated User's Guide will be available in the near future.
+
+
+Platforms Tested:
+================
+
+HDF 4.1 Release 2 has been tested on the following platforms:
+
+   Cray T90 (CFP, IEEE)            IRIX 6.2 
+   Cray T3E                        IRIX64 6.4 (-n32, -64)
+   DEC Alpha/Digital Unix          Linux (elf) 
+   Exemplar                        Solaris  
+   FreeBSD                         Solaris x86 
+   HP-UX 9.03                      SP2 
+   HP-UX 10.2                      SunOS 
+   IRIX 5.3                   
+
+** The Windows NT/95, Macintosh, Dec Alpha OpenVMS and VAX OpenVMS 
+   releases are not available with this release of HDF4.1r2.  Separate 
+   releases for these platforms will be available in the near future. 
+
+For more information on the platforms that were tested and for
+which we provide pre-compiled binaries, please refer to the following
+web page (accessible from the HDF home page):
+
+     http://hdf.ncsa.uiuc.edu/platforms.html
+
+Known Problems:
+==============
+
+o Writing n-bit datasets from FORTRAN with the SD interface is not working.
+
+o SDgetchunkinfo does not return compression coding or modeling type.
+
+o Using both fill-values and compression on SD datasets is not currently
+  working; don't use one or the other.
+
+o Dumping compressed Vdatas with vshow or hdp is not working.
+
+o Reading or writing compressed images with the GR interface is not working.
+
+o With the GR interface, you cannot create a raster image without writing data 
+  to it.
+
+
+Important Fixes:
+===============
+
+o HDF no longer core dumps when reading a NetCDF file.
+
+o HDF now supports little-endian conversion for VAX and Dec 
+  Alpha OpenVMS.
+
+o The problems that occurred on the Cray with HDF 4.1r1 have
+  been corrected.
+
+See the ./release_notes/bugs_fixed.txt file for more information
+on bugs fixed in this release.
+
+Acknowledgements:
+================
+
+Fortner Software LLC ("Fortner") created the reference implementations
+for Macintosh and Windows NT/95 of the HDF 4.1r2 library, which will
+be available in the near future.  For more information, please refer to 
+the macintosh.txt and windows.txt files [in the ./release_notes/ directory]. 
+(see above).
+
+==================new_functions.txt==================================
+
+This file contains a list of the new functions added with HDF 4.1r2.
+The functions in parenthesis were already present in the HDF library,
+and are included for clarity.
+
+C                     FORTRAN                 Description
+--------------------------------------------------------------------------------
+
+(SDsetcompress)       sfscompress             compresses SDS
+
+(SDwritechunk)        sfwchnk                 writes the specified chunk of
+                                              NUMERIC data to the SDS
+
+(SDwritechunk)        sfwcchnk                writes the specified chunk of
+                                              CHARACTER data to the SDS
+
+(SDreadchunk)         sfrchnk                 reads the specified chunk of
+                                              NUMERIC data to the SDS
+
+(SDreadchunk)         sfrcchnk                reads the specified chunk of
+                                              CHARACTER data to the SDS
+ 
+(SDsetchunk)          sfschnk                 makes the SDS a chunked SDS
+ 
+(SDsetchunkcache)     sfscchnk                sets the maximum number of chunks
+                                              to cache
+ 
+(SDgetchunkinfo)      sfgichnk                gets info on SDS
+
+(SDsetblocksize)      sfsblsz                 sets block size 
+
+(SDisrecord)          sfisrcrd                checks if an SDS is unlimited
+
+
+
+(GRsetcompress)       mgscompress             compresses raster image
+
+GRsetchunk            mgschnk                 makes a raster image a chunked
+                                              raster image
+
+GRgetchunkinfo        mggichnk                gets info on a raster image
+
+GRsetchunkcache       mgscchnk                sets the maximum number of chunks
+                                              to cache
+
+
+(Hgetlibversion)      hglibver                gets version of the HDF Library
+
+(Hgetfileversion)     hgfilver                gets version of the HDF file
+
+
+Vdeletetagref        vfdtr                    deletes tag/ref pair ( HDF object)
+                                              from a vgroup
+
+(VSfindclass)        vsffcls                  finds class with a specified 
+                                              name in a vdata
+
+VSdelete             vsfdlte                  deletes a vdata
+
+Vdelete              vdelete                  deletes a vgroup
+
+
+
+=====================================================================
+
+
+%%%4.1r1%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+
+                            ABOUT HDF4.1 Release 1
+                              February 21, 1997
+
+INTRODUCTION
+
+This document describes the differences between HDF 4.0r2 and
+HDF 4.1r1.  It is written for people who are familiar with
+previous releases of HDF and wish to migrate to HDF 4.1r1.
+The release notes provide more in-depth information concerning 
+the topics discussed here.  The HDF 4.1r1 documentation can be 
+found on the NCSA ftp server (ftp.ncsa.uiuc.edu) in the directory:
+
+     /HDF/Documentation/HDF4.1r1
+
+First-time HDF users are encouraged to read the FAQ in this
+release for more information about HDF.  Users can also look 
+at the home page for HDF at: 
+
+    http://hdf.ncsa.uiuc.edu/  
+
+If you have any questions or comments, please send them to:
+
+         hdfhelp at ncsa.uiuc.edu
+
+CONTENTS
+
+- New Features and Changes
+- Platforms Tested
+- Known Problems
+- Important Fixes
+
+
+New Features and Changes:
+========================
+
+o Attributes are now supported in both the vdata and vgroup 
+  APIs.  In the vdata API, attributes can be attached to either 
+  vdata fields or vdatas; in the vgroup API, attributes can be 
+  attached to vgroups.  This new functionality can also be used
+  to attach attributes to vdatas and vgroups created by earlier
+  versions of the HDF library.  However, the old versions of
+  the HDF library cannot read the new version vdatas and vgroups.
+  A vdata/vgroup having attributes will become a new version 
+  vdata/vgroup.  For more information, please refer to the file 
+  ../release_notes/vattr.txt, the man pages for the new functions, 
+  and the HDF 4.1 User's Guide.
+
+o Data chunking is now supported in SD scientific data sets.  
+  When data chunking is used, an n-dimensional SDS is stored 
+  as a series of n-dimensional chunks, improving performance on 
+  certain types of partial read operations.
+
+  New routines for creating and manipulating chunked SD 
+  scientific data sets have been provided, and two preexisting 
+  SD I/O routines, SDreaddata and SDwritedata, have also been 
+  modified to work with chunked SDSs.  For more information, please 
+  refer to the file ../release_notes/sd_chunk_examples.txt, the man
+  page for sd_chunk, and the HDF 4.1 User's Guide.
+
+o Due to certain limitations in the way compressed SDS datasets are stored, 
+  data which has been compressed is not completely writable in ways that 
+  uncompressed datasets are.  The "rules" for writing to a compressed 
+  dataset are as follows:
+
+    (1) Write an entire dataset that is to be compressed.  i.e. build the
+        dataset entirely in memory, then write it out with a single call.
+ 
+    (2) Append to a compressed dataset.  i.e. write to a compressed dataset
+        that has already been written out by adding to the unlimited
+        dimension for that dataset.
+ 
+    (3) For users of HDF 4.1, write to any subset of a compressed dataset
+        that is also chunked.  
+
+  Please refer to the HDF 4.1 User's Guide for more information.
+
+o HDF now creates free format FORTRAN include files.  In order to make 
+  FORTRAN 90 programs be able to use HDF include files (*.inc), HDF4.1r1 
+  creates F90 versions of these files during the 'make' process on UNIX 
+  platforms, by replacing 'C' or 'c' in column 1 with '!'.  Continuation 
+  lines in hdf.inc have been eliminated. The F90 version files are named 
+  as hdf.f90, dffunc.f90 and netcdf.f90.
+
+o Several performance improvements have been added. Test programs on SPARC
+  20/Solaris 2.5 show that when creating an hdf file with 2500 3D (10x10x10)
+  float32 SDSs, the program execution speed is improved by 2.5 - 4.8 times,
+  and SDend is faster by 4.3 - 20 times.
+
+o A new function, SDsetfillmode, has been added.  It can be used to prevent 
+  SDwritedata from pre-filling the dataset with a user defined or default 
+  fill value, so that better performance can be obtained.
+
+o SGI has changed some compiler default settings in IRIX 6.2.
+  We decided to explicitly define the settings of various ABI related
+  options.  For the 64 bit OS ("uname -s" returns IRIX64), HDF uses
+  "-64 -mips4" code.  For the traditional 32 bit OS ("uname -s" returns
+  IRIX), HDF uses "-32 -mips2".  To use n32 mode on IRIX64, HDF uses
+  "-n32 -mips3" code.  Note that in the previous release (4.0r2), HDF
+  used only "-n32".  In IRIX 6.1 and before, "-n32" defaulted to
+  "-mips4" code but in IRIX 6.2, it defaults to mips3 or mips4 code.
+  We decided to explicitly set it to "-n32 -mips3".  Therefore,
+  applications linking with the HDF library must be compiled with
+  the same explicit ABI options.
+
+o This will be the last release that we support the CM5.
+
+  HDF 4.1 Beta 1 USERS ONLY
+  -------------------------
+
+o The SD chunking routine names were changed to be more consistent
+  with the SD interface. The names of the routines are now in lower
+  case, after the two initial "SD" characters.  For example,
+  SDwriteChunk() has been changed to SDwritechunk().
+
+o The _HDF_ENTIRE_VDATA variable has been changed to _HDF_VDATA.
+  For those users already using it, a macro called _HDF_ENTIRE_VDATA
+  has been added, which is defined as _HDF_VDATA.
+
+o You can now create an empty compressed SDS.
+
+  Please refer to the ../release_notes/bugs_fixed.txt file for changes 
+  in this release.
+ 
+Platforms Tested:
+================
+
+HDF 4.1 Release 1 has been tested on the following platforms:
+
+  CM5 Parallel I/O, 4.1.3_U1
+  DEC Alpha/Digital Unix 3.2
+  DEC Alpha/OpenVMS AXP 6.2
+  DEC VAX OpenVMS 6.2
+  Exemplar 9.03
+  Free BSD 2.2
+  HP-UX 9.03
+  HP-UX 10.10
+  IRIX 5.3
+  IRIX 6.2_64
+  IRIX 6.2_n32 
+  IRIX 6.4_64
+  IRIX 6.4_n32
+  Linux A.OUT 1.2.4
+  Linux ELF 2.0.27 (C only)
+  Macintosh PowerPC (C only) 
+  SP2 4.1
+  Solaris 2.5
+  Solaris_x86 2.5 (C only)
+  SunOS 4.1.3
+  Windows NT/95 (C only)
+
+Known Problems:
+==============
+
+o With the SD interface, you are unable to overwrite
+  existing compressed data, that is not stored in
+  "chunked" form.  This is due to compression algorithms 
+  not being suitable for "local" modifications in a compressed 
+  datastream.   
+
+o There are no plans to add the DF24writeref function 
+  to the DF24 interface.  This function will be removed
+  from the documentation.
+
+Important Fixes:
+===============
+
+o If you opened a file in Read Only mode with the SD interface
+  (using SDstart), it would create the file if the file did not
+  exist.  This no longer occurs.
+
+o HDF 4.0r2 did not recognize JPEG images created by HDF 3.3r4.
+  This has been fixed.
+
+See the ../release_notes/bugs_fixed.txt file for more information
+on bugs fixed in this release.
+
+
+%%%4.1b1%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+
+                            ABOUT HDF4.1 Beta 1
+                              December 6, 1996
+
+INTRODUCTION
+
+This document describes the differences between HDF 4.0r2 and
+HDF 4.1b1.  It is written for people who are familiar with
+previous releases of HDF and wish to migrate to HDF 4.1b1.
+The release notes provide more in-depth information concerning 
+the topics discussed here.  For documentation, please refer
+to the HDF 4.0r2 documentation which can be found on the NCSA 
+ftp server (ftp.ncsa.uiuc.edu) in the directory 
+/HDF/Documentation/HDF4.0r2.
+
+First-time HDF users are encouraged to read the FAQ in this
+release for more information about HDF.  Users can also look 
+at the home page for HDF at: 
+
+    http://hdf.ncsa.uiuc.edu/  
+
+If you have any questions or comments, please send them to:
+
+         hdfhelp at ncsa.uiuc.edu
+
+CONTENTS
+
+- New Features and Changes
+- Platforms Tested
+- Known Problems
+- Important Fixes
+
+
+New Features and Changes:
+-------------------------
+
+o Attributes are now supported in both the vdata and vgroup 
+  APIs.  In the vdata API, attributes can be attached to either 
+  vdata fields or vdatas; in the vgroup API, attributes can be 
+  attached to vgroups.  This new functionality can be used
+  to attach attributes to vdatas and vgroups created by earlier
+  versions of the HDF library.  However, the old versions of
+  the HDF library cannot read the new version vdatas and vgroups.
+  A vdata/vgroup having attributes will become a new version 
+  vdata/vgroup.  For more information, please refer to the file 
+  ../release_notes/vattr.txt, as well as the man pages for the
+  new functions.
+
+o Data chunking is now supported in SD scientific data sets.  
+  When data chunking is used, an n-dimensional SDS is stored 
+  as a series of n-dimensional chunks, improving performance on 
+  certain types of partial read operations.
+
+  New routines for creating and manipulating chunked SD 
+  scientific data sets have been provided, and two preexisting 
+  SD I/O routines, SDreaddata and SDwritedata, have also been 
+  modified to work with chunked SDSs.  For more information, please 
+  refer to the file ../release_notes/sd_chunk_examples.txt, as
+  well as the man page for sd_chunk.
+
+  More information will be included in the HDF 4.1 documentation,
+  which will be available with the release of HDF 4.1.  
+
+o Due to certain limitations in the way compressed SDS datasets are stored, 
+  data which has been compressed is not completely writable in ways that 
+  uncompressed datasets are.  The "rules" for writing to a compressed 
+  dataset are as follows:
+
+    (1) Write an entire dataset that is to be compressed.  i.e. build the
+        dataset entirely in memory, then write it out with a single call.
+ 
+    (2) Append to a compressed dataset.  i.e. write to a compressed dataset
+        that has already been written out by adding to the unlimited
+        dimension for that dataset.
+ 
+    (3) For users of HDF 4.1, write to any subset of a compressed dataset
+        that is also chunked.  
+
+  Please refer to the ../release_notes/comp_SDS.txt file for more information.
+
+o A new file, ../release_notes/compile.txt, contains instructions on
+  compiling applications on the supported platforms.  If you encounter
+  problems with it, please let us know at hdfhelp at ncsa.uiuc.edu. 
+
+o SGI has changed some compiler default settings in IRIX 6.2.
+  We decided to explicitly define the settings of various ABI related
+  options.  For the 64 bit OS ("uname -s" returns IRIX64), HDF uses
+  "-64 -mips4" code.  For the traditional 32 bit OS ("uname -s" returns
+  IRIX), HDF uses "-32 -mips2".  To use n32 mode on IRIX64, HDF uses
+  "-n32 -mips3" code.  Note that in the previous release (4.0r2), HDF
+  used only "-n32".  In IRIX 6.1 and before, "-n32" defaulted to
+  "-mips4" code but in IRIX 6.2, it defaults to mips3 or mips4 code.
+  We decided to explicitly set it to "-n32 -mips3".  Therefore,
+  applications linking with the HDF library must be compiled with
+  the same explicit ABI options.
+
+Platforms Tested:
+-----------------
+
+HDF 4.1b1 has been tested on the following platforms:
+
+  DEC Alpha/Digital Unix 3.2
+  DEC Alpha/OpenVMS AXP v6.2
+  DEC VAX OpenVMS v6.2
+  Free BSD 2.2
+  HP-UX 9.03
+  IRIX 5.3
+  IRIX 6.2_64
+  IRIX 6.2_n32 
+  Linux ELF 1.2.13 (C only)
+  Macintosh PowerPC (C only) (not ready yet)
+  SP2 4.1
+  Solaris 2.5
+  SunOS 4.1.3
+  Windows NT/95 (C only)
+  YMP 9.0.2asC
+
+Known Problems:
+---------------
+
+o With the SD interface, you are unable to overwrite
+  existing compressed data, that is not stored in
+  "chunked" form.  This is due to compression algorithms 
+  not being suitable for "local" modifications in a compressed 
+  datastream.  For more information, please refer to 
+  the ../release_notes/comp_SDS.txt file. 
+
+o With 4.0r1p1, you could type "hdp list -a <HDF file>
+  to get a list of the file attributes associated with
+  a file.  This does not currently work.
+
+o There are no plans to add the DF24writeref function 
+  to the DF24 interface.  This function will be removed
+  from the documentation.
+
+o When running "make test" on OpenVMS, Test 3 (float32) of the 
+  chunking tests fails, and has therefore been commented out.
+
+o When running the tests on Window NT/95, Test 2 (uint16) of the
+  chunking tests fails, and will be commented out.
+ 
+
+Important Fixes:
+----------------
+
+o If you opened a file in Read Only mode with the SD interface
+  (using SDstart), it would create the file if the file did not
+  exist.  This no longer occurs.
+
+o HDF 4.0r2 did not recognize JPEG images created by HDF 3.3r4.
+  This has been fixed.
+
+See the ../release_notes/bug_fixed.txt file for more information
+on bugs fixed in this release.
+
+
+%%%4.0r2%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+
+                            ABOUT HDF4.0 Release 2
+                                July 19, 1996
+
+INTRODUCTION
+
+This document describes the differences between HDF 4.0r1p1 and
+HDF 4.0r2.  It is written for people who are familiar with
+previous releases of HDF and wish to migrate to HDF 4.0r2.
+The documentation and release notes provide more in-depth 
+information concerning the topics discussed here.  The HDF 4.0
+documentation can be found on the NCSA ftp server in the
+directory /HDF/Documentation/HDF4.0/Users_Guide.
+
+First-time HDF users are encouraged to read the FAQ in this
+release for more information about HDF.  Users can also look 
+at the home page for HDF at: 
+
+    http://hdf.ncsa.uiuc.edu/  
+
+If you have any questions or comments, please send them to:
+
+         hdfhelp at ncsa.uiuc.edu
+
+CONTENTS
+
+- New Features and Changes
+- Platforms Tested
+- Known Problems
+
+
+New Features and Changes:
+-------------------------
+
+o HDF now supports unlimited number of access IDs and files IDs.
+
+o The vdata field size limit has been increased from 32000 to 65535.
+
+o The hdp utility has been updated to:
+   - view a GR object
+   - recognize the new compression methods
+   - view descriptive annotations
+   - display the library version of the HDF file
+
+o SDsetattr and GRsetattr now check for both MAX_ORDER and 
+  MAX_FIELD_SIZE.
+
+o The handling of DFNT_CHAR in all Fortran interfaces has been 
+  cleaned up.  See release_notes/Fortran_APIs.txt for more 
+  information.
+
+o When appending compressed data onto the end of an unlimited
+  dimension SDS, the SD interface no longer writes the fill-values
+  in locations where they will immediately be over-written by data.
+  This was done for the compression layer, but has the added
+  enhancement of improving performance.
+
+o On the Cray, there were boundary problems when foreign data did not
+  start from the 64-bit boundary.  This has been fixed.
+
+o There are no longer the following name collisions with the HDF 
+  libraries:
+     -  AVS (HPread, HPwrite)
+     -  Windows SDK (_hread) 
+     -  ODL library (_HDF_<constant>)
+
+o The 32-bit mode for IRIX 6.1 previously used the '-32' option which
+  produces mips1 code.  It has been changed to use '-n32' which
+  produces mips4 code.  This runs faster on the Power Challenges.
+  Users who must use the '-32' option can link their code with
+  the IRIX 5.3 HDF library.
+
+o The compression problems have been fixed when using HDF on IRIX 6.1 
+  with the -n32 (see Known Problems below).
+
+o The zlib and jpeg libraries have been updated.  The versions included
+  with HDF 4.0 Release 2 are:
+
+      zlib version 1.0.2
+      jpeg version 6a (7-Feb-96)
+       
+o The hdfls utility has been updated to:
+    - support the new compression modes
+    - display the library version of the HDF file
+
+o Support for the 16-bit architecture has been pulled out of HDF.
+
+o The directories separator in the directory variable used by the
+  function HXsetdir (Fortran equivalent: hxsdir) is the verticle bar
+  ('|') now.  It used to be the colon (':') symbol, but a colon is
+  a legal symbol for a file pathname in the MacOS system.
+
+o The code has been rearranged so that most applications' binaries
+  will be smaller.
+
+o A new routine, VSfpack(), has been added.  Please see the HDF man
+  page on how to use this routine.
+
+o A new routine, GRluttoref(), has been added.  Please see the HDF man
+  page on how to use this routine. 
+
+o Several internal problems have been fixed with the GR interface.
+
+
+Changes in Compiling the Source Code:
+
+o A new compile option, '-DHAVE_NETCDF', has been added, to avoid conflicts 
+  in linking the HDF/MFHDF library with the original netCDF library. 
+  This is only available for the C-interface.  However, keep in 
+  mind that you cannot read/write HDF files using the netCDF libraries.  
+  See section 2.4.3.2 in the INSTALL file for more information.  
+
+o When compiling and installing HDF, the default location to place the
+  binaries, has been changed from /usr/local/bin to NewHDF in the
+  source directory.  For example, assuming the library source is loaded 
+  at /usr/local/src/hdf, the following commands will result in the HDF 
+  binaries being placed in the directory /usr/local/src/hdf/dev/NewHDF.
+
+        cd dev
+        ./configure -v
+        make 
+        make test
+        make install
+
+o The Fortran test output has been cleaned up and shortened, when 
+  running "make test".  Previously, the Fortran tests on the hdf/
+  side consisted of multiple Fortran programs invoked by a C frontend.  
+  The test programs were changed to subroutines and combined as one 
+  Fortran program.  The C frontend was also changed to produce a 
+  'directive' file, called fortest.arg, which contains directives to 
+  run the Fortran test program.
+
+
+Platforms Tested:
+-----------------
+
+HDF 4.0r2 has been tested on the following platforms:
+
+  AIX                           Linux ELF
+  C90                           MAC 
+  CM5                           SP2  (single node)
+  Digital Unix 3.2              Solaris_2.4
+  Exemplar 9.03                 Solaris 2.5
+  Free BSD                      Solaris_x86 2.4  (C only)
+  Fujitsu  (C only)             SunOS 4.1.4
+  HP-UX                         T3D  (C only)
+  IRIX 6.1 w/-n32 bit option    VMS
+  IRIX 6.1 w/-64 bit option     Windows NT/95
+  IRIX 5.3                      YMP
+  Linux A.OUT                   
+
+
+Known Problems:
+---------------
+
+o On the SunOS platform, there is a bug when using sfscal()/sfgcal() 
+  routines with gcc and f77.
+ 
+o On the VMS platform, there is a bug with float64 data.
+
+o For IRIX 6.1, the stdio.h file gives a false warning message if both 
+  the '-n32' and '-ansi' options are used for the C compiler.  We have 
+  temporarily removed the '-ansi' option from our autoconfiguration
+  for the Irix6_32 system, to avoid these messages.  We have verified
+  that the culprit in stdio.h has been corrected in IRIX 6.2, and plan
+  to put the '-ansi' option back in our next release.
+
+o The compression tests produce errors for FLOAT32 data if the '-O'
+  option is used on IRIX 6.1, for both the '-64' bit and '-n32'
+  bit modes.  It did not produce errors when using the '-32' bit 
+  option or when not using the '-O' option.  We are unsure whether the 
+  errors are due to the compression code or the IRIX C optimizer.  For 
+  now, we have chosen to compile the HDF library without the '-O' option, 
+  while we investigate the problem. 
+
+%%%4.0r1%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+
+                    ABOUT HDF4.0 Release 1
+                       February 7, 1996
+
+INTRODUCTION
+
+This document describes the differences between HDF4.0r1 and
+HDF3.3r4.  It is written for people who are familiar with 
+previous releases of HDF and wish to migrate to HDF4.0r1.
+The documentation and release notes provide more in-depth 
+information concerning the topics discussed here.  The HDF 4.0
+documentation can be found on the NCSA ftp server in the
+directory /HDF/Documentation/HDF4.0/Users_Guide.  For more 
+history behind the implementation of the items listed here, 
+refer to the ABOUT_4.0.alpha, ABOUT_4.0b1 and ABOUT_4.0b2 files.
+
+First-time HDF users are encouraged to read the FAQ in this
+release for more information about HDF.  Users can also look 
+at the home page for HDF at: 
+
+    http://hdf.ncsa.uiuc.edu/  
+
+If you have any questions or comments, please send them to:
+
+         hdfhelp at ncsa.uiuc.edu
+
+CONTENTS
+
+- Important Changes (that will affect you) 
+- New Features and Changes
+- Changes in Utilities
+- Known Problems
+
+
+Important Changes: 
+-----------------
+
+  1. Several changes have been made to the libraries in HDF4.0
+     which affect the way that users compile and link their
+     programs:
+
+      * The mfhdf library has been renamed to libmfhdf.a from 
+        libnetcdf.a in previous releases.
+
+      * HDF 4.0 libraries now use v5 of the Independent JPEG Group 
+        (IJG) JPEG file access library.
+
+      * Gzip library libz.a is added in HDF4.0r1, in order to 
+        support "deflate" style compression of any object in 
+        HDF files.
+
+     Due to these changes, users are required to specify four
+     libraries when compiling and linking a program:  libmfhdf.a,
+     libdf.a, libjpeg.a and libz.a, even if your program
+     does not use JPEG or GZIP compression.  For example:
+
+     For C:
+
+        cc -o myprog myprog.c -I<path of include files> \
+              <path of libmfhdf.a> <path of libdf.a> \
+              <path of libjpeg.a> <path of libz.a>
+       or
+  
+        cc -o myprog myprog.c -I<path of include files> \
+              -L<path of libraries> -lmfhdf -ldf -ljpeg -lz
+
+     For FORTRAN:
+
+        f77 -o myprog myprog.f <path of libmfhdf.a> \
+              <path of libdf.a> <path of libjpeg.a> \
+              <path of libz.a>
+       or
+   
+        f77 -o myprog myprog.f -L<path of libraries> \
+              -lmfhdf -ldf  -ljpeg -lz
+
+     NOTE: The order of the libraries is important: libmfhdf.a
+           first, then libdf.a, followed by libjpeg.a and libz.a.
+     
+     This is also discussed in Items 1, 2, and 3 of the New 
+     Features and Changes section of this document.
+
+  2. The HDF 4.0 library will ONLY compile with ANSI C compilers.
+     See Item 4 in the New Features and Changes section of this
+     document for more information.
+
+  3. The HDF library and netCDF library on Unix systems can now be 
+     automatically configured and built with one command.  See Item 5 
+     in the New Features and Changes section of this document for more
+     information.
+
+  4. In HDF 4.0, the FORTRAN programs dffunct.i and constant.i
+     have been changed to dffunct.inc and hdf.inc.  See Item 16 in
+     the New Features and Changes section of this document for more 
+     information.
+  
+  5. Platforms tested on: IRIX (5.3, 6.1 (32 bit and 64 bit)), 
+     SunOS 4.1.4, Solaris (ver 2.4, 2.5), Solaris x86, 
+     HP-UX, Digital Unix, AIX, LINUX (A.OUT), CM5, YMP,
+     FreeBSD, C90, Exemplar, Open VMS, and SP2 (single node only). 
+
+     HDF 4.0 is not yet available on the Macintosh for HDF4.0r1.
+
+  6. The HDF 4.0 binaries for each tested platform are available. 
+     Unix binaries are located in the bin/ directory.  Binaries for 
+     Windows NT are located in the zip/ directory. 
+     
+
+New Features and Changes:
+------------------------
+
+  1. Changes to the mfhdf library
+     The mfhdf library has been renamed to libmfhdf.a from libnetcdf.a 
+     in previous releases. To link a program with HDF4.0r1
+     libraries, four libraries are required:  libmfhdf.a, libdf.a, 
+     libjpeg.a and libz.a. 
+
+     See Item 1 of 'Important Changes' for examples of how you would 
+     compile and link your programs.
+
+  2. JPEG Group v5b library
+     HDF Version 4.0 libraries now use v5 of the Independent 
+     JPEG Group (IJG) JPEG file access library.
+
+     The JPEG library will need to be linked with user's 
+     applications whether they are compressed with JPEG or not.
+
+     See Item 1 of 'Important Changes' for examples of how you would 
+     compile and link your programs.
+
+  3. Gzip library added
+     New with this release is support for gzip "deflate" style 
+     compression of any object in an HDF file.  This is supported 
+     through the standard compression interface function calls 
+     (HCcreate, SDsetcompress, GRsetcompress).  The ABOUT_4.0b2 
+     file contains additional information on this. 
+
+     See Item 1 of 'Important Changes' for examples of how you would 
+     compile and link your programs.
+
+  4. ANSI C only
+     As was previously noted in the HDF newsletters, this release 
+     of the HDF library will compile only with ANSI C compilers. 
+     This shift to ANSI C compliance has been accompanied by a large 
+     clean up in the source code. An attempt has been made to remove 
+     all warnings and informational messages that the compilers on 
+     supported platforms occasionally emit, but this may not be 
+     completely clean for all user sites. 
+
+  5. Auto configuration 
+     Both the HDF library and netCDF library on Unix systems now use 
+     the same configure script and can be configured uniformally with 
+     one command. See the README and the INSTALL files at the top 
+     level of HDF4.0r1 for detailed instructions on configuration and 
+     installation.
+
+     A consequence of the auto configuration is that on UNIX systems 
+     without FORTRAN installed, the top level config/mh-<sys> will 
+     need to have the 'FC' macros defined to "NONE" for correct 
+     configuration. 
+     
+  6. New version of dimension record
+     In HDF4.0b1 and previous releases of the SDS interface, a vgroup 
+     was used to represent a dimension.  The vgroup had a single field 
+     vdata with a class of "DimVal0.0".  The vdata had <dimension size> 
+     number of records, with each record having a fake value from 
+     0, 1, 2 ... , (<dimension size> - 1).  The fake values were not 
+     really required and took up a large amount of space. For 
+     applications that created large one dimensional array datasets, the 
+     disk space taken by these fake values almost doubled the size of the 
+     HDF file. In order to omit the fake values, a new version of 
+     dimension vdata was implemented.
+
+     The new version uses the same structure as the old version.  The 
+     only differences are that the vdata has only 1 record with a value
+     of <dimension size> and that the vdata's class is "DimVal0.1",  to
+     distinguish it from the old version.
+
+     No change was made in unlimited dimensions.
+
+     Functions added to support this are:
+     
+       - SDsetdimval_comp -- sets backward compatibility mode for a 
+         dimension.  The default mode is compatible in HDF4.0r1, and 
+         will be incompatible in HDF4.1. See the man page of 
+         SDsetdimval_comp(3) for detail.
+
+       - SDisdimval_bwcomp(dimid) -- gets the backward compatibility
+         mode of a dimension. See the man page of SDisdimval_bwcomp(3) 
+         for detail.
+
+  7. Reading CDF files
+     With HDF 4.0 limited support for reading CDF files was added to 
+     the library. This support is still somewhat in the development 
+     stage and is therefore limited. 
+
+     To begin with, unlike the netCDF merger, the CDF API is not 
+     supported. Rather, the SD and netCDF APIs can be used to access 
+     information pulled out of CDF files. 
+
+     The type of files supported are limited to CDF 2.X files. The 
+     header information is different between CDF 1.X and 2.X files. In 
+     addition, all of the files must be stored as single-file CDFs in 
+     network encoding. 
+
+     If there is user demand, and support, the types of CDF files 
+     that are readable may be increased in the future. 
+
+  8. Parallel I/O interface on CM5 
+     An extension using the parallel IO in CM5 has been added to
+     the SDS interface. Initial tests have resulted in about
+     25 MBytes/second IO throughput using the SDA (Scalable
+     Disk Array) file system. The library provides interfaces
+     for both C* and CMF programming languages. The ABOUT_4.0.alpha
+     file has more information concerning this.
+
+     Users will find some examples in the directory
+     mfhdf/CM5/Examples.
+
+     The parallel I/O interface stores scientific datasets in
+     external files.  New options have been added to hdfls and
+     hdfpack to handle them.  A new utility, hdfunpac, was
+     created for external files handling, too. 
+
+  9. Support for SGI Power Challenge running IRIX6.1 
+     Power Challenge is now supported, both in the native 64-bit 
+     and the 32-bit objects modes.  Note that the Power Challenge 
+     native 64 bits objects use 64 bits long integers. Users should
+     be careful when using the netcdf interface.  They should declare 
+     their variables as "nclong", not "long". 
+
+ 10. Multi-file Annotation Interface (ANxxx)
+     The multi-file annotation Interface is for accessing 
+     file labels and descriptions, and object labels and 
+     descriptions. It allows users to keep open more than 
+     one file at a time, and to access more than one 
+     annotation at a time.  It also allows multiple labels 
+     and multiple descriptions to be applied to an HDF object 
+     or HDF file. 
+   
+ 11. Multi-file Raster Image (GRxxx) interface
+     The new Generic Raster (GR) interface provides a set of 
+     functions for manipulating raster images of all kinds.  
+     This interface allows users to keep open more than one 
+     file at a time, and to "attach" more than one raster 
+     image at a time.  It supports a general framework 
+     for attributes within the RIS data-model, allowing 
+     'name = value' style metadata.  It allows access to 
+     subsamples and subsets of images.  
+ 
+     The GRreqlutil and GRreqimageil functions allow for different 
+     methods of interlacing images in memory.  The images are 
+     interlaced in memory only, and are actually written to disk in 
+     "pixel" interlacing.
+
+ 12. Compression for HDF SDS
+     Two new compression functions have been added to the SD
+     interface for HDF 4.0:  SDsetcompress and SDsetnbitdataset.
+
+     SDsetcompress allows users to compress a scientific dataset 
+     using any of several compression methods.  Initially three 
+     schemes, RLE encoding, an adaptive Huffman compression 
+     algorithm,  and  gzip 'deflation' compression are available. 
+
+     SDsetnbitdataset allows for storing a scientific dataset 
+     using integers whose size is any number of bits between 1 and 
+     32 (instead of being restricted to 8, 16 or 32-bit sizes). 
+     Access to the data stored in an n-bit data item is transparent
+     to the calling program.  The ABOUT_4.0.alpha file has an in-depth
+     description concerning this ("n-bit SDS" listed under Item 2).  
+
+ 13. External Path Handling
+     New functions have been added to allow applications to 
+     specify directories to create or search for external 
+     files.  
+     
+      - HXsetcreatedir (hxscdir for FORTRAN) 
+      - HXsetdir (hxsdir for FORTRAN)
+
+ 14. I/O performance improvement 
+     HDF 4.0 unofficially supports file page buffering.  With HDF 4.1
+     it will be officially supported.  The file page buffering allows 
+     the file to be mapped to user memory on a per page basis i.e. a 
+     memory pool of the file.  With regards to the file system, page 
+     sizes can be allocated based on the file system page-size or 
+     in a multiple of the file system page-size. This allows for fewer 
+     pages to be managed as well as accommodating the user's file usage 
+     pattern.  See the top level INSTALL file and the 
+     release_notes/page_buf.txt file for creating the library with
+     this support and using it.
+     
+ 15. Improvement in memory usage and general optimizations
+     Considerable effort was put into this release (since the b2 
+     release) to reduce the amount of memory used per file and by the 
+     library in general.  In general terms, we believe that the library 
+     should have at least half as large of a memory footprint during 
+     the course of its execution and is more frugal about allocating 
+     large chunks of memory.
+ 
+     Much time was spent optimizing the low-level HDF routines for this 
+     release to be faster than they have been in the past also.  
+     Applications which make use of files with many (1000+) datasets 
+     should notice significant improvements in execution speed.
+ 
+ 16. In hdf/ there are two files for FORTRAN programs to include
+     the values and functions defined in HDF. They were
+     originally named as constant.i and dffunct.i. The extension .i
+     caused problems on some machines since *.i is used by cc as
+     an "intermediate" file produced by the cpp preprocessor. In
+     HDF 4.0 dffunct.i has been changed to dffunct.inc, and constant.i 
+     has been changed to hdf.inc. Users' existing FORTRAN application
+     programs need to make the corresponding changes, if they
+     include the .i files, in order to compile with HDF4.0. 
+
+ 17. Limits file
+     A new file, limits.txt, has been added to the ftp server.  
+     It is aimed at HDF applications programmers and defines the
+     upper bounds of HDF 4.0. This information is also found in the
+     hdf/src/hlimits.h file.  Refer to the ABOUT_4.0.alpha for 
+     historical information concerning this.
+
+ 18. Pablo available
+     HDF4.0 supports creating an instrumented version of the HDF 
+     library(libdf-inst.a). This library, along with the Pablo 
+     performance data capture libraries, can be used to gather data 
+     about I/O behavior and procedure execution times.  See the top
+     level INSTALL file and the hdf/pablo/README.Pablo file for
+     further information.
+
+ 19. Support for the IBM SP-2 
+     The HDF library has been ported to run in a single SP2 node.
+     It does not support the parallel or distributed computing for
+     multiple SP-2 nodes yet.
+
+ 20. Miscellaneous fixes
+
+     - To avoid conflicts with C++, internal structures' fields which
+       were named 'new' have been renamed.
+
+     - The maximum number of fields in a vdata now is decided by 
+       VSFIELDMAX.
+
+     - The platform number subclass problem when an external data file 
+       was in Little_endian format has been fixed.
+
+     - Unlimited dimension was not handled correctly by the HDF3.3r4
+       FORTRAN interface.  This problem has been fixed in HDF4.0r1.
+
+Changes to utilities:
+--------------------
+
+   o hdf/util/ristosds 
+     Ristosds now converts several raster images into a 3D uint8, 
+     instead of float32, SDS. 
+
+   o hdf/util/hdfls
+     New options have been added to support the parallel I/O
+     interface on CM5.
+
+   o hdf/util/hdfpack
+     New options have been added to support the parallel I/O
+     interface on CM5.
+
+   o hdf/util/hdfunpac
+     This is a new utility for external file handling for the
+     parallel I/O interface on CM5.
+
+   o mfhdf/dumper/hdp
+     Hdp is a new command line utility designed for quick display of 
+     contents and data objects.  It can list the contents of hdf files 
+     at various levels with different details.  It can also dump the 
+     data of one or more specific objects in the file.  See hdp.txt in 
+     the release notes for more information.
+
+Known Problems:
+--------------
+
+   o On the IRIX4 platform, fp2hdf creates float32 and float64 values
+     incorrectly.   
+
+   o On the SP2, the hdp command gives a false message of "Failure to
+     allocate space" when the hdf file has no annotations to list. 
+
+   o On the C90, hdfed fails inconsistently when opening hdf files
+     more than once in the same hdfed session.
+
+   o Currently there is a problem in re-writing data in the middle
+     of compressed objects.
+  
+   o VMS gives an error on the test for Little Endian float64.
+
+   o If the external element test in hdf/test/testhdf fails
+     and there is no subdirectory "testdir" in hdf/test/,
+     create one via "mkdir" and run the test again. (The
+     "testdir" should have been created by "make". But
+     the "make" in some old systems does not support the
+     creation commands.)
+
+%%%4.0b2%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+
+                ABOUT HDF4.0 Beta 2
+                   Nov 14, 1995
+ 
+CONTENTS
+ 
+     1. The mfhdf side library is renamed to libmfhdf.a,
+        versus libnetcdf.a in previous releases
+     2. New version of dimension record  
+     3. New features
+        GR interface
+        Gzip library is added
+        Unified configuration of library
+        I/O performance improvement
+     4. New functions added
+        Fortran functions hxscdir and hxsdir         
+        SDsetdimval_comp
+        SDisdimval_bwcomp
+     5. SGI Power Challenge running IRIX6.1 is now supported
+     6. Pablo available  
+     7. Platforms tested
+     8. Changes in release notes 
+     9. Bug fixes and Known problems
+
+
+1. The mfhdf side library is renamed to libmfhdf.a, versus libnetcdf.a 
+   in previous releases. To link a program with HDF4.0b2 libraries, 
+   one needs four libraries, libmfhdf.a, libdf.a, libjpeg.a and libz.a 
+   (see "Gzip library is added" in item 3 below):
+
+      cc -o myprog myprog.c -I<path of include files> \
+            libmfhdf.a libdf.a libjpeg.a libz.a
+
+   Note, the order of the libraries is important.
+
+2. New version of dimension record  
+   HDF4.0b1 and previous releases use a vgroup to represent a dimension.
+   The vgroup has a single field vdata with class "DimVal0.0".
+   The vdata has <dimension size> number of records, each record has a
+   fake value from 0, 1, 2 ... , (<dimension size> - 1 ). The fake values
+   are not really required and take a lot of space. For applications that
+   create large one dimensional array datasets the disk space taken by
+   these fake values almost double the size of the HDF file. In order to
+   omit the fake values, a new version of dimension vdata is proposed.
+
+   The new version uses the same structure as the old version. The only
+   differences are that the vdata has only 1 record with value
+   <dimension size> and that the vdata's class is "DimVal0.1" to
+   distinguish it from the old version. 
+
+   No change is made in Unlimited dimensions. 
+   
+   See file dimval.txt in subdirectoy release_notes/ of HDF4.0b2 release
+   for our policy on the backward compatibility of this dimension version.
+
+3. New features
+   . New with this beta release is the support for different methods of
+     interlacing images in memory.  This feature is supported through the 
+     GRreqlutil and GRreqimageil functions rescribed in the mf_ris.txt 
+     document in this directory.  Please note that the images are 
+     interlaced in memory only, all images are actually written to disk 
+     in "pixel" interlacing.
+
+   . Gzip library is added
+     New with this release is support for gzip "deflate" style compression
+     of any object in an HDF file.  This is supported through the standard
+     compression interface function calls (HCcreate, SDsetcompress,
+     GRsetcompress) by using the COMP_CODE_DEFLATE parameter for the coding
+     type.  The comp_info structure has a new member, deflate.level, which
+     specifies how much effort to expend trying to compress data.  Values
+     for deflate.level must be between 1-9, with 1 being small amounts of
+     effort (time) and 9 being maximum effort (most time and compression),
+     the default value is 6.
+     Currently, due to our use of the gzip "zlib" library for support of
+     this feature, users must link with the "libz.a" library produced by
+     zlib.  (See item1 above). 
+
+          cc -o myprog myprog.c -I<path of include files> \
+                  libmfhdf.a libdf.a libjpeg.a libz.a
+
+     Note, the order of the libraries is important. 
+
+     Also, this method of compression currently has several known bugs 
+     when used on a 64-bit architecture (DEC Alpha processors, Cray 
+     machines, and SGI Power Challenge machines in 64-bit "mode").
+
+   . Unified configuration of library
+     Both sides of the library now use the same configure script and
+     can be configured uniformly through one makefile fragment. Please
+     see the top-level INSTALL file in the distribution for further 
+     details.
+
+   . I/O performance improvement 
+     This version of the distribution also has preliminary support for 
+     file page buffering. Note that is a *Beta* release and is not 
+     supported officially. As such it is is provided as is.
+     The file page buffering allows the file to be mapped to user memory on 
+     a per page basis i.e a memory pool of the file. With regards to the 
+     file system, page sizes can be allocated based on the file system 
+     page-size or if the user wants in some multiple of the file system 
+     page-size. This allows for fewer pages to be managed along with 
+     accommodating the users file usage pattern. Please see the 
+     documentation in 'release_notes/page_buf.txt'.
+     
+     We have also reduced the memory requirements for several of the 
+     internal HDF library data structures, for greater efficiency. 
+
+4. Functions added
+   . Fortran interface functions added for the set external path features.
+     They are hxscdir and hxsdir.  See the man page of HXsetcreatedir(3)
+     and HXsetdir(3) for detail.
+   . SDsetdimval_comp -- sets backward compatibility mode for a dimension.
+     The default mode is compatible in HDF4.0b2, and will be 
+     incompatible in HDF4.1. See the man page of SDsetdimval_comp(3)
+     for detail. 
+   . SDisdimval_bwcomp(dimid) -- gets the backward compatibility mode
+     of a dimension. See the man page of SDisdimval_bwcomp(3) for
+     detail. 
+
+5. SGI Power Challenge running IRIX6.1 is now supported
+   Power Challenge is now supported, both in the native 64-bit and the 
+   32-bit objects modes.  Note that the Power Challenge native 64 bits 
+   objects use 64 bits long integers, users should be careful when using 
+   the netcdf interface.  They should declare their variables as "nclong", 
+   not "long".
+
+6. Pablo available  
+   This version of the distribution has support to create an 
+   instrumented version of the HDF library(libdf-inst.a). This 
+   library along the Pablo performance data capture libraries 
+   can be used to gather data about I/O behaviour and procedure 
+   execution times. Please see the documentation 
+   release_notes/Pablo.txt in the distribution for further details.
+
+7. Platforms tested
+    HDF4.0b2 has been tested on the following systems:
+    SunOS 4.1.3, SunOS 5.3 and 5.4(Solaris 2.3 and 2.4), 
+    Linux_a.out, Linux_elf, SGI/IRIX5.2, SGI/IRIX5.3,
+    SGI Power Challenge/IRIX6.1 (32- and 64-bit), HP/UX 9.01,
+    IBM RS6000/AIX, Cray C90, Cray YMP, DEC alpha/UNIX (OSF), 
+    DecStation/MIPSEL (ncdump doesn't work), Free BSD 2.0, 
+    Solaris_x86, Convex Exemplar/HPUX, and CM5 parallel I/O. 
+    See the INSTALL file at the top level of HDF4.0b2 for more 
+    details.
+
+8.  Changes in release notes
+    The directory release_notes/ contains writeups for the alpha
+    and beta releases of HDF4.0. Those files can be used as temporary
+    documents for HDF4.0 before the official documentation is 
+    available. 
+
+    Newly added: ABOUT_4.0b2, Pablo.txt, dimval.txt, and page_buf.txt
+    Files changed: bug_fixed.txt and parallel_CM5.txt.
+    AOUBT_4.0.alpha is also included. 
+
+9. Fixes and Known problems
+
+   Problems fixed:
+     . To avoid conflicts with C++, internal structures' fields which
+       were named 'new' have been renamed.
+     . Maximum number of fields in a vdata now is decided by VSFIELDMAX.
+     . Vshow and hdp are fixed. Now they can handle as many fields 
+       as defined by VSFIELDMAX.
+     . Fixed platform number subclass problem when external data file was
+       in Little_endian format. 
+     . A file hdf/src/hlimits.h has been added to hold definitions for
+       maximum number of open files and other limits. 
+     . Miscelianeous fixes
+   
+   Known problems:
+     . Hfidinquire not included in binaries
+     . Gzip doesn't work on 64-bit machines.
+     . Currently there is a problem in appending data to compressed objects.  
+     . Hfidinquire is in the source code, but it is not included in the
+       pre-compiled code. If your program uses Hfidinquire, you need to
+       re-compile libdf.a. 
+
+
+%%%4.0b1%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+
+
+               ABOUT HDF4.0 Beta 1
+                 July 25, 1995
+
+CONTENTS
+
+    1. New features in the HDF4.0 Beta 1 release
+    2. Bugs fixed and known problems
+    3. Platforms tested
+    4. Installation of HDF4.0 Beta 1 on WindowsNT/95
+    5. Known problems in compilation, testing and
+       installation of HDF4.0b1
+    6. Installing without FORTRAN support
+
+1. New features in HDF4.0 Beta 1 release
+
+   o Auto configuration 
+     It is now possible to automatically configure and build 
+     both the HDF library and netCDF library with one command. 
+     See the README and the INSTALL files at the top level of 
+     HDF4.0beta1 for detailed instructions on configuring and 
+     installation.
+     
+   o Multi-file Annotation Interface (ANxxx)
+
+     The multi-file annotation Interface is for accessing 
+     file labels and descriptions, and object labels and 
+     descriptions. It allows users to keep open more than 
+     one file at a time, and to access more than one 
+     annotation at a time.  It also allows multiple labels 
+     and multiple descriptions to be applied to an HDF object 
+     or HDF file. 
+   
+     A draft of the documentation for this interface is in 
+            ./mf_anno.txt.
+
+   o Multi-file Raster Image (GRxxx) interface
+     The new Generic Raster (GR) interface provides a set of 
+     functions for manipulating raster images of all kinds.  
+     This interface allows users to keep open more than one 
+     file at a time, and to "attach" more than one raster 
+     image at a time.  It supports a general framework 
+     for attributes within the RIS data-model, allowing 
+     'name = value' style metadata.  It allows access to 
+     subsamples and subsets of images.  HDF4.0beta1 includes
+     a C interface only. The Fortran interface will be available 
+     in the next release. 
+ 
+     A draft of the documentation for this interface is in 
+            ./mf_ris.txt.
+
+   o New Compression Algorithms and interface
+     A new low-level compression interface has been added to 
+     HDF which allows any data-object to be compressed 
+     using a variety of algorithms.  Currently only two 
+     compression algorithms are supported: Run-Length 
+     Encoding (RLE) and adaptive Huffman.
+  
+     A draft of the documentation for this interface is in 
+            ./compression.txt
+
+   o JPEG Group v5b library
+     HDF Version 4.0 libraries now use v5 of the Independent 
+     JPEG Group (IJG) JPEG file access library. For more details
+     about JPEG library see
+ 
+            ./JPEG_v5b.txt 
+
+     The JPEG library will need to be linked with a user's 
+     applications whether they are compressed with JPEG or not.
+
+     For example on a SUN SPARC, if the .h files are in the 
+     directory "incdir", and all libraries are in "libdir,"
+     the following command should be used to compile a 
+     C program "myprog.c":
+
+     cc -DSUN -DHDF -Iincdir myprog.c libdir/libnetcdf.a \
+         libdir/libdf.a  /libdir/libjpeg.a -o myprog
+
+     or
+
+     cc -DSUN -DHDF -Iincdir myprog.c -L libdir -lnetcdf \
+         -ldf -ljpeg -o myprog
+
+     Note that the order is important: libnetcdf.a must occur first,
+     then libdf.a, and then libjpeg.a.
+  
+     For FORTRAN programs, use command line:
+
+      f77 -o myprogf myprogf.f libdir/libnetcdf.a \
+         libdir/libdf.a libdir/libjpeg.a
+
+    or
+
+      f77 -o myprogf myprogf.f -L libdir -lnetcdf -ldf -ljpeg
+  
+     Note that the order is important: libnetcdf.a, then libdf.a 
+     and then libjpeg.a.
+ 
+   o Compression for HDF SDS (not completely working)
+     Work is almost complete on the addition of two
+     new compression functions to the SD interface. 
+
+     One function, which still has some known bugs, will 
+     allow users to compress a scientific dataset using 
+     any of several compression methods.  Initially two 
+     schemes,  RLE encoding and an adaptive Huffman 
+     compression algorithms, will be available. 
+
+     A second function is available for storing a scientific 
+     dataset using integers whose size is any number of bits 
+     between 1 and 32 (instead of being restricted to 8, 16 
+     or 32-bit sizes). 
+
+     A draft of the documentation for these functions is in
+            ./comp_SDS.txt
+
+
+   o External Path Handling
+     New functions have been added to allow applications to 
+     specify directories to create or search for external 
+     files. More explanation can be found in:
+   
+            ./external_path.txt.
+ 
+          
+   o Parallel I/O for the CM5
+     An extension using the parallel I/O facilities on a  CM5 
+     has been added to the SDS interface.  Initial tests have 
+     resulted in about 25 MBytes/second I/O throughput using the 
+     SDA (Scalable Disk Array) file system. The library 
+     provides interfaces for both C* and CMF programming
+     languages. See:
+
+            ./parallel_CM5.txt for details.
+
+
+   o HDF dumper
+     Hdp is a command line utility designed for quick 
+     display of contents and data of HDF3.3 objects, RIS, 
+     SDS, Vdata, and Vgroup. It can list the contents of 
+     hdf files at various levels with different details. 
+     It can also dump the data of one or more specific 
+     objects in the file.  See:
+
+            ./hdp.txt for details.
+
+     Currently hdp works on SunOS and LINUX only. 
+
+2. Bugs fixed and known problems
+
+  Several bugs or problems, such as failure in setting 
+  and getting scales for unlimited dimensions, missing 
+  Fortran version of VSQxxxx functions, failure in 
+  defining more than 36 fields in Vdatas, etc. were 
+  fixed in this beta release. For more details about
+  fixed and un-fixed bugs and problems please see:
+  
+            ./bug_fixed.txt.
+
+3. HDF4.0 Beta 1 has been tested on the following systems:
+SunOS 4.1.3, SunOS 5.3 (Solaris 2.3), Linux, SGI/IRIX5.3, 
+SGI Power Challenge/IRIX6.0 (32-bit mode only), HP/UX 9.01, 
+IBM RS6000/AIX (C only), C3880/ConvexOS,11.0, CM5, Cray C90,
+DEC alpha/OSF (C only), DecStation/MIPSEL (C only), Windows NT,
+Free BSD 2.0, and Convex Exemplar/HPUX. See the INSTALL 
+file at the top level of HDF4.0b1 for more details.
+
+4. Installing HDF4.0 Beta 1 on Windows NT and Windows 95
+Since Windows NT, Windows '95 (Chicago) and Windows 3.1 
+(with the Win 32s extensions) all are designed to run 
+the same 32-bit code, we have decided to support only 
+32-bit libraries and code on the MS-Windows platform.  
+To build the HDF, JPEG and netCDF libraries and utilities, 
+follow the instructions listed in:
+
+            ./install_winNT.txt. 
+   
+5. Known problems in compilation,testing and installation
+   of HDF4.0b1:
+
+   . On SunOS, tsdmmsf.f in hdf/test/fortest fails
+   . On C90, mfhdf/fortran test doesn't configure correctly.
+     The adaptive Huffman algorithm does not work right 
+     either.  Due to this problem, when running 
+     hdf/test/testhdf the test module comp prints out 
+     error messages.  
+   . On DecStation/MIPSEL, ncdump gives a segmentation fault.
+   . The Fortran interface has not been tested on IBM RS6000, 
+     DecStation/MIPSEL, and Dec Alpha/OSF because a Fortran 
+     compiler is not available on those machines in our group.
+   . If the external element test in hdf/test/testhdf fails 
+     and there is no subdirectory "testdir" in hdf/test/, 
+     create one via "mkdir" and run the test again. (The 
+     "testdir" should have been created by "make". But 
+     the "make" in some old systems does not support the 
+     creation commands.)
+   . A bug was found in the "mfhdf.h" file late in the testing
+     stage. The error occured in the CM5 parallel I/O 
+     extension only. The fix is not included in the source
+     release, but it is avalable in the binary release for 
+     the CM5 version.  Please retrieve the fix there. 
+   . SDsetcompress does not work correctly.
+   . Hdp now works on SunOS and LINUX only. Commands dumpsds, 
+     dumpvd and dumpvg have different problems on other platforms.
+     See mfhdf/dumper/README for more details. 
+
+6. Installing without FORTRAN support:
+   . On UNIX systems without a FORTRAN system installed, 
+     the config/mh-<sys> will need to have the 'FC' macros 
+     defined to "NONE" for correct configuration and the 
+     target "allnofortran" should be used to build the 
+     distribution, instead of the target "all".
+
+
+%%%4.0alpha%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+
+                            ABOUT_4.0.alpha
+
+This file was last updated: November 8, 1994 
+
+
+INTRODUCTION 
+
+This is a preliminary document describing the differences
+between HDF4.0 (Alpha) and HDF3.3r3. It is written for people
+who already use HDF3.3r3 or earlier versions and wish to be
+HDF4.0 Alpha testers. Special emphasis is given to changes
+that might be required in existing code. 
+
+The files ABOUT_3.3r3, ABOUT_3.3r2 and ABOUT_3.3r1 which were 
+released along with previous releases contain detailed
+descriptions of HDF3.3. Those files can be found in this 
+directory. First-time HDF users are encouraged to read the FAQ 
+file in directory HDF/ for more information about HDF and where 
+to get HDF documentation. 
+
+If you have any questions or comments, please send them to: 
+
+hdfhelp at ncsa.uiuc.edu. 
+
+Contents 
+
+1. Changes in include file names for FORTRAN programs 
+2. New features supported by HDF4.0 
+      ANSI C only 
+      n-bit SDS 
+      Reading CDF files 
+      Parallel I/O interface on CM5 
+      Installing HDF Libraries With CM5 Parallel IO Extension 
+3. Changes in HDF utilities 
+      hdp -- HDF dumper 
+      ristosds 
+      hdfls 
+      hdfpack 
+      hdfunpac 
+4. Platforms tested 
+5. Limits of the current release 
+
+1. Changes in include file names for FORTRAN programs
+
+   In hdf/ there are two files for FORTRAN programs to include
+   the values and functions defined in HDF. They were
+   originally named as constant.i and dffunct.i. The extension .i
+   causes problems on some machines since *.i is used by cc as
+   an "intermediate" file produced by the cpp preprocessor. In
+   HDF 4.0 dffunct.i is changed to dffunct.inc, and constant.i is
+   changed to hdf.inc. Users' existing FORTRAN application
+   programs need to make the corresponding changes, if they
+   include the .i files, in order to compile with HDF4.0. 
+
+2. New Features supported by HDF4.0
+
+   ANSI C only
+
+      As previously noted in the HDF newsletters, the next
+      major release of the HDF library will compile only with
+      ANSI C compilers. Backward compatibility will be
+      provided through an ANSI->K&R filter which will need to
+      be run on each source file in order to convert the ANSI
+      style code into K&R style code. Currently the entire HDF
+      library has been converted to ANSI code, but the filter
+      is not yet in place. Future alpha releases may have the
+      code filter in place, but it will definitely be in place
+      for the first beta release. This shift to ANSI C
+      compliance has been accompanied by a large cleanup in
+      the source code. An attempt has been made to remove all
+      warnings and informational messages that the compilers
+      on supported platforms occasionally emit, but this may
+      not be completely clean for all user sites. 
+
+   n-bit SDS
+
+      Support for n-bit integer data has been incorporated
+      into this release of the HDF library. The n-bit support
+      is currently incorporated into the call to
+      SDsetnbitdataset, future releases may incorporate high
+      level access through the DFSD interface also. Access to
+      the data stored in an n-bit data item is transparent to
+      the calling program. 
+
+      For example to store an unsigned 12-bit integer (which
+      is represented unpacked in memory as an unsigned 16-bit
+      integer), with no sign extension or bit filling and
+      which starts at bit 14 (counting from the right with bit
+      zero being the lowest) the following setup & call would
+      be appropriate: 
+
+      intn sign_ext = FALSE; 
+
+      intn fill_one = FALSE; 
+
+      intn start_bit= 14; 
+
+      intn bit_len = 12; 
+
+      SDsetnbitdataset(sds_id,start_bit,bit_len,sign_ext,fill_one); 
+
+      Further reads and writes to this dataset would
+      transparently convert the 16-bit unsigned integers from
+      memory into 12-bit unsigned integers stored on disk. The
+      corresponding FORTRAN function name is sfsnbit which
+      takes the same parameters in the same order.
+
+      A breakdown of the parameters to the SDsetnbitdataset
+      call is as follows: 
+
+      int32 sds_id - The id of a scientific dataset returned from
+      SDcreate or SDselect. intn start_bit - This value
+      determines the bit position of the highest end of the
+      n-bit data to write out. Bits in all number- types are
+      counted from the right starting with 0. For example, in
+      the following bit data, "01111011", bits 2 and 7 are set
+      to 0 and all the other bits are set to one. 
+
+      intn bit_len - The number of bits in the n-bit data to
+      write, including the starting bit, counting towards the
+      right (i.e. lower bit numbers). For example, starting at
+      bit 5 and writing 4 bits from the following bit data,
+      "01111011", would write out the bit data, "1110", to the
+      dataset on disk. 
+
+      intn sign_ext - Whether to use the top bit of the n-bit
+      data to sign-extend to the highest bit in the memory
+      representation of of the data. For example, if 9-bit
+      signed integer data is being extracted from bits 17-25
+      (nt=DFNT_INT32, start_bit=25, bit_len=9, see below for
+      full information about start_bit & bit_len parameters)
+      and the bit in position 25 is a 1, then when the data is
+      read back in from the disk, bits 26-31 will be set to a
+      1, otherwise bit 25 will be a zero and bits 26-31 will
+      be set to 0. This bit-filling takes higher precendence
+      (i.e. is performed after) the fill_one (see below)
+      bit-filling. 
+
+      intn fill_one - Whether to fill the "background" bits with
+      1's or 0's. The "background" bits of a n-bit dataset are
+      those bits in the in-memory representation which fall
+      outside of the actuall n-bit field stored on disk. For
+      example, if 5 bits of an unsigned 16-bit integer
+      (in-memory) dataset located in bits 5-9 are written to
+      disk with the fill_one parameter set to TRUE (or 1),
+      then when the data is read back into memory at a future
+      time, bits 0-4 and 10-15 would be set to 1. If the same
+      5-bit data was written with a fill_one value of FALSE
+      (or 0), then bits 0-4 and 10-15 would be set to 0. This
+      setting has a lower precedence (i.e. is performed first)
+      than the sign_ext setting. For example, using the
+      sign_ext example above, bits 0-16 and 26-31 will first
+      be set to either 1 or 0 based on the fill_one parameter,
+      and then bits 26-31 will be set to 1 or 0 based on
+      bit-25's value. 
+
+   Reading CDF files
+
+      With HDF 4.0 limited support for reading CDF files was
+      added to the library. This support is still somewhat in
+      the development stage and is therefore limited. 
+
+      To begin with, unlike the netCDF merger, the CDF API is
+      not supported. Rather, the SD and netCDF APIs can be
+      used to access information pulled out of CDF files. 
+
+      The type of files supported are limited to CDF 2.X
+      files. The header information is different between CDF
+      1.X and 2.X files. In addition, all of the files must be
+      stored as single-file CDFs in network encoding. 
+
+      If there is user demand, and support, the types of CDF
+      files readable may be increased in the future. 
+
+   Parallel I/O interface on CM5 
+
+      An extension using the parallel IO in CM5 is added to
+      the SDS interface. Initial tests have resulted in about
+      25 MBytes/second IO throughput using the SDA (Scalable
+      Disk Array) file system. The library provides interfaces
+      for both C* and CMF programming languages. Read the
+      section "Installing HDF Libraries With CM5 Parallel IO
+      Extension" below for specific installation instructions.
+
+      Users will find some examples in the directory
+      mfhdf/CM5/Examples. Please send comments, bugs reports,
+      etc. to acheng at ncsa.uiuc.edu. 
+
+      The parallel I/O interface stores scientific datasets in
+      external files. New options have been added to hdfls and
+      hdfpack to handle them. A new utility program, hdfunpac,
+      is created for external files handling too. See the man
+      pages for details. 
+
+   Installing HDF Libraries With CM5 Parallel IO Extension
+
+      The current alpha version requires two major steps to
+      install the HDF libraries (libdf.a and libnetcdf.a). Works
+      are in progress to make it simpler in the production
+      release. Bear with us for now. 
+
+      1) Compile and install the ordinary HDF libraries,
+      include files and utilities according to the
+      instructions for a Sun Microsystem machine. 
+
+      2) To make the HDF library with CM5 parallel IO
+      extension: There are two new libraries, libdfcm5.a and
+      libnetcdfcm5.a that are similar to libdf.a and
+      libnetcdf.a. 
+
+      For libdf.a 
+
+              cd hdf
+              cp MAKE.CM5 Makefile
+              cp src/Makefile.CM5 src/Makefile
+              make libdf          # create the parallel IO libdf.a
+               # to install it in /usr/local/lib
+              cp src/libdf.a /usr/local/lib/libdfcm5.a
+              ranlib /usr/local/lib/libdfcm5.a
+           
+
+      For libnetcdf.a 
+
+              cd mfhdf
+              # edit CUSTOMIZE to use "gcc" as the CC compiler
+              # and add "-DCM5" to the CFLAGS variable.
+              ./configure
+              (cd libsrc; make )      # compile the library
+              # to install it in /usr/local/lib
+              cp libsrc/libnetcdf.a /usr/local/lib/libnetcdfcm5.a
+              ranlib /usr/local/lib/libnetcdfcm5.a
+           
+
+3. Changes in HDF utilities
+
+   hdp -- HDF dumper 
+      A new utility hdp is under development to list contents
+      of HDF files and to dump data of HDF objects. A
+      prototype is included in HDF4.0 Alpha for users to play
+      with and comment on. Development will continue based on
+      users' feedback. More information is contained in
+      HDF/HDF4.0.alpha/mfhdf/dumper/README. 
+
+   ristosds 
+      Ristosds now converts several raster images into a 3D
+      uint8, instead of float32, SDS. 
+
+   hdfls 
+      New options to recognize external elements. 
+
+   hdfpack 
+      New options to pack external elements back into the main
+      file. 
+
+   hdfunpac 
+      New utility program to unpack scientific datasets to
+      external elements. Can be used to prepare for CM5
+      parallel IO access. 
+
+4. HDF 4.0 Alpha has been tested on the following machines
+
+   Platform                'base library'              HDF/netCDF
+   ---------------------------------------------------------------
+   Sun4/SunOs                    X                         X
+   Sun4/SOLARIS                  X                         X
+   IBM/RS6000                    X                         X
+   SGI/IRIX4                     X                         X
+   Convex/ConvexOS *             X                         X
+   Cray Y-MP/UNICOS              X                         X
+   Cray/C90                      X                         X
+   NeXT/NeXTSTEP                 X                         X
+   HP/UX 9.01                    X                         X
+   DecStation/MIPSEL             X                         X
+   IBM PC - MSDOS               **                        ***
+   IBM PC - Windows 3.1         **                        ***
+   IBM PC - Windows NT           X                         X
+   DEC Alpha/OSF                 X                         X
+   CM5/                          X                         X
+
+   Fujitsu VP/UXPM               X
+   Intel i860                    X
+   Mac/MacOS 
+   VMS
+
+    * When compiling the mfhdf section of the library on a Convex3 you will
+      need to set the environment variable 'MACHINE' to 'c3' before running
+      the configure script.
+
+    ** There is no FORTRAN support for either PC version of HDF4.0 Alpha
+
+    *** The netCDF half of the HDF/netCDF merger is not working correctly,
+         but the multi-file SD interface is working correctly.
+
+5. Limits of the current release
+
+   Sometimes it is important for HDF users to be aware of
+   certain limits in using HDF files and HDF libraries. This
+   section is aimed at HDF applications programmers and
+   reflects upperbounds as of HDF 4.0. 
+
+   Limits that are #define'd are fully capitalized and the
+   file where the symbol is defined is given in parentheses at
+   the end of the sentence. If the #define's are changed in
+   order to meet the needs of an application, it is important
+   to make sure that all other users, who would share the HDF
+   library and the hdf files of the application, are aware of
+   the changes. 
+
+   If a limit has no #define, the size of the maximum storage
+   allocated for that item is given; it would, generally,
+   require a large amount of modification of the HDF library
+   to change. 
+
+   If a limit is listed as a number type (e.g. int16) then it
+   refers to the largest number that can be represented using
+   that type. That is: 
+
+           int16 -- 32,767
+           int32 -- 2,147,483,647.
+
+   H-Level Limits
+   --------------
+
+      MAX_FILE files open at a single time (hfile.h) 
+      MAX_ACC access records open at a single time (hfile.h) 
+      int16 total tags (fixed) 
+      int32 max length and offset of an element in an HDF file (fixed) 
+
+   Vgroup Limits
+   -------------
+      MAX_VFILE vset files open at a single time (hdf.h)
+      int16 elements in a Vgroup (fixed) 
+      VGNAMELENMAX max length of a Vgroup name or class (vg.h) 
+
+   Vdata Limits
+   ------------
+      MAX_VFILE vset files open at a single time (hdf.h)
+      VSFIELDMAX fields in a Vdata (hdf.h) 
+      FIELDNAMELENMAX characters in a single field name (hdf.h) 
+      MAX_ORDER max field order in a Vdata (hdf.h) 
+      VSNAMELENMAX max length of a Vdata name or class (hdf.h) 
+      int16 max width in bytes of a Vdata record. (fixed) 
+      Vdatas can have a maximum field width of MAX_FIELD_SIZE bytes. (hdf.h)
+           
+   Raster Images
+   -------------
+      int32 width or height of a raster image. (fixed) 
+
+   SD Limits
+   ---------
+      MAX_VAR_DIMS dimensions per dataset (defined in netcdf.h
+          included by mfhdf.h) 
+      int32 maximum dimension length (fixed) 
+      MAX_NC_ATTRS attributes for a given object (defined in netcdf.h 
+          included by mfhdf.h) 
+      MAX_NC_NAME maximum length of a name of a dataset 
+          (defined in netcdf.h included by mfhdf.h) 
+
+   Other Convensions / Issues
+   --------------------------
+      Some utility programs (e.g. ncgen) expect dataset names to be 
+      composed of only alphanumeric, '-' and '_' characters. 
+

Added: packages/libhdf4/branches/upstream/current/release_notes/RELEASE.txt
===================================================================
--- packages/libhdf4/branches/upstream/current/release_notes/RELEASE.txt	                        (rev 0)
+++ packages/libhdf4/branches/upstream/current/release_notes/RELEASE.txt	2007-05-15 09:53:05 UTC (rev 831)
@@ -0,0 +1,207 @@
+
+                          HDF 4.2 Release 1
+                            February, 2005
+
+INTRODUCTION
+
+This document describes the differences between HDF 4.2r0 and
+HDF 4.2r1.  It is written for people who are familiar with
+previous releases of HDF and wish to migrate to HDF 4.2r1.
+
+The HDF 4.2r1 documentation can be found on the NCSA ftp server 
+(ftp.ncsa.uiuc.edu) in the directory:
+
+     ftp://hdf.ncsa.uiuc.edu/HDF/Documentation/
+
+First-time HDF users are encouraged to read the FAQ in this
+release for more information about HDF.  Users can also look
+at the home page for HDF at:
+
+     http://hdf.ncsa.uiuc.edu/
+
+If you have any questions or comments, please send them to:
+
+     hdfhelp at ncsa.uiuc.edu
+
+CONTENTS
+
+- New Features and Changes
+  -- Configuration
+  -- Library
+  -- Utilities
+- Support for new platforms and compilers
+- Bugs fixed since HDF4.2r1
+- Documentation
+- Platforms Tested
+- Known problems
+
+New Features and Changes:
+========================
+    Configuration
+    ============= 
+     
+     * By default HDF4 libraries and utilities are installed under 
+       <source_dir>/NewHDF
+                                               12/01/2004 EIP
+     * Windows configuration, build and testing procedures have been changed. 
+       Please see INSTALL_WINDOWS.txt file for more information
+                                               02/12/2005 EIP 
+    Library
+    ========= 
+    * New API SDidtype was added to the library (bug #766)
+                                               01/23/2005 EIP for BMR
+    * HCgetcompress renamed to HCPgetcompress
+    * New API HCget_config_info added
+    * The default chunk cache size was changed for 2D and higher
+      chunks
+    * Pablo instumentation was removed
+   
+    Utilities
+    ========= 
+     * hdiff and hrepack are supported on Windows.
+     * Substantial performance improvements in hdiff and hrepack
+
+Support for new platforms and compilers
+=======================================
+     * Fortran IBM xlf v 8.1 and Absoft f95 version 8.2 compilers 
+       are supported on Mac OSX.
+                                                          12/07/2004 EIP
+     * Absoft Fortran compiler f95 version 9.0 is supported on Linux 2.4 
+                                                          12/07/2004 EIP
+     * PGI C and Fortran compilers are supported on Linux 2.4 
+     * Intel C and Fortran compilers are supported on Linux 2.4
+     * Cray TS IEEE is supported.
+
+
+Bugs fixed since HDF4.2r0
+=========================
+ * VERY IMPORTANT:
+   Data compressed with SZIP may be corrupted; fixed. For more
+   information see "HDF4.2r1 SZIP Release Notes" available at
+   http://hdf.ncsa.uiuc.edu/doc_resource/SZIP/SZIP_HDF4_2r1.pdf
+                                            02/12/2005 EIP 
+ * Fortran couldn't read names with spaces when NetCDF interfaces
+   were used; fixed
+                                            02/12/2005 EIP
+ * Library failed to compile in presence of the NetCDF library; fixed
+                                            11/22/2004 EIP
+ * h4fc couldn't create object files; fixed 
+
+                                            01/23/2005 EIP
+ * When rank of SDS is 0, some SD APIs give segmentation fault (bug 1045);
+   fixed
+                                            01/23/2005 EIP for BMR
+ * Some GR images with special elements are read in as duplicate
+   (bug 814); fixed
+                                            02/14/2005 BMR
+
+ * Many bugs fixed in hdiff and hrepack utilities
+
+Documentation
+==============
+   Documentation contains multiple bug fixes and improvements. 
+
+Platforms Tested
+================
+
+HDF 4.2 Release 1 has been tested on the following platforms:
+
+    AIX 5.1  (32 and 64-bit)      xlc 6.0.0.6
+                                  xlf 8.1.1.6
+    AIX 5.2  (32 and 64-bit)      xlc 6.0.0.8
+                                  xlf 8.1.1.7
+    Cray SV1 10.0.1.2             Cray Standard C Version 6.6.0.3.6
+                                  Cray Fortran: Version 3.6.0.3.1
+    Cray TS IEEE                  Cray Standard C Version 6.4.0.3
+                                  Cray Fortran: Version 3.4.0.0
+
+    FreeBSD 4.9                   gcc 2.95.4
+                                  GNU Fortran 0.5.25 
+    HP-UX B.11.00                 HP C  HP92453-01 A.11.01.20 
+                                  HP F90 v2.4
+                                  HP ANSI C++ B3910B A.03.13
+
+    IRIX64 6.5 (64 & n32)         MIPSpro cc 7.3.1.3m
+                                  F90 MIPSpro 7.3.1.3m 
+
+    Linux 2.4.20.28               gcc 2.96, GNU Fortran 0.5.25,
+                                  Absoft Fortran 9.0
+                                  Intel(R) C++ and Fortran Compilers 
+                                  Version 8.1
+    Linux 2.4.21-268-smp #1 SMP x86_64 (AMD)
+                                  gcc 3.3.1
+                                  GNU Fortran (GCC) 3.3.1
+                                  Intel(R) C++ and Fortran Compilers
+                                  Version 8.1
+                                  PGI C and Fortran Compilers Version 5.2-1
+    Linux 2.4.21-27.0.1.ELsmp #1 SMP
+                                  gcc 3.2.3
+                                  PGI C and Fortran Compilers Version 5.2-1 
+
+    Linux 2.4.21-sgi303rp05012313_10138 (Altix) 
+                                  Intel C++ and Intel Fortran Verison 8.1
+    
+    Linux 2.4.20-31.9smp_perfctr_lustre (IA-32)
+                                  Intel(R) C++ Version 8.0
+                                  Intel(R) Fortran Compiler Version 8.0
+    Linux 2.4.21.SuSE_241.bef1 (IA-64)
+                                  Intel(R) C++ Version 8.0
+                                  Intel(R) Fortran Compiler Version 8.0
+   
+    OSF1 V5.1                     Compaq C V6.5-303 
+				  HP Fortran V5.5A-3548
+                                  HP Fortran Compiler X5.5A-4085-48E1K
+
+    SunOS 5.7(32 and 64 bit)      WorkShop Compilers 5.0 98/12/15 C 5.0
+     (Solaris 2.7)                
+                                  WorkShop Compilers 5.0 99/09/16 FORTRAN 77 5.0 patch 107596-03
+                                  gcc 3.2.2
+                                  g77 GNU Fortran (GCC 3.2.2) 3.2.2 
+    SunOS 5.8(32 and 64 bit)      Sun WorkShop 6 update 2 C 5.3
+     (Solaris 2.8)                Sun WorkShop 6 update 2 Fortran 77 5.3 
+
+    SunOS 5.9 (32 and 64 bit)     Sun C 5.6 compiler, Sun Fortran 95 8.0
+
+    Windows 2000 (NT5.0)          MSVC++ 6.0
+                                  DEC Visual Fortran 6.0
+                                  Intel C and F90 compilers version 7.1
+    Windows XP                    MSVC++.NET, Intel Fortran 8.1 (static libraries only)
+    MAC OS X Darwin 7.7           gcc  3.3
+                                  IBM Fortran xlf 8.1
+                                  Absoft Fortran 8.2
+                                  
+                                  
+
+Known problems
+==============
+
+o  SZIP Library is not available for Crays SV1 and TS
+   Fortran APIs do not support SZIP compression.
+
+o SZIP compression cannot be used with GR interfaces. For more information
+  see "HDF4.2r1 SZIP Release Notes" available at 
+  http://hdf.ncsa.uiuc.edu/doc_resource/SZIP/SZIP_HDF4_2r1.pdf
+
+o  This release doesn't support VMS system.
+
+o  N-Bit compression is not supported with Fortran APIs.
+
+o  Using both fill-value and compression on SD datasets doesn't work.
+
+o  SDgetdimscale incorrectly returns FAIL and or returns incorrect data
+   when the associated SDS has the same name as the dimension.
+
+o  When using PGI compilers make sure that JPEG library is also compiled with 
+   PGI C compiler; linking with JPEG built with gcc causes JPEG library tests
+   to fail.  To bypass the problem
+
+       x Set LIBS flag to $PGI_JPEG_INSTALL_DIR/lib/libjpeg.a
+          where $PGI_JPEG_INSTALL_DIR points to the installtion directory
+          for the PGI-compiled JPEG library:
+
+          setenv LIBS $PGI_JPEG_INSTALL_DIR/lib/libjpeg.a
+
+       x Use  --with-jpeg=$PGI_JPEG_INSTALL_DIR
+         configure flag to configure with the PGI-compiled JPEG library:
+
+          ./configure --with-jpeg=$PGI_JPEG_INSTALL_DIR --with-zlib....

Modified: packages/libhdf4/branches/upstream/current/release_notes/bugs_fixed.txt
===================================================================
--- packages/libhdf4/branches/upstream/current/release_notes/bugs_fixed.txt	2007-05-15 09:05:29 UTC (rev 830)
+++ packages/libhdf4/branches/upstream/current/release_notes/bugs_fixed.txt	2007-05-15 09:53:05 UTC (rev 831)
@@ -1,4 +1,94 @@
+For bugs fixed in the current release see RELEASE.txt file
+For bugs fixed in all releases after HDF4.2r0-Beta see HISTORY.txt file.
 
+HDF4.2r0-Beta
+========
+1. "hdp dumpgr" and "hdp dumpsds" have two new options:
+        -g to suppress the data of global (or file) attributes
+        -l to suppress the data of local attributes
+
+2. The problem where hdp failed on very long file name has been
+   fixed. (bug #693)
+
+3. The problem where VSinquire failed when being called on a vdata
+   that has no fields defined, has been fixed. (bug #626)
+
+4. A user attempted to change the values of VGNAMELENMAX and VSNAMELENMAX
+   to 256 for her own use, but the hdp output showed that the change was
+   not in effect.  This problem is now fixed. (bug #606)
+
+5. hdp dumpvg failed sometimes when reading a file that has a vgroup 
+   being inserted into another.  This has been fixed. (bug #477)
+
+6. fp2hdf when used with -p option did the opposite of what it was supposed
+   to do with palette files. This problem is now fixed. (bug #800). However
+   the utility hdfimport should be used in the future instead of fp2hdf.
+
+7. hdf2gif failed when a user tried it on JPEG compressed images. (Bug #601).
+   The problem is now fixed. An error message is displayed if the image is not
+   8-bit. If the image is 24-bit, the message suggests using hdf2jpeg.
+
+8. ncdump failed to read NetCDF files 3.5 when there were more than one variable
+   with unlimited dimensions. Fixed.
+
+9. NetCDF part of the HDF4 Library was not ported to Compaq True64 system. Fixed.
+
+10. The hdp commands dumpsds, dumpgr, dumpvd, and dumpvg now display an 
+    informative message when a non-HDF file is given as input. (Bug #817)
+
+11. The compilation warnings and error on the macro HDFclose are fixed.
+    (Bug #818)
+
+HDF4.1r5
+========
+1. The following VS routines are added as requested (bug #267):
+     VSsetblocksize/vsfsetblsz -- sets the block size of the linked-block element.
+     VSsetnumblocks/vsfsetnmbl -- sets the number of blocks for 
+                                  a linked-block element.
+     VSgetblockinfo/vsfgetblinfo -- retrieves the block size and the 
+                                    number of blocks of a linked-block element.
+
+2. When using SDsetdimscale to set the data type for a dimension to 
+   an unsigned type, the type became signed inadvertently (bug #172).  
+   This problem is now fixed.
+
+3. The memory leak in the netCDF part of the HDF/mfhdf distribution
+   is fixed. (bug #418)
+
+4. When using "hdp dumpgr", data was being printed in the range of 0-250
+   when it should be 0-168 (bug #422).  This problem is now fixed.
+
+5. hdp dumpgr has a new option to print palette data only -pd.  Also,
+   whenever option -p or -pd is given, only palettes are printed, no 
+   images nor file attributes. (bug #439)
+
+6. The "#define NULL" was removed since ANSI C compilers are required to
+   define NULL. (bug #448)
+
+7. Giving NULL to the fieldname argument in VSsetfields now returns
+   FAIL instead of causing segmentation fault. (bug #554)
+
+8. Giving a NULL to the argument name in several name setting routines
+   now returns FAIL instead of causing segmentation fault. (bug #514)
+
+9. Two routines were added to get compression information for the SD and
+   GR interfaces, including chunked elements: SDgetcompress/sfgcompress 
+   and GRgetcompress/mggcompress. (bug #307)  
+   Note: 
+   - for a JPEG image, GRgetcompress only returns the compression type, not 
+     the compression information (i.e, quantity and force_baseline) because 
+     this information currently is not retrievable.
+   - getting compression type for JPEG chunked images is not working yet.
+
+10.  Added new fortran function heprntf (HEprint) that takes two
+     arguments: file name and level. If file name string has 0 length
+     error messages will be printed to the standard output. 
+
+11.  Fix the linking bug of unresolved symbol(error_top) DLL when HEclear 
+     was called by users. Users who want to use hdf DLL should define HDFAPDLL 
+     in their applications. Simply going to project setting and adding HDFAPDLL
+     as the predefined constant should work.
+
 HDF4.1r4
 ========
 1. Fixed GR JPEG compression problem.

Deleted: packages/libhdf4/branches/upstream/current/release_notes/compile.txt
===================================================================
--- packages/libhdf4/branches/upstream/current/release_notes/compile.txt	2007-05-15 09:05:29 UTC (rev 830)
+++ packages/libhdf4/branches/upstream/current/release_notes/compile.txt	2007-05-15 09:53:05 UTC (rev 831)
@@ -1,236 +0,0 @@
- 
-COMPILING A PROGRAM
-                  
-Following are instructions for compiling an application program on the 
-platforms supported by HDF, using the binaries that we provide.  For
-Unix, the information on options to specify comes from the configuration 
-files (mh-*) in the HDF source code (under ../HDF4.1r4/config).   
-
-In general, you compile your program as shown below.  If your platform is 
-not specified in the section, "INSTRUCTIONS FOR SPECIFIC PLATFORMS", then 
-use these instructions.  If you are unable to compile your program on Unix, 
-please check the configuration file for your platform for the correct 
-options.
-
-C:
-    cc -o <your program> <your program>.c -I<path for hdf include directory>\
-       -L<path for hdf libraries> -lmfhdf -ldf -ljpeg -lz
-
-   or
-
-    cc -o <your program> <your program>.c -I<path for hdf include directory> \
-          <path for libmfhdf.a>  <path for libdf.a> \
-          <path for libjpeg.a> <path for libz.a>
-
-FORTRAN:
-    f77 -o <your program> <your program>.f  \
-        -L<path for hdf libraries> -lmfhdf -ldf -ljpeg -lz
-   
-   or
-   
-    f77 -o <your program> <your program>.f  \
-          <path for libmfhdf.a>  <path for libdf.a> \
-          <path for libjpeg.a> <path for libz.a>
-
-NOTE: The order of the libraries is important: libmfhdf.a first,
-followed by libdf.a, then libjpeg.a and libz.a.  The libjpeg.a
-library is optional.
-
-INSTRUCTIONS FOR SPECIFIC PLATFORMS
-===================================
-
-Cray:
-----
-C:
-    cc  -O -s -o <your program> <your program>.c \  
-        -I<path for hdf include directory> \
-        -L<path for hdf libraries> -lmfhdf -ldf -ljpeg -lz
-
-FORTRAN:
-    f90 -O 1 -o <your program> <your program>.f  \
-         -L<path for hdf libraries> -lmfhdf -ldf -ljpeg -lz
-
-Dec Alpha/Digital Unix:
-----------------------
-C:
-    cc -Olimit 2048 -std1 -o <your program> <your program>.c \
-       -I<path for hdf include directory>\
-       -L<path for hdf libraries> -lmfhdf -ldf -ljpeg -lz
-
-FORTRAN:
-    f77 -o <your program> <your program>.f  \
-        -L<path for hdf libraries> -lmfhdf -ldf -ljpeg -lz
- 
-Dec Alpha/OpenVMS AXP:
----------------------
-   To compile your programs, prog.c and prog1.for, with the HDF library, 
-   mfhdf.olb, df.olb, and libz.olb are required.  The libjpeg.olb library 
-   is optional.
-
-   cc/opt/nodebug/define=(HDF,VMS)/nolist/include=<dir for include> prog.c
-   fort prog1.for
-   link/nodebug/notraceback/exec=prog.exe  prog.obj, prog1.obj, -
-         <dir for lib>mfhdf/lib -
-         <dir for lib>df/lib, <dir for lib>libjpeg/lib,  -
-         <dir for lib>libz/lib, sys$library:vaxcrtl/lib
-
-   NOTE: The order of the libraries is important: mfhdf.olb first,
-   followed by df.olb then libjpeg.olb and libz.olb.
-
-Exemplar:
---------
-C:
-    cc -ext -nv -no <your program> <your program>.c \
-       -I<path for hdf include directory> \
-       -L<path for hdf libraries> -lmfhdf -ldf -ljpeg -lz
-
-FORTRAN:
-    fc  -sfc -72 -o <your program> <your program>.f  \
-        -L<path for hdf libraries> -lmfhdf -ldf -ljpeg -lz
-
-   NOTE: These instructions are for Convex/HP Exemplar machines running
-   versions of the OS ealier than 10.x.  For machines running version
-   10.x of HP-UX, follow the instructions for HP-UX 10.2.
-
-FreeBSD:
--------
-C:
-    cc -ansi -Wall -pedantic -o <your program> <your program>.c \  
-        -I<path for hdf include directory> \
-        -L<path for hdf libraries> -lmfhdf -ldf -ljpeg -lz
-
-FORTRAN:
-    f77 -O -o <your program> <your program>.f  \
-        -L<path for hdf libraries> -lmfhdf -ldf -ljpeg -lz
-
- 
-HP-UX:
------
-C:
-    cc -Ae -s -o <your program> <your program>.c \
-       -I<path for hdf include directory> \
-       -L<path for hdf libraries> -lmfhdf -ldf -ljpeg -lz
-
-FORTRAN:
-    f77 -s -o <your program> <your program>.f  \
-        -L<path for hdf libraries> -lmfhdf -ldf -ljpeg -lz
- 
-
-IRIX 6.x:
---------
-C:
-    cc -ansi -n32 -mips3 -O -s -o <your program> <your program>.c  \
-       -I<path for hdf include directory>\
-       -L<path for hdf libraries> -lmfhdf -ldf -ljpeg -lz
-
-FORTRAN:
-    f90 -n32 -mips3 -O -s -o <your program> <your program>.f  \
-        -L<path for hdf libraries> -lmfhdf -ldf -ljpeg -lz
-
-IRIX64 with 64-bit mode:
-------------------------
-C:
-    cc -ansi -64 -mips4 -O -s -o <your program> <your program>.c  \
-       -I<path for hdf include directory>\
-       -L<path for hdf libraries> -lmfhdf -ldf -ljpeg -lz
-
-FORTRAN:
-    f77 -64 -mips4 -O -s -o <your program> <your program>.f  \
-        -L<path for hdf libraries> -lmfhdf -ldf -ljpeg -lz
-
-  
-IRIX64 with n32-bit mode:
--------------------------
-C:
-    cc -ansi -n32 -mips4 -O -s -o <your program> <your program>.c \
-     -I<path for hdf include directory> \
-     -L<path for hdf libraries> -lmfhdf -ldf -ljpeg -lz
-
-FORTRAN:
-    f77 -n32 -mips4 -O -s -o <your program> <your program>.f  \
-        -L<path for hdf libraries> -lmfhdf -ldf -ljpeg -lz
-
-Linux:
------
-C:
-    gcc -ansi -D_BSD_SOURCE -o <your program> <your program>.c \  
-        -I<path for hdf include directory> \
-        -L<path for hdf libraries> -lmfhdf -ldf -ljpeg -lz
-
-FORTRAN:
-    g77 -o <your program> <your program>.f  \
-        -L<path for hdf libraries> -lmfhdf -ldf -ljpeg -lz
-
-Solaris:
--------
-   The -lnsl is necessary in order to include the xdr library.
-
-C:
-    cc -Xc -xO2 -o <your program> <your program>.c  \
-       -I<path for hdf include directory>\
-       -L<path for hdf libraries> -lmfhdf -ldf -ljpeg -lz \
-       -L/usr/lib -lnsl
-
-FORTRAN:
-    f77 -O -o <your program> <your program>.f  \
-        -L<path for hdf libraries> -lmfhdf -ldf -ljpeg -lz \
-        -L/usr/lib -lnsl
-
-Solaris_x86 (C only):
---------------------
-    The -lnsl is necessary in order to include the xdr library.
-
-    gcc -ansi -O -o <your program> <your program>.c \
-        -I<path for hdf include directory> \
-        -L<path for hdf libraries> -lmfhdf -ldf -ljpeg -lz  \
-        -L/usr/lib -lnsl
-
-SP:
----
-C:
-    xlc -qlanglvl=ansi -O -o <your program> <your program>.c \
-        -I<path for hdf include directory> \
-        -L<path for hdf libraries> -lmfhdf -ldf -ljpeg -lz
-
-FORTRAN:
-    f77 -O -o <your program> <your program>.f  \
-        -L<path for hdf libraries> -lmfhdf -ldf -ljpeg -lz
-
-
-T3E:
----
-C:
-    
-    cc -X m -s -o <your program> <your program>.c \
-       -I<path for hdf include directory>\
-       -L<path for hdf libraries> -lmfhdf -ldf -ljpeg -lz
-
-FORTRAN:
-    f90 -X m -Wl"-Dpermok=yes" -Wl"-s" -o <your program> <your program>.f  \
-        -L<path for hdf libraries> -lmfhdf -ldf -ljpeg -lz
-
-
-Windows NT/98/2000:
-------------------
-Using Microsoft Visual C++ version 6.x:
-
-Under Tools->Options, select the folder, Directories:
-   Under "Show directories for", select "Include files".
-   Add the following directories:
-      C:<path to HDF includes>\INCLUDE  
-
-Under "Show directories for", select "Library files":
-   Add the following directories:
-      C:<path to HDF libs>\LIB        
-
-Under Project->Settings, select folder, Link:
-   Add the following libraries to the beginning of the list of
-   Object/Library Modules:
-         hd414.lib hm414.lib (single-threaded release version)
-         hd414d.lib hm414d.lib (single-threaded debug version)
-
-         hd414m.lib hm414m.lib (multi-threaded release version)
-         hd414md.lib hm414md.lib (multi-threaded debug version)
-
-
-

Added: packages/libhdf4/branches/upstream/current/release_notes/misc_docs.txt
===================================================================
--- packages/libhdf4/branches/upstream/current/release_notes/misc_docs.txt	                        (rev 0)
+++ packages/libhdf4/branches/upstream/current/release_notes/misc_docs.txt	2007-05-15 09:53:05 UTC (rev 831)
@@ -0,0 +1,3525 @@
+
+This file was created for the HDF4.2r0. release to store the documents
+that were in the release_notes directory of the main HDF4 source tree
+since the 4.0.alpha release. See also HISTORY.txt file for more information.
+
+File contains the following *.txt files:
+
+
+Fortran_APIs.txt
+JPEG.txt
+Pablo.txt
+comp_SDS.txt
+compile.txt
+compression.txt
+dimval.txt
+external_path.txt
+hdp.txt
+install_winNT.txt
+macintosh.txt
+mf_anno.txt
+mf_ris.txt
+new_functions.txt
+page_buf.txt
+sd_chunk_examples.txt
+vattr.txt
+windows.txt
+
+To search for a particular document use "filename.txt=" string, for example 
+to seach for the beginning of the new_functions.txt file,
+use "new_functions.txt=" string
+
+================================Fortran_APIs.txt============================
+
+Problem:
+========
+
+In HDF4.0r1 and previous versions of HDF several Fortran 
+routines declared a formal parameter as character*(*) or 
+integer while the actual parameter was a character or 
+a numeric type. This caused problems on some systems, 
+such as VMS and T3D. 
+
+With HDF 4.0r2 and later releases, these routines have either 
+been replaced by 2 routines, one for character type parameters 
+and another for numeric type parameters; or, a new routine has 
+been added for char type parameters and the old routine is used 
+for numeric type parameters only. Those routines that were replaced 
+by two routines should be phased out in the future. However, in 
+order to not break currently working applications they are 
+still supported. New applications should use the new routines. 
+
+Routines and parameters affected:
+================================
+1. Write vdata
+
+Old:
+    vsfwrit(vsid, databuf, n_rec, interlace)
+        character*(*) databuf
+
+HDF4.0r2:
+    
+    Write to a vdata from a character buffer:
+      vsfwrtc(vsid, cbuf, n_rec, interlace) 
+           character*(*) cbuf
+    Write to a vdata from an integer buffer (for numeric values):
+      vsfwrt(vsid, buf, n_rec, interlace)  
+           integer  buf
+
+2. Read vdata
+ 
+Old:
+    vsfread(vsid, buf, n_recs, interlace)
+         character*(*) buf
+HDF4.0r2:
+    Read records into a character buffer:
+      vsfrdc(vsid, cbuf, n_recs, interlace)
+          character*(*) cbuf
+    Read records into an integer buffer (for numeric values):
+      vsfrd(vsid, buf, n_recs, interlace)
+          integer buf
+
+3. High level function for creating a single field single
+   component vdata
+ 
+Old:
+    vhfsd(f, field, buf, n, dtype, vsname, vsclass)
+         integer buf
+HDF4.0r2:
+    Store a simple character dataset in a vdata:
+      vhfscd(f,field,cbuf,n,dtype,vsname,vsclass)
+         character*(*) cbuf
+    Store a simple numeric dataset in a vdata
+      vhfsd(f, field, buf, n, dtype, vsname, vsclass)
+         integer buf
+
+4. High level function for creating a single field multi-
+   component vdata
+Old:
+    vhfsdm (f,field,buf,n,dtype,vsname,vsclass,order)
+         integer buf
+HDF4.0r2:
+    Store an aggregate char dataset in a vadata:      
+      vhfscdm (f,field,cbuf,n,dtype,vsname,vsclass,order)
+         character*(*) cbuf
+    Store a simple numeric dataset in a vdata
+      vhfsdm(f,field,buf,n,dtype,vsname,vsclass,order)
+         integer buf
+
+5. Write GR image
+Old:
+    mgwrimg(riid, start,stride,count,data)
+      <valid numeric type> data
+HDF4.0r2:
+    Write character type image data
+     mgwcimg(riid, start, stride, count, cdata)
+         character*(*)  cdata
+    Write numeric type image data
+      mgwrimg(riid, start,stride,count,data)
+      <valid numeric type> data
+
+6. Read GR image
+Old:
+    mgrdimg(riid,start,stride,count,data)
+      integer data
+HDF4.0r2:
+    Read character type image data
+      mgrcimg(riid,start,stride,count,cdata)
+          character*(*) cdata
+    Read numeric type image data
+      mgrdimg(riid,start,stride,count,data)
+          <valid numeric type> data
+
+7. Write LUT
+Old:
+    mgwrlut(lutid,ncomp,data_type,interlace,nentries,data)
+      <valid numeric type> data
+HDF4.0r2:
+    Write character type palette:
+      mgwclut(lutid,ncomp,data_type,interlace,nentries,cdata)
+          character*(*) cdata
+    Write numeric type palette:
+      mgwrlut(lutid,ncomp,data_type,interlace,nentries,data)
+          <valid numeric type> data
+
+8. Read LUT
+Old:
+    mgrdlut(lutid, data)
+      <valid numeric type> data
+HDF4.0r2:
+    Read char type palette:
+      mgrclut(lutid,cdata)
+        character*(*) cdata
+    Read numeric type palette:
+      mgrdlut(lutid, data) 
+        <valid numeric type> data
+
+9. Set GR attribute
+Old:
+    mgsattr(riid, name, nt, count, data)
+      character*(*) data
+HDF4.0r2:
+    Add char type attribute to a raster image
+      mgscatt(riid, name, nt, count, cdata)
+        character*(*) cdata
+    Add a numeric attribute to a raster image
+      mgsnatt(riid, name, nt, count, data)
+        integer data
+
+10. Get GR attribute
+Old:
+    mggattr(riid, index, data)
+      <valid numeric type> data
+HDF4.0r2:
+    Get a char type attribute:
+      mggcatt(riid, index, cdata)
+        character*(*) cdata
+    Get a numeric type attribute:
+      mggnatt(riid, index, data)
+        integer data
+
+11. Write SDS data
+Old:
+    sfwdata(sdsid,start,stride,end,values)
+      <valid numeric type> values
+HDF4.0r2
+    Write char type SDS data
+      sfwcdata(sdsid,start,stride,end,cvalues)
+        character*(*) cvalues
+    Write numeric type SDS data
+      sfwdata(sdsid,start,stride,end,values)
+        <valid numeric type> values
+
+12. Read SDS data
+Old:
+    sfrdata(sdsid,start,stride,end,values)
+      <valid numeric type> values
+HDF4.0r2
+    Read char type SDS data
+      sfrcdata(sdsid,start,stride,end,cvalues)
+        character*(*) cvalues
+    Read numeric type SDS data
+      sfrdata(sdsid,start,stride,end,values)
+        <valid numeric type> values
+
+13. Add an attribute to an object in SD interface
+Old:
+    sfsattr(id, name, nt, count, data)
+      character*(*) data
+HDF4.0r2
+    Add a char type attribute to an object
+      sfscatt(id, name, nt, count, cdata)
+        character*(*) cdata
+    Add a numeric type attribute to an object
+      sfsnatt(id, name,nt, count,data)
+        integer data
+
+14. Get contents of an attribute
+Old:
+    sfrattr(id, index, buf)
+      <valid numeric type> buf
+HDF4.0r2:
+    Get a char type attribute
+      sfrcatt(id, index, cbuf)
+        character*(*) cbuf
+    Get a numeric type attribute
+      sfrnatt(id, index, buf)
+        <valid numeric type> buf   
+
+15. Set fill value
+Old:
+    sfsfill(id, val)
+      <valid numeric type> val
+HDF4.0r2
+    Set a char type fill value
+      sfscfill(id, cval)
+        character cval
+    Set a numeric type fill value
+      sfsfill(id, val)
+        <valid numeric type> val
+
+16. Get fill value
+Old:
+    sfgfill(id, val)
+      <valid numeric type> val
+HDF4.0r2
+    Get char type fill value
+      sfgcfill(id, cval)
+        character cval
+    Get numeric type fill value
+      sfgfill(id, val)
+        <valid numeric type> val
+
+
+============================================================================
+================================JPEG.txt====================================
+
+Independant JPEG Group library
+    Version 4.1b of the HDF-netCDF library uses v6a of the Independent
+JPEG Group (IJG) JPEG file access library.  For most users of the HDF library,
+this will be completely transparent.  For users who are integrating the HDF
+library into an existing application which uses the IJG's JPEG library, linking
+with the HDF library is now much simpler and should be completely painless.
+The JPEG library will need to be linked with user's applications when raster
+images are being used (whether they are compressed with JPEG or not).
+
+     cc -o <myprog> myprog.c -I<include path> <path for libmfhdf.a> \
+           <path for libdf.a> <path for libjpeg.a>
+
+     Note: order of the libraries is important, the mfhdf library must be first
+and be followed by the hdf library.
+============================================================================
+================================Pablo.txt===================================
+
+
+Pablo Instrumentation of HDF
+===========================
+    This version of the distribution has support to create an instrumented 
+    version of the HDF library(libdf-inst.a). This library along with
+    the Pablo performance data capture libraries can be used to gather data
+    about I/O behavior and procedure execution times.  
+
+    More detailed documentation on how to use the instrumented version of
+    the HDF library with Pablo can be found in the Pablo directory 
+    '$(toplevel)/hdf/pablo'. 
+     See the provided '$(toplevel)/hdf/pablo/README.Pablo'
+     and the Postscript file '$(toplevel)/hdf/pablo/Pablo.ps'.
+
+    At this time only an instrumented version of the core HDF library libdf.a 
+    can be created. Future versions will have support for the SDxx interface
+    found in libmfhdf.a. Current interfaces supported are ANxx, GRxx, DFSDxx,
+    DFANxx, DFPxx, DFR8xx, DF24xx, Hxx, Vxx, and VSxx.
+
+    To enable the creation of an instrumented library the following section
+    in the makefile fragment($(toplevel)/config/mh-<os>) must be uncommented 
+    and set.
+
+    # ------------ Macros for Pablo Instrumentation  --------------------
+    # Uncomment the following lines to create a Pablo Instrumentation
+    # version of the HDF core library called 'libdf-inst.a'
+    # See the documentation in the directory 'hdf/pablo' for further 
+    # information about Pablo and what platforms it is supported on
+    # before enabling. 
+    # You need to set 'PABLO_INCLUDE' to the Pablo distribution 
+    # include directory to get the files 'IOTrace.h' and 'IOTrace_SD.h'.
+    #PABLO_FLAGS  = -DHAVE_PABLO
+    #PABLO_INCLUDE = -I/hdf2/Pablo/Instrument.HP/include
+
+    After setting these values you must re-run the top-level 'configure' script.
+    Make sure that your start from a clean re-build(i.e. 'make clean') after
+    re-running the toplevel 'configure' script and then run 'make'.
+    Details on running configure can be found in the section
+    'General Configuration/Installation - Unix' found in the top-level 
+    installation file '$(toplevel)/INSTALL'.
+============================================================================
+================================comp_SDS.txt================================
+
+Limitations of compressed SDS datasets
+    Due to certain limitations in the way compressed datasets are stored, data
+which has been compressed is not completely writable in ways that uncompressed
+datasets are.  The "rules" for writing to a compressed dataset are as follows:
+
+    (1) Write an entire dataset that is to be compressed.  I.e. build the
+        dataset entirely in memory, then write it out with a single call.
+ 
+    (2) Append to a compressed dataset.  I.e. write to a compressed dataset
+        that has already been written out by adding to the unlimited
+        dimension for that dataset.
+ 
+    (3) For users of HDF 4.1, write to any subset of a compressed dataset
+        that is also chunked.
+
+    Generally speaking, these mean that it is impossible to overwrite existing
+compressed data which is not stored in "chunked" form.  This is due to 
+compression algorithms not being suitable for "local" modifications in a
+compressed datastream.  Please send questions about compression to the
+general HDF support e-mail address:  hdfhelp at ncsa.uiuc.edu
+
+Compression for HDF SDS
+The SDsetcompress and SDsetnbitdataset functions are used as
+higher-level routines to access the HCcreate function (HCcreate is described
+in the reference manual).  SDsetnbitdataset allows for the storage of 1-32 bit 
+integer values (instead of being restricted to 8, 16 or 32-bit sizes) in a
+scientific dataset. SDsetcompress can be used to compress a scientific dataset
+through the SD interface instead of dropping down to the lower-level H
+interface.
+
+N-bit SDS using SDsetnbitdataset:
+
+    The interface to SDsetnbitdataset is described below:
+
+    intn SDsetnbitdataset(sds_id,start_bit,bit_len,sign_ext,fill_one); 
+
+    int32 sds_id - The id of a scientific dataset returned from SDcreate or
+        SDselect.
+        
+    intn start_bit - This value determines the bit position of the highest end
+        of the n-bit data to write out. Bits in all number-types are counted
+        from the right starting with 0. For example, in the following bit data,
+        "01111011", bits 2 and 7 are set to 0 and all the other bits are set to
+        one. 
+
+    intn bit_len - The number of bits in the n-bit data to write, including the
+        starting bit, counting towards the right (i.e. lower bit numbers). For
+        example, starting at bit 5 and writing 4 bits from the following bit
+        data, "01111011", would write out the bit data, "1110", to the dataset
+        on disk. 
+
+    intn sign_ext - Whether to use the top bit of the n-bit data to sign-extend
+        to the highest bit in the memory representation of the data. For
+        example, if 9-bit signed integer data is being extracted from bits
+        17-25 (nt=DFNT_INT32, start_bit=25, bit_len=9, see below for full
+        information about start_bit & bit_len parameters) and the bit in
+        position 25 is a 1, then when the data is read back in from the disk,
+        bits 26-31 will be set to a 1, otherwise bit 25 will be a zero and bits
+        26-31 will be set to 0. This bit-filling takes higher precedence (i.e.
+        is performed after) the fill_one (see below) bit-filling. 
+
+    intn fill_one - Whether to fill the "background" bits with 1's or 0's.
+        The "background" bits of a n-bit dataset are those bits in the
+        in-memory representation which fall outside of the actual n-bit field
+        stored on disk. For example, if 5 bits of an unsigned 16-bit integer
+        (in-memory) dataset located in bits 5-9 are written to disk with the
+        fill_one parameter set to TRUE (or 1), then when the data is read back
+        into memory at a future time, bits 0-4 and 10-15 would be set to 1. If
+        the same 5-bit data was written with a fill_one value of FALSE (or 0),
+        then bits 0-4 and 10-15 would be set to 0.  This setting has a lower
+        precedence (i.e. is performed first) than the sign_ext setting. For
+        example, using the sign_ext example above, bits 0-16 and 26-31 will
+        first be set to either 1 or 0 based on the fill_one parameter, and then
+        bits 26-31 will be set to 1 or 0 based on bit-25's value. 
+    
+    RETURNS - SUCCEED (0) or FAIL (-1) for success/failure.
+
+    The corresponding FORTRAN function name is sfsnbit which takes the
+    same parameters in the same order.
+
+    For example, to store an unsigned 12-bit integer (which is represented
+    unpacked in memory as an unsigned 16-bit integer), with no sign extension
+    or bit filling and which starts at bit 14 (counting from the right with bit
+    zero being the lowest) the following setup & call would be appropriate: 
+
+    intn sign_ext = FALSE; 
+    intn fill_one = FALSE; 
+    intn start_bit= 14; 
+    intn bit_len = 12; 
+    SDsetnbitdataset(sds_id,start_bit,bit_len,sign_ext,fill_one); 
+
+    Further reads and writes to this dataset would transparently convert the
+    16-bit unsigned integers from memory into 12-bit unsigned integers stored
+    on disk.
+
+    More details about this function can be found in the HDF library reference
+    manual.
+
+Compressed SDS data using SDsetcompress:
+
+        The SDsetcompress function call contains a subset of the parameters to
+the HCcreate function call described in compression.txt and performs the same
+types of compression.
+
+    The interface to SDsetcompress is described below:
+
+    intn SDsetcompress(sds_id,comp_type,c_info);
+
+    int32 sds_id - The id of a scientific dataset returned from SDcreate or
+        SDselect.
+
+    int32 comp_type - The type of compression to encode the dataset with.
+        The values are the same as for HCcreate:
+            COMP_CODE_NONE - for no compression
+            COMP_CODE_RLE - for RLE encoding
+            COMP_CODE_SKPHUFF - for adaptive Huffman
+            COMP_CODE_DEFLATE - for gzip 'deflation'
+
+    comp_info *c_info - Information needed for the encoding type chosen.
+        For COMP_CODE_NONE and COMP_CODE_RLE, this is unused and can be set to
+        NULL.  For COMP_CODE_SKPHUFF, the structure skphuff in this union needs
+        information about the size of the data elements in bytes (see example
+        below).  For COMP_CODE_DEFLATE, the structure deflate in this union
+        need information about "effort" to try to compress with (see example
+        below).  For more information about the types of compression 
+        see the compression.txt document in this directory.
+
+    RETURNS - SUCCEED (0) or FAIL (-1) for success/failure.
+
+    Similarly to the HCcreate function, SDsetcompress can be used to create
+    compressed dataset or to compress existing ones.
+
+    For example, to compress unsigned 16-bit integer data using the adaptive
+    Huffman algorithm, the following setup and call would be used:
+
+    comp_info c_info;
+    c_info.skphuff.skp_size=sizeof(uint16);
+    SDsetcompress(sds_id,COMP_CODE_SKPHUFF,&c_info);
+
+    Further reads and writes to this dataset would transparently convert the
+    16-bit unsigned integers from memory into a compressed representation on
+    disk.
+
+    For example, to compress a dataset using the gzip deflation algorithm, with
+    the maximum effort to compress the data, the following setup and call would
+    be used:
+
+    comp_info c_info;
+    c_info.deflate.level=9;
+    SDsetcompress(sds_id,COMP_CODE_DEFLATE,&c_info);
+
+    Currently, SDsetcompress is limited to creating new datasets or appending
+    new slices/slabs onto existing datasets.  Overwriting existing data in a
+    dataset will be supported at some point in the future.
+
+    More details about this function can be found in the HDF library reference
+    manual.
+
+============================================================================
+================================compile.txt=================================
+
+ 
+COMPILING A PROGRAM
+                  
+Following are instructions for compiling an application program on the 
+platforms supported by HDF, using the binaries that we provide.  For
+Unix, the information on options to specify comes from the configuration 
+files (mh-*) in the HDF source code (under ../HDF4.1r5/config).   
+
+In general, you compile your program as shown below.  If your platform is 
+not specified in the section, "INSTRUCTIONS FOR SPECIFIC PLATFORMS", then 
+use these instructions.  If you are unable to compile your program on Unix, 
+please check the configuration file for your platform for the correct 
+options.
+
+C:
+    cc -o <your program> <your program>.c -I<path for hdf include directory>\
+       -L<path for hdf libraries> -lmfhdf -ldf -ljpeg -lz
+
+   or
+
+    cc -o <your program> <your program>.c -I<path for hdf include directory> \
+          <path for libmfhdf.a>  <path for libdf.a> \
+          <path for libjpeg.a> <path for libz.a>
+
+FORTRAN:
+    f77 -o <your program> <your program>.f  \
+        -L<path for hdf libraries> -lmfhdf -ldf -ljpeg -lz
+   
+   or
+   
+    f77 -o <your program> <your program>.f  \
+          <path for libmfhdf.a>  <path for libdf.a> \
+          <path for libjpeg.a> <path for libz.a>
+
+NOTE: The order of the libraries is important: libmfhdf.a first,
+followed by libdf.a, then libjpeg.a and libz.a.  The libjpeg.a
+library is optional.
+
+INSTRUCTIONS FOR SPECIFIC PLATFORMS
+===================================
+
+Cray:
+----
+C:
+    cc  -O -s -o <your program> <your program>.c \  
+        -I<path for hdf include directory> \
+        -L<path for hdf libraries> -lmfhdf -ldf -ljpeg -lz
+
+FORTRAN:
+    f90 -O 1 -o <your program> <your program>.f  \
+         -L<path for hdf libraries> -lmfhdf -ldf -ljpeg -lz
+
+Dec Alpha/Digital Unix:
+----------------------
+C:
+    cc -Olimit 2048 -std1 -o <your program> <your program>.c \
+       -I<path for hdf include directory>\
+       -L<path for hdf libraries> -lmfhdf -ldf -ljpeg -lz
+
+FORTRAN:
+    f77 -o <your program> <your program>.f  \
+        -L<path for hdf libraries> -lmfhdf -ldf -ljpeg -lz
+ 
+Dec Alpha/OpenVMS AXP:
+---------------------
+   To compile your programs, prog.c and prog1.for, with the HDF library, 
+   mfhdf.olb, df.olb, and libz.olb are required.  The libjpeg.olb library 
+   is optional.
+
+   cc/opt/nodebug/define=(HDF,VMS)/nolist/include=<dir for include> prog.c
+   fort prog1.for
+   link/nodebug/notraceback/exec=prog.exe  prog.obj, prog1.obj, -
+         <dir for lib>mfhdf/lib -
+         <dir for lib>df/lib, <dir for lib>libjpeg/lib,  -
+         <dir for lib>libz/lib, sys$library:vaxcrtl/lib
+
+   NOTE: The order of the libraries is important: mfhdf.olb first,
+   followed by df.olb then libjpeg.olb and libz.olb.
+
+Exemplar:
+--------
+C:
+    cc -ext -nv -no <your program> <your program>.c \
+       -I<path for hdf include directory> \
+       -L<path for hdf libraries> -lmfhdf -ldf -ljpeg -lz
+
+FORTRAN:
+    fc  -sfc -72 -o <your program> <your program>.f  \
+        -L<path for hdf libraries> -lmfhdf -ldf -ljpeg -lz
+
+   NOTE: These instructions are for Convex/HP Exemplar machines running
+   versions of the OS ealier than 10.x.  For machines running version
+   10.x of HP-UX, follow the instructions for HP-UX 10.2.
+
+FreeBSD:
+-------
+C:
+    cc -ansi -Wall -pedantic -o <your program> <your program>.c \  
+        -I<path for hdf include directory> \
+        -L<path for hdf libraries> -lmfhdf -ldf -ljpeg -lz
+
+FORTRAN:
+    f77 -O -o <your program> <your program>.f  \
+        -L<path for hdf libraries> -lmfhdf -ldf -ljpeg -lz
+
+ 
+HP-UX:
+-----
+C:
+    cc -Ae -s -o <your program> <your program>.c \
+       -I<path for hdf include directory> \
+       -L<path for hdf libraries> -lmfhdf -ldf -ljpeg -lz
+
+FORTRAN:
+    f77 -s -o <your program> <your program>.f  \
+        -L<path for hdf libraries> -lmfhdf -ldf -ljpeg -lz
+ 
+
+IRIX 6.x:
+--------
+C:
+    cc -ansi -n32 -mips3 -O -s -o <your program> <your program>.c  \
+       -I<path for hdf include directory>\
+       -L<path for hdf libraries> -lmfhdf -ldf -ljpeg -lz
+
+FORTRAN:
+    f90 -n32 -mips3 -O -s -o <your program> <your program>.f  \
+        -L<path for hdf libraries> -lmfhdf -ldf -ljpeg -lz
+
+IRIX64 with 64-bit mode:
+------------------------
+C:
+    cc -ansi -64 -mips4 -O -s -o <your program> <your program>.c  \
+       -I<path for hdf include directory>\
+       -L<path for hdf libraries> -lmfhdf -ldf -ljpeg -lz
+
+FORTRAN:
+    f77 -64 -mips4 -O -s -o <your program> <your program>.f  \
+        -L<path for hdf libraries> -lmfhdf -ldf -ljpeg -lz
+
+  
+IRIX64 with n32-bit mode:
+-------------------------
+C:
+    cc -ansi -n32 -mips4 -O -s -o <your program> <your program>.c \
+     -I<path for hdf include directory> \
+     -L<path for hdf libraries> -lmfhdf -ldf -ljpeg -lz
+
+FORTRAN:
+    f77 -n32 -mips4 -O -s -o <your program> <your program>.f  \
+        -L<path for hdf libraries> -lmfhdf -ldf -ljpeg -lz
+
+Linux:
+-----
+C:
+    gcc -ansi -D_BSD_SOURCE -o <your program> <your program>.c \  
+        -I<path for hdf include directory> \
+        -L<path for hdf libraries> -lmfhdf -ldf -ljpeg -lz
+
+FORTRAN:
+    g77 -o <your program> <your program>.f  \
+        -L<path for hdf libraries> -lmfhdf -ldf -ljpeg -lz
+
+Solaris:
+-------
+   The -lnsl is necessary in order to include the xdr library.
+
+C:
+    cc -Xc -xO2 -o <your program> <your program>.c  \
+       -I<path for hdf include directory>\
+       -L<path for hdf libraries> -lmfhdf -ldf -ljpeg -lz \
+       -L/usr/lib -lnsl
+
+FORTRAN:
+    f77 -O -o <your program> <your program>.f  \
+        -L<path for hdf libraries> -lmfhdf -ldf -ljpeg -lz \
+        -L/usr/lib -lnsl
+
+Solaris_x86 (C only):
+--------------------
+    The -lnsl is necessary in order to include the xdr library.
+
+    gcc -ansi -O -o <your program> <your program>.c \
+        -I<path for hdf include directory> \
+        -L<path for hdf libraries> -lmfhdf -ldf -ljpeg -lz  \
+        -L/usr/lib -lnsl
+
+SP:
+---
+C:
+    xlc -qlanglvl=ansi -O -o <your program> <your program>.c \
+        -I<path for hdf include directory> \
+        -L<path for hdf libraries> -lmfhdf -ldf -ljpeg -lz
+
+FORTRAN:
+    f77 -O -o <your program> <your program>.f  \
+        -L<path for hdf libraries> -lmfhdf -ldf -ljpeg -lz
+
+
+T3E:
+---
+C:
+    
+    cc -X m -s -o <your program> <your program>.c \
+       -I<path for hdf include directory>\
+       -L<path for hdf libraries> -lmfhdf -ldf -ljpeg -lz
+
+FORTRAN:
+    f90 -X m -Wl"-Dpermok=yes" -Wl"-s" -o <your program> <your program>.f  \
+        -L<path for hdf libraries> -lmfhdf -ldf -ljpeg -lz
+
+
+Windows NT/98/2000:
+------------------
+Using Microsoft Visual C++ version 6.x:
+
+Under Tools->Options, select the folder, Directories:
+   Under "Show directories for", select "Include files".
+   Add the following directories:
+      C:<path to HDF includes>\INCLUDE  
+
+Under "Show directories for", select "Library files":
+   Add the following directories:
+      C:<path to HDF libs>\LIB        
+
+Under Project->Settings, select folder, Link:
+   Add the following libraries to the beginning of the list of
+   Object/Library Modules:
+         hd415.lib hm415.lib (single-threaded release version)
+         hd415d.lib hm415d.lib (single-threaded debug version)
+
+         hd415m.lib hm415m.lib (multi-threaded release version)
+         hd415md.lib hm415md.lib (multi-threaded debug version)
+
+
+
+============================================================================
+================================compression.txt=============================
+
+Compression Algorithms and interface
+
+    The low-level compression interface allows any data object to be 
+compressed using a variety of algorithms.  This is completely transparent 
+to users once the data has been compressed initially - further data written
+to an object or read from it are compressed or decompressed internally to
+the library, without user intervention.  (For information on compressing
+SDS datasets, see the ../release_notes/comp_SDS.txt file.)  
+
+Currently only three compression algorithms are supported: Run-Length Encoding 
+(RLE), adaptive Huffman, and an LZ-77 dictionary coder (the gzip 'deflation' 
+algorithm).  Plans for future algorithms include an Lempel/Ziv-78 dictionary 
+coding, an arithmetic coder and a faster Huffman algorithm.
+
+    The public interface for this routine is contained in the user-level
+function call, HCcreate.  The interface to HCcreate is described below:
+
+int32 HCcreate(id,tag,ref,model_type,m_info,coder_type,c_info);
+    int32 id;                IN: the file id to create the data in (from Hopen)
+    uint16 tag,ref;          IN: the tag/ref pair of the data object which
+                                    is to be compressed
+    comp_model_t model_type; IN: the type of modeling to use, currently
+                                    only COMP_MODEL_STDIO is supported, which
+                                    indicates data is transferred in the
+                                    same way as C I/O functions operate.
+    model_info *m_info;      IN: Information needed for the modeling type chosen
+                                    Nothing needed for COMP_MODEL_STDIO,
+                                    so NULL can be used.
+    comp_coder_t coder_type; IN: the type of encoding to use from the following:
+                                    COMP_CODE_NONE - for no compression
+                                    COMP_CODE_RLE - for RLE encoding
+                                    COMP_CODE_SKPHUFF - for adaptive Huffman
+                                    COMP_CODE_DEFLATE - for gzip 'deflation'
+    comp_info *c_info;       IN: Information needed for the encoding type chosen
+                                    For COMP_CODE_NONE and COMP_CODE_RLE,
+                                    this is unused and can be set to NULL.
+                                    For COMP_CODE_SKPHUFF, the structure skphuff
+                                    in this union needs information about the
+                                    size of the data elements in bytes (see
+                                    examples below).
+                                    For COMP_CODE_DEFLATE, the structure deflate
+                                    in this union needs information about the
+                                    "effort" to encode data with.  Higher
+                                    values of 'level' member indicate more
+                                    compression effort.  Values may range from
+                                    0 (minimal compression, fastest time) to
+                                    9 (maximum compression, slowest time).
+    RETURNS
+        Return an AID to the newly created compressed element, FAIL on error.
+
+    HCcreate will compress an existing data object with the specified 
+compression method, or it can create a new data object which will contain
+compressed data when it is written to.  In either case, Hendaccess must be
+called to release the AID allocated by HCcreate.  In the first two examples
+below the datasets already exist, in the final example the dataset is created
+by the HCcreate call.  There is currently no FORTRAN equivalent for this
+function.  More details about this function can be found in the HDF reference
+manual.
+
+The following example shows how to compress a scientific dataset data object
+(which is composed of multi-dimensional 32-bit integer data) using the
+adaptive Huffman encoding:
+    {
+        int32 aid;
+        comp_info c_info;
+
+        c_info.skphuff.skp_size=sizeof(int32);
+        aid=HCcreate(file_id, DFTAG_SD, ref, COMP_MODEL_STDIO, NULL, 
+            COMP_CODE_SKPHUFF,&c_info);
+        .
+        .
+        <access data object>
+        .
+        .
+        Hendaccess(aid);
+    }
+
+The following example shows show to compress a raster image data object
+using the RLE algorithm:
+    {
+        int32 aid;
+
+        aid=HCcreate(file_id, DFTAG_RI, ref, COMP_MODEL_STDIO, NULL, 
+            COMP_CODE_RLE,NULL);
+        .
+        .
+        <access data object>
+        .
+        .
+        Hendaccess(aid);
+    }
+
+The following example shows how to create a new data object whose data
+will compressed as it is written:
+    {
+        int32 aid;
+
+        aid=HCcreate(file_id, DFTAG_RI, ref, COMP_MODEL_STDIO, NULL, 
+            COMP_CODE_RLE,NULL);
+        .
+        .
+        Hwrite(aid,len,data);
+        .
+        .
+        Hendaccess(aid);
+    }
+============================================================================
+================================dimval.txt==================================
+
+             New Version of Dimension Values
+             ===============================
+
+HDF4.0b1 and previous releases use a vgroup to represent a dimension.
+The vgroup has a single field vdata with class "DimVal0.0".
+The vdata has <dimension size> number of records, each record has a 
+fake value from 0, 1, 2 ... , (<dimension size> - 1 ). The fake values 
+are not really required and take a lot of space. For applications that 
+create large one dimensional array datasets the disk space taken by 
+these fake values almost double the size of the HDF file. In order to 
+omit the fake values, a new version of dimension vdata has been proposed.
+
+The new version uses the same structure as the old version. The only
+differences are that the vdata has only 1 record with value 
+<dimension size> and that the vdata's class is "DimVal0.1" to 
+distinguish it from the old version.
+
+However, existing tools and utilities which were compiled with the old
+version can't recognize the new dimensions of hdf files created using
+HDF4.0b2 or later version. This could cause problems for HDF users.
+To solve this problem, we are planning to implement a transitional 
+policy:
+
+1. Starting from HDF4.0b2 both versions of the dimension will be
+   created by default. The old tools recognize the "DimVal0.0" 
+   dimension.
+2. A new function SDsetdimval_comp (sfsdmvc) is added which can 
+   be called for a specific dimension to suppress the creation 
+   of the "DimVal0.0" vdata for that dimension. Users who store 
+   big 1D arrays should use this function to create "DimVal0.1" 
+   only.  See the man page for sdsetdimval_comp.3. 
+3. A new function SDisdimval_bwcomp (sfisdmvc) is added which 
+   can be called to get the current compatibility mode of a 
+   dimension. See the man page for sdisdimval_bwcomp.3. 
+4. HDF4.0b2 and later version of HDF libraries can recognize both
+   old and new versions of dimensions. This means old HDF files can 
+   always be read by new HDF libraries.
+5. HDF4.1 will create only "DimVal0.1" by default and function 
+   SDsetdimval_comp should be called if "DimVal0.0" is also desired.  
+   The transition time period is ended.
+6. Existing tools and utilities should be re-compiled with HDF4.0b2
+   or later releases during that transition time period.
+7. A new utility will be written to remove redundant "DimVal0.0" from 
+   the files created during the transition time period.
+8. A new utility will be written to convert "DimVal0.1" to "DimVal0.0"
+   for special cases.
+
+Please send bug reports, comments and suggestions to hdfhelp at ncsa.uiuc.edu.
+
+
+============================================================================
+================================external_path.txt===========================
+
+User Settable File Location for External Elements
+
+Users sometimes encounter situations (e.g., disk space shortage,
+different filesystem names) that the external file containing the data
+of the external element has to reside in a directory different from the
+one it was created.  The user may set up symbolic pointers to forward
+the file locations but this does not work if the external filename is
+an absolute path type containing directory components that do not exist
+in the local system.
+
+A new feature is added such that an application can provide a list of
+directories for the HDF library to search for the external file.  This
+is set by the function call HXsetdir or via the environment variable
+$HDFEXTDIR.  See the man page HXsetdir(3) for details.
+
+A similar feature is also added to direct the HDF library to create the
+external file of a _new_ external element in the given directory.  An
+example for the need of this feature is that an application wants to
+create multiple external element files with certain naming conventions
+(e.g., Data950101, Data950102) while all these files share a common
+parent directory (project123/DataVault).  Different users will have a
+different choice of the common parent directory.  This can be set by
+the function call HXsetcreatedir or the environment variable
+$HDFEXTCREATEDIR.  See the man page for HXsetcreatedir (1) for detail.
+
+============================================================================
+================================hdp.txt=====================================
+
+           hdp -- HDF dumper 
+
+
+NAME
+     hdp - HDF dumper
+
+SYNOPSIS
+     hdp [hdp options] hdp command [command options] <filename list>
+
+DESCRIPTION
+     
+     hdp is a command line utility designed for quick display of 
+     contents and data of HDF3.3 objects. It can list the contents 
+     of hdf files at various levels with different details. It can 
+     also dump the data of one or more specific objects in the file. 
+
+
+HDP OPTIONS
+
+    Currently, there is only one option.
+
+    -H  Display usage information about the specified command.
+        If no command is specified, -H lists all available commands.
+
+
+HDP COMMANDS
+
+     hdp currently has two types of commands: list and dump. Other 
+     types of commands such as those for editing may be added in the
+     future.
+     
+     hdp list <filename list>
+         lists contents of files in <filename list> 
+
+     hdp dumpsds <filename list>
+         displays data of NDGs and SDGs in the listed files.
+
+     hdp dumpvd <filename list>
+         displays data of vdatas in the listed files.
+   
+     hdp dumpvg <filename list>
+         displays data of objects in vgroups in the listed files.
+
+     hdp dumprig <filename list>
+         displays data of RIGs in the listed files.
+
+     hdp dumpgr <filename list>
+         displays data of general RIGs in the listed files.
+
+HDP COMMAND OPTIONS
+
+(Note: options preceeded by an * have not yet been implemented.)
+
+
+     hdp list [format options] [content ops] [filter ops] [order ops] 
+	      <filename list>
+     --------------------------------------------------------------------------
+
+      Format options
+          decide how the info of objects will be presented on the screen.
+       
+        -s  (short format) under each tag #, all ref's of that tag are listed
+            in one or more lines, same as the output of hdfls. (default)
+
+        -l  (long format) one object per line. Each line contains tag-name, 
+            tag/ref and the index of this tag in the file.(e.g., the ith NDG 
+	    in the file).
+
+        -d  debug format, one object per line. Each line contains tag_name,
+            tag/ref, index, offset, and length, same as the output of hdfls -d.
+
+	no	tagname	   tag	  ref	index/tag	offset	length
+        --      -------    ---    ---   ---------       ------  ------
+
+	1	DFTAG_NT   106      2      1          
+        2       DFTAG_SD   701      3      1
+        ...
+
+
+         Content options
+              allow contents be displayed.
+  
+            -n  display the name or label of the object, if there is any.
+                -n puts you in -l format automatically.
+
+            -c  display the class of the object, if there is any. -l format.
+
+            -a  display description of the object, if there is any. -l format.
+
+         Filter options
+              select certain type of objects to display, default is all.
+
+            -g  display groups only. Objects which do not belong to 
+                any group will not be displayed. Nested groups will be
+                displayed in tree format.
+
+            -t <number>  display objects with specified tag number . e.g. 
+                         720 for NDG.
+            -t <name>    display objects with specified tag name.
+
+         Order options
+              sort the output list in different orders.
+ 
+            -ot  by tag # (default)
+            -of  by the order in file DDlist.
+            -og  by group
+            -on  by name(label)
+
+    hdp dumpsds [filter ops] [contents ops] [output ops] <filename list>
+    --------------------------------------------------------------------
+         Filter options
+              specify which SDS to dump.
+
+             -i <index> dump SDS's with indices specified in <index>; 
+			  indices correspond to the order of the SDS in the file
+             -r <ref>    dump SDS's with reference numbers specified in <ref>
+             -n <name>   dump SDS's with names specified in <name>
+             -a           dump all SDS's in the file. (default)
+
+	     Options -i, -r, and -n can be used inclusively to specify
+	     different SDS's.
+
+          Content options
+
+             -v    display everything including all annotations (default)
+             -h    header only, no annotation for elements or data
+             -d    data only, no tag/ref 
+
+	     These options are exclusive.
+
+          Output options
+
+             -o <filename> specify <filename> as output file name
+             -b            binary output
+             -x            ascii text output (default)
+
+	     Options -b and -x are exclusive, but each can be used with
+	     option -o.
+
+	  Format options
+	     -c    print space characters as they are, not \digit
+	     -g    do not print data of file (global) attributes
+	     -l    do not print data of local attributes
+	     -s    do not add carriage return to a long line - dump as a stream
+
+	     Options in this category can be used inclusively.
+
+	  Note: Any combination of an option from each of the categories can
+		be used as long as the criteria of that category are met.
+
+    hdp dumpvd [filter ops] [contents ops] [output ops] <filename list>
+    --------------------------------------------------------------------
+         Filter options
+              specify which vdata to dump.
+
+             -i <index>   dump vdatas with indices in <index>; indices 
+			  correspond to the order of the vdatas in the 
+			  files
+             -r <ref>     dump vdatas with reference numbers specified in
+			  <ref>
+             -n <name>    dump vdatas with names specified in <name>
+             -c <class>   dump vdatas with classes specified in <class>
+             -a           dump all vdatas in the file. (default)
+
+          Content options
+
+             -v    display everything including all annotations (default)
+             -h    header only, no annotation for elements or data
+             -d    data only, no tag/ref
+             -f <fields> dump data of specified fields
+
+          Output options
+
+             -o <fn>    specify fn as output file name
+           * -b         binary file
+             -t         text ascii file (default)
+
+    hdp dumpvg [filter ops] [contents ops] [output ops] <filename list>
+    --------------------------------------------------------------------
+         Filter options
+              specify which vgroups to dump.
+
+             -i <index>   dump vgroups with indices specified in <index>; 
+			  indices correspond to the order of the vgroups 
+			  specified in the files
+             -r <ref>     dump vgroups with reference numbers specified in <ref>
+             -n <name>    dump vgroups with names specified in <name>
+             -c <class>   dump vgroups with classes specified in <class>
+             -a           dump all vgroups in the file. (default)
+
+          Content options
+
+             -v    display everything including all annotations (default)
+             -h    header only, no annotation for elements or data
+             -d    data only
+
+          Output options
+
+             -o <fn>    specify fn as output file name
+           * -b         binary file
+             -t         text ascii file (default)
+
+    Note: Unless the "-d" option is specified, a graphical representation of
+	  the file will be given after the data has been displayed. 
+
+    hdp dumprig [filter ops] [contents ops] [output ops] <filename list>
+    --------------------------------------------------------------------
+         Filter options
+              specify which RIG to dump.
+
+             -i <index>   dump RIGs with indices specified in <index>; 
+			  indices correspond to the order of the RIGs 
+			  specified in the files
+             -r <ref>     dump RIGs with reference numbers specified in <ref>
+             -a           dump all RIGs in the file. (default)
+             -m  8|24     dump the RIGs of 8-bit or 24-bit. By default all
+                             RIGs in the file will be dumped
+
+          Content options
+
+             -v    display everything including all annotations (default)
+             -h    header only, no annotation for elements or data
+             -d    data only
+
+          Output options
+
+             -o <fn>    specify fn as output file name
+             -b         binary file
+             -t         text ascii file (default)
+
+    hdp dumpgr [filter ops] [contents ops] [output ops] <filename list>
+    --------------------------------------------------------------------
+         Filter options
+              specify which general RIGs to dump.
+
+             -i <index>   dump general RIG's with indices specified in 
+                          <index>; indices correspond to the order of 
+                          the RIG in the file
+             -r <ref>     dump general RIG's with reference numbers 
+                          specified in <ref>
+             -n <name>    dump general RIG's with names specified in <name>
+             -a           dump all general RIG's in the file. (default)
+
+          Content options
+
+             -v    display everything including all annotations (default)
+             -h    header only, no annotation for elements or data
+             -d    data only, no tag/ref
+
+          Output options
+
+             -o <fn>    specify fn as output file name
+             -b         binary file
+             -t         ascii text file (default)
+
+          Note: any combination of an option from each of the three categories
+                can be used; but no more than one option from one category is
+                allowed.
+============================================================================
+================================install_winNT.txt===========================
+
+      Install HDF4.1 Release 2 on Windows NT and Windows 95, and Alpha NT.
+
+Since Windows NT, Windows '95 (Chicago) and Windows 3.1
+(with the Win 32s extensions) all are designed to run the same 32-bit code, our 
+decision is to support only 32-bit libraries and code on the MS-Windows 
+platform. We are not planning on supporting any 16-bit versions in the 
+foreseeable future.
+
+The instructions which follow assume that you will be using one of 
+the 'zip' files that we provide, either the binary code release
+(hdf41r2.zip) or the source code release (hdf41r2s.zip).
+In building HDF from source code you may select between 
+two build environment options depending on your
+application and environment needs.  Each option has it's own zip file:
+
+
+Option I, (select Win32nof.zip)
+Test and Utility configuration : HDF library, tests, and utilities, no fortran,
+available for Win32 Intel platform only.
+
+Option II, (select Win32full.zip)
+Full configuration : HDF library, tests, and utilities, with fortran
+This version has been built and tested using DEC Visual Fortran on both
+the Win32 Intel platform and the Win32 Alpha platform.
+
+
+
+Building from Binary Code Release (hdf41r2.zip)
+===============================================
+To install the HDF, JPEG, zlib and mfhdf libraries and utilities, 
+it is assumed that you have done the following:
+      
+
+      1. Create a directory structure to unpack the library. For 
+      example: 
+
+	    c:\					(any drive)
+           MyHDFstuff\				(any folder name)
+
+      2. Copy the binary archive (HDF41r2.zip) to that directory 
+      and unpack it by running WinZip on HDF41r2.zip (the binary archive).
+      This should create a directory called 'HDF41r2' which 
+      contains the following files and directories.
+
+            c:\MyHDFstuff\HDF41r2\lib             ( Debug and Release versions of HDF libraries )
+            c:\MyHDFstuff\HDF41r2\include         ( HDF include files )
+            c:\MyHDFstuff\HDF41r2\bin             ( HDF utilities files )
+            c:\MyHDFstuff\HDF41r2\release_notes   ( release notes )
+            c:\MyHDFstuff\HDF41r2\install_NT_95   ( this file)
+
+      
+      3. If you are building an application that uses the HDF library 
+         the following locations will need to be specified for locating
+         header files and linking in the HDF libraries:
+ 
+            C:\MyHDFstuff\HDF41r2\lib
+            C:\MyHDFstuff\HDF41r2\include
+
+
+
+
+
+Building from Source Code Release (hdf41r2s.zip)
+===============================================
+
+STEP I:  Preconditions
+
+To build the HDF, JPEG, zlib and mfhdf libraries and utilities, 
+it is assumed that you have done the following:
+      
+      1. Installed MicroSoft Developer Studio, and Visual C++ 5.0.
+         Visual Fortran 5.0 is needed if you are going to build the
+         full HDF Library with Fortran support.
+
+      2. Set up a directory structure to unpack the library. For 
+      example: 
+
+	    c:\					(any drive)
+           MyHDFstuff\				(any folder name)
+
+      3. Copy the source distribution archive to that directory 
+      and unpack it using the appropriate archiver options to
+      create a directory  hierarchy.
+         
+      Run WinZip on HDF41r2s.zip (the entire source tree).
+      This should create a directory called 'HDF41r2' which 
+      contains several files and directories.
+      
+      ( Note for those using the Win32 Alpha platform:
+        If you do not have a Winzip utility for your Alpha system
+        you can download the needed executables from: 
+        http://www.cdrom.com/pub/infozip ) 
+       
+STEP II: Select Installation type and Build.
+
+You may select one of 2 ways to build the HDF library and 
+utilities, depending on your environment and application needs.
+
+Option I, (select Win32nof.zip)
+Test and Utility configuration : HDF library, tests, and utilities, no fortran
+
+Option II, (select Win32full.zip)
+Full configuration : HDF library, tests, and utilities, with fortran
+
+
+
+STEP III: Follow Instructions for Option I, or II
+
+
+INSTRUCTIONS FOR OPTION I, TEST AND UTILITY INSTALLATION, NO FORTRAN
+                 (Win32 Intel platform only)
+
+	*** Builds hdf library, hdf utilities, 
+	*** test programs and batch files. No fortran code.
+ 
+        1. You will use Win32nof.zip 
+           Unpack dev\win32nof.zip in directory dev\
+           
+            Run WinZip on 
+               c:\myHDFstuff\HDF41r2\Win32nof.zip
+               This archive contains a Developer Studio project "dev" and 
+               two batch files. 
+               40 project files (*.dsp files) will be created when 
+               Win32nof.zip is expanded.
+
+         2. Invoke Microsoft Visial C++ 5.0, go to "File" and select
+            "Open Workspace" option. 
+            Then open  c:\myHDFstuff\HDF41r2\dev.dsw workspace. 
+
+	 3. Select "Build", then Select "Set Active Configuration".
+            Select "dev -- Win32Debug" as active configuration.
+            Select "Build" and "Build dev.exe" to
+            build the Debug version of the HDF41r2 tree.
+
+	 4. Select "Build", then Select "Set Active Configuration".
+            Select "dev -- Win32Release" as active configuration.
+            Select "Build" and "Build dev.exe" to
+            build the Release version of the HDF41r2 tree.
+	
+         5. In command prompt window run the test batch file 
+            win32noftst.bat in directory HDF41r2\.
+
+         6. If all tests passed, run the installation batch file 
+       win32ins.bat in directory HDF41r2\. Commands in this file will create
+       subdirectories bin\, include\ and lib\ in HDF41r2\. The bin dirctory
+       will contain the HDF utilities, the include directory will contain 
+       header files, and the lib directory will contain:
+               jpeg.lib     - JPEG Library
+               jpegd.lib    - JPEG Library with DEBUG option
+               libsrc.lib   - multi-file SDS Inteface routines
+               libsrcd.lib  - multi-file SDS Inteface routines with DEBUG option
+               src.lib      - multi-file Vdata Interface
+                                         Vgroup Interface
+                                         AN Interface
+                                         GR Interface routines
+               srcd.lib     - multi-file Vdata Interface
+                                         Vgroup Interface
+                                         AN Interface
+                                         GR Interface routines with DEBUG option
+               xdr.lib      - XDR Library
+               xdrd.lib     - XDR Library with DEBUG option
+               zlib.lib     - GNU Zip Library 
+               zlibd.lib    - GNU Zip Library with DEBUG option 
+  
+
+INSTRUCTIONS FOR OPTION II, FULL INSTALLATION WITH FORTRAN
+
+        
+	*** Builds the hdf library, hdf utility programs, test programs,
+	*** and batch files. Includes fortran source code to be
+        *** compiled with Digital Visual Fortran on either a Win32 Intel
+        *** machine or a Win32 Alpha machine.
+
+	1. Unpack HDF41r2\Win32full.zip in directory HDF41r2\. 
+         
+        2. Invoke Microsoft Visial C++ 5.0, go to "File" and select
+           "Open Workspace" option. 
+           Then open  c:\myHDFstuff\HDF41r2\dev.dsw workspace. 
+
+        3. Select "Build", then Select "Set Active Configuration".
+           Select as the active configuration "dev -- Win32Debug" 
+           if you have a Win32 Intel processor OR 
+           select "dev-Win32AlphaDbg" if you have a Win32 Alpha processor. 
+           Select "Build" and "Build dev.exe" to
+           build the Debug version of the HDF41r2 tree.
+           You will see that Digital Visual Fortran compiler is invoked
+           by Visual C++ Development environment in compiling the fortran code.
+
+        4. Select "Build", then Select "Set Active Configuration".
+           Select as the active configuration"dev -- Win32Release"
+           if you have a Win32 Intel processor OR
+           select "dev-Win32AlphaRel" if you have a Win32 Alpha processor.
+           Select "Build" and "Build dev.exe" to
+           build the Release version of the HDF41r2 tree.
+		
+        5. In command prompt window run the test batch file which
+       resides in the HDF41r2 directory.
+       Run win32tst.bat if you have a Win32 Intel platform OR 
+       run win32ALPHAtst.bat if you have the Win32 Alpha platform.
+
+	6. If all tests passed, run the installation batch file which
+       resides in the HDF41r2 directory
+       Run win32ins.bat if you have a Win32 Intel platform OR
+       run win32ALPHAins.bat if you have a Win32 Alpha platform.
+       Commands in these files will create
+       subdirectories bin\, include\ and lib\ in HDF41r2\. The bin dirctory
+       will contain the HDF utilities, include directory will contain 
+       header files, and the lib directory will contain:
+               jpeg.lib     - JPEG Library
+               jpegd.lib    - JPEG Library with DEBUG option
+               libsrc.lib   - multi-file SDS Inteface routines
+               libsrcd.lib  - multi-file SDS Inteface routines with DEBUG option               src.lib      - multi-file Vdata Interface
+                                         Vgroup Interface
+                                         AN Interface
+                                         GR Interface routines
+               srcd.lib     - multi-file Vdata Interface
+                                         Vgroup Interface
+                                         AN Interface
+               xdrd.lib     - XDR Library with DEBUG option
+               zlib.lib     - GNU Zip Library 
+               zlibd.lib    - GNU Zip Library with DEBUG option
+ 
+
+
+STEP IV:
+
+BUILDING AN APPLICATION USING THE HDF LIBRARY - SOME HELPFUL POINTERS
+=====================================================================
+
+If you are building an application that uses the HDF library 
+the following locations will need to be specified for locating
+header files and linking in the HDF libraries:
+ 
+            <top-level HDF directory>\lib
+            <top-level HDF directory>\include
+
+where <top-level HDF directory> may be C:\myHDFstuff\dev or C:\MyHDFstuff\HDF41r2\
+
+Please refer to the <top-level HDF directory>\release_notes\compile.txt file
+for more information on compiling an application with the HDF libraries.
+
+
+MORE HELPFUL POINTERS
+=====================
+(as described in terms of installing the  nofortran configuration)
+
+Here are some notes that may be of help if you are not familiar
+with using the Visual C++ Development Environment.
+
+Project name and location issues: 
+         The files in Win32nof.zip must end up in the HDF41r2\ directory
+         installed by HDF41r2s.zip
+
+         If you must install dev.dsw and dev.dsp in 
+         another directory, relative to HDF41r2\ , you will be asked to
+	 locate the above 5 sub-project files, when you open the
+	 project dev.dsw.
+	 
+	 If you want to rename dev (the entire project),
+	 you will need to modify two files
+	 dev.dsw and dev.dsp as text
+	 (contrary to the explicit warnings in the files).
+
+	 You can also modify dev.dsw and dev.dsp
+	 as text, to allow these 2 files to be installed
+	 in another directory.
+
+
+
+  Settings... details:
+  If you create your own project, the necessary settings can be
+  read from the dev.dsp file(as text), or from the
+  Project Settings in the Developer Studio project settings 
+dialog.
+
+    Project
+	  Settings
+	      C/C++
+		  Category
+		     PreProcessor
+			 Code Generation
+			    Use run-time Library
+				   These are all set to use Single-Threaded.
+				   or Single-Threaded debug.
+
+
+
+
+============================================================================
+================================macintosh.txt===============================
+
+Fortner Software LLC ("Fortner") created the reference implementation for
+Macintosh of the HDF 4.1r3 library, providing C-language bindings to all
+4.1r3 features.
+
+The Macintosh reference implementation of the HDF 4.1r3 library was implemented
+and tested on a PowerMac Model 7600/120 running MacOS 8.5.1 using Metrowerks
+CodeWarrior Pro1.  The library has also been run on a PowerMac G3.  
+
+Fortner cannot be certain that the libraries will run on other versions of
+Macintoshes (or clones) or MacOS versions, or when built using other
+development tools.  (In particular, this Macintosh implementation has not
+addressed use with non-PowerPC versions of Macintosh [i.e., 680x0-based
+Macintoshes]).  Migrating the Macintosh reference implementation to other
+development and/or run-time environments is the responsibility of the
+library user.
+
+First-time HDF users are encouraged to read the FAQ in this release for
+more information about HDF.  Users can also look at the home page for HDF
+at:
+
+    http://hdf.ncsa.uiuc.edu/
+
+Please send questions, comments, and recommendations regarding the
+Macintosh version of the HDF library to:
+
+    hdfhelp at ncsa.uiuc.edu
+ 
+
+============================================================================
+================================mf_anno.txt=================================
+
+ Annotation access through the Multi-file Annotation Interface(ANxxx)
+ ==================================================================== 
+
+ These routines are for accessing file labels, file descriptions, data
+labels and data descriptions(i.e. all are annotations). General access
+requires the routines Hopen() and ANstart() to be called first and the 
+last call to be ANend() and Hclose() which ends annotation handling on the file
+and closes the file. Basic annotation manipulation involes dealing
+with  handles(ann_id's) foreach annotation and annotation interface 
+handle(an_id). 
+
+
+NOTES: 
+  Note that the annotation types are enumerated. 
+  TYPE here refers to file/data label/description types 
+  They are AN_FILE_LABEL, AN_FILE_DESC, AN_DATA_LABEL, AN_DATA_DESC
+  The tag/ref refers to data tag/ref.
+
+  AN_DATA_LABEL = 0, /* Data label */
+  AN_DATA_DESC  = 1, /* Data description */
+  AN_FILE_LABEL = 2, /* File label */
+  AN_FILE_DESC  = 3  /* File description */ 
+
+In C-code you need to declare the annotation type using the 
+enumerated type defintion.
+
+e.g. C-code fragment to write a File label
+
+#include "hdf.h"
+...
+..
+char fname[10] = {"ann.hdf"};
+char *file_lab[1] = {"File label #1: This is a file label"};
+
+int32   file_id; /* file id */
+int32   an_id;   /* annotation interface id */
+int32   ann_id;  /* annotation id */
+ann_type myanntype;  /* annotation type */
+
+/* Start Annotation inteface and create file */
+file_id = Hopen(fname, DFACC_CREATE,0);
+an_id = ANstart(file_id);
+
+/* Set annotation type to file label */
+myanntype = AN_FILE_LABEL;
+
+/* Create id for file label */
+ann_id = ANcreatef(an_id, myanntype);
+
+/* Write file label */
+ANwriteann(ann_id, file_lab[0], HDstrlen(file_lab[0]));
+
+/* end access to file label */
+ANendaccess(ann_id);
+
+/* end access to file and close it*/
+ANend(an_id);
+Hclose(file_id);
+....
+...
+
+NOTE: You could also call ANcreatef() like this 
+        ANcreatef(an_handle, AN_FILE_LABEL);
+      without using the intermediate variable.
+
+ ROUTINES NEEDED:
+================
+ Hopen    - Opening the file, returns a file handle
+ Hclose   - Close the file.
+ 
+ NEW ROUTINES:
+===============
+ ANstart     - open file for annotation handling, returns annotation
+               interface id
+ ANfileinfo  - get number of file/data annotations in file. Indices returned
+               are used in ANselect() calls.
+ ANend       - end access to annotation handling on file
+ ANcreate    - create a new data annotation and return an id(ann_id)
+ ANcreatef   - create a new file annotation and return an id(ann_id)
+ ANselect    - returns an annotation id(ann_id) from index for 
+               a particular annotation TYPE. This id is then used for
+               calls like ANwriteann(), ANreadann(), ANannlen(),..etc
+ ANnumann:   - return number of annotations that match TYPE/tag/ref
+ ANannlist:  - return list of id's(ann_id's) that match TYPE/tag/ref
+ ANannlen:   - get length of annotation given id(ann_id)
+ ANreadann:  - read annotation given id(ann_id)
+ ANwriteann: - write annotation given id(ann_id)
+ ANendaccess - end access to annotation using id(ann_id)
+
+
+Routines:
+----------
+
+C:
+/* ------------------------------- ANstart -------------------------------- 
+ NAME
+	ANstart -- open file for annotation handling
+ USAGE
+	int32 ANstart(file_id)
+        int32  file_id;    IN: file id
+
+ RETURNS
+        An annotation interface ID or FAIL
+ DESCRIPTION
+        Start annotation handling on the file and return an interface id.
+
+ 
+Fortran: afstart(file_id)
+
+/*------------------------------- ANfileinfo ----------------------------
+ NAME
+    ANfileinfo
+ PURPOSE
+    Report high-level information about the ANxxx interface for a given file.
+ USAGE
+    intn ANfileinfo(an_id, n_file_label, n_file_desc, n_data_label, n_data_desc)
+        int32 an_id;          IN:  annotation interface ID
+        int32 *n_file_label;  OUT: the # of file labels
+        int32 *n_file_desc;   OUT: the # of file descriptions
+        int32 *n_data_label;  OUT: the # of data labels
+        int32 *n_data_desc;   OUT: the # of data descriptions
+ RETURNS
+    SUCCEED/FAIL
+ DESCRIPTION
+    Reports general information about the number of file and data
+    annotations in the file. This routine is generally used to find
+    the range of acceptable indices for ANselect calls.
+
+Fortran: affileinfo(an_id, num_flabel, num_fdesc, num_dlabel, num_ddesc)
+
+/* -------------------------------- ANend ---------------------------------
+ NAME
+	ANend -- close annotation handling on a file
+ USAGE
+	int32 ANend(an_id)
+        int32 an_id;         IN: annotation interface ID for the file
+ RETURNS
+        SUCCEED / FAIL
+ DESCRIPTION
+      Closes annotation handling on the gvien annotation interface id.
+
+
+Fortran: afend(an_id)
+
+/* ------------------------------ ANcreate ---------------------------- 
+ NAME
+	ANcreate - create a new data annotation and return an id
+ USAGE
+	int32 ANcreate(an_id, tag, ref, type )
+        int32 an_id;    IN: annotation interface ID
+        uint16 tag;     IN: tag of item to be assigned annotation
+        uint16 ref;     IN: reference number of itme to be assigned ann
+        ann_type  type: IN: AN_DATA_LABEL for data labels, 
+                            AN_DATA_DESC for data descriptions,
+ RETURNS
+        An ID to an annotation which can either be a label or description
+ DESCRIPTION
+        Creates a data annotation, returns an 'ann_id' to work with the new 
+        annotation which can either be a label or description.
+
+
+Fortran: afcreate(an_id, tag, ref, type)
+
+/* ------------------------------ ANcreatef ---------------------------- 
+ NAME
+	ANcreatef - create a new file annotation and return an id
+ USAGE
+	int32 ANcreatef(an_id, type )
+        int32 an_id;    IN: annotation interface ID
+        ann_type  type: IN:  AN_FILE_LABEL for file labels,
+                             AN_FILE_DESC for file descritpions.
+ RETURNS
+        An ID to an annotation which can either be a file label or description
+ DESCRIPTION
+        Creates a file annotation, returns an 'ann_id' to work with the new 
+        file annotation which can either be a label or description.
+
+Fortran: afcreatef(an_id, type)
+
+
+/* ------------------------------- ANselect ------------------------------- 
+ NAME
+	ANselect -- get an annotation ID from index of 'type'
+ USAGE
+	int32 ANselect(an_id, index, type)
+        int32 an_id;    IN: annotation interface ID
+        int32 index;    IN: index of annottion to get ID for
+        ann_type  type: IN: AN_DATA_LABEL for data labels, 
+                            AN_DATA_DESC for data descriptions,
+                            AN_FILE_LABEL for file labels,
+                            AN_FILE_DESC for file descritpions.
+ RETURNS
+        An ID to an annotation type which can either be a label or description 
+ DESCRIPTION
+        The position index is ZERO based
+
+Fortran: afselect(an_id, index, type)
+
+
+/*------------------------------- ANnumann ---------------------------------
+ NAME
+   ANnumann -- find number of annotation of 'type' that 
+                 match the given element tag/ref 
+ USAGE
+       intn  ANnumann(an_id, type, elem_tag, elem_ref)
+       int32  an_id;     IN: annotation interface ID
+       int    type:      IN: AN_DATA_LABEL for data labels, 
+                             AN_DATA_DESC for data descriptions,
+                             AN_FILE_LABEL for file labels,
+                             AN_FILE_DESC for file descritpions.
+       uint16 elem_tag,: IN: tag of item of which this is annotation
+       uint16 elem_ref;  IN: ref of item of which this is annotation
+ RETURNS
+       number of annotation found if successful and FAIL (-1) otherwise
+ DESCRIPTION
+       Find number of annotation of 'type' for the given element 
+       tag/ref pair. Here an element is either a file label/desc or
+       data label/desc.
+
+
+Fortran: afnumann(an_id, type, tag, ref)
+
+
+/*--------------------------------------------------------------------------
+ NAME
+   ANannlist -- generate list of annotation ids of 'type' that 
+                 match the given element tag/ref 
+ USAGE
+       intn  ANannlist(an_id, type, elm_tag, elem_ref, ann_list[])
+       int32  an_id;     IN: annotation interface ID
+       ann_type  type:   IN: AN_DATA_LABEL for data labels, 
+                             AN_DATA_DESC for data descriptions,
+                             AN_FILE_LABEL for file labels,
+                             AN_FILE_DESC for file descritpions.
+       uint16 elem_tag,: IN: tag of element of which this is annotation
+       uint16 elem_ref;  IN: ref of element of which this is annotation
+       int32  ann_list[]; OUT: array of ann_id's that match criteria.
+ RETURNS
+       number of annotations ids found if successful and FAIL (-1) otherwise
+ DESCRIPTION
+       Find and generate list of annotation ids of 'type' for the given 
+       element tag/ref pair
+
+
+Fortran: afannlist(an_id,type, tag, ref, alist[])
+
+
+
+/*--------------------------------------------------------------------------
+ NAME
+       ANannlen -- get length of annotation givne annotation id
+ USAGE
+       int32 ANannlen(ann_id)
+       int32 ann_id;   IN: annotation id
+ RETURNS
+       length of annotation if successful and FAIL (-1) otherwise
+ DESCRIPTION
+       Get the length of the annotation specified.
+
+
+Fortran: afannlen(ann_id)
+
+/*--------------------------------------------------------------------------
+ NAME
+       ANwriteann -- write annotation given ann_id
+ USAGE
+       intn ANwriteann(ann_id, ann, ann_len)
+       char *ann_id;   IN: annotation id
+       char *ann;      IN: annotation to write
+       int32 ann_len;  IN: length of annotation
+
+ RETURNS
+       SUCCEED (0) if successful and FAIL (-1) otherwise
+ DESCRIPTION
+       Checks for pre-existence of given annotation, replacing old one if it
+       exists. Writes out annotation.
+
+Fortran: afwriteann(ann_id, ann, annlen)
+
+
+
+/*--------------------------------------------------------------------------
+ NAME
+       ANreadann -- read annotation given ann_id
+ USAGE
+       intn ANreadann(ann_id, ann, maxlen)
+       int32 ann_id;   IN: annotation id (handle)
+       char *ann;     OUT: space to return annotation in
+       int32 maxlen;   IN: size of space to return annotation in
+ RETURNS
+       SUCCEED (0) if successful and FAIL (-1) otherwise
+ DESCRIPTION
+       Gets tag and ref of annotation.  Finds DD for that annotation.
+       Reads the annotation, taking care of NULL terminator, if necessary.
+       
+
+Fortran: afreadann(ann_id, ann, maxlen)
+
+
+
+/* ----------------------------------------------------------------------- 
+ NAME
+	ANendaccess -- end access to an annotation given it's id
+ USAGE
+	intn ANendaccess(ann_id)
+        int32 an_id;    IN: annotation id
+ RETURNS
+        SUCCEED or FAIL
+ DESCRIPTION
+        Terminates access to an annotation. 
+
+
+Fortran: afendaccess(ann_id)
+
+
+ 
+
+
+
+============================================================================
+================================mf_ris.txt==================================
+
+                  The multi-file RIS interface
+                  =============================
+
+Contents:
+
+ Introduction
+ How to access files and images in the new interface
+ "Name = value" attributes in the new interface
+ Dealing with annotations in the new interface
+ Work not yet completed, bugs, limitations
+ A listing or routines
+ Descriptions of GR routines
+   File level interface
+   Dataset Manipulation
+   ID/Ref/Index Functions
+   Interlace Request Functions
+   LUT/Palette I/O Functions
+   Special Element Functions
+   Attribute Functions
+
+
+Introduction
+============
+The new Generic Raster (GR) interface provides a set of functions for
+manipulating raster images of all kinds.  This new interface is meant to
+replace the older RIS8 and RIS24 interfaces, although these older
+interfaces will continue to be supported.
+
+Generic raster images are composed of "pixels" which can have multiple
+components, including but not limited to 8-bit unsigned integers.  Each image
+can have multiple palettes associated with it and other 'attributes' in the
+same "name=value" style as the SD*() routines have.
+
+
+The new GR interface was motivated by a number of needs:
+
+o  The need for multi-file, multi-object access to raster images, allowing
+users to keep open more than one file at a time, and to "attach" more than
+one raster image at a time.
+
+o  A need to further integrate the netCDF data-model with the HDF data-models.
+
+o  A need for a more general framework for attributes within the RIS
+data-model (allowing 'name = value' style metadata).
+
+o  A need to be able to access subsamples and subsets of images.
+
+
+IMPORTANT:  The added functionality represented by this new interface has
+necessitated a change in how raster images are physically represented on
+disk.   As a result programs using the old single-file RIS interfaces will
+only be able to read the data out of files produced by the new interface.
+The metadata / attributes will not be accessible.
+
+The following chart represents what can be done with the various interfaces
+available in HDF 4.0b1:
+
+              old RIS-API    new GR-API
+
+old RIS         CRW             CRW
+HDF files
+
+new RIS          r              CRW
+HDF files
+
+'R' means read, 'W' means write and 'C' means create.  Entries with dashes
+'-' represent functionality which has not yet been implemented.  'r' stands
+for the ability to only read the data, not the metadata.
+
+
+Work not yet completed, bugs, limitations
+===========================================
+
+Misc. stuff left to do:
+    Deal with special elements for images.
+    GRrename for images.
+    GRsetflags to suppress writing fill data and to suppress fillvalue attr.
+
+Features not supported:
+    Full support for multiple palettes with each RI.
+    Support for named palettes with each RI.
+    Support for palettes with non-standard formats.
+    Deletion of attributes or images (would require changing the way index
+        numbers are handled)
+
+Other limitations:
+   Currently the following design limitations are still in place:
+   1 - Cannot have pixels or palette entries which contain mixed variable
+        types, i.e. all the pixel/palette components must be of the same
+        number type.
+   2 - Currently all the components must be of valid HDF number types,
+        fractional bytes (i.e. 6-bit components) or 'plain' multiple byte values
+        are not handled, although they can be packed into the next larger
+        sized number type in order to hold them.
+
+
+
+How to access files and images in the new interface
+======================================================
+
+
+Here are the steps involved in accessing images in the new interface:
+
+1. Open or create the file using Hopen.  This provides you with a file ID to
+be used in step 2.
+
+2. Activate the GR interface for the file with the file ID obtained from
+step 1, using GRstart.  This provides you with a GR interface ID (GR ID).
+
+3. Optionally obtain information about the raster images in the file and
+global GR attributes using GRfileinfo.  Use the GR ID from step 2 to refer
+to the image file.
+
+4. Optionally find the index of a raster image, by name using
+GRnametoindex, or by reference number using GRreftoindex.
+
+5. Select for access an image with a given index, using GRselect for each
+image.  Each call to GRselect returns a raster image ID (RI ID) for
+subsequent accesses involving the corresponding image.
+
+5. Access the image by its RI ID, using routines such as GRgetiminfo (to
+get information about the image) and GRreadimage (to read all or part of an
+image).
+
+6. Terminate access to a given image using GRendaccess.
+
+7. Terminate access to the GR interface for the file, using GRend.
+
+8. Close the file using Hclose.
+
+Notice that in the GR interface, images are identified in several ways.
+Before an image is accessible ("attached"), it is identified by index,
+name, and reference number. The index describes the relative position of
+the image in the file. The name is a character string associated with the
+image, and the reference number is a unique integer.  An image's name is
+assigned by the program when it is created, and the reference number is
+assigned by the HDF library when it is created. After an image is attached
+, it is identified by an raster image identifier, or RI ID.
+
+The following code fragment illustrates the steps involved in accessing the
+image in a file and printing information about them.
+
+
+    /* Open the file and initialize the GR interface */
+    hdf_file_id=Hopen(TESTFILE,DFACC_RDWR,0);
+    grid=GRstart(hdf_file_id);
+
+    /* Obtain information about the images in the file */
+    GRfileinfo(grid,&n_datasets,&n_attrs);
+
+    /* Attach to each image and print information about it */
+    for(i=0; i<n_datasets; i++)
+      {
+          riid=GRselect(grid,i);
+          GRgetiminfo(riid,NULL,&ncomp,&nt,&il,dimsizes,&n_attrs);
+
+          printf("%d: riid=%ld: ncomp=%ld, nt=%ld, il=%ld,
+                    dim[0]=%ld, dim[1]=%ld, n_attrs=%ld\n",
+                    i, riid, ncomp, nt, il, dimsizes[0],
+                    dimsizes[1], n_attrs);
+
+          /* Detach from the image */
+          GRendaccess(riid);
+      } /* end for */
+
+    /* Shut down the GR interface and close the file */
+    GRend(grid);
+    Hclose(hdf_file_id);
+
+
+
+"Name = value" attributes in the new interface
+===============================================
+
+Attributes of the form "name = value" were introduced in HDF 3.3, but at
+that time they were available only for SDSs and files.  In HDF 4.0 we have
+added the ability to attach local and global attributes to raster images
+and raster image dimensions.
+
+An attribute's "name" is a string, and "value" is the associated value or
+values.  If an attribute contains more than one value, all values must be
+of the same type.  For example the attribute 'valid_range' attribute might
+be assigned values the maximum and minimum valid values for a given image.
+
+Raster attributes can be "local" or "global."  A local raster image
+attribute is one that applies to one raster image only. Global raster image
+attributes apply to all of the images in a file.
+
+Attributes for raster images are created by the routine GRsetattr.
+Existing attributes are selected by giving an object pointer and an
+attribute index.  The functions GRattrinfo, GRfindattr, and GRgetattr may
+be used in combination to read attributes and their values.  GRattrinfo
+gets the name , number type, and number of values for an attribute with a
+given index.  GRfindattr gets the index of an attribute with a given name,
+and GRreadattr reads the values associate with an attribute with a given
+index.
+
+The following example illustrates how to attach GR image attributes, and
+also GR global (file) attributes.
+
+    /* Open file and initialize the GR interface */
+    hdf_file_id=Hopen(TESTFILE,DFACC_RDWR,0);
+    grid=GRstart(hdf_file_id);
+
+    /* Create a global attribute  -- applies to all rasters in the file */
+    HDstrcpy(attr_name,"Test1");
+    HDstrcpy(u8_attr,"Attribute value 1");
+    GRsetattr(grid,attr_name,DFNT_UINT8,HDstrlen(u8_attr)+1,u8_attr);
+
+    GRfileinfo(grid,&n_datasets,&n_attrs);
+
+    /* select every image in the file, and
+       assign a local attribute to each */
+    for(i=0; i<n_datasets; i++)
+      {
+          /* Attach to image with index==i */
+          riid=GRselect(grid,i);
+
+          /* Create an attribute for the image */
+          HDstrcpy(attr_name,"Image1");
+          HDstrcpy(u8_attr,"Attribute value 1");
+          GRsetattr(riid,attr_name,DFNT_UINT8,HDstrlen(u8_attr)+1,u8_attr);
+
+          GRgetiminfo(riid,NULL,&ncomp,&nt,&il,dimsizes,&n_attrs);
+
+          printf("%d: riid=%ld: ncomp=%ld, nt=%ld, il=%ld, dim[0]=%ld,
+                  dim[1]=%ld, n_attrs=%ld\n",i,riid,ncomp,nt,il,
+                  dimsizes[0], dimsizes[1],n_attrs);
+
+                for(j=0; j<n_attrs; j++)
+                  {
+                    GRattrinfo(riid,j,attr_name,&nt,&ncomp);
+
+                    GRgetattr(riid,j,u8_attr);
+                    printf("Image #%d Attribute #%d: Name=%s, Value=%s\n",
+                             i,j,attr_name,u8_attr);
+                  } /* end for */
+
+          /* Detach from the image */
+          GRendaccess(riid);
+      } /* end for */
+
+    /* Shut down the GR interface */
+    GRend(grid);
+
+    /* Close the file */
+    Hclose(hdf_file_id);
+
+
+
+Dealing with annotations in the new interface
+================================================
+
+The new GR interface allows you to reference rasters explicitly, by "GR
+id".  A GR id is different from its reference number.  Since annotation
+routines attach annotations to objects by reference number, there needs to
+be a mechanism for determining the reference number of a raster image,
+given its id. This is made possible by the addition of the routine
+GRidtoref.
+
+A similar problem occurs when going the other way.  For example, a call to
+DFANlabellist returns the reference numbers of objects that are
+annotated.  If those objects are RISs (i.e. they have the tag DFTAG_RIG),
+we need to map the reference numbers to the corresponding images.  For
+this, a two-step process is required.  You can use the function
+GRreftoindex to get the index, or position, of the dataset that has a
+certain reference number, then you use the routine GRselect to get the id
+for the image in that position.
+
+
+A listing or routines
+======================
+
+File/Interface Functions:
+int32 GRstart(int32 hdf_file_id)
+    - Initializes the GR interface for a particular file. Returns a 'grid' to
+        specify the GR group to operate on.
+intn GRfileinfo(int32 grid, int32 *n_datasets, int32 *n_attrs)
+    - Returns information about the datasets and "global" attributes for the
+        GR interface.
+intn GRend(int32 grid)
+    - Terminates multi-file GR access for a file.
+
+Image I/O Functions:
+int32 GRcreate(int32 grid,char *name,int32 ncomp,int32 nt,int32 il,int32
+dimsizes[2])
+    - Defines a raster image in a file.  Returns a 'riid' to work with the new
+        raster image.
+int32 GRselect(int32 grid,int32 index)
+    - Selects an existing RI to operate on.
+int32 GRnametoindex(int32 grid,char *name)
+    - Maps a RI name to an index which is returned.
+intn GRgetiminfo(int32 riid,char *name,int32 *ncomp,int32 *nt,int32
+*il,int32 dimsizes[2],int32 *n_attr)
+    - Gets information about an RI which has been selected/created.
+intn GRwriteimage(int32 riid,int32 start[2],int32 stride[2],int32
+count[2],VOIDP data)
+    - Writes image data to an RI.  Partial dataset writing and subsampling is
+        allowed, but only with the dimensions of the dataset (ie. no UNLIMITED
+        dimension support)
+intn GRreadimage(int32 riid,int32 start[2],int32 stride[2],int32
+count[2],VOIDP data)
+    - Read image data from an RI.  Partial reads and subsampling are allowed.
+intn GRendaccess(int32 riid)
+    - End access to an RI.
+
+Dimension Functions:
+int32 GRgetdimid(int32 riid,int32 index)
+    - Get a dimension id ('dimid') for an RI to assign atrributes to. [Later]
+intn GRsetdimname(int32 dimid,char *name)
+    - Set the name of a dimension. [Later]
+int32 GRdiminfo(int32 dimid,char *name,int32 *size,int32 *n_attr)
+    - Get information about the dimensions attributes and size. [Later]
+
+ID/Ref/Index Functions:
+uint16 GRidtoref(int32 riid)
+    - Maps an riid to a reference # for annotating or including in a Vgroup.
+int32 GRreftoindex(int32 hdf_file_id,uint16 ref)
+    - Maps the reference # of an RI into an index which can be used with
+        GRselect.
+
+Interlace Request Functions:
+intn GRreqlutil(int32 riid,intn il)
+    - Request that the next LUT read from an RI have a particular interlace.
+intn GRreqimageil(int32 riid,intn il)
+    - Request that the image read from an RI have a particular interlace.
+
+LUT/Palette I/O Functions:
+int32 GRgetlutid(int32 riid,int32 index)
+    - Get a palette id ('palid') for an RI.
+intn GRgetlutinfo(int32 riid,int32 *ncomp,int32 *nt,int32 *il,int32 *nentries)
+    - Gets information about a palette.
+intn GRwritelut(int32 riid,int32 ncomps,int32 nt,int32 il,int32
+nentries,VOIDP data)
+    - Writes out a palette for an RI.
+intn GRreadlut(int32 palid,VOIDP data)
+    - Reads a palette from an RI.
+
+Special Element Functions:
+int32 GRsetexternalfile(int32 riid,char *filename,int32 offset)
+    - Makes the image data of an RI into an external element special element.
+intn GRsetaccesstype(int32 riid,uintn accesstype)
+    - Sets the access for an RI to be either serial or parallel I/O.
+intn GRsetcompress(int32 riid,int32 comp_type,comp_info *cinfo)
+    - Makes the image data of an RI into a compressed special element.
+
+Attribute Functions:
+intn GRsetattr(int32 dimid|riid|grid,char *name,int32 attr_nt,int32
+count,VOIDP data)
+    - Write an attribute for an object.
+int32 GRattrinfo(int32 dimid|riid|grid,int32 index,char *name,int32
+*attr_nt,int32 *count)
+    - Get attribute information for an object.
+intn GRgetattr(int32 dimid|riid|grid,int32 index,VOIDP data)
+    - Read an attribute for an object.
+int32 GRfindattr(int32 dimid|riid|grid,char *name)
+    - Get the index of an attribute with a given name for an object.
+
+
+
+Routine Descriptions
+====================
+
+Most of the routines in the GR interface return a status value of type intn
+(native integers).  If the status is equal to SUCCEED the routine completed
+successfully.  If it is equal to FAIL an error occurred, information about
+the error may be available by calling HEprint(filestream, 0).  SUCCEED and
+FAIL are defined in hdf.h for C users and in constant.i for Fortran
+programs.
+
+All IDs (hdf_file_id, grid, riid) are int32 quantities.
+
+Prototypes for these functions can be found in the file hproto.h
+
+Routines that can be called from C are all of the form GRxxx
+
+More details about all the routines below can be found in the HDF reference
+manual.
+
+
+File level interface:
+=====================
+
+These routines initialize and de-initialize the GR interface, and provide
+information about the raster images in a file.
+
+GRstart
+-------
+    Initialize the GR*() interface for a given HDF file.
+ USAGE
+    int32 GRstart(hdf_file_id)
+        int32 hdf_file_id;          IN: file ID from Hopen
+ RETURNS
+    Return grid (GR ID) on success, or FAIL
+ DESCRIPTION
+    Initializes the GR*() interface to operate on the HDF file which was
+    specified by hdf_file_id.  This routine must be called before any further
+    GR*() routines are called for a file.
+
+GRfileinfo
+----------
+    Report high-level information about the GR*() interface for a given file.
+ USAGE
+    intn GRfileinfo(grid, n_datasets, n_attrs)
+        int32 grid;                 IN: GR ID to get information about
+        int32 *n_datasets;          OUT: the # of GR datasets in a file
+        int32 *n_attrs;             OUT: the # of "global" GR attributes
+ RETURNS
+    SUCCEED/FAIL
+ DESCRIPTION
+    Reports general information about the number of datasets and "global"
+    attributes for the GR interface.  This routine is generally used to find
+    the range of acceptable indices for GRselect calls.
+
+
+GRend
+-----
+    Terminate the GR*() interface for a given HDF file.
+ USAGE
+    intn GRend(grid)
+        int32 grid;          IN: GR ID from GRstart
+ RETURNS
+    SUCCEED/FAIL
+
+ DESCRIPTION
+    Terminates access to the GR*() interface for a file.
+
+
+DataSet Manipulation
+=====================
+
+GRcreate
+--------
+    Create a new raster image.
+
+ USAGE
+    int32 GRcreate(grid, name, ncomp, nt, il, dimsizes)
+        int32 grid;         IN: GR ID from GRstart
+        char *name;         IN: Name of raster image to create
+        int32 ncomp;        IN: Number of components in image
+        int32 nt;           IN: Number type of each component
+        int32 il;           IN: Interlace of the components in the image
+        int32 dimsizes[2];  IN: Dimensions of the new image
+
+ RETURNS
+    A valid riid (Raster-Image ID) on success, or FAIL.
+
+ DESCRIPTION
+    Creates a new raster image in a file.
+
+ASSUMPTIONS
+    All components must be the same number-type.
+
+
+GRselect
+--------
+    Select a raster image to operate on.
+ USAGE
+    int32 GRselect(grid,index)
+        int32 grid;          IN: GR ID from GRstart
+        int32 index;         IN: Which raster image to select (indexed from 0)
+ RETURNS
+    A valid riid (Raster-Image ID) on success, or FAIL.
+
+ DESCRIPTION
+    Selects a raster image from the file to work on.  This ID is needed for
+    all operations on the image dataset, including reading/writing data,
+    annotations, etc.
+
+
+
+GRnametoindex
+-------------
+    Map a raster image name to an index.
+ USAGE
+    int32 GRnametoindex(grid,name)
+        int32 grid;          IN: GR ID from GRstart
+        char *name;          IN: Name of raster image to search for
+ RETURNS
+    A valid index on success, or FAIL.
+
+ DESCRIPTION
+    Searches for a raster image based on the name provided.  This routine
+    maps from names of raster images to indices inside the GR group.
+
+GRgetiminfo
+-----------
+    Gets information about a raster image.
+
+ USAGE
+    intn GRgetiminfo(riid,name,ncomp,nt,il,dimsizes,n_attr)
+        int32 riid;         IN: RI ID from GRselect/GRcreate
+        char *name;         OUT: name of raster image
+        int32 *ncomp;       OUT: number of components in image
+        int32 *nt;          OUT: number type of components
+        int32 *il;          OUT: interlace of the image
+        int32 *dimsizes;    OUT: size of each dimension
+        int32 *n_attr;      OUT: the number of attributes for the image
+
+ RETURNS
+    SUCCEED/FAIL
+
+ DESCRIPTION
+    Looks up information about an image which has been selected or created
+    with the GR routines.  Each of the parameters can be NULL, in which case
+    that piece of information will not be retrieved.
+
+GRwriteimage
+------------
+    Writes raster data to an image
+
+ USAGE
+    intn GRwriteimage(riid,start,stride,edge,data)
+        int32 riid;         IN: RI ID from GRselect/GRcreate
+        int32 start[2];     IN: array containing the offset in the image of the
+                                image data to write out
+        int32 stride[2];    IN: array containing interval of data being written
+                                along each edge.  strides of 0 are illegal
+                                (and generate an error)
+                                ie. stride of 1 in each dimension means
+                                writing contiguous data, stride of 2 means
+                                writing every other element out along an edge.
+        int32 count[2];     IN: number of elements to write out along each edge.
+        VOIDP data;         IN: pointer to the data to write out.
+
+ RETURNS
+    SUCCEED/FAIL
+
+ DESCRIPTION
+    Writes image data to an RI.  Partial dataset writing and subsampling is
+        allowed, but only within the dimensions of the dataset (ie. no UNLIMITED
+        dimension support)
+
+ ASSUMPTIONS
+    If the stride parameter is set to NULL, a stride of 1 will be assumed.
+
+
+GRreadimage
+-----------
+    Read raster data for an image
+
+ USAGE
+    intn GRreadimage(riid,start,stride,edge,data)
+        int32 riid;         IN: RI ID from GRselect/GRcreate
+        int32 start[2];     IN: array containing the offset in the image of the
+                                image data to read in
+        int32 stride[2];    IN: array containing interval of data being read
+                                along each edge.  strides of 0 are illegal
+                                (and generate an error)
+                                ie. stride of 1 in each dimension means
+                                reading contiguous data, stride of 2 means
+                                reading every other element out along an edge.
+        int32 count[2];     IN: number of elements to read in along each edge.
+        VOIDP data;         IN: pointer to the data to read in.
+
+ RETURNS
+    SUCCEED/FAIL
+
+ DESCRIPTION
+    Read image data from an RI.  Partial dataset reading and subsampling is
+        allowed.
+
+ASSUMPTIONS
+    If the stride parameter is set to NULL, a stride of 1 will be assumed.
+
+
+
+GRendaccess
+-----------
+    End access to an RI.
+
+ USAGE
+    intn GRendaccess(riid)
+        int32 riid;         IN: RI ID from GRselect/GRcreate
+
+ RETURNS
+    SUCCEED/FAIL
+
+ DESCRIPTION
+    End access to an RI.  Further attempts to access the RI ID will result in
+    an error.
+
+
+Dimension Functions
+===================
+(these have not been completed)
+
+
+ID/Ref/Index Functions
+======================
+
+GRidtoref
+---------
+    Maps an RI ID to a reference # for annotating or including in a Vgroup.
+
+ USAGE
+    uint16 GRidtoref(riid)
+        int32 riid;         IN: RI ID from GRselect/GRcreate
+
+ RETURNS
+    A valid reference # on success or FAIL
+
+ DESCRIPTION
+    Maps an riid to a reference # for annotating or including in a Vgroup.
+
+
+GRreftoindex
+------------
+    Maps the reference # of an RI into an index which can be used with GRselect.
+
+ USAGE
+    int32 GRreftoindex(grid,ref)
+        int32 grid;         IN: GR ID from GRstart
+        uint16 ref;         IN: reference number of raster image to map to index
+
+ RETURNS
+    A valid index # on success or FAIL
+
+ DESCRIPTION
+    Maps the reference # of an RI into an index which can be used with GRselect.
+
+
+Interlace Request Functions
+===========================
+
+
+GRreqlutil
+----------
+    Request that the next LUT read from an RI have a particular interlace.
+
+ USAGE
+    intn GRreqlutil(riid,il)
+        int32 riid;         IN: RI ID from GRselect/GRcreate
+        intn il;            IN: interlace for next LUT.  From the following
+                                values (found in mfgr.h):
+                      MFGR_INTERLACE_PIXEL      - pixel interlacing
+                      MFGR_INTERLACE_LINE       - line interlacing
+                      MFGR_INTERLACE_COMPONENT  - component/plane interlacing
+
+ RETURNS
+    SUCCEED/FAIL
+
+ DESCRIPTION
+    Request that the next LUT read from an RI have a particular interlace.
+
+
+
+GRreqimageil
+------------
+    Request that the image read from an RI have a particular interlace.
+
+ USAGE
+    intn GRreqimageil(riid,il)
+        int32 riid;         IN: RI ID from GRselect/GRcreate
+        intn il;            IN: interlace for next RI.  From the following
+                                values (found in mfgr.h):
+                      MFGR_INTERLACE_PIXEL      - pixel interlacing
+                      MFGR_INTERLACE_LINE       - line interlacing
+                      MFGR_INTERLACE_COMPONENT  - component/plane interlacing
+
+ RETURNS
+    SUCCEED/FAIL
+
+ DESCRIPTION
+    Request that the image read from an RI have a particular interlace.
+
+
+
+
+LUT/Palette I/O Functions
+=========================
+
+GRgetlutid
+----------
+    Get a LUT id ('lutid') for an RI.
+
+ USAGE
+    int32 GRgetlutid(riid,index)
+        int32 riid;         IN: RI ID from GRselect/GRcreate
+        int32 lut_index;    IN: Which LUT image to select (indexed from 0)
+
+ RETURNS
+    Valid LUT ID on success, FAIL on failure
+
+ DESCRIPTION
+    Get a LUT id ('lutid') for accessing LUTs in an RI.
+
+ GLOBAL VARIABLES
+ COMMENTS, BUGS, ASSUMPTIONS
+    Currently only supports one LUT per image, at index 0 and LUTID==RIID.
+
+
+
+
+intn GRgetlutinfo(int32 riid,int32 *ncomp,int32 *nt,int32 *il,int32 *nentries)
+    - Gets information about a palette.
+
+
+
+GRwritelut
+----------
+    Writes out a LUT for an RI.
+
+ USAGE
+    intn GRwritelut(riid,name,ncomps,nt,il,nentries,data)
+        int32 lutid;        IN: LUT ID from GRgetlutid
+        char *name;         IN: name of LUT image
+        int32 ncomp;        IN: number of components in LUT
+        int32 nt;           IN: number type of components
+        int32 il;           IN: interlace of the LUT
+        int32 nentries;     IN: the number of entries for the LUT
+        VOIDP data;         IN: LUT data to write out
+
+ RETURNS
+    SUCCEED/FAIL
+
+ DESCRIPTION
+    Writes out a LUT for an RI.
+
+
+GRreadlut
+---------
+    Reads a LUT from an RI.
+
+ USAGE
+    intn GRreadlut(lutid,data)
+        int32 lutid;        IN: LUT ID from GRgetlutid
+        VOIDP data;         IN: buffer for LUT data read in
+
+ RETURNS
+    SUCCEED/FAIL
+
+ DESCRIPTION
+    Reads a LUT from an RI.
+
+
+
+
+Special Element Functions
+=========================
+
+
+GRsetexternalfile
+-----------------
+    Makes the image data of an RI into an external element special element.
+
+ USAGE
+    intn GRsetexternalfile(riid,filename,offset)
+        int32 riid;         IN: RI ID from GRselect/GRcreate
+        char *filename;     IN: name of the external file
+        int32 offset;       IN: offset in the external file to store the image
+
+ RETURNS
+    SUCCEED/FAIL
+
+ DESCRIPTION
+    Makes the image data of an RI into an external element special element.
+        Cause the actual data for a dataset to be stored in an
+        external file.  This can only be done once for any given
+        dataset and it is the user's responsibility to make sure the
+        external datafile is transported when the "header" file is
+        moved.  The offset is the number of byte from the beginning of
+        the file where the data should be stored.  This routine can
+        only be called on HDF 3.3 files (i.e. calling on an XDR-based
+        netCDF file that was opened with the multi-file interface will
+        fail).
+
+
+
+
+
+GRsetaccesstype
+---------------
+    Sets the access for an RI to be either serial or parallel I/O.
+
+ USAGE
+    intn GRsetaccesstype(riid,accesstype)
+        int32 riid;         IN: RI ID from GRselect/GRcreate
+        uintn accesstype;   IN: access type for image data, from the following
+                                values:
+                                    DFACC_SERIAL - for serial access
+                                    DFACC_PARALLEL - for parallel access
+
+ RETURNS
+    SUCCEED/FAIL
+
+ DESCRIPTION
+    Sets the access for an RI to be either serial or parallel I/O.
+
+
+
+
+GRsetcompress
+-------------
+    Compressed the image data of an RI.
+
+ USAGE
+    intn GRsetcompress(riid,comp_type,cinfo)
+        int32 riid;         IN: RI ID from GRselect/GRcreate
+        int32 comp_type;    IN: type of compression, from list in hcomp.h
+        comp_info *cinfo;   IN: compression specific information
+
+ RETURNS
+    SUCCEED/FAIL
+
+ DESCRIPTION
+    Compressed the image data of an RI.
+    (Makes the image data of an RI into a compressed special element)
+
+
+
+
+Attribute Functions
+===================
+
+GRsetattr
+---------
+    Write an attribute for an object.
+
+ USAGE
+    intn GRsetattr(dimid|riid|grid,name,attr_nt,count,data)
+        int32 dimid|riid|grid;  IN: DIM|RI|GR ID
+        char *name;             IN: name of attribute
+        int32 attr_nt;          IN: number-type of attribute
+        int32 count;            IN: number of entries of the attribute
+        VOIDP data;             IN: attribute data to write
+
+ RETURNS
+    SUCCEED/FAIL
+
+ DESCRIPTION
+    Write an attribute for an object (function will figure out ID type).
+
+ GLOBAL VARIABLES
+ COMMENTS, BUGS, ASSUMPTIONS
+    Currently does not allow changing NT of an existing attribute.
+
+
+
+
+GRattrinfo
+----------
+    Get attribute information for an object.
+
+ USAGE
+    intn GRattrinfo(dimid|riid|grid,index,name,attr_nt,count)
+        int32 dimid|riid|grid;  IN: DIM|RI|GR ID
+        int32 index;            IN: index of the attribute for info
+        char *name;             OUT: name of attribute
+        int32 attr_nt;          OUT: number-type of attribute
+        int32 count;            OUT: number of entries of the attribute
+
+ RETURNS
+    SUCCEED/FAIL
+
+ DESCRIPTION
+    Get attribute information for an object.
+
+
+
+
+GRgetattr
+---------
+    Read an attribute for an object.
+
+ USAGE
+    intn GRgetattr(dimid|riid|grid,index,data)
+        int32 dimid|riid|grid;  IN: DIM|RI|GR ID
+        int32 index;            IN: index of the attribute for info
+        VOIDP data;             OUT: data read for attribute
+
+ RETURNS
+    SUCCEED/FAIL
+
+ DESCRIPTION
+    Read an attribute for an object.
+
+
+
+
+GRfindattr
+----------
+    Get the index of an attribute with a given name for an object.
+
+ USAGE
+    int32 GRfindattr(int32 dimid|riid|grid,char *name)
+        int32 dimid|riid|grid;  IN: DIM|RI|GR ID
+        char *name;             IN: name of attribute to search for
+
+ RETURNS
+    Valid index for an attribute on success, FAIL on failure
+
+ DESCRIPTION
+    Get the index of an attribute with a given name for an object.
+
+
+
+
+
+
+
+
+============================================================================
+================================new_functions.txt===========================
+
+This file contains a list of the new functions added with HDF 4.1r2.
+The functions in parenthesis were already present in the HDF library,
+and are included for clarity.
+
+C                     FORTRAN                 Description
+--------------------------------------------------------------------------------
+
+(SDsetcompress)       sfscompress             compresses SDS
+
+(SDwritechunk)        sfwchnk                 writes the specified chunk of
+                                              NUMERIC data to the SDS
+
+(SDwritechunk)        sfwcchnk                writes the specified chunk of
+                                              CHARACTER data to the SDS
+
+(SDreadchunk)         sfrchnk                 reads the specified chunk of
+                                              NUMERIC data to the SDS
+
+(SDreadchunk)         sfrcchnk                reads the specified chunk of
+                                              CHARACTER data to the SDS
+ 
+(SDsetchunk)          sfschnk                 makes the SDS a chunked SDS
+ 
+(SDsetchunkcache)     sfscchnk                sets the maximum number of chunks
+                                              to cache
+ 
+(SDgetchunkinfo)      sfgichnk                gets info on SDS
+
+(SDsetblocksize)      sfsblsz                 sets block size 
+
+(SDisrecord)          sfisrcrd                checks if an SDS is unlimited
+
+
+
+(GRsetcompress)       mgscompress             compresses raster image
+
+GRsetchunk            mgschnk                 makes a raster image a chunked
+                                              raster image
+
+GRgetchunkinfo        mggichnk                gets info on a raster image
+
+GRsetchunkcache       mgscchnk                sets the maximum number of chunks
+                                              to cache
+
+
+(Hgetlibversion)      hglibver                gets version of the HDF Library
+
+(Hgetfileversion)     hgfilver                gets version of the HDF file
+
+
+Vdeletetagref        vfdtr                    deletes tag/ref pair ( HDF object)
+                                              from a vgroup
+
+(VSfindclass)        vsffcls                  finds class with a specified 
+                                              name in a vdata
+
+VSdelete             vsfdlte                  deletes a vdata
+
+Vdelete              vdelete                  deletes a vgroup
+
+
+
+============================================================================
+================================page_buf.txt================================
+
+****************************** Beta Version *********************************
+File Caching(Beta release)
+=================================
+    This version of the distribution has preliminary support for file caching.
+
+*NOTE*: This version is NOT officially supported on all platforms
+        and has not been extensively tested. As such it is provided as is.
+        It will be supported officially in a later release.
+
+    The file caching allows the file to be mapped to user memory on 
+    a per page basis i.e a memory pool of the file. With regards to the 
+    file system, page sizes can be allocated based on the file system page-size 
+    or if the user wants in some multiple of the file system page-size. This 
+    allows for fewer pages to be managed along with accommodating the users file
+    usage pattern.
+
+    The current version supports setting the page-size and number of pages
+    in the memory pool through user C-routines(Fortran will be added in the
+    next release). The default is 8192 bytes for page-size and 1 for number 
+    of pages in the pool.
+
+    Two user C-routines are provided: one to set the values for page-size and
+    number of pages to cache, and the other to inquire the current values being 
+    used for the pagesize and number of pages cached.
+
+    Routines:(The names may change in the future...)
+    -------------------------------------------------
+    Hmpset(int pagesize, int maxcache, int flags)
+    --------------------------------------------
+    o  Set the pagesize and maximum number of pages to cache on the next
+       open/create of a file. A pagesize that is a power of 2 is recommended.
+       'pagesize' must be greater than MIN_PAGESIZE(512) bytes and 
+       'maxcache' must be greater than or equal to 1. Valid values
+       for both arguments are required when using this call.
+
+       The values set here only affect the next open/creation of a file and
+       do not change a particular file's paging behaviour after it has been
+       opened or created. This maybe changed in a later release.
+
+       Use flags argument of 'MP_PAGEALL' if the whole file is to be cached
+       in memory otherwise pass in zero. In this case the value for 'maxcache'
+       is ignored. You must pass in a valid value for 'pagesize' when
+       using the flag 'MP_PAGEALL'. 
+ 
+    Hmpget(int *pagesize, int *maxcache, int flags)
+    ----------------------------------------------
+    o   This gets the last pagesize and maximum number of pages cached for
+        the last open/create of a file. The 'flags' variable is not used.
+    
+    In this version a new file memory pool is created for every file that is
+    created/opened and can not be shared. Future versions will allow sharing 
+    of the file memory pool with other threads/processes.
+
+    To enable the creation of a library using page caching the following 
+    section in the makefile fragment($(toplevel)/config/mh-<os>) must be 
+    uncommented and set.
+
+    # ------------ Macros for Shared Memory File Buffer Pool(fmpool) ------
+    # Uncomment the following lines to enable shared memory file buffer pool
+    # version of the HDF core library libdf.a. Please read the
+    # documentation before enabling this feature.
+    #FMPOOL_FLAGS  = -DHAVE_FMPOOL
+
+    After setting these values you must re-run  the toplevel 'configure' script.
+    Make sure that your start from a clean re-build(i.e. 'make clean') after
+    re-running the toplevel 'configure' script and then run 'make'.
+    Details on running configure can be found in the section
+    'General Configuration/Installation - Unix' in the installation file 
+    '$(toplevel)/INSTALL'.
+
+    The file caching version of libdf.a is automatically tested
+    when the regular HDF and netCDF tests are run. The page caching
+    version has been tested only on a few UNIX platforms and is NOT
+    available for the Macintosh ,IBM-PC(Windows NT/95) or VMS.
+
+****************************** Beta Version *********************************
+============================================================================
+================================sd_chunk_examples.txt=======================
+
+/**************************************************************************
+File: sd_chunk_examples.c
+
+  Examples for writing/reading SDS with Chunking and Chunking w/ Compression.
+   - Sample C-code using SDS chunking routines. 
+   - No real error checking is done and the value of 'status' should 
+     be checked for proper values.
+
+5 Examples are shown, 1 for 2-D array, 3 for 3-D arrays and
+                      1 for 2-D array with compression..
+
+  Example 1. 2-D 9x4 SDS of uint16 with 3x2 chunks
+             Write data using SDwritechunk().
+             Read data using SDreaddata().
+
+  Example 2. 3-D 2x3x4 SDS of uint16 with 2x3x2 chunks
+             Write data using SDwritedata().
+             Read data using SDreaddata().
+
+  Example 3. 3-D 2x3x4 SDS of uint16 with 1x1x4 chunks
+             Write data using SDwritechunk().
+             Read data using SDreaddata().
+
+  Example 4. 3-D 2x3x4 SDS of uint16 with 1x1x4 chunks
+             Write data using SDwritedata().
+             Read data using SDreadchunk().
+
+  Example 5. 2-D 9x4 SDS of uint16 with 3x2 chunks with GZIP compression.
+             Write data using SDwritechunk().
+             Read data using SDreaddata().
+
+Author - GeorgeV
+Date   - 11/25/96
+********************************************************************/
+
+#include "mfhdf.h"
+
+/* arrays holding dim info for datasets */
+static int32  d_dims[3]     = {2, 3, 4};  /* data dimensions */
+static int32  edge_dims[3]  = {0, 0, 0};  /* edge dims */
+static int32  start_dims[3] = {0, 0, 0};  /* starting dims  */
+
+/* data arrays layed out in memory  */
+
+/* used in Example 1 and 5 */
+static uint16  u16_2data[9][4] =
+{ 
+   {11, 21, 31, 41},
+   {12, 22, 32, 42},
+   {13, 23, 33, 43},
+   {14, 24, 34, 44},
+   {15, 25, 35, 45},
+   {16, 26, 36, 46},
+   {17, 27, 37, 47},
+   {18, 28, 38, 48},
+   {19, 29, 39, 49},
+};
+
+/* uint16 3x2 chunk arrays used in example 1 and 5*/
+static uint16  chunk1_2u16[6] = {11, 21, 
+                                 12, 22, 
+                                 13, 23};
+
+static uint16  chunk2_2u16[6] = {31, 41, 
+                                 32, 42, 
+                                 33, 43};
+
+static uint16  chunk3_2u16[6] = {14, 24, 
+                                 15, 25, 
+                                 16, 26};
+
+static uint16  chunk4_2u16[6] = {34, 44, 
+                                 35, 45, 
+                                 36, 46};
+
+static uint16  chunk5_2u16[6] = {17, 27, 
+                                 18, 28, 
+                                 19, 29};
+
+static uint16  chunk6_2u16[6] = {37, 47, 
+                                 38, 48, 
+                                 39, 49};
+
+
+/* uint16 1x1x4 chunk arrays used in example 3 */
+static uint16  chunk1_3u16[4] =  { 0, 1, 2, 3};
+
+static uint16  chunk2_3u16[4] =  { 10, 11, 12, 13};
+
+static uint16  chunk3_3u16[4] =  { 20, 21, 22, 23};
+
+static uint16  chunk4_3u16[4] =  { 100, 101, 102, 103};
+
+static uint16  chunk5_3u16[4] =  { 110, 111, 112, 113};
+
+static uint16  chunk6_3u16[4] =  { 120, 121, 122, 123};
+
+
+/* Used in Examples 2 and 4 */
+static uint16  u16_3data[2][3][4] =
+{
+    {
+        { 0, 1, 2, 3},
+        { 10, 11, 12, 13},
+        { 20, 21, 22, 23}},
+    {
+        { 100, 101, 102, 103},
+        { 110, 111, 112, 113},
+        { 120, 121, 122, 123}}};
+
+/*
+ * Main routine
+ */
+int main(int argc, char *argv[])
+{
+   int32 f1;                    /* file handle */
+   int32 sdsid;                 /* SDS handle */
+   uint16  inbuf_3u16[2][3][4]; /* Data array read for Example 2 and 3*/
+   uint16  inbuf_2u16[5][2];    /* Data array read for Example 1 */
+   uint16  ru16_3data[4];       /* whole chunk input buffer */
+   uint16  fill_u16 = 0;        /* fill value */
+   HDF_CHUNK_DEF chunk_def;     /* Chunk defintion set */ 
+   HDF_CHUNK_DEF rchunk_def;    /* Chunk defintion read */ 
+   int32   cflags;              /* chunk flags */
+   comp_info cinfo;             /* compression info */
+   intn status;
+
+   ncopts = NC_VERBOSE;
+
+    /* create file */
+    f1 = SDstart("chunk.hdf", DFACC_CREATE);
+
+    /* 
+      Example 1. 2-D 9x4 SDS of uint16 with 3x2 chunks
+                 Write data using SDwritechunk().
+                 Read data using SDreaddata().
+    */
+
+    /* create a  9x4 SDS of uint16 in file 1 */
+    d_dims[0] = 9;
+    d_dims[1] = 4;
+    sdsid = SDcreate(f1, "DataSetChunked_1", DFNT_UINT16, 2, d_dims);
+
+    /* set fill value */
+    fill_u16 = 0;
+    status = SDsetfillvalue(sdsid, (VOIDP) &fill_u16);
+
+    /* Create chunked SDS 
+       chunk is 3x2 which will create 6 chunks */
+    chunk_def.chunk_lengths[0] = 3;
+    chunk_def.chunk_lengths[1] = 2;
+    status = SDsetchunk(sdsid, chunk_def, HDF_CHUNK);
+
+    /* Set Chunk cache to hold 3 chunks */
+    status = SDsetchunkcache(sdsid, 3, 0);
+
+    /* Write data use SDwritechunk */
+
+    /* Write chunk 1 */
+    start_dims[0] = 0;
+    start_dims[1] = 0;
+    status = SDwritechunk(sdsid, start_dims, (VOIDP) chunk1_2u16);
+
+    /* Write chunk 4 */
+    start_dims[0] = 1;
+    start_dims[1] = 1;
+    status = SDwritechunk(sdsid, start_dims, (VOIDP) chunk4_2u16);
+
+    /* Write chunk 2 */
+    start_dims[0] = 0;
+    start_dims[1] = 1;
+    status = SDwritechunk(sdsid, start_dims, (VOIDP) chunk2_2u16);
+
+    /* Write chunk 5 */
+    start_dims[0] = 2;
+    start_dims[1] = 0;
+    status = SDwritechunk(sdsid, start_dims, (VOIDP) chunk5_2u16);
+
+    /* Write chunk 3 */
+    start_dims[0] = 1;
+    start_dims[1] = 0;
+    status = SDwritechunk(sdsid, start_dims, (VOIDP) chunk3_2u16);
+
+    /* Write chunk 6 */
+    start_dims[0] = 2;
+    start_dims[1] = 1;
+    status = SDwritechunk(sdsid, start_dims, (VOIDP) chunk6_2u16);
+ 
+    /* read a portion of data back in using SDreaddata
+       i.e  5x2 subset of the whole array */
+    start_dims[0] = 2;
+    start_dims[1] = 1;
+    edge_dims[0] = 5;
+    edge_dims[1] = 2;
+    status = SDreaddata(sdsid, start_dims, NULL, edge_dims, (VOIDP) inbuf_2u16);
+
+   /* This 5x2 array should look somethink like this
+         {{23, 24, 25, 26, 27},
+          {33, 34, 35, 36, 37}}    
+    */
+
+    /* Get chunk information */
+    status = SDgetchunkinfo(sdsid, &rchunk_def, &cflags);
+
+
+    /* Close down this SDS*/    
+    status = SDendaccess(sdsid);
+
+    /* 
+      Example 2. 3-D 2x3x4 SDS of uint16 with 2x3x2 chunks
+                 Write data using SDwritedata().
+                 Read data using SDreaddata().
+    */
+
+    /* create a new 2x3x4 SDS of uint16 in file 1 */
+    d_dims[0] = 2;
+    d_dims[1] = 3;
+    d_dims[2] = 4;
+    sdsid = SDcreate(f1, "DataSetChunked_2", DFNT_UINT16, 3, d_dims);
+
+    /* set fill value */
+    fill_u16 = 0;
+    status = SDsetfillvalue(sdsid, (VOIDP) &fill_u16);
+
+    /* Create chunked SDS
+       chunk is 2x3x2 which will create 2 chunks */
+    chunk_def.chunk_lengths[0] = 2;
+    chunk_def.chunk_lengths[1] = 2;
+    chunk_def.chunk_lengths[2] = 3;
+    status = SDsetchunk(sdsid, chunk_def, HDF_CHUNK);
+
+    /* Set Chunk cache to hold 2 chunks*/
+    status = SDsetchunkcache(sdsid, 2, 0);
+
+    /* Write data using SDwritedata*/
+    start_dims[0] = 0;
+    start_dims[1] = 0;
+    start_dims[2] = 0;
+    edge_dims[0] = 2;
+    edge_dims[1] = 3;
+    edge_dims[2] = 4;
+    status = SDwritedata(sdsid, start_dims, NULL, edge_dims, (VOIDP) u16_3data);
+
+    /* read data back in using SDreaddata*/
+    start_dims[0] = 0;
+    start_dims[1] = 0;
+    start_dims[2] = 0;
+    edge_dims[0] = 2;
+    edge_dims[1] = 3;
+    edge_dims[2] = 4;
+    status = SDreaddata(sdsid, start_dims, NULL, edge_dims, (VOIDP) inbuf_3u16);
+
+    /* Verify the data in inbuf_3u16 against u16_3data[] */
+
+    /* Get chunk information */
+    status = SDgetchunkinfo(sdsid, &rchunk_def, &cflags);
+
+    /* Close down this SDS*/    
+    status = SDendaccess(sdsid);
+
+    /* 
+      Example 3. 3-D 2x3x4 SDS of uint16 with 1x1x4 chunks
+                 Write data using SDwritechunk().
+                 Read data using SDreaddata().
+    */
+
+    /* Now create a new 2x3x4 SDS of uint16 in file 'chunk.hdf' */
+    d_dims[0] = 2;
+    d_dims[1] = 3;
+    d_dims[2] = 4;
+    sdsid = SDcreate(f1, "DataSetChunked_3", DFNT_UINT16, 3, d_dims);
+
+    /* set fill value */
+    fill_u16 = 0;
+    status = SDsetfillvalue(sdsid, (VOIDP) &fill_u16);
+
+    /* Create chunked SDS 
+       chunk is 1x1x4 which will create 6 chunks */
+    chunk_def.chunk_lengths[0] = 1;
+    chunk_def.chunk_lengths[1] = 1;
+    chunk_def.chunk_lengths[2] = 4;
+    status = SDsetchunk(sdsid, chunk_def, HDF_CHUNK);
+
+    /* Set Chunk cache to hold 4 chunks*/
+    status = SDsetchunkcache(sdsid, 4, 0);
+
+    /* Write data use SDwritechunk */
+
+    /* Write chunk 1 */
+    start_dims[0] = 0;
+    start_dims[1] = 0;
+    start_dims[2] = 0;
+    status = SDwritechunk(sdsid, start_dims, (VOIDP) chunk1_3u16);
+
+    /* Write chunk 4 */
+    start_dims[0] = 1;
+    start_dims[1] = 0;
+    start_dims[2] = 0;
+    status = SDwritechunk(sdsid, start_dims, (VOIDP) chunk4_3u16);
+
+    /* Write chunk 2 */
+    start_dims[0] = 0;
+    start_dims[1] = 1;
+    start_dims[2] = 0;
+    status = SDwritechunk(sdsid, start_dims, (VOIDP) chunk2_3u16);
+
+    /* Write chunk 5 */
+    start_dims[0] = 1;
+    start_dims[1] = 1;
+    start_dims[2] = 0;
+    status = SDwritechunk(sdsid, start_dims, (VOIDP) chunk5_3u16);
+
+    /* Write chunk 3 */
+    start_dims[0] = 0;
+    start_dims[1] = 2;
+    start_dims[2] = 0;
+    status = SDwritechunk(sdsid, start_dims, (VOIDP) chunk3_3u16);
+
+    /* Write chunk 6 */
+    start_dims[0] = 1;
+    start_dims[1] = 2;
+    start_dims[2] = 0;
+    status = SDwritechunk(sdsid, start_dims, (VOIDP) chunk6_3u16);
+ 
+    /* read data back in using SDreaddata*/
+    start_dims[0] = 0;
+    start_dims[1] = 0;
+    start_dims[2] = 0;
+    edge_dims[0] = 2;
+    edge_dims[1] = 3;
+    edge_dims[2] = 4;
+    status = SDreaddata(sdsid, start_dims, NULL, edge_dims, (VOIDP) inbuf_3u16);
+
+    /* Verify the data in inbuf_3u16 against u16_3data[] */
+
+    /* Close down this SDS*/    
+    status = SDendaccess(sdsid);
+
+
+    /* 
+      Example 4. 3-D 2x3x4 SDS of uint16 with 1x1x4 chunks
+                 Write data using SDwritedata().
+                 Read data using SDreadchunk().
+    */
+
+    /* Now create a new 2x3x4 SDS of uint16 in file 'chunk.hdf' */
+    d_dims[0] = 2;
+    d_dims[1] = 3;
+    d_dims[2] = 4;
+    sdsid = SDcreate(f1, "DataSetChunked_4", DFNT_UINT16, 3, d_dims);
+
+    /* set fill value */
+    fill_u16 = 0;
+    status = SDsetfillvalue(sdsid, (VOIDP) &fill_u16);
+
+    /* Create chunked SDS
+       chunk is 1x1x4 which will create 6 chunks */
+    chunk_def.chunk_lengths[0] = 1;
+    chunk_def.chunk_lengths[1] = 1;
+    chunk_def.chunk_lengths[2] = 4;
+    status = SDsetchunk(sdsid, chunk_def, HDF_CHUNK);
+
+    /* Set Chunk cache to hold 4 chunks */
+    status = SDsetchunkcache(sdsid, 4, 0);
+
+    /* Write data using SDwritedata*/
+    start_dims[0] = 0;
+    start_dims[1] = 0;
+    start_dims[2] = 0;
+    edge_dims[0] = 2;
+    edge_dims[1] = 3;
+    edge_dims[2] = 4;
+    status = SDwritedata(sdsid, start_dims, NULL, edge_dims, (VOIDP) u16_3data);
+
+    /* read data back in using SDreadchunk and verify against
+       the chunk arrays chunk1_3u16[] ... chunk6_3u16[] */
+
+    /* read chunk 1 */
+    start_dims[0] = 0;
+    start_dims[1] = 0;
+    start_dims[2] = 0;
+    status = SDreadchunk(sdsid, start_dims, (VOIDP) ru16_3data);
+
+    /* read chunk 2 */
+    start_dims[0] = 0;
+    start_dims[1] = 1;
+    start_dims[2] = 0;
+    status = SDreadchunk(sdsid, start_dims, (VOIDP) ru16_3data);
+
+    /* read chunk 3 */
+    start_dims[0] = 0;
+    start_dims[1] = 2;
+    start_dims[2] = 0;
+    status = SDreadchunk(sdsid, start_dims, (VOIDP) ru16_3data);
+
+    /* read chunk 4 */
+    start_dims[0] = 1;
+    start_dims[1] = 0;
+    start_dims[2] = 0;
+    status = SDreadchunk(sdsid, start_dims, (VOIDP) ru16_3data);
+
+    /* read chunk 5 */
+    start_dims[0] = 1;
+    start_dims[1] = 1;
+    start_dims[2] = 0;
+    status = SDreadchunk(sdsid, start_dims, (VOIDP) ru16_3data);
+
+    /* read chunk 6 */
+    start_dims[0] = 1;
+    start_dims[1] = 2;
+    start_dims[2] = 0;
+    status = SDreadchunk(sdsid, start_dims, (VOIDP) ru16_3data);
+
+    /* Close down this SDS*/    
+    status = SDendaccess(sdsid);
+
+
+    /* 
+      Example 5. 2-D 9x4 SDS of uint16 with 3x2 chunks with GZIP compression
+                 Write data using SDwritechunk().
+                 Read data using SDreaddata().
+    */
+
+    /* create a  9x4 SDS of uint16 in file 1 */
+    d_dims[0] = 9;
+    d_dims[1] = 4;
+    sdsid = SDcreate(f1, "DataSetChunked_1", DFNT_UINT16, 2, d_dims);
+
+    /* set fill value */
+    fill_u16 = 0;
+    status = SDsetfillvalue(sdsid, (VOIDP) &fill_u16);
+
+    /* Create chunked SDS 
+       chunk is 3x2 which will create 6 chunks 
+       Compression set will be GZIP. 
+       Note that 'chunk_def' is a union. 
+       See the man page 'sd_chunk.3' for more info on the union. */
+    chunk_def.comp.chunk_lengths[0] = 3;
+    chunk_def.comp.chunk_lengths[1] = 2;
+    chunk_def.comp.comp_type = COMP_CODE_DEFLATE; /* GZIP */
+    chunk_def.comp.cinfo.deflate.level = 6;       /* Level */
+
+    /* set Chunking with Compression */
+    status = SDsetchunk(sdsid, chunk_def, HDF_CHUNK | HDF_COMP);
+
+    /* Set Chunk cache to hold 3 chunks */
+    status = SDsetchunkcache(sdsid, 3, 0);
+
+    /* Write data use SDwritechunk 
+       NOTE: This is the recommended way when using Compression */
+
+    /* Write chunk 1 */
+    start_dims[0] = 0;
+    start_dims[1] = 0;
+    status = SDwritechunk(sdsid, start_dims, (VOIDP) chunk1_2u16);
+
+    /* Write chunk 4 */
+    start_dims[0] = 1;
+    start_dims[1] = 1;
+    status = SDwritechunk(sdsid, start_dims, (VOIDP) chunk4_2u16);
+
+    /* Write chunk 2 */
+    start_dims[0] = 0;
+    start_dims[1] = 1;
+    status = SDwritechunk(sdsid, start_dims, (VOIDP) chunk2_2u16);
+
+    /* Write chunk 5 */
+    start_dims[0] = 2;
+    start_dims[1] = 0;
+    status = SDwritechunk(sdsid, start_dims, (VOIDP) chunk5_2u16);
+
+    /* Write chunk 3 */
+    start_dims[0] = 1;
+    start_dims[1] = 0;
+    status = SDwritechunk(sdsid, start_dims, (VOIDP) chunk3_2u16);
+
+    /* Write chunk 6 */
+    start_dims[0] = 2;
+    start_dims[1] = 1;
+    status = SDwritechunk(sdsid, start_dims, (VOIDP) chunk6_2u16);
+ 
+    /* read a portion of data back in using SDreaddata
+       i.e  5x2 subset of the whole array */
+    start_dims[0] = 2;
+    start_dims[1] = 1;
+    edge_dims[0] = 5;
+    edge_dims[1] = 2;
+    status = SDreaddata(sdsid, start_dims, NULL, edge_dims, (VOIDP) inbuf_2u16);
+
+   /* This 5x2 array should look somethink like this
+         {{23, 24, 25, 26, 27},
+          {33, 34, 35, 36, 37}}    
+    */
+
+    /* Get chunk information */
+    status = SDgetchunkinfo(sdsid, &rchunk_def, &cflags);
+
+    /* Close down this SDS*/    
+    status = SDendaccess(sdsid);
+
+    /* Close down SDS interface */
+    status = SDend(f1);
+
+}
+============================================================================
+================================vattr.txt===================================
+
+        Vgroup and vdata attributes 
+                   9/8/96
+ 
+Vdata/vgroup version
+--------------------
+Previously (up to HDF4.0r2), the vdata and vgroup version was 3, 
+VSET_VERSION.  With attributes added, the version number has been 
+changed to 4, VSET_NEW_VERSION. For backward compatibility, a vdata 
+or a vgroup will still have version number 3 if it has no attribute(s) 
+assigned. 
+
+Attribute
+---------
+An attribute has a name, data type, a number of values and the 
+values.  All values of an attribute should be of the same data type.
+For example, 10 characters, or 2 32-bit integers.
+
+Any number of attributes can be assigned to a vgroup, a vdata 
+(entire vdata) or any field of a vdata.  An attribute name should be 
+unique in its scope.  For example, a field attribute name 
+should be unique among all attributes of that field. 
+
+Attributes in HDF files
+-----------------------
+Attributes will be stored in vdatas.  The vdata's name is
+the attribute name specified by the user. Its class is 
+"Attr0.0", _HDF_ATTRIBUTE.  
+
+All attributes of a vgroup or a vdata will be included in 
+the vgroup represented by DFTAG_VG,  or the vdata header,
+DFTAG_VH. 
+ 
+Vdata/Vgroup attribute routines (see man pages for more info)
+----------------------------------------------------------
+  intn VSfindex(int32 vsid, char *fieldname, int32 *fldindex)
+       find out the index of a field given the field name.
+  intn VSsetattr(int32 vsid, int32 findex, char *attrname, 
+                 int32 datatype, int32 count, VOIDP values)
+       set attr for a field of a vdata or for the vdata.
+       if the attr already exists the new values will replace
+          the current ones, provided the datatype and order
+          have not been changed.
+  intn VSnattrs(int32 vsid)
+       total number of attr for a vdata and its fields
+  int32 VSfnattrs(int32 vsid, int32 findex) 
+       number of attrs for a vdata or a field of it
+  intn VSfindattr(int32 vsid, int32 findex, char *attrname)
+       get index of an attribute with a given name
+  intn VSattrinfo(int32 vsid, int32 findex, intn attrindex,
+                  char *name, int32 *datatype, int32 *count,
+                    int32 *size);
+       get info about an attribute
+  intn VSgetattr(int32 vsid, int32 findex, intn attrindex, 
+                 VOIDP values)
+       get values of an attribute
+  intn VSisattr(int32 vsid)
+       test if a vdata is an attribute of other object
+  intn Vsetattr(int32 vgid,  char *attrname, int32 datatype,
+                int32 count, VOIDP values) 
+       set attr for a vgroup
+  intn Vnattrs(int32 vgid)
+       number of attrs for a vgroup
+  intn Vfindattr(int32 vgid, char *attrname)
+       get index of an attribute with a given name
+  intn Vattrinfo(int32 vgid, intn attrindex, char *name, 
+                 int32 *datatype, int32 *count, int32 *size)
+       get info about an attribute
+  intn Vgetattr(int32 vgid, intn attrindex, VOIDP values)
+       get values of an attribute
+  int32 Vgetversion(int32 vgid)
+       get vset version of a vgroup
+  ( int32 VSgetversion(int32 vsid) already exists.) 
+
+Changes in the vdata header in HDF files :
+------------------------------------------
+1. If attributes or other new features are assigned:
+     o version number will be VSET_NEW_VERSION (4, 
+         defined in vg.h)
+     o the new DFTAG_VH looks like:
+           
+       interlace  number_records hdf_rec_size n_fields
+         2 bytes        4              2           2
+       datatype_field_n offset_field_n order_field_n fldnmlen_n
+         2*n_fields        2*n_fields     2*n_fields  2*n_fields
+       fldnm_n namelen name classlen class extag exref version
+                 2            2             2     2      2
+       more  flags  < nattrs  field_index attr0_tag/ref 
+        2      4         4         4         2/2        
+       field_index  attr1_tag/ref ...> version  more extra_byte
+             4           2/2          
+ 
+   If no attributes or other new features were assigned, 
+       version number is still VSET_VERSION and the old 
+       vdata header will be written out.
+
+2. In the old implementation the 'version' and 'more' fields
+   follow the 'exref' field. In order to not break existing
+   applications the new implementation keeps these two
+   fields and adds a duplication of 'version' and 'more'
+   at the end, along with an extra byte which was not 
+   documented in the old documentation. 
+
+3. The field "flags" of  uint32: 
+           bit 0 -- has attr
+           bit 1 -- 15  -- unused.
+     o Fields follow the 'flags' are:
+           total_number_of_attrs this vdata has  (4 bytes)
+           vs_attr_list  (#_attrs * 8 bytes (4+2+2))
+            (field_index, attr_vdata_tag, attr_vdata_ref) 
+       the flags and attribute fields are added after the 
+           first 'more' fields.
+ 
+Changes in the vgroup data in HDF files 
+---------------------------------------
+1. If has attribute(s):
+      o add a flag field, uint16,
+          bit 0 -- has attr
+          bit 1-15  -- unused.
+      o version number will be changed to 4 
+      o fields following the flag are:
+          number_of_attrs 
+          vg_attr_list 
+        the above fields are added preceding the version field
+      o vg_attr_list consists of a list of attribute_tag/ref
+         pairs
+   If no attribute:
+      No changes in vgroup data and version number is still 3
+============================================================================
+================================windows.txt=================================
+
+Fortner Software LLC ("Fortner") created the reference implementation for
+Windows of the HDF 4.1r3 library, providing C-language bindings to all
+4.1r3 features.
+
+The Windows reference implementation of the 4.1r3 library was implemented
+and tested on a Pentium PC running Windows95 4.00.950 using Microsoft
+Developers Studio 97 Visual C++ Version 5.00.   The library has also been
+run on Pentium PC running WindowsNT version 4.0.
+
+Fortner cannot be certain that the libraries will run on other versions of
+Windows or when built using other development tools.  (In particular, this
+Windows implementation has not addressed use with Windows 3.x, or non-PC
+versions of WindowsNT).  Migrating the Windows reference implementation to
+other development and/or run-time environments is the responsibility of the
+library user.
+
+First-time HDF users are encouraged to read the FAQ in this release for
+more information about HDF.  Users can also look at the home page for HDF
+at:
+
+    http://hdf.ncsa.uiuc.edu/
+
+Please send questions, comments, and recommendations regarding the Windows
+version of the HDF library to:
+
+    hdfhelp at ncsa.uiuc.edu
+ 
+============================================================================




More information about the Pkg-grass-devel mailing list